designix-uis 0.5.27 → 0.5.28

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.
Files changed (40) hide show
  1. package/dist/designix-uis.js +11 -8
  2. package/dist/public/_app/immutable/chunks/entry.BhC1GuVD.js +3 -0
  3. package/dist/public/_app/immutable/chunks/index.DMyJ3_XX.js +216 -0
  4. package/dist/public/_app/immutable/chunks/index.RMmEH_Pi.js +1 -0
  5. package/dist/public/_app/immutable/chunks/{makeList.DK2PU75Y.js → makeList.Dp2QFvmf.js} +1 -1
  6. package/dist/public/_app/immutable/chunks/paths.BCwAG00w.js +1 -0
  7. package/dist/public/_app/immutable/chunks/{stores.frbNy321.js → stores.LnYI0Q_W.js} +1 -1
  8. package/dist/public/_app/immutable/entry/{app.D_qE5QlD.js → app.DdYeHLD-.js} +2 -2
  9. package/dist/public/_app/immutable/entry/start.0NcJ-cbC.js +1 -0
  10. package/dist/public/_app/immutable/nodes/{0.CrLS3Xa9.js → 0.Ua4dOP46.js} +2 -2
  11. package/dist/public/_app/immutable/nodes/{1.BD2DvV63.js → 1.CVQiNnrG.js} +1 -1
  12. package/dist/public/_app/immutable/nodes/{2.Cc5ozPMH.js → 2.bLUGvR9j.js} +1 -1
  13. package/dist/public/_app/immutable/nodes/{3.BCuP28H7.js → 3.Cbv7as25.js} +2 -2
  14. package/dist/public/_app/version.json +1 -1
  15. package/dist/public/gear/gear_wheel_wheel.html +15 -15
  16. package/dist/public/gear/simplified_gear_wheel.html +15 -15
  17. package/dist/public/heliostat/base.html +15 -15
  18. package/dist/public/heliostat/haxis_guidance.html +15 -15
  19. package/dist/public/heliostat/heliostat.html +15 -15
  20. package/dist/public/heliostat/heliostat_2.html +15 -15
  21. package/dist/public/heliostat/pole_static.html +15 -15
  22. package/dist/public/heliostat/rake.html +15 -15
  23. package/dist/public/heliostat/rake_stopper.html +15 -15
  24. package/dist/public/heliostat/ring.html +15 -15
  25. package/dist/public/heliostat/ring_guidance.html +15 -15
  26. package/dist/public/heliostat/rod.html +15 -15
  27. package/dist/public/heliostat/spider.html +15 -15
  28. package/dist/public/heliostat/surface.html +15 -15
  29. package/dist/public/heliostat/swing.html +15 -15
  30. package/dist/public/heliostat/trapeze.html +15 -15
  31. package/dist/public/heliostat/vaxis.html +15 -15
  32. package/dist/public/heliostat/vaxis_guidance.html +15 -15
  33. package/dist/public/heliostat/vaxis_holder.html +15 -15
  34. package/dist/public/index.html +13 -13
  35. package/package.json +11 -8
  36. package/dist/public/_app/immutable/chunks/entry.CBq8kmx6.js +0 -3
  37. package/dist/public/_app/immutable/chunks/index.BugmtA6_.js +0 -1
  38. package/dist/public/_app/immutable/chunks/index.DSF_1trN.js +0 -216
  39. package/dist/public/_app/immutable/chunks/paths.BazameOR.js +0 -1
  40. package/dist/public/_app/immutable/entry/start.Bo4Lrmcw.js +0 -1
@@ -1,216 +0,0 @@
1
- var vo=Object.defineProperty;var Co=(e,n,t)=>n in e?vo(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var I=(e,n,t)=>(Co(e,typeof n!="symbol"?n+"":n,t),t);function O0(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}const an=15,gr=30,wr=19,Eo=29,$n=256,$r=$n+1+Eo,zr=2*$r+1,Jt=256,Fo=7,Jr=16,Qr=17,es=18,tr=8*2,Ln=-1,So=1,gn=2,ko=0,qt=0,ts=1,To=3,ke=4,Ke=0,ii=1,wn=2,ze=-2,Po=-3,Vt=-5;function Gn(e){return Wn(e.map(([n,t])=>new Array(n).fill(t,0,n)))}function Wn(e){return e.reduce((n,t)=>n.concat(Array.isArray(t)?Wn(t):t),[])}const ns=[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 oe(){const e=this;function n(s){const i=e.dyn_tree,o=e.stat_desc.static_tree,a=e.stat_desc.extra_bits,u=e.stat_desc.extra_base,l=e.stat_desc.max_length;let c,h,m,x,b,f,d=0;for(x=0;x<=an;x++)s.bl_count[x]=0;for(i[s.heap[s.heap_max]*2+1]=0,c=s.heap_max+1;c<zr;c++)h=s.heap[c],x=i[i[h*2+1]*2+1]+1,x>l&&(x=l,d++),i[h*2+1]=x,!(h>e.max_code)&&(s.bl_count[x]++,b=0,h>=u&&(b=a[h-u]),f=i[h*2],s.opt_len+=f*(x+b),o&&(s.static_len+=f*(o[h*2+1]+b)));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(h=s.bl_count[x];h!==0;)m=s.heap[--c],!(m>e.max_code)&&(i[m*2+1]!=x&&(s.opt_len+=(x-i[m*2+1])*i[m*2],i[m*2+1]=x),h--)}}function t(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,h;for(l=1;l<=an;l++)a[l]=u=u+o[l-1]<<1;for(c=0;c<=i;c++)h=s[c*2+1],h!==0&&(s[c*2]=t(a[h]++,h))}e.build_tree=function(s){const i=e.dyn_tree,o=e.stat_desc.static_tree,a=e.stat_desc.elems;let u,l,c=-1,h;for(s.heap_len=0,s.heap_max=zr,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;)h=s.heap[++s.heap_len]=c<2?++c:0,i[h*2]=1,s.depth[h]=0,s.opt_len--,o&&(s.static_len-=o[h*2+1]);for(e.max_code=c,u=Math.floor(s.heap_len/2);u>=1;u--)s.pqdownheap(i,u);h=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[h*2]=i[u*2]+i[l*2],s.depth[h]=Math.max(s.depth[u],s.depth[l])+1,i[u*2+1]=i[l*2+1]=h,s.heap[1]=h++,s.pqdownheap(i,1);while(s.heap_len>=2);s.heap[--s.heap_max]=s.heap[1],n(s),r(i,e.max_code,s.bl_count)}}oe._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]]));oe.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];oe.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];oe.d_code=function(e){return e<256?ns[e]:ns[256+(e>>>7)]};oe.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];oe.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];oe.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];oe.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function be(e,n,t,r,s){const i=this;i.static_tree=e,i.extra_bits=n,i.extra_base=t,i.elems=r,i.max_length=s}const Bo=[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],Mo=Gn([[144,8],[112,9],[24,7],[8,8]]);be.static_ltree=Wn(Bo.map((e,n)=>[e,Mo[n]]));const Io=[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],$o=Gn([[30,5]]);be.static_dtree=Wn(Io.map((e,n)=>[e,$o[n]]));be.static_l_desc=new be(be.static_ltree,oe.extra_lbits,$n+1,$r,an);be.static_d_desc=new be(be.static_dtree,oe.extra_dbits,0,gr,an);be.static_bl_desc=new be(null,oe.extra_blbits,0,wr,Fo);const Lo=9,No=8;function rt(e,n,t,r,s){const i=this;i.good_length=e,i.max_lazy=n,i.nice_length=t,i.max_chain=r,i.func=s}const oi=0,Tn=1,It=2,Xe=[new rt(0,0,0,0,oi),new rt(4,4,8,4,Tn),new rt(4,5,16,8,Tn),new rt(4,6,32,32,Tn),new rt(4,4,16,16,It),new rt(8,16,32,32,It),new rt(8,16,128,128,It),new rt(8,32,128,256,It),new rt(32,128,258,1024,It),new rt(32,258,258,4096,It)],yn=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Ue=0,bn=1,Qt=2,An=3,Oo=32,nr=42,_n=113,en=666,rr=8,Ro=0,sr=1,jo=2,ue=3,Pn=258,Le=Pn+ue+1;function rs(e,n,t,r){const s=e[n*2],i=e[t*2];return s<i||s==i&&r[n]<=r[t]}function Vo(){const e=this;let n,t,r,s,i,o,a,u,l,c,h,m,x,b,f,d,p,D,g,v,w,y,A,_,C,S,T,$,M,V,L,N,R;const U=new oe,re=new oe,j=new oe;e.depth=[];let we,W,J,Re,me,xe;e.bl_count=[],e.heap=[],L=[],N=[],R=[];function Dt(){l=2*i,h[x-1]=0;for(let E=0;E<x-1;E++)h[E]=0;S=Xe[T].max_lazy,M=Xe[T].good_length,V=Xe[T].nice_length,C=Xe[T].max_chain,w=0,p=0,A=0,D=_=ue-1,v=0,m=0}function lt(){let E;for(E=0;E<$r;E++)L[E*2]=0;for(E=0;E<gr;E++)N[E*2]=0;for(E=0;E<wr;E++)R[E*2]=0;L[Jt*2]=1,e.opt_len=e.static_len=0,W=J=0}function et(){U.dyn_tree=L,U.stat_desc=be.static_l_desc,re.dyn_tree=N,re.stat_desc=be.static_d_desc,j.dyn_tree=R,j.stat_desc=be.static_bl_desc,me=0,xe=0,Re=8,lt()}e.pqdownheap=function(E,P){const k=e.heap,B=k[P];let O=P<<1;for(;O<=e.heap_len&&(O<e.heap_len&&rs(E,k[O+1],k[O],e.depth)&&O++,!rs(E,B,k[O],e.depth));)k[P]=k[O],P=O,O<<=1;k[P]=B};function tt(E,P){let k=-1,B,O=E[0*2+1],q=0,z=7,ve=4;O===0&&(z=138,ve=3),E[(P+1)*2+1]=65535;for(let Ze=0;Ze<=P;Ze++)B=O,O=E[(Ze+1)*2+1],!(++q<z&&B==O)&&(q<ve?R[B*2]+=q:B!==0?(B!=k&&R[B*2]++,R[Jr*2]++):q<=10?R[Qr*2]++:R[es*2]++,q=0,k=B,O===0?(z=138,ve=3):B==O?(z=6,ve=3):(z=7,ve=4))}function ft(){let E;for(tt(L,U.max_code),tt(N,re.max_code),j.build_tree(e),E=wr-1;E>=3&&R[oe.bl_order[E]*2+1]===0;E--);return e.opt_len+=3*(E+1)+5+5+4,E}function je(E){e.pending_buf[e.pending++]=E}function Ve(E){je(E&255),je(E>>>8&255)}function nt(E){je(E>>8&255),je(E&255&255)}function pe(E,P){let k;const B=P;xe>tr-B?(k=E,me|=k<<xe&65535,Ve(me),me=k>>>tr-xe,xe+=B-tr):(me|=E<<xe&65535,xe+=B)}function _e(E,P){const k=E*2;pe(P[k]&65535,P[k+1]&65535)}function Tt(E,P){let k,B=-1,O,q=E[0*2+1],z=0,ve=7,Ze=4;for(q===0&&(ve=138,Ze=3),k=0;k<=P;k++)if(O=q,q=E[(k+1)*2+1],!(++z<ve&&O==q)){if(z<Ze)do _e(O,R);while(--z!==0);else O!==0?(O!=B&&(_e(O,R),z--),_e(Jr,R),pe(z-3,2)):z<=10?(_e(Qr,R),pe(z-3,3)):(_e(es,R),pe(z-11,7));z=0,B=O,q===0?(ve=138,Ze=3):O==q?(ve=6,Ze=3):(ve=7,Ze=4)}}function Kt(E,P,k){let B;for(pe(E-257,5),pe(P-1,5),pe(k-4,4),B=0;B<k;B++)pe(R[oe.bl_order[B]*2+1],3);Tt(L,E-1),Tt(N,P-1)}function gt(){xe==16?(Ve(me),me=0,xe=0):xe>=8&&(je(me&255),me>>>=8,xe-=8)}function jt(){pe(sr<<1,3),_e(Jt,be.static_ltree),gt(),1+Re+10-xe<9&&(pe(sr<<1,3),_e(Jt,be.static_ltree),gt()),Re=7}function Se(E,P){let k,B,O;if(e.dist_buf[W]=E,e.lc_buf[W]=P&255,W++,E===0?L[P*2]++:(J++,E--,L[(oe._length_code[P]+$n+1)*2]++,N[oe.d_code(E)*2]++),!(W&8191)&&T>2){for(k=W*8,B=w-p,O=0;O<gr;O++)k+=N[O*2]*(5+oe.extra_dbits[O]);if(k>>>=3,J<Math.floor(W/2)&&k<Math.floor(B/2))return!0}return W==we-1}function xn(E,P){let k,B,O=0,q,z;if(W!==0)do k=e.dist_buf[O],B=e.lc_buf[O],O++,k===0?_e(B,E):(q=oe._length_code[B],_e(q+$n+1,E),z=oe.extra_lbits[q],z!==0&&(B-=oe.base_length[q],pe(B,z)),k--,q=oe.d_code(k),_e(q,P),z=oe.extra_dbits[q],z!==0&&(k-=oe.base_dist[q],pe(k,z)));while(O<W);_e(Jt,E),Re=E[Jt*2+1]}function Dn(){xe>8?Ve(me):xe>0&&je(me&255),me=0,xe=0}function zt(E,P,k){Dn(),Re=8,Ve(P),Ve(~P),e.pending_buf.set(u.subarray(E,E+P),e.pending),e.pending+=P}function Zr(E,P,k){pe((Ro<<1)+(k?1:0),3),zt(E,P)}function wo(E,P,k){let B,O,q=0;T>0?(U.build_tree(e),re.build_tree(e),q=ft(),B=e.opt_len+3+7>>>3,O=e.static_len+3+7>>>3,O<=B&&(B=O)):B=O=P+5,P+4<=B&&E!=-1?Zr(E,P,k):O==B?(pe((sr<<1)+(k?1:0),3),xn(be.static_ltree,be.static_dtree)):(pe((jo<<1)+(k?1:0),3),Kt(U.max_code+1,re.max_code+1,q+1),xn(L,N)),lt(),k&&Dn()}function wt(E){wo(p>=0?p:-1,w-p,E),p=w,n.flush_pending()}function Qn(){let E,P,k,B;do{if(B=l-A-w,B===0&&w===0&&A===0)B=i;else if(B==-1)B--;else if(w>=i+i-Le){u.set(u.subarray(i,i+i),0),y-=i,w-=i,p-=i,E=x,k=E;do P=h[--k]&65535,h[k]=P>=i?P-i:0;while(--E!==0);E=i,k=E;do P=c[--k]&65535,c[k]=P>=i?P-i:0;while(--E!==0);B+=i}if(n.avail_in===0)return;E=n.read_buf(u,w+A,B),A+=E,A>=ue&&(m=u[w]&255,m=(m<<d^u[w+1]&255)&f)}while(A<Le&&n.avail_in!==0)}function yo(E){let P=65535,k;for(P>r-5&&(P=r-5);;){if(A<=1){if(Qn(),A===0&&E==qt)return Ue;if(A===0)break}if(w+=A,A=0,k=p+P,(w===0||w>=k)&&(A=w-k,w=k,wt(!1),n.avail_out===0)||w-p>=i-Le&&(wt(!1),n.avail_out===0))return Ue}return wt(E==ke),n.avail_out===0?E==ke?Qt:Ue:E==ke?An:bn}function Xr(E){let P=C,k=w,B,O,q=_;const z=w>i-Le?w-(i-Le):0;let ve=V;const Ze=a,er=w+Pn;let Yr=u[k+q-1],Kr=u[k+q];_>=M&&(P>>=2),ve>A&&(ve=A);do if(B=E,!(u[B+q]!=Kr||u[B+q-1]!=Yr||u[B]!=u[k]||u[++B]!=u[k+1])){k+=2,B++;do;while(u[++k]==u[++B]&&u[++k]==u[++B]&&u[++k]==u[++B]&&u[++k]==u[++B]&&u[++k]==u[++B]&&u[++k]==u[++B]&&u[++k]==u[++B]&&u[++k]==u[++B]&&k<er);if(O=Pn-(er-k),k=er-Pn,O>q){if(y=E,q=O,O>=ve)break;Yr=u[k+q-1],Kr=u[k+q]}}while((E=c[E&Ze]&65535)>z&&--P!==0);return q<=A?q:A}function bo(E){let P=0,k;for(;;){if(A<Le){if(Qn(),A<Le&&E==qt)return Ue;if(A===0)break}if(A>=ue&&(m=(m<<d^u[w+(ue-1)]&255)&f,P=h[m]&65535,c[w&a]=h[m],h[m]=w),P!==0&&(w-P&65535)<=i-Le&&$!=gn&&(D=Xr(P)),D>=ue)if(k=Se(w-y,D-ue),A-=D,D<=S&&A>=ue){D--;do w++,m=(m<<d^u[w+(ue-1)]&255)&f,P=h[m]&65535,c[w&a]=h[m],h[m]=w;while(--D!==0);w++}else w+=D,D=0,m=u[w]&255,m=(m<<d^u[w+1]&255)&f;else k=Se(0,u[w]&255),A--,w++;if(k&&(wt(!1),n.avail_out===0))return Ue}return wt(E==ke),n.avail_out===0?E==ke?Qt:Ue:E==ke?An:bn}function Ao(E){let P=0,k,B;for(;;){if(A<Le){if(Qn(),A<Le&&E==qt)return Ue;if(A===0)break}if(A>=ue&&(m=(m<<d^u[w+(ue-1)]&255)&f,P=h[m]&65535,c[w&a]=h[m],h[m]=w),_=D,g=y,D=ue-1,P!==0&&_<S&&(w-P&65535)<=i-Le&&($!=gn&&(D=Xr(P)),D<=5&&($==So||D==ue&&w-y>4096)&&(D=ue-1)),_>=ue&&D<=_){B=w+A-ue,k=Se(w-1-g,_-ue),A-=_-1,_-=2;do++w<=B&&(m=(m<<d^u[w+(ue-1)]&255)&f,P=h[m]&65535,c[w&a]=h[m],h[m]=w);while(--_!==0);if(v=0,D=ue-1,w++,k&&(wt(!1),n.avail_out===0))return Ue}else if(v!==0){if(k=Se(0,u[w-1]&255),k&&wt(!1),w++,A--,n.avail_out===0)return Ue}else v=1,w++,A--}return v!==0&&(k=Se(0,u[w-1]&255),v=0),wt(E==ke),n.avail_out===0?E==ke?Qt:Ue:E==ke?An:bn}function _o(E){return E.total_in=E.total_out=0,E.msg=null,e.pending=0,e.pending_out=0,t=_n,s=qt,et(),Dt(),Ke}e.deflateInit=function(E,P,k,B,O,q){return B||(B=rr),O||(O=No),q||(q=ko),E.msg=null,P==Ln&&(P=6),O<1||O>Lo||B!=rr||k<9||k>15||P<0||P>9||q<0||q>gn?ze:(E.dstate=e,o=k,i=1<<o,a=i-1,b=O+7,x=1<<b,f=x-1,d=Math.floor((b+ue-1)/ue),u=new Uint8Array(i*2),c=[],h=[],we=1<<O+6,e.pending_buf=new Uint8Array(we*4),r=we*4,e.dist_buf=new Uint16Array(we),e.lc_buf=new Uint8Array(we),T=P,$=q,_o(E))},e.deflateEnd=function(){return t!=nr&&t!=_n&&t!=en?ze:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,h=null,c=null,u=null,e.dstate=null,t==_n?Po:Ke)},e.deflateParams=function(E,P,k){let B=Ke;return P==Ln&&(P=6),P<0||P>9||k<0||k>gn?ze:(Xe[T].func!=Xe[P].func&&E.total_in!==0&&(B=E.deflate(ts)),T!=P&&(T=P,S=Xe[T].max_lazy,M=Xe[T].good_length,V=Xe[T].nice_length,C=Xe[T].max_chain),$=k,B)},e.deflateSetDictionary=function(E,P,k){let B=k,O,q=0;if(!P||t!=nr)return ze;if(B<ue)return Ke;for(B>i-Le&&(B=i-Le,q=k-B),u.set(P.subarray(q,q+B),0),w=B,p=B,m=u[0]&255,m=(m<<d^u[1]&255)&f,O=0;O<=B-ue;O++)m=(m<<d^u[O+(ue-1)]&255)&f,c[O&a]=h[m],h[m]=O;return Ke},e.deflate=function(E,P){let k,B,O,q,z;if(P>ke||P<0)return ze;if(!E.next_out||!E.next_in&&E.avail_in!==0||t==en&&P!=ke)return E.msg=yn[wn-ze],ze;if(E.avail_out===0)return E.msg=yn[wn-Vt],Vt;if(n=E,q=s,s=P,t==nr&&(B=rr+(o-8<<4)<<8,O=(T-1&255)>>1,O>3&&(O=3),B|=O<<6,w!==0&&(B|=Oo),B+=31-B%31,t=_n,nt(B)),e.pending!==0){if(n.flush_pending(),n.avail_out===0)return s=-1,Ke}else if(n.avail_in===0&&P<=q&&P!=ke)return n.msg=yn[wn-Vt],Vt;if(t==en&&n.avail_in!==0)return E.msg=yn[wn-Vt],Vt;if(n.avail_in!==0||A!==0||P!=qt&&t!=en){switch(z=-1,Xe[T].func){case oi:z=yo(P);break;case Tn:z=bo(P);break;case It:z=Ao(P);break}if((z==Qt||z==An)&&(t=en),z==Ue||z==Qt)return n.avail_out===0&&(s=-1),Ke;if(z==bn){if(P==ts)jt();else if(Zr(0,0,!1),P==To)for(k=0;k<x;k++)h[k]=0;if(n.flush_pending(),n.avail_out===0)return s=-1,Ke}}return P!=ke?Ke:ii}}function ai(){const e=this;e.next_in_index=0,e.next_out_index=0,e.avail_in=0,e.total_in=0,e.avail_out=0,e.total_out=0}ai.prototype={deflateInit(e,n){const t=this;return t.dstate=new Vo,n||(n=an),t.dstate.deflateInit(t,e,n)},deflate(e){const n=this;return n.dstate?n.dstate.deflate(n,e):ze},deflateEnd(){const e=this;if(!e.dstate)return ze;const n=e.dstate.deflateEnd();return e.dstate=null,n},deflateParams(e,n){const t=this;return t.dstate?t.dstate.deflateParams(t,e,n):ze},deflateSetDictionary(e,n){const t=this;return t.dstate?t.dstate.deflateSetDictionary(t,e,n):ze},read_buf(e,n,t){const r=this;let s=r.avail_in;return s>t&&(s=t),s===0?0:(r.avail_in-=s,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+s),n),r.next_in_index+=s,r.total_in+=s,s)},flush_pending(){const e=this;let n=e.dstate.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+n),e.next_out_index),e.next_out_index+=n,e.dstate.pending_out+=n,e.total_out+=n,e.avail_out-=n,e.dstate.pending-=n,e.dstate.pending===0&&(e.dstate.pending_out=0))}};function Uo(e){const n=this,t=new ai,r=qo(e&&e.chunkSize?e.chunkSize:64*1024),s=qt,i=new Uint8Array(r);let o=e?e.level:Ln;typeof o>"u"&&(o=Ln),t.deflateInit(o),t.next_out=i,n.append=function(a,u){let l,c,h=0,m=0,x=0;const b=[];if(a.length){t.next_in_index=0,t.next_in=a,t.avail_in=a.length;do{if(t.next_out_index=0,t.avail_out=r,l=t.deflate(s),l!=Ke)throw new Error("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==r?b.push(new Uint8Array(i)):b.push(i.subarray(0,t.next_out_index))),x+=t.next_out_index,u&&t.next_in_index>0&&t.next_in_index!=h&&(u(t.next_in_index),h=t.next_in_index)}while(t.avail_in>0||t.avail_out===0);return b.length>1?(c=new Uint8Array(x),b.forEach(function(f){c.set(f,m),m+=f.length})):c=b[0]?new Uint8Array(b[0]):new Uint8Array,c}},n.flush=function(){let a,u,l=0,c=0;const h=[];do{if(t.next_out_index=0,t.avail_out=r,a=t.deflate(ke),a!=ii&&a!=Ke)throw new Error("deflating: "+t.msg);r-t.avail_out>0&&h.push(i.slice(0,t.next_out_index)),c+=t.next_out_index}while(t.avail_in>0||t.avail_out===0);return t.deflateEnd(),u=new Uint8Array(c),h.forEach(function(m){u.set(m,l),l+=m.length}),u}}function qo(e){return e+5*(Math.floor(e/16383)+1)}const Go=15,ee=0,ht=1,Wo=2,Pe=-2,ae=-3,ss=-4,mt=-5,Oe=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ui=1440,Ho=0,Zo=4,Xo=9,Yo=5,Ko=[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],zo=[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],Jo=[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],Qo=[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],ea=[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],ta=[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],yt=15;function yr(){const e=this;let n,t,r,s,i,o;function a(l,c,h,m,x,b,f,d,p,D,g){let v,w,y,A,_,C,S,T,$,M,V,L,N,R,U;M=0,_=h;do r[l[c+M]]++,M++,_--;while(_!==0);if(r[0]==h)return f[0]=-1,d[0]=0,ee;for(T=d[0],C=1;C<=yt&&r[C]===0;C++);for(S=C,T<C&&(T=C),_=yt;_!==0&&r[_]===0;_--);for(y=_,T>_&&(T=_),d[0]=T,R=1<<C;C<_;C++,R<<=1)if((R-=r[C])<0)return ae;if((R-=r[_])<0)return ae;for(r[_]+=R,o[1]=C=0,M=1,N=2;--_!==0;)o[N]=C+=r[M],N++,M++;_=0,M=0;do(C=l[c+M])!==0&&(g[o[C]++]=_),M++;while(++_<h);for(h=o[y],o[0]=_=0,M=0,A=-1,L=-T,i[0]=0,V=0,U=0;S<=y;S++)for(v=r[S];v--!==0;){for(;S>L+T;){if(A++,L+=T,U=y-L,U=U>T?T:U,(w=1<<(C=S-L))>v+1&&(w-=v+1,N=S,C<U))for(;++C<U&&!((w<<=1)<=r[++N]);)w-=r[N];if(U=1<<C,D[0]+U>ui)return ae;i[A]=V=D[0],D[0]+=U,A!==0?(o[A]=_,s[0]=C,s[1]=T,C=_>>>L-T,s[2]=V-i[A-1]-C,p.set(s,(i[A-1]+C)*3)):f[0]=V}for(s[1]=S-L,M>=h?s[0]=192:g[M]<m?(s[0]=g[M]<256?0:96,s[2]=g[M++]):(s[0]=b[g[M]-m]+16+64,s[2]=x[g[M++]-m]),w=1<<S-L,C=_>>>L;C<U;C+=w)p.set(s,(V+C)*3);for(C=1<<S-1;_&C;C>>>=1)_^=C;for(_^=C,$=(1<<L)-1;(_&$)!=o[A];)A--,L-=T,$=(1<<L)-1}return R!==0&&y!=1?mt:ee}function u(l){let c;for(n||(n=[],t=[],r=new Int32Array(yt+1),s=[],i=new Int32Array(yt),o=new Int32Array(yt+1)),t.length<l&&(t=[]),c=0;c<l;c++)t[c]=0;for(c=0;c<yt+1;c++)r[c]=0;for(c=0;c<3;c++)s[c]=0;i.set(r.subarray(0,yt),0),o.set(r.subarray(0,yt+1),0)}e.inflate_trees_bits=function(l,c,h,m,x){let b;return u(19),n[0]=0,b=a(l,0,19,19,null,null,h,c,m,n,t),b==ae?x.msg="oversubscribed dynamic bit lengths tree":(b==mt||c[0]===0)&&(x.msg="incomplete dynamic bit lengths tree",b=ae),b},e.inflate_trees_dynamic=function(l,c,h,m,x,b,f,d,p){let D;return u(288),n[0]=0,D=a(h,0,l,257,Jo,Qo,b,m,d,n,t),D!=ee||m[0]===0?(D==ae?p.msg="oversubscribed literal/length tree":D!=ss&&(p.msg="incomplete literal/length tree",D=ae),D):(u(288),D=a(h,l,c,0,ea,ta,f,x,d,n,t),D!=ee||x[0]===0&&l>257?(D==ae?p.msg="oversubscribed distance tree":D==mt?(p.msg="incomplete distance tree",D=ae):D!=ss&&(p.msg="empty distance tree with lengths",D=ae),D):ee)}}yr.inflate_trees_fixed=function(e,n,t,r){return e[0]=Xo,n[0]=Yo,t[0]=Ko,r[0]=zo,ee};const vn=0,is=1,os=2,as=3,us=4,cs=5,ls=6,ir=7,fs=8,Cn=9;function na(){const e=this;let n,t=0,r,s=0,i=0,o=0,a=0,u=0,l=0,c=0,h,m=0,x,b=0;function f(d,p,D,g,v,w,y,A){let _,C,S,T,$,M,V,L,N,R,U,re,j,we,W,J;V=A.next_in_index,L=A.avail_in,$=y.bitb,M=y.bitk,N=y.write,R=N<y.read?y.read-N-1:y.end-N,U=Oe[d],re=Oe[p];do{for(;M<20;)L--,$|=(A.read_byte(V++)&255)<<M,M+=8;if(_=$&U,C=D,S=g,J=(S+_)*3,(T=C[J])===0){$>>=C[J+1],M-=C[J+1],y.win[N++]=C[J+2],R--;continue}do{if($>>=C[J+1],M-=C[J+1],T&16){for(T&=15,j=C[J+2]+($&Oe[T]),$>>=T,M-=T;M<15;)L--,$|=(A.read_byte(V++)&255)<<M,M+=8;_=$&re,C=v,S=w,J=(S+_)*3,T=C[J];do if($>>=C[J+1],M-=C[J+1],T&16){for(T&=15;M<T;)L--,$|=(A.read_byte(V++)&255)<<M,M+=8;if(we=C[J+2]+($&Oe[T]),$>>=T,M-=T,R-=j,N>=we)W=N-we,N-W>0&&2>N-W?(y.win[N++]=y.win[W++],y.win[N++]=y.win[W++],j-=2):(y.win.set(y.win.subarray(W,W+2),N),N+=2,W+=2,j-=2);else{W=N-we;do W+=y.end;while(W<0);if(T=y.end-W,j>T){if(j-=T,N-W>0&&T>N-W)do y.win[N++]=y.win[W++];while(--T!==0);else y.win.set(y.win.subarray(W,W+T),N),N+=T,W+=T,T=0;W=0}}if(N-W>0&&j>N-W)do y.win[N++]=y.win[W++];while(--j!==0);else y.win.set(y.win.subarray(W,W+j),N),N+=j,W+=j,j=0;break}else if(!(T&64))_+=C[J+2],_+=$&Oe[T],J=(S+_)*3,T=C[J];else return A.msg="invalid distance code",j=A.avail_in-L,j=M>>3<j?M>>3:j,L+=j,V-=j,M-=j<<3,y.bitb=$,y.bitk=M,A.avail_in=L,A.total_in+=V-A.next_in_index,A.next_in_index=V,y.write=N,ae;while(!0);break}if(T&64)return T&32?(j=A.avail_in-L,j=M>>3<j?M>>3:j,L+=j,V-=j,M-=j<<3,y.bitb=$,y.bitk=M,A.avail_in=L,A.total_in+=V-A.next_in_index,A.next_in_index=V,y.write=N,ht):(A.msg="invalid literal/length code",j=A.avail_in-L,j=M>>3<j?M>>3:j,L+=j,V-=j,M-=j<<3,y.bitb=$,y.bitk=M,A.avail_in=L,A.total_in+=V-A.next_in_index,A.next_in_index=V,y.write=N,ae);if(_+=C[J+2],_+=$&Oe[T],J=(S+_)*3,(T=C[J])===0){$>>=C[J+1],M-=C[J+1],y.win[N++]=C[J+2],R--;break}}while(!0)}while(R>=258&&L>=10);return j=A.avail_in-L,j=M>>3<j?M>>3:j,L+=j,V-=j,M-=j<<3,y.bitb=$,y.bitk=M,A.avail_in=L,A.total_in+=V-A.next_in_index,A.next_in_index=V,y.write=N,ee}e.init=function(d,p,D,g,v,w){n=vn,l=d,c=p,h=D,m=g,x=v,b=w,r=null},e.proc=function(d,p,D){let g,v,w,y=0,A=0,_=0,C,S,T,$;for(_=p.next_in_index,C=p.avail_in,y=d.bitb,A=d.bitk,S=d.write,T=S<d.read?d.read-S-1:d.end-S;;)switch(n){case vn:if(T>=258&&C>=10&&(d.bitb=y,d.bitk=A,p.avail_in=C,p.total_in+=_-p.next_in_index,p.next_in_index=_,d.write=S,D=f(l,c,h,m,x,b,d,p),_=p.next_in_index,C=p.avail_in,y=d.bitb,A=d.bitk,S=d.write,T=S<d.read?d.read-S-1:d.end-S,D!=ee)){n=D==ht?ir:Cn;break}i=l,r=h,s=m,n=is;case is:for(g=i;A<g;){if(C!==0)D=ee;else return d.bitb=y,d.bitk=A,p.avail_in=C,p.total_in+=_-p.next_in_index,p.next_in_index=_,d.write=S,d.inflate_flush(p,D);C--,y|=(p.read_byte(_++)&255)<<A,A+=8}if(v=(s+(y&Oe[g]))*3,y>>>=r[v+1],A-=r[v+1],w=r[v],w===0){o=r[v+2],n=ls;break}if(w&16){a=w&15,t=r[v+2],n=os;break}if(!(w&64)){i=w,s=v/3+r[v+2];break}if(w&32){n=ir;break}return n=Cn,p.msg="invalid literal/length code",D=ae,d.bitb=y,d.bitk=A,p.avail_in=C,p.total_in+=_-p.next_in_index,p.next_in_index=_,d.write=S,d.inflate_flush(p,D);case os:for(g=a;A<g;){if(C!==0)D=ee;else return d.bitb=y,d.bitk=A,p.avail_in=C,p.total_in+=_-p.next_in_index,p.next_in_index=_,d.write=S,d.inflate_flush(p,D);C--,y|=(p.read_byte(_++)&255)<<A,A+=8}t+=y&Oe[g],y>>=g,A-=g,i=c,r=x,s=b,n=as;case as:for(g=i;A<g;){if(C!==0)D=ee;else return d.bitb=y,d.bitk=A,p.avail_in=C,p.total_in+=_-p.next_in_index,p.next_in_index=_,d.write=S,d.inflate_flush(p,D);C--,y|=(p.read_byte(_++)&255)<<A,A+=8}if(v=(s+(y&Oe[g]))*3,y>>=r[v+1],A-=r[v+1],w=r[v],w&16){a=w&15,u=r[v+2],n=us;break}if(!(w&64)){i=w,s=v/3+r[v+2];break}return n=Cn,p.msg="invalid distance code",D=ae,d.bitb=y,d.bitk=A,p.avail_in=C,p.total_in+=_-p.next_in_index,p.next_in_index=_,d.write=S,d.inflate_flush(p,D);case us:for(g=a;A<g;){if(C!==0)D=ee;else return d.bitb=y,d.bitk=A,p.avail_in=C,p.total_in+=_-p.next_in_index,p.next_in_index=_,d.write=S,d.inflate_flush(p,D);C--,y|=(p.read_byte(_++)&255)<<A,A+=8}u+=y&Oe[g],y>>=g,A-=g,n=cs;case cs:for($=S-u;$<0;)$+=d.end;for(;t!==0;){if(T===0&&(S==d.end&&d.read!==0&&(S=0,T=S<d.read?d.read-S-1:d.end-S),T===0&&(d.write=S,D=d.inflate_flush(p,D),S=d.write,T=S<d.read?d.read-S-1:d.end-S,S==d.end&&d.read!==0&&(S=0,T=S<d.read?d.read-S-1:d.end-S),T===0)))return d.bitb=y,d.bitk=A,p.avail_in=C,p.total_in+=_-p.next_in_index,p.next_in_index=_,d.write=S,d.inflate_flush(p,D);d.win[S++]=d.win[$++],T--,$==d.end&&($=0),t--}n=vn;break;case ls:if(T===0&&(S==d.end&&d.read!==0&&(S=0,T=S<d.read?d.read-S-1:d.end-S),T===0&&(d.write=S,D=d.inflate_flush(p,D),S=d.write,T=S<d.read?d.read-S-1:d.end-S,S==d.end&&d.read!==0&&(S=0,T=S<d.read?d.read-S-1:d.end-S),T===0)))return d.bitb=y,d.bitk=A,p.avail_in=C,p.total_in+=_-p.next_in_index,p.next_in_index=_,d.write=S,d.inflate_flush(p,D);D=ee,d.win[S++]=o,T--,n=vn;break;case ir:if(A>7&&(A-=8,C++,_--),d.write=S,D=d.inflate_flush(p,D),S=d.write,T=S<d.read?d.read-S-1:d.end-S,d.read!=d.write)return d.bitb=y,d.bitk=A,p.avail_in=C,p.total_in+=_-p.next_in_index,p.next_in_index=_,d.write=S,d.inflate_flush(p,D);n=fs;case fs:return D=ht,d.bitb=y,d.bitk=A,p.avail_in=C,p.total_in+=_-p.next_in_index,p.next_in_index=_,d.write=S,d.inflate_flush(p,D);case Cn:return D=ae,d.bitb=y,d.bitk=A,p.avail_in=C,p.total_in+=_-p.next_in_index,p.next_in_index=_,d.write=S,d.inflate_flush(p,D);default:return D=Pe,d.bitb=y,d.bitk=A,p.avail_in=C,p.total_in+=_-p.next_in_index,p.next_in_index=_,d.write=S,d.inflate_flush(p,D)}},e.free=function(){}}const ds=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Ut=0,or=1,ps=2,hs=3,ms=4,xs=5,En=6,Fn=7,Ds=8,Pt=9;function ra(e,n){const t=this;let r=Ut,s=0,i=0,o=0,a;const u=[0],l=[0],c=new na;let h=0,m=new Int32Array(ui*3);const x=0,b=new yr;t.bitk=0,t.bitb=0,t.win=new Uint8Array(n),t.end=n,t.read=0,t.write=0,t.reset=function(f,d){d&&(d[0]=x),r==En&&c.free(f),r=Ut,t.bitk=0,t.bitb=0,t.read=t.write=0},t.reset(e,null),t.inflate_flush=function(f,d){let p,D,g;return D=f.next_out_index,g=t.read,p=(g<=t.write?t.write:t.end)-g,p>f.avail_out&&(p=f.avail_out),p!==0&&d==mt&&(d=ee),f.avail_out-=p,f.total_out+=p,f.next_out.set(t.win.subarray(g,g+p),D),D+=p,g+=p,g==t.end&&(g=0,t.write==t.end&&(t.write=0),p=t.write-g,p>f.avail_out&&(p=f.avail_out),p!==0&&d==mt&&(d=ee),f.avail_out-=p,f.total_out+=p,f.next_out.set(t.win.subarray(g,g+p),D),D+=p,g+=p),f.next_out_index=D,t.read=g,d},t.proc=function(f,d){let p,D,g,v,w,y,A,_;for(v=f.next_in_index,w=f.avail_in,D=t.bitb,g=t.bitk,y=t.write,A=y<t.read?t.read-y-1:t.end-y;;){let C,S,T,$,M,V,L,N;switch(r){case Ut:for(;g<3;){if(w!==0)d=ee;else return t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=v-f.next_in_index,f.next_in_index=v,t.write=y,t.inflate_flush(f,d);w--,D|=(f.read_byte(v++)&255)<<g,g+=8}switch(p=D&7,h=p&1,p>>>1){case 0:D>>>=3,g-=3,p=g&7,D>>>=p,g-=p,r=or;break;case 1:C=[],S=[],T=[[]],$=[[]],yr.inflate_trees_fixed(C,S,T,$),c.init(C[0],S[0],T[0],0,$[0],0),D>>>=3,g-=3,r=En;break;case 2:D>>>=3,g-=3,r=hs;break;case 3:return D>>>=3,g-=3,r=Pt,f.msg="invalid block type",d=ae,t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=v-f.next_in_index,f.next_in_index=v,t.write=y,t.inflate_flush(f,d)}break;case or:for(;g<32;){if(w!==0)d=ee;else return t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=v-f.next_in_index,f.next_in_index=v,t.write=y,t.inflate_flush(f,d);w--,D|=(f.read_byte(v++)&255)<<g,g+=8}if((~D>>>16&65535)!=(D&65535))return r=Pt,f.msg="invalid stored block lengths",d=ae,t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=v-f.next_in_index,f.next_in_index=v,t.write=y,t.inflate_flush(f,d);s=D&65535,D=g=0,r=s!==0?ps:h!==0?Fn:Ut;break;case ps:if(w===0||A===0&&(y==t.end&&t.read!==0&&(y=0,A=y<t.read?t.read-y-1:t.end-y),A===0&&(t.write=y,d=t.inflate_flush(f,d),y=t.write,A=y<t.read?t.read-y-1:t.end-y,y==t.end&&t.read!==0&&(y=0,A=y<t.read?t.read-y-1:t.end-y),A===0)))return t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=v-f.next_in_index,f.next_in_index=v,t.write=y,t.inflate_flush(f,d);if(d=ee,p=s,p>w&&(p=w),p>A&&(p=A),t.win.set(f.read_buf(v,p),y),v+=p,w-=p,y+=p,A-=p,(s-=p)!==0)break;r=h!==0?Fn:Ut;break;case hs:for(;g<14;){if(w!==0)d=ee;else return t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=v-f.next_in_index,f.next_in_index=v,t.write=y,t.inflate_flush(f,d);w--,D|=(f.read_byte(v++)&255)<<g,g+=8}if(i=p=D&16383,(p&31)>29||(p>>5&31)>29)return r=Pt,f.msg="too many length or distance symbols",d=ae,t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=v-f.next_in_index,f.next_in_index=v,t.write=y,t.inflate_flush(f,d);if(p=258+(p&31)+(p>>5&31),!a||a.length<p)a=[];else for(_=0;_<p;_++)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 t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=v-f.next_in_index,f.next_in_index=v,t.write=y,t.inflate_flush(f,d);w--,D|=(f.read_byte(v++)&255)<<g,g+=8}a[ds[o++]]=D&7,D>>>=3,g-=3}for(;o<19;)a[ds[o++]]=0;if(u[0]=7,p=b.inflate_trees_bits(a,u,l,m,f),p!=ee)return d=p,d==ae&&(a=null,r=Pt),t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=v-f.next_in_index,f.next_in_index=v,t.write=y,t.inflate_flush(f,d);o=0,r=xs;case xs:for(;p=i,!(o>=258+(p&31)+(p>>5&31));){let R,U;for(p=u[0];g<p;){if(w!==0)d=ee;else return t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=v-f.next_in_index,f.next_in_index=v,t.write=y,t.inflate_flush(f,d);w--,D|=(f.read_byte(v++)&255)<<g,g+=8}if(p=m[(l[0]+(D&Oe[p]))*3+1],U=m[(l[0]+(D&Oe[p]))*3+2],U<16)D>>>=p,g-=p,a[o++]=U;else{for(_=U==18?7:U-14,R=U==18?11:3;g<p+_;){if(w!==0)d=ee;else return t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=v-f.next_in_index,f.next_in_index=v,t.write=y,t.inflate_flush(f,d);w--,D|=(f.read_byte(v++)&255)<<g,g+=8}if(D>>>=p,g-=p,R+=D&Oe[_],D>>>=_,g-=_,_=o,p=i,_+R>258+(p&31)+(p>>5&31)||U==16&&_<1)return a=null,r=Pt,f.msg="invalid bit length repeat",d=ae,t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=v-f.next_in_index,f.next_in_index=v,t.write=y,t.inflate_flush(f,d);U=U==16?a[_-1]:0;do a[_++]=U;while(--R!==0);o=_}}if(l[0]=-1,M=[],V=[],L=[],N=[],M[0]=9,V[0]=6,p=i,p=b.inflate_trees_dynamic(257+(p&31),1+(p>>5&31),a,M,V,L,N,m,f),p!=ee)return p==ae&&(a=null,r=Pt),d=p,t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=v-f.next_in_index,f.next_in_index=v,t.write=y,t.inflate_flush(f,d);c.init(M[0],V[0],m,L[0],m,N[0]),r=En;case En:if(t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=v-f.next_in_index,f.next_in_index=v,t.write=y,(d=c.proc(t,f,d))!=ht)return t.inflate_flush(f,d);if(d=ee,c.free(f),v=f.next_in_index,w=f.avail_in,D=t.bitb,g=t.bitk,y=t.write,A=y<t.read?t.read-y-1:t.end-y,h===0){r=Ut;break}r=Fn;case Fn:if(t.write=y,d=t.inflate_flush(f,d),y=t.write,A=y<t.read?t.read-y-1:t.end-y,t.read!=t.write)return t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=v-f.next_in_index,f.next_in_index=v,t.write=y,t.inflate_flush(f,d);r=Ds;case Ds:return d=ht,t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=v-f.next_in_index,f.next_in_index=v,t.write=y,t.inflate_flush(f,d);case Pt:return d=ae,t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=v-f.next_in_index,f.next_in_index=v,t.write=y,t.inflate_flush(f,d);default:return d=Pe,t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=v-f.next_in_index,f.next_in_index=v,t.write=y,t.inflate_flush(f,d)}}},t.free=function(f){t.reset(f,null),t.win=null,m=null},t.set_dictionary=function(f,d,p){t.win.set(f.subarray(d,d+p),0),t.read=t.write=p},t.sync_point=function(){return r==or?1:0}}const sa=32,ia=8,oa=0,gs=1,ws=2,ys=3,bs=4,As=5,ar=6,tn=7,_s=12,bt=13,aa=[0,0,255,255];function ua(){const e=this;e.mode=0,e.method=0,e.was=[0],e.need=0,e.marker=0,e.wbits=0;function n(t){return!t||!t.istate?Pe:(t.total_in=t.total_out=0,t.msg=null,t.istate.mode=tn,t.istate.blocks.reset(t,null),ee)}e.inflateEnd=function(t){return e.blocks&&e.blocks.free(t),e.blocks=null,ee},e.inflateInit=function(t,r){return t.msg=null,e.blocks=null,r<8||r>15?(e.inflateEnd(t),Pe):(e.wbits=r,t.istate.blocks=new ra(t,1<<r),n(t),ee)},e.inflate=function(t,r){let s,i;if(!t||!t.istate||!t.next_in)return Pe;const o=t.istate;for(r=r==Zo?mt:ee,s=mt;;)switch(o.mode){case oa:if(t.avail_in===0)return s;if(s=r,t.avail_in--,t.total_in++,((o.method=t.read_byte(t.next_in_index++))&15)!=ia){o.mode=bt,t.msg="unknown compression method",o.marker=5;break}if((o.method>>4)+8>o.wbits){o.mode=bt,t.msg="invalid win size",o.marker=5;break}o.mode=gs;case gs:if(t.avail_in===0)return s;if(s=r,t.avail_in--,t.total_in++,i=t.read_byte(t.next_in_index++)&255,((o.method<<8)+i)%31!==0){o.mode=bt,t.msg="incorrect header check",o.marker=5;break}if(!(i&sa)){o.mode=tn;break}o.mode=ws;case ws:if(t.avail_in===0)return s;s=r,t.avail_in--,t.total_in++,o.need=(t.read_byte(t.next_in_index++)&255)<<24&4278190080,o.mode=ys;case ys:if(t.avail_in===0)return s;s=r,t.avail_in--,t.total_in++,o.need+=(t.read_byte(t.next_in_index++)&255)<<16&16711680,o.mode=bs;case bs:if(t.avail_in===0)return s;s=r,t.avail_in--,t.total_in++,o.need+=(t.read_byte(t.next_in_index++)&255)<<8&65280,o.mode=As;case As:return t.avail_in===0?s:(s=r,t.avail_in--,t.total_in++,o.need+=t.read_byte(t.next_in_index++)&255,o.mode=ar,Wo);case ar:return o.mode=bt,t.msg="need dictionary",o.marker=0,Pe;case tn:if(s=o.blocks.proc(t,s),s==ae){o.mode=bt,o.marker=0;break}if(s==ee&&(s=r),s!=ht)return s;s=r,o.blocks.reset(t,o.was),o.mode=_s;case _s:return t.avail_in=0,ht;case bt:return ae;default:return Pe}},e.inflateSetDictionary=function(t,r,s){let i=0,o=s;if(!t||!t.istate||t.istate.mode!=ar)return Pe;const a=t.istate;return o>=1<<a.wbits&&(o=(1<<a.wbits)-1,i=s-o),a.blocks.set_dictionary(r,i,o),a.mode=tn,ee},e.inflateSync=function(t){let r,s,i,o,a;if(!t||!t.istate)return Pe;const u=t.istate;if(u.mode!=bt&&(u.mode=bt,u.marker=0),(r=t.avail_in)===0)return mt;for(s=t.next_in_index,i=u.marker;r!==0&&i<4;)t.read_byte(s)==aa[i]?i++:t.read_byte(s)!==0?i=0:i=4-i,s++,r--;return t.total_in+=s-t.next_in_index,t.next_in_index=s,t.avail_in=r,u.marker=i,i!=4?ae:(o=t.total_in,a=t.total_out,n(t),t.total_in=o,t.total_out=a,u.mode=tn,ee)},e.inflateSyncPoint=function(t){return!t||!t.istate||!t.istate.blocks?Pe:t.istate.blocks.sync_point()}}function ci(){}ci.prototype={inflateInit(e){const n=this;return n.istate=new ua,e||(e=Go),n.istate.inflateInit(n,e)},inflate(e){const n=this;return n.istate?n.istate.inflate(n,e):Pe},inflateEnd(){const e=this;if(!e.istate)return Pe;const n=e.istate.inflateEnd(e);return e.istate=null,n},inflateSync(){const e=this;return e.istate?e.istate.inflateSync(e):Pe},inflateSetDictionary(e,n){const t=this;return t.istate?t.istate.inflateSetDictionary(t,e,n):Pe},read_byte(e){return this.next_in[e]},read_buf(e,n){return this.next_in.subarray(e,e+n)}};function ca(e){const n=this,t=new ci,r=e&&e.chunkSize?Math.floor(e.chunkSize*2):128*1024,s=Ho,i=new Uint8Array(r);let o=!1;t.inflateInit(),t.next_out=i,n.append=function(a,u){const l=[];let c,h,m=0,x=0,b=0;if(a.length!==0){t.next_in_index=0,t.next_in=a,t.avail_in=a.length;do{if(t.next_out_index=0,t.avail_out=r,t.avail_in===0&&!o&&(t.next_in_index=0,o=!0),c=t.inflate(s),o&&c===mt){if(t.avail_in!==0)throw new Error("inflating: bad input")}else if(c!==ee&&c!==ht)throw new Error("inflating: "+t.msg);if((o||c===ht)&&t.avail_in===a.length)throw new Error("inflating: bad input");t.next_out_index&&(t.next_out_index===r?l.push(new Uint8Array(i)):l.push(i.subarray(0,t.next_out_index))),b+=t.next_out_index,u&&t.next_in_index>0&&t.next_in_index!=m&&(u(t.next_in_index),m=t.next_in_index)}while(t.avail_in>0||t.avail_out===0);return l.length>1?(h=new Uint8Array(b),l.forEach(function(f){h.set(f,x),x+=f.length})):h=l[0]?new Uint8Array(l[0]):new Uint8Array,h}},n.flush=function(){t.inflateEnd()}}const $e=4294967295,Be=65535,vs=8,la=0,fa=99,da=67324752,li=134695760,pa=li,ha=33639248,ma=101010256,xa=101075792,Da=117853008,br=22,fi=20,di=56,ga=br+fi+di,wa=1,ya=39169,ba=10,Aa=1,pi=21589,_a=6534,va=1,Ca=8,Ea=2048,Fa=16,Sa=20,Cs=45,Es=51,ur="/",Fs=new Date(2107,11,31),Ss=new Date(1980,0,1),de=void 0,Ft="undefined",dn="function";class ks{constructor(n){return class extends TransformStream{constructor(t,r){const s=new n(r);super({transform(i,o){o.enqueue(s.append(i))},flush(i){const o=s.flush();o&&i.enqueue(o)}})}}}}const ka=64;let hi=2;try{typeof navigator!=Ft&&navigator.hardwareConcurrency&&(hi=navigator.hardwareConcurrency)}catch{}const Ta={chunkSize:512*1024,maxWorkers:hi,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:de,CompressionStreamNative:typeof CompressionStream!=Ft&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=Ft&&DecompressionStream},vt=Object.assign({},Ta);function Pa(){return vt}function Ba(e){return Math.max(e.chunkSize,ka)}function Lr(e){const{baseURL:n,chunkSize:t,maxWorkers:r,terminateWorkerTimeout:s,useCompressionStream:i,useWebWorkers:o,Deflate:a,Inflate:u,CompressionStream:l,DecompressionStream:c,workerScripts:h}=e;if(At("baseURL",n),At("chunkSize",t),At("maxWorkers",r),At("terminateWorkerTimeout",s),At("useCompressionStream",i),At("useWebWorkers",o),a&&(vt.CompressionStream=new ks(a)),u&&(vt.DecompressionStream=new ks(u)),At("CompressionStream",l),At("DecompressionStream",c),h!==de){const{deflate:m,inflate:x}=h;if((m||x)&&(vt.workerScripts||(vt.workerScripts={})),m){if(!Array.isArray(m))throw new Error("workerScripts.deflate must be an array");vt.workerScripts.deflate=m}if(x){if(!Array.isArray(x))throw new Error("workerScripts.inflate must be an array");vt.workerScripts.inflate=x}}}function At(e,n){n!==de&&(vt[e]=n)}const cr={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 e={};for(const n of Object.keys(cr))for(const t of Object.keys(cr[n])){const r=cr[n][t];if(typeof r=="string")e[r]=n+"/"+t;else for(let s=0;s<r.length;s++)e[r[s]]=n+"/"+t}return e})();const mi=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)n&1?n=n>>>1^3988292384:n=n>>>1;mi[e]=n}class Ar{constructor(n){this.crc=n||-1}append(n){let t=this.crc|0;for(let r=0,s=n.length|0;r<s;r++)t=t>>>8^mi[(t^n[r])&255];this.crc=t}get(){return~this.crc}}class xi extends TransformStream{constructor(){let n;const t=new Ar;super({transform(r,s){t.append(r),s.enqueue(r)},flush(){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,t.get()),n.value=r}}),n=this}}function Bn(e){if(typeof TextEncoder==Ft){e=unescape(encodeURIComponent(e));const n=new Uint8Array(e.length);for(let t=0;t<n.length;t++)n[t]=e.charCodeAt(t);return n}else return new TextEncoder().encode(e)}const Ee={concat(e,n){if(e.length===0||n.length===0)return e.concat(n);const t=e[e.length-1],r=Ee.getPartial(t);return r===32?e.concat(n):Ee._shiftRight(n,r,t|0,e.slice(0,e.length-1))},bitLength(e){const n=e.length;if(n===0)return 0;const t=e[n-1];return(n-1)*32+Ee.getPartial(t)},clamp(e,n){if(e.length*32<n)return e;e=e.slice(0,Math.ceil(n/32));const t=e.length;return n=n&31,t>0&&n&&(e[t-1]=Ee.partial(n,e[t-1]&2147483648>>n-1,1)),e},partial(e,n,t){return e===32?n:(t?n|0:n<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,n,t,r){for(r===void 0&&(r=[]);n>=32;n-=32)r.push(t),t=0;if(n===0)return r.concat(e);for(let o=0;o<e.length;o++)r.push(t|e[o]>>>n),t=e[o]<<32-n;const s=e.length?e[e.length-1]:0,i=Ee.getPartial(s);return r.push(Ee.partial(n+i&31,n+i>32?t:r.pop(),1)),r}},Nn={bytes:{fromBits(e){const t=Ee.bitLength(e)/8,r=new Uint8Array(t);let s;for(let i=0;i<t;i++)i&3||(s=e[i/4]),r[i]=s>>>24,s<<=8;return r},toBits(e){const n=[];let t,r=0;for(t=0;t<e.length;t++)r=r<<8|e[t],(t&3)===3&&(n.push(r),r=0);return t&3&&n.push(Ee.partial(8*(t&3),r)),n}}},Di={};Di.sha1=class{constructor(e){const n=this;n.blockSize=512,n._init=[1732584193,4023233417,2562383102,271733878,3285377520],n._key=[1518500249,1859775393,2400959708,3395469782],e?(n._h=e._h.slice(0),n._buffer=e._buffer.slice(0),n._length=e._length):n.reset()}reset(){const e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){const n=this;typeof e=="string"&&(e=Nn.utf8String.toBits(e));const t=n._buffer=Ee.concat(n._buffer,e),r=n._length,s=n._length=r+Ee.bitLength(e);if(s>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const i=new Uint32Array(t);let o=0;for(let a=n.blockSize+r-(n.blockSize+r&n.blockSize-1);a<=s;a+=n.blockSize)n._block(i.subarray(16*o,16*(o+1))),o+=1;return t.splice(0,16*o),n}finalize(){const e=this;let n=e._buffer;const t=e._h;n=Ee.concat(n,[Ee.partial(1,1)]);for(let r=n.length+2;r&15;r++)n.push(0);for(n.push(Math.floor(e._length/4294967296)),n.push(e._length|0);n.length;)e._block(n.splice(0,16));return e.reset(),t}_f(e,n,t,r){if(e<=19)return n&t|~n&r;if(e<=39)return n^t^r;if(e<=59)return n&t|n&r|t&r;if(e<=79)return n^t^r}_S(e,n){return n<<e|n>>>32-e}_block(e){const n=this,t=n._h,r=Array(80);for(let l=0;l<16;l++)r[l]=e[l];let s=t[0],i=t[1],o=t[2],a=t[3],u=t[4];for(let l=0;l<=79;l++){l>=16&&(r[l]=n._S(1,r[l-3]^r[l-8]^r[l-14]^r[l-16]));const c=n._S(5,s)+n._f(l,i,o,a)+u+r[l]+n._key[Math.floor(l/20)]|0;u=a,a=o,o=n._S(30,i),i=s,s=c}t[0]=t[0]+s|0,t[1]=t[1]+i|0,t[2]=t[2]+o|0,t[3]=t[3]+a|0,t[4]=t[4]+u|0}};const gi={};gi.aes=class{constructor(e){const n=this;n._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],n._tables[0][0][0]||n._precompute();const t=n._tables[0][4],r=n._tables[1],s=e.length;let i,o,a,u=1;if(s!==4&&s!==6&&s!==8)throw new Error("invalid aes key size");for(n._key=[o=e.slice(0),a=[]],i=s;i<4*s+28;i++){let l=o[i-1];(i%s===0||s===8&&i%s===4)&&(l=t[l>>>24]<<24^t[l>>16&255]<<16^t[l>>8&255]<<8^t[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][t[c>>>24]]^r[1][t[c>>16&255]]^r[2][t[c>>8&255]]^r[3][t[c&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],n=this._tables[1],t=e[4],r=n[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;!t[c];c^=a||1,o=i[o]||1){let h=o^o<<1^o<<2^o<<3^o<<4;h=h>>8^h&255^99,t[c]=h,r[h]=c,l=s[u=s[a=s[c]]];let m=l*16843009^u*65537^a*257^c*16843008,x=s[h]*257^h*16843008;for(let b=0;b<4;b++)e[b][c]=x=x<<24^x>>>8,n[b][h]=m=m<<24^m>>>8}for(let c=0;c<5;c++)e[c]=e[c].slice(0),n[c]=n[c].slice(0)}_crypt(e,n){if(e.length!==4)throw new Error("invalid aes block size");const t=this._key[n],r=t.length/4-2,s=[0,0,0,0],i=this._tables[n],o=i[0],a=i[1],u=i[2],l=i[3],c=i[4];let h=e[0]^t[0],m=e[n?3:1]^t[1],x=e[2]^t[2],b=e[n?1:3]^t[3],f=4,d,p,D;for(let g=0;g<r;g++)d=o[h>>>24]^a[m>>16&255]^u[x>>8&255]^l[b&255]^t[f],p=o[m>>>24]^a[x>>16&255]^u[b>>8&255]^l[h&255]^t[f+1],D=o[x>>>24]^a[b>>16&255]^u[h>>8&255]^l[m&255]^t[f+2],b=o[b>>>24]^a[h>>16&255]^u[m>>8&255]^l[x&255]^t[f+3],f+=4,h=d,m=p,x=D;for(let g=0;g<4;g++)s[n?3&-g:g]=c[h>>>24]<<24^c[m>>16&255]<<16^c[x>>8&255]<<8^c[b&255]^t[f++],d=h,h=m,m=x,x=b,b=d;return s}};const Ma={getRandomValues(e){const n=new Uint32Array(e.buffer),t=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<e.length;r+=4){const i=t((s||Math.random())*4294967296);s=i()*987654071,n[r/4]=i()*4294967296|0}return e}},wi={};wi.ctrGladman=class{constructor(e,n){this._prf=e,this._initIv=n,this._iv=n}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if((e>>24&255)===255){let n=e>>16&255,t=e>>8&255,r=e&255;n===255?(n=0,t===255?(t=0,r===255?r=0:++r):++t):++n,e=0,e+=n<<16,e+=t<<8,e+=r}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,n,t){let r;if(!(r=n.length))return[];const s=Ee.bitLength(n);for(let i=0;i<r;i+=4){this.incCounter(t);const o=e.encrypt(t);n[i]^=o[0],n[i+1]^=o[1],n[i+2]^=o[2],n[i+3]^=o[3]}return Ee.clamp(n,s)}};const Ot={importKey(e){return new Ot.hmacSha1(Nn.bytes.toBits(e))},pbkdf2(e,n,t,r){if(t=t||1e4,r<0||t<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),h=new DataView(c);let m=0;const x=Ee;for(n=Nn.bytes.toBits(n),l=1;m<(s||1);l++){for(i=o=e.encrypt(x.concat(n,[l])),a=1;a<t;a++)for(o=e.encrypt(o),u=0;u<o.length;u++)i[u]^=o[u];for(a=0;m<(s||1)&&a<i.length;a++)h.setInt32(m,i[a]),m+=4}return c.slice(0,r/8)}};Ot.hmacSha1=class{constructor(e){const n=this,t=n._hash=Di.sha1,r=[[],[]];n._baseHash=[new t,new t];const s=n._baseHash[0].blockSize/32;e.length>s&&(e=new t().update(e).finalize());for(let i=0;i<s;i++)r[0][i]=e[i]^909522486,r[1][i]=e[i]^1549556828;n._baseHash[0].update(r[0]),n._baseHash[1].update(r[1]),n._resultHash=new t(n._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){const n=this;n._updated=!0,n._resultHash.update(e)}digest(){const e=this,n=e._resultHash.finalize(),t=new e._hash(e._baseHash[1]).update(n).finalize();return e.reset(),t}encrypt(e){if(this._updated)throw new Error("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}};const Ia=typeof crypto!=Ft&&typeof crypto.getRandomValues==dn,yi="Invalid password",bi="Invalid signature",Ai="zipjs-abort-check-password";function _i(e){return Ia?crypto.getRandomValues(e):Ma.getRandomValues(e)}const Ht=16,$a="raw",vi={name:"PBKDF2"},La={name:"HMAC"},Na="SHA-1",Oa=Object.assign({hash:La},vi),_r=Object.assign({iterations:1e3,hash:{name:Na}},vi),Ra=["deriveBits"],un=[8,12,16],nn=[16,24,32],_t=10,ja=[0,0,0,0],Hn=typeof crypto!=Ft,pn=Hn&&crypto.subtle,Ci=Hn&&typeof pn!=Ft,ut=Nn.bytes,Va=gi.aes,Ua=wi.ctrGladman,qa=Ot.hmacSha1;let Ts=Hn&&Ci&&typeof pn.importKey==dn,Ps=Hn&&Ci&&typeof pn.deriveBits==dn;class Ga extends TransformStream{constructor({password:n,rawPassword:t,signed:r,encryptionStrength:s,checkPasswordOnly:i}){super({start(){Object.assign(this,{ready:new Promise(o=>this.resolveReady=o),password:Si(n,t),signed:r,strength:s-1,pending:new Uint8Array})},async transform(o,a){const u=this,{password:l,strength:c,resolveReady:h,ready:m}=u;l?(await Ha(u,c,l,We(o,0,un[c]+2)),o=We(o,un[c]+2),i?a.error(new Error(Ai)):h()):await m;const x=new Uint8Array(o.length-_t-(o.length-_t)%Ht);a.enqueue(Ei(u,o,x,0,_t,!0))},async flush(o){const{signed:a,ctr:u,hmac:l,pending:c,ready:h}=this;if(l&&u){await h;const m=We(c,0,c.length-_t),x=We(c,c.length-_t);let b=new Uint8Array;if(m.length){const f=ln(ut,m);l.update(f);const d=u.update(f);b=cn(ut,d)}if(a){const f=We(cn(ut,l.digest()),0,_t);for(let d=0;d<_t;d++)if(f[d]!=x[d])throw new Error(bi)}o.enqueue(b)}}})}}class Wa extends TransformStream{constructor({password:n,rawPassword:t,encryptionStrength:r}){let s;super({start(){Object.assign(this,{ready:new Promise(i=>this.resolveReady=i),password:Si(n,t),strength:r-1,pending:new Uint8Array})},async transform(i,o){const a=this,{password:u,strength:l,resolveReady:c,ready:h}=a;let m=new Uint8Array;u?(m=await Za(a,l,u),c()):await h;const x=new Uint8Array(m.length+i.length-i.length%Ht);x.set(m,0),o.enqueue(Ei(a,i,x,m.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 h=o.update(ln(ut,u));a.update(h),c=cn(ut,h)}s.signature=cn(ut,a.digest()).slice(0,_t),i.enqueue(Nr(c,s.signature))}}}),s=this}}function Ei(e,n,t,r,s,i){const{ctr:o,hmac:a,pending:u}=e,l=n.length-s;u.length&&(n=Nr(u,n),t=Ka(t,l-l%Ht));let c;for(c=0;c<=l-Ht;c+=Ht){const h=ln(ut,We(n,c,c+Ht));i&&a.update(h);const m=o.update(h);i||a.update(m),t.set(cn(ut,m),c+r)}return e.pending=We(n,c),t}async function Ha(e,n,t,r){const s=await Fi(e,n,t,We(r,0,un[n])),i=We(r,un[n]);if(s[0]!=i[0]||s[1]!=i[1])throw new Error(yi)}async function Za(e,n,t){const r=_i(new Uint8Array(un[n])),s=await Fi(e,n,t,r);return Nr(r,s)}async function Fi(e,n,t,r){e.password=null;const s=await Xa($a,t,Oa,!1,Ra),i=await Ya(Object.assign({salt:r},_r),s,8*(nn[n]*2+2)),o=new Uint8Array(i),a=ln(ut,We(o,0,nn[n])),u=ln(ut,We(o,nn[n],nn[n]*2)),l=We(o,nn[n]*2);return Object.assign(e,{keys:{key:a,authentication:u,passwordVerification:l},ctr:new Ua(new Va(a),Array.from(ja)),hmac:new qa(u)}),l}async function Xa(e,n,t,r,s){if(Ts)try{return await pn.importKey(e,n,t,r,s)}catch{return Ts=!1,Ot.importKey(n)}else return Ot.importKey(n)}async function Ya(e,n,t){if(Ps)try{return await pn.deriveBits(e,n,t)}catch{return Ps=!1,Ot.pbkdf2(n,e.salt,_r.iterations,t)}else return Ot.pbkdf2(n,e.salt,_r.iterations,t)}function Si(e,n){return n===de?Bn(e):n}function Nr(e,n){let t=e;return e.length+n.length&&(t=new Uint8Array(e.length+n.length),t.set(e,0),t.set(n,e.length)),t}function Ka(e,n){if(n&&n>e.length){const t=e;e=new Uint8Array(n),e.set(t,0)}return e}function We(e,n,t){return e.subarray(n,t)}function cn(e,n){return e.fromBits(n)}function ln(e,n){return e.toBits(n)}const Zt=12;class za extends TransformStream{constructor({password:n,passwordVerification:t,checkPasswordOnly:r}){super({start(){Object.assign(this,{password:n,passwordVerification:t}),ki(this,n)},transform(s,i){const o=this;if(o.password){const a=Bs(o,s.subarray(0,Zt));if(o.password=null,a[Zt-1]!=o.passwordVerification)throw new Error(yi);s=s.subarray(Zt)}r?i.error(new Error(Ai)):i.enqueue(Bs(o,s))}})}}class Ja extends TransformStream{constructor({password:n,passwordVerification:t}){super({start(){Object.assign(this,{password:n,passwordVerification:t}),ki(this,n)},transform(r,s){const i=this;let o,a;if(i.password){i.password=null;const u=_i(new Uint8Array(Zt));u[Zt-1]=i.passwordVerification,o=new Uint8Array(r.length+u.length),o.set(Ms(i,u),0),a=Zt}else o=new Uint8Array(r.length),a=0;o.set(Ms(i,r),a),s.enqueue(o)}})}}function Bs(e,n){const t=new Uint8Array(n.length);for(let r=0;r<n.length;r++)t[r]=Ti(e)^n[r],Or(e,t[r]);return t}function Ms(e,n){const t=new Uint8Array(n.length);for(let r=0;r<n.length;r++)t[r]=Ti(e)^n[r],Or(e,n[r]);return t}function ki(e,n){const t=[305419896,591751049,878082192];Object.assign(e,{keys:t,crcKey0:new Ar(t[0]),crcKey2:new Ar(t[2])});for(let r=0;r<n.length;r++)Or(e,n.charCodeAt(r))}function Or(e,n){let[t,r,s]=e.keys;e.crcKey0.append([n]),t=~e.crcKey0.get(),r=Is(Math.imul(Is(r+Pi(t)),134775813)+1),e.crcKey2.append([r>>>24]),s=~e.crcKey2.get(),e.keys=[t,r,s]}function Ti(e){const n=e.keys[2]|2;return Pi(Math.imul(n,n^1)>>>8)}function Pi(e){return e&255}function Is(e){return e&4294967295}const $s="deflate-raw";class Qa extends TransformStream{constructor(n,{chunkSize:t,CompressionStream:r,CompressionStreamNative:s}){super({});const{compressed:i,encrypted:o,useCompressionStream:a,zipCrypto:u,signed:l,level:c}=n,h=this;let m,x,b=Bi(super.readable);(!o||u)&&l&&(m=new xi,b=ct(b,m)),i&&(b=Ii(b,a,{level:c,chunkSize:t},s,r)),o&&(u?b=ct(b,new Ja(n)):(x=new Wa(n),b=ct(b,x))),Mi(h,b,()=>{let f;o&&!u&&(f=x.signature),(!o||u)&&l&&(f=new DataView(m.value.buffer).getUint32(0)),h.signature=f})}}class eu extends TransformStream{constructor(n,{chunkSize:t,DecompressionStream:r,DecompressionStreamNative:s}){super({});const{zipCrypto:i,encrypted:o,signed:a,signature:u,compressed:l,useCompressionStream:c}=n;let h,m,x=Bi(super.readable);o&&(i?x=ct(x,new za(n)):(m=new Ga(n),x=ct(x,m))),l&&(x=Ii(x,c,{chunkSize:t},s,r)),(!o||i)&&a&&(h=new xi,x=ct(x,h)),Mi(this,x,()=>{if((!o||i)&&a){const b=new DataView(h.value.buffer);if(u!=b.getUint32(0,!1))throw new Error(bi)}})}}function Bi(e){return ct(e,new TransformStream({transform(n,t){n&&n.length&&t.enqueue(n)}}))}function Mi(e,n,t){n=ct(n,new TransformStream({flush:t})),Object.defineProperty(e,"readable",{get(){return n}})}function Ii(e,n,t,r,s){try{const i=n&&r?r:s;e=ct(e,new i($s,t))}catch{if(n)try{e=ct(e,new s($s,t))}catch{return e}else return e}return e}function ct(e,n){return e.pipeThrough(n)}const tu="message",nu="start",ru="pull",Ls="data",su="ack",Ns="close",$i="deflate",iu="inflate";class ou extends TransformStream{constructor(n,t){super({});const r=this,{codecType:s}=n;let i;s.startsWith($i)?i=Qa:s.startsWith(iu)&&(i=eu);let o=0,a=0;const u=new i(n,t),l=super.readable,c=new TransformStream({transform(m,x){m&&m.length&&(a+=m.length,x.enqueue(m))},flush(){Object.assign(r,{inputSize:a})}}),h=new TransformStream({transform(m,x){m&&m.length&&(o+=m.length,x.enqueue(m))},flush(){const{signature:m}=u;Object.assign(r,{signature:m,outputSize:o,inputSize:a})}});Object.defineProperty(r,"readable",{get(){return l.pipeThrough(c).pipeThrough(u).pipeThrough(h)}})}}class au extends TransformStream{constructor(n){let t;super({transform:r,flush(s){t&&t.length&&s.enqueue(t)}});function r(s,i){if(t){const o=new Uint8Array(t.length+s.length);o.set(t),o.set(s,t.length),s=o,t=null}s.length>n?(i.enqueue(s.slice(0,n)),r(s.slice(n),i)):t=s}}}let Li=typeof Worker!=Ft;class lr{constructor(n,{readable:t,writable:r},{options:s,config:i,streamOptions:o,useWebWorkers:a,transferStreams:u,scripts:l},c){const{signal:h}=o;return Object.assign(n,{busy:!0,readable:t.pipeThrough(new au(i.chunkSize)).pipeThrough(new uu(t,o),{signal:h}),writable:r,options:Object.assign({},s),scripts:l,transferStreams:u,terminate(){return new Promise(m=>{const{worker:x,busy:b}=n;x?(b?n.resolveTerminated=m:(x.terminate(),m()),n.interface=null):m()})},onTaskFinished(){const{resolveTerminated:m}=n;m&&(n.resolveTerminated=null,n.terminated=!0,n.worker.terminate(),m()),n.busy=!1,c(n)}}),(a&&Li?cu:Ni)(n,i)}}class uu extends TransformStream{constructor(n,{onstart:t,onprogress:r,size:s,onend:i}){let o=0;super({async start(){t&&await fr(t,s)},async transform(a,u){o+=a.length,r&&await fr(r,o,s),u.enqueue(a)},async flush(){n.size=o,i&&await fr(i,o)}})}}async function fr(e,...n){try{await e(...n)}catch{}}function Ni(e,n){return{run:()=>lu(e,n)}}function cu(e,n){const{baseURL:t,chunkSize:r}=n;if(!e.interface){let s;try{s=pu(e.scripts[0],t,e)}catch{return Li=!1,Ni(e,n)}Object.assign(e,{worker:s,interface:{run:()=>fu(e,{chunkSize:r})}})}return e.interface}async function lu({options:e,readable:n,writable:t,onTaskFinished:r},s){try{const i=new ou(e,s);await n.pipeThrough(i).pipeTo(t,{preventClose:!0,preventAbort:!0});const{signature:o,inputSize:a,outputSize:u}=i;return{signature:o,inputSize:a,outputSize:u}}finally{r()}}async function fu(e,n){let t,r;const s=new Promise((m,x)=>{t=m,r=x});Object.assign(e,{reader:null,writer:null,resolveResult:t,rejectResult:r,result:s});const{readable:i,options:o,scripts:a}=e,{writable:u,closed:l}=du(e.writable),c=Mn({type:nu,scripts:a.slice(1),options:o,config:n,readable:i,writable:u},e);c||Object.assign(e,{reader:i.getReader(),writer:u.getWriter()});const h=await s;return c||await u.getWriter().close(),await l,h}function du(e){let n;const t=new Promise(s=>n=s);return{writable:new WritableStream({async write(s){const i=e.getWriter();await i.ready,await i.write(s),i.releaseLock()},close(){n()},abort(s){return e.getWriter().abort(s)}}),closed:t}}let Os=!0,Rs=!0;function pu(e,n,t){const r={type:"module"};let s,i;typeof e==dn&&(e=e());try{s=new URL(e,n)}catch{s=e}if(Os)try{i=new Worker(s)}catch{Os=!1,i=new Worker(s,r)}else i=new Worker(s,r);return i.addEventListener(tu,o=>hu(o,t)),i}function Mn(e,{worker:n,writer:t,onTaskFinished:r,transferStreams:s}){try{let{value:i,readable:o,writable:a}=e;const u=[];if(i&&(i.byteLength<i.buffer.byteLength?e.value=i.buffer.slice(0,i.byteLength):e.value=i.buffer,u.push(e.value)),s&&Rs?(o&&u.push(o),a&&u.push(a)):e.readable=e.writable=null,u.length)try{return n.postMessage(e,u),!0}catch{Rs=!1,e.readable=e.writable=null,n.postMessage(e)}else n.postMessage(e)}catch(i){throw t&&t.releaseLock(),r(),i}}async function hu({data:e},n){const{type:t,value:r,messageId:s,result:i,error:o}=e,{reader:a,writer:u,resolveResult:l,rejectResult:c,onTaskFinished:h}=n;try{if(o){const{message:x,stack:b,code:f,name:d}=o,p=new Error(x);Object.assign(p,{stack:b,code:f,name:d}),m(p)}else{if(t==ru){const{value:x,done:b}=await a.read();Mn({type:Ls,value:x,done:b,messageId:s},n)}t==Ls&&(await u.ready,await u.write(new Uint8Array(r)),Mn({type:su,messageId:s},n)),t==Ns&&m(null,i)}}catch(x){Mn({type:Ns,messageId:s},n),m(x)}function m(x,b){x?c(x):l(b),u&&u.releaseLock(),h()}}let Lt=[];const dr=[];let js=0;async function mu(e,n){const{options:t,config:r}=n,{transferStreams:s,useWebWorkers:i,useCompressionStream:o,codecType:a,compressed:u,signed:l,encrypted:c}=t,{workerScripts:h,maxWorkers:m}=r;n.transferStreams=s||s===de;const x=!u&&!l&&!c&&!n.transferStreams;return n.useWebWorkers=!x&&(i||i===de&&r.useWebWorkers),n.scripts=n.useWebWorkers&&h?h[a]:[],t.useCompressionStream=o||o===de&&r.useCompressionStream,(await b()).run();async function b(){const d=Lt.find(p=>!p.busy);if(d)return Vs(d),new lr(d,e,n,f);if(Lt.length<m){const p={indexWorker:js};return js++,Lt.push(p),new lr(p,e,n,f)}else return new Promise(p=>dr.push({resolve:p,stream:e,workerOptions:n}))}function f(d){if(dr.length){const[{resolve:p,stream:D,workerOptions:g}]=dr.splice(0,1);p(new lr(d,D,g,f))}else d.worker?(Vs(d),xu(d,n)):Lt=Lt.filter(p=>p!=d)}}function xu(e,n){const{config:t}=n,{terminateWorkerTimeout:r}=t;Number.isFinite(r)&&r>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout(async()=>{Lt=Lt.filter(s=>s!=e);try{await e.terminate()}catch{}},r))}function Vs(e){const{terminateTimeout:n}=e;n&&(clearTimeout(n),e.terminateTimeout=null)}function Du(e){const n=()=>URL.createObjectURL(new Blob([`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={p:{m(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},k(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.v=[1732584193,4023233417,2562383102,271733878,3285377520],t.S=[1518500249,1859775393,2400959708,3395469782],e?(t.C=e.C.slice(0),t.A=e.A.slice(0),t._=e._):t.reset()}reset(){const e=this;return e.C=e.v.slice(0),e.A=[],e._=0,e}update(e){const t=this;"string"==typeof e&&(e=I.I.k(e));const n=t.A=_.concat(t.A,e),r=t._,i=t._=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.P(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}D(){const e=this;let t=e.A;const n=e.C;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.P(t.splice(0,16));return e.reset(),n}V(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}R(e,t){return t<<e|t>>>32-e}P(t){const n=this,s=n.C,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.R(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.R(5,o)+n.V(e,c,f,a)+l+i[e]+n.S[r.floor(e/20)]|0;l=a,a=f,f=n.R(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.B(I.p.k(e)),M(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.p.k(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)},B:class{constructor(e){const t=this,n=t.U=P,r=[[],[]];t.K=[new n,new n];const s=t.K[0].blockSize/32;e.length>s&&(e=(new n).update(e).D());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.K[0].update(r[0]),t.K[1].update(r[1]),t.N=new n(t.K[0])}reset(){const e=this;e.N=new e.U(e.K[0]),e.O=!1}update(e){this.O=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.U(e.K[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.O)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.p,X=class{constructor(e){const t=this;t.T=[[[],[],[],[],[]],[[],[],[],[],[]]],t.T[0][0][0]||t.W();const n=t.T[0][4],r=t.T[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.S=[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.j(e,0)}decrypt(e){return this.j(e,1)}W(){const e=this.T[0],t=this.T[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)}j(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.S[t],r=n.length/4-2,i=[0,0,0,0],o=this.T[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.H=e,this.L=t,this.F=t}reset(){this.F=this.L}update(e){return this.q(this.H,e,this.F)}G(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}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(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.B;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.X=e)),password:ie(e,n),signed:r,Y:o-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X: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,Z:n,$: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.X=e)),password:ie(e,n),Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X: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{Z:t,$: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{Z:c,$: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.M(t,e.salt,T.iterations,n);try{return await G.deriveBits(e,t,n)}catch(r){return ee=!1,V.M(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,ee:u,passwordVerification:w},Z:new Y(new X(l),e.from(F)),$: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.m(t)}function ae(e,t){return e.k(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,te:new x(r[0]),ne: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.te.append([t]),n=~e.te.get(),s=be(r.imul(be(s+me(n)),134775813)+1),e.ne.append([s>>>24]),i=~e.ne.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=15,Te=573,We=-2;function je(t){return He(t.map((([t,n])=>new e(t).fill(n,0,t))))}function He(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?He(n):n)),[])}const Le=[0,1,2,3].concat(...je([[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 Fe(){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.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=Te,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;Oe>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;Te>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(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;Oe>=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.de,n.ge)}}function qe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Fe.ke=[0,1,2,3,4,5,6,7].concat(...je([[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]])),Fe.ve=[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],Fe.Se=[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],Fe.ze=e=>256>e?Le[e]:Le[256+(e>>>7)],Fe.Ce=[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],Fe.xe=[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],Fe.Ae=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Fe._e=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ge=je([[144,8],[112,9],[24,7],[8,8]]);qe.Ie=He([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,Ge[t]])));const Je=je([[30,5]]);function Qe(e,t,n,r,s){const i=this;i.Pe=e,i.De=t,i.Ve=n,i.Re=r,i.Be=s}qe.Ee=He([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,Je[t]]))),qe.Me=new qe(qe.Ie,Fe.Ce,257,286,Oe),qe.Ue=new qe(qe.Ee,Fe.xe,0,30,Oe),qe.Ke=new qe(null,Fe.Ae,0,19,7);const Xe=[new Qe(0,0,0,0,0),new Qe(4,4,8,4,1),new Qe(4,5,16,8,1),new Qe(4,6,32,32,1),new Qe(4,4,16,16,2),new Qe(8,16,32,32,2),new Qe(8,16,128,128,2),new Qe(8,32,128,256,2),new Qe(32,128,258,1024,2),new Qe(32,258,258,4096,2)],Ye=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Ze=113,$e=666,et=262;function tt(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function nt(){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 Fe,N=new Fe,O=new Fe;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.we=e.he=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.Ne[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.Oe[W]=t,e.Te[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(Fe.ke[n]+256+1)]++,M[2*Fe.ze(t)]++),!(8191&W)&&D>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+Fe.xe[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.Oe[c],s=e.Te[c],c++,0===r?Y(s,t):(i=Fe.ke[s],Y(i+256+1,t),o=Fe.Ce[i],0!==o&&(s-=Fe.ve[i],X(s,o)),r--,i=Fe.ze(r),Y(i,n),o=Fe.xe[i],0!==o&&(r-=Fe.Se[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.Ne.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.re(e),N.re(e),o=(()=>{let t;for(G(E,K.de),G(M,N.de),O.re(e),t=18;t>=3&&0===U[2*Fe._e[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+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(qe.Ie,qe.Ee)):(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*Fe._e[r]+1],3);Z(E,e-1),Z(M,t-1)})(K.de+1,N.de+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.We()}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-et){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.je)return;e=t.He(u,C+A,s),A+=e,3>A||(p=255&u[C],p=(p<<g^255&u[C+1])&b)}while(et>A&&0!==t.je)}function oe(e){let t,n,r=I,s=C,i=_;const o=C>f-et?C-(f-et):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.ue=[],e.ge=[],e.le=[],E=[],M=[],U=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i<e.fe&&tt(t,r[i+1],r[i],e.ue)&&i++,!tt(t,s,r[i],e.ue));)r[n]=r[i],n=i,i<<=1;r[n]=s},e.Le=(t,S,x,W,j,G)=>(W||(W=8),j||(j=8),G||(G=0),t.Fe=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?We:(t.qe=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.Ne=new i(4*T),s=4*T,e.Oe=new o(T),e.Te=new i(T),D=S,V=G,(t=>(t.Ge=t.Je=0,t.Fe=null,e.pending=0,e.Qe=0,n=Ze,c=0,K.se=E,K.oe=qe.Me,N.se=M,N.oe=qe.Ue,O.se=U,O.oe=qe.Ke,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=Xe[D].De,R=Xe[D].Pe,B=Xe[D].Ve,I=Xe[D].Re,C=0,k=0,A=0,v=_=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&n!=Ze&&n!=$e?We:(e.Te=null,e.Oe=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,n==Ze?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?We:(Xe[D].Be!=Xe[t].Be&&0!==e.Ge&&(r=e.Ze(1)),D!=t&&(D=t,P=Xe[D].De,R=Xe[D].Pe,B=Xe[D].Ve,I=Xe[D].Re),V=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return We;if(3>i)return 0;for(i>f-et&&(i=f-et,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.Ze=(r,i)=>{let o,w,m,I,R;if(i>4||0>i)return We;if(!r.et||!r.tt&&0!==r.je||n==$e&&4!=i)return r.Fe=Ye[4],We;if(0===r.nt)return r.Fe=Ye[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=Ze,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.We(),0===t.nt)return c=-1,0}else if(0===t.je&&I>=i&&4!=i)return t.Fe=Ye[7],-5;if(n==$e&&0!==t.je)return r.Fe=Ye[7],-5;if(0!==t.je||0!==A||0!=i&&n!=$e){switch(R=-1,Xe[D].Be){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.nt))return 0;if(C-k>=f-et&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(et>A){if(ie(),et>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-et||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.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 2:R=(e=>{let n,r,s=0;for(;;){if(et>A){if(ie(),et>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-et>=(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.nt)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.nt))return 0}}return 0!==z&&(n=ee(0,255&u[C-1]),z=0),se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i)}if(2!=R&&3!=R||(n=$e),0==R||2==R)return 0===t.nt&&(c=-1),0;if(1==R){if(1==i)X(2,3),Y(256,qe.Ie),$(),9>1+H+10-F&&(X(2,3),Y(256,qe.Ie),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.We(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function rt(){const e=this;e.rt=0,e.st=0,e.je=0,e.Ge=0,e.nt=0,e.Je=0}function st(e){const t=new rt,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.Le(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.je=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s("deflating: "+t.Fe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.subarray(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.je>0||0===t.nt);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.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s("deflating: "+t.Fe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.je>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}rt.prototype={Le(e,t){const n=this;return n.qe=new nt,t||(t=Oe),n.qe.Le(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):We},Xe(){const e=this;if(!e.qe)return We;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):We},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):We},He(e,t,n){const r=this;let s=r.je;return s>n&&(s=n),0===s?0:(r.je-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},We(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const it=0,ot=1,ct=-2,ft=-3,at=-4,lt=-5,ut=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],wt=1440,ht=[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],dt=[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],pt=[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],yt=[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],mt=[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],bt=[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],gt=15;function kt(){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,it;for(S=u[0],k=1;gt>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=gt;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 ft;if(0>(I-=n[g]))return ft;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>wt)return ft;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;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?lt:it}function c(o){let c;for(e||(e=[],t=[],n=new f(gt+1),r=[],s=new f(gt),i=new f(gt+1)),t.length<o&&(t=[]),c=0;o>c;c++)t[c]=0;for(c=0;gt+1>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,gt),0),i.set(n.subarray(0,gt+1),0)}this.it=(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==ft?f.Fe="oversubscribed dynamic bit lengths tree":a!=lt&&0!==r[0]||(f.Fe="incomplete dynamic bit lengths tree",a=ft),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,pt,yt,a,i,u,e,t),h!=it||0===i[0]?(h==ft?w.Fe="oversubscribed literal/length tree":h!=at&&(w.Fe="incomplete literal/length tree",h=ft),h):(c(288),h=o(s,n,r,0,mt,bt,l,f,u,e,t),h!=it||0===f[0]&&n>257?(h==ft?w.Fe="oversubscribed distance tree":h==lt?(w.Fe="incomplete distance tree",h=ft):h!=at&&(w.Fe="empty distance tree with lengths",h=ft),h):it)}}kt.ct=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=ht,r[0]=dt,it);const vt=0,St=1,zt=2,Ct=3,xt=4,At=5,_t=6,It=7,Pt=8,Dt=9;function Vt(){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.rt,p=c.je,w=o.ft,h=o.lt,y=o.write,m=y<o.read?o.read-y-1:o.end-y,b=ut[e],g=ut[t];do{for(;20>h;)p--,w|=(255&c.ut(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&ut[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ut(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.ut(d++))<<h,h+=8;if(v=a[z+2]+(w&ut[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.wt[y++]=o.wt[S++]}while(0!=--u);else o.wt.set(o.wt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.wt[y++]=o.wt[S++],o.wt[y++]=o.wt[S++],k-=2):(o.wt.set(o.wt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.wt[y++]=o.wt[S++]}while(0!=--k);else o.wt.set(o.wt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(64&u)return c.Fe="invalid distance code",k=c.je-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ft=w,o.lt=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,ft;f+=a[z+2],f+=w&ut[u],z=3*(l+f),u=a[z]}break}if(64&u)return 32&u?(k=c.je-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ft=w,o.lt=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,ot):(c.Fe="invalid literal/length code",k=c.je-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ft=w,o.lt=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,ft);if(f+=a[z+2],f+=w&ut[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.wt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.wt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.je-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ft=w,o.lt=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,it}e.init=(e,i,o,c,f,a)=>{t=vt,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ht=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,A=0,_=0;for(_=y.rt,v=y.je,x=e.ft,A=e.lt,S=e.write,z=S<e.read?e.read-S-1:e.end-S;;)switch(t){case vt:if(z>=258&&v>=10&&(e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,m=p(u,w,r,h,s,d,e,y),_=y.rt,v=y.je,x=e.ft,A=e.lt,S=e.write,z=S<e.read?e.read-S-1:e.end-S,m!=it)){t=m==ot?It:Dt;break}c=u,n=r,o=h,t=St;case St:for(b=c;b>A;){if(0===v)return e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);m=it,v--,x|=(255&y.ut(_++))<<A,A+=8}if(g=3*(o+(x&ut[b])),x>>>=n[g+1],A-=n[g+1],k=n[g],0===k){f=n[g+2],t=_t;break}if(16&k){a=15&k,i=n[g+2],t=zt;break}if(!(64&k)){c=k,o=g/3+n[g+2];break}if(32&k){t=It;break}return t=Dt,y.Fe="invalid literal/length code",m=ft,e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);case zt:for(b=a;b>A;){if(0===v)return e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);m=it,v--,x|=(255&y.ut(_++))<<A,A+=8}i+=x&ut[b],x>>=b,A-=b,c=w,n=s,o=d,t=Ct;case Ct:for(b=c;b>A;){if(0===v)return e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);m=it,v--,x|=(255&y.ut(_++))<<A,A+=8}if(g=3*(o+(x&ut[b])),x>>=n[g+1],A-=n[g+1],k=n[g],16&k){a=15&k,l=n[g+2],t=xt;break}if(!(64&k)){c=k,o=g/3+n[g+2];break}return t=Dt,y.Fe="invalid distance code",m=ft,e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);case xt:for(b=a;b>A;){if(0===v)return e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);m=it,v--,x|=(255&y.ut(_++))<<A,A+=8}l+=x&ut[b],x>>=b,A-=b,t=At;case At: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.dt(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.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);e.wt[S++]=e.wt[C++],z--,C==e.end&&(C=0),i--}t=vt;break;case _t: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.dt(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.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);m=it,e.wt[S++]=f,z--,t=vt;break;case It:if(A>7&&(A-=8,v++,_--),e.write=S,m=e.dt(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,e.read!=e.write)return e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);t=Pt;case Pt:return m=ot,e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);case Dt:return m=ft,e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);default:return m=ct,e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m)}},e.yt=()=>{}}const Rt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Bt=0,Et=1,Mt=2,Ut=3,Kt=4,Nt=5,Ot=6,Tt=7,Wt=8,jt=9;function Ht(e,t){const n=this;let r,s=Bt,o=0,c=0,a=0;const l=[0],u=[0],w=new Vt;let h=0,d=new f(3*wt);const p=new kt;n.lt=0,n.ft=0,n.wt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),s==Ot&&w.yt(e),s=Bt,n.lt=0,n.ft=0,n.read=n.write=0},n.reset(e,null),n.dt=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&t==lt&&(t=it),e.nt-=r,e.Je+=r,e.et.set(n.wt.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.nt&&(r=e.nt),0!==r&&t==lt&&(t=it),e.nt-=r,e.Je+=r,e.et.set(n.wt.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.ht=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.je,f=n.ft,y=n.lt,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 Bt:for(;3>y;){if(0===b)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);t=it,b--,f|=(255&e.ut(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=Et;break;case 1:S=[],z=[],C=[[]],x=[[]],kt.ct(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=Ot;break;case 2:f>>>=3,y-=3,s=Ut;break;case 3:return f>>>=3,y-=3,s=jt,e.Fe="invalid block type",t=ft,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t)}break;case Et:for(;32>y;){if(0===b)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);t=it,b--,f|=(255&e.ut(m++))<<y,y+=8}if((~f>>>16&65535)!=(65535&f))return s=jt,e.Fe="invalid stored block lengths",t=ft,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);o=65535&f,f=y=0,s=0!==o?Mt:0!==h?Tt:Bt;break;case Mt:if(0===b)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(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.dt(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.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);if(t=it,i=o,i>b&&(i=b),i>k&&(i=k),n.wt.set(e.He(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?Tt:Bt;break;case Ut:for(;14>y;){if(0===b)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);t=it,b--,f|=(255&e.ut(m++))<<y,y+=8}if(c=i=16383&f,(31&i)>29||(i>>5&31)>29)return s=jt,e.Fe="too many length or distance symbols",t=ft,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(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=Kt;case Kt:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);t=it,b--,f|=(255&e.ut(m++))<<y,y+=8}r[Rt[a++]]=7&f,f>>>=3,y-=3}for(;19>a;)r[Rt[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),i!=it)return(t=i)==ft&&(r=null,s=jt),n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);a=0,s=Nt;case Nt:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);t=it,b--,f|=(255&e.ut(m++))<<y,y+=8}if(i=d[3*(u[0]+(f&ut[i]))+1],w=d[3*(u[0]+(f&ut[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.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);t=it,b--,f|=(255&e.ut(m++))<<y,y+=8}if(f>>>=i,y-=i,o+=f&ut[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=jt,e.Fe="invalid bit length repeat",t=ft,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(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.ot(257+(31&i),1+(i>>5&31),r,A,_,I,P,d,e),i!=it)return i==ft&&(r=null,s=jt),t=i,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);w.init(A[0],_[0],d,I[0],d,P[0]),s=Ot;case Ot:if(n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,(t=w.ht(n,e,t))!=ot)return n.dt(e,t);if(t=it,w.yt(e),m=e.rt,b=e.je,f=n.ft,y=n.lt,g=n.write,k=g<n.read?n.read-g-1:n.end-g,0===h){s=Bt;break}s=Tt;case Tt:if(n.write=g,t=n.dt(e,t),g=n.write,k=g<n.read?n.read-g-1:n.end-g,n.read!=n.write)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);s=Wt;case Wt:return t=ot,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);case jt:return t=ft,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);default:return t=ct,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t)}}},n.yt=e=>{n.reset(e,null),n.wt=null,d=null},n.bt=(e,t,r)=>{n.wt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>s==Et?1:0}const Lt=13,Ft=[0,0,255,255];function qt(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Fe=null,e.kt.mode=7,e.kt.vt.reset(e,null),it):ct}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e.Ct=0,e.xt=t=>(e.vt&&e.vt.yt(t),e.vt=null,it),e.At=(n,r)=>(n.Fe=null,e.vt=null,8>r||r>15?(e.xt(n),ct):(e.Ct=r,n.kt.vt=new Ht(n,1<<r),t(n),it)),e._t=(e,t)=>{let n,r;if(!e||!e.kt||!e.tt)return ct;const s=e.kt;for(t=4==t?lt:it,n=lt;;)switch(s.mode){case 0:if(0===e.je)return n;if(n=t,e.je--,e.Ge++,8!=(15&(s.method=e.ut(e.rt++)))){s.mode=Lt,e.Fe="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.Ct){s.mode=Lt,e.Fe="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.je)return n;if(n=t,e.je--,e.Ge++,r=255&e.ut(e.rt++),((s.method<<8)+r)%31!=0){s.mode=Lt,e.Fe="incorrect header check",s.marker=5;break}if(!(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.je)return n;n=t,e.je--,e.Ge++,s.zt=(255&e.ut(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.je)return n;n=t,e.je--,e.Ge++,s.zt+=(255&e.ut(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.je)return n;n=t,e.je--,e.Ge++,s.zt+=(255&e.ut(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.je?n:(n=t,e.je--,e.Ge++,s.zt+=255&e.ut(e.rt++),s.mode=6,2);case 6:return s.mode=Lt,e.Fe="need dictionary",s.marker=0,ct;case 7:if(n=s.vt.ht(e,n),n==ft){s.mode=Lt,s.marker=0;break}if(n==it&&(n=t),n!=ot)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.je=0,ot;case Lt:return ft;default:return ct}},e.It=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return ct;const i=e.kt;return s<1<<i.Ct||(s=(1<<i.Ct)-1,r=n-s),i.vt.bt(t,r,s),i.mode=7,it},e.Pt=e=>{let n,r,s,i,o;if(!e||!e.kt)return ct;const c=e.kt;if(c.mode!=Lt&&(c.mode=Lt,c.marker=0),0===(n=e.je))return lt;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.ut(r)==Ft[s]?s++:s=0!==e.ut(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.je=n,c.marker=s,4!=s?ft:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,it)},e.Dt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():ct}function Gt(){}function Jt(e){const t=new Gt,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.At(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.je=e.length;do{if(t.st=0,t.nt=n,0!==t.je||c||(t.rt=0,c=!0),a=t._t(0),c&&a===lt){if(0!==t.je)throw new s("inflating: bad input")}else if(a!==it&&a!==ot)throw new s("inflating: "+t.Fe);if((c||a===ot)&&t.je===e.length)throw new s("inflating: bad input");t.st&&(t.st===n?f.push(new i(o)):f.push(o.subarray(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.je>0||0===t.nt);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.xt()}}Gt.prototype={At(e){const t=this;return t.kt=new qt,e||(e=15),t.kt.At(t,e)},_t(e){const t=this;return t.kt?t.kt._t(t,e):ct},xt(){const e=this;if(!e.kt)return ct;const t=e.kt.xt(e);return e.kt=null,t},Pt(){const e=this;return e.kt?e.kt.Pt(e):ct},It(e,t){const n=this;return n.kt?n.kt.It(n,e,t):ct},ut(e){return this.tt[e]},He(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=st,self.Inflate=Jt};
2
- `],{type:"text/javascript"}));e({workerScripts:{inflate:[n],deflate:[n]}})}const gu="Writer iterator completed too soon",wu="text/plain",yu="Content-Type",bu=64*1024,Oi="writable";class Rr{constructor(){this.size=0}init(){this.initialized=!0}}class Ri extends Rr{get readable(){const n=this,{chunkSize:t=bu}=n,r=new ReadableStream({start(){this.chunkOffset=0},async pull(s){const{offset:i=0,size:o,diskNumberStart:a}=r,{chunkOffset:u}=this;s.enqueue(await vr(n,i+u,Math.min(t,o-u),a)),u+t>o?s.close():this.chunkOffset+=t}});return r}}class Au extends Ri{constructor(n){super(),Object.assign(this,{blob:n,size:n.size})}async readUint8Array(n,t){const r=this,s=n+t;let o=await(n||s<r.size?r.blob.slice(n,s):r.blob).arrayBuffer();return o.byteLength>t&&(o=o.slice(n,s)),new Uint8Array(o)}}class _u extends Rr{constructor(n){super();const t=this,r=new TransformStream,s=[];n&&s.push([yu,n]),Object.defineProperty(t,Oi,{get(){return r.writable}}),t.blob=new Response(r.readable,{headers:s}).blob()}getData(){return this.blob}}class Ce extends Au{constructor(n){super(new Blob([n],{type:wu}))}}class vu extends Ri{constructor(n){super(),this.readers=n}async init(){const n=this,{readers:t}=n;n.lastDiskNumber=0,n.lastDiskOffset=0,await Promise.all(t.map(async(r,s)=>{await r.init(),s!=t.length-1&&(n.lastDiskOffset+=r.size),n.size+=r.size})),super.init()}async readUint8Array(n,t,r=0){const s=this,{readers:i}=this;let o,a=r;a==-1&&(a=i.length-1);let u=n;for(;u>=i[a].size;)u-=i[a].size,a++;const l=i[a],c=l.size;if(u+t<=c)o=await vr(l,u,t);else{const h=c-u;o=new Uint8Array(t),o.set(await vr(l,u,h)),o.set(await s.readUint8Array(n+h,t-h,r),h)}return s.lastDiskNumber=Math.max(a,s.lastDiskNumber),o}}class Us extends Rr{constructor(n,t=4294967295){super();const r=this;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});let s,i,o;const a=new WritableStream({async write(c){const{availableSize:h}=r;if(o)c.length>=h?(await u(c.slice(0,h)),await l(),r.diskOffset+=s.size,r.diskNumber++,o=null,await this.write(c.slice(h))):await u(c);else{const{value:m,done:x}=await n.next();if(x&&!m)throw new Error(gu);s=m,s.size=0,s.maxSize&&(r.maxSize=s.maxSize),r.availableSize=r.maxSize,await fn(s),i=m.writable,o=i.getWriter(),await this.write(c)}},async close(){await o.ready,await l()}});Object.defineProperty(r,Oi,{get(){return a}});async function u(c){const h=c.length;h&&(await o.ready,await o.write(c),s.size+=h,r.size+=h,r.availableSize-=h)}async function l(){i.size=s.size,await o.close()}}}async function fn(e,n){if(e.init&&!e.initialized)await e.init(n);else return Promise.resolve()}function Cu(e){return Array.isArray(e)&&(e=new vu(e)),e instanceof ReadableStream&&(e={readable:e}),e}function Eu(e){e.writable===de&&typeof e.next==dn&&(e=new Us(e)),e instanceof WritableStream&&(e={writable:e});const{writable:n}=e;return n.size===de&&(n.size=0),e instanceof Us||Object.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function vr(e,n,t,r){return e.readUint8Array(n,t,r)}const Fu="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");Fu.length==256;const Su="filename",ku="rawFilename",Tu="comment",Pu="rawComment",Bu="uncompressedSize",Mu="compressedSize",Iu="offset",qs="diskNumberStart",ji="lastModDate",$u="rawLastModDate",Vi="lastAccessDate",Ui="creationDate",qi="internalFileAttribute",Gi="externalFileAttribute",Wi="msDosCompatible",Hi="zip64",Lu=[Su,ku,Mu,Bu,ji,$u,Tu,Pu,Vi,Ui,Iu,qs,qs,qi,Gi,Wi,Hi,"directory","bitFlag","encrypted","signature","filenameUTF8","commentUTF8","compressionMethod","version","versionMadeBy","extraField","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class Zi{constructor(n){Lu.forEach(t=>this[t]=n[t])}}const Nu="File already exists",Ou="Zip file comment exceeds 64KB",Ru="File entry comment exceeds 64KB",ju="File entry name exceeds 64KB",Gs="Version exceeds 65535",Vu="The strength must equal 1, 2, or 3",Uu="Extra field type exceeds 65535",qu="Extra field data exceeds 64KB",jr="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Ws=new Uint8Array([7,0,2,0,65,69,3,0,0]);let pr=0;const Hs=[];class Gu{constructor(n,t={}){n=Eu(n);const r=n.availableSize!==de&&n.availableSize>0&&n.availableSize!==1/0&&n.maxSize!==de&&n.maxSize>0&&n.maxSize!==1/0;Object.assign(this,{writer:n,addSplitZipSignature:r,options:t,config:Pa(),files:new Map,filenames:new Set,offset:n.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new Set,bufferedWrites:0})}async add(n="",t,r={}){const s=this,{pendingAddFileCalls:i,config:o}=s;pr<o.maxWorkers?pr++:await new Promise(u=>Hs.push(u));let a;try{if(n=n.trim(),s.filenames.has(n))throw new Error(Nu);return s.filenames.add(n),a=Wu(s,n,t,r),i.add(a),await a}catch(u){throw s.filenames.delete(n),u}finally{i.delete(a);const u=Hs.shift();u?u():pr--}}async close(n=new Uint8Array,t={}){const r=this,{pendingAddFileCalls:s,writer:i}=this,{writable:o}=i;for(;s.size;)await Promise.allSettled(Array.from(s));return await ec(this,n,t),ne(r,t,"preventClose")||await o.getWriter().close(),i.getData?i.getData():o}}async function Wu(e,n,t,r){n=n.trim(),r.directory&&!n.endsWith(ur)?n+=ur:r.directory=n.endsWith(ur);const s=ne(e,r,"encodeText",Bn);let i=s(n);if(i===de&&(i=Bn(n)),K(i)>Be)throw new Error(ju);const o=r.comment||"";let a=s(o);if(a===de&&(a=Bn(o)),K(a)>Be)throw new Error(Ru);const u=ne(e,r,"version",Sa);if(u>Be)throw new Error(Gs);const l=ne(e,r,"versionMadeBy",20);if(l>Be)throw new Error(Gs);const c=ne(e,r,ji,new Date),h=ne(e,r,Vi),m=ne(e,r,Ui),x=ne(e,r,Wi,!0),b=ne(e,r,qi,0),f=ne(e,r,Gi,0),d=ne(e,r,"password"),p=ne(e,r,"rawPassword"),D=ne(e,r,"encryptionStrength",3),g=ne(e,r,"zipCrypto"),v=ne(e,r,"extendedTimestamp",!0),w=ne(e,r,"keepOrder",!0),y=ne(e,r,"level"),A=ne(e,r,"useWebWorkers"),_=ne(e,r,"bufferedWrite"),C=ne(e,r,"dataDescriptorSignature",!1),S=ne(e,r,"signal"),T=ne(e,r,"useCompressionStream");let $=ne(e,r,"dataDescriptor",!0),M=ne(e,r,Hi);if(d!==de&&D!==de&&(D<1||D>3))throw new Error(Vu);let V=new Uint8Array;const{extraField:L}=r;if(L){let je=0,Ve=0;L.forEach(nt=>je+=4+K(nt)),V=new Uint8Array(je),L.forEach((nt,pe)=>{if(pe>Be)throw new Error(Uu);if(K(nt)>Be)throw new Error(qu);De(V,new Uint16Array([pe]),Ve),De(V,new Uint16Array([K(nt)]),Ve+2),De(V,nt,Ve+4),Ve+=4+K(nt)})}let N=0,R=0,U=0;const re=M===!0;t&&(t=Cu(t),await fn(t),t.size===de?($=!0,(M||M===de)&&(M=!0,U=N=$e+1)):(U=t.size,N=tc(U)));const{diskOffset:j,diskNumber:we,maxSize:W}=e.writer,J=re||U>$e,Re=re||N>$e,me=re||e.offset+e.pendingEntriesSize-j>$e,Dt=ne(e,r,"supportZip64SplitFile",!0)&&re||we+Math.ceil(e.pendingEntriesSize/W)>Be;if(me||J||Re||Dt){if(M===!1||!w)throw new Error(jr);M=!0}M=M||!1,r=Object.assign({},r,{rawFilename:i,rawComment:a,version:u,versionMadeBy:l,lastModDate:c,lastAccessDate:h,creationDate:m,rawExtraField:V,zip64:M,zip64UncompressedSize:J,zip64CompressedSize:Re,zip64Offset:me,zip64DiskNumberStart:Dt,password:d,rawPassword:p,level:!T&&e.config.CompressionStream===de&&e.config.CompressionStreamNative===de?0:y,useWebWorkers:A,encryptionStrength:D,extendedTimestamp:v,zipCrypto:g,bufferedWrite:_,keepOrder:w,dataDescriptor:$,dataDescriptorSignature:C,signal:S,msDosCompatible:x,internalFileAttribute:b,externalFileAttribute:f,useCompressionStream:T});const lt=Xu(r),et=Ku(r),tt=K(lt.localHeaderArray,et.dataDescriptorArray);R=tt+N,e.options.usdz&&(R+=R+64),e.pendingEntriesSize+=R;let ft;try{ft=await Hu(e,n,t,{headerInfo:lt,dataDescriptorInfo:et,metadataSize:tt},r)}finally{e.pendingEntriesSize-=R}return Object.assign(ft,{name:n,comment:o,extraField:L}),new Zi(ft)}async function Hu(e,n,t,r,s){const{files:i,writer:o}=e,{keepOrder:a,dataDescriptor:u,signal:l}=s,{headerInfo:c}=r,{usdz:h}=e.options,m=Array.from(i.values()).pop();let x={},b,f,d,p,D,g,v;i.set(n,x);try{let _;a&&(_=m&&m.lock,w()),(s.bufferedWrite||e.writerLocked||e.bufferedWrites&&a||!u)&&!h?(g=new TransformStream,v=new Response(g.readable).blob(),g.writable.size=0,b=!0,e.bufferedWrites++,await fn(o)):(g=o,await y()),await fn(g);const{writable:C}=o;let{diskOffset:S}=o;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const $=new Uint8Array(4),M=Ae($);Y(M,0,li),await ot(C,$),e.offset+=4}h&&Yu(r,e.offset-S),b||(await _,await A(C));const{diskNumber:T}=o;if(D=!0,x.diskNumberStart=T,x=await Zu(t,g,x,r,e.config,s),D=!1,i.set(n,x),x.filename=n,b){await g.writable.getWriter().close();let $=await v;await _,await y(),p=!0,u||($=await Ju(x,$,C,s)),await A(C),x.diskNumberStart=o.diskNumber,S=o.diskOffset,await $.stream().pipeTo(C,{preventClose:!0,preventAbort:!0,signal:l}),C.size+=$.size,p=!1}if(x.offset=e.offset-S,x.zip64)Qu(x,s);else if(x.offset>$e)throw new Error(jr);return e.offset+=x.size,x}catch(_){if(b&&p||!b&&D){if(e.hasCorruptedEntries=!0,_)try{_.corruptedEntry=!0}catch{}b?e.offset+=g.writable.size:e.offset=g.writable.size}throw i.delete(n),_}finally{b&&e.bufferedWrites--,d&&d(),f&&f()}function w(){x.lock=new Promise(_=>d=_)}async function y(){e.writerLocked=!0;const{lockWriter:_}=e;e.lockWriter=new Promise(C=>f=()=>{e.writerLocked=!1,C()}),await _}async function A(_){K(c.localHeaderArray)>o.availableSize&&(o.availableSize=0,await ot(_,new Uint8Array))}}async function Zu(e,n,{diskNumberStart:t,lock:r},s,i,o){const{headerInfo:a,dataDescriptorInfo:u,metadataSize:l}=s,{localHeaderArray:c,headerArray:h,lastModDate:m,rawLastModDate:x,encrypted:b,compressed:f,version:d,compressionMethod:p,rawExtraFieldExtendedTimestamp:D,extraFieldExtendedTimestampFlag:g,rawExtraFieldNTFS:v,rawExtraFieldAES:w}=a,{dataDescriptorArray:y}=u,{rawFilename:A,lastAccessDate:_,creationDate:C,password:S,rawPassword:T,level:$,zip64:M,zip64UncompressedSize:V,zip64CompressedSize:L,zip64Offset:N,zip64DiskNumberStart:R,zipCrypto:U,dataDescriptor:re,directory:j,versionMadeBy:we,rawComment:W,rawExtraField:J,useWebWorkers:Re,onstart:me,onprogress:xe,onend:Dt,signal:lt,encryptionStrength:et,extendedTimestamp:tt,msDosCompatible:ft,internalFileAttribute:je,externalFileAttribute:Ve,useCompressionStream:nt}=o,pe={lock:r,versionMadeBy:we,zip64:M,directory:!!j,filenameUTF8:!0,rawFilename:A,commentUTF8:!0,rawComment:W,rawExtraFieldExtendedTimestamp:D,rawExtraFieldNTFS:v,rawExtraFieldAES:w,rawExtraField:J,extendedTimestamp:tt,msDosCompatible:ft,internalFileAttribute:je,externalFileAttribute:Ve,diskNumberStart:t};let _e=0,Tt=0,Kt;const{writable:gt}=n;if(e){e.chunkSize=Ba(i),await ot(gt,c);const Se=e.readable,xn=Se.size=e.size,Dn={options:{codecType:$i,level:$,rawPassword:T,password:S,encryptionStrength:et,zipCrypto:b&&U,passwordVerification:b&&U&&x>>8&255,signed:!0,compressed:f,encrypted:b,useWebWorkers:Re,useCompressionStream:nt,transferStreams:!1},config:i,streamOptions:{signal:lt,size:xn,onstart:me,onprogress:xe,onend:Dt}},zt=await mu({readable:Se,writable:gt},Dn);Tt=zt.inputSize,_e=zt.outputSize,Kt=zt.signature,gt.size+=Tt}else await ot(gt,c);let jt;if(M){let Se=4;V&&(Se+=8),L&&(Se+=8),N&&(Se+=8),R&&(Se+=4),jt=new Uint8Array(Se)}else jt=new Uint8Array;return zu({signature:Kt,rawExtraFieldZip64:jt,compressedSize:_e,uncompressedSize:Tt,headerInfo:a,dataDescriptorInfo:u},o),re&&await ot(gt,y),Object.assign(pe,{uncompressedSize:Tt,compressedSize:_e,lastModDate:m,rawLastModDate:x,creationDate:C,lastAccessDate:_,encrypted:b,size:l+_e,compressionMethod:p,version:d,headerArray:h,signature:Kt,rawExtraFieldZip64:jt,extraFieldExtendedTimestampFlag:g,zip64UncompressedSize:V,zip64CompressedSize:L,zip64Offset:N,zip64DiskNumberStart:R}),pe}function Xu(e){const{rawFilename:n,lastModDate:t,lastAccessDate:r,creationDate:s,rawPassword:i,password:o,level:a,zip64:u,zipCrypto:l,dataDescriptor:c,directory:h,rawExtraField:m,encryptionStrength:x,extendedTimestamp:b}=e,f=a!==0&&!h,d=!!(o&&K(o)||i&&K(i));let p=e.version,D;if(d&&!l){D=new Uint8Array(K(Ws)+2);const R=Ae(D);Q(R,0,ya),De(D,Ws,2),On(R,8,x)}else D=new Uint8Array;let g,v,w;if(b){v=new Uint8Array(9+(r?4:0)+(s?4:0));const R=Ae(v);Q(R,0,pi),Q(R,2,K(v)-4),w=1+(r?2:0)+(s?4:0),On(R,4,w);let U=5;Y(R,U,Math.floor(t.getTime()/1e3)),U+=4,r&&(Y(R,U,Math.floor(r.getTime()/1e3)),U+=4),s&&Y(R,U,Math.floor(s.getTime()/1e3));try{g=new Uint8Array(36);const re=Ae(g),j=hr(t);Q(re,0,ba),Q(re,2,32),Q(re,8,Aa),Q(re,10,24),Me(re,12,j),Me(re,20,hr(r)||j),Me(re,28,hr(s)||j)}catch{g=new Uint8Array}}else g=v=new Uint8Array;let y=Ea;c&&(y=y|Ca);let A=la;f&&(A=vs),u&&(p=p>Cs?p:Cs),d&&(y=y|va,l||(p=p>Es?p:Es,A=fa,f&&(D[9]=vs)));const _=new Uint8Array(26),C=Ae(_);Q(C,0,p),Q(C,2,y),Q(C,4,A);const S=new Uint32Array(1),T=Ae(S);let $;t<Ss?$=Ss:t>Fs?$=Fs:$=t,Q(T,0,($.getHours()<<6|$.getMinutes())<<5|$.getSeconds()/2),Q(T,2,($.getFullYear()-1980<<4|$.getMonth()+1)<<5|$.getDate());const M=S[0];Y(C,6,M),Q(C,22,K(n));const V=K(D,v,g,m);Q(C,24,V);const L=new Uint8Array(30+K(n)+V),N=Ae(L);return Y(N,0,da),De(L,_,4),De(L,n,30),De(L,D,30+K(n)),De(L,v,30+K(n,D)),De(L,g,30+K(n,D,v)),De(L,m,30+K(n,D,v,g)),{localHeaderArray:L,headerArray:_,headerView:C,lastModDate:t,rawLastModDate:M,encrypted:d,compressed:f,version:p,compressionMethod:A,extraFieldExtendedTimestampFlag:w,rawExtraFieldExtendedTimestamp:v,rawExtraFieldNTFS:g,rawExtraFieldAES:D,extraFieldLength:V}}function Yu(e,n){const{headerInfo:t}=e;let{localHeaderArray:r,extraFieldLength:s}=t,i=Ae(r),o=64-(n+K(r))%64;o<4&&(o+=64);const a=new Uint8Array(o),u=Ae(a);Q(u,0,_a),Q(u,2,o-2);const l=r;t.localHeaderArray=r=new Uint8Array(K(l)+o),De(r,l),De(r,a,K(l)),i=Ae(r),Q(i,28,s+o),e.metadataSize+=o}function Ku(e){const{zip64:n,dataDescriptor:t,dataDescriptorSignature:r}=e;let s=new Uint8Array,i,o=0;return t&&(s=new Uint8Array(n?r?24:20:r?16:12),i=Ae(s),r&&(o=4,Y(i,0,pa))),{dataDescriptorArray:s,dataDescriptorView:i,dataDescriptorOffset:o}}function zu(e,n){const{signature:t,rawExtraFieldZip64:r,compressedSize:s,uncompressedSize:i,headerInfo:o,dataDescriptorInfo:a}=e,{headerView:u,encrypted:l}=o,{dataDescriptorView:c,dataDescriptorOffset:h}=a,{zip64:m,zip64UncompressedSize:x,zip64CompressedSize:b,zipCrypto:f,dataDescriptor:d}=n;if((!l||f)&&t!==de&&(Y(u,10,t),d&&Y(c,h,t)),m){const p=Ae(r);Q(p,0,wa),Q(p,2,K(r)-4);let D=4;x&&(Y(u,18,$e),Me(p,D,BigInt(i)),D+=8),b&&(Y(u,14,$e),Me(p,D,BigInt(s))),d&&(Me(c,h+4,BigInt(s)),Me(c,h+12,BigInt(i)))}else Y(u,14,s),Y(u,18,i),d&&(Y(c,h+4,s),Y(c,h+8,i))}async function Ju(e,n,t,{zipCrypto:r}){let s;s=await n.slice(0,26).arrayBuffer(),s.byteLength!=26&&(s=s.slice(0,26));const i=new DataView(s);return(!e.encrypted||r)&&Y(i,14,e.signature),e.zip64?(Y(i,18,$e),Y(i,22,$e)):(Y(i,18,e.compressedSize),Y(i,22,e.uncompressedSize)),await ot(t,new Uint8Array(s)),n.slice(s.byteLength)}function Qu(e,n){const{rawExtraFieldZip64:t,offset:r,diskNumberStart:s}=e,{zip64UncompressedSize:i,zip64CompressedSize:o,zip64Offset:a,zip64DiskNumberStart:u}=n,l=Ae(t);let c=4;i&&(c+=8),o&&(c+=8),a&&(Me(l,c,BigInt(r)),c+=8),u&&Y(l,c,s)}async function ec(e,n,t){const{files:r,writer:s}=e,{diskOffset:i,writable:o}=s;let{diskNumber:a}=s,u=0,l=0,c=e.offset-i,h=r.size;for(const[,w]of r){const{rawFilename:y,rawExtraFieldZip64:A,rawExtraFieldAES:_,rawComment:C,rawExtraFieldNTFS:S,rawExtraField:T,extendedTimestamp:$,extraFieldExtendedTimestampFlag:M,lastModDate:V}=w;let L;if($){L=new Uint8Array(9);const N=Ae(L);Q(N,0,pi),Q(N,2,5),On(N,4,M),Y(N,5,Math.floor(V.getTime()/1e3))}else L=new Uint8Array;w.rawExtraFieldCDExtendedTimestamp=L,l+=46+K(y,C,A,_,S,L,T)}const m=new Uint8Array(l),x=Ae(m);await fn(s);let b=0;for(const[w,y]of Array.from(r.values()).entries()){const{offset:A,rawFilename:_,rawExtraFieldZip64:C,rawExtraFieldAES:S,rawExtraFieldCDExtendedTimestamp:T,rawExtraFieldNTFS:$,rawExtraField:M,rawComment:V,versionMadeBy:L,headerArray:N,directory:R,zip64:U,zip64UncompressedSize:re,zip64CompressedSize:j,zip64DiskNumberStart:we,zip64Offset:W,msDosCompatible:J,internalFileAttribute:Re,externalFileAttribute:me,diskNumberStart:xe,uncompressedSize:Dt,compressedSize:lt}=y,et=K(C,S,T,$,M);Y(x,u,ha),Q(x,u+4,L);const tt=Ae(N);re||Y(tt,18,Dt),j||Y(tt,14,lt),De(m,N,u+6),Q(x,u+30,et),Q(x,u+32,K(V)),Q(x,u+34,U&&we?Be:xe),Q(x,u+36,Re),me?Y(x,u+38,me):R&&J&&On(x,u+38,Fa),Y(x,u+42,U&&W?$e:A),De(m,_,u+46),De(m,C,u+46+K(_)),De(m,S,u+46+K(_,C)),De(m,T,u+46+K(_,C,S)),De(m,$,u+46+K(_,C,S,T)),De(m,M,u+46+K(_,C,S,T,$)),De(m,V,u+46+K(_)+et);const ft=46+K(_,V)+et;if(u-b>s.availableSize&&(s.availableSize=0,await ot(o,m.slice(b,u)),b=u),u+=ft,t.onprogress)try{await t.onprogress(w+1,r.size,new Zi(y))}catch{}}await ot(o,b?m.slice(b):m);let f=s.diskNumber;const{availableSize:d}=s;d<br&&f++;let p=ne(e,t,"zip64");if(c>$e||l>$e||h>Be||f>Be){if(p===!1)throw new Error(jr);p=!0}const D=new Uint8Array(p?ga:br),g=Ae(D);u=0,p&&(Y(g,0,xa),Me(g,4,BigInt(44)),Q(g,12,45),Q(g,14,45),Y(g,16,f),Y(g,20,a),Me(g,24,BigInt(h)),Me(g,32,BigInt(h)),Me(g,40,BigInt(l)),Me(g,48,BigInt(c)),Y(g,56,Da),Me(g,64,BigInt(c)+BigInt(l)),Y(g,72,f+1),ne(e,t,"supportZip64SplitFile",!0)&&(f=Be,a=Be),h=Be,c=$e,l=$e,u+=di+fi),Y(g,u,ma),Q(g,u+4,f),Q(g,u+6,a),Q(g,u+8,h),Q(g,u+10,h),Y(g,u+12,l),Y(g,u+16,c);const v=K(n);if(v)if(v<=Be)Q(g,u+20,v);else throw new Error(Ou);await ot(o,D),v&&await ot(o,n)}async function ot(e,n){const t=e.getWriter();try{await t.ready,e.size+=K(n),await t.write(n)}finally{t.releaseLock()}}function hr(e){if(e)return(BigInt(e.getTime())+BigInt(116444736e5))*BigInt(1e4)}function ne(e,n,t,r){const s=n[t]===de?e.options[t]:n[t];return s===de?r:s}function tc(e){return e+5*(Math.floor(e/16383)+1)}function On(e,n,t){e.setUint8(n,t)}function Q(e,n,t){e.setUint16(n,t,!0)}function Y(e,n,t){e.setUint32(n,t,!0)}function Me(e,n,t){e.setBigUint64(n,t,!0)}function De(e,n,t){e.set(n,t)}function Ae(e){return new DataView(e.buffer)}function K(...e){let n=0;return e.forEach(t=>t&&(n+=t.length)),n}let Xi;try{Xi=import.meta.url}catch{}Lr({baseURL:Xi});Du(Lr);Lr({Deflate:Uo,Inflate:ca});var nc=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,rc=/[\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]/,sc=/[\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]/,mr={Space_Separator:nc,ID_Start:rc,ID_Continue:sc},he={isSpaceSeparator(e){return typeof e=="string"&&mr.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||mr.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="‌"||e==="‍"||mr.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}};let Cr,Fe,pt,Rn,St,Qe,ge,Vr,on;var ic=function(n,t){Cr=String(n),Fe="start",pt=[],Rn=0,St=1,Qe=0,ge=void 0,Vr=void 0,on=void 0;do ge=oc(),cc[Fe]();while(ge.type!=="eof");return typeof t=="function"?Er({"":on},"",t):on};function Er(e,n,t){const r=e[n];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let s=0;s<r.length;s++){const i=String(s),o=Er(r,i,t);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=Er(r,s,t);i===void 0?delete r[s]:Object.defineProperty(r,s,{value:i,writable:!0,enumerable:!0,configurable:!0})}return t.call(e,n,r)}let H,G,sn,dt,X;function oc(){for(H="default",G="",sn=!1,dt=1;;){X=xt();const e=Yi[H]();if(e)return e}}function xt(){if(Cr[Rn])return String.fromCodePoint(Cr.codePointAt(Rn))}function F(){const e=xt();return e===`
3
- `?(St++,Qe=0):e?Qe+=e.length:Qe++,e&&(Rn+=e.length),e}const Yi={default(){switch(X){case" ":case"\v":case"\f":case" ":case" ":case"\uFEFF":case`
4
- `:case"\r":case"\u2028":case"\u2029":F();return;case"/":F(),H="comment";return;case void 0:return F(),se("eof")}if(he.isSpaceSeparator(X)){F();return}return Yi[Fe]()},comment(){switch(X){case"*":F(),H="multiLineComment";return;case"/":F(),H="singleLineComment";return}throw ie(F())},multiLineComment(){switch(X){case"*":F(),H="multiLineCommentAsterisk";return;case void 0:throw ie(F())}F()},multiLineCommentAsterisk(){switch(X){case"*":F();return;case"/":F(),H="default";return;case void 0:throw ie(F())}F(),H="multiLineComment"},singleLineComment(){switch(X){case`
5
- `:case"\r":case"\u2028":case"\u2029":F(),H="default";return;case void 0:return F(),se("eof")}F()},value(){switch(X){case"{":case"[":return se("punctuator",F());case"n":return F(),Bt("ull"),se("null",null);case"t":return F(),Bt("rue"),se("boolean",!0);case"f":return F(),Bt("alse"),se("boolean",!1);case"-":case"+":F()==="-"&&(dt=-1),H="sign";return;case".":G=F(),H="decimalPointLeading";return;case"0":G=F(),H="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":G=F(),H="decimalInteger";return;case"I":return F(),Bt("nfinity"),se("numeric",1/0);case"N":return F(),Bt("aN"),se("numeric",NaN);case'"':case"'":sn=F()==='"',G="",H="string";return}throw ie(F())},identifierNameStartEscape(){if(X!=="u")throw ie(F());F();const e=Fr();switch(e){case"$":case"_":break;default:if(!he.isIdStartChar(e))throw Zs();break}G+=e,H="identifierName"},identifierName(){switch(X){case"$":case"_":case"‌":case"‍":G+=F();return;case"\\":F(),H="identifierNameEscape";return}if(he.isIdContinueChar(X)){G+=F();return}return se("identifier",G)},identifierNameEscape(){if(X!=="u")throw ie(F());F();const e=Fr();switch(e){case"$":case"_":case"‌":case"‍":break;default:if(!he.isIdContinueChar(e))throw Zs();break}G+=e,H="identifierName"},sign(){switch(X){case".":G=F(),H="decimalPointLeading";return;case"0":G=F(),H="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":G=F(),H="decimalInteger";return;case"I":return F(),Bt("nfinity"),se("numeric",dt*(1/0));case"N":return F(),Bt("aN"),se("numeric",NaN)}throw ie(F())},zero(){switch(X){case".":G+=F(),H="decimalPoint";return;case"e":case"E":G+=F(),H="decimalExponent";return;case"x":case"X":G+=F(),H="hexadecimal";return}return se("numeric",dt*0)},decimalInteger(){switch(X){case".":G+=F(),H="decimalPoint";return;case"e":case"E":G+=F(),H="decimalExponent";return}if(he.isDigit(X)){G+=F();return}return se("numeric",dt*Number(G))},decimalPointLeading(){if(he.isDigit(X)){G+=F(),H="decimalFraction";return}throw ie(F())},decimalPoint(){switch(X){case"e":case"E":G+=F(),H="decimalExponent";return}if(he.isDigit(X)){G+=F(),H="decimalFraction";return}return se("numeric",dt*Number(G))},decimalFraction(){switch(X){case"e":case"E":G+=F(),H="decimalExponent";return}if(he.isDigit(X)){G+=F();return}return se("numeric",dt*Number(G))},decimalExponent(){switch(X){case"+":case"-":G+=F(),H="decimalExponentSign";return}if(he.isDigit(X)){G+=F(),H="decimalExponentInteger";return}throw ie(F())},decimalExponentSign(){if(he.isDigit(X)){G+=F(),H="decimalExponentInteger";return}throw ie(F())},decimalExponentInteger(){if(he.isDigit(X)){G+=F();return}return se("numeric",dt*Number(G))},hexadecimal(){if(he.isHexDigit(X)){G+=F(),H="hexadecimalInteger";return}throw ie(F())},hexadecimalInteger(){if(he.isHexDigit(X)){G+=F();return}return se("numeric",dt*Number(G))},string(){switch(X){case"\\":F(),G+=ac();return;case'"':if(sn)return F(),se("string",G);G+=F();return;case"'":if(!sn)return F(),se("string",G);G+=F();return;case`
6
- `:case"\r":throw ie(F());case"\u2028":case"\u2029":lc(X);break;case void 0:throw ie(F())}G+=F()},start(){switch(X){case"{":case"[":return se("punctuator",F())}H="value"},beforePropertyName(){switch(X){case"$":case"_":G=F(),H="identifierName";return;case"\\":F(),H="identifierNameStartEscape";return;case"}":return se("punctuator",F());case'"':case"'":sn=F()==='"',H="string";return}if(he.isIdStartChar(X)){G+=F(),H="identifierName";return}throw ie(F())},afterPropertyName(){if(X===":")return se("punctuator",F());throw ie(F())},beforePropertyValue(){H="value"},afterPropertyValue(){switch(X){case",":case"}":return se("punctuator",F())}throw ie(F())},beforeArrayValue(){if(X==="]")return se("punctuator",F());H="value"},afterArrayValue(){switch(X){case",":case"]":return se("punctuator",F())}throw ie(F())},end(){throw ie(F())}};function se(e,n){return{type:e,value:n,line:St,column:Qe}}function Bt(e){for(const n of e){if(xt()!==n)throw ie(F());F()}}function ac(){switch(xt()){case"b":return F(),"\b";case"f":return F(),"\f";case"n":return F(),`
7
- `;case"r":return F(),"\r";case"t":return F()," ";case"v":return F(),"\v";case"0":if(F(),he.isDigit(xt()))throw ie(F());return"\0";case"x":return F(),uc();case"u":return F(),Fr();case`
8
- `:case"\u2028":case"\u2029":return F(),"";case"\r":return F(),xt()===`
9
- `&&F(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw ie(F());case void 0:throw ie(F())}return F()}function uc(){let e="",n=xt();if(!he.isHexDigit(n)||(e+=F(),n=xt(),!he.isHexDigit(n)))throw ie(F());return e+=F(),String.fromCodePoint(parseInt(e,16))}function Fr(){let e="",n=4;for(;n-- >0;){const t=xt();if(!he.isHexDigit(t))throw ie(F());e+=F()}return String.fromCodePoint(parseInt(e,16))}const cc={start(){if(ge.type==="eof")throw Mt();xr()},beforePropertyName(){switch(ge.type){case"identifier":case"string":Vr=ge.value,Fe="afterPropertyName";return;case"punctuator":Sn();return;case"eof":throw Mt()}},afterPropertyName(){if(ge.type==="eof")throw Mt();Fe="beforePropertyValue"},beforePropertyValue(){if(ge.type==="eof")throw Mt();xr()},beforeArrayValue(){if(ge.type==="eof")throw Mt();if(ge.type==="punctuator"&&ge.value==="]"){Sn();return}xr()},afterPropertyValue(){if(ge.type==="eof")throw Mt();switch(ge.value){case",":Fe="beforePropertyName";return;case"}":Sn()}},afterArrayValue(){if(ge.type==="eof")throw Mt();switch(ge.value){case",":Fe="beforeArrayValue";return;case"]":Sn()}},end(){}};function xr(){let e;switch(ge.type){case"punctuator":switch(ge.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=ge.value;break}if(on===void 0)on=e;else{const n=pt[pt.length-1];Array.isArray(n)?n.push(e):Object.defineProperty(n,Vr,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(e!==null&&typeof e=="object")pt.push(e),Array.isArray(e)?Fe="beforeArrayValue":Fe="beforePropertyName";else{const n=pt[pt.length-1];n==null?Fe="end":Array.isArray(n)?Fe="afterArrayValue":Fe="afterPropertyValue"}}function Sn(){pt.pop();const e=pt[pt.length-1];e==null?Fe="end":Array.isArray(e)?Fe="afterArrayValue":Fe="afterPropertyValue"}function ie(e){return jn(e===void 0?`JSON5: invalid end of input at ${St}:${Qe}`:`JSON5: invalid character '${Ki(e)}' at ${St}:${Qe}`)}function Mt(){return jn(`JSON5: invalid end of input at ${St}:${Qe}`)}function Zs(){return Qe-=5,jn(`JSON5: invalid identifier character at ${St}:${Qe}`)}function lc(e){console.warn(`JSON5: '${Ki(e)}' in strings is not valid ECMAScript; consider escaping`)}function Ki(e){const n={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(n[e])return n[e];if(e<" "){const t=e.charCodeAt(0).toString(16);return"\\x"+("00"+t).substring(t.length)}return e}function jn(e){const n=new SyntaxError(e);return n.lineNumber=St,n.columnNumber=Qe,n}var fc=function(n,t,r){const s=[];let i="",o,a,u="",l;if(t!=null&&typeof t=="object"&&!Array.isArray(t)&&(r=t.space,l=t.quote,t=t.replacer),typeof t=="function")a=t;else if(Array.isArray(t)){o=[];for(const f of t){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("",{"":n});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 h(p);if(typeof p=="number")return String(p);if(typeof p=="object")return Array.isArray(p)?b(p):m(p)}function h(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 v=0;v<f.length;v++){const w=f[v];switch(w){case"'":case'"':d[w]++,D+=w;continue;case"\0":if(he.isDigit(f[v+1])){D+="\\x00";continue}}if(p[w]){D+=p[w];continue}if(w<" "){let y=w.charCodeAt(0).toString(16);D+="\\x"+("00"+y).substring(y.length);continue}D+=w}const g=l||Object.keys(d).reduce((v,w)=>d[v]<d[w]?v:w);return D=D.replace(new RegExp(g,"g"),p[g]),g+D+g}function m(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 v of p){const w=c(v,f);if(w!==void 0){let y=x(v)+":";u!==""&&(y+=" "),y+=w,D.push(y)}}let g;if(D.length===0)g="{}";else{let v;if(u==="")v=D.join(","),g="{"+v+"}";else{let w=`,
10
- `+i;v=D.join(w),g=`{
11
- `+i+v+`,
12
- `+d+"}"}}return s.pop(),i=d,g}function x(f){if(f.length===0)return h(f);const d=String.fromCodePoint(f.codePointAt(0));if(!he.isIdStartChar(d))return h(f);for(let p=d.length;p<f.length;p++)if(!he.isIdContinueChar(String.fromCodePoint(f.codePointAt(p))))return h(f);return f}function b(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 v=c(String(g),f);p.push(v!==void 0?v:"null")}let D;if(p.length===0)D="[]";else if(u==="")D="["+p.join(",")+"]";else{let g=`,
13
- `+i,v=p.join(g);D=`[
14
- `+i+v+`,
15
- `+d+"]"}return s.pop(),i=d,D}};const dc={parse:ic,stringify:fc};var pc=dc,Ur=10**-4;function R0(e){return e*(Math.PI/180)}function Ie(e){return e/(Math.PI/180)}function te(e){let n=e;return Math.abs(n)<Ur&&(n=0),n}function kt(e){let n=e%(2*Math.PI);return n<0&&(n+=2*Math.PI),n}function ce(e){let n=kt(e);return n>Math.PI&&(n-=2*Math.PI),n}function it(e){let n=e%Math.PI;return n<0&&(n+=Math.PI),n}function Ne(e){let n=it(e);return n>Math.PI/2&&(n-=Math.PI),n}function Sr(e,n,t){const r=ce(n)-ce(e);return t?kt(r):kt(r)-2*Math.PI}function zi(e,n,t,r){let s=!1;if(te(ce(e-n))===0)s=!0;else if(te(ce(e-t))===0)s=!0;else{const i=Sr(n,t,r),o=Sr(n,e,r);Math.abs(o)<Math.abs(i)&&(s=!0)}return s}function at(e){return e.toFixed(2)}var fe={point:"grey",line:"grey",vector:"DarkTurquoise",contour:"green",mainOuter:"SlateBlue",mainInner:"SteelBlue",mainB:"SlateGrey",second:"Violet",secondB:"SlateGrey",dynamics:"Tomato",ruler:"blue",origin:"red",reference:"blue",mouse:"yellow"};function Nt(e,n,t){const r=t.shiftX+(e-t.xMin)*t.scaleX,s=t.shiftY+(n-t.yMin)*t.scaleY;return[r,s]}function j0(e,n,t){const r=(e-t.shiftX)/t.scaleX+t.xMin,s=(n-t.shiftY)/t.scaleY+t.yMin;return[r,s]}function Ji(e,n){if(te(n.scaleX-Math.abs(n.scaleY))!==0)throw`err683: iAdjust.scaleX and scaleY differ ${n.scaleX} ${n.scaleY}`;if(n.scaleX<0)throw`err684: iAdjust.scaleX ${n.scaleX} is negative`;const t=e*n.scaleX;if(t<0)throw`err685: rRadius for canvas ${t} is negative`;return t}function kr(){return{init:0,xMin:0,yMin:0,xyDiff:1,shiftX:0,shiftY:0,scaleX:1,scaleY:1}}function Tr(e,n,t,r,s,i){const o=kr(),a=Math.max(n-e,1),u=Math.max(r-t,1),l=s/a,c=i/u;let h=.9*l,m=a;return c<l&&(h=.9*c,m=u),o.init=1,o.xMin=e,o.yMin=t,o.xyDiff=m,o.shiftX=.05*s,o.scaleX=h,o.shiftY=i-.05*i,o.scaleY=-1*h,o}function V0(e,n,t){const r=structuredClone(t);return r.xMin=e-r.xyDiff/2,r.yMin=n-r.xyDiff/2,r}function U0(e,n,t,r,s,i){const o=Math.min(e,t),a=Math.max(e,t),u=Math.min(n,r),l=Math.max(n,r);return Tr(o,a,u,l,s,i)}function q0(e,n){const t=structuredClone(n),r=(1-e)/2;return t.xMin+=r*n.xyDiff,t.yMin+=r*n.xyDiff,t.xyDiff*=e,t.scaleX*=1/e,t.scaleY*=1/e,t}function G0(e,n,t,r,s){const i=structuredClone(s),o=t-e,a=r-n;return i.xMin+=-o,i.yMin+=-a,i}function Zn(e,n){let t=0;if(n>e)throw`err539: ila < ilc ${e} ${n}`;return t=Math.sqrt(e**2-n**2),t}function W0(e,n,t){return Math.sqrt(e**2+n**2-2*e*n*Math.cos(t))}function Xs(e,n,t){let r=0;const s=[e,n,t];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 ${e}, ${n} and ${t}`;return r=Math.acos((e**2+n**2-t**2)/(2*e*n)),r}function Ys(e,n,t){let r=0;const s=[e,n,t];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(n),o=it(t);if(i+o>Math.PI)throw`err939: impossible triangle with angles ${n} and ${t}`;return r=e*Math.sin(t)/Math.sin(n),r}function H0(e,n,t){let r=0;const s=[e,n,t];for(let i=0;i<s.length;i++)if(s[i]<=0)throw`err429: negative or zero triangle-args ${i} : ${s[i]}`;return r=Math.asin(n*Math.sin(t)/e),r}var hc=(e=>(e[e.eDefault=0]="eDefault",e[e.eCircle=1]="eCircle",e[e.eCross=2]="eCross",e[e.eSquare=3]="eSquare",e[e.eBigSquare=4]="eBigSquare",e[e.eTwoTri=5]="eTwoTri",e[e.eTri1=6]="eTri1",e[e.eTri2=7]="eTri2",e[e.eTri3=8]="eTri3",e[e.eTri4=9]="eTri4",e))(hc||{}),Ge=class Gt{constructor(n,t,r=0){I(this,"cx");I(this,"cy");I(this,"shape");this.cx=n,this.cy=t,this.shape=r}draw(n,t,r=fe.point,s=0){if(isFinite(this.cx)&&isFinite(this.cy)){const i=n.canvas.width*.006999999999999999,o=2*i,[a,u]=Nt(this.cx,this.cy,t);let l=s;switch(l===0&&(l=this.shape),n.beginPath(),l){case 2:n.moveTo(a-o,u),n.lineTo(a+o,u),n.moveTo(a,u-o),n.lineTo(a,u+o);break;case 3:n.rect(a-i,u-i,2*i,2*i);break;case 4:n.rect(a-2*i,u-2*i,4*i,4*i);break;case 5:n.moveTo(a-o,u),n.lineTo(a+o,u),n.lineTo(a,u+o),n.lineTo(a,u-o),n.lineTo(a-o,u);break;case 6:n.moveTo(a-o,u),n.lineTo(a+o,u),n.lineTo(a,u-o),n.lineTo(a,u+o);break;case 7:n.moveTo(a+o,u),n.lineTo(a-o,u),n.lineTo(a,u-o),n.lineTo(a,u+o);break;case 8:n.moveTo(a+o,u),n.lineTo(a-o,u),n.lineTo(a,u+o),n.lineTo(a,u-o);break;case 9:n.moveTo(a-o,u),n.lineTo(a+o,u),n.lineTo(a,u+o),n.lineTo(a,u-o);break;case 1:default:n.arc(a,u,i,0,2*Math.PI)}n.strokeStyle=r,n.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(n,t){return new Gt(t*Math.cos(n),t*Math.sin(n))}translate(n,t){return new Gt(this.cx+n,this.cy+t)}translatePolar(n,t){return new Gt(this.cx+t*Math.cos(n),this.cy+t*Math.sin(n))}clone(n=0){return new Gt(this.cx,this.cy,n)}rotateOrig(n){const t=this.getPolar();return this.setPolar(t[0]+n,t[1])}scaleOrig(n){const t=this.getPolar();return this.setPolar(t[0],t[1]*n)}rotate(n,t){const s=this.translate(-1*n.cx,-1*n.cy).getPolar();return this.setPolar(s[0]+t,s[1]).translate(n.cx,n.cy)}scale(n,t){const s=this.translate(-1*n.cx,-1*n.cy).getPolar();return this.setPolar(s[0],s[1]*t).translate(n.cx,n.cy)}isEqual(n){return te(this.cx-n.cx)===0&&te(this.cy-n.cy)===0}distanceToPoint(n){return Math.sqrt((n.cx-this.cx)**2+(n.cy-this.cy)**2)}angleToPoint(n){if(te(this.distanceToPoint(n))===0)throw`err434: no angle because points identical ${this.cx} ${n.cx} ${this.cy} ${n.cy}`;return Math.atan2(n.cy-this.cy,n.cx-this.cx)}angleFromToPoints(n,t){const r=this.angleToPoint(n),s=this.angleToPoint(t);return ce(s-r)}middlePoint(n){const t=(this.cx+n.cx)/2,r=(this.cy+n.cy)/2;return new Gt(t,r)}equidistantPoint(n,t,r){const s=this.distanceToPoint(n)/2;if(this.isEqual(n))throw`err633: no equidistance because identical point ${this.cx} ${this.cy}`;if(t<s)throw`err392: equidistance ${t} smaller than lp1p2h ${s}`;const i=this.middlePoint(n),o=this.angleToPoint(n)+Math.PI/2,a=Math.sqrt(t**2-s**2),u=i.translatePolar(o,a),l=i.translatePolar(o+Math.PI,a),c=r.distanceToPoint(u),h=r.distanceToPoint(l);if(a!==0&&c===h)throw`err284: magnet point p3 is on line p1p2. cx ${r.cx} cy: ${r.cy}`;let m=u;return h<c&&(m=l),m}};function Z(e,n,t=0){return new Ge(e,n,t)}function Qi(e){let n=0,t=0,r=0,s=0;if(e.length>0){const i=e[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}`;n=e[0].cx,t=e[0].cx,r=e[0].cy,s=e[0].cy;for(const o of e)o.cx!==Number.NEGATIVE_INFINITY&&(n=Math.min(n,o.cx)),o.cx!==Number.POSITIVE_INFINITY&&(t=Math.max(t,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[n,t,r,s]}var mc=class Te{constructor(n,t,r){I(this,"cx");I(this,"cy");I(this,"ca");this.cx=n,this.cy=t,this.ca=r}draw(n,t,r=fe.line){const s=n.canvas.width*2,[i,o]=Nt(this.cx-s*Math.cos(this.ca),this.cy-s*Math.sin(this.ca),t),[a,u]=Nt(this.cx+2*s*Math.cos(this.ca),this.cy+2*s*Math.sin(this.ca),t);n.beginPath(),n.moveTo(i,o),n.lineTo(a,u),n.strokeStyle=r,n.stroke()}setFromPoints(n,t){return this.cx=n.cx,this.cy=n.cy,this.ca=n.angleToPoint(t),this}getAffine(){const n={quasiVertical:!1,ha:0,hb:0,va:0,vb:0};return Math.abs(Ne(this.ca))>Math.PI/4?(n.quasiVertical=!0,n.va=-1*Math.tan(Ne(this.ca-Math.PI/2)),n.vb=this.cx-n.va*this.cy):(n.ha=Math.tan(Ne(this.ca)),n.hb=this.cy-n.ha*this.cx),n}setAffine(n){const t=new Te(0,0,0);return n.quasiVertical?(t.ca=Math.PI/2-Math.atan(n.va),t.cx=n.vb,t.cy=0):(t.ca=Math.atan(n.ha),t.cx=0,t.cy=n.hb),t}intersection(n){if(this.isParallel(n))throw`err902: no intersection, lines are parallel ca1: ${this.ca} ca2: ${n.ca}`;let t=0,r=0;const s=this.getAffine(),i=n.getAffine();return s.quasiVertical?i.quasiVertical?(r=(s.vb-i.vb)/(i.va-s.va),t=s.va*r+s.vb):(t=(s.va*i.hb+s.vb)/(1-s.va*i.ha),r=i.ha*t+i.hb):i.quasiVertical?(r=(s.ha*i.vb+s.hb)/(1-s.ha*i.va),t=i.va*r+i.vb):(t=(s.hb-i.hb)/(i.ha-s.ha),r=s.ha*t+s.hb),Z(t,r)}getAxisXIntersection(){const n=new Te(0,0,0);return this.intersection(n).cx}getAxisYIntersection(){const n=new Te(0,0,Math.PI/2);return this.intersection(n).cy}getAxisXIntersecTri(){let n=1/0;if(te(Ne(this.ca))!==0){const t=new Ge(this.cx,this.cy),r=it(this.ca),s=t.angleOrig(),i=t.distanceOrig();if(te(i)===0)n=0;else if(te(Ne(r-s))===0)n=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));n=Math.sign(a)*Ys(i,o,u)}}return n}getAxisYIntersecTri(){let n=1/0;if(te(Ne(this.ca-Math.PI/2))!==0){const t=new Ge(this.cx,this.cy),r=Ne(this.ca),s=t.angleOrig(),i=t.distanceOrig(),o=Ne(r-s);if(te(i)===0)n=0;else if(te(o)===0)n=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));n=Math.sign(u)*Ys(i,l,c)}}return n}angleOrig(){const t=new Ge(this.cx,this.cy).angleOrig(),r=Ne(this.ca),s=-1*ce(r-t);let i=0;return s<0&&(i=-Math.PI),it(Math.PI/2+this.ca)+i}distanceOrig(){const n=this.angleOrig(),t=new Ge(this.cx,this.cy),r=t.angleOrig(),s=t.distanceOrig(),i=Ne(r-n);return s*Math.cos(i)}projectOrig(){const n=this.angleOrig(),t=this.distanceOrig();return Z(0,0).setPolar(n,t)}translate(n,t){return new Te(this.cx+n,this.cy+t,this.ca)}rotateOrig(n){const t=new Ge(this.cx,this.cy).rotateOrig(n);return new Te(t.cx,t.cy,ce(this.ca+n))}scaleOrig(n){const t=new Ge(this.cx,this.cy).scaleOrig(n);return new Te(t.cx,t.cy,this.ca)}rotate(n,t){const r=new Ge(this.cx,this.cy).rotate(n,t);return new Te(r.cx,r.cy,ce(this.ca+t))}scale(n,t){const r=new Ge(this.cx,this.cy).scale(n,t);return new Te(r.cx,r.cy,this.ca)}clone(){const n=new Ge(this.cx,this.cy);return new Te(n.cx,n.cy,this.ca)}lineOrthogonal(n){return new Te(n.cx,n.cy,this.ca+Math.PI/2)}lineParallel(n){return new Te(n.cx,n.cy,this.ca)}distanceToPoint(n){let t=0;const r=new Ge(this.cx,this.cy),s=r.distanceToPoint(n);if(te(s)!==0){const i=r.angleToPoint(n),o=Ne(i-this.ca);t=s*Math.abs(Math.sin(o))}return t}projectPoint(n){let t=0;const r=new Ge(this.cx,this.cy),s=r.distanceToPoint(n);if(te(s)!==0){const o=r.angleToPoint(n),a=ce(o-this.ca);t=s*Math.cos(a)}return r.translatePolar(this.ca,t)}isParallel(n){return te(Ne(this.ca-n.ca))===0}isOrthogonal(n){return te(Ne(Math.PI/2+this.ca-n.ca))===0}isEqual(n){const t=Z(n.cx,n.cy),r=this.distanceToPoint(t);return te(r)===0&&this.isParallel(n)}bisector(n,t){const r=this.intersection(n),s=it(this.ca),i=it(n.ca),o=Math.min(s,i),a=Math.max(s,i),u=[o,a,o+Math.PI,a+Math.PI,o],l=r.angleToPoint(t);let c=0;for(let x=0;x<4;x++){const b=ce(u[x]-l),f=ce(u[x+1]-l);if(b===0||f===0)throw`err419: bad reference point for bisecor ${t.cx} ${t.cy}`;b<0&&f>0&&(c=x)}const m=it((o+a)/2)+c*Math.PI/2;return new Te(r.cx,r.cy,m)}lineParallelDistance(n,t,r){const s=Z(this.cx,this.cy),i=s.translatePolar(this.ca+Math.PI/2,n),o=s.translatePolar(this.ca-Math.PI/2,n);let a=o,u=t;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 Xn(e,n,t){return new mc(e,n,t)}function hn(e,n){return Xn(0,0,0).setFromPoints(e,n)}function Pr(e,n){if(e.isEqual(n))throw`err546: no bisector with two same points cx: ${e.cx} cy: ${e.cy}`;const t=e.middlePoint(n),r=it(e.angleToPoint(n)+Math.PI/2);return Xn(t.cx,t.cy,r)}function xc(e,n,t){if(e.isEqual(n)||n.isEqual(t)||e.isEqual(t))throw`err833: no bisector with two same points cx: ${e.cx} cy: ${e.cy}`;const r=Pr(e,n),s=Pr(n,t);return r.intersection(s)}function Ye(e){let n=!1;return(e===0||e===1)&&(n=!0),n}function rn(e){let n=!1;return(Ye(e)||e===6)&&(n=!0),n}function In(e){let n=!1;return(e===3||e===4||e===5)&&(n=!0),n}function Dr(e){let n=!1;return(e===2||In(e))&&(n=!0),n}var Je=class eo{constructor(n,t,r,s,i=!1,o=!1){I(this,"sType");I(this,"px");I(this,"py");I(this,"radius");I(this,"arcLarge");I(this,"arcCcw");this.sType=n,this.px=t,this.py=r,this.radius=s,this.arcLarge=i,this.arcCcw=o}clone(){return new eo(this.sType,this.px,this.py,this.radius,this.arcLarge,this.arcCcw)}},He=class{constructor(e,n,t,r,s,i,o,a=!1){I(this,"sType");I(this,"p1");I(this,"p2");I(this,"pc");I(this,"radius");I(this,"a1");I(this,"a2");I(this,"arcCcw");this.sType=e,this.p1=n,this.p2=t,this.pc=r,this.radius=s,this.a1=i,this.a2=o,this.arcCcw=a}},Dc=class{constructor(){I(this,"debugPoints");I(this,"debugLines");I(this,"logMessage");this.debugPoints=[],this.debugLines=[],this.logMessage=""}addPoint(e){this.debugPoints.push(e)}getPoints(){return this.debugPoints}clearPoints(){this.debugPoints=[]}addLine(e){this.debugLines.push(e)}getLines(){return this.debugLines}clearLines(){this.debugLines=[]}addMsg(e){this.logMessage+=e}getMsg(){return this.logMessage}clearMsg(){this.logMessage=""}},Ct=new Dc;function Et(e,n,t){if(t.sType!==1)throw`err202: arcSeg1To2 has unexpected type ${t.sType}`;const r=Z(e,n),s=Z(t.px,t.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(t.radius-i)===0)o=0;else{if(t.radius<i)throw`err399: radius ${t.radius} smaller than lp1p2h ${i}`;o=Zn(t.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 h=l;(!t.arcLarge&&!t.arcCcw||t.arcLarge&&t.arcCcw)&&(h=c);const m=h.angleToPoint(r),x=h.angleToPoint(s);return new He(1,r,s,h,t.radius,m,x,t.arcCcw)}function gc(e){let n=kt(e.a2-e.a1);e.arcCcw||(n=2*Math.PI-n);let t=!1;return n>Math.PI&&(t=!0),new Je(1,e.p2.cx,e.p2.cy,e.radius,t,e.arcCcw)}function wc(e,n,t){const r=e.p1,s=e.p2,i=t.p1,o=t.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(e.sType===1){const f=e.arcCcw?1:-1;a=e.a2-f*Math.PI/2}let u=s.angleToPoint(o);if(t.sType===1){const f=t.arcCcw?1:-1;u=t.a1+f*Math.PI/2}const l=u-a;let h=ce(l)/2;if(te(h)===0){const f=Ur*.01;if(e.sType===0&&t.sType===1)h=t.arcCcw?f:-f;else if(e.sType===1&&t.sType===0)h=e.arcCcw?f:-f;else if(e.sType===0&&t.sType===0)throw`err402: prepare aPeakHalf too closed to zero ${h}`}const m=a+h,x=s.translatePolar(m,n.radius);return{s1:e,s2:n,s3:t,ra:n.radius,p1:r,p2:s,p3:o,p4:e.pc,p5:t.pc,p6:x,at1:a,at3:u,abi:m,aph:h}}function Vn(e,n,t){if(n.sType!==1)throw`err510: modifRadius with wrong type ${n.sType}`;const r=e>0?1:-1,s=n.arcCcw?1:-1,i=te(e)===0?1:r*s,o=n.radius+i*t;if(o<=0)throw`err621: modifRadius with negative modified lenght ${o}`;return o}function qr(e,n,t,r){const s=t.translatePolar(e,n),i=t.translatePolar(e+Math.PI,n),o=r.distanceToPoint(s),a=r.distanceToPoint(i);return o<a?s:i}function Ks(e,n,t,r,s){const i=e.translatePolar(n-t,r),o=e.translatePolar(n+t,r),a=s.distanceToPoint(i),u=s.distanceToPoint(o);return a<u?-1:1}function Yn(e,n){const t=n.clone(),r=e.p1.clone(),s=e.p2;if(e.sType!==0)throw`err103: newStrokeFirst unexpected sType ${e.sType}`;const i=hn(r,s).distanceToPoint(t);if(te(i)!==0)throw`err104: newStrokeFirst new point not aligned ${i} ${t.cx} ${t.cy}`;const o=r.angleToPoint(s),a=r.angleToPoint(t);if(te(ce(a-o))!==0)throw`err105: newStrokeFirst new point miss aligned ${o} ${a} ${t.cx} ${t.cy}`;const u=r.distanceToPoint(t),l=r.distanceToPoint(s);if(l<u)throw`err106: newStrokeFirst new point out of scope ${l} ${u} ${t.cx} ${t.cy}`;const c=Z(0,0);return new He(0,r,t,c,0,0,0,!1)}function Kn(e,n){const t=n.clone(),r=e.p2.clone(),s=e.p1;if(e.sType!==0)throw`err203: newStrokeSecond unexpected sType ${e.sType}`;const i=hn(r,s).distanceToPoint(t);if(te(i)!==0)throw`err204: newStrokeSecond new point not aligned ${i} ${t.cx} ${t.cy}`;const o=r.angleToPoint(s),a=r.angleToPoint(t);if(te(ce(a-o))!==0)throw`err205: newStrokeSecond new point miss aligned ${o} ${a} ${t.cx} ${t.cy}`;const u=r.distanceToPoint(t),l=r.distanceToPoint(s);if(l<u)throw`err206: newStrokeSecond new point out of scope ${l} ${u} ${t.cx} ${t.cy}`;const c=Z(0,0);return new He(0,t,r,c,0,0,0,!1)}function zn(e,n){if(e.sType!==1)throw`err203: newArcFirst unexpected sType ${e.sType}`;const t=e.p1.clone(),r=e.pc.clone(),s=n.clone(),i=r.angleToPoint(s);if(!zi(i,e.a1,e.a2,e.arcCcw))throw`err908: newArcFirst a48 out of scope ${i} ${e.a1} ${e.a2} ${e.arcCcw}`;return new He(1,t,s,r,e.radius,e.a1,i,e.arcCcw)}function Jn(e,n){if(e.sType!==1)throw`err204: newArcSecond unexpected sType ${e.sType}`;const t=e.p2.clone(),r=e.pc.clone(),s=n.clone(),i=r.angleToPoint(s);if(!zi(i,e.a1,e.a2,e.arcCcw))throw`err907: newArcSecond a59 out of scope ${i} ${e.a1} ${e.a2} ${e.arcCcw}`;return new He(1,s,t,r,e.radius,i,e.a2,e.arcCcw)}function mn(e,n,t,r,s,i){const o=e.clone(),a=n.clone(),u=t.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 h=u.angleToPoint(o),m=u.angleToPoint(a),x=ce(h-i+Math.PI),b=ce(m-i+Math.PI);Math.abs(b-x)>Math.PI+Ur&&Ct.addMsg(`warn882: newRounded a873 or a972 larger than PI/2 ${at(x)} ${at(b)} at ${at(u.cx)} ${at(u.cy)}
16
- `);const f=!(s>0);return new He(1,o,a,u,r,h,m,f)}function yc(e){const n=Math.abs(e.ra/Math.sin(e.aph)),t=n*Math.cos(e.aph),r=e.p2.translatePolar(e.abi,n),s=e.p2.translatePolar(e.at1,t),i=e.p2.translatePolar(e.at3,t),o=[];return o.push(Yn(e.s1,s)),o.push(mn(s,i,r,e.ra,e.aph,e.abi)),o.push(Kn(e.s3,i)),o}function bc(e){const t=hn(e.p1,e.p2).lineParallelDistance(e.ra,e.p6,e.p5),r=t.projectPoint(e.p5),s=r.distanceToPoint(e.p5),i=Vn(e.aph,e.s3,e.ra),o=Zn(i,s),a=qr(t.ca,o,r,e.p6),u=e.p5.angleToPoint(a),l=e.p5.translatePolar(u,e.s3.radius),c=e.p2.angleFromToPoints(e.p1,a),m=Math.abs(e.ra/Math.sin(c))*Math.cos(c),x=e.p2.angleToPoint(e.p1),b=e.p2.translatePolar(x,m),f=[];return f.push(Yn(e.s1,b)),f.push(mn(b,l,a,e.ra,e.aph,e.abi)),f.push(Jn(e.s3,l)),f}function Ac(e){const t=hn(e.p3,e.p2).lineParallelDistance(e.ra,e.p6,e.p4),r=t.projectPoint(e.p4),s=r.distanceToPoint(e.p4),i=Vn(e.aph,e.s1,e.ra),o=Zn(i,s),a=qr(t.ca,o,r,e.p6),u=e.p4.angleToPoint(a),l=e.p4.translatePolar(u,e.s1.radius),c=e.p2.angleFromToPoints(e.p3,a),m=Math.abs(e.ra/Math.sin(c))*Math.cos(c),x=e.p2.angleToPoint(e.p3),b=e.p2.translatePolar(x,m),f=[];return f.push(zn(e.s1,l)),f.push(mn(l,b,a,e.ra,e.aph,e.abi)),f.push(Kn(e.s3,b)),f}function _c(e){const n=Vn(e.aph,e.s1,e.ra),t=Vn(e.aph,e.s3,e.ra),r=e.p4.distanceToPoint(e.p5),s=e.p4.angleToPoint(e.p5),i=Xs(r,n,t),o=Ks(e.p4,s,i,n,e.p6),a=s+o*i,u=e.p4.translatePolar(a,n),l=e.p4.translatePolar(a,e.s1.radius),c=Math.PI+s,h=Xs(r,t,n),m=Ks(e.p5,c,h,t,e.p6),x=c+m*h,b=e.p5.translatePolar(x,t);if(!b.isEqual(u))throw`err909: roundArcArc p7 anf p7b differ ${u.cx} ${b.cx} ${u.cy} ${b.cy} 0`;const f=e.p5.translatePolar(x,e.s3.radius),d=[];return d.push(zn(e.s1,l)),d.push(mn(l,f,u,e.ra,e.aph,e.abi)),d.push(Jn(e.s3,f)),d}function to(e){const n=e.abi-2*e.aph,t=e.abi+2*e.aph;let r=e.p6.translatePolar(n,e.ra),s=e.p6.translatePolar(t,e.ra);if(e.s1.sType===1){const u=e.p4.angleFromToPoints(e.p2,e.p6),c=e.p4.angleToPoint(e.p2)+2*u;r=e.p4.translatePolar(c,e.s1.radius)}if(e.s3.sType===1){const u=e.p5.angleFromToPoints(e.p2,e.p6),c=e.p5.angleToPoint(e.p2)+2*u;s=e.p5.translatePolar(c,e.s3.radius)}const i=!(e.aph>0),o=new He(1,r,s,e.p6,e.ra,n,t,i),a=[];return e.s1.sType===0?a.push(Yn(e.s1,r)):e.s1.sType===1&&a.push(zn(e.s1,r)),a.push(o),e.s3.sType===0?a.push(Kn(e.s3,s)):e.s3.sType===1&&a.push(Jn(e.s3,s)),a}function zs(e,n,t,r){let s=t,i=t;const o=r.p6.angleFromToPoints(r.p2,t);if(Math.abs(o)>Math.PI/2){i=r.p6.translatePolar(r.abi+e*Math.PI/2,r.ra);const a=Xn(i.cx,i.cy,r.abi);if(n.sType===0)s=hn(n.p1,n.p2).intersection(a);else if(n.sType===1){const u=a.projectPoint(n.pc),l=u.distanceToPoint(n.pc);if(l<n.radius){const c=Zn(n.radius,l);s=qr(r.abi,c,u,t)}else Ct.addMsg(`warn222: wideAccess not possible on arc ${at(n.radius)} ${at(l)} at ${at(t.cx)} ${at(t.cy)}
17
- `),s=t,i=t}}return[s,i]}function vc(e){const n=to(e),t=n[1].arcCcw?1:-1,[r,s]=zs(t,e.s1,n[1].p1,e),[i,o]=zs(-t,e.s3,n[1].p2,e),a=[];if(r.isEqual(s))a.push(n[0]);else{e.s1.sType===0?a.push(Yn(e.s1,r)):e.s1.sType===1&&a.push(zn(e.s1,r));const u=Z(0,0),l=new He(0,r,s,u,0,0,0,!1);a.push(l)}if(a.push(mn(s,o,e.p6,e.ra,e.aph,e.abi)),i.isEqual(o))a.push(n[2]);else{const u=Z(0,0),l=new He(0,o,i,u,0,0,0,!1);a.push(l),e.s3.sType===0?a.push(Kn(e.s3,i)):e.s3.sType===1&&a.push(Jn(e.s3,i))}return a}function Js(e,n,t){const r=wc(e,n,t),s=[];if(n.sType===3)if(e.sType===0&&t.sType===0)s.push(...yc(r));else if(e.sType===0&&t.sType===1)s.push(...bc(r));else if(e.sType===1&&t.sType===0)s.push(...Ac(r));else if(e.sType===1&&t.sType===1)s.push(..._c(r));else throw`err123: makeCorner unexpected s1s3.sType ${e.sType} ${t.sType}`;else if(n.sType===4)s.push(...to(r));else if(n.sType===5)s.push(...vc(r));else throw`err723: makeCorner unexpected s2.sType ${n.sType}`;return s}function st(e){return e.toFixed(4)}function Cc(e,n,t,r=""){let s=r;return s===""&&(s="black"),`<circle cx="${st(e)}" cy="${st(n)}" r="${st(t)}" stroke="${s}" stroke-width="1" fill="none" />`}var Ec=class{constructor(){I(this,"pathD");this.pathD=""}addStart(e,n){this.pathD=`M ${st(e)} ${st(n)}`}addStroke(e,n){this.pathD+=` L ${st(e)} ${st(n)}`}addArc(e,n,t,r,s){const i=st(t),o=r?1:0,a=s?1:0;this.pathD+=` A ${i} ${i} 0 ${o} ${a} ${st(e)} ${st(n)}`}stringify(e=""){let n=e;return n===""&&(n="black"),`<path d="${this.pathD} Z" stroke="${n}" stroke-width="1" fill="none" />`}};function Fc(){return new Ec}var Sc=class{constructor(){I(this,"svgStr");I(this,"payloadStr");I(this,"groupActive");this.payloadStr="",this.svgStr="",this.groupActive=!1}addHeader(e,n,t,r){const s=`${e} ${t} ${n} ${r}`;this.svgStr=`<svg width="${n}" height="${r}" viewBox="${s}" xmlns="http://www.w3.org/2000/svg">`}addSvgString(e){this.payloadStr+=e}addGroup(e){if(this.groupActive)throw"err321: group must be closed before opening a new one";this.groupActive=!0,this.payloadStr+=`<g id="${e}">`}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 kc(){return new Sc}function qe(e){return e.toFixed(4)}var Gr=class{constructor(e,n,t,r,s,i,o,a){I(this,"arc");I(this,"p1x");I(this,"p1y");I(this,"radius");I(this,"a1");I(this,"a2");I(this,"p2x");I(this,"p2y");this.arc=e,this.p1x=n,this.p1y=t,this.radius=r,this.a1=s,this.a2=i,this.p2x=o,this.p2y=a}};function Tc(e,n,t,r){return new Gr(!1,e,n,0,0,0,t,r)}function Pc(e,n,t,r,s,i){const o=i?r:s,a=i?s:r,u=Ie(kt(o)),l=Ie(kt(a));return new Gr(!0,e,n,t,u,l,0,0)}function Bc(e,n,t){return new Gr(!1,e,n,t,0,0,0,0)}var Mc=class{constructor(){I(this,"dxfStr");this.dxfStr=`0
18
- SECTION
19
- 2
20
- ENTITIES
21
- `}addCircle(e,n,t){this.dxfStr+=`0
22
- CIRCLE
23
- 8
24
- PARAMETRIX
25
- `,this.dxfStr+=`10
26
- ${qe(e)}
27
- 20
28
- ${qe(n)}
29
- 40
30
- ${qe(t)}
31
- `}addLine(e,n,t,r){this.dxfStr+=`0
32
- LINE
33
- 8
34
- PARAMETRIX
35
- `,this.dxfStr+=`10
36
- ${qe(e)}
37
- 20
38
- ${qe(n)}
39
- 11
40
- ${qe(t)}
41
- 21
42
- ${qe(r)}
43
- `}addArc(e,n,t,r,s){this.dxfStr+=`0
44
- ARC
45
- 8
46
- PARAMETRIX
47
- `,this.dxfStr+=`10
48
- ${qe(e)}
49
- 20
50
- ${qe(n)}
51
- 40
52
- ${qe(t)}
53
- 50
54
- ${qe(r)}
55
- 51
56
- ${qe(s)}
57
- `}close(){this.dxfStr+=`0
58
- ENDSEC
59
- 0
60
- EOF
61
- `}stringify(){return this.close(),this.dxfStr}};function Ic(){return new Mc}function $c(e,n,t){return{circle:!0,cx:e,cy:n,radius:t}}var Lc=class{constructor(){I(this,"seg");this.seg=[]}addStart(e,n){this.seg=[];const t={typ:0,px:e,py:n};this.seg.push(t)}addStroke(e,n){const t={typ:1,px:e,py:n};this.seg.push(t)}addArc(e,n,t,r,s){const i={typ:2,px:e,py:n,radius:t,large:r,ccw:s};this.seg.push(i)}toJson(){return{circle:!1,seg:this.seg}}};function Nc(){return new Lc}var no=class{};function ro(e,n,t){const r=Et(e,n,t),s=Z(r.pc.cx,r.pc.cy),i=ce((r.a2-r.a1)/2);let o=r.a1+i;return(Math.sign(i)>0&&!t.arcCcw||Math.sign(i)<0&&t.arcCcw)&&(o+=Math.PI),s.translatePolar(o,t.radius)}var Oc=class $t extends no{constructor(t,r,s=""){super();I(this,"circle",!1);I(this,"segments");I(this,"points");I(this,"debugPoints");I(this,"debugLines");I(this,"lastPoint");I(this,"imposedColor");this.segments=[new Je(6,t,r,0)],this.points=[],this.debugPoints=[],this.debugLines=[],this.lastPoint=Z(t,r),this.imposedColor=s}setLastPoint(t,r){this.lastPoint=Z(t,r)}getLastPoint(){return this.lastPoint}getFirstPoint(){return Z(this.segments[0].px,this.segments[0].py)}addPointA(t,r){if(this.points.length>2)throw`err311: contour add too much point ${t} ${r}`;return this.points.push(Z(t,r)),this}addPointAP(t,r){const s=Z(0,0).translatePolar(t,r);return this.addPointA(s.cx,s.cy),this}addPointR(t,r){const i=this.getLastPoint().translate(t,r);return this.addPointA(i.cx,i.cy),this}addPointRP(t,r){const i=this.getLastPoint().translatePolar(t,r);return this.addPointA(i.cx,i.cy),this}addSeg(t){return this.segments.push(t),this}addSegStroke(){if(this.points.length!==1)throw`err554: contour addSegStroke with unexpected points.length ${this.points.length}`;const t=this.points.pop();if(t!==void 0){const r=new Je(0,t.cx,t.cy,0);t.isEqual(this.getLastPoint())||(this.addSeg(r),this.setLastPoint(t.cx,t.cy))}else throw"err284: contour p1 is undefined";return this}addSegStrokeA(t,r){return this.addPointA(t,r).addSegStroke(),this}addSegStrokeAP(t,r){return this.addPointAP(t,r).addSegStroke(),this}addSegStrokeR(t,r){return this.addPointR(t,r).addSegStroke(),this}addSegStrokeRP(t,r){return this.addPointRP(t,r).addSegStroke(),this}addSegArc(t,r,s){if(this.points.length!==1)throw`err954: contour addSegArc with unexpected points.length ${this.points.length}`;const i=this.points.pop();if(i!==void 0){const o=new Je(1,i.cx,i.cy,t,r,s);i.isEqual(this.getLastPoint())?console.log(`warn144: addSegArc last and new point identical ${at(i.cx)} ${at(i.cy)}`):(this.addSeg(o),this.setLastPoint(i.cx,i.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 t=this.points.pop(),r=this.points.pop();if(r!==void 0&&t!==void 0){const s=this.getLastPoint(),i=xc(s,r,t),o=i.distanceToPoint(s),a=s.middlePoint(t),u=a.angleToPoint(s),l=a.angleToPoint(r),c=ce(l-u);let h=!1,m=!1;if(!a.isEqual(i)){const x=a.angleToPoint(i),b=ce(x-u);Math.sign(b)*Math.sign(c)>0&&(h=!0)}Math.sign(c)>0&&(m=!0),this.addPointA(t.cx,t.cy).addSegArc(o,h,m),this.debugPoints.push(r)}else throw"err488: contour p1 or p2 or seg is undefined";return this}addSegArc3(t,r){if(this.points.length!==1)throw`err914: contour addSegArc3 with unexpected points.length ${this.points.length}`;const s=this.points.pop();if(s!==void 0){const i=this.getLastPoint(),o=Pr(i,s);let a=s;r&&(a=i);const u=Xn(a.cx,a.cy,t+Math.PI/2),l=o.intersection(u),c=l.distanceToPoint(i),h=i.middlePoint(s),m=a.angleToPoint(h),x=ce(t-m);let b=!1;Math.abs(x)>Math.PI/2&&(b=!0);let f=!1;x<0&&(f=!0),r||(f=!f),this.addPointA(s.cx,s.cy).addSegArc(c,b,f),this.debugPoints.push(h),this.debugPoints.push(l)}else throw"err282: contour p1 is undefined";return this}addSeg2Arcs(t,r){if(this.points.length!==1)throw`err214: contour addSeg2Arcs with unexpected points.length ${this.points.length}`;const s=this.points.pop();if(s!==void 0){const i=this.getLastPoint(),o=i.distanceToPoint(s),a=i.angleToPoint(s),u=s.angleToPoint(i),l=ce(t-a),c=-1*ce(r-u);if(Math.abs(l)>=Math.PI/2)throw`err545: addSeg2Arcs with too large au ${l}`;if(Math.abs(c)>=Math.PI/2)throw`err546: addSeg2Arcs with too large av ${c}`;if(te(l)===0)throw`err765: addSeg2Arcs with almost zero au ${l}`;if(te(c)===0)throw`err766: addSeg2Arcs with almost zero av ${c}`;if(Math.sign(l)*Math.sign(c)<1)throw`err767: addSeg2Arcs with au/av bad orientation ${l} ${c}`;const h=Math.tan(l/2),m=Math.tan(c/2),x=o*m/(m+h),b=Math.abs(x/Math.sin(l)),f=x/Math.cos(l/2),d=o*h/(m+h),p=Math.abs(d/Math.sin(c)),D=i.translatePolar(a+l/2,f);let g=!1;Math.sign(l)<0&&(g=!0),this.addPointA(D.cx,D.cy).addSegArc(b,!1,g),this.addPointA(s.cx,s.cy).addSegArc(p,!1,g),this.debugPoints.push(i.translatePolar(a,x)),this.debugPoints.push(i.translatePolar(a+l-Math.sign(l)*Math.PI/2,b)),this.debugPoints.push(s.translatePolar(u-c+Math.sign(l)*Math.PI/2,p))}else throw"err182: contour p1 is undefined";return this}addCornerPointed(){const t=new Je(2,0,0,0);return this.addSeg(t),this}addCornerRounded(t){const r=new Je(3,0,0,t);return this.addSeg(r),this}addCornerWidened(t){const r=new Je(4,0,0,t);return this.addSeg(r),this}addCornerWideAcc(t){const r=new Je(5,0,0,t);return this.addSeg(r),this}closeSegStroke(){const t=this.segments[0].px,r=this.segments[0].py;return this.addSegStrokeA(t,r),this}closeSegArc(t,r,s){const i=this.segments[0].px,o=this.segments[0].py;return this.addPointA(i,o).addSegArc(t,r,s),this}clone(){const t=new $t(this.segments[0].px,this.segments[0].py);for(const r of this.segments){const s=r.clone();s.sType!==6&&(t.addSeg(s),Ye(s.sType)&&t.setLastPoint(s.px,s.py))}return t}translate(t,r){const s=this.segments[0].px+t,i=this.segments[0].py+r,o=new $t(s,i);for(const a of this.segments){const u=a.clone();Ye(a.sType)&&(u.px+=t,u.py+=r),u.sType!==6&&(o.addSeg(u),Ye(u.sType)&&o.setLastPoint(u.px,u.py))}return o}translatePolar(t,r){return this.translate(r*Math.cos(t),r*Math.sin(t))}rotate(t,r,s){const i=Z(t,r),a=Z(this.segments[0].px,this.segments[0].py).rotate(i,s),u=new $t(a.cx,a.cy);for(const l of this.segments){const c=l.clone();if(Ye(l.sType)){const m=Z(c.px,c.py).rotate(i,s);c.px=m.cx,c.py=m.cy}c.sType!==6&&(u.addSeg(c),Ye(c.sType)&&u.setLastPoint(c.px,c.py))}return u}scale(t,r,s,i=!1){const o=Z(t,r),u=Z(this.segments[0].px,this.segments[0].py).scale(o,s),l=new $t(u.cx,u.cy);for(const c of this.segments){const h=c.clone();if(Ye(c.sType)){const x=Z(h.px,h.py).scale(o,s);h.px=x.cx,h.py=x.cy}c.sType===1&&(h.radius*=s),In(c.sType)&&i&&(h.radius*=s),h.sType!==6&&(l.addSeg(h),Ye(h.sType)&&l.setLastPoint(h.px,h.py))}return l}addPartial(t){if(this.points.length>0)throw`err911: addPartial, points should be used ${this.points.length}`;let r=t;if(t.segments.length>0){const s=t.segments[0],i=this.getLastPoint(),o=s.px-i.cx,a=s.py-i.cy;s.sType===6&&(r=t.translate(-o,-a))}for(const s of r.segments)s.sType!==6&&(this.addSeg(s),Ye(s.sType)&&this.setLastPoint(s.px,s.py));return this}draw(t,r,s=fe.contour){const i=this.imposedColor===""?s:this.imposedColor;let o=0,a=0;for(const u of this.segments){if(u.sType===0){const[l,c]=Nt(o,a,r),[h,m]=Nt(u.px,u.py,r);t.beginPath(),t.moveTo(l,c),t.lineTo(h,m),t.strokeStyle=i,t.stroke()}if(u.sType===1)try{const l=Et(o,a,u),[c,h]=Nt(l.pc.cx,l.pc.cy,r),m=Ji(u.radius,r);t.beginPath(),t.arc(c,h,m,-l.a1,-l.a2,u.arcCcw),t.strokeStyle=i,t.stroke()}catch(l){console.log("err413: "+l)}rn(u.sType)&&(o=u.px,a=u.py)}}extractSkeleton(){const t=this.segments[0],r=new $t(t.px,t.py);for(const s of this.segments)Ye(s.sType)&&r.addSeg(s);return r}generateContour(){Ct.clearPoints(),Ct.clearLines();const t=[],r=[];let s=0,i=0,o=0;for(const c of this.segments){if(c.sType===0){const x=Z(i,o),b=Z(c.px,c.py),f=Z(0,0);t.push(new He(c.sType,x,b,f,0,0,0,!1)),s=1}if(c.sType===1){const x=Et(i,o,c);t.push(x),s=1}const h=t.at(-1),m=t.at(-2);if(h!==void 0&&m!==void 0&&Ye(h.sType)&&Dr(m.sType)){const x=t.pop(),b=t.pop(),f=t.pop();if(f!==void 0&&b!==void 0&&x!==void 0){const d=Js(f,b,x);t.push(...d)}else throw"err603: contour generateContour internal error"}if(Dr(c.sType)){if(s===2)throw`err419: generateContour with two consecutive corners ${c.sType}`;if(s===0&&In(c.sType)&&c.radius>0){const x=Z(0,0);r.push(new He(c.sType,x,x,x,c.radius,0,0,!1))}if(s===1&&In(c.sType)&&c.radius>0){const x=Z(0,0);t.push(new He(c.sType,x,x,x,c.radius,0,0,!1))}s=2}rn(c.sType)&&(i=c.px,o=c.py)}if(r.length>0)if(s===1)t.push(...r);else throw"err397: contour generateContour Corners defined at end and begining";const a=t.at(-1);if(a!==void 0&&Dr(a.sType)){const c=t[0],h=t.pop(),m=t.pop();if(m!==void 0&&h!==void 0&&c!==void 0){const x=Js(m,h,c);t.push(...x.slice(0,-1));const b=x.at(-1);if(b!==void 0)t[0]=b;else throw"err606: contour generateContour internal error"}else throw"err602: contour generateContour internal error"}const u=t[0],l=new $t(u.p1.cx,u.p1.cy,this.imposedColor);l.debugPoints.push(...Ct.getPoints()),l.debugLines.push(...Ct.getLines());for(const c of t)if(c.sType===0)l.addSegStrokeA(c.p2.cx,c.p2.cy);else if(c.sType===1){const h=gc(c);l.addPointA(c.p2.cx,c.p2.cy).addSegArc(h.radius,h.arcLarge,h.arcCcw)}else throw`err986: contour generateContour unexpected in seg2 Enum ${c.sType}`;return l}generatePoints(){const t=[];t.push(...this.debugPoints);const r=this.segments[0];t.push(Z(r.px,r.py));let s=0,i=0;for(const o of this.segments){if(o.sType===1)try{const a=ro(s,i,o);t.push(a)}catch(a){console.log("err453: "+a)}rn(o.sType)&&(s=o.px,i=o.py,t.push(Z(s,i)))}return t}generateLines(){const t=[];return t.push(...this.debugLines),t}checkContour(t){if(t.segments[0].sType!==6)throw`err412: contour check first seg is not eStart ${t.segments[0].sType}`;let r=0,s=0;for(const a of t.segments){if(a.sType===1)try{Et(r,s,a)}catch(u){throw`err778: ${u}`}rn(a.sType)&&(r=a.px,s=a.py)}const i=t.segments[0].px,o=t.segments[0].py;if(te(r-i)!==0||te(s-o)!==0)throw`err414: contour check, contour is not closed px ${i} ${r} py ${i} ${o}`}check(){Ct.clearMsg(),this.checkContour(this);const t=this.generateContour();return this.checkContour(t),Ct.getMsg()}toSvg(t,r=""){const s=Fc();for(const o of this.segments)o.sType===6?s.addStart(o.px,t-o.py):o.sType===0?s.addStroke(o.px,t-o.py):o.sType===1?s.addArc(o.px,t-o.py,o.radius,o.arcLarge,!o.arcCcw):console.log(`err631: contour.toSvg has unknown segment type ${o.sType}`);return s.stringify(r)}toDxfSeg(){const t=[];let r=0,s=0;for(const i of this.segments){if(i.sType===0)t.push(Tc(r,s,i.px,i.py));else if(i.sType===1)try{const o=Et(r,s,i);t.push(Pc(o.pc.cx,o.pc.cy,i.radius,o.a1,o.a2,o.arcCcw))}catch(o){console.log("err413: "+o)}rn(i.sType)&&(r=i.px,s=i.py)}return t}toPax(){const t=Nc();for(const s of this.segments)s.sType===6?t.addStart(s.px,s.py):s.sType===0?t.addStroke(s.px,s.py):s.sType===1?t.addArc(s.px,s.py,s.radius,s.arcLarge,s.arcCcw):console.log(`err709: contour.toPax has unknown segment type ${s.sType}`);return t.toJson()}getPerimeter(){let t=0;const r=this.generateContour();let s=0,i=0;for(const o of r.segments)if(o.sType===6)s=o.px,i=o.py;else if(o.sType===0){const a=Math.sqrt((o.px-s)**2+(o.py-i)**2);s=o.px,i=o.py,t+=a}else if(o.sType===1){const a=Et(s,i,o),u=kt(a.a2-a.a1),l=a.arcCcw?u:kt(2*Math.PI-u),c=o.radius*l;s=o.px,i=o.py,t+=c}else console.log(`err760: contour.getPerimeter has unknown segment type ${o.sType}`);return t}},Rc=class Wt extends no{constructor(t,r,s,i=""){super();I(this,"circle",!0);I(this,"px");I(this,"py");I(this,"radius");I(this,"imposedColor");if(this.px=t,this.py=r,this.radius=s,this.imposedColor=i,s<0)throw`err432: iRadius ${s} is negative at circle ix ${t}, iy ${r}`}clone(){return new Wt(this.px,this.py,this.radius,this.imposedColor)}translate(t,r){return new Wt(this.px+t,this.py+r,this.radius,this.imposedColor)}translatePolar(t,r){return this.translate(r*Math.cos(t),r*Math.sin(t))}rotate(t,r,s){const i=Z(t,r),o=Z(this.px,this.py).rotate(i,s);return new Wt(o.cx,o.cy,this.radius,this.imposedColor)}draw(t,r,s=fe.contour){const[i,o]=Nt(this.px,this.py,r),a=Ji(this.radius,r),u=this.imposedColor===""?s:this.imposedColor;t.beginPath(),t.arc(i,o,a,0,2*Math.PI,!0),t.strokeStyle=u,t.stroke()}extractSkeleton(){return new Wt(this.px,this.py,this.radius)}generateContour(){return new Wt(this.px,this.py,this.radius,this.imposedColor)}generatePoints(){const t=[],r=Z(this.px,this.py);t.push(r);for(let s=0;s<4;s++){const i=r.translatePolar(s*Math.PI/2,this.radius);t.push(i)}return t}generateLines(){return[]}check(){return""}toSvg(t,r=""){return Cc(this.px,t-this.py,this.radius,r)}toDxfSeg(){const t=[];return t.push(Bc(this.px,this.py,this.radius)),t}toPax(){return $c(this.px,this.py,this.radius)}getPerimeter(){return 2*Math.PI*this.radius}};function Wr(e,n,t=""){return new Oc(e,n,t)}function Z0(e,n,t,r=""){return new Rc(e,n,t,r)}var jc=class Br{constructor(){I(this,"pointList");I(this,"lineList");I(this,"vectorList");I(this,"mainList");I(this,"mainBList");I(this,"secondList");I(this,"secondBList");I(this,"dynamicsList");I(this,"xMin");I(this,"xMax");I(this,"yMin");I(this,"yMax");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(n){this.pointList.push(n)}addPoints(n){this.pointList.push(...n)}addLine(n){this.lineList.push(n)}addLines(n){for(const t of n)this.lineList.push(t)}addVector(n){this.vectorList.push(n)}addMainOI(n){const t=[];for(const r of n){const s=r.generateContour();this.addPoints(s.generatePoints()),this.addLines(s.generateLines()),t.push(s),this.mainBList.push(r.extractSkeleton())}this.mainList.push(t)}addMainO(n){const t=[n];this.addMainOI(t)}addSecond(n){const t=n.generateContour();this.addPoints(t.generatePoints()),this.addLines(t.generateLines()),this.secondList.push(t),this.secondBList.push(n.extractSkeleton())}addDynamics(n){this.addPoints(n.generatePoints()),this.addLines(n.generateLines()),this.dynamicsList.push(n)}translate(n,t){const r=new Br;for(const s of this.pointList)r.addPoint(s.translate(n,t));for(const s of this.lineList)r.addLine(s.translate(n,t));for(const s of this.vectorList)r.addVector(s.translate(n,t));for(const s of this.mainList){const i=[];for(const o of s)i.push(o.translate(n,t));r.addMainOI(i)}for(const s of this.secondList)r.addSecond(s.translate(n,t));for(const s of this.dynamicsList)r.addDynamics(s.translate(n,t));return r}translatePolar(n,t){return this.translate(t*Math.cos(n),t*Math.sin(n))}rotate(n,t,r){const s=new Br,i=Z(n,t);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(n,t,r));s.addMainOI(a)}for(const o of this.secondList)s.addSecond(o.rotate(n,t,r));for(const o of this.dynamicsList)s.addDynamics(o.rotate(n,t,r));return s}mergeFigure(n,t=!1){for(const r of n.pointList)this.addPoint(r.clone());for(const r of n.lineList)this.addLine(r.clone());for(const r of n.vectorList)this.addVector(r.clone());for(const r of n.mainList){const s=[];for(const i of r)s.push(i.clone());if(t)for(const i of s)this.addSecond(i);else this.addMainOI(s)}for(const r of n.secondList)this.addSecond(r.clone());for(const r of n.dynamicsList)this.addDynamics(r.clone())}mainListC(){const n=[];for(const t of this.mainList)for(const r of t)n.push(r);return n}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]=Qi(this.pointList)}getAdjustFull(n,t){let r=kr();return this.pointList.length>0&&(this.getMinMax(),r=Tr(this.xMin,this.xMax,this.yMin,this.yMax,n,t)),r}getAdjustZoom(n,t){let r=kr();if(this.pointList.length>0){this.getMinMax();const s=(this.xMin+this.xMax)/2,i=(this.yMin+this.yMax)/2;r=Tr(s,this.xMax,i,this.yMax,n,t)}return r}quantifyRuler(n,t){const s=n/10/t.scaleX;let i=1e-4;for(;i<s;)i*=10;i/5>s?i/=5:i/2>s&&(i/=2);const o=i*t.scaleX;return[i,o]}drawRuler(n,t,r){const[s,i]=this.quantifyRuler(n.canvas.width,t),o=n.canvas.width-10-i;n.font="15px Arial",n.fillStyle=r,n.fillText(`${s.toFixed(4)}`,o,20),n.beginPath(),n.moveTo(o,25),n.lineTo(o+i,25),n.lineTo(o+i,25+i),n.strokeStyle=r,n.stroke()}draw(n,t,r){if(r.points)for(const s of this.pointList)s.draw(n,t);if(r.lines)for(const s of this.lineList)s.draw(n,t);if(r.vectors)for(const s of this.vectorList)s.draw(n,t);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(n,t,a)}if(r.mainB)for(const s of this.mainBList)s.draw(n,t,fe.mainB);if(r.second)for(const s of this.secondList)s.draw(n,t,fe.second);if(r.secondB)for(const s of this.secondBList)s.draw(n,t,fe.secondB);if(r.dynamics)for(const s of this.dynamicsList)s.draw(n,t,fe.dynamics);if(r.ruler&&this.drawRuler(n,t,fe.ruler),r.refframe){for(const s of[10,100,200])Z(s,0).draw(n,t,fe.reference,2),Z(-s,0).draw(n,t,fe.reference,2),Z(0,s).draw(n,t,fe.reference,2),Z(0,-s).draw(n,t,fe.reference,2);Z(0,0).draw(n,t,fe.origin,2)}}};function Vc(){return new jc}function Mr(e){const n=Vc();for(const t in e){const r=e[t];for(const s of r.pointList)n.pointList.push(s);for(const s of r.lineList)n.lineList.push(s);for(const s of r.vectorList)n.vectorList.push(s);for(const s of r.mainList)n.mainList.push(s);for(const s of r.mainBList)n.mainBList.push(s);for(const s of r.secondList)n.secondList.push(s);for(const s of r.secondBList)n.secondBList.push(s);for(const s of r.dynamicsList)n.dynamicsList.push(s)}return n}function X0(){return{points:!1,lines:!1,vectors:!1,main:!0,mainB:!1,second:!0,secondB:!1,dynamics:!1,ruler:!0,refframe:!1}}function Y0(e){return{points:e.points,lines:e.lines,vectors:e.vectors,main:e.main,mainB:e.mainB,second:e.second,secondB:e.secondB,dynamics:e.dynamics,ruler:e.ruler,refframe:e.refframe}}var Uc=(e=>(e[e.eNumber=0]="eNumber",e[e.eCheckbox=1]="eCheckbox",e[e.eDropdown=2]="eDropdown",e[e.eSectionSeparator=3]="eSectionSeparator",e))(Uc||{}),Xt={partName:"",params:[],paramSvg:{},sim:{tMax:0,tStep:0,tUpdate:0}};function qc(e,n,t){return{val:e,init:n,chg:t}}function Gc(e){const n={};for(const t of Object.keys(e))n[t]=e[t].val;return n}var Wc=class{constructor(e,n=""){I(this,"paramVal",{});I(this,"paramInit",{});I(this,"paramChanged",{});I(this,"partName");I(this,"suffix");I(this,"paramNames");for(const t of e.params)this.paramVal[t.name]=t.init,this.paramInit[t.name]=t.init,this.paramChanged[t.name]=!1;this.suffix=n,this.partName=e.partName,this.paramNames=this.getParamName()}getParamName(){const e=[];for(const n of Object.keys(this.paramVal))e.push(n);return e}getPartName(){return this.partName}getPartNameSuffix(){return this.partName+this.suffix}getSuffix(){return this.suffix}getParamVal(){return this.paramVal}getVal(e){if(this.paramNames.includes(e))return this.paramVal[e];throw`err140: parameter ${e} does not exist in design ${this.partName}`}getInit(e){if(this.paramNames.includes(e))return this.paramInit[e];throw`err149: parameter ${e} does not exist in design ${this.partName}`}getChanged(e){if(this.paramNames.includes(e))return this.paramChanged[e];throw`err156: parameter ${e} does not exist in design ${this.partName}`}setVal(e,n){if(this.paramNames.includes(e))this.paramVal[e]=n,this.paramChanged[e]=!0;else throw`err163: parameter ${e} does not exist in design ${this.partName}`}applyParamVal(e){let n="";for(const t of Object.keys(e))this.setVal(t,e[t]);return n+=`info104: apply ${Object.keys(e).length} parameters on ${this.partName}
62
- `,n}applyParamList(e){return this.applyParamVal(Gc(e))}getDesignParamList(){const e={};for(const n of this.paramNames)e[n]=qc(this.getVal(n),this.getInit(n),this.getChanged(n));return e}};function K0(e,n=""){return new Wc(e,n)}function z0(e,n,t,r=0,s=100,i=1){return{name:e,unit:n,init:t,min:r,max:s,step:i,dropdown:[],pType:0}}function J0(e,n){return{name:e,unit:"checkbox",init:n?1:0,min:0,max:1,step:1,dropdown:[],pType:1}}function Q0(e,n,t=0){let r=0;return t<n.length&&(r=t),{name:e,unit:"dropdown",init:r,min:0,max:n.length-1,step:1,dropdown:n,pType:2}}function el(e){return{name:e,unit:"section-separator",init:0,min:0,max:0,step:0,dropdown:[],pType:3}}var Hc=(e=>(e[e.eLinearOrtho=0]="eLinearOrtho",e[e.eRotate=1]="eRotate",e))(Hc||{}),Zc=(e=>(e[e.eIdentity=0]="eIdentity",e[e.eIntersection=1]="eIntersection",e[e.eUnion=2]="eUnion",e[e.eSubstraction=3]="eSubstraction",e))(Zc||{});function tl(e){return{partName:e,calcErr:!0,logstr:"",fig:{},vol:{extrudes:[],volumes:[]},sub:{}}}function nl(e){if(e.calcErr){let n=`err182: Error in sub-design ${e.partName}
63
- `;throw n+=Xc(e.logstr,e.partName),n}}function Xc(e,n){let t="";for(const r of e.split(`
64
- `))r!==""&&(t+=`[${n}]: ${r}
65
- `);return t}var Yc=class{figureToPaxF(e){const n=[];for(const t of e){const r=[];for(const s of t)r.push(s.toPax());n.push(r)}return n}getFigures(e){const n={};for(const t in e){const r=this.figureToPaxF(e[t].mainList);n[t]=r}return n}getPaxJson(e,n,t){return{partName:n.partName,pDef:t,params:e,figures:this.getFigures(n.fig),volume:n.vol,subs:n.sub,log:n.logstr}}getPaxStr(e,n,t){const r=this.getPaxJson(e,n,t);return JSON.stringify(r,null,2)}};function Rt(){return new Yc}function Hr(e){let n=6;return e===1?n=0:e===2&&(n=1),n}function Kc(e){return new Je(Hr(e.typ),e.px,e.py,e.radius,e.large,e.ccw)}function so(e,n,t,r){let s=Math.PI/2;n<2*t&&(s=2*Math.asin(n/(2*t)));const i=Math.min(e,s),o=Math.ceil(r/i),a=r/o;return[o,a]}function io(e,n,t,r=Math.PI/6,s=2){const[i,o]=so(r,s,t,2*Math.PI),a=[];for(let c=0;c<i;c++){const h=e+t*Math.cos(c*o),m=n+t*Math.sin(c*o);a.push([h,m])}const u=a[0][0],l=a[0][1];return a.push([u,l]),a}function oo(e,n,t,r,s,i,o=Math.PI/6,a=2){const u=Sr(r,s,i),[l,c]=so(o,a,t,Math.abs(u)),h=i?c:-c,m=l+1,x=[];for(let b=1;b<m;b++){const f=r+b*h,d=e+t*Math.cos(f),p=n+t*Math.sin(f);x.push([d,p])}return x}var ao=Math.PI/16,uo=2;function Qs(e){return e.toFixed(4)}function ei(e){return e.toString().padStart(3,"0")}function ti(e,n){return[[e,n]]}function zc(e,n,t,r,s,i){return oo(e,n,t,r,s,i,ao,uo)}function Jc(e,n,t){return io(e,n,t,ao,uo)}function Qc(e){const n=[];let t=0,r=0;for(const s of e){if(s.typ===0)n.push(...ti(s.px,s.py));else if(s.typ===1)n.push(...ti(s.px,s.py));else if(s.typ===2)try{const i=s,o=new Je(Hr(i.typ),i.px,i.py,i.radius,i.large,i.ccw),a=Et(t,r,o);n.push(...zc(a.pc.cx,a.pc.cy,o.radius,a.a1,a.a2,a.arcCcw))}catch(i){console.log("err730: "+i)}t=s.px,r=s.py}return n}var e0=class{constructor(){I(this,"pts");I(this,"ptIdx");I(this,"idx");this.pts=[],this.ptIdx=[],this.idx=0}addContour(e){const n=[],t=[];for(const i of e){const[o,a]=i;n.push(`[ ${Qs(o)}, ${Qs(a)} ]`),t.push(` ${this.idx}`),this.idx+=1}const r=`[ ${n.join(",")} ]`,s=`[ ${t.join(",")} ]`;this.pts.push(r),this.ptIdx.push(s)}getFigure(e){let n="";const t=[],r=[];for(const o of this.pts.keys()){const a=`ca_${e}_${ei(o)}`,u=`cb_${e}_${ei(o)}`;n+=`${a} = ${this.pts[o]};
66
- `,n+=`${u} = ${this.ptIdx[o]};
67
- `,t.push(a),r.push(u)}const s=t.join(", "),i=r.join(", ");return n+=`a_${e} = concat(${s});
68
- `,n+=`b_${e} = [${i}];
69
- `,n}},t0=class{getHeader(){return`// Generated by Parametrix
70
- `}getOneFigure(e,n){const t=new e0;for(const s of e)for(const i of s)if(i.circle===!0){const o=i,a=Jc(o.cx,o.cy,o.radius);t.addContour(a)}else{const a=Qc(i.seg);t.addContour(a)}return t.getFigure(n)}getAllFigures(e,n){let t="";for(const r in e){const s=this.getOneFigure(e[r],`${n}_${r}`);t+=s}return t}getOneExtrude(e){let n="rotate_extrude",t="";return e.extrudeMethod===0&&(e.length===void 0&&console.log("err103: design error: scad-linear_extrude length undefined!"),n="linear_extrude",t=`height = ${e.length}`),`
71
- module ${e.outName} () {
72
- translate( [ ${e.translate[0]}, ${e.translate[1]}, ${e.translate[2]} ])
73
- rotate( [ ${Ie(e.rotate[0])}, ${Ie(e.rotate[1])}, ${Ie(e.rotate[2])} ])
74
- ${n}(${t}) polygon(a_${e.face}, b_${e.face});
75
- }
76
- `}getAllExtrudes(e){let n="";for(const t of e){const r=this.getOneExtrude(t);n+=r}return n}getOneVolume(e){let n="identity";switch(e.boolMethod){case 1:n="intersection";break;case 2:n="union";break;case 3:n="difference";break}const t=[];for(const i of e.inList)t.push(`${i}();`);const r=t.join(`
77
- `);let s=`
78
- module ${e.outName} () {
79
- ${n} () {
80
- ${r}
81
- }
82
- }
83
- `;return e.boolMethod===0&&(s=`
84
- module ${e.outName} () {
85
- ${r}
86
- }
87
- `),s}getAllVolumes(e){let n="";for(const t of e){const r=this.getOneVolume(t);n+=r}return n}getAllSubGeoms(e){const n=[];for(const t of e)n.includes(t.subgeom)||n.push(t.subgeom);return n}getOneInherit(e){return`
88
- module ${e.outName} () {
89
- translate( [ ${e.translate[0]}, ${e.translate[1]}, ${e.translate[2]} ])
90
- rotate( [ ${Ie(e.rotate[0])}, ${Ie(e.rotate[1])}, ${Ie(e.rotate[2])} ])
91
- ${e.subdesign}();
92
- }
93
- `}getAllInherits(e){let n="";for(const t of e){const r=this.getOneInherit(t);n+=r}return n}getVolume(e){let n="";if(e.inherits!==void 0){const t=this.getAllSubGeoms(e.inherits);for(const r of t){const s=Rt().getPaxJson({},r,Xt);n+=this.getAllFigures(s.figures,s.partName),n+=this.getVolume(r.vol)}n+=this.getAllInherits(e.inherits)}return n+=this.getAllExtrudes(e.extrudes),n+=this.getAllVolumes(e.volumes),n}getFooter(e){return`
94
- pax_${e}();
95
- `}getExportFile(e){let n=this.getHeader();return n+=this.getAllFigures(e.figures,e.partName),n+=this.getVolume(e.volume),n+=this.getFooter(e.partName),n}};function n0(){return new t0}var co=Math.PI/16,lo=2;function ni(e){return e.toFixed(4)}function ri(e){return e.toString().padStart(3,"0")}function si(e,n){return[[e,n]]}function r0(e,n,t,r,s,i){return oo(e,n,t,r,s,i,co,lo)}function s0(e){const n=[];let t=0,r=0;for(const s of e){if(s.typ===0)n.push(...si(s.px,s.py));else if(s.typ===1)n.push(...si(s.px,s.py));else if(s.typ===2)try{const i=s,o=new Je(Hr(i.typ),i.px,i.py,i.radius,i.large,i.ccw),a=Et(t,r,o);n.push(...r0(a.pc.cx,a.pc.cy,o.radius,a.a1,a.a2,a.arcCcw))}catch(i){console.log("err730: "+i)}t=s.px,r=s.py}return n}function i0(e,n,t){return io(e,n,t,co,lo)}function fo(e,n){const t=[];for(const i of e){const[o,a]=i;t.push(`[ ${ni(o)}, ${ni(a)} ]`)}const r=`[ ${t.join(`,
96
- `)} ]`;return`const ${n} = polygon({ points: ${r} });
97
-
98
- `}function o0(e,n,t,r){const s=i0(e,n,t);return fo(s,r)}function a0(e,n){const t=s0(e);return fo(t,n)}function u0(e,n){let t="";const r=e[0];return e.slice(1).length>0?t+=`${n} = subtract( ${e.join(", ")} );
99
- `:t+=`${n} = ${r};
100
- `,t}function c0(e,n){let t="";const r=e[0];return e.slice(1).length>0?t+=`${n} = union( ${e.join(", ")} );
101
- `:t+=`${n} = ${r};
102
- `,t}var l0=class{getHeader(){return`// Generated by Parametrix
103
-
104
- const { polygon } = require('@jscad/modeling').primitives;
105
- //const { subtract } = require('@jscad/modeling').booleans;
106
- //const { union, intersect, scission, subtract } = require('@jscad/modeling').booleans;
107
- const { union, intersect, subtract } = require('@jscad/modeling').booleans;
108
- const { extrudeLinear, extrudeRotate } = require('@jscad/modeling').extrusions;
109
- const { translate, rotate } = require('@jscad/modeling').transforms;
110
-
111
- const main = () => {
112
-
113
- `}getOneFigure(e,n){let t="";const r=[];for(const[s,i]of e.entries()){const o=`face_${n}_Fa${ri(s)}`,a=[];for(const[u,l]of i.entries()){const c=`ctr_${o}_Ctr${ri(u)}`;if(l.circle===!0){const h=l;t+=o0(h.cx,h.cy,h.radius,c)}else t+=a0(l.seg,c);a.push(c)}t+=u0(a,o),r.push(o)}return t+=c0(r,n),t}getAllFigures(e,n){let t="";for(const r in e){const s=this.getOneFigure(e[r],`fig_${n}_${r}`);t+=s}return t}getOneExtrude(e){let n="extrudeRotate",t="{segments: 32}";return e.extrudeMethod===0&&(e.length===void 0&&console.log("err079: design error: extrudeLinear length undefined!"),n="extrudeLinear",t=`{height: ${e.length}}`),`
114
- const ${e.outName} =
115
- translate( [ ${e.translate[0]}, ${e.translate[1]}, ${e.translate[2]}, ],
116
- rotate( [ ${e.rotate[0]}, ${e.rotate[1]}, ${e.rotate[2]}, ],
117
- ${n}( ${t}, fig_${e.face} )
118
- )
119
- );
120
-
121
- `}getAllExtrudes(e){let n="";for(const t of e){const r=this.getOneExtrude(t);n+=r}return n}getOneVolume(e){let n="identity";switch(e.boolMethod){case 1:n="intersect";break;case 2:n="union";break;case 3:n="subtract";break}const t=e.inList.join(", ");let r=`const ${e.outName} = ${n}( ${t} );
122
- `;return e.boolMethod===0&&(r=`const ${e.outName} = ${e.inList[0]};
123
- `),r}getAllVolumes(e){let n="";for(const t of e){const r=this.getOneVolume(t);n+=r}return n}getAllSubGeoms(e){const n=[];for(const t of e)n.includes(t.subgeom)||n.push(t.subgeom);return n}getOneInherit(e){return`
124
- const ${e.outName} =
125
- translate( [ ${e.translate[0]}, ${e.translate[1]}, ${e.translate[2]}, ],
126
- rotate( [ ${e.rotate[0]}, ${e.rotate[1]}, ${e.rotate[2]}, ],
127
- ${e.subdesign}
128
- )
129
- );
130
- `}getAllInherits(e){let n="";for(const t of e){const r=this.getOneInherit(t);n+=r}return n}getVolume(e){let n="";if(e.inherits!==void 0){const t=this.getAllSubGeoms(e.inherits);for(const r of t){const s=Rt().getPaxJson({},r,Xt);n+=this.getAllFigures(s.figures,s.partName),n+=this.getVolume(r.vol)}n+=this.getAllInherits(e.inherits)}return n+=this.getAllExtrudes(e.extrudes),n+=this.getAllVolumes(e.volumes),n}getFooter(e){return`
131
- return pax_${e};
132
- }
133
- module.exports = { main };
134
- `}getExportFile(e){let n=this.getHeader();return n+=this.getAllFigures(e.figures,e.partName),n+=this.getVolume(e.volume),n+=this.getFooter(e.partName),n}};function f0(){return new l0}function le(e){return e.toFixed(4)}function ye(e){return e.toString().padStart(3,"0")}function d0(e,n,t,r){return`def ${r}():
135
- # Radius, XYZ-position, orientation
136
- aCircle = Part.makeCircle(${le(t)}, App.Vector(${le(e)}, ${le(n)}, 0), App.Vector(0, 0, 1))
137
- aWire = Part.Wire(aCircle)
138
- rFace = Part.Face(aWire)
139
- return rFace
140
-
141
- `}function p0(e,n){let t=`def ${n}():
142
- `,r=0,s=0,i=0,o=0,a=0;for(const[l,c]of e.entries()){if(c.typ===0)t+=` P${ye(i)} = App.Vector(${le(c.px)}, ${le(c.py)}, 0)
143
- `,i+=1;else if(c.typ===1)t+=` P${ye(i)} = App.Vector(${le(c.px)}, ${le(c.py)}, 0)
144
- `,l<e.length-1?o=i:o=0,t+=` S${ye(a)} = Part.LineSegment(P${ye(i-1)}, P${ye(o)})
145
- `,i+=1,a+=1;else if(c.typ===2){try{const h=Kc(c),m=ro(r,s,h);t+=` P${ye(i)} = App.Vector(${le(m.cx)}, ${le(m.cy)}, 0)
146
- `,i+=1}catch(h){console.log("err730: "+h)}t+=` P${ye(i)} = App.Vector(${le(c.px)}, ${le(c.py)}, 0)
147
- `,l<e.length-1?o=i:o=0,t+=` S${ye(a)} = Part.Arc(P${ye(i-2)}, P${ye(i-1)}, P${ye(o)})
148
- `,i+=1,a+=1}r=c.px,s=c.py}const u=Array.from({length:a},(l,c)=>`S${ye(c)}`);return t+=` aShape = Part.Shape([${u.join(", ")}])
149
- aWire = Part.Wire(aShape.Edges)
150
- subFace = Part.Face(aWire)
151
- subFace.check()
152
- return subFace
153
-
154
- `,t}function h0(e,n){let t=`def ${n}():
155
- `;const r=[];for(const[o,a]of e.entries()){const u=`FC${ye(o)}`;t+=` ${u} = ${a}()
156
- `,r.push(u)}const s=r[0],i=r.slice(1);return i.length>0?t+=` rOneFace = ${s}.cut([${i.join(", ")}])
157
- `:t+=` rOneFace = ${s}
158
- `,t+=` rOneFace.check()
159
- return rOneFace
160
-
161
- `,t}function m0(e,n){let t=`def ${n}():
162
- `;const r=[];for(const[o,a]of e.entries()){const u=`FA${ye(o)}`;t+=` ${u} = ${a}()
163
- `,r.push(u)}const s=r[0],i=r.slice(1);return i.length>0?t+=` rOneFig = ${s}.fuse([${i.join(", ")}])
164
- `:t+=` rOneFig = ${s}
165
- `,t+=` rOneFig.check()
166
- return rOneFig
167
-
168
- `,t}var x0=class{getHeader(e){return`# freecad-python generated by Parametrix
169
- # run the script with:
170
- # freecad.cmd myScript.py
171
-
172
- import FreeCAD as App
173
- import Part
174
-
175
- #print(sys.argv)
176
- outFileName = "${e}"
177
- if (len(sys.argv) == 3):
178
- outFileName = sys.argv[2]
179
- print(f"outFileName: {outFileName}")
180
-
181
- `}getOneFigure(e,n){let t="";const r=[];for(const[s,i]of e.entries()){const o=`face_${n}_Fa${s}`,a=[];for(const[u,l]of i.entries()){const c=`ctr_${o}_Ctr${u}`;if(l.circle===!0){const h=l;t+=d0(h.cx,h.cy,h.radius,c)}else t+=p0(l.seg,c);a.push(c)}t+=h0(a,o),r.push(o)}return t+=m0(r,n),t}getAllFigures(e,n){let t="";for(const r in e){const s=this.getOneFigure(e[r],`${n}_${r}`);t+=s}return t}getOneExtrude(e){let n=`def fex_${e.outName}():
182
- FIG = ${e.face}()
183
- `;return e.extrudeMethod===0?(e.length===void 0&&console.log(`err103: ${e.face} ${e.outName} design error: eLinearOrtho length undefined!`),n+=` VEX = FIG.extrude(App.Vector(0, 0, ${e.length}))`):e.extrudeMethod===1&&(n+=" 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)"),n+=`
184
- VR1 = VEX.rotate(App.Vector(0, 0, 0), App.Vector(1, 0, 0), ${le(Ie(e.rotate[0]))})
185
- VR2 = VR1.rotate(App.Vector(0, 0, 0), App.Vector(0, 1, 0), ${le(Ie(e.rotate[1]))})
186
- VR3 = VR2.rotate(App.Vector(0, 0, 0), App.Vector(0, 0, 1), ${le(Ie(e.rotate[2]))})
187
- VFP = VR3.translate(App.Vector(${le(e.translate[0])}, ${le(e.translate[1])}, ${le(e.translate[2])}))
188
- return VFP
189
- ${e.outName} = fex_${e.outName}()
190
-
191
- `,n}getAllExtrudes(e){let n="";for(const t of e){const r=this.getOneExtrude(t);n+=r}return n}getOneVolume(e){let n="";if(e.inList.length===0)console.log(`err215: ${e.outName} has an empty inList`);else if(e.inList.length===1||e.boolMethod===0)n+=`${e.outName} = ${e.inList[0]}
192
- `;else{const t=e.inList[0],r=e.inList.slice(1);let s="dbg897";switch(e.boolMethod){case 1:s="common";break;case 2:s="fuse";break;case 3:s="cut";break}n+=`def fvol_${e.outName}():
193
- V000 = ${t}
194
- `;let i=0;for(const o of r)n+=` V${ye(i+1)} = V${ye(i)}.${s}(${o})
195
- `,i+=1;n+=` VFC = V${ye(i)}.removeSplitter()
196
- return VFC
197
- ${e.outName} = fvol_${e.outName}()
198
-
199
- `}return n}getAllVolumes(e){let n="";for(const t of e){const r=this.getOneVolume(t);n+=r}return n}getAllSubGeoms(e){const n=[];for(const t of e)n.includes(t.subgeom)||n.push(t.subgeom);return n}getOneInherit(e){return`def finh_${e.outName}():
200
- IVR1 = ${e.subdesign}.rotate(App.Vector(0, 0, 0), App.Vector(1, 0, 0), ${le(Ie(e.rotate[0]))})
201
- IVR2 = IVR1.rotate(App.Vector(0, 0, 0), App.Vector(0, 1, 0), ${le(Ie(e.rotate[1]))})
202
- IVR3 = IVR2.rotate(App.Vector(0, 0, 0), App.Vector(0, 0, 1), ${le(Ie(e.rotate[2]))})
203
- IVF = IVR3.translate(App.Vector(${le(e.translate[0])}, ${le(e.translate[1])}, ${le(e.translate[2])}))
204
- return IVF
205
- ${e.outName} = finh_${e.outName}()
206
-
207
- `}getAllInherits(e){let n="";for(const t of e){const r=this.getOneInherit(t);n+=r}return n}getVolume(e){let n="";if(e.inherits!==void 0){const t=this.getAllSubGeoms(e.inherits);for(const r of t){const s=Rt().getPaxJson({},r,Xt);n+=this.getAllFigures(s.figures,s.partName),n+=this.getVolume(r.vol)}n+=this.getAllInherits(e.inherits)}return n+=this.getAllExtrudes(e.extrudes),n+=this.getAllVolumes(e.volumes),n}getFooter(e){return`
208
- pax_${e}.check()
209
- #pax_${e}.exportBrep(f"{outFileName}.brep")
210
- #pax_${e}.exportIges(f"{outFileName}.igs")
211
- #pax_${e}.exportStep(f"{outFileName}.stp")
212
- pax_${e}.exportStl(f"{outFileName}.stl")
213
-
214
- `}getExportFile(e){let n=this.getHeader(e.partName);return n+=this.getAllFigures(e.figures,e.partName),n+=this.getVolume(e.volume),n+=this.getFooter(e.partName),n}};function D0(){return new x0}var g0=class{constructor(){I(this,"xMin");I(this,"xMax");I(this,"yMin");I(this,"yMax");I(this,"firstDone");this.firstDone=!1,this.xMin=0,this.xMax=0,this.yMin=0,this.yMax=0}addAContour(e){if(e.length>0){const n=[];this.firstDone&&(n.push(Z(this.xMin,this.yMin)),n.push(Z(this.xMax,this.yMax)));for(const o of e)n.push(...o.generatePoints());const[t,r,s,i]=Qi(n);this.xMin=t,this.xMax=r,this.yMin=s,this.yMax=i}}getViewBox(){const e=Math.round((this.xMax-this.xMin)*1.1)+10,n=Math.round((this.yMax-this.yMin)*1.1)+10,t=Math.round(this.xMin-e*.05),r=Math.round(this.yMin-n*.05);return[t,e,r,n]}},w0=class{constructor(){I(this,"minMax");I(this,"groups");I(this,"svg");this.minMax=new g0,this.groups=[],this.svg=kc()}addAContour(e,n="",t=fe.contour){this.minMax.addAContour(e);const r={gpName:n,gpColor:t,ctrs:e};this.groups.push(r)}makeSvg(e){for(const n of this.groups){n.gpName!==""&&this.svg.addGroup(n.gpName);for(const t of n.ctrs){let r=t.imposedColor;r===""&&(r=n.gpColor),this.svg.addSvgString(t.toSvg(e,r))}n.gpName!==""&&this.svg.closeGroup()}}stringify(){const[e,n,t,r]=this.minMax.getViewBox();return this.svg.addHeader(e,n,t,r),this.makeSvg(this.minMax.yMax+this.minMax.yMin),this.svg.stringify()}};function po(){return new w0}function Un(e){const n=po();return n.addAContour(e),n.stringify()}function kn(e){const n=po();return n.addAContour(e.mainListC(),"main",fe.mainInner),n.addAContour(e.mainBList,"mainB",fe.mainB),n.addAContour(e.secondList,"second",fe.second),n.addAContour(e.secondBList,"secondB",fe.secondB),n.addAContour(e.dynamicsList,"dynamics",fe.dynamics),n.stringify()}function qn(e){const n=Ic();for(const r of e)if(r.circle){const s=r.toDxfSeg()[0];n.addCircle(s.p1x,s.p1y,s.radius)}else for(const s of r.toDxfSeg())s.arc?n.addArc(s.p1x,s.p1y,s.radius,s.a1,s.a2):n.addLine(s.p1x,s.p1y,s.p2x,s.p2y);return n.stringify()}function y0(e){let n="";return n+=e.logstr,n}function ho(e,n,t){return Rt().getPaxStr(e,n,t)}function mo(e){const n=Rt().getPaxJson({},e,Xt);return n0().getExportFile(n)}function xo(e){const n=Rt().getPaxJson({},e,Xt);return f0().getExportFile(n)}function Do(e){const n=Rt().getPaxJson({},e,Xt);return D0().getExportFile(n)}async function b0(e,n,t,r,s){const i=new _u("application/zip"),o=new Gu(i),a=n.partName,u=new Ce(JSON.stringify(e,null,2));await o.add(`param_${a}.json`,u);const l=new Ce(n.logstr);await o.add(`geom_${a}_log.txt`,l);const c=new Ce(r.logstr);await o.add(`geom_${a}_t${t}_log.txt`,c);for(const w in n.fig){const y=new Ce(Un(n.fig[w].mainListC()));await o.add(`face_${a}_${w}.svg`,y);const A=new Ce(qn(n.fig[w].mainListC()));await o.add(`face_${a}_${w}.dxf`,A);const _=new Ce(kn(n.fig[w]));await o.add(`deco_${a}_${w}.svg`,_);const C=new Ce(kn(r.fig[w]));await o.add(`deco_${a}_${w}_t${t}.svg`,C)}const h=Mr(n.fig),m=new Ce(Un(h.mainListC()));await o.add(`face_${a}_all_merged.svg`,m);const x=new Ce(qn(h.mainListC()));await o.add(`face_${a}_all_merged.dxf`,x);const b=new Ce(kn(h));await o.add(`deco_${a}_all_merged.svg`,b);const f=new Ce(kn(h));await o.add(`deco_${a}_all_merged_t${t}.svg`,f);const d=new Ce(ho(e,n,s));await o.add(`${a}.pax.json`,d);const p=new Ce(mo(n));await o.add(`${a}_noarc_openscad.scad`,p);const D=new Ce(xo(n));await o.add(`${a}_noarc_jscad.js`,D);const g=new Ce(Do(n));return await o.add(`${a}_freecad.py`,g),await o.close(),await i.getData()}var A0=(e=>(e[e.eSVG=0]="eSVG",e[e.eSVGALL=1]="eSVGALL",e[e.eDXF=2]="eDXF",e[e.eDXFALL=3]="eDXFALL",e[e.eTXTLOG=4]="eTXTLOG",e[e.ePAX=5]="ePAX",e[e.eOPENSCAD=6]="eOPENSCAD",e[e.eJSCAD=7]="eJSCAD",e[e.eFREECAD=8]="eFREECAD",e[e.eZIP=9]="eZIP",e))(A0||{});function rl(e,n,t,r,s){const i=e(0,n);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=Un(u.mainListC())}else console.log(`err749: fileTextContent eFace ${r} invalid`);else if(s===1){const u=Mr(i.fig);o=Un(u.mainListC())}else if(s===2)if(a.includes(r)){const u=i.fig[r];o=qn(u.mainListC())}else console.log(`err759: fileTextContent eFace ${r} invalid`);else if(s===3){const u=Mr(i.fig);o=qn(u.mainListC())}else s===4?o=y0(i):s===5?o=ho(n,i,t):s===6?o=mo(i):s===7?o=xo(i):s===8?o=Do(i):console.log(`err912: unknown exportFormat ${s}`)}return o}async function sl(e,n,t,r,s){const i=e(0,t),o=e(n,t);let a=new Blob;return!i.calcErr&&!o.calcErr?s===9?a=await b0(t,i,n,o,r):console.log(`err913: unknown exportFormat ${s}`):console.log("err932: error by calling geome ${geome0.calcErr} ${geome1.calcErr}"),a}function il(e){let n="";return e===0||e===1?n="image/svg+xml":e===2||e===3?n="application/dxf":e===4?n="text/plain":e===5?n="application/json":e===6||e===7||e===8?n="text/plain":e===9&&(n="application/zip"),n}function ol(e){let n="";return e===0||e===1?n=".svg":e===2||e===3?n=".dxf":e===4?n=".log":e===5?n=".pax.json":e===6?n="_noarc_openscad.scad":e===7?n="_noarc_jscad.js":e===8?n="_freecad.py":e===9&&(n=".zip"),n}function al(e){let n=!1;return e===9&&(n=!0),n}function ul(e,n,t,r){return JSON.stringify({lastModif:e,partName:n,pVal:t,comment:r},null," ")}function cl(e){const n=pc.parse(e),t="lastModif",r="partName",s="pVal",i="comment";let o="";const a={lastModif:"",partName:"",pVal:{},comment:""};if(Object.hasOwn(n,t)&&(a[t]=n[t]),Object.hasOwn(n,r)&&(a[r]=n[r]),Object.hasOwn(n,s)){const u=n[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
215
- `}else throw`err489: parameter-json-file has no key ${s}
216
- `;return Object.hasOwn(n,i)&&(a[i]=n[i]),[a,o]}function go(){return[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]}function Yt(){return[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]}function _0(e){const n=Yt(),t=Math.cos(e),r=Math.sin(e);return n[1][1]=t,n[2][2]=t,n[2][1]=r,n[1][2]=-r,n}function v0(e){const n=Yt(),t=Math.cos(e),r=Math.sin(e);return n[0][0]=t,n[2][2]=t,n[0][2]=r,n[2][0]=-r,n}function C0(e){const n=Yt(),t=Math.cos(e),r=Math.sin(e);return n[0][0]=t,n[1][1]=t,n[0][1]=-r,n[1][0]=r,n}function E0(e,n){const t=go();for(let r=0;r<4;r++)for(let s=0;s<4;s++){let i=0;for(let o=0;o<4;o++)i+=e[r][o]*n[o][s];t[r][s]=i}return t}function Ir(e){let n=Yt();for(const t of e)n=E0(t,n);return n}function F0(e,n,t){return Ir([_0(e),v0(n),C0(t)])}function S0(e,n,t){const r=Yt();return r[0][3]=e,r[1][3]=n,r[2][3]=t,r}function k0(e){const n=go();for(let t=0;t<4;t++)for(let r=0;r<4;r++)n[t][r]=e[t][r];return n}function T0(e,n){const t=[n[0],n[1],n[2],1],r=[0,0,0];for(let s=0;s<3;s++){let i=0;for(let o=0;o<4;o++)i+=e[s][o]*t[o];r[s]=i}return r}function P0(e){return[e[0][3],e[1][3],e[2][3]]}function B0(e){let n=0,t=0,r=0;const s=e[2][0],i=10**-5;return Math.abs(s-1)<i?(r=0,t=-Math.PI/2,n=-r+Math.atan2(-e[0][1],-e[0][2])):Math.abs(s+1)<i?(r=0,t=Math.PI/2,n=r+Math.atan2(e[0][1],e[0][2])):(n=Math.atan2(e[2][1],e[2][2]),t=Math.atan2(-e[2][0],Math.sqrt(e[2][1]**2+e[2][2]**2)),r=Math.atan2(e[1][0],e[0][0])),[n,t,r]}var M0=class{constructor(e){I(this,"mmat");this.mmat=k0(e)}addRotation(e,n,t){const r=F0(e,n,t);this.mmat=Ir([this.mmat,r])}addTranslation(e,n,t){const r=S0(e,n,t);this.mmat=Ir([this.mmat,r])}getMatrix(){return this.mmat}getRotation(){return B0(this.mmat)}getTranslation(){return P0(this.mmat)}transform(e){return T0(this.mmat,e)}},I0=Yt();function ll(e=I0){return new M0(e)}function $0(e,n,t,r,s=0){return Wr(e,n).addCornerRounded(s).addSegStrokeR(t,0).addCornerRounded(s).addSegStrokeR(0,r).addCornerRounded(s).addSegStrokeR(-t,0).addCornerRounded(s).closeSegStroke()}function L0(e,n,t,r,s,i=0){return $0(e,n,t,r,i).rotate(e,n,s)}function fl(e,n,t,r,s,i=0){const o=r/2*Math.sin(s),a=-r/2*Math.cos(s);return L0(e+o,n+a,t,r,s,i)}function dl(e,n,t,r,s,i=0){const o=(r-t)/2;return Wr(e,n).addCornerRounded(i).addSegStrokeR(t,0).addCornerRounded(i).addSegStrokeR(o,s).addCornerRounded(i).addSegStrokeR(-r,0).addCornerRounded(i).closeSegStroke()}function pl(e,n,t,r,s){if(r<t)throw`err821: Hlength ${r} is too small compare to Vwidth ${t}`;const i=t/2,o=r-t;return Wr(i+o,-i).addPointA(i+o,i).addSegArc(i,!1,!0).addSegStrokeA(i,i).addPointA(i,-i).addSegArc(i,!1,!0).closeSegStroke().rotate(0,0,s).translate(e,n)}function hl(e){const n=[];n.push("version details:"),n.push(`${e.name} : ${e.version}`),n.push("dependencies:");const t=Object.keys(e.dependencies);for(const[r,s]of t.entries()){const i=s;n.push(`${r+1} : ${s} : ${e.dependencies[i]}`)}return n}export{kt as A,ce as B,hl as C,X0 as D,Hc as E,Mr as F,Y0 as G,ul as H,kr as I,cl as J,q0 as K,j0 as L,V0 as M,U0 as N,fe as O,Uc as P,G0 as Q,Gc as R,hc as S,A0 as T,sl as U,rl as V,ol as W,al as X,il as Y,el as a,J0 as b,Q0 as c,R0 as d,O0 as e,at as f,Wr as g,Zc as h,tl as i,K0 as j,nl as k,Xc as l,Z as m,Z0 as n,pl as o,z0 as p,dl as q,Ie as r,fl as s,ll as t,$0 as u,L0 as v,Vc as w,te as x,H0 as y,W0 as z};