desi77-uis 0.1.24 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/public/_app/immutable/chunks/{CwGncLYW.js → 73mrAGCf.js} +1 -1
- package/dist/public/_app/immutable/chunks/Bj--DgiK.js +1 -0
- package/dist/public/_app/immutable/chunks/CL9Eng4B.js +3 -0
- package/dist/public/_app/immutable/chunks/D3vp3rOR.js +1 -0
- package/dist/public/_app/immutable/chunks/{BDm6zWJ9.js → DQ8ZF6T5.js} +1 -1
- package/dist/public/_app/immutable/chunks/{BMwyb77e.js → DVzvP84B.js} +1 -1
- package/dist/public/_app/immutable/chunks/Dk15lVkK.js +2 -0
- package/dist/public/_app/immutable/chunks/GQL90Leu.js +212 -0
- package/dist/public/_app/immutable/chunks/RxrLrjju.js +147 -0
- package/dist/public/_app/immutable/chunks/{Dh6_sW30.js → pYkmqC-y.js} +1 -1
- package/dist/public/_app/immutable/entry/{app.CQU6yPCG.js → app.DpN5WVnB.js} +2 -2
- package/dist/public/_app/immutable/entry/start.C1x9U5Nq.js +1 -0
- package/dist/public/_app/immutable/nodes/{0.DQFurZGg.js → 0.QDoikFsc.js} +1 -1
- package/dist/public/_app/immutable/nodes/{1.DK5iozwP.js → 1.D8_B_Fja.js} +1 -1
- package/dist/public/_app/immutable/nodes/{2.DP0A0eZg.js → 2.DkgxcLCc.js} +1 -1
- package/dist/public/_app/immutable/nodes/{3.CarrsylP.js → 3.BWgEGMYY.js} +9 -9
- package/dist/public/_app/version.json +1 -1
- package/dist/public/desi77/bridge.html +19 -19
- package/dist/public/desi77/capsule.html +19 -19
- package/dist/public/desi77/cylinder.html +19 -19
- package/dist/public/desi77/door1arc.html +19 -19
- package/dist/public/desi77/doubleBone.html +19 -19
- package/dist/public/desi77/factory.html +19 -19
- package/dist/public/desi77/heliostat.html +19 -19
- package/dist/public/desi77/house.html +19 -19
- package/dist/public/desi77/minifoot.html +19 -19
- package/dist/public/desi77/minihelio.html +19 -19
- package/dist/public/desi77/minimir.html +19 -19
- package/dist/public/desi77/pcar.html +19 -19
- package/dist/public/desi77/plugTorque.html +19 -19
- package/dist/public/desi77/rccar.html +19 -19
- package/dist/public/desi77/singleBone.html +19 -19
- package/dist/public/desi77/springInt.html +19 -19
- package/dist/public/desi77/springOne.html +19 -19
- package/dist/public/desi77/springSide.html +19 -19
- package/dist/public/desi77/springTorqueA.html +19 -19
- package/dist/public/desi77/springTorqueB.html +19 -19
- package/dist/public/desi77/springTorqueC.html +19 -19
- package/dist/public/desi77/springWorm.html +19 -19
- package/dist/public/desi77/square.html +19 -19
- package/dist/public/desi77/stoneTower.html +19 -19
- package/dist/public/desi77/trackXY.html +19 -19
- package/dist/public/desi77/trackXZ.html +19 -19
- package/dist/public/desi77/triangle.html +19 -19
- package/dist/public/desi77/tunnel.html +19 -19
- package/dist/public/index.html +17 -17
- package/dist/public/pgdsvg/minihelio_foot_top.svg +1 -0
- package/dist/public/pgdsvg/minihelio_front.svg +1 -1
- package/dist/public/pgdsvg/minihelio_side.svg +2 -2
- package/dist/public/pgdsvg/src_minihelio.svg +2 -2
- package/package.json +3 -3
- package/dist/public/_app/immutable/assets/_layout.BEc07bhm.css +0 -1
- package/dist/public/_app/immutable/assets/_page.BTCojHq8.css +0 -1
- package/dist/public/_app/immutable/assets/_page.DKegludn.css +0 -1
- package/dist/public/_app/immutable/chunks/9PdpQ-t4.js +0 -2
- package/dist/public/_app/immutable/chunks/CHZ90_rQ.js +0 -147
- package/dist/public/_app/immutable/chunks/Cw0T28pt.js +0 -3
- package/dist/public/_app/immutable/chunks/D8FdkmhK.js +0 -1
- package/dist/public/_app/immutable/chunks/DjKITdZS.js +0 -212
- package/dist/public/_app/immutable/chunks/Qkzk7OJu.js +0 -1
- package/dist/public/_app/immutable/entry/start.r24VMFaG.js +0 -1
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import{$ as Do,D as Fc,au as wo,Z as kr,E as _t,O as Sc,F as Tc,Q as zs,ac as kc,W as Pc,X as Ic,Y as Ks,_ as Pr,N as pn,av as Mc,aw as Bc,K as Jr,a2 as Oc,ax as pr,ay as hr,a0 as Rc,az as Js,ao as Lc,aA as Qs,aB as yo,j as Nc,a3 as _o,a4 as $c,aC as Uc,aD as Ir,a7 as Vc,M as bo,aE as jc,aF as qc,aG as Wc,aH as Yc,aI as Hc,ag as Gc,aJ as Zc,aK as Xc,aL as zc,aM as Kc,aN as Jc,aO as Qc}from"./Dk15lVkK.js";function qd(t,e){return e}function eu(t,e,n){for(var r=t.items,s=[],i=e.length,o=0;o<i;o++)Wc(e[o].e,s,!0);var a=i>0&&s.length===0&&n!==null;if(a){var c=n.parentNode;Yc(c),c.append(n),r.clear(),mt(t,e[0].prev,e[i-1].next)}Hc(s,()=>{for(var u=0;u<i;u++){var l=e[u];a||(r.delete(l.k),mt(t,l.prev,l.next)),bo(l.e,!a)}})}function Wd(t,e,n,r,s,i=null){var o=t,a={flags:e,items:new Map,first:null},c=(e&wo)!==0;if(c){var u=t;o=_t?kr(Sc(u)):u.appendChild(Do())}_t&&Tc();var l=null,d=!1,m=new Map,g=kc(()=>{var h=n();return Nc(h)?h:h==null?[]:yo(h)}),D,f;function p(){tu(f,D,a,m,o,s,e,r,n),i!==null&&(D.length===0?l?_o(l):l=Jr(()=>i(o)):l!==null&&$c(l,()=>{l=null}))}Fc(()=>{f??=Gc,D=zs(g);var h=D.length;if(d&&h===0)return;d=h===0;let x=!1;if(_t){var y=Pc(o)===Ic;y!==(h===0)&&(o=Ks(),kr(o),Pr(!1),x=!0)}if(_t){for(var E=null,_,w=0;w<h;w++){if(pn.nodeType===Mc&&pn.data===Bc){o=pn,x=!0,Pr(!1);break}var b=D[w],A=r(b,w);_=Qr(pn,a,E,null,b,A,w,s,e,n),a.items.set(A,_),E=_}h>0&&kr(Ks())}if(_t)h===0&&i&&(l=Jr(()=>i(o)));else if(Oc()){var F=new Set,C=Rc;for(w=0;w<h;w+=1){b=D[w],A=r(b,w);var v=a.items.get(A)??m.get(A);v?(e&(pr|hr))!==0&&Ao(v,b,w,e):(_=Qr(null,a,null,null,b,A,w,s,e,n,!0),m.set(A,_)),F.add(A)}for(const[O,P]of a.items)F.has(O)||C.skipped_effects.add(P.e);C.add_callback(p)}else p();x&&Pr(!0),zs(g)}),_t&&(o=pn)}function tu(t,e,n,r,s,i,o,a,c){var u=(o&jc)!==0,l=(o&(pr|hr))!==0,d=e.length,m=n.items,g=n.first,D=g,f,p=null,h,x=[],y=[],E,_,w,b;if(u)for(b=0;b<d;b+=1)E=e[b],_=a(E,b),w=m.get(_),w!==void 0&&(w.a?.measure(),(h??=new Set).add(w));for(b=0;b<d;b+=1){if(E=e[b],_=a(E,b),w=m.get(_),w===void 0){var A=r.get(_);if(A!==void 0){r.delete(_),m.set(_,A);var F=p?p.next:D;mt(n,p,A),mt(n,A,F),Mr(A,F,s),p=A}else{var C=D?D.e.nodes_start:s;p=Qr(C,n,p,p===null?n.first:p.next,E,_,b,i,o,c)}m.set(_,p),x=[],y=[],D=p.next;continue}if(l&&Ao(w,E,b,o),(w.e.f&Ir)!==0&&(_o(w.e),u&&(w.a?.unfix(),(h??=new Set).delete(w))),w!==D){if(f!==void 0&&f.has(w)){if(x.length<y.length){var v=y[0],O;p=v.prev;var P=x[0],R=x[x.length-1];for(O=0;O<x.length;O+=1)Mr(x[O],v,s);for(O=0;O<y.length;O+=1)f.delete(y[O]);mt(n,P.prev,R.next),mt(n,p,P),mt(n,R,v),D=v,p=R,b-=1,x=[],y=[]}else f.delete(w),Mr(w,D,s),mt(n,w.prev,w.next),mt(n,w,p===null?n.first:p.next),mt(n,p,w),p=w;continue}for(x=[],y=[];D!==null&&D.k!==_;)(D.e.f&Ir)===0&&(f??=new Set).add(D),y.push(D),D=D.next;if(D===null)continue;w=D}x.push(w),p=w,D=w.next}if(D!==null||f!==void 0){for(var B=f===void 0?[]:yo(f);D!==null;)(D.e.f&Ir)===0&&B.push(D),D=D.next;var L=B.length;if(L>0){var V=(o&wo)!==0&&d===0?s:null;if(u){for(b=0;b<L;b+=1)B[b].a?.measure();for(b=0;b<L;b+=1)B[b].a?.fix()}eu(n,B,V)}}u&&Vc(()=>{if(h!==void 0)for(w of h)w.a?.apply()}),t.first=n.first&&n.first.e,t.last=p&&p.e;for(var j of r.values())bo(j.e);r.clear()}function Ao(t,e,n,r){(r&pr)!==0&&Js(t.v,e),(r&hr)!==0?Js(t.i,n):t.i=n}function Qr(t,e,n,r,s,i,o,a,c,u,l){var d=(c&pr)!==0,m=(c&Uc)===0,g=d?m?Lc(s,!1,!1):Qs(s):s,D=(c&hr)===0?o:Qs(o),f={i:D,v:g,k:i,a:null,e:null,prev:n,next:r};try{if(t===null){var p=document.createDocumentFragment();p.append(t=Do())}return f.e=Jr(()=>a(t,g,D,u),_t),f.e.prev=n&&n.e,f.e.next=r&&r.e,n===null?l||(e.first=f):(n.next=f,n.e.next=f.e),r!==null&&(r.prev=f,r.e.prev=f.e),f}finally{}}function Mr(t,e,n){for(var r=t.next?t.next.e.nodes_start:n,s=e?e.e.nodes_start:n,i=t.e.nodes_start;i!==null&&i!==r;){var o=qc(i);s.before(i),i=o}}function mt(t,e,n){e===null?t.first=n:(e.next=n,e.e.next=n&&n.e),n!==null&&(n.prev=e,n.e.prev=e&&e.e)}const nu=Symbol("is custom element"),ru=Symbol("is html");function Yd(t){if(_t){var e=!1,n=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var r=t.value;ei(t,"value",null),t.value=r}if(t.hasAttribute("checked")){var s=t.checked;ei(t,"checked",null),t.checked=s}}};t.__on_r=n,Jc(n),Qc()}}function Hd(t,e){var n=Es(t);n.value===(n.value=e??void 0)||t.value===e&&(e!==0||t.nodeName!=="PROGRESS")||(t.value=e??"")}function Gd(t,e){var n=Es(t);n.checked!==(n.checked=e)&&(t.checked=e)}function ei(t,e,n,r){var s=Es(t);_t&&(s[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||s[e]!==(s[e]=n)&&(e==="loading"&&(t[Zc]=n),n==null?t.removeAttribute(e):typeof n!="string"&&su(t).includes(e)?t[e]=n:t.setAttribute(e,n))}function Es(t){return t.__attributes??={[nu]:t.nodeName.includes("-"),[ru]:t.namespaceURI===Xc}}var ti=new Map;function su(t){var e=t.getAttribute("is")||t.nodeName,n=ti.get(e);if(n)return n;ti.set(e,n=[]);for(var r,s=t,i=Element.prototype;i!==s;){r=Kc(s);for(var o in r)r[o].set&&n.push(o);s=zc(s)}return n}const vn=15,es=30,ts=19,iu=29,tr=256,vs=tr+1+iu,ni=2*vs+1,hn=256,ou=7,ri=16,si=17,ii=18,Br=16,nr=-1,au=1,On=2,cu=0,tn=0,oi=1,uu=3,Ue=4,ct=0,Eo=1,Rn=2,ut=-2,lu=-3,Qt=-5;function mr(t){return xr(t.map(([e,n])=>new Array(e).fill(n,0,e)))}function xr(t){return t.reduce((e,n)=>e.concat(Array.isArray(n)?xr(n):n),[])}const ai=[0,1,2,3].concat(...mr([[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 t=this;function e(s){const i=t.dyn_tree,o=t.stat_desc.static_tree,a=t.stat_desc.extra_bits,c=t.stat_desc.extra_base,u=t.stat_desc.max_length;let l,d,m,g,D,f,p=0;for(g=0;g<=vn;g++)s.bl_count[g]=0;for(i[s.heap[s.heap_max]*2+1]=0,l=s.heap_max+1;l<ni;l++)d=s.heap[l],g=i[i[d*2+1]*2+1]+1,g>u&&(g=u,p++),i[d*2+1]=g,!(d>t.max_code)&&(s.bl_count[g]++,D=0,d>=c&&(D=a[d-c]),f=i[d*2],s.opt_len+=f*(g+D),o&&(s.static_len+=f*(o[d*2+1]+D)));if(p!==0){do{for(g=u-1;s.bl_count[g]===0;)g--;s.bl_count[g]--,s.bl_count[g+1]+=2,s.bl_count[u]--,p-=2}while(p>0);for(g=u;g!==0;g--)for(d=s.bl_count[g];d!==0;)m=s.heap[--l],!(m>t.max_code)&&(i[m*2+1]!=g&&(s.opt_len+=(g-i[m*2+1])*i[m*2],i[m*2+1]=g),d--)}}function n(s,i){let o=0;do o|=s&1,s>>>=1,o<<=1;while(--i>0);return o>>>1}function r(s,i,o){const a=[];let c=0,u,l,d;for(u=1;u<=vn;u++)a[u]=c=c+o[u-1]<<1;for(l=0;l<=i;l++)d=s[l*2+1],d!==0&&(s[l*2]=n(a[d]++,d))}t.build_tree=function(s){const i=t.dyn_tree,o=t.stat_desc.static_tree,a=t.stat_desc.elems;let c,u,l=-1,d;for(s.heap_len=0,s.heap_max=ni,c=0;c<a;c++)i[c*2]!==0?(s.heap[++s.heap_len]=l=c,s.depth[c]=0):i[c*2+1]=0;for(;s.heap_len<2;)d=s.heap[++s.heap_len]=l<2?++l:0,i[d*2]=1,s.depth[d]=0,s.opt_len--,o&&(s.static_len-=o[d*2+1]);for(t.max_code=l,c=Math.floor(s.heap_len/2);c>=1;c--)s.pqdownheap(i,c);d=a;do c=s.heap[1],s.heap[1]=s.heap[s.heap_len--],s.pqdownheap(i,1),u=s.heap[1],s.heap[--s.heap_max]=c,s.heap[--s.heap_max]=u,i[d*2]=i[c*2]+i[u*2],s.depth[d]=Math.max(s.depth[c],s.depth[u])+1,i[c*2+1]=i[u*2+1]=d,s.heap[1]=d++,s.pqdownheap(i,1);while(s.heap_len>=2);s.heap[--s.heap_max]=s.heap[1],e(s),r(i,t.max_code,s.bl_count)}}fe._length_code=[0,1,2,3,4,5,6,7].concat(...mr([[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.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];fe.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];fe.d_code=function(t){return t<256?ai[t]:ai[256+(t>>>7)]};fe.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];fe.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];fe.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];fe.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ie(t,e,n,r,s){const i=this;i.static_tree=t,i.extra_bits=e,i.extra_base=n,i.elems=r,i.max_length=s}const fu=[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],du=mr([[144,8],[112,9],[24,7],[8,8]]);Ie.static_ltree=xr(fu.map((t,e)=>[t,du[e]]));const pu=[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],hu=mr([[30,5]]);Ie.static_dtree=xr(pu.map((t,e)=>[t,hu[e]]));Ie.static_l_desc=new Ie(Ie.static_ltree,fe.extra_lbits,tr+1,vs,vn);Ie.static_d_desc=new Ie(Ie.static_dtree,fe.extra_dbits,0,es,vn);Ie.static_bl_desc=new Ie(null,fe.extra_blbits,0,ts,ou);const mu=9,xu=8;function ht(t,e,n,r,s){const i=this;i.good_length=t,i.max_lazy=e,i.nice_length=n,i.max_chain=r,i.func=s}const vo=0,Zn=1,Ht=2,ot=[new ht(0,0,0,0,vo),new ht(4,4,8,4,Zn),new ht(4,5,16,8,Zn),new ht(4,6,32,32,Zn),new ht(4,4,16,16,Ht),new ht(8,16,32,32,Ht),new ht(8,16,128,128,Ht),new ht(8,32,128,256,Ht),new ht(32,128,258,1024,Ht),new ht(32,258,258,4096,Ht)],Ln=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Qe=0,Nn=1,mn=2,$n=3,gu=32,Or=42,Un=113,xn=666,Rr=8,Du=0,Lr=1,wu=2,me=3,Xn=258,Ge=Xn+me+1;function ci(t,e,n,r){const s=t[e*2],i=t[n*2];return s<i||s==i&&r[e]<=r[n]}function yu(){const t=this;let e,n,r,s,i,o,a,c,u,l,d,m,g,D,f,p,h,x,y,E,_,w,b,A,F,C,v,O,P,R,B,L,V;const j=new fe,re=new fe,U=new fe;t.depth=[];let ce,$,q,he,G,Z;t.bl_count=[],t.heap=[],B=[],L=[],V=[];function oe(){u=2*i,d[g-1]=0;for(let S=0;S<g-1;S++)d[S]=0;C=ot[v].max_lazy,P=ot[v].good_length,R=ot[v].nice_length,F=ot[v].max_chain,_=0,h=0,b=0,x=A=me-1,E=0,m=0}function W(){let S;for(S=0;S<vs;S++)B[S*2]=0;for(S=0;S<es;S++)L[S*2]=0;for(S=0;S<ts;S++)V[S*2]=0;B[hn*2]=1,t.opt_len=t.static_len=0,$=q=0}function ft(){j.dyn_tree=B,j.stat_desc=Ie.static_l_desc,re.dyn_tree=L,re.stat_desc=Ie.static_d_desc,U.dyn_tree=V,U.stat_desc=Ie.static_bl_desc,G=0,Z=0,he=8,W()}t.pqdownheap=function(S,I){const k=t.heap,M=k[I];let N=I<<1;for(;N<=t.heap_len&&(N<t.heap_len&&ci(S,k[N+1],k[N],t.depth)&&N++,!ci(S,M,k[N],t.depth));)k[I]=k[N],I=N,N<<=1;k[I]=M};function dt(S,I){let k=-1,M,N=S[1],Y=0,ne=7,Re=4;N===0&&(ne=138,Re=3),S[(I+1)*2+1]=65535;for(let it=0;it<=I;it++)M=N,N=S[(it+1)*2+1],!(++Y<ne&&M==N)&&(Y<Re?V[M*2]+=Y:M!==0?(M!=k&&V[M*2]++,V[ri*2]++):Y<=10?V[si*2]++:V[ii*2]++,Y=0,k=M,N===0?(ne=138,Re=3):M==N?(ne=6,Re=3):(ne=7,Re=4))}function jt(){let S;for(dt(B,j.max_code),dt(L,re.max_code),U.build_tree(t),S=ts-1;S>=3&&V[fe.bl_order[S]*2+1]===0;S--);return t.opt_len+=3*(S+1)+5+5+4,S}function Be(S){t.pending_buf[t.pending++]=S}function We(S){Be(S&255),Be(S>>>8&255)}function ze(S){Be(S>>8&255),Be(S&255&255)}function ge(S,I){let k;const M=I;Z>Br-M?(k=S,G|=k<<Z&65535,We(G),G=k>>>Br-Z,Z+=M-Br):(G|=S<<Z&65535,Z+=M)}function Ae(S,I){const k=S*2;ge(I[k]&65535,I[k+1]&65535)}function Ye(S,I){let k,M=-1,N,Y=S[1],ne=0,Re=7,it=4;for(Y===0&&(Re=138,it=3),k=0;k<=I;k++)if(N=Y,Y=S[(k+1)*2+1],!(++ne<Re&&N==Y)){if(ne<it)do Ae(N,V);while(--ne!==0);else N!==0?(N!=M&&(Ae(N,V),ne--),Ae(ri,V),ge(ne-3,2)):ne<=10?(Ae(si,V),ge(ne-3,3)):(Ae(ii,V),ge(ne-11,7));ne=0,M=N,Y===0?(Re=138,it=3):N==Y?(Re=6,it=3):(Re=7,it=4)}}function Ke(S,I,k){let M;for(ge(S-257,5),ge(I-1,5),ge(k-4,4),M=0;M<k;M++)ge(V[fe.bl_order[M]*2+1],3);Ye(B,S-1),Ye(L,I-1)}function pt(){Z==16?(We(G),G=0,Z=0):Z>=8&&(Be(G&255),G>>>=8,Z-=8)}function Je(){ge(Lr<<1,3),Ae(hn,Ie.static_ltree),pt(),1+he+10-Z<9&&(ge(Lr<<1,3),Ae(hn,Ie.static_ltree),pt()),he=7}function He(S,I){let k,M,N;if(t.dist_buf[$]=S,t.lc_buf[$]=I&255,$++,S===0?B[I*2]++:(q++,S--,B[(fe._length_code[I]+tr+1)*2]++,L[fe.d_code(S)*2]++),($&8191)===0&&v>2){for(k=$*8,M=_-h,N=0;N<es;N++)k+=L[N*2]*(5+fe.extra_dbits[N]);if(k>>>=3,q<Math.floor($/2)&&k<Math.floor(M/2))return!0}return $==ce-1}function kt(S,I){let k,M,N=0,Y,ne;if($!==0)do k=t.dist_buf[N],M=t.lc_buf[N],N++,k===0?Ae(M,S):(Y=fe._length_code[M],Ae(Y+tr+1,S),ne=fe.extra_lbits[Y],ne!==0&&(M-=fe.base_length[Y],ge(M,ne)),k--,Y=fe.d_code(k),Ae(Y,I),ne=fe.extra_dbits[Y],ne!==0&&(k-=fe.base_dist[Y],ge(k,ne)));while(N<$);Ae(hn,S),he=S[hn*2+1]}function Mn(){Z>8?We(G):Z>0&&Be(G&255),G=0,Z=0}function Cr(S,I,k){Mn(),he=8,We(I),We(~I),t.pending_buf.set(c.subarray(S,S+I),t.pending),t.pending+=I}function Bn(S,I,k){ge((Du<<1)+(k?1:0),3),Cr(S,I)}function Fr(S,I,k){let M,N,Y=0;v>0?(j.build_tree(t),re.build_tree(t),Y=jt(),M=t.opt_len+3+7>>>3,N=t.static_len+3+7>>>3,N<=M&&(M=N)):M=N=I+5,I+4<=M&&S!=-1?Bn(S,I,k):N==M?(ge((Lr<<1)+(k?1:0),3),kt(Ie.static_ltree,Ie.static_dtree)):(ge((wu<<1)+(k?1:0),3),Ke(j.max_code+1,re.max_code+1,Y+1),kt(B,L)),W(),k&&Mn()}function Oe(S){Fr(h>=0?h:-1,_-h,S),h=_,e.flush_pending()}function Sr(){let S,I,k,M;do{if(M=u-b-_,M===0&&_===0&&b===0)M=i;else if(M==-1)M--;else if(_>=i+i-Ge){c.set(c.subarray(i,i+i),0),w-=i,_-=i,h-=i,S=g,k=S;do I=d[--k]&65535,d[k]=I>=i?I-i:0;while(--S!==0);S=i,k=S;do I=l[--k]&65535,l[k]=I>=i?I-i:0;while(--S!==0);M+=i}if(e.avail_in===0)return;S=e.read_buf(c,_+b,M),b+=S,b>=me&&(m=c[_]&255,m=(m<<p^c[_+1]&255)&f)}while(b<Ge&&e.avail_in!==0)}function Ac(S){let I=65535,k;for(I>r-5&&(I=r-5);;){if(b<=1){if(Sr(),b===0&&S==tn)return Qe;if(b===0)break}if(_+=b,b=0,k=h+I,(_===0||_>=k)&&(b=_-k,_=k,Oe(!1),e.avail_out===0)||_-h>=i-Ge&&(Oe(!1),e.avail_out===0))return Qe}return Oe(S==Ue),e.avail_out===0?S==Ue?mn:Qe:S==Ue?$n:Nn}function Gs(S){let I=F,k=_,M,N,Y=A;const ne=_>i-Ge?_-(i-Ge):0;let Re=R;const it=a,Tr=_+Xn;let Zs=c[k+Y-1],Xs=c[k+Y];A>=P&&(I>>=2),Re>b&&(Re=b);do if(M=S,!(c[M+Y]!=Xs||c[M+Y-1]!=Zs||c[M]!=c[k]||c[++M]!=c[k+1])){k+=2,M++;do;while(c[++k]==c[++M]&&c[++k]==c[++M]&&c[++k]==c[++M]&&c[++k]==c[++M]&&c[++k]==c[++M]&&c[++k]==c[++M]&&c[++k]==c[++M]&&c[++k]==c[++M]&&k<Tr);if(N=Xn-(Tr-k),k=Tr-Xn,N>Y){if(w=S,Y=N,N>=Re)break;Zs=c[k+Y-1],Xs=c[k+Y]}}while((S=l[S&it]&65535)>ne&&--I!==0);return Y<=b?Y:b}function Ec(S){let I=0,k;for(;;){if(b<Ge){if(Sr(),b<Ge&&S==tn)return Qe;if(b===0)break}if(b>=me&&(m=(m<<p^c[_+(me-1)]&255)&f,I=d[m]&65535,l[_&a]=d[m],d[m]=_),I!==0&&(_-I&65535)<=i-Ge&&O!=On&&(x=Gs(I)),x>=me)if(k=He(_-w,x-me),b-=x,x<=C&&b>=me){x--;do _++,m=(m<<p^c[_+(me-1)]&255)&f,I=d[m]&65535,l[_&a]=d[m],d[m]=_;while(--x!==0);_++}else _+=x,x=0,m=c[_]&255,m=(m<<p^c[_+1]&255)&f;else k=He(0,c[_]&255),b--,_++;if(k&&(Oe(!1),e.avail_out===0))return Qe}return Oe(S==Ue),e.avail_out===0?S==Ue?mn:Qe:S==Ue?$n:Nn}function vc(S){let I=0,k,M;for(;;){if(b<Ge){if(Sr(),b<Ge&&S==tn)return Qe;if(b===0)break}if(b>=me&&(m=(m<<p^c[_+(me-1)]&255)&f,I=d[m]&65535,l[_&a]=d[m],d[m]=_),A=x,y=w,x=me-1,I!==0&&A<C&&(_-I&65535)<=i-Ge&&(O!=On&&(x=Gs(I)),x<=5&&(O==au||x==me&&_-w>4096)&&(x=me-1)),A>=me&&x<=A){M=_+b-me,k=He(_-1-y,A-me),b-=A-1,A-=2;do++_<=M&&(m=(m<<p^c[_+(me-1)]&255)&f,I=d[m]&65535,l[_&a]=d[m],d[m]=_);while(--A!==0);if(E=0,x=me-1,_++,k&&(Oe(!1),e.avail_out===0))return Qe}else if(E!==0){if(k=He(0,c[_-1]&255),k&&Oe(!1),_++,b--,e.avail_out===0)return Qe}else E=1,_++,b--}return E!==0&&(k=He(0,c[_-1]&255),E=0),Oe(S==Ue),e.avail_out===0?S==Ue?mn:Qe:S==Ue?$n:Nn}function Cc(S){return S.total_in=S.total_out=0,S.msg=null,t.pending=0,t.pending_out=0,n=Un,s=tn,ft(),oe(),ct}t.deflateInit=function(S,I,k,M,N,Y){return M||(M=Rr),N||(N=xu),Y||(Y=cu),S.msg=null,I==nr&&(I=6),N<1||N>mu||M!=Rr||k<9||k>15||I<0||I>9||Y<0||Y>On?ut:(S.dstate=t,o=k,i=1<<o,a=i-1,D=N+7,g=1<<D,f=g-1,p=Math.floor((D+me-1)/me),c=new Uint8Array(i*2),l=[],d=[],ce=1<<N+6,t.pending_buf=new Uint8Array(ce*4),r=ce*4,t.dist_buf=new Uint16Array(ce),t.lc_buf=new Uint8Array(ce),v=I,O=Y,Cc(S))},t.deflateEnd=function(){return n!=Or&&n!=Un&&n!=xn?ut:(t.lc_buf=null,t.dist_buf=null,t.pending_buf=null,d=null,l=null,c=null,t.dstate=null,n==Un?lu:ct)},t.deflateParams=function(S,I,k){let M=ct;return I==nr&&(I=6),I<0||I>9||k<0||k>On?ut:(ot[v].func!=ot[I].func&&S.total_in!==0&&(M=S.deflate(oi)),v!=I&&(v=I,C=ot[v].max_lazy,P=ot[v].good_length,R=ot[v].nice_length,F=ot[v].max_chain),O=k,M)},t.deflateSetDictionary=function(S,I,k){let M=k,N,Y=0;if(!I||n!=Or)return ut;if(M<me)return ct;for(M>i-Ge&&(M=i-Ge,Y=k-M),c.set(I.subarray(Y,Y+M),0),_=M,h=M,m=c[0]&255,m=(m<<p^c[1]&255)&f,N=0;N<=M-me;N++)m=(m<<p^c[N+(me-1)]&255)&f,l[N&a]=d[m],d[m]=N;return ct},t.deflate=function(S,I){let k,M,N,Y,ne;if(I>Ue||I<0)return ut;if(!S.next_out||!S.next_in&&S.avail_in!==0||n==xn&&I!=Ue)return S.msg=Ln[Rn-ut],ut;if(S.avail_out===0)return S.msg=Ln[Rn-Qt],Qt;if(e=S,Y=s,s=I,n==Or&&(M=Rr+(o-8<<4)<<8,N=(v-1&255)>>1,N>3&&(N=3),M|=N<<6,_!==0&&(M|=gu),M+=31-M%31,n=Un,ze(M)),t.pending!==0){if(e.flush_pending(),e.avail_out===0)return s=-1,ct}else if(e.avail_in===0&&I<=Y&&I!=Ue)return e.msg=Ln[Rn-Qt],Qt;if(n==xn&&e.avail_in!==0)return S.msg=Ln[Rn-Qt],Qt;if(e.avail_in!==0||b!==0||I!=tn&&n!=xn){switch(ne=-1,ot[v].func){case vo:ne=Ac(I);break;case Zn:ne=Ec(I);break;case Ht:ne=vc(I);break}if((ne==mn||ne==$n)&&(n=xn),ne==Qe||ne==mn)return e.avail_out===0&&(s=-1),ct;if(ne==Nn){if(I==oi)Je();else if(Bn(0,0,!1),I==uu)for(k=0;k<g;k++)d[k]=0;if(e.flush_pending(),e.avail_out===0)return s=-1,ct}}return I!=Ue?ct:Eo}}function Co(){const t=this;t.next_in_index=0,t.next_out_index=0,t.avail_in=0,t.total_in=0,t.avail_out=0,t.total_out=0}Co.prototype={deflateInit(t,e){const n=this;return n.dstate=new yu,e||(e=vn),n.dstate.deflateInit(n,t,e)},deflate(t){const e=this;return e.dstate?e.dstate.deflate(e,t):ut},deflateEnd(){const t=this;if(!t.dstate)return ut;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):ut},deflateSetDictionary(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):ut},read_buf(t,e,n){const r=this;let s=r.avail_in;return s>n&&(s=n),s===0?0:(r.avail_in-=s,t.set(r.next_in.subarray(r.next_in_index,r.next_in_index+s),e),r.next_in_index+=s,r.total_in+=s,s)},flush_pending(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),e!==0&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,t.dstate.pending===0&&(t.dstate.pending_out=0))}};function _u(t){const e=this,n=new Co,r=bu(t&&t.chunkSize?t.chunkSize:64*1024),s=tn,i=new Uint8Array(r);let o=t?t.level:nr;typeof o>"u"&&(o=nr),n.deflateInit(o),n.next_out=i,e.append=function(a,c){let u,l,d=0,m=0,g=0;const D=[];if(a.length){n.next_in_index=0,n.next_in=a,n.avail_in=a.length;do{if(n.next_out_index=0,n.avail_out=r,u=n.deflate(s),u!=ct)throw new Error("deflating: "+n.msg);n.next_out_index&&(n.next_out_index==r?D.push(new Uint8Array(i)):D.push(i.subarray(0,n.next_out_index))),g+=n.next_out_index,c&&n.next_in_index>0&&n.next_in_index!=d&&(c(n.next_in_index),d=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return D.length>1?(l=new Uint8Array(g),D.forEach(function(f){l.set(f,m),m+=f.length})):l=D[0]?new Uint8Array(D[0]):new Uint8Array,l}},e.flush=function(){let a,c,u=0,l=0;const d=[];do{if(n.next_out_index=0,n.avail_out=r,a=n.deflate(Ue),a!=Eo&&a!=ct)throw new Error("deflating: "+n.msg);r-n.avail_out>0&&d.push(i.slice(0,n.next_out_index)),l+=n.next_out_index}while(n.avail_in>0||n.avail_out===0);return n.deflateEnd(),c=new Uint8Array(l),d.forEach(function(m){c.set(m,u),u+=m.length}),c}}function bu(t){return t+5*(Math.floor(t/16383)+1)}const Au=15,ie=0,vt=1,Eu=2,je=-2,pe=-3,ui=-4,Ct=-5,Xe=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Fo=1440,vu=0,Cu=4,Fu=9,Su=5,Tu=[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],ku=[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],Pu=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Iu=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Mu=[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],Bu=[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],Pt=15;function ns(){const t=this;let e,n,r,s,i,o;function a(u,l,d,m,g,D,f,p,h,x,y){let E,_,w,b,A,F,C,v,O,P,R,B,L,V,j;P=0,A=d;do r[u[l+P]]++,P++,A--;while(A!==0);if(r[0]==d)return f[0]=-1,p[0]=0,ie;for(v=p[0],F=1;F<=Pt&&r[F]===0;F++);for(C=F,v<F&&(v=F),A=Pt;A!==0&&r[A]===0;A--);for(w=A,v>A&&(v=A),p[0]=v,V=1<<F;F<A;F++,V<<=1)if((V-=r[F])<0)return pe;if((V-=r[A])<0)return pe;for(r[A]+=V,o[1]=F=0,P=1,L=2;--A!==0;)o[L]=F+=r[P],L++,P++;A=0,P=0;do(F=u[l+P])!==0&&(y[o[F]++]=A),P++;while(++A<d);for(d=o[w],o[0]=A=0,P=0,b=-1,B=-v,i[0]=0,R=0,j=0;C<=w;C++)for(E=r[C];E--!==0;){for(;C>B+v;){if(b++,B+=v,j=w-B,j=j>v?v:j,(_=1<<(F=C-B))>E+1&&(_-=E+1,L=C,F<j))for(;++F<j&&!((_<<=1)<=r[++L]);)_-=r[L];if(j=1<<F,x[0]+j>Fo)return pe;i[b]=R=x[0],x[0]+=j,b!==0?(o[b]=A,s[0]=F,s[1]=v,F=A>>>B-v,s[2]=R-i[b-1]-F,h.set(s,(i[b-1]+F)*3)):f[0]=R}for(s[1]=C-B,P>=d?s[0]=192:y[P]<m?(s[0]=y[P]<256?0:96,s[2]=y[P++]):(s[0]=D[y[P]-m]+16+64,s[2]=g[y[P++]-m]),_=1<<C-B,F=A>>>B;F<j;F+=_)h.set(s,(R+F)*3);for(F=1<<C-1;(A&F)!==0;F>>>=1)A^=F;for(A^=F,O=(1<<B)-1;(A&O)!=o[b];)b--,B-=v,O=(1<<B)-1}return V!==0&&w!=1?Ct:ie}function c(u){let l;for(e||(e=[],n=[],r=new Int32Array(Pt+1),s=[],i=new Int32Array(Pt),o=new Int32Array(Pt+1)),n.length<u&&(n=[]),l=0;l<u;l++)n[l]=0;for(l=0;l<Pt+1;l++)r[l]=0;for(l=0;l<3;l++)s[l]=0;i.set(r.subarray(0,Pt),0),o.set(r.subarray(0,Pt+1),0)}t.inflate_trees_bits=function(u,l,d,m,g){let D;return c(19),e[0]=0,D=a(u,0,19,19,null,null,d,l,m,e,n),D==pe?g.msg="oversubscribed dynamic bit lengths tree":(D==Ct||l[0]===0)&&(g.msg="incomplete dynamic bit lengths tree",D=pe),D},t.inflate_trees_dynamic=function(u,l,d,m,g,D,f,p,h){let x;return c(288),e[0]=0,x=a(d,0,u,257,Pu,Iu,D,m,p,e,n),x!=ie||m[0]===0?(x==pe?h.msg="oversubscribed literal/length tree":x!=ui&&(h.msg="incomplete literal/length tree",x=pe),x):(c(288),x=a(d,u,l,0,Mu,Bu,f,g,p,e,n),x!=ie||g[0]===0&&u>257?(x==pe?h.msg="oversubscribed distance tree":x==Ct?(h.msg="incomplete distance tree",x=pe):x!=ui&&(h.msg="empty distance tree with lengths",x=pe),x):ie)}}ns.inflate_trees_fixed=function(t,e,n,r){return t[0]=Fu,e[0]=Su,n[0]=Tu,r[0]=ku,ie};const Vn=0,li=1,fi=2,di=3,pi=4,hi=5,mi=6,Nr=7,xi=8,jn=9;function Ou(){const t=this;let e,n=0,r,s=0,i=0,o=0,a=0,c=0,u=0,l=0,d,m=0,g,D=0;function f(p,h,x,y,E,_,w,b){let A,F,C,v,O,P,R,B,L,V,j,re,U,ce,$,q;R=b.next_in_index,B=b.avail_in,O=w.bitb,P=w.bitk,L=w.write,V=L<w.read?w.read-L-1:w.end-L,j=Xe[p],re=Xe[h];do{for(;P<20;)B--,O|=(b.read_byte(R++)&255)<<P,P+=8;if(A=O&j,F=x,C=y,q=(C+A)*3,(v=F[q])===0){O>>=F[q+1],P-=F[q+1],w.win[L++]=F[q+2],V--;continue}do{if(O>>=F[q+1],P-=F[q+1],(v&16)!==0){for(v&=15,U=F[q+2]+(O&Xe[v]),O>>=v,P-=v;P<15;)B--,O|=(b.read_byte(R++)&255)<<P,P+=8;A=O&re,F=E,C=_,q=(C+A)*3,v=F[q];do if(O>>=F[q+1],P-=F[q+1],(v&16)!==0){for(v&=15;P<v;)B--,O|=(b.read_byte(R++)&255)<<P,P+=8;if(ce=F[q+2]+(O&Xe[v]),O>>=v,P-=v,V-=U,L>=ce)$=L-ce,L-$>0&&2>L-$?(w.win[L++]=w.win[$++],w.win[L++]=w.win[$++],U-=2):(w.win.set(w.win.subarray($,$+2),L),L+=2,$+=2,U-=2);else{$=L-ce;do $+=w.end;while($<0);if(v=w.end-$,U>v){if(U-=v,L-$>0&&v>L-$)do w.win[L++]=w.win[$++];while(--v!==0);else w.win.set(w.win.subarray($,$+v),L),L+=v,$+=v,v=0;$=0}}if(L-$>0&&U>L-$)do w.win[L++]=w.win[$++];while(--U!==0);else w.win.set(w.win.subarray($,$+U),L),L+=U,$+=U,U=0;break}else if((v&64)===0)A+=F[q+2],A+=O&Xe[v],q=(C+A)*3,v=F[q];else return b.msg="invalid distance code",U=b.avail_in-B,U=P>>3<U?P>>3:U,B+=U,R-=U,P-=U<<3,w.bitb=O,w.bitk=P,b.avail_in=B,b.total_in+=R-b.next_in_index,b.next_in_index=R,w.write=L,pe;while(!0);break}if((v&64)===0){if(A+=F[q+2],A+=O&Xe[v],q=(C+A)*3,(v=F[q])===0){O>>=F[q+1],P-=F[q+1],w.win[L++]=F[q+2],V--;break}}else return(v&32)!==0?(U=b.avail_in-B,U=P>>3<U?P>>3:U,B+=U,R-=U,P-=U<<3,w.bitb=O,w.bitk=P,b.avail_in=B,b.total_in+=R-b.next_in_index,b.next_in_index=R,w.write=L,vt):(b.msg="invalid literal/length code",U=b.avail_in-B,U=P>>3<U?P>>3:U,B+=U,R-=U,P-=U<<3,w.bitb=O,w.bitk=P,b.avail_in=B,b.total_in+=R-b.next_in_index,b.next_in_index=R,w.write=L,pe)}while(!0)}while(V>=258&&B>=10);return U=b.avail_in-B,U=P>>3<U?P>>3:U,B+=U,R-=U,P-=U<<3,w.bitb=O,w.bitk=P,b.avail_in=B,b.total_in+=R-b.next_in_index,b.next_in_index=R,w.write=L,ie}t.init=function(p,h,x,y,E,_){e=Vn,u=p,l=h,d=x,m=y,g=E,D=_,r=null},t.proc=function(p,h,x){let y,E,_,w=0,b=0,A=0,F,C,v,O;for(A=h.next_in_index,F=h.avail_in,w=p.bitb,b=p.bitk,C=p.write,v=C<p.read?p.read-C-1:p.end-C;;)switch(e){case Vn:if(v>=258&&F>=10&&(p.bitb=w,p.bitk=b,h.avail_in=F,h.total_in+=A-h.next_in_index,h.next_in_index=A,p.write=C,x=f(u,l,d,m,g,D,p,h),A=h.next_in_index,F=h.avail_in,w=p.bitb,b=p.bitk,C=p.write,v=C<p.read?p.read-C-1:p.end-C,x!=ie)){e=x==vt?Nr:jn;break}i=u,r=d,s=m,e=li;case li:for(y=i;b<y;){if(F!==0)x=ie;else return p.bitb=w,p.bitk=b,h.avail_in=F,h.total_in+=A-h.next_in_index,h.next_in_index=A,p.write=C,p.inflate_flush(h,x);F--,w|=(h.read_byte(A++)&255)<<b,b+=8}if(E=(s+(w&Xe[y]))*3,w>>>=r[E+1],b-=r[E+1],_=r[E],_===0){o=r[E+2],e=mi;break}if((_&16)!==0){a=_&15,n=r[E+2],e=fi;break}if((_&64)===0){i=_,s=E/3+r[E+2];break}if((_&32)!==0){e=Nr;break}return e=jn,h.msg="invalid literal/length code",x=pe,p.bitb=w,p.bitk=b,h.avail_in=F,h.total_in+=A-h.next_in_index,h.next_in_index=A,p.write=C,p.inflate_flush(h,x);case fi:for(y=a;b<y;){if(F!==0)x=ie;else return p.bitb=w,p.bitk=b,h.avail_in=F,h.total_in+=A-h.next_in_index,h.next_in_index=A,p.write=C,p.inflate_flush(h,x);F--,w|=(h.read_byte(A++)&255)<<b,b+=8}n+=w&Xe[y],w>>=y,b-=y,i=l,r=g,s=D,e=di;case di:for(y=i;b<y;){if(F!==0)x=ie;else return p.bitb=w,p.bitk=b,h.avail_in=F,h.total_in+=A-h.next_in_index,h.next_in_index=A,p.write=C,p.inflate_flush(h,x);F--,w|=(h.read_byte(A++)&255)<<b,b+=8}if(E=(s+(w&Xe[y]))*3,w>>=r[E+1],b-=r[E+1],_=r[E],(_&16)!==0){a=_&15,c=r[E+2],e=pi;break}if((_&64)===0){i=_,s=E/3+r[E+2];break}return e=jn,h.msg="invalid distance code",x=pe,p.bitb=w,p.bitk=b,h.avail_in=F,h.total_in+=A-h.next_in_index,h.next_in_index=A,p.write=C,p.inflate_flush(h,x);case pi:for(y=a;b<y;){if(F!==0)x=ie;else return p.bitb=w,p.bitk=b,h.avail_in=F,h.total_in+=A-h.next_in_index,h.next_in_index=A,p.write=C,p.inflate_flush(h,x);F--,w|=(h.read_byte(A++)&255)<<b,b+=8}c+=w&Xe[y],w>>=y,b-=y,e=hi;case hi:for(O=C-c;O<0;)O+=p.end;for(;n!==0;){if(v===0&&(C==p.end&&p.read!==0&&(C=0,v=C<p.read?p.read-C-1:p.end-C),v===0&&(p.write=C,x=p.inflate_flush(h,x),C=p.write,v=C<p.read?p.read-C-1:p.end-C,C==p.end&&p.read!==0&&(C=0,v=C<p.read?p.read-C-1:p.end-C),v===0)))return p.bitb=w,p.bitk=b,h.avail_in=F,h.total_in+=A-h.next_in_index,h.next_in_index=A,p.write=C,p.inflate_flush(h,x);p.win[C++]=p.win[O++],v--,O==p.end&&(O=0),n--}e=Vn;break;case mi:if(v===0&&(C==p.end&&p.read!==0&&(C=0,v=C<p.read?p.read-C-1:p.end-C),v===0&&(p.write=C,x=p.inflate_flush(h,x),C=p.write,v=C<p.read?p.read-C-1:p.end-C,C==p.end&&p.read!==0&&(C=0,v=C<p.read?p.read-C-1:p.end-C),v===0)))return p.bitb=w,p.bitk=b,h.avail_in=F,h.total_in+=A-h.next_in_index,h.next_in_index=A,p.write=C,p.inflate_flush(h,x);x=ie,p.win[C++]=o,v--,e=Vn;break;case Nr:if(b>7&&(b-=8,F++,A--),p.write=C,x=p.inflate_flush(h,x),C=p.write,v=C<p.read?p.read-C-1:p.end-C,p.read!=p.write)return p.bitb=w,p.bitk=b,h.avail_in=F,h.total_in+=A-h.next_in_index,h.next_in_index=A,p.write=C,p.inflate_flush(h,x);e=xi;case xi:return x=vt,p.bitb=w,p.bitk=b,h.avail_in=F,h.total_in+=A-h.next_in_index,h.next_in_index=A,p.write=C,p.inflate_flush(h,x);case jn:return x=pe,p.bitb=w,p.bitk=b,h.avail_in=F,h.total_in+=A-h.next_in_index,h.next_in_index=A,p.write=C,p.inflate_flush(h,x);default:return x=je,p.bitb=w,p.bitk=b,h.avail_in=F,h.total_in+=A-h.next_in_index,h.next_in_index=A,p.write=C,p.inflate_flush(h,x)}},t.free=function(){}}const gi=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],en=0,$r=1,Di=2,wi=3,yi=4,_i=5,qn=6,Wn=7,bi=8,qt=9;function Ru(t,e){const n=this;let r=en,s=0,i=0,o=0,a;const c=[0],u=[0],l=new Ou;let d=0,m=new Int32Array(Fo*3);const g=0,D=new ns;n.bitk=0,n.bitb=0,n.win=new Uint8Array(e),n.end=e,n.read=0,n.write=0,n.reset=function(f,p){p&&(p[0]=g),r==qn&&l.free(f),r=en,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(t,null),n.inflate_flush=function(f,p){let h,x,y;return x=f.next_out_index,y=n.read,h=(y<=n.write?n.write:n.end)-y,h>f.avail_out&&(h=f.avail_out),h!==0&&p==Ct&&(p=ie),f.avail_out-=h,f.total_out+=h,f.next_out.set(n.win.subarray(y,y+h),x),x+=h,y+=h,y==n.end&&(y=0,n.write==n.end&&(n.write=0),h=n.write-y,h>f.avail_out&&(h=f.avail_out),h!==0&&p==Ct&&(p=ie),f.avail_out-=h,f.total_out+=h,f.next_out.set(n.win.subarray(y,y+h),x),x+=h,y+=h),f.next_out_index=x,n.read=y,p},n.proc=function(f,p){let h,x,y,E,_,w,b,A;for(E=f.next_in_index,_=f.avail_in,x=n.bitb,y=n.bitk,w=n.write,b=w<n.read?n.read-w-1:n.end-w;;){let F,C,v,O,P,R,B,L;switch(r){case en:for(;y<3;){if(_!==0)p=ie;else return n.bitb=x,n.bitk=y,f.avail_in=_,f.total_in+=E-f.next_in_index,f.next_in_index=E,n.write=w,n.inflate_flush(f,p);_--,x|=(f.read_byte(E++)&255)<<y,y+=8}switch(h=x&7,d=h&1,h>>>1){case 0:x>>>=3,y-=3,h=y&7,x>>>=h,y-=h,r=$r;break;case 1:F=[],C=[],v=[[]],O=[[]],ns.inflate_trees_fixed(F,C,v,O),l.init(F[0],C[0],v[0],0,O[0],0),x>>>=3,y-=3,r=qn;break;case 2:x>>>=3,y-=3,r=wi;break;case 3:return x>>>=3,y-=3,r=qt,f.msg="invalid block type",p=pe,n.bitb=x,n.bitk=y,f.avail_in=_,f.total_in+=E-f.next_in_index,f.next_in_index=E,n.write=w,n.inflate_flush(f,p)}break;case $r:for(;y<32;){if(_!==0)p=ie;else return n.bitb=x,n.bitk=y,f.avail_in=_,f.total_in+=E-f.next_in_index,f.next_in_index=E,n.write=w,n.inflate_flush(f,p);_--,x|=(f.read_byte(E++)&255)<<y,y+=8}if((~x>>>16&65535)!=(x&65535))return r=qt,f.msg="invalid stored block lengths",p=pe,n.bitb=x,n.bitk=y,f.avail_in=_,f.total_in+=E-f.next_in_index,f.next_in_index=E,n.write=w,n.inflate_flush(f,p);s=x&65535,x=y=0,r=s!==0?Di:d!==0?Wn:en;break;case Di:if(_===0||b===0&&(w==n.end&&n.read!==0&&(w=0,b=w<n.read?n.read-w-1:n.end-w),b===0&&(n.write=w,p=n.inflate_flush(f,p),w=n.write,b=w<n.read?n.read-w-1:n.end-w,w==n.end&&n.read!==0&&(w=0,b=w<n.read?n.read-w-1:n.end-w),b===0)))return n.bitb=x,n.bitk=y,f.avail_in=_,f.total_in+=E-f.next_in_index,f.next_in_index=E,n.write=w,n.inflate_flush(f,p);if(p=ie,h=s,h>_&&(h=_),h>b&&(h=b),n.win.set(f.read_buf(E,h),w),E+=h,_-=h,w+=h,b-=h,(s-=h)!==0)break;r=d!==0?Wn:en;break;case wi:for(;y<14;){if(_!==0)p=ie;else return n.bitb=x,n.bitk=y,f.avail_in=_,f.total_in+=E-f.next_in_index,f.next_in_index=E,n.write=w,n.inflate_flush(f,p);_--,x|=(f.read_byte(E++)&255)<<y,y+=8}if(i=h=x&16383,(h&31)>29||(h>>5&31)>29)return r=qt,f.msg="too many length or distance symbols",p=pe,n.bitb=x,n.bitk=y,f.avail_in=_,f.total_in+=E-f.next_in_index,f.next_in_index=E,n.write=w,n.inflate_flush(f,p);if(h=258+(h&31)+(h>>5&31),!a||a.length<h)a=[];else for(A=0;A<h;A++)a[A]=0;x>>>=14,y-=14,o=0,r=yi;case yi:for(;o<4+(i>>>10);){for(;y<3;){if(_!==0)p=ie;else return n.bitb=x,n.bitk=y,f.avail_in=_,f.total_in+=E-f.next_in_index,f.next_in_index=E,n.write=w,n.inflate_flush(f,p);_--,x|=(f.read_byte(E++)&255)<<y,y+=8}a[gi[o++]]=x&7,x>>>=3,y-=3}for(;o<19;)a[gi[o++]]=0;if(c[0]=7,h=D.inflate_trees_bits(a,c,u,m,f),h!=ie)return p=h,p==pe&&(a=null,r=qt),n.bitb=x,n.bitk=y,f.avail_in=_,f.total_in+=E-f.next_in_index,f.next_in_index=E,n.write=w,n.inflate_flush(f,p);o=0,r=_i;case _i:for(;h=i,!(o>=258+(h&31)+(h>>5&31));){let V,j;for(h=c[0];y<h;){if(_!==0)p=ie;else return n.bitb=x,n.bitk=y,f.avail_in=_,f.total_in+=E-f.next_in_index,f.next_in_index=E,n.write=w,n.inflate_flush(f,p);_--,x|=(f.read_byte(E++)&255)<<y,y+=8}if(h=m[(u[0]+(x&Xe[h]))*3+1],j=m[(u[0]+(x&Xe[h]))*3+2],j<16)x>>>=h,y-=h,a[o++]=j;else{for(A=j==18?7:j-14,V=j==18?11:3;y<h+A;){if(_!==0)p=ie;else return n.bitb=x,n.bitk=y,f.avail_in=_,f.total_in+=E-f.next_in_index,f.next_in_index=E,n.write=w,n.inflate_flush(f,p);_--,x|=(f.read_byte(E++)&255)<<y,y+=8}if(x>>>=h,y-=h,V+=x&Xe[A],x>>>=A,y-=A,A=o,h=i,A+V>258+(h&31)+(h>>5&31)||j==16&&A<1)return a=null,r=qt,f.msg="invalid bit length repeat",p=pe,n.bitb=x,n.bitk=y,f.avail_in=_,f.total_in+=E-f.next_in_index,f.next_in_index=E,n.write=w,n.inflate_flush(f,p);j=j==16?a[A-1]:0;do a[A++]=j;while(--V!==0);o=A}}if(u[0]=-1,P=[],R=[],B=[],L=[],P[0]=9,R[0]=6,h=i,h=D.inflate_trees_dynamic(257+(h&31),1+(h>>5&31),a,P,R,B,L,m,f),h!=ie)return h==pe&&(a=null,r=qt),p=h,n.bitb=x,n.bitk=y,f.avail_in=_,f.total_in+=E-f.next_in_index,f.next_in_index=E,n.write=w,n.inflate_flush(f,p);l.init(P[0],R[0],m,B[0],m,L[0]),r=qn;case qn:if(n.bitb=x,n.bitk=y,f.avail_in=_,f.total_in+=E-f.next_in_index,f.next_in_index=E,n.write=w,(p=l.proc(n,f,p))!=vt)return n.inflate_flush(f,p);if(p=ie,l.free(f),E=f.next_in_index,_=f.avail_in,x=n.bitb,y=n.bitk,w=n.write,b=w<n.read?n.read-w-1:n.end-w,d===0){r=en;break}r=Wn;case Wn:if(n.write=w,p=n.inflate_flush(f,p),w=n.write,b=w<n.read?n.read-w-1:n.end-w,n.read!=n.write)return n.bitb=x,n.bitk=y,f.avail_in=_,f.total_in+=E-f.next_in_index,f.next_in_index=E,n.write=w,n.inflate_flush(f,p);r=bi;case bi:return p=vt,n.bitb=x,n.bitk=y,f.avail_in=_,f.total_in+=E-f.next_in_index,f.next_in_index=E,n.write=w,n.inflate_flush(f,p);case qt:return p=pe,n.bitb=x,n.bitk=y,f.avail_in=_,f.total_in+=E-f.next_in_index,f.next_in_index=E,n.write=w,n.inflate_flush(f,p);default:return p=je,n.bitb=x,n.bitk=y,f.avail_in=_,f.total_in+=E-f.next_in_index,f.next_in_index=E,n.write=w,n.inflate_flush(f,p)}}},n.free=function(f){n.reset(f,null),n.win=null,m=null},n.set_dictionary=function(f,p,h){n.win.set(f.subarray(p,p+h),0),n.read=n.write=h},n.sync_point=function(){return r==$r?1:0}}const Lu=32,Nu=8,$u=0,Ai=1,Ei=2,vi=3,Ci=4,Fi=5,Ur=6,gn=7,Si=12,It=13,Uu=[0,0,255,255];function Vu(){const t=this;t.mode=0,t.method=0,t.was=[0],t.need=0,t.marker=0,t.wbits=0;function e(n){return!n||!n.istate?je:(n.total_in=n.total_out=0,n.msg=null,n.istate.mode=gn,n.istate.blocks.reset(n,null),ie)}t.inflateEnd=function(n){return t.blocks&&t.blocks.free(n),t.blocks=null,ie},t.inflateInit=function(n,r){return n.msg=null,t.blocks=null,r<8||r>15?(t.inflateEnd(n),je):(t.wbits=r,n.istate.blocks=new Ru(n,1<<r),e(n),ie)},t.inflate=function(n,r){let s,i;if(!n||!n.istate||!n.next_in)return je;const o=n.istate;for(r=r==Cu?Ct:ie,s=Ct;;)switch(o.mode){case $u:if(n.avail_in===0)return s;if(s=r,n.avail_in--,n.total_in++,((o.method=n.read_byte(n.next_in_index++))&15)!=Nu){o.mode=It,n.msg="unknown compression method",o.marker=5;break}if((o.method>>4)+8>o.wbits){o.mode=It,n.msg="invalid win size",o.marker=5;break}o.mode=Ai;case Ai:if(n.avail_in===0)return s;if(s=r,n.avail_in--,n.total_in++,i=n.read_byte(n.next_in_index++)&255,((o.method<<8)+i)%31!==0){o.mode=It,n.msg="incorrect header check",o.marker=5;break}if((i&Lu)===0){o.mode=gn;break}o.mode=Ei;case Ei:if(n.avail_in===0)return s;s=r,n.avail_in--,n.total_in++,o.need=(n.read_byte(n.next_in_index++)&255)<<24&4278190080,o.mode=vi;case vi:if(n.avail_in===0)return s;s=r,n.avail_in--,n.total_in++,o.need+=(n.read_byte(n.next_in_index++)&255)<<16&16711680,o.mode=Ci;case Ci:if(n.avail_in===0)return s;s=r,n.avail_in--,n.total_in++,o.need+=(n.read_byte(n.next_in_index++)&255)<<8&65280,o.mode=Fi;case Fi:return n.avail_in===0?s:(s=r,n.avail_in--,n.total_in++,o.need+=n.read_byte(n.next_in_index++)&255,o.mode=Ur,Eu);case Ur:return o.mode=It,n.msg="need dictionary",o.marker=0,je;case gn:if(s=o.blocks.proc(n,s),s==pe){o.mode=It,o.marker=0;break}if(s==ie&&(s=r),s!=vt)return s;s=r,o.blocks.reset(n,o.was),o.mode=Si;case Si:return n.avail_in=0,vt;case It:return pe;default:return je}},t.inflateSetDictionary=function(n,r,s){let i=0,o=s;if(!n||!n.istate||n.istate.mode!=Ur)return je;const a=n.istate;return o>=1<<a.wbits&&(o=(1<<a.wbits)-1,i=s-o),a.blocks.set_dictionary(r,i,o),a.mode=gn,ie},t.inflateSync=function(n){let r,s,i,o,a;if(!n||!n.istate)return je;const c=n.istate;if(c.mode!=It&&(c.mode=It,c.marker=0),(r=n.avail_in)===0)return Ct;for(s=n.next_in_index,i=c.marker;r!==0&&i<4;)n.read_byte(s)==Uu[i]?i++:n.read_byte(s)!==0?i=0:i=4-i,s++,r--;return n.total_in+=s-n.next_in_index,n.next_in_index=s,n.avail_in=r,c.marker=i,i!=4?pe:(o=n.total_in,a=n.total_out,e(n),n.total_in=o,n.total_out=a,c.mode=gn,ie)},t.inflateSyncPoint=function(n){return!n||!n.istate||!n.istate.blocks?je:n.istate.blocks.sync_point()}}function So(){}So.prototype={inflateInit(t){const e=this;return e.istate=new Vu,t||(t=Au),e.istate.inflateInit(e,t)},inflate(t){const e=this;return e.istate?e.istate.inflate(e,t):je},inflateEnd(){const t=this;if(!t.istate)return je;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync(){const t=this;return t.istate?t.istate.inflateSync(t):je},inflateSetDictionary(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):je},read_byte(t){return this.next_in[t]},read_buf(t,e){return this.next_in.subarray(t,t+e)}};function ju(t){const e=this,n=new So,r=t&&t.chunkSize?Math.floor(t.chunkSize*2):128*1024,s=vu,i=new Uint8Array(r);let o=!1;n.inflateInit(),n.next_out=i,e.append=function(a,c){const u=[];let l,d,m=0,g=0,D=0;if(a.length!==0){n.next_in_index=0,n.next_in=a,n.avail_in=a.length;do{if(n.next_out_index=0,n.avail_out=r,n.avail_in===0&&!o&&(n.next_in_index=0,o=!0),l=n.inflate(s),o&&l===Ct){if(n.avail_in!==0)throw new Error("inflating: bad input")}else if(l!==ie&&l!==vt)throw new Error("inflating: "+n.msg);if((o||l===vt)&&n.avail_in===a.length)throw new Error("inflating: bad input");n.next_out_index&&(n.next_out_index===r?u.push(new Uint8Array(i)):u.push(i.subarray(0,n.next_out_index))),D+=n.next_out_index,c&&n.next_in_index>0&&n.next_in_index!=m&&(c(n.next_in_index),m=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return u.length>1?(d=new Uint8Array(D),u.forEach(function(f){d.set(f,g),g+=f.length})):d=u[0]?new Uint8Array(u[0]):new Uint8Array,d}},e.flush=function(){n.inflateEnd()}}const be=4294967295,ye=65535,Cs=8,qu=9,To=0,ko=99,Po=67324752,Fs=134695760,Io=Fs,rs=33639248,Mo=101010256,ss=101075792,Bo=117853008,bt=22,_n=20,bn=56,Wu=bt+_n+bn,Oo=12,Ro=20,rr=4,Lo=1,No=39169,$o=10,Uo=1,Ss=21589,Yu=28789,Hu=25461,Vo=6534,is=1,Gu=6,Zu=2,Xu=4,zu=6,os=8,as=2048,cs=16,Ku=61440,jo=16384,us=73,Vr=420,Ju=20,Ti=45,ki=51,An="/",Xt=30,Ts=10,un=14,ln=18,Pi=new Date(2107,11,31),Ii=new Date(1980,0,1),X=void 0,$t="undefined",Tn="function";class Mi{constructor(e){return class extends TransformStream{constructor(n,r){const s=new e(r);super({transform(i,o){o.enqueue(s.append(i))},flush(i){const o=s.flush();o&&i.enqueue(o)}})}}}}const Qu=64;let qo=2;try{typeof navigator!=$t&&navigator.hardwareConcurrency&&(qo=navigator.hardwareConcurrency)}catch{}const e0={chunkSize:512*1024,maxWorkers:qo,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:X,CompressionStreamNative:typeof CompressionStream!=$t&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=$t&&DecompressionStream},Rt=Object.assign({},e0);function Wo(){return Rt}function Yo(t){return Math.max(t.chunkSize,Qu)}function ks(t){const{baseURL:e,chunkSize:n,maxWorkers:r,terminateWorkerTimeout:s,useCompressionStream:i,useWebWorkers:o,Deflate:a,Inflate:c,CompressionStream:u,DecompressionStream:l,workerScripts:d}=t;if(Mt("baseURL",e),Mt("chunkSize",n),Mt("maxWorkers",r),Mt("terminateWorkerTimeout",s),Mt("useCompressionStream",i),Mt("useWebWorkers",o),a&&(Rt.CompressionStream=new Mi(a)),c&&(Rt.DecompressionStream=new Mi(c)),Mt("CompressionStream",u),Mt("DecompressionStream",l),d!==X){const{deflate:m,inflate:g}=d;if((m||g)&&(Rt.workerScripts||(Rt.workerScripts={})),m){if(!Array.isArray(m))throw new Error("workerScripts.deflate must be an array");Rt.workerScripts.deflate=m}if(g){if(!Array.isArray(g))throw new Error("workerScripts.inflate must be an array");Rt.workerScripts.inflate=g}}}function Mt(t,e){e!==X&&(Rt[t]=e)}const jr={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin","cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot","wiz"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf","xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd","xpdl"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot","ppa","pwz"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":["odm","otm"],"vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw","vsdx","vssx","vstx","vssm","vstm"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-director":["dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-latex":"latex","x-lyx":"lyx","x-lzx":"lzx","x-maker":["frm","fb","fbdoc"],"x-ms-wmd":"wmd","x-msdos-program":["com","exe","bat","dll"],"x-netcdf":["nc"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":["rpm","rpa"],"x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":["mathml","mml"],mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","application/x-ms-installer":"msi","x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-perfmon":["pma","pmc","pmr","pmw"],"ynd.ms-pkipko":"pko",gzip:["gz","tgz"],"smil+xml":["smi","smil"],"vnd.debian.binary-package":["deb","udeb"],"vnd.hzn-3d-crossword":"x3d","vnd.sqlite3":["db","sqlite","sqlite3","db-wal","sqlite-wal","db-shm","sqlite-shm"],"vnd.wap.sic":"sic","vnd.wap.slc":"slc","x-krita":["kra","krz"],"x-perl":["pm","pl"],yaml:["yaml","yml"]},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":"aifc","x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",aac:"aac",aiff:["aiff","aif","aff"],opus:"opus",wav:"wav"},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":"mmod","x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":"sd","x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":"val","x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},font:{otf:"otf",woff:"woff",woff2:"woff2"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe","jfif","jfif-tbnl","jif"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",avif:"avifs",heic:["heif","heic"],pjpeg:["pjpg"],"vnd.adobe.photoshop":"psd","x-adobe-dng":"dng","x-fuji-raf":"raf","x-icns":"icns","x-kodak-dcr":"dcr","x-kodak-k25":"k25","x-kodak-kdc":"kdc","x-minolta-mrw":"mrw","x-panasonic-raw":["raw","rw2","rwl"],"x-pentax-pef":["pef","ptx"],"x-sigma-x3f":"x3f","x-sony-arw":"arw","x-sony-sr2":"sr2","x-sony-srf":"srf"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":"x3dz","x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.usdz+zip":"usdz","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",plain:["txt","text","brf","conf","def","list","log","in","bas","diff","ksh"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:"tm","tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":"patch","x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas","pp","inc"],"x-pcs-gcd":"gcd","x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","h","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt",javascript:"js",json:"json",markdown:["md","markdown","mdown","markdn"],"vnd.wap.si":"si","vnd.wap.sl":"sl"},video:{avif:"avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv",mp2t:"ts"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","flr","wrz","xaf","xof"]}};(()=>{const t={};for(const e of Object.keys(jr))for(const n of Object.keys(jr[e])){const r=jr[e][n];if(typeof r=="string")t[r]=e+"/"+n;else for(let s=0;s<r.length;s++)t[r[s]]=e+"/"+n}return t})();const Ho=[];for(let t=0;t<256;t++){let e=t;for(let n=0;n<8;n++)e&1?e=e>>>1^3988292384:e=e>>>1;Ho[t]=e}class sr{constructor(e){this.crc=e||-1}append(e){let n=this.crc|0;for(let r=0,s=e.length|0;r<s;r++)n=n>>>8^Ho[(n^e[r])&255];this.crc=n}get(){return~this.crc}}class Go extends TransformStream{constructor(){let e;const n=new sr;super({transform(r,s){n.append(r),s.enqueue(r)},flush(){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,n.get()),e.value=r}}),e=this}}function zn(t){if(typeof TextEncoder==$t){t=unescape(encodeURIComponent(t));const e=new Uint8Array(t.length);for(let n=0;n<e.length;n++)e[n]=t.charCodeAt(n);return e}else return new TextEncoder().encode(t)}const Ne={concat(t,e){if(t.length===0||e.length===0)return t.concat(e);const n=t[t.length-1],r=Ne.getPartial(n);return r===32?t.concat(e):Ne._shiftRight(e,r,n|0,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(e===0)return 0;const n=t[e-1];return(e-1)*32+Ne.getPartial(n)},clamp(t,e){if(t.length*32<e)return t;t=t.slice(0,Math.ceil(e/32));const n=t.length;return e=e&31,n>0&&e&&(t[n-1]=Ne.partial(e,t[n-1]&2147483648>>e-1,1)),t},partial(t,e,n){return t===32?e:(n?e|0:e<<32-t)+t*1099511627776},getPartial(t){return Math.round(t/1099511627776)||32},_shiftRight(t,e,n,r){for(r===void 0&&(r=[]);e>=32;e-=32)r.push(n),n=0;if(e===0)return r.concat(t);for(let o=0;o<t.length;o++)r.push(n|t[o]>>>e),n=t[o]<<32-e;const s=t.length?t[t.length-1]:0,i=Ne.getPartial(s);return r.push(Ne.partial(e+i&31,e+i>32?n:r.pop(),1)),r}},ir={bytes:{fromBits(t){const n=Ne.bitLength(t)/8,r=new Uint8Array(n);let s;for(let i=0;i<n;i++)(i&3)===0&&(s=t[i/4]),r[i]=s>>>24,s<<=8;return r},toBits(t){const e=[];let n,r=0;for(n=0;n<t.length;n++)r=r<<8|t[n],(n&3)===3&&(e.push(r),r=0);return n&3&&e.push(Ne.partial(8*(n&3),r)),e}}},Zo={};Zo.sha1=class{constructor(t){const e=this;e.blockSize=512,e._init=[1732584193,4023233417,2562383102,271733878,3285377520],e._key=[1518500249,1859775393,2400959708,3395469782],t?(e._h=t._h.slice(0),e._buffer=t._buffer.slice(0),e._length=t._length):e.reset()}reset(){const t=this;return t._h=t._init.slice(0),t._buffer=[],t._length=0,t}update(t){const e=this;typeof t=="string"&&(t=ir.utf8String.toBits(t));const n=e._buffer=Ne.concat(e._buffer,t),r=e._length,s=e._length=r+Ne.bitLength(t);if(s>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const i=new Uint32Array(n);let o=0;for(let a=e.blockSize+r-(e.blockSize+r&e.blockSize-1);a<=s;a+=e.blockSize)e._block(i.subarray(16*o,16*(o+1))),o+=1;return n.splice(0,16*o),e}finalize(){const t=this;let e=t._buffer;const n=t._h;e=Ne.concat(e,[Ne.partial(1,1)]);for(let r=e.length+2;r&15;r++)e.push(0);for(e.push(Math.floor(t._length/4294967296)),e.push(t._length|0);e.length;)t._block(e.splice(0,16));return t.reset(),n}_f(t,e,n,r){if(t<=19)return e&n|~e&r;if(t<=39)return e^n^r;if(t<=59)return e&n|e&r|n&r;if(t<=79)return e^n^r}_S(t,e){return e<<t|e>>>32-t}_block(t){const e=this,n=e._h,r=Array(80);for(let u=0;u<16;u++)r[u]=t[u];let s=n[0],i=n[1],o=n[2],a=n[3],c=n[4];for(let u=0;u<=79;u++){u>=16&&(r[u]=e._S(1,r[u-3]^r[u-8]^r[u-14]^r[u-16]));const l=e._S(5,s)+e._f(u,i,o,a)+c+r[u]+e._key[Math.floor(u/20)]|0;c=a,a=o,o=e._S(30,i),i=s,s=l}n[0]=n[0]+s|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+c|0}};const Xo={};Xo.aes=class{constructor(t){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const n=e._tables[0][4],r=e._tables[1],s=t.length;let i,o,a,c=1;if(s!==4&&s!==6&&s!==8)throw new Error("invalid aes key size");for(e._key=[o=t.slice(0),a=[]],i=s;i<4*s+28;i++){let u=o[i-1];(i%s===0||s===8&&i%s===4)&&(u=n[u>>>24]<<24^n[u>>16&255]<<16^n[u>>8&255]<<8^n[u&255],i%s===0&&(u=u<<8^u>>>24^c<<24,c=c<<1^(c>>7)*283)),o[i]=o[i-s]^u}for(let u=0;i;u++,i--){const l=o[u&3?i:i-4];i<=4||u<4?a[u]=l:a[u]=r[0][n[l>>>24]]^r[1][n[l>>16&255]]^r[2][n[l>>8&255]]^r[3][n[l&255]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],r=e[4],s=[],i=[];let o,a,c,u;for(let l=0;l<256;l++)i[(s[l]=l<<1^(l>>7)*283)^l]=l;for(let l=o=0;!n[l];l^=a||1,o=i[o]||1){let d=o^o<<1^o<<2^o<<3^o<<4;d=d>>8^d&255^99,n[l]=d,r[d]=l,u=s[c=s[a=s[l]]];let m=u*16843009^c*65537^a*257^l*16843008,g=s[d]*257^d*16843008;for(let D=0;D<4;D++)t[D][l]=g=g<<24^g>>>8,e[D][d]=m=m<<24^m>>>8}for(let l=0;l<5;l++)t[l]=t[l].slice(0),e[l]=e[l].slice(0)}_crypt(t,e){if(t.length!==4)throw new Error("invalid aes block size");const n=this._key[e],r=n.length/4-2,s=[0,0,0,0],i=this._tables[e],o=i[0],a=i[1],c=i[2],u=i[3],l=i[4];let d=t[0]^n[0],m=t[e?3:1]^n[1],g=t[2]^n[2],D=t[e?1:3]^n[3],f=4,p,h,x;for(let y=0;y<r;y++)p=o[d>>>24]^a[m>>16&255]^c[g>>8&255]^u[D&255]^n[f],h=o[m>>>24]^a[g>>16&255]^c[D>>8&255]^u[d&255]^n[f+1],x=o[g>>>24]^a[D>>16&255]^c[d>>8&255]^u[m&255]^n[f+2],D=o[D>>>24]^a[d>>16&255]^c[m>>8&255]^u[g&255]^n[f+3],f+=4,d=p,m=h,g=x;for(let y=0;y<4;y++)s[e?3&-y:y]=l[d>>>24]<<24^l[m>>16&255]<<16^l[g>>8&255]<<8^l[D&255]^n[f++],p=d,d=m,m=g,g=D,D=p;return s}};const t0={getRandomValues(t){const e=new Uint32Array(t.buffer),n=r=>{let s=987654321;const i=4294967295;return function(){return s=36969*(s&65535)+(s>>16)&i,r=18e3*(r&65535)+(r>>16)&i,(((s<<16)+r&i)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let r=0,s;r<t.length;r+=4){const i=n((s||Math.random())*4294967296);s=i()*987654071,e[r/4]=i()*4294967296|0}return t}},zo={};zo.ctrGladman=class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if((t>>24&255)===255){let e=t>>16&255,n=t>>8&255,r=t&255;e===255?(e=0,n===255?(n=0,r===255?r=0:++r):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=r}else t+=1<<24;return t}incCounter(t){(t[0]=this.incWord(t[0]))===0&&(t[1]=this.incWord(t[1]))}calculate(t,e,n){let r;if(!(r=e.length))return[];const s=Ne.bitLength(e);for(let i=0;i<r;i+=4){this.incCounter(n);const o=t.encrypt(n);e[i]^=o[0],e[i+1]^=o[1],e[i+2]^=o[2],e[i+3]^=o[3]}return Ne.clamp(e,s)}};const Kt={importKey(t){return new Kt.hmacSha1(ir.bytes.toBits(t))},pbkdf2(t,e,n,r){if(n=n||1e4,r<0||n<0)throw new Error("invalid params to pbkdf2");const s=(r>>5)+1<<2;let i,o,a,c,u;const l=new ArrayBuffer(s),d=new DataView(l);let m=0;const g=Ne;for(e=ir.bytes.toBits(e),u=1;m<(s||1);u++){for(i=o=t.encrypt(g.concat(e,[u])),a=1;a<n;a++)for(o=t.encrypt(o),c=0;c<o.length;c++)i[c]^=o[c];for(a=0;m<(s||1)&&a<i.length;a++)d.setInt32(m,i[a]),m+=4}return l.slice(0,r/8)}};Kt.hmacSha1=class{constructor(t){const e=this,n=e._hash=Zo.sha1,r=[[],[]];e._baseHash=[new n,new n];const s=e._baseHash[0].blockSize/32;t.length>s&&(t=new n().update(t).finalize());for(let i=0;i<s;i++)r[0][i]=t[i]^909522486,r[1][i]=t[i]^1549556828;e._baseHash[0].update(r[0]),e._baseHash[1].update(r[1]),e._resultHash=new n(e._baseHash[0])}reset(){const t=this;t._resultHash=new t._hash(t._baseHash[0]),t._updated=!1}update(t){const e=this;e._updated=!0,e._resultHash.update(t)}digest(){const t=this,e=t._resultHash.finalize(),n=new t._hash(t._baseHash[1]).update(e).finalize();return t.reset(),n}encrypt(t){if(this._updated)throw new Error("encrypt on already updated hmac called!");return this.update(t),this.digest(t)}};const n0=typeof crypto!=$t&&typeof crypto.getRandomValues==Tn,Ko="Invalid password",Jo="Invalid signature",Ps="zipjs-abort-check-password";function Qo(t){return n0?crypto.getRandomValues(t):t0.getRandomValues(t)}const rn=16,r0="raw",ea={name:"PBKDF2"},s0={name:"HMAC"},i0="SHA-1",o0=Object.assign({hash:s0},ea),ls=Object.assign({iterations:1e3,hash:{name:i0}},ea),a0=["deriveBits"],Cn=[8,12,16],Dn=[16,24,32],Bt=10,c0=[0,0,0,0],gr=typeof crypto!=$t,kn=gr&&crypto.subtle,ta=gr&&typeof kn!=$t,wt=ir.bytes,u0=Xo.aes,l0=zo.ctrGladman,f0=Kt.hmacSha1;let Bi=gr&&ta&&typeof kn.importKey==Tn,Oi=gr&&ta&&typeof kn.deriveBits==Tn;class d0 extends TransformStream{constructor({password:e,rawPassword:n,signed:r,encryptionStrength:s,checkPasswordOnly:i}){super({start(){Object.assign(this,{ready:new Promise(o=>this.resolveReady=o),password:sa(e,n),signed:r,strength:s-1,pending:new Uint8Array})},async transform(o,a){const c=this,{password:u,strength:l,resolveReady:d,ready:m}=c;u?(await h0(c,l,u,rt(o,0,Cn[l]+2)),o=rt(o,Cn[l]+2),i?a.error(new Error(Ps)):d()):await m;const g=new Uint8Array(o.length-Bt-(o.length-Bt)%rn);a.enqueue(na(c,o,g,0,Bt,!0))},async flush(o){const{signed:a,ctr:c,hmac:u,pending:l,ready:d}=this;if(u&&c){await d;const m=rt(l,0,l.length-Bt),g=rt(l,l.length-Bt);let D=new Uint8Array;if(m.length){const f=Sn(wt,m);u.update(f);const p=c.update(f);D=Fn(wt,p)}if(a){const f=rt(Fn(wt,u.digest()),0,Bt);for(let p=0;p<Bt;p++)if(f[p]!=g[p])throw new Error(Jo)}o.enqueue(D)}}})}}class p0 extends TransformStream{constructor({password:e,rawPassword:n,encryptionStrength:r}){let s;super({start(){Object.assign(this,{ready:new Promise(i=>this.resolveReady=i),password:sa(e,n),strength:r-1,pending:new Uint8Array})},async transform(i,o){const a=this,{password:c,strength:u,resolveReady:l,ready:d}=a;let m=new Uint8Array;c?(m=await m0(a,u,c),l()):await d;const g=new Uint8Array(m.length+i.length-i.length%rn);g.set(m,0),o.enqueue(na(a,i,g,m.length,0))},async flush(i){const{ctr:o,hmac:a,pending:c,ready:u}=this;if(a&&o){await u;let l=new Uint8Array;if(c.length){const d=o.update(Sn(wt,c));a.update(d),l=Fn(wt,d)}s.signature=Fn(wt,a.digest()).slice(0,Bt),i.enqueue(Is(l,s.signature))}}}),s=this}}function na(t,e,n,r,s,i){const{ctr:o,hmac:a,pending:c}=t,u=e.length-s;c.length&&(e=Is(c,e),n=D0(n,u-u%rn));let l;for(l=0;l<=u-rn;l+=rn){const d=Sn(wt,rt(e,l,l+rn));i&&a.update(d);const m=o.update(d);i||a.update(m),n.set(Fn(wt,m),l+r)}return t.pending=rt(e,l),n}async function h0(t,e,n,r){const s=await ra(t,e,n,rt(r,0,Cn[e])),i=rt(r,Cn[e]);if(s[0]!=i[0]||s[1]!=i[1])throw new Error(Ko)}async function m0(t,e,n){const r=Qo(new Uint8Array(Cn[e])),s=await ra(t,e,n,r);return Is(r,s)}async function ra(t,e,n,r){t.password=null;const s=await x0(r0,n,o0,!1,a0),i=await g0(Object.assign({salt:r},ls),s,8*(Dn[e]*2+2)),o=new Uint8Array(i),a=Sn(wt,rt(o,0,Dn[e])),c=Sn(wt,rt(o,Dn[e],Dn[e]*2)),u=rt(o,Dn[e]*2);return Object.assign(t,{keys:{key:a,authentication:c,passwordVerification:u},ctr:new l0(new u0(a),Array.from(c0)),hmac:new f0(c)}),u}async function x0(t,e,n,r,s){if(Bi)try{return await kn.importKey(t,e,n,r,s)}catch{return Bi=!1,Kt.importKey(e)}else return Kt.importKey(e)}async function g0(t,e,n){if(Oi)try{return await kn.deriveBits(t,e,n)}catch{return Oi=!1,Kt.pbkdf2(e,t.salt,ls.iterations,n)}else return Kt.pbkdf2(e,t.salt,ls.iterations,n)}function sa(t,e){return e===X?zn(t):e}function Is(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function D0(t,e){if(e&&e>t.length){const n=t;t=new Uint8Array(e),t.set(n,0)}return t}function rt(t,e,n){return t.subarray(e,n)}function Fn(t,e){return t.fromBits(e)}function Sn(t,e){return t.toBits(e)}const on=12;class w0 extends TransformStream{constructor({password:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){Object.assign(this,{password:e,passwordVerification:n}),ia(this,e)},transform(s,i){const o=this;if(o.password){const a=Ri(o,s.subarray(0,on));if(o.password=null,a[on-1]!=o.passwordVerification)throw new Error(Ko);s=s.subarray(on)}r?i.error(new Error(Ps)):i.enqueue(Ri(o,s))}})}}class y0 extends TransformStream{constructor({password:e,passwordVerification:n}){super({start(){Object.assign(this,{password:e,passwordVerification:n}),ia(this,e)},transform(r,s){const i=this;let o,a;if(i.password){i.password=null;const c=Qo(new Uint8Array(on));c[on-1]=i.passwordVerification,o=new Uint8Array(r.length+c.length),o.set(Li(i,c),0),a=on}else o=new Uint8Array(r.length),a=0;o.set(Li(i,r),a),s.enqueue(o)}})}}function Ri(t,e){const n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=oa(t)^e[r],Ms(t,n[r]);return n}function Li(t,e){const n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=oa(t)^e[r],Ms(t,e[r]);return n}function ia(t,e){const n=[305419896,591751049,878082192];Object.assign(t,{keys:n,crcKey0:new sr(n[0]),crcKey2:new sr(n[2])});for(let r=0;r<e.length;r++)Ms(t,e.charCodeAt(r))}function Ms(t,e){let[n,r,s]=t.keys;t.crcKey0.append([e]),n=~t.crcKey0.get(),r=Ni(Math.imul(Ni(r+aa(n)),134775813)+1),t.crcKey2.append([r>>>24]),s=~t.crcKey2.get(),t.keys=[n,r,s]}function oa(t){const e=t.keys[2]|2;return aa(Math.imul(e,e^1)>>>8)}function aa(t){return t&255}function Ni(t){return t&4294967295}const ca="Invalid uncompressed size",$i="deflate-raw";class _0 extends TransformStream{constructor(e,{chunkSize:n,CompressionStream:r,CompressionStreamNative:s}){super({});const{compressed:i,encrypted:o,useCompressionStream:a,zipCrypto:c,signed:u,level:l}=e,d=this;let m,g,D=super.readable;(!o||c)&&u&&(m=new Go,D=Ft(D,m)),i&&(D=la(D,a,{level:l,chunkSize:n},s,r)),o&&(c?D=Ft(D,new y0(e)):(g=new p0(e),D=Ft(D,g))),ua(d,D,()=>{let f;o&&!c&&(f=g.signature),(!o||c)&&u&&(f=new DataView(m.value.buffer).getUint32(0)),d.signature=f})}}class b0 extends TransformStream{constructor(e,{chunkSize:n,DecompressionStream:r,DecompressionStreamNative:s}){super({});const{zipCrypto:i,encrypted:o,signed:a,signature:c,compressed:u,useCompressionStream:l}=e;let d,m,g=super.readable;o&&(i?g=Ft(g,new w0(e)):(m=new d0(e),g=Ft(g,m))),u&&(g=la(g,l,{chunkSize:n},s,r)),(!o||i)&&a&&(d=new Go,g=Ft(g,d)),ua(this,g,()=>{if((!o||i)&&a){const D=new DataView(d.value.buffer);if(c!=D.getUint32(0,!1))throw new Error(Jo)}})}}function ua(t,e,n){e=Ft(e,new TransformStream({flush:n})),Object.defineProperty(t,"readable",{get(){return e}})}function la(t,e,n,r,s){try{const i=e&&r?r:s;t=Ft(t,new i($i,n))}catch(i){if(e)t=Ft(t,new s($i,n));else throw i}return t}function Ft(t,e){return t.pipeThrough(e)}const A0="message",E0="start",v0="pull",Ui="data",C0="ack",Vi="close",fa="deflate",da="inflate";class F0 extends TransformStream{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(fa)?i=_0:s.startsWith(da)&&(i=b0),r.outputSize=0;let o=0;const a=new i(e,n),c=super.readable,u=new TransformStream({transform(d,m){d&&d.length&&(o+=d.length,m.enqueue(d))},flush(){Object.assign(r,{inputSize:o})}}),l=new TransformStream({transform(d,m){if(d&&d.length&&(m.enqueue(d),r.outputSize+=d.length,e.outputSize&&r.outputSize>e.outputSize))throw new Error(ca)},flush(){const{signature:d}=a;Object.assign(r,{signature:d,inputSize:o})}});Object.defineProperty(r,"readable",{get(){return c.pipeThrough(u).pipeThrough(a).pipeThrough(l)}})}}class S0 extends TransformStream{constructor(e){let n;super({transform:r,flush(s){n&&n.length&&s.enqueue(n)}});function r(s,i){if(n){const o=new Uint8Array(n.length+s.length);o.set(n),o.set(s,n.length),s=o,n=null}s.length>e?(i.enqueue(s.slice(0,e)),r(s.slice(e),i)):n=s}}}let pa=typeof Worker!=$t;class qr{constructor(e,{readable:n,writable:r},{options:s,config:i,streamOptions:o,useWebWorkers:a,transferStreams:c,scripts:u},l){const{signal:d}=o;return Object.assign(e,{busy:!0,readable:n.pipeThrough(new S0(i.chunkSize)).pipeThrough(new T0(o),{signal:d}),writable:r,options:Object.assign({},s),scripts:u,transferStreams:c,terminate(){return new Promise(m=>{const{worker:g,busy:D}=e;g?(D?e.resolveTerminated=m:(g.terminate(),m()),e.interface=null):m()})},onTaskFinished(){const{resolveTerminated:m}=e;m&&(e.resolveTerminated=null,e.terminated=!0,e.worker.terminate(),m()),e.busy=!1,l(e)}}),(a&&pa?k0:ha)(e,i)}}class T0 extends TransformStream{constructor({onstart:e,onprogress:n,size:r,onend:s}){let i=0;super({async start(){e&&await Wr(e,r)},async transform(o,a){i+=o.length,n&&await Wr(n,i,r),a.enqueue(o)},async flush(){s&&await Wr(s,i)}})}}async function Wr(t,...e){try{await t(...e)}catch{}}function ha(t,e){return{run:()=>P0(t,e)}}function k0(t,e){const{baseURL:n,chunkSize:r}=e;if(!t.interface){let s;try{s=B0(t.scripts[0],n,t)}catch{return pa=!1,ha(t,e)}Object.assign(t,{worker:s,interface:{run:()=>I0(t,{chunkSize:r})}})}return t.interface}async function P0({options:t,readable:e,writable:n,onTaskFinished:r},s){let i;try{i=new F0(t,s),await e.pipeThrough(i).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:o,inputSize:a,outputSize:c}=i;return{signature:o,inputSize:a,outputSize:c}}catch(o){throw i&&(o.outputSize=i.outputSize),o}finally{r()}}async function I0(t,e){let n,r;const s=new Promise((m,g)=>{n=m,r=g});Object.assign(t,{reader:null,writer:null,resolveResult:n,rejectResult:r,result:s});const{readable:i,options:o,scripts:a}=t,{writable:c,closed:u}=M0(t.writable),l=Kn({type:E0,scripts:a.slice(1),options:o,config:e,readable:i,writable:c},t);l||Object.assign(t,{reader:i.getReader(),writer:c.getWriter()});const d=await s;return l||await c.getWriter().close(),await u,d}function M0(t){let e;const n=new Promise(s=>e=s);return{writable:new WritableStream({async write(s){const i=t.getWriter();await i.ready,await i.write(s),i.releaseLock()},close(){e()},abort(s){return t.getWriter().abort(s)}}),closed:n}}let ji=!0,qi=!0;function B0(t,e,n){const r={type:"module"};let s,i;typeof t==Tn&&(t=t());try{s=new URL(t,e)}catch{s=t}if(ji)try{i=new Worker(s)}catch{ji=!1,i=new Worker(s,r)}else i=new Worker(s,r);return i.addEventListener(A0,o=>O0(o,n)),i}function Kn(t,{worker:e,writer:n,onTaskFinished:r,transferStreams:s}){try{const{value:i,readable:o,writable:a}=t,c=[];if(i&&(i.byteLength<i.buffer.byteLength?t.value=i.buffer.slice(0,i.byteLength):t.value=i.buffer,c.push(t.value)),s&&qi?(o&&c.push(o),a&&c.push(a)):t.readable=t.writable=null,c.length)try{return e.postMessage(t,c),!0}catch{qi=!1,t.readable=t.writable=null,e.postMessage(t)}else e.postMessage(t)}catch(i){throw n&&n.releaseLock(),r(),i}}async function O0({data:t},e){const{type:n,value:r,messageId:s,result:i,error:o}=t,{reader:a,writer:c,resolveResult:u,rejectResult:l,onTaskFinished:d}=e;try{if(o){const{message:g,stack:D,code:f,name:p,outputSize:h}=o,x=new Error(g);Object.assign(x,{stack:D,code:f,name:p,outputSize:h}),m(x)}else{if(n==v0){const{value:g,done:D}=await a.read();Kn({type:Ui,value:g,done:D,messageId:s},e)}n==Ui&&(await c.ready,await c.write(new Uint8Array(r)),Kn({type:C0,messageId:s},e)),n==Vi&&m(null,i)}}catch(g){Kn({type:Vi,messageId:s},e),m(g)}function m(g,D){g?l(g):u(D),c&&c.releaseLock(),d()}}let Zt=[];const Yr=[];let Wi=0;async function ma(t,e){const{options:n,config:r}=e,{transferStreams:s,useWebWorkers:i,useCompressionStream:o,codecType:a,compressed:c,signed:u,encrypted:l}=n,{workerScripts:d,maxWorkers:m}=r;e.transferStreams=s||s===X;const g=!c&&!u&&!l&&!e.transferStreams;return e.useWebWorkers=!g&&(i||i===X&&r.useWebWorkers),e.scripts=e.useWebWorkers&&d?d[a]:[],n.useCompressionStream=o||o===X&&r.useCompressionStream,(await D()).run();async function D(){const p=Zt.find(h=>!h.busy);if(p)return Yi(p),new qr(p,t,e,f);if(Zt.length<m){const h={indexWorker:Wi};return Wi++,Zt.push(h),new qr(h,t,e,f)}else return new Promise(h=>Yr.push({resolve:h,stream:t,workerOptions:e}))}function f(p){if(Yr.length){const[{resolve:h,stream:x,workerOptions:y}]=Yr.splice(0,1);h(new qr(p,x,y,f))}else p.worker?(Yi(p),R0(p,e)):Zt=Zt.filter(h=>h!=p)}}function R0(t,e){const{config:n}=e,{terminateWorkerTimeout:r}=n;Number.isFinite(r)&&r>=0&&(t.terminated?t.terminated=!1:t.terminateTimeout=setTimeout(async()=>{Zt=Zt.filter(s=>s!=t);try{await t.terminate()}catch{}},r))}function Yi(t){const{terminateTimeout:e}=t;e&&(clearTimeout(e),t.terminateTimeout=null)}function L0(t,e={}){const n=`const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self,k=void 0,v="undefined",S="function";class z{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const C=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;C[e]=t}class x{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^C[255&(t^e[n])];this.t=t}get(){return~this.t}}class A extends p{constructor(){let e;const t=new x;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new i(4);new l(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const I={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=I.i(n);return 32===r?e.concat(t):I.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.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]=I.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.i(s);return r.push(I.h(t+i&31,t+i>32?n:r.pop(),1)),r}},_={bytes:{p(e){const t=I.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)3&s||(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},m(e){const t=[];let n,r=0;for(n=0;n<e.length;n++)r=r<<8|e[n],3&~n||(t.push(r),r=0);return 3&n&&t.push(I.h(8*(3&n),r)),t}}},P=class{constructor(e){const t=this;t.blockSize=512,t.k=[1732584193,4023233417,2562383102,271733878,3285377520],t.v=[1518500249,1859775393,2400959708,3395469782],e?(t.S=e.S.slice(0),t.C=e.C.slice(0),t.A=e.A):t.reset()}reset(){const e=this;return e.S=e.k.slice(0),e.C=[],e.A=0,e}update(e){const t=this;"string"==typeof e&&(e=_.I.m(e));const n=t.C=I.concat(t.C,e),r=t.A,i=t.A=r+I.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._(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}P(){const e=this;let t=e.C;const n=e.S;t=I.concat(t,[I.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e.A/4294967296)),t.push(0|e.A);t.length;)e._(t.splice(0,16));return e.reset(),n}D(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}V(e,t){return t<<e|t>>>32-e}_(t){const n=this,s=n.S,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.V(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.V(5,o)+n.D(e,c,f,a)+l+i[e]+n.v[r.floor(e/20)]|0;l=a,a=f,f=n.V(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},D={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;i<e.length;i+=4){const e=n(4294967296*(s||r.random()));s=987654071*e(),t[i/4]=4294967296*e()|0}return e}},V={importKey:e=>new V.R(_.bytes.m(e)),B(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=I;for(t=_.bytes.m(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;a<c.length;a++)o[a]^=c[a];for(f=0;(i||1)>d&&f<o.length;f++)h.setInt32(d,o[f]),d+=4}return w.slice(0,r/8)},R:class{constructor(e){const t=this,n=t.M=P,r=[[],[]];t.U=[new n,new n];const s=t.U[0].blockSize/32;e.length>s&&(e=(new n).update(e).P());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.K=new n(t.U[0])}reset(){const e=this;e.K=new e.M(e.U[0]),e.N=!1}update(e){this.N=!0,this.K.update(e)}digest(){const e=this,t=e.K.P(),n=new e.M(e.U[1]).update(t).P();return e.reset(),n}encrypt(e){if(this.N)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},R=typeof h!=v&&typeof h.getRandomValues==S,B="Invalid password",E="Invalid signature",M="zipjs-abort-check-password";function U(e){return R?h.getRandomValues(e):D.getRandomValues(e)}const K=16,N={name:"PBKDF2"},O=t.assign({hash:{name:"HMAC"}},N),T=t.assign({iterations:1e3,hash:{name:"SHA-1"}},N),W=["deriveBits"],j=[8,12,16],H=[16,24,32],L=10,F=[0,0,0,0],q=typeof h!=v,G=q&&h.subtle,J=q&&typeof G!=v,Q=_.bytes,X=class{constructor(e){const t=this;t.O=[[[],[],[],[],[]],[[],[],[],[],[]]],t.O[0][0][0]||t.T();const n=t.O[0][4],r=t.O[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.v=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i===0||8===i&&o%i===4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i===0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.W(e,0)}decrypt(e){return this.W(e,1)}T(){const e=this.O[0],t=this.O[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}W(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.v[t],r=n.length/4-2,i=[0,0,0,0],o=this.O[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},Y=class{constructor(e,t){this.j=e,this.H=t,this.L=t}reset(){this.L=this.H}update(e){return this.F(this.j,e,this.L)}q(e){if(255&~(e>>24))e+=1<<24;else{let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}return e}G(e){0===(e[0]=this.q(e[0]))&&(e[1]=this.q(e[1]))}F(e,t,n){let r;if(!(r=t.length))return[];const s=I.l(t);for(let s=0;r>s;s+=4){this.G(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return I.u(t,s)}},Z=V.R;let $=q&&J&&typeof G.importKey==S,ee=q&&J&&typeof G.deriveBits==S;class te extends p{constructor({password:e,rawPassword:n,signed:r,encryptionStrength:o,checkPasswordOnly:c}){super({start(){t.assign(this,{ready:new u(e=>this.J=e),password:ie(e,n),signed:r,X:o-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:o,J:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await se(e,t,n,ce(r,0,j[t])),o=ce(r,j[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(B)})(n,o,r,ce(e,0,j[o]+2)),e=ce(e,j[o]+2),c?t.error(new s(M)):f()):await a;const l=new i(e.length-L-(e.length-L)%K);t.enqueue(re(n,e,l,0,L,!0))},async flush(e){const{signed:t,Y:n,Z:r,pending:o,ready:c}=this;if(r&&n){await c;const f=ce(o,0,o.length-L),a=ce(o,o.length-L);let l=new i;if(f.length){const e=ae(Q,f);r.update(e);const t=n.update(e);l=fe(Q,t)}if(t){const e=ce(fe(Q,r.digest()),0,L);for(let t=0;L>t;t++)if(e[t]!=a[t])throw new s(E)}e.enqueue(l)}}})}}class ne extends p{constructor({password:e,rawPassword:n,encryptionStrength:r}){let s;super({start(){t.assign(this,{ready:new u(e=>this.J=e),password:ie(e,n),X:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:s,J:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=U(new i(j[t]));return oe(r,await se(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%K);a.set(f,0),t.enqueue(re(n,e,a,f.length,0))},async flush(e){const{Y:t,Z:n,pending:r,ready:o}=this;if(n&&t){await o;let c=new i;if(r.length){const e=t.update(ae(Q,r));n.update(e),c=fe(Q,e)}s.signature=fe(Q,n.digest()).slice(0,L),e.enqueue(oe(c,s.signature))}}}),s=this}}function re(e,t,n,r,s,o){const{Y:c,Z:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=oe(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%K)),u=0;l-K>=u;u+=K){const e=ae(Q,ce(t,u,u+K));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(fe(Q,s),u+r)}return e.pending=ce(t,u),n}async function se(n,r,s,o){n.password=null;const c=await(async(e,t,n,r,s)=>{if(!$)return V.importKey(t);try{return await G.importKey("raw",t,n,!1,s)}catch(e){return $=!1,V.importKey(t)}})(0,s,O,0,W),f=await(async(e,t,n)=>{if(!ee)return V.B(t,e.salt,T.iterations,n);try{return await G.deriveBits(e,t,n)}catch(r){return ee=!1,V.B(t,e.salt,T.iterations,n)}})(t.assign({salt:o},T),c,8*(2*H[r]+2)),a=new i(f),l=ae(Q,ce(a,0,H[r])),u=ae(Q,ce(a,H[r],2*H[r])),w=ce(a,2*H[r]);return t.assign(n,{keys:{key:l,$:u,passwordVerification:w},Y:new Y(new X(l),e.from(F)),Z:new Z(u)}),w}function ie(e,t){return t===k?(e=>{if(typeof w==v){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new w).encode(e)})(e):t}function oe(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ce(e,t,n){return e.subarray(t,n)}function fe(e,t){return e.p(t)}function ae(e,t){return e.m(t)}class le extends p{constructor({password:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){t.assign(this,{password:e,passwordVerification:n}),de(this,e)},transform(e,t){const n=this;if(n.password){const t=we(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(B);e=e.subarray(12)}r?t.error(new s(M)):t.enqueue(we(n,e))}})}}class ue extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),de(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=U(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(he(n,t),0),s=12}else r=new i(e.length),s=0;r.set(he(n,e),s),t.enqueue(r)}})}}function we(e,t){const n=new i(t.length);for(let r=0;r<t.length;r++)n[r]=ye(e)^t[r],pe(e,n[r]);return n}function he(e,t){const n=new i(t.length);for(let r=0;r<t.length;r++)n[r]=ye(e)^t[r],pe(e,t[r]);return n}function de(e,n){const r=[305419896,591751049,878082192];t.assign(e,{keys:r,ee:new x(r[0]),te:new x(r[2])});for(let t=0;t<n.length;t++)pe(e,n.charCodeAt(t))}function pe(e,t){let[n,s,i]=e.keys;e.ee.append([t]),n=~e.ee.get(),s=be(r.imul(be(s+me(n)),134775813)+1),e.te.append([s>>>24]),i=~e.te.get(),e.keys=[n,s,i]}function ye(e){const t=2|e.keys[2];return me(r.imul(t,1^t)>>>8)}function me(e){return 255&e}function be(e){return 4294967295&e}const ge="deflate-raw";class ke extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=super.readable;i&&!c||!f||(w=new A,d=Ce(d,w)),s&&(d=ze(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=Ce(d,new ue(e)):(h=new ne(e),d=Ce(d,h))),Se(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=super.readable;o&&(i?d=Ce(d,new le(e)):(h=new te(e),d=Ce(d,h))),a&&(d=ze(d,u,{chunkSize:t},r,n)),o&&!i||!c||(w=new A,d=Ce(d,w)),Se(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,n,r){n=Ce(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function ze(e,t,n,r,s){try{e=Ce(e,new(t&&r?r:s)(ge,n))}catch(r){if(!t)throw r;e=Ce(e,new s(ge,n))}return e}function Ce(e,t){return e.pipeThrough(t)}const xe="data",Ae="close";class Ie extends p{constructor(e,n){super({});const r=this,{codecType:i}=e;let o;i.startsWith("deflate")?o=ke:i.startsWith("inflate")&&(o=ve),r.outputSize=0;let c=0;const f=new o(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(t,n){if(t&&t.length&&(n.enqueue(t),r.outputSize+=t.length,e.outputSize&&r.outputSize>e.outputSize))throw new s("Invalid uncompressed size")},flush(){const{signature:e}=f;t.assign(r,{signature:e,inputSize:c})}});t.defineProperty(r,"readable",{get:()=>a.pipeThrough(l).pipeThrough(f).pipeThrough(u)})}}class _e 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 Pe=new a,De=new a;let Ve,Re=0,Be=!0;async function Ee(e){try{const{options:t,scripts:r,config:s}=e;if(r&&r.length)try{Be?importScripts.apply(k,r):await Me(r)}catch(e){Be=!1,await Me(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=>Pe.set(Re,e));Ue({type:"pull",messageId:Re}),Re=(Re+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);De.set(Re,t),Ue({type:xe,value:e,messageId:Re}),Re=(Re+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new Ie(t,s);Ve=new AbortController;const{signal:a}=Ve;await o.pipeThrough(f).pipeThrough(new _e(s.chunkSize)).pipeTo(c,{signal:a,preventClose:!0,preventAbort:!0}),await c.getWriter().close();const{signature:l,inputSize:w,outputSize:h}=f;Ue({type:Ae,result:{signature:l,inputSize:w,outputSize:h}})}catch(e){e.outputSize=0,Ke(e)}}async function Me(e){for(const t of e)await import(t)}function Ue(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 Ke(e=new s("Unknown error")){const{message:t,stack:n,code:r,name:i,outputSize:o}=e;d({error:{message:t,stack:n,code:r,name:i,outputSize:o}})}addEventListener("message",({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&Ee(e),t==xe){const e=Pe.get(n);Pe.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=De.get(n);De.delete(n),e()}t==Ae&&Ve.abort()}catch(e){Ke(e)}});const Ne=-2;function Oe(t){return Te(t.map(([t,n])=>new e(t).fill(n,0,t)))}function Te(t){return t.reduce((t,n)=>t.concat(e.isArray(n)?Te(n):n),[])}const We=[0,1,2,3].concat(...Oe([[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 je(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.ne=n=>{const s=e.re,i=e.ie.se,o=e.ie.oe;let c,f,a,l=-1;for(n.ce=0,n.fe=573,c=0;o>c;c++)0!==s[2*c]?(n.ae[++n.ce]=l=c,n.le[c]=0):s[2*c+1]=0;for(;2>n.ce;)a=n.ae[++n.ce]=2>l?++l:0,s[2*a]=1,n.le[a]=0,n.ue--,i&&(n.we-=i[2*a+1]);for(e.he=l,c=r.floor(n.ce/2);c>=1;c--)n.de(s,c);a=o;do{c=n.ae[1],n.ae[1]=n.ae[n.ce--],n.de(s,1),f=n.ae[1],n.ae[--n.fe]=c,n.ae[--n.fe]=f,s[2*a]=s[2*c]+s[2*f],n.le[a]=r.max(n.le[c],n.le[f])+1,s[2*c+1]=s[2*f+1]=a,n.ae[1]=a++,n.de(s,1)}while(n.ce>=2);n.ae[--n.fe]=n.ae[1],(t=>{const n=e.re,r=e.ie.se,s=e.ie.pe,i=e.ie.ye,o=e.ie.me;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.be[l]=0;for(n[2*t.ae[t.fe]+1]=0,c=t.fe+1;573>c;c++)f=t.ae[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.he||(t.be[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.ue+=w*(l+u),r&&(t.we+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.be[l];)l--;t.be[l]--,t.be[l+1]+=2,t.be[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.be[l];0!==f;)a=t.ae[--c],a>e.he||(n[2*a+1]!=l&&(t.ue+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.he,n.be)}}function He(e,t,n,r,s){const i=this;i.se=e,i.pe=t,i.ye=n,i.oe=r,i.me=s}je.ge=[0,1,2,3,4,5,6,7].concat(...Oe([[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]])),je.ke=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],je.ve=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],je.Se=e=>256>e?We[e]:We[256+(e>>>7)],je.ze=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],je.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],je.xe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],je.Ae=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Le=Oe([[144,8],[112,9],[24,7],[8,8]]);He.Ie=Te([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,Le[t]]));const Fe=Oe([[30,5]]);function qe(e,t,n,r,s){const i=this;i._e=e,i.Pe=t,i.De=n,i.Ve=r,i.Re=s}He.Be=Te([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,Fe[t]])),He.Ee=new He(He.Ie,je.ze,257,286,15),He.Me=new He(He.Be,je.Ce,0,30,15),He.Ue=new He(null,je.xe,0,19,7);const Ge=[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)],Je=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Qe=113,Xe=666,Ye=262;function Ze(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function $e(){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 je,N=new je,O=new je;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)U[2*t]=0;E[512]=1,e.ue=e.we=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++i<o&&n==s||(c>i?U[2*n]+=i:0!==n?(n!=r&&U[2*n]++,U[32]++):i>10?U[36]++:U[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ke[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<<F&65535,Q(L),L=n>>>16-F,F+=r-16):(L|=e<<F&65535,F+=r)}function Y(e,t){const n=2*e;X(65535&t[n],65535&t[n+1])}function Z(e,t){let n,r,s=-1,i=e[1],o=0,c=7,f=4;for(0===i&&(c=138,f=3),n=0;t>=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,U)}while(0!==--o);else 0!==r?(r!=s&&(Y(r,U),o--),Y(16,U),X(o-3,2)):o>10?(Y(18,U),X(o-11,7)):(Y(17,U),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Ne[W]=t,e.Oe[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(je.ge[n]+256+1)]++,M[2*je.Se(t)]++),!(8191&W)&&D>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+je.Ce[o]);if(s>>>=3,j<r.floor(W/2)&&s<r.floor(i/2))return!0}return W==T-1}function te(t,n){let r,s,i,o,c=0;if(0!==W)do{r=e.Ne[c],s=e.Oe[c],c++,0===r?Y(s,t):(i=je.ge[s],Y(i+256+1,t),o=je.ze[i],0!==o&&(s-=je.ke[i],X(s,o)),r--,i=je.Se(r),Y(i,n),o=je.Ce[i],0!==o&&(r-=je.ve[i],X(r,o)))}while(W>c);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ke.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;D>0?(K.ne(e),N.ne(e),o=(()=>{let t;for(G(E,K.he),G(M,N.he),O.ne(e),t=18;t>=3&&0===U[2*je.Ae[t]+1];t--);return e.ue+=14+3*(t+1),t})(),s=e.ue+3+7>>>3,i=e.we+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(He.Ie,He.Be)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(U[2*je.Ae[r]+1],3);Z(E,e-1),Z(M,t-1)})(K.he+1,N.he+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.Te()}function ie(){let e,n,r,s;do{if(s=w-A-C,0===s&&0===C&&0===A)s=f;else if(-1==s)s--;else if(C>=f+f-Ye){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!==--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!==--e);s+=f}if(0===t.We)return;e=t.je(u,C+A,s),A+=e,3>A||(p=255&u[C],p=(p<<g^255&u[C+1])&b)}while(Ye>A&&0!==t.We)}function oe(e){let t,n,r=_,s=C,i=I;const o=C>f-Ye?C-(f-Ye):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>I||(r>>=2),c>A&&(c=A);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!==--r);return i>A?A:i}e.le=[],e.be=[],e.ae=[],E=[],M=[],U=[],e.de=(t,n)=>{const r=e.ae,s=r[n];let i=n<<1;for(;i<=e.ce&&(i<e.ce&&Ze(t,r[i+1],r[i],e.le)&&i++,!Ze(t,s,r[i],e.le));)r[n]=r[i],n=i,i<<=1;r[n]=s},e.He=(t,S,x,W,j,G)=>(W||(W=8),j||(j=8),G||(G=0),t.Le=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Ne:(t.Fe=e,a=x,f=1<<a,l=f-1,m=j+7,y=1<<m,b=y-1,g=r.floor((m+3-1)/3),u=new i(2*f),h=[],d=[],T=1<<j+6,e.Ke=new i(4*T),s=4*T,e.Ne=new o(T),e.Oe=new i(T),D=S,V=G,(t=>(t.qe=t.Ge=0,t.Le=null,e.pending=0,e.Je=0,n=Qe,c=0,K.re=E,K.ie=He.Ee,N.re=M,N.ie=He.Me,O.re=U,O.ie=He.Ue,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;P=Ge[D].Pe,R=Ge[D]._e,B=Ge[D].De,_=Ge[D].Ve,C=0,k=0,A=0,v=I=2,z=0,p=0})(),0))(t))),e.Qe=()=>42!=n&&n!=Qe&&n!=Xe?Ne:(e.Oe=null,e.Ne=null,e.Ke=null,d=null,h=null,u=null,e.Fe=null,n==Qe?-3:0),e.Xe=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Ne:(Ge[D].Re!=Ge[t].Re&&0!==e.qe&&(r=e.Ye(1)),D!=t&&(D=t,P=Ge[D].Pe,R=Ge[D]._e,B=Ge[D].De,_=Ge[D].Ve),V=n,r)},e.Ze=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Ne;if(3>i)return 0;for(i>f-Ye&&(i=f-Ye,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<<g^255&u[1])&b,s=0;i-3>=s;s++)p=(p<<g^255&u[s+2])&b,h[s&l]=d[p],d[p]=s;return 0},e.Ye=(r,i)=>{let o,w,m,_,R;if(i>4||0>i)return Ne;if(!r.$e||!r.et&&0!==r.We||n==Xe&&4!=i)return r.Le=Je[4],Ne;if(0===r.tt)return r.Le=Je[7],-5;var B;if(t=r,_=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=Qe,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.Te(),0===t.tt)return c=-1,0}else if(0===t.We&&_>=i&&4!=i)return t.Le=Je[7],-5;if(n==Xe&&0!==t.We)return r.Le=Je[7],-5;if(0!==t.We||0!==A||0!=i&&n!=Xe){switch(R=-1,Ge[D].Re){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=A){if(ie(),0===A&&0==e)return 0;if(0===A)break}if(C+=A,A=0,n=k+r,(0===C||C>=n)&&(A=C-n,C=n,se(!1),0===t.tt))return 0;if(C-k>=f-Ye&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Ye>A){if(ie(),Ye>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-Ye||2!=V&&(v=oe(r)),3>v)n=ee(0,255&u[C]),A--,C++;else if(n=ee(C-x,v-3),A-=v,v>P||3>A)C+=v,v=0,p=255&u[C],p=(p<<g^255&u[C+1])&b;else{v--;do{C++,p=(p<<g^255&u[C+2])&b,r=65535&d[p],h[C&l]=d[p],d[p]=C}while(0!==--v);C++}if(n&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 2:R=(e=>{let n,r,s=0;for(;;){if(Ye>A){if(ie(),Ye>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),I=v,S=x,v=2,0!==s&&P>I&&f-Ye>=(C-s&65535)&&(2!=V&&(v=oe(s)),5>=v&&(1==V||3==v&&C-x>4096)&&(v=2)),3>I||v>I)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,A--,0===t.tt)return 0}else z=1,C++,A--;else{r=C+A-3,n=ee(C-1-S,I-3),A-=I-1,I-=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!==--I);if(z=0,v=2,C++,n&&(se(!1),0===t.tt))return 0}}return 0!==z&&(n=ee(0,255&u[C-1]),z=0),se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i)}if(2!=R&&3!=R||(n=Xe),0==R||2==R)return 0===t.tt&&(c=-1),0;if(1==R){if(1==i)X(2,3),Y(256,He.Ie),$(),9>1+H+10-F&&(X(2,3),Y(256,He.Ie),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.Te(),0===t.tt)return c=-1,0}}return 4!=i?0:1}}function et(){const e=this;e.nt=0,e.rt=0,e.We=0,e.qe=0,e.tt=0,e.Ge=0}function tt(e){const t=new et,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.He(f),t.$e=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,o=t.Ye(0),0!=o)throw new s("deflating: "+t.Le);t.rt&&(t.rt==n?w.push(new i(c)):w.push(c.subarray(0,t.rt))),u+=t.rt,r&&t.nt>0&&t.nt!=a&&(r(t.nt),a=t.nt)}while(t.We>0||0===t.tt);return w.length>1?(f=new i(u),w.forEach(e=>{f.set(e,l),l+=e.length})):f=w[0]?new i(w[0]):new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.rt=0,t.tt=n,e=t.Ye(4),1!=e&&0!=e)throw new s("deflating: "+t.Le);n-t.tt>0&&a.push(c.slice(0,t.rt)),f+=t.rt}while(t.We>0||0===t.tt);return t.Qe(),r=new i(f),a.forEach(e=>{r.set(e,o),o+=e.length}),r}}et.prototype={He(e,t){const n=this;return n.Fe=new $e,t||(t=15),n.Fe.He(n,e,t)},Ye(e){const t=this;return t.Fe?t.Fe.Ye(t,e):Ne},Qe(){const e=this;if(!e.Fe)return Ne;const t=e.Fe.Qe();return e.Fe=null,t},Xe(e,t){const n=this;return n.Fe?n.Fe.Xe(n,e,t):Ne},Ze(e,t){const n=this;return n.Fe?n.Fe.Ze(n,e,t):Ne},je(e,t,n){const r=this;let s=r.We;return s>n&&(s=n),0===s?0:(r.We-=s,e.set(r.et.subarray(r.nt,r.nt+s),t),r.nt+=s,r.qe+=s,s)},Te(){const e=this;let t=e.Fe.pending;t>e.tt&&(t=e.tt),0!==t&&(e.$e.set(e.Fe.Ke.subarray(e.Fe.Je,e.Fe.Je+t),e.rt),e.rt+=t,e.Fe.Je+=t,e.Ge+=t,e.tt-=t,e.Fe.pending-=t,0===e.Fe.pending&&(e.Fe.Je=0))}};const nt=-2,rt=-3,st=-5,it=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ot=[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],ct=[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],ft=[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],at=[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],lt=[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],ut=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function wt(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,A,I,_,P;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,_=1<<k;g>k;k++,_<<=1)if(0>(_-=n[k]))return rt;if(0>(_-=n[g]))return rt;for(n[g]+=_,i[1]=k=0,C=1,I=2;0!==--g;)i[I]=k+=n[C],I++,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,I=v,P>k))for(;++k<P&&(y<<=1)>n[++I];)y-=n[I];if(P=1<<k,h[0]+P>1440)return rt;s[b]=x=h[0],h[0]+=P,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>A-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-A,o>C?d[C]<c?(r[0]=256>d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<<v-A,k=g>>>A;P>k;k+=y)w.set(r,3*(x+k));for(k=1<<v-1;0!==(g&k);k>>>=1)g^=k;for(g^=k,z=(1<<A)-1;(g&z)!=i[b];)b--,A-=S,z=(1<<A)-1}return 0!==_&&1!=m?st:0}function c(o){let c;for(e||(e=[],t=[],n=new f(16),r=[],s=new f(15),i=new f(16)),t.length<o&&(t=[]),c=0;o>c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.st=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==rt?f.Le="oversubscribed dynamic bit lengths tree":a!=st&&0!==r[0]||(f.Le="incomplete dynamic bit lengths tree",a=rt),a},this.it=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,ft,at,a,i,u,e,t),0!=h||0===i[0]?(h==rt?w.Le="oversubscribed literal/length tree":-4!=h&&(w.Le="incomplete literal/length tree",h=rt),h):(c(288),h=o(s,n,r,0,lt,ut,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==rt?w.Le="oversubscribed distance tree":h==st?(w.Le="incomplete distance tree",h=rt):-4!=h&&(w.Le="empty distance tree with lengths",h=rt),h):0)}}function ht(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.nt,p=c.We,w=o.ot,h=o.ct,y=o.write,m=y<o.read?o.read-y-1:o.end-y,b=it[e],g=it[t];do{for(;20>h;)p--,w|=(255&c.ft(d++))<<h,h+=8;if(f=w&b,a=n,l=r,z=3*(l+f),0!==(u=a[z]))for(;;){if(w>>=a[z+1],h-=a[z+1],16&u){for(u&=15,k=a[z+2]+(w&it[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ft(d++))<<h,h+=8;for(f=w&g,a=s,l=i,z=3*(l+f),u=a[z];;){if(w>>=a[z+1],h-=a[z+1],16&u){for(u&=15;u>h;)p--,w|=(255&c.ft(d++))<<h,h+=8;if(v=a[z+2]+(w&it[u]),w>>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.lt[y++]=o.lt[S++]}while(0!==--u);else o.lt.set(o.lt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.lt[y++]=o.lt[S++],o.lt[y++]=o.lt[S++],k-=2):(o.lt.set(o.lt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.lt[y++]=o.lt[S++]}while(0!==--k);else o.lt.set(o.lt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(64&u)return c.Le="invalid distance code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,rt;f+=a[z+2],f+=w&it[u],z=3*(l+f),u=a[z]}break}if(64&u)return 32&u?(k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,1):(c.Le="invalid literal/length code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,rt);if(f+=a[z+2],f+=w&it[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ut=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,A=0,I=0;for(I=y.nt,v=y.We,x=e.ot,A=e.ct,S=e.write,z=S<e.read?e.read-S-1:e.end-S;;)switch(t){case 0:if(z>=258&&v>=10&&(e.ot=x,e.ct=A,y.We=v,y.qe+=I-y.nt,y.nt=I,e.write=S,m=p(u,w,r,h,s,d,e,y),I=y.nt,v=y.We,x=e.ot,A=e.ct,S=e.write,z=S<e.read?e.read-S-1:e.end-S,0!=m)){t=1==m?7:9;break}c=u,n=r,o=h,t=1;case 1:for(b=c;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=I-y.nt,y.nt=I,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(I++))<<A,A+=8}if(g=3*(o+(x&it[b])),x>>>=n[g+1],A-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(16&k){a=15&k,i=n[g+2],t=2;break}if(!(64&k)){c=k,o=g/3+n[g+2];break}if(32&k){t=7;break}return t=9,y.Le="invalid literal/length code",m=rt,e.ot=x,e.ct=A,y.We=v,y.qe+=I-y.nt,y.nt=I,e.write=S,e.wt(y,m);case 2:for(b=a;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=I-y.nt,y.nt=I,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(I++))<<A,A+=8}i+=x&it[b],x>>=b,A-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=I-y.nt,y.nt=I,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(I++))<<A,A+=8}if(g=3*(o+(x&it[b])),x>>=n[g+1],A-=n[g+1],k=n[g],16&k){a=15&k,l=n[g+2],t=4;break}if(!(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Le="invalid distance code",m=rt,e.ot=x,e.ct=A,y.We=v,y.qe+=I-y.nt,y.nt=I,e.write=S,e.wt(y,m);case 4:for(b=a;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=I-y.nt,y.nt=I,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(I++))<<A,A+=8}l+=x&it[b],x>>=b,A-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z&&(e.write=S,m=e.wt(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z)))return e.ot=x,e.ct=A,y.We=v,y.qe+=I-y.nt,y.nt=I,e.write=S,e.wt(y,m);e.lt[S++]=e.lt[C++],z--,C==e.end&&(C=0),i--}t=0;break;case 6:if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z&&(e.write=S,m=e.wt(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z)))return e.ot=x,e.ct=A,y.We=v,y.qe+=I-y.nt,y.nt=I,e.write=S,e.wt(y,m);m=0,e.lt[S++]=f,z--,t=0;break;case 7:if(A>7&&(A-=8,v++,I--),e.write=S,m=e.wt(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,e.read!=e.write)return e.ot=x,e.ct=A,y.We=v,y.qe+=I-y.nt,y.nt=I,e.write=S,e.wt(y,m);t=8;case 8:return m=1,e.ot=x,e.ct=A,y.We=v,y.qe+=I-y.nt,y.nt=I,e.write=S,e.wt(y,m);case 9:return m=rt,e.ot=x,e.ct=A,y.We=v,y.qe+=I-y.nt,y.nt=I,e.write=S,e.wt(y,m);default:return m=nt,e.ot=x,e.ct=A,y.We=v,y.qe+=I-y.nt,y.nt=I,e.write=S,e.wt(y,m)}},e.ht=()=>{}}wt.dt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=ot,r[0]=ct,0);const dt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function pt(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new ht;let h=0,d=new f(4320);const p=new wt;n.ct=0,n.ot=0,n.lt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.ht(e),s=0,n.ct=0,n.ot=0,n.read=n.write=0},n.reset(e,null),n.wt=(e,t)=>{let r,s,i;return s=e.rt,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.tt&&(r=e.tt),0!==r&&t==st&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.tt&&(r=e.tt),0!==r&&t==st&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r),e.rt=s,n.read=i,t},n.ut=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g<n.read?n.read-g-1:n.end-g;;){let S,z,C,x,A,I,_,P;switch(s){case 0:for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}switch(i=7&f,h=1&i,i>>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],wt.dt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Le="invalid block type",t=rt,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if((~f>>>16&65535)!=(65535&f))return s=9,e.Le="invalid stored block lengths",t=rt,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=g<n.read?n.read-g-1:n.end-g),0===k&&(n.write=g,t=n.wt(e,t),g=n.write,k=g<n.read?n.read-g-1:n.end-g,g==n.end&&0!==n.read&&(g=0,k=g<n.read?n.read-g-1:n.end-g),0===k)))return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(t=0,i=o,i>b&&(i=b),i>k&&(i=k),n.lt.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!==(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if(c=i=16383&f,(31&i)>29||(i>>5&31)>29)return s=9,e.Le="too many length or distance symbols",t=rt,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.length<i)r=[];else for(v=0;i>v;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}r[dt[a++]]=7&f,f>>>=3,y-=3}for(;19>a;)r[dt[a++]]=0;if(l[0]=7,i=p.st(r,l,u,d,e),0!=i)return(t=i)==rt&&(r=null,s=9),n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if(i=d[3*(u[0]+(f&it[i]))+1],w=d[3*(u[0]+(f&it[i]))+2],16>w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if(f>>>=i,y-=i,o+=f&it[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Le="invalid bit length repeat",t=rt,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);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,I[0]=6,i=c,i=p.it(257+(31&i),1+(i>>5&31),r,A,I,_,P,d,e),0!=i)return i==rt&&(r=null,s=9),t=i,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w.init(A[0],I[0],d,_[0],d,P[0]),s=6;case 6:if(n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,1!=(t=w.ut(n,e,t)))return n.wt(e,t);if(t=0,w.ht(e),m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g<n.read?n.read-g-1:n.end-g,0===h){s=0;break}s=7;case 7:if(n.write=g,t=n.wt(e,t),g=n.write,k=g<n.read?n.read-g-1:n.end-g,n.read!=n.write)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);s=8;case 8:return t=1,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);case 9:return t=rt,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);default:return t=nt,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}}},n.ht=e=>{n.reset(e,null),n.lt=null,d=null},n.yt=(e,t,r)=>{n.lt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.bt=()=>1==s?1:0}const yt=13,mt=[0,0,255,255];function bt(){const e=this;function t(e){return e&&e.gt?(e.qe=e.Ge=0,e.Le=null,e.gt.mode=7,e.gt.kt.reset(e,null),0):nt}e.mode=0,e.method=0,e.vt=[0],e.St=0,e.marker=0,e.zt=0,e.Ct=t=>(e.kt&&e.kt.ht(t),e.kt=null,0),e.xt=(n,r)=>(n.Le=null,e.kt=null,8>r||r>15?(e.Ct(n),nt):(e.zt=r,n.gt.kt=new pt(n,1<<r),t(n),0)),e.At=(e,t)=>{let n,r;if(!e||!e.gt||!e.et)return nt;const s=e.gt;for(t=4==t?st:0,n=st;;)switch(s.mode){case 0:if(0===e.We)return n;if(n=t,e.We--,e.qe++,8!=(15&(s.method=e.ft(e.nt++)))){s.mode=yt,e.Le="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.zt){s.mode=yt,e.Le="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.We)return n;if(n=t,e.We--,e.qe++,r=255&e.ft(e.nt++),((s.method<<8)+r)%31!=0){s.mode=yt,e.Le="incorrect header check",s.marker=5;break}if(!(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St=(255&e.ft(e.nt++))<<24&4278190080,s.mode=3;case 3:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<16&16711680,s.mode=4;case 4:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<8&65280,s.mode=5;case 5:return 0===e.We?n:(n=t,e.We--,e.qe++,s.St+=255&e.ft(e.nt++),s.mode=6,2);case 6:return s.mode=yt,e.Le="need dictionary",s.marker=0,nt;case 7:if(n=s.kt.ut(e,n),n==rt){s.mode=yt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.kt.reset(e,s.vt),s.mode=12;case 12:return e.We=0,1;case yt:return rt;default:return nt}},e.It=(e,t,n)=>{let r=0,s=n;if(!e||!e.gt||6!=e.gt.mode)return nt;const i=e.gt;return s<1<<i.zt||(s=(1<<i.zt)-1,r=n-s),i.kt.yt(t,r,s),i.mode=7,0},e._t=e=>{let n,r,s,i,o;if(!e||!e.gt)return nt;const c=e.gt;if(c.mode!=yt&&(c.mode=yt,c.marker=0),0===(n=e.We))return st;for(r=e.nt,s=c.marker;0!==n&&4>s;)e.ft(r)==mt[s]?s++:s=0!==e.ft(r)?0:4-s,r++,n--;return e.qe+=r-e.nt,e.nt=r,e.We=n,c.marker=s,4!=s?rt:(i=e.qe,o=e.Ge,t(e),e.qe=i,e.Ge=o,c.mode=7,0)},e.Pt=e=>e&&e.gt&&e.gt.kt?e.gt.kt.bt():nt}function gt(){}function kt(e){const t=new gt,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.xt(),t.$e=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,0!==t.We||c||(t.nt=0,c=!0),a=t.At(0),c&&a===st){if(0!==t.We)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Le);if((c||1===a)&&t.We===e.length)throw new s("inflating: bad input");t.rt&&(t.rt===n?f.push(new i(o)):f.push(o.subarray(0,t.rt))),h+=t.rt,r&&t.nt>0&&t.nt!=u&&(r(t.nt),u=t.nt)}while(t.We>0||0===t.tt);return f.length>1?(l=new i(h),f.forEach(e=>{l.set(e,w),w+=e.length})):l=f[0]?new i(f[0]):new i,l}},this.flush=()=>{t.Ct()}}gt.prototype={xt(e){const t=this;return t.gt=new bt,e||(e=15),t.gt.xt(t,e)},At(e){const t=this;return t.gt?t.gt.At(t,e):nt},Ct(){const e=this;if(!e.gt)return nt;const t=e.gt.Ct(e);return e.gt=null,t},_t(){const e=this;return e.gt?e.gt._t(e):nt},It(e,t){const n=this;return n.gt?n.gt.It(n,e,t):nt},ft(e){return this.et[e]},je(e,t){return this.et.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=tt,self.Inflate=kt};
|
|
2
|
+
`,r=()=>e.useDataURI?"data:text/javascript,"+encodeURIComponent(n):URL.createObjectURL(new Blob([n],{type:"text/javascript"}));t({workerScripts:{inflate:[r],deflate:[r]}})}const N0="Writer iterator completed too soon",$0="text/plain",U0="Content-Type",V0=64*1024,xa="writable";class Bs{constructor(){this.size=0}init(){this.initialized=!0}}class ga extends Bs{get readable(){const e=this,{chunkSize:n=V0}=e,r=new ReadableStream({start(){this.chunkOffset=0},async pull(s){const{offset:i=0,size:o,diskNumberStart:a}=r,{chunkOffset:c}=this,u=o===X?n:Math.min(n,o-c),l=await Pe(e,i+c,u,a);s.enqueue(l),c+n>o||o===X&&!l.length&&u?s.close():this.chunkOffset+=n}});return r}}class Da extends ga{constructor(e){super(),Object.assign(this,{blob:e,size:e.size})}async readUint8Array(e,n){const r=this,s=e+n;let o=await(e||s<r.size?r.blob.slice(e,s):r.blob).arrayBuffer();return o.byteLength>n&&(o=o.slice(e,s)),new Uint8Array(o)}}class j0 extends Bs{constructor(e){super();const n=this,r=new TransformStream,s=[];e&&s.push([U0,e]),Object.defineProperty(n,xa,{get(){return r.writable}}),n.blob=new Response(r.readable,{headers:s}).blob()}getData(){return this.blob}}class Le extends Da{constructor(e){super(new Blob([e],{type:$0}))}}class q0 extends ga{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:n}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await Promise.all(n.map(async(r,s)=>{await r.init(),s!=n.length-1&&(e.lastDiskOffset+=r.size),e.size+=r.size})),super.init()}async readUint8Array(e,n,r=0){const s=this,{readers:i}=this;let o,a=r;a==-1&&(a=i.length-1);let c=e;for(;i[a]&&c>=i[a].size;)c-=i[a].size,a++;const u=i[a];if(u){const l=u.size;if(c+n<=l)o=await Pe(u,c,n);else{const d=l-c;o=new Uint8Array(n);const m=await Pe(u,c,d);o.set(m,0);const g=await s.readUint8Array(e+d,n-d,r);o.set(g,d),m.length+g.length<n&&(o=o.subarray(0,m.length+g.length))}}else o=new Uint8Array;return s.lastDiskNumber=Math.max(a,s.lastDiskNumber),o}}class Hi extends Bs{constructor(e,n=4294967295){super();const r=this;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:n,availableSize:n});let s,i,o;const a=new WritableStream({async write(l){const{availableSize:d}=r;if(o)l.length>=d?(await c(l.subarray(0,d)),await u(),r.diskOffset+=s.size,r.diskNumber++,o=null,await this.write(l.subarray(d))):await c(l);else{const{value:m,done:g}=await e.next();if(g&&!m)throw new Error(N0);s=m,s.size=0,s.maxSize&&(r.maxSize=s.maxSize),r.availableSize=r.maxSize,await Ut(s),i=m.writable,o=i.getWriter(),await this.write(l)}},async close(){await o.ready,await u()}});Object.defineProperty(r,xa,{get(){return a}});async function c(l){const d=l.length;d&&(await o.ready,await o.write(l),s.size+=d,r.size+=d,r.availableSize-=d)}async function u(){await o.close()}}}class Os{constructor(e){return Array.isArray(e)&&(e=new q0(e)),e instanceof ReadableStream&&(e={readable:e}),e}}class wa{constructor(e){return e.writable===X&&typeof e.next==Tn&&(e=new Hi(e)),e instanceof WritableStream&&(e={writable:e}),e.size===X&&(e.size=0),e instanceof Hi||Object.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}}async function Ut(t,e){if(t.init&&!t.initialized)await t.init(e);else return Promise.resolve()}function Pe(t,e,n,r){return t.readUint8Array(e,n,r)}const ya="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""),W0=ya.length==256;function Y0(t){if(W0){let e="";for(let n=0;n<t.length;n++)e+=ya[t[n]];return e}else return new TextDecoder().decode(t)}function Jn(t,e){return e&&e.trim().toLowerCase()=="cp437"?Y0(t):new TextDecoder(e).decode(t)}const _a="filename",ba="rawFilename",Rs="comment",Aa="rawComment",Ls="uncompressedSize",Ea="compressedSize",va="offset",fs="diskNumberStart",or="lastModDate",ds="rawLastModDate",Ns="lastAccessDate",H0="rawLastAccessDate",$s="creationDate",G0="rawCreationDate",Ca="internalFileAttribute",Fa="internalFileAttributes",Sa="externalFileAttribute",Ta="externalFileAttributes",ka="msDosCompatible",Us="zip64",Pa="encrypted",Ia="version",Ma="versionMadeBy",Ba="zipCrypto",Qn="directory",Oa="executable",Ra="compressionMethod",La="signature",Na="extraField",Z0=[_a,ba,Ea,Ls,or,ds,Rs,Aa,Ns,$s,va,fs,fs,Ca,Fa,Sa,Ta,ka,Us,Pa,Ia,Ma,Ba,Qn,Oa,Ra,La,Na,"bitFlag","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class ar{constructor(e){Z0.forEach(n=>this[n]=e[n])}}const X0="filenameEncoding",z0="commentEncoding",K0="decodeText",J0="extractPrependedData",Q0="extractAppendedData",$a="password",Ua="rawPassword",Va="passThrough",ja="signal",el="checkPasswordOnly",tl="checkOverlappingEntryOnly",nl="checkOverlappingEntry",rl="checkSignature",qa="useWebWorkers",Wa="useCompressionStream",sl="transferStreams",Ya="preventClose",il="encryptionStrength",ol="extendedTimestamp",al="keepOrder",cl="level",ul="bufferedWrite",ll="dataDescriptorSignature",fl="useUnicodeFileNames",dl="dataDescriptor",Ha="supportZip64SplitFile",pl="encodeText",Gi="offset",Ga="usdz",Hr="File format is not recognized",hl="End of central directory not found",ml="End of Zip64 central directory locator not found",xl="Central directory header not found",gl="Local file header not found",Dl="Zip64 extra field not found",wl="File contains encrypted entry",yl="Encryption method not supported",Zi="Compression method not supported",Xi="Split zip file",_l="Overlapping entry found",zi="utf-8",Ki="cp437",bl=[[Ls,be],[Ea,be],[va,be],[fs,ye]],Al={[ye]:{getValue:de,bytes:4},[be]:{getValue:cn,bytes:8}};class El{constructor(e,n={}){Object.assign(this,{reader:new Os(e),options:n,config:Wo(),readRanges:[]})}async*getEntriesGenerator(e={}){const n=this;let{reader:r}=n;const{config:s}=n;if(await Ut(r),(r.size===X||!r.readUint8Array)&&(r=new Da(await new Response(r.readable).blob()),await Ut(r)),r.size<bt)throw new Error(Hr);r.chunkSize=Yo(s);const i=await Pl(r,Mo,r.size,bt,ye*16);if(!i){const C=await Pe(r,0,4),v=xe(C);throw de(v)==Fs?new Error(Xi):new Error(hl)}const o=xe(i);let a=de(o,12),c=de(o,16);const u=i.offset,l=Se(o,20),d=u+bt+l;let m=Se(o,4);const g=r.lastDiskNumber||0;let D=Se(o,6),f=Se(o,8),p=0,h=0;if(c==be||a==be||f==ye||D==ye){const C=await Pe(r,i.offset-_n,_n),v=xe(C);if(de(v,0)==Bo){c=cn(v,8);let O=await Pe(r,c,bn,-1),P=xe(O);const R=i.offset-_n-bn;if(de(P,0)!=ss&&c!=R){const B=c;c=R,c>B&&(p=c-B),O=await Pe(r,c,bn,-1),P=xe(O)}if(de(P,0)!=ss)throw new Error(ml);m==ye&&(m=de(P,16)),D==ye&&(D=de(P,20)),f==ye&&(f=cn(P,32)),a==be&&(a=cn(P,40)),c-=a}}if(c>=r.size&&(p=r.size-c-a-bt,c=r.size-a-bt),g!=m)throw new Error(Xi);if(c<0)throw new Error(Hr);let x=0,y=await Pe(r,c,a,D),E=xe(y);if(a){const C=i.offset-a;if(de(E,x)!=rs&&c!=C){const v=c;c=C,c>v&&(p+=c-v),y=await Pe(r,c,a,D),E=xe(y)}}const _=i.offset-c-(r.lastDiskOffset||0);if(a!=_&&_>=0&&(a=_,y=await Pe(r,c,a,D),E=xe(y)),c<0||c>=r.size)throw new Error(Hr);const w=Te(n,e,X0),b=Te(n,e,z0);for(let C=0;C<f;C++){const v=new vl(r,s,n.options);if(de(E,x)!=rs)throw new Error(xl);Za(v,E,x+6);const O=!!v.bitFlag.languageEncodingFlag,P=x+46,R=P+v.filenameLength,B=R+v.extraFieldLength,L=Se(E,x+4),V=L>>8==0,j=L>>8==3,re=y.subarray(P,R),U=Se(E,x+32),ce=B+U,$=y.subarray(B,ce),q=O,he=O,G=de(E,x+38),Z=V&&(an(E,x+38)&cs)==cs||j&&(G>>16&Ku)==jo||re.length&&re[re.length-1]==An.charCodeAt(0),oe=j&&(G>>16&us)!=0,W=de(E,x+42)+p;Object.assign(v,{versionMadeBy:L,msDosCompatible:V,compressedSize:0,uncompressedSize:0,commentLength:U,directory:Z,offset:W,diskNumberStart:Se(E,x+34),internalFileAttributes:Se(E,x+36),externalFileAttributes:G,rawFilename:re,filenameUTF8:q,commentUTF8:he,rawExtraField:y.subarray(R,B),executable:oe}),v.internalFileAttribute=v.internalFileAttributes,v.externalFileAttribute=v.externalFileAttributes;const ft=Te(n,e,K0)||Jn,dt=q?zi:w||Ki,jt=he?zi:b||Ki;let Be=ft(re,dt);Be===X&&(Be=Jn(re,dt));let We=ft($,jt);We===X&&(We=Jn($,jt)),Object.assign(v,{rawComment:$,filename:Be,comment:We,directory:Z||Be.endsWith(An)}),h=Math.max(W,h),Xa(v,v,E,x+6),v.zipCrypto=v.encrypted&&!v.extraFieldAES;const ze=new ar(v);ze.getData=(Ae,Ye)=>v.getData(Ae,ze,n.readRanges,Ye),ze.arrayBuffer=async Ae=>{const Ye=new TransformStream,[Ke]=await Promise.all([new Response(Ye.readable).arrayBuffer(),v.getData(Ye,ze,n.readRanges,Ae)]);return Ke},x=ce;const{onprogress:ge}=e;if(ge)try{await ge(C+1,f,new ar(v))}catch{}yield ze}const A=Te(n,e,J0),F=Te(n,e,Q0);return A&&(n.prependedData=h>0?await Pe(r,0,h):new Uint8Array),n.comment=l?await Pe(r,u+bt,l):new Uint8Array,F&&(n.appendedData=d<r.size?await Pe(r,d,r.size-d):new Uint8Array),!0}async getEntries(e={}){const n=[];for await(const r of this.getEntriesGenerator(e))n.push(r);return n}async close(){}}class vl{constructor(e,n,r){Object.assign(this,{reader:e,config:n,options:r})}async getData(e,n,r,s={}){const i=this,{reader:o,offset:a,diskNumberStart:c,extraFieldAES:u,extraFieldZip64:l,compressionMethod:d,config:m,bitFlag:g,signature:D,rawLastModDate:f,uncompressedSize:p,compressedSize:h}=i,{dataDescriptor:x}=g,y=n.localDirectory={},E=await Pe(o,a,Xt,c),_=xe(E);let w=Te(i,s,$a),b=Te(i,s,Ua);const A=Te(i,s,Va);if(w=w&&w.length&&w,b=b&&b.length&&b,u&&u.originalCompressionMethod!=ko)throw new Error(Zi);if(d!=To&&d!=Cs&&!A)throw new Error(Zi);if(de(_,0)!=Po)throw new Error(gl);Za(y,_,4);const{extraFieldLength:F,filenameLength:C,lastAccessDate:v,creationDate:O}=y;y.rawExtraField=F?await Pe(o,a+Xt+C,F,c):new Uint8Array,Xa(i,y,_,4,!0),Object.assign(n,{lastAccessDate:v,creationDate:O});const P=i.encrypted&&y.encrypted&&!A,R=P&&!u;if(A||(n.zipCrypto=R),P){if(!R&&u.strength===X)throw new Error(yl);if(!w&&!b)throw new Error(wl)}const B=a+Xt+C+F,L=h,V=o.readable;Object.assign(V,{diskNumberStart:c,offset:B,size:L});const j=Te(i,s,ja),re=Te(i,s,el);let U=Te(i,s,nl);const ce=Te(i,s,tl);ce&&(U=!0);const{onstart:$,onprogress:q,onend:he}=s,G={options:{codecType:da,password:w,rawPassword:b,zipCrypto:R,encryptionStrength:u&&u.strength,signed:Te(i,s,rl)&&!A,passwordVerification:R&&(x?f>>>8&255:D>>>24&255),outputSize:p,signature:D,compressed:d!=0&&!A,encrypted:i.encrypted&&!A,useWebWorkers:Te(i,s,qa),useCompressionStream:Te(i,s,Wa),transferStreams:Te(i,s,sl),checkPasswordOnly:re},config:m,streamOptions:{signal:j,size:L,onstart:$,onprogress:q,onend:he}};U&&await kl({reader:o,fileEntry:n,offset:a,diskNumberStart:c,signature:D,compressedSize:h,uncompressedSize:p,dataOffset:B,dataDescriptor:x||y.bitFlag.dataDescriptor,extraFieldZip64:l||y.extraFieldZip64,readRanges:r});let Z;try{if(!ce){re&&(e=new WritableStream),e=new wa(e),await Ut(e,A?h:p),{writable:Z}=e;const{outputSize:oe}=await ma({readable:V,writable:Z},G);if(e.size+=oe,oe!=(A?h:p))throw new Error(ca)}}catch(oe){if(oe.outputSize!==X&&(e.size+=oe.outputSize),!re||oe.message!=Ps)throw oe}finally{!Te(i,s,Ya)&&Z&&!Z.locked&&await Z.getWriter().close()}return re||ce?X:e.getData?e.getData():Z}}function Za(t,e,n){const r=t.rawBitFlag=Se(e,n+2),s=(r&is)==is,i=de(e,n+6);Object.assign(t,{encrypted:s,version:Se(e,n),bitFlag:{level:(r&Gu)>>1,dataDescriptor:(r&os)==os,languageEncodingFlag:(r&as)==as},rawLastModDate:i,lastModDate:Il(i),filenameLength:Se(e,n+22),extraFieldLength:Se(e,n+24)})}function Xa(t,e,n,r,s){const{rawExtraField:i}=e,o=e.extraField=new Map,a=xe(new Uint8Array(i));let c=0;try{for(;c<i.length;){const h=Se(a,c),x=Se(a,c+2);o.set(h,{type:h,data:i.slice(c+4,c+4+x)}),c+=4+x}}catch{}const u=Se(n,r+4);Object.assign(e,{signature:de(n,r+Ts),compressedSize:de(n,r+un),uncompressedSize:de(n,r+ln)});const l=o.get(Lo);l&&(Cl(l,e),e.extraFieldZip64=l);const d=o.get(Yu);d&&(Ji(d,_a,ba,e,t),e.extraFieldUnicodePath=d);const m=o.get(Hu);m&&(Ji(m,Rs,Aa,e,t),e.extraFieldUnicodeComment=m);const g=o.get(No);g?(Fl(g,e,u),e.extraFieldAES=g):e.compressionMethod=u;const D=o.get($o);D&&(Sl(D,e),e.extraFieldNTFS=D);const f=o.get(Ss);f&&(Tl(f,e,s),e.extraFieldExtendedTimestamp=f);const p=o.get(Vo);p&&(e.extraFieldUSDZ=p)}function Cl(t,e){e.zip64=!0;const n=xe(t.data),r=bl.filter(([s,i])=>e[s]==i);for(let s=0,i=0;s<r.length;s++){const[o,a]=r[s];if(e[o]==a){const c=Al[a];e[o]=t[o]=c.getValue(n,i),i+=c.bytes}else if(t[o])throw new Error(Dl)}}function Ji(t,e,n,r,s){const i=xe(t.data),o=new sr;o.append(s[n]);const a=xe(new Uint8Array(4));a.setUint32(0,o.get(),!0);const c=de(i,1);Object.assign(t,{version:an(i,0),[e]:Jn(t.data.subarray(5)),valid:!s.bitFlag.languageEncodingFlag&&c==de(a,0)}),t.valid&&(r[e]=t[e],r[e+"UTF8"]=!0)}function Fl(t,e,n){const r=xe(t.data),s=an(r,4);Object.assign(t,{vendorVersion:an(r,0),vendorId:an(r,2),strength:s,originalCompressionMethod:n,compressionMethod:Se(r,5)}),e.compressionMethod=t.compressionMethod}function Sl(t,e){const n=xe(t.data);let r=4,s;try{for(;r<t.data.length&&!s;){const i=Se(n,r),o=Se(n,r+2);i==Uo&&(s=t.data.slice(r+4,r+4+o)),r+=4+o}}catch{}try{if(s&&s.length==24){const i=xe(s),o=i.getBigUint64(0,!0),a=i.getBigUint64(8,!0),c=i.getBigUint64(16,!0);Object.assign(t,{rawLastModDate:o,rawLastAccessDate:a,rawCreationDate:c});const u=Gr(o),l=Gr(a),d=Gr(c),m={lastModDate:u,lastAccessDate:l,creationDate:d};Object.assign(t,m),Object.assign(e,m)}}catch{}}function Tl(t,e,n){const r=xe(t.data),s=an(r,0),i=[],o=[];n?((s&1)==1&&(i.push(or),o.push(ds)),(s&2)==2&&(i.push(Ns),o.push(H0)),(s&4)==4&&(i.push($s),o.push(G0))):t.data.length>=5&&(i.push(or),o.push(ds));let a=1;i.forEach((c,u)=>{if(t.data.length>=a+4){const l=de(r,a);e[c]=t[c]=new Date(l*1e3);const d=o[u];t[d]=l}a+=4})}async function kl({reader:t,fileEntry:e,offset:n,diskNumberStart:r,signature:s,compressedSize:i,uncompressedSize:o,dataOffset:a,dataDescriptor:c,extraFieldZip64:u,readRanges:l}){let d=0;if(r)for(let D=0;D<r;D++){const f=t.readers[D];d+=f.size}let m=0;if(c&&(u?m=Ro:m=Oo),m){const D=await Pe(t,a+i,m+rr,r);if(de(xe(D),0)==Io){const p=de(xe(D),4);let h,x;u?(h=cn(xe(D),8),x=cn(xe(D),16)):(h=de(xe(D),8),x=de(xe(D),12)),(e.encrypted&&!e.zipCrypto||p==s)&&h==i&&x==o&&(m+=rr)}}const g={start:d+n,end:d+a+i+m,fileEntry:e};for(const D of l)if(D.fileEntry!=e&&g.start>=D.start&&g.start<D.end){const f=new Error(_l);throw f.overlappingEntry=D.fileEntry,f}l.push(g)}async function Pl(t,e,n,r,s){const i=new Uint8Array(4),o=xe(i);Ml(o,0,e);const a=r+s;return await c(r)||await c(Math.min(a,n));async function c(u){const l=n-u,d=await Pe(t,l,u);for(let m=d.length-r;m>=0;m--)if(d[m]==i[0]&&d[m+1]==i[1]&&d[m+2]==i[2]&&d[m+3]==i[3])return{offset:l+m,buffer:d.slice(m,m+r).buffer}}}function Te(t,e,n){return e[n]===X?t.options[n]:e[n]}function Il(t){const e=(t&4294901760)>>16,n=t&65535;try{return new Date(1980+((e&65024)>>9),((e&480)>>5)-1,e&31,(n&63488)>>11,(n&2016)>>5,(n&31)*2,0)}catch{}}function Gr(t){return new Date(Number(t/BigInt(1e4)-BigInt(116444736e5)))}function an(t,e){return t.getUint8(e)}function Se(t,e){return t.getUint16(e,!0)}function de(t,e){return t.getUint32(e,!0)}function cn(t,e){return Number(t.getBigUint64(e,!0))}function Ml(t,e,n){t.setUint32(e,n,!0)}function xe(t){return new DataView(t.buffer)}const Bl="File already exists",Ol="Zip file comment exceeds 64KB",Rl="File entry comment exceeds 64KB",Ll="File entry name exceeds 64KB",Qi="Version exceeds 65535",Nl="The strength must equal 1, 2, or 3",$l="Extra field type exceeds 65535",Ul="Extra field data exceeds 64KB",Vs="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Vl="Undefined uncompressed size",jl="Zip file not empty",eo=new Uint8Array([7,0,2,0,65,69,3,0,0]);let Zr=0;const to=[];class ql{constructor(e,n={}){e=new wa(e);const r=e.availableSize!==X&&e.availableSize>0&&e.availableSize!==1/0&&e.maxSize!==X&&e.maxSize>0&&e.maxSize!==1/0;Object.assign(this,{writer:e,addSplitZipSignature:r,options:n,config:Wo(),files:new Map,filenames:new Set,offset:n[Gi]===X?e.size||e.writable.size||0:n[Gi],pendingEntriesSize:0,pendingAddFileCalls:new Set,bufferedWrites:0})}async prependZip(e){if(this.filenames.size)throw new Error(jl);e=new Os(e);const n=new El(e.readable),r=await n.getEntries();await n.close(),await e.readable.pipeTo(this.writer.writable,{preventClose:!0,preventAbort:!0}),this.writer.size=this.offset=e.size,this.filenames=new Set(r.map(s=>s.filename)),this.files=new Map(r.map(s=>{const{version:i,compressionMethod:o,lastModDate:a,lastAccessDate:c,creationDate:u,rawFilename:l,bitFlag:d,encrypted:m,uncompressedSize:g,compressedSize:D,diskOffset:f,diskNumber:p,zip64:h}=s;let{rawExtraFieldZip64:x,rawExtraFieldAES:y,rawExtraFieldExtendedTimestamp:E,rawExtraFieldNTFS:_,rawExtraField:w}=s;const{level:b,languageEncodingFlag:A,dataDescriptor:F}=d;x=x||new Uint8Array,y=y||new Uint8Array,E=E||new Uint8Array,_=_||new Uint8Array,w=w||new Uint8Array;const C=Q(x,y,E,_,w),v=h&&g>be,O=h&&D>be,{headerArray:P,headerView:R}=za({version:i,bitFlag:Ka(b,A,F,m,o),compressionMethod:o,uncompressedSize:g,compressedSize:D,lastModDate:a,rawFilename:l,zip64CompressedSize:O,zip64UncompressedSize:v,extraFieldLength:C});return Object.assign(s,{zip64UncompressedSize:v,zip64CompressedSize:O,zip64Offset:h&&this.offset-f>be,zip64DiskNumberStart:h&&p>ye,rawExtraFieldZip64:x,rawExtraFieldAES:y,rawExtraFieldExtendedTimestamp:E,rawExtraFieldNTFS:_,rawExtraField:w,extendedTimestamp:E.length>0||_.length>0,extraFieldExtendedTimestampFlag:1+(c?2:0)+(u?4:0),headerArray:P,headerView:R}),[s.filename,s]}))}async add(e="",n,r={}){const s=this,{pendingAddFileCalls:i,config:o}=s;Zr<o.maxWorkers?Zr++:await new Promise(c=>to.push(c));let a;try{if(e=e.trim(),s.filenames.has(e))throw new Error(Bl);return s.filenames.add(e),a=Wl(s,e,n,r),i.add(a),await a}catch(c){throw s.filenames.delete(e),c}finally{i.delete(a);const c=to.shift();c?c():Zr--}}remove(e){const{filenames:n,files:r}=this;if(typeof e=="string"&&(e=r.get(e)),e&&e.filename!==X){const{filename:s}=e;if(n.has(s)&&r.has(s))return n.delete(s),r.delete(s),!0}return!1}async close(e=new Uint8Array,n={}){const r=this,{pendingAddFileCalls:s,writer:i}=this,{writable:o}=i;for(;s.size;)await Promise.allSettled(Array.from(s));return await Jl(this,e,n),te(r,n,Ya)||await o.getWriter().close(),i.getData?i.getData():o}}async function Wl(t,e,n,r){e=e.trim();const s=te(t,r,ka),i=te(t,r,Ma,s?20:768),o=te(t,r,Oa);if(i>ye)throw new Error(Qi);let a=te(t,r,Ta,0);a===0&&(a=te(t,r,Sa,0)),!r[Qn]&&e.endsWith(An)&&(r[Qn]=!0),te(t,r,Qn)?(e.endsWith(An)||(e+=An),a===0&&(a=cs,s||(a|=(jo|us|Vr)<<16))):!s&&a===0&&(o?a=(us|Vr)<<16:a=Vr<<16);const u=te(t,r,pl,zn);let l=u(e);if(l===X&&(l=zn(e)),Q(l)>ye)throw new Error(Ll);const d=r[Rs]||"";let m=u(d);if(m===X&&(m=zn(d)),Q(m)>ye)throw new Error(Rl);const g=te(t,r,Ia,Ju);if(g>ye)throw new Error(Qi);const D=te(t,r,or,new Date),f=te(t,r,Ns),p=te(t,r,$s);let h=te(t,r,Fa,0);h===0&&(h=te(t,r,Ca,0));const x=te(t,r,Va);let y,E;x||(y=te(t,r,$a),E=te(t,r,Ua));const _=te(t,r,il,3),w=te(t,r,Ba),b=te(t,r,ol,!0),A=te(t,r,al,!0),F=te(t,r,cl),C=te(t,r,qa),v=te(t,r,ul),O=te(t,r,ll,!1),P=te(t,r,ja),R=te(t,r,fl,!0),B=te(t,r,Wa),L=te(t,r,Ra);let V=te(t,r,dl);v&&V===X&&(V=!1),(V===X||w)&&(V=!0);let j=te(t,r,Us);if(!w&&(y!==X||E!==X)&&!(_>=1&&_<=3))throw new Error(Nl);let re=new Uint8Array;const U=r[Na];if(U){let Ke=0,pt=0;U.forEach(Je=>Ke+=4+Q(Je)),re=new Uint8Array(Ke),U.forEach((Je,He)=>{if(He>ye)throw new Error($l);if(Q(Je)>ye)throw new Error(Ul);ve(re,new Uint16Array([He]),pt),ve(re,new Uint16Array([Q(Je)]),pt+2),ve(re,Je,pt+4),pt+=4+Q(Je)})}let ce=0,$=0,q=0;if(x&&(q=r[Ls],q===X))throw new Error(Vl);const he=j===!0;n&&(n=new Os(n),await Ut(n),x?(r.uncompressedSize=q,ce=ro(q)):n.size===X?(V=!0,(j||j===X)&&(j=!0,q=ce=be+1)):(r.uncompressedSize=q=n.size,ce=ro(q)));const{diskOffset:G,diskNumber:Z,maxSize:oe}=t.writer,W=he||q>be,ft=he||ce>be,dt=he||t.offset+t.pendingEntriesSize-G>be,Be=te(t,r,Ha,!0)&&he||Z+Math.ceil(t.pendingEntriesSize/oe)>ye;if(dt||W||ft||Be){if(j===!1||!A)throw new Error(Vs);j=!0}j=j||!1;const We=te(t,r,Pa);r=Object.assign({},r,{rawFilename:l,rawComment:m,version:g,versionMadeBy:i,lastModDate:D,lastAccessDate:f,creationDate:p,rawExtraField:re,zip64:j,zip64UncompressedSize:W,zip64CompressedSize:ft,zip64Offset:dt,zip64DiskNumberStart:Be,password:y,rawPassword:E,level:!B&&t.config.CompressionStream===X&&t.config.CompressionStreamNative===X?0:F,useWebWorkers:C,encryptionStrength:_,extendedTimestamp:b,zipCrypto:w,bufferedWrite:v,keepOrder:A,useUnicodeFileNames:R,dataDescriptor:V,dataDescriptorSignature:O,signal:P,msDosCompatible:s,internalFileAttribute:h,internalFileAttributes:h,externalFileAttribute:a,externalFileAttributes:a,useCompressionStream:B,passThrough:x,encrypted:!!(y&&Q(y)||E&&Q(E))||x&&We,signature:r[La],compressionMethod:L,uncompressedSize:q,offset:t.offset-G,diskNumberStart:Z});const ze=Gl(r),ge=Xl(r),Ae=Q(ze.localHeaderArray,ge.dataDescriptorArray);$=Ae+ce,t.options[Ga]&&($+=$+64),t.pendingEntriesSize+=$;let Ye;try{Ye=await Yl(t,e,n,{headerInfo:ze,dataDescriptorInfo:ge,metadataSize:Ae},r)}finally{t.pendingEntriesSize-=$}return Object.assign(Ye,{name:e,comment:d,extraField:U}),new ar(Ye)}async function Yl(t,e,n,r,s){const{files:i,writer:o}=t,{keepOrder:a,dataDescriptor:c,signal:u}=s,{headerInfo:l}=r,d=t.options[Ga],m=Array.from(i.values()).pop();let g={},D,f,p,h,x,y,E;i.set(e,g);try{let A;a&&(A=m&&m.lock,_()),(s.bufferedWrite||t.writerLocked||t.bufferedWrites&&a||!c)&&!d?(y=new TransformStream,y.size=0,D=!0,t.bufferedWrites++,await Ut(o)):(y=o,await w()),await Ut(y);const{writable:F,diskOffset:C}=o;if(t.addSplitZipSignature){delete t.addSplitZipSignature;const B=new Uint8Array(4),L=Me(B);J(L,0,Fs),await Et(o,B),t.offset+=4}d&&Zl(r,t.offset-C);const{localHeaderView:v,localHeaderArray:O}=l;D||(await A,await b(F));const{diskNumber:P}=o;x=!0,g.diskNumberStart=P,D?E=new Response(y.readable).blob():await Et(y,O),g=await Hl(n,y,g,r,t.config,s);const{zip64:R}=g;if(x=!1,i.set(e,g),g.filename=e,D){const[B]=await Promise.all([E,y.writable.getWriter().close(),A]);await w(),h=!0,g.diskNumberStart=o.diskNumber,g.offset=t.offset-o.diskOffset,R&&no(g),Kl(g,v,s),await b(F),await Et(o,O),await B.stream().pipeTo(F,{preventClose:!0,preventAbort:!0,signal:u}),o.size+=y.size,h=!1}else g.offset=t.offset-C,R&&no(g);if(g.offset>be&&!R)throw new Error(Vs);return t.offset+=g.size,g}catch(A){if(D&&h||!D&&x){if(t.hasCorruptedEntries=!0,A)try{A.corruptedEntry=!0}catch{}D?t.offset+=y.size:t.offset=y.size}throw i.delete(e),A}finally{D&&t.bufferedWrites--,p&&p(),f&&f()}function _(){g.lock=new Promise(A=>p=A)}async function w(){t.writerLocked=!0;const{lockWriter:A}=t;t.lockWriter=new Promise(F=>f=()=>{t.writerLocked=!1,F()}),await A}async function b(A){Q(l.localHeaderArray)>o.availableSize&&(o.availableSize=0,await Et(A,new Uint8Array))}}async function Hl(t,e,{diskNumberStart:n,lock:r},s,i,o){const{headerInfo:a,dataDescriptorInfo:c,metadataSize:u}=s,{headerArray:l,headerView:d,lastModDate:m,rawLastModDate:g,encrypted:D,compressed:f,version:p,compressionMethod:h,rawExtraFieldZip64:x,localExtraFieldZip64Length:y,rawExtraFieldExtendedTimestamp:E,extraFieldExtendedTimestampFlag:_,rawExtraFieldNTFS:w,rawExtraFieldAES:b}=a,{dataDescriptorArray:A}=c,{rawFilename:F,lastAccessDate:C,creationDate:v,password:O,rawPassword:P,level:R,zip64:B,zip64UncompressedSize:L,zip64CompressedSize:V,zip64Offset:j,zip64DiskNumberStart:re,zipCrypto:U,dataDescriptor:ce,directory:$,executable:q,versionMadeBy:he,rawComment:G,rawExtraField:Z,useWebWorkers:oe,onstart:W,onprogress:ft,onend:dt,signal:jt,encryptionStrength:Be,extendedTimestamp:We,msDosCompatible:ze,internalFileAttributes:ge,externalFileAttributes:Ae,useCompressionStream:Ye,passThrough:Ke}=o,pt={lock:r,versionMadeBy:he,zip64:B,directory:!!$,executable:!!q,filenameUTF8:!0,rawFilename:F,commentUTF8:!0,rawComment:G,rawExtraFieldZip64:x,localExtraFieldZip64Length:y,rawExtraFieldExtendedTimestamp:E,rawExtraFieldNTFS:w,rawExtraFieldAES:b,rawExtraField:Z,extendedTimestamp:We,msDosCompatible:ze,internalFileAttributes:ge,externalFileAttributes:Ae,diskNumberStart:n};let{signature:Je,uncompressedSize:He}=o,kt=0;Ke||(He=0);const{writable:Mn}=e;if(t){t.chunkSize=Yo(i);const Cr=t.readable,Bn=t.size,Fr={options:{codecType:fa,level:R,rawPassword:P,password:O,encryptionStrength:Be,zipCrypto:D&&U,passwordVerification:D&&U&&g>>8&255,signed:!Ke,compressed:f&&!Ke,encrypted:D&&!Ke,useWebWorkers:oe,useCompressionStream:Ye,transferStreams:!1},config:i,streamOptions:{signal:jt,size:Bn,onstart:W,onprogress:ft,onend:dt}};try{const Oe=await ma({readable:Cr,writable:Mn},Fr);kt=Oe.outputSize,e.size+=kt,Ke||(He=Oe.inputSize,Je=Oe.signature)}catch(Oe){throw Oe.outputSize!==X&&(e.size+=Oe.outputSize),Oe}}return zl({signature:Je,compressedSize:kt,uncompressedSize:He,headerInfo:a,dataDescriptorInfo:c},o),ce&&await Et(e,A),Object.assign(pt,{uncompressedSize:He,compressedSize:kt,lastModDate:m,rawLastModDate:g,creationDate:v,lastAccessDate:C,encrypted:D,zipCrypto:U,size:u+kt,compressionMethod:h,version:p,headerArray:l,headerView:d,signature:Je,extraFieldExtendedTimestampFlag:_,zip64UncompressedSize:L,zip64CompressedSize:V,zip64Offset:j,zip64DiskNumberStart:re}),pt}function Gl(t){const{rawFilename:e,lastModDate:n,lastAccessDate:r,creationDate:s,level:i,zip64:o,zipCrypto:a,useUnicodeFileNames:c,dataDescriptor:u,directory:l,rawExtraField:d,encryptionStrength:m,extendedTimestamp:g,passThrough:D,encrypted:f,zip64UncompressedSize:p,zip64CompressedSize:h,zip64Offset:x,zip64DiskNumberStart:y,uncompressedSize:E,offset:_,diskNumberStart:w}=t;let{version:b,compressionMethod:A}=t;const F=!l&&(i>0||i===X&&A!==0);let C;const v=D||!F,O=o&&(t.bufferedWrite||!p&&!h||v);if(o){let G=4;p&&(G+=8),h&&(G+=8),x&&(G+=8),y&&(G+=4),C=new Uint8Array(G);const Z=Me(C);if(se(Z,0,Lo),se(Z,2,Q(C)-4),O){const oe=Me(C);let W=4;p&&(Ce(oe,W,BigInt(E)),W+=8),h&&v&&(Ce(oe,W,BigInt(E)),W+=8),x&&(Ce(oe,W,BigInt(_)),W+=8),y&&(J(oe,W,w),W+=4)}}else C=new Uint8Array;let P;if(f&&!a){P=new Uint8Array(Q(eo)+2);const G=Me(P);se(G,0,No),ve(P,eo,2),ps(G,8,m)}else P=new Uint8Array;let R,B,L;if(g){B=new Uint8Array(9+(r?4:0)+(s?4:0));const G=Me(B);se(G,0,Ss),se(G,2,Q(B)-4),L=1+(r?2:0)+(s?4:0),ps(G,4,L);let Z=5;J(G,Z,Math.floor(n.getTime()/1e3)),Z+=4,r&&(J(G,Z,Math.floor(r.getTime()/1e3)),Z+=4),s&&J(G,Z,Math.floor(s.getTime()/1e3));try{R=new Uint8Array(36);const oe=Me(R),W=Xr(n);se(oe,0,$o),se(oe,2,32),se(oe,8,Uo),se(oe,10,24),Ce(oe,12,W),Ce(oe,20,Xr(r)||W),Ce(oe,28,Xr(s)||W)}catch{R=new Uint8Array}}else R=B=new Uint8Array;A===X&&(A=F?Cs:To),o&&(b=b>Ti?b:Ti),f&&!a&&(b=b>ki?b:ki,P[9]=A,A=ko);const V=O?Q(C):0,j=V+Q(P,B,R,d),{headerArray:re,headerView:U,rawLastModDate:ce}=za({version:b,bitFlag:Ka(i,c,u,f,A),compressionMethod:A,uncompressedSize:E,lastModDate:n<Ii?Ii:n>Pi?Pi:n,rawFilename:e,zip64CompressedSize:h,zip64UncompressedSize:p,extraFieldLength:j});let $=Xt;const q=new Uint8Array($+Q(e)+j),he=Me(q);return J(he,0,Po),ve(q,re,4),ve(q,e,$),$+=Q(e),O&&ve(q,C,$),$+=V,ve(q,P,$),$+=Q(P),ve(q,B,$),$+=Q(B),ve(q,R,$),$+=Q(R),ve(q,d,$),u&&(J(he,un+4,0),J(he,ln+4,0)),{localHeaderArray:q,localHeaderView:he,headerArray:re,headerView:U,lastModDate:n,rawLastModDate:ce,encrypted:f,compressed:F,version:b,compressionMethod:A,extraFieldExtendedTimestampFlag:L,rawExtraFieldZip64:C,localExtraFieldZip64Length:V,rawExtraFieldExtendedTimestamp:B,rawExtraFieldNTFS:R,rawExtraFieldAES:P,extraFieldLength:j}}function Zl(t,e){const{headerInfo:n}=t;let{localHeaderArray:r,extraFieldLength:s}=n,i=Me(r),o=64-(e+Q(r))%64;o<4&&(o+=64);const a=new Uint8Array(o),c=Me(a);se(c,0,Vo),se(c,2,o-2);const u=r;n.localHeaderArray=r=new Uint8Array(Q(u)+o),ve(r,u),ve(r,a,Q(u)),i=Me(r),se(i,28,s+o),t.metadataSize+=o}function Xl({zip64:t,dataDescriptor:e,dataDescriptorSignature:n}){let r=new Uint8Array,s,i=0,o=t?Ro:Oo;return n&&(o+=rr),e&&(r=new Uint8Array(o),s=Me(r),n&&(i=rr,J(s,0,Io))),{dataDescriptorArray:r,dataDescriptorView:s,dataDescriptorOffset:i}}function zl({signature:t,compressedSize:e,uncompressedSize:n,headerInfo:r,dataDescriptorInfo:s},{zip64:i,zipCrypto:o,dataDescriptor:a}){const{headerView:c,encrypted:u}=r,{dataDescriptorView:l,dataDescriptorOffset:d}=s;(!u||o)&&t!==X&&(J(c,Ts,t),a&&J(l,d,t)),i?a&&(Ce(l,d+4,BigInt(e)),Ce(l,d+12,BigInt(n))):(J(c,un,e),J(c,ln,n),a&&(J(l,d+4,e),J(l,d+8,n)))}function Kl({rawFilename:t,encrypted:e,zip64:n,localExtraFieldZip64Length:r,signature:s,compressedSize:i,uncompressedSize:o,offset:a,diskNumberStart:c,zip64UncompressedSize:u,zip64CompressedSize:l,zip64Offset:d,zip64DiskNumberStart:m},g,{dataDescriptor:D}){if(D||(e||J(g,Ts+4,s),n||(J(g,un+4,i),J(g,ln+4,o))),n&&r){let f=Xt+Q(t)+4;u&&(Ce(g,f,BigInt(o)),f+=8),l&&(Ce(g,f,BigInt(i)),f+=8),d&&(Ce(g,f,BigInt(a)),f+=8),m&&J(g,f,c)}}function no({compressedSize:t,uncompressedSize:e,offset:n,diskNumberStart:r,zip64UncompressedSize:s,zip64CompressedSize:i,zip64Offset:o,zip64DiskNumberStart:a,rawExtraFieldZip64:c}){const u=Me(c);let l=4;s&&(Ce(u,l,BigInt(e)),l+=8),i&&(Ce(u,l,BigInt(t)),l+=8),o&&(Ce(u,l,BigInt(n)),l+=8),a&&J(u,l,r)}async function Jl(t,e,n){const{files:r,writer:s}=t,{diskOffset:i}=s;let{diskNumber:o}=s,a=0,c=0,u=t.offset-i,l=r.size;for(const[,E]of r){const{rawFilename:_,rawExtraFieldZip64:w,rawExtraFieldAES:b,rawComment:A,rawExtraFieldNTFS:F,rawExtraField:C,extendedTimestamp:v,extraFieldExtendedTimestampFlag:O,lastModDate:P}=E;let R;if(v){R=new Uint8Array(9);const B=Me(R);se(B,0,Ss),se(B,2,5),ps(B,4,O),J(B,5,Math.floor(P.getTime()/1e3))}else R=new Uint8Array;E.rawExtraFieldExtendedTimestamp=R,c+=46+Q(_,A,w,b,F,R,C)}const d=new Uint8Array(c),m=Me(d);await Ut(s);let g=0;for(const[E,_]of Array.from(r.values()).entries()){const{offset:w,rawFilename:b,rawExtraFieldZip64:A,rawExtraFieldAES:F,rawExtraFieldExtendedTimestamp:C,rawExtraFieldNTFS:v,rawExtraField:O,rawComment:P,versionMadeBy:R,headerArray:B,headerView:L,zip64:V,zip64UncompressedSize:j,zip64CompressedSize:re,zip64DiskNumberStart:U,zip64Offset:ce,internalFileAttributes:$,externalFileAttributes:q,diskNumberStart:he,uncompressedSize:G,compressedSize:Z}=_,oe=Q(A,F,C,v,O);J(m,a,rs),se(m,a+4,R),j||J(L,ln,G),re||J(L,un,Z),ve(d,B,a+6);let W=a+Xt;if(se(m,W,oe),W+=2,se(m,W,Q(P)),W+=2,se(m,W,V&&U?ye:he),W+=2,se(m,W,$),W+=2,q&&J(m,W,q),W+=4,J(m,W,V&&ce?be:w),W+=4,ve(d,b,W),W+=Q(b),ve(d,A,W),W+=Q(A),ve(d,F,W),W+=Q(F),ve(d,C,W),W+=Q(C),ve(d,v,W),W+=Q(v),ve(d,O,W),W+=Q(O),ve(d,P,W),a-g>s.availableSize&&(s.availableSize=0,await Et(s,d.slice(g,a)),g=a),a=W,n.onprogress)try{await n.onprogress(E+1,r.size,new ar(_))}catch{}}await Et(s,g?d.slice(g):d);let D=s.diskNumber;const{availableSize:f}=s;f<bt&&D++;let p=te(t,n,Us);if(u>be||c>be||l>ye||D>ye){if(p===!1)throw new Error(Vs);p=!0}const h=new Uint8Array(p?Wu:bt),x=Me(h);a=0,p&&(J(x,0,ss),Ce(x,4,BigInt(44)),se(x,12,45),se(x,14,45),J(x,16,D),J(x,20,o),Ce(x,24,BigInt(l)),Ce(x,32,BigInt(l)),Ce(x,40,BigInt(c)),Ce(x,48,BigInt(u)),J(x,56,Bo),Ce(x,64,BigInt(u)+BigInt(c)),J(x,72,D+1),te(t,n,Ha,!0)&&(D=ye,o=ye),l=ye,u=be,c=be,a+=bn+_n),J(x,a,Mo),se(x,a+4,D),se(x,a+6,o),se(x,a+8,l),se(x,a+10,l),J(x,a+12,c),J(x,a+16,u);const y=Q(e);if(y)if(y<=ye)se(x,a+20,y);else throw new Error(Ol);await Et(s,h),y&&await Et(s,e)}async function Et(t,e){const{writable:n}=t,r=n.getWriter();try{await r.ready,t.size+=Q(e),await r.write(e)}finally{r.releaseLock()}}function Xr(t){if(t)return(BigInt(t.getTime())+BigInt(116444736e5))*BigInt(1e4)}function te(t,e,n,r){const s=e[n]===X?t.options[n]:e[n];return s===X?r:s}function ro(t){return t+5*(Math.floor(t/16383)+1)}function ps(t,e,n){t.setUint8(e,n)}function se(t,e,n){t.setUint16(e,n,!0)}function J(t,e,n){t.setUint32(e,n,!0)}function Ce(t,e,n){t.setBigUint64(e,n,!0)}function ve(t,e,n){t.set(e,n)}function Me(t){return new DataView(t.buffer)}function Q(...t){let e=0;return t.forEach(n=>n&&(e+=n.length)),e}function za({version:t,bitFlag:e,compressionMethod:n,uncompressedSize:r,compressedSize:s,lastModDate:i,rawFilename:o,zip64CompressedSize:a,zip64UncompressedSize:c,extraFieldLength:u}){const l=new Uint8Array(Xt-4),d=Me(l);se(d,0,t),se(d,2,e),se(d,4,n);const m=new Uint32Array(1),g=Me(m);se(g,0,(i.getHours()<<6|i.getMinutes())<<5|i.getSeconds()/2),se(g,2,(i.getFullYear()-1980<<4|i.getMonth()+1)<<5|i.getDate());const D=m[0];return J(d,6,D),(a||s!==X)&&J(d,un,a?be:s),(c||r!==X)&&J(d,ln,c?be:r),se(d,22,Q(o)),se(d,24,u),{headerArray:l,headerView:d,rawLastModDate:D}}function Ka(t,e,n,r,s){let i=0;return e&&(i=i|as),n&&(i=i|os),(s==Cs||s==qu)&&(t>=0&&t<=3&&(i=i|zu),t>3&&t<=5&&(i=i|Xu),t==9&&(i=i|Zu)),r&&(i=i|is),i}let Ja;try{Ja=import.meta.url}catch{}ks({baseURL:Ja});L0(ks);ks({Deflate:_u,Inflate:ju});var Ql=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ef=/[\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]/,tf=/[\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]/,zr={Space_Separator:Ql,ID_Start:ef,ID_Continue:tf},Ee={isSpaceSeparator(t){return typeof t=="string"&&zr.Space_Separator.test(t)},isIdStartChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="$"||t==="_"||zr.ID_Start.test(t))},isIdContinueChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||t==="$"||t==="_"||t===""||t===""||zr.ID_Continue.test(t))},isDigit(t){return typeof t=="string"&&/[0-9]/.test(t)},isHexDigit(t){return typeof t=="string"&&/[0-9A-Fa-f]/.test(t)}};let hs,$e,At,cr,Vt,lt,Fe,js,En;var nf=function(e,n){hs=String(e),$e="start",At=[],cr=0,Vt=1,lt=0,Fe=void 0,js=void 0,En=void 0;do Fe=rf(),af[$e]();while(Fe.type!=="eof");return typeof n=="function"?ms({"":En},"",n):En};function ms(t,e,n){const r=t[e];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let s=0;s<r.length;s++){const i=String(s),o=ms(r,i,n);o===void 0?delete r[i]:Object.defineProperty(r,i,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(const s in r){const i=ms(r,s,n);i===void 0?delete r[s]:Object.defineProperty(r,s,{value:i,writable:!0,enumerable:!0,configurable:!0})}return n.call(t,e,r)}let z,H,yn,yt,ee;function rf(){for(z="default",H="",yn=!1,yt=1;;){ee=St();const t=Qa[z]();if(t)return t}}function St(){if(hs[cr])return String.fromCodePoint(hs.codePointAt(cr))}function T(){const t=St();return t===`
|
|
3
|
+
`?(Vt++,lt=0):t?lt+=t.length:lt++,t&&(cr+=t.length),t}const Qa={default(){switch(ee){case" ":case"\v":case"\f":case" ":case" ":case"\uFEFF":case`
|
|
4
|
+
`:case"\r":case"\u2028":case"\u2029":T();return;case"/":T(),z="comment";return;case void 0:return T(),ue("eof")}if(Ee.isSpaceSeparator(ee)){T();return}return Qa[$e]()},comment(){switch(ee){case"*":T(),z="multiLineComment";return;case"/":T(),z="singleLineComment";return}throw le(T())},multiLineComment(){switch(ee){case"*":T(),z="multiLineCommentAsterisk";return;case void 0:throw le(T())}T()},multiLineCommentAsterisk(){switch(ee){case"*":T();return;case"/":T(),z="default";return;case void 0:throw le(T())}T(),z="multiLineComment"},singleLineComment(){switch(ee){case`
|
|
5
|
+
`:case"\r":case"\u2028":case"\u2029":T(),z="default";return;case void 0:return T(),ue("eof")}T()},value(){switch(ee){case"{":case"[":return ue("punctuator",T());case"n":return T(),Wt("ull"),ue("null",null);case"t":return T(),Wt("rue"),ue("boolean",!0);case"f":return T(),Wt("alse"),ue("boolean",!1);case"-":case"+":T()==="-"&&(yt=-1),z="sign";return;case".":H=T(),z="decimalPointLeading";return;case"0":H=T(),z="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":H=T(),z="decimalInteger";return;case"I":return T(),Wt("nfinity"),ue("numeric",1/0);case"N":return T(),Wt("aN"),ue("numeric",NaN);case'"':case"'":yn=T()==='"',H="",z="string";return}throw le(T())},identifierNameStartEscape(){if(ee!=="u")throw le(T());T();const t=xs();switch(t){case"$":case"_":break;default:if(!Ee.isIdStartChar(t))throw so();break}H+=t,z="identifierName"},identifierName(){switch(ee){case"$":case"_":case"":case"":H+=T();return;case"\\":T(),z="identifierNameEscape";return}if(Ee.isIdContinueChar(ee)){H+=T();return}return ue("identifier",H)},identifierNameEscape(){if(ee!=="u")throw le(T());T();const t=xs();switch(t){case"$":case"_":case"":case"":break;default:if(!Ee.isIdContinueChar(t))throw so();break}H+=t,z="identifierName"},sign(){switch(ee){case".":H=T(),z="decimalPointLeading";return;case"0":H=T(),z="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":H=T(),z="decimalInteger";return;case"I":return T(),Wt("nfinity"),ue("numeric",yt*(1/0));case"N":return T(),Wt("aN"),ue("numeric",NaN)}throw le(T())},zero(){switch(ee){case".":H+=T(),z="decimalPoint";return;case"e":case"E":H+=T(),z="decimalExponent";return;case"x":case"X":H+=T(),z="hexadecimal";return}return ue("numeric",yt*0)},decimalInteger(){switch(ee){case".":H+=T(),z="decimalPoint";return;case"e":case"E":H+=T(),z="decimalExponent";return}if(Ee.isDigit(ee)){H+=T();return}return ue("numeric",yt*Number(H))},decimalPointLeading(){if(Ee.isDigit(ee)){H+=T(),z="decimalFraction";return}throw le(T())},decimalPoint(){switch(ee){case"e":case"E":H+=T(),z="decimalExponent";return}if(Ee.isDigit(ee)){H+=T(),z="decimalFraction";return}return ue("numeric",yt*Number(H))},decimalFraction(){switch(ee){case"e":case"E":H+=T(),z="decimalExponent";return}if(Ee.isDigit(ee)){H+=T();return}return ue("numeric",yt*Number(H))},decimalExponent(){switch(ee){case"+":case"-":H+=T(),z="decimalExponentSign";return}if(Ee.isDigit(ee)){H+=T(),z="decimalExponentInteger";return}throw le(T())},decimalExponentSign(){if(Ee.isDigit(ee)){H+=T(),z="decimalExponentInteger";return}throw le(T())},decimalExponentInteger(){if(Ee.isDigit(ee)){H+=T();return}return ue("numeric",yt*Number(H))},hexadecimal(){if(Ee.isHexDigit(ee)){H+=T(),z="hexadecimalInteger";return}throw le(T())},hexadecimalInteger(){if(Ee.isHexDigit(ee)){H+=T();return}return ue("numeric",yt*Number(H))},string(){switch(ee){case"\\":T(),H+=sf();return;case'"':if(yn)return T(),ue("string",H);H+=T();return;case"'":if(!yn)return T(),ue("string",H);H+=T();return;case`
|
|
6
|
+
`:case"\r":throw le(T());case"\u2028":case"\u2029":cf(ee);break;case void 0:throw le(T())}H+=T()},start(){switch(ee){case"{":case"[":return ue("punctuator",T())}z="value"},beforePropertyName(){switch(ee){case"$":case"_":H=T(),z="identifierName";return;case"\\":T(),z="identifierNameStartEscape";return;case"}":return ue("punctuator",T());case'"':case"'":yn=T()==='"',z="string";return}if(Ee.isIdStartChar(ee)){H+=T(),z="identifierName";return}throw le(T())},afterPropertyName(){if(ee===":")return ue("punctuator",T());throw le(T())},beforePropertyValue(){z="value"},afterPropertyValue(){switch(ee){case",":case"}":return ue("punctuator",T())}throw le(T())},beforeArrayValue(){if(ee==="]")return ue("punctuator",T());z="value"},afterArrayValue(){switch(ee){case",":case"]":return ue("punctuator",T())}throw le(T())},end(){throw le(T())}};function ue(t,e){return{type:t,value:e,line:Vt,column:lt}}function Wt(t){for(const e of t){if(St()!==e)throw le(T());T()}}function sf(){switch(St()){case"b":return T(),"\b";case"f":return T(),"\f";case"n":return T(),`
|
|
7
|
+
`;case"r":return T(),"\r";case"t":return T()," ";case"v":return T(),"\v";case"0":if(T(),Ee.isDigit(St()))throw le(T());return"\0";case"x":return T(),of();case"u":return T(),xs();case`
|
|
8
|
+
`:case"\u2028":case"\u2029":return T(),"";case"\r":return T(),St()===`
|
|
9
|
+
`&&T(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw le(T());case void 0:throw le(T())}return T()}function of(){let t="",e=St();if(!Ee.isHexDigit(e)||(t+=T(),e=St(),!Ee.isHexDigit(e)))throw le(T());return t+=T(),String.fromCodePoint(parseInt(t,16))}function xs(){let t="",e=4;for(;e-- >0;){const n=St();if(!Ee.isHexDigit(n))throw le(T());t+=T()}return String.fromCodePoint(parseInt(t,16))}const af={start(){if(Fe.type==="eof")throw Yt();Kr()},beforePropertyName(){switch(Fe.type){case"identifier":case"string":js=Fe.value,$e="afterPropertyName";return;case"punctuator":Yn();return;case"eof":throw Yt()}},afterPropertyName(){if(Fe.type==="eof")throw Yt();$e="beforePropertyValue"},beforePropertyValue(){if(Fe.type==="eof")throw Yt();Kr()},beforeArrayValue(){if(Fe.type==="eof")throw Yt();if(Fe.type==="punctuator"&&Fe.value==="]"){Yn();return}Kr()},afterPropertyValue(){if(Fe.type==="eof")throw Yt();switch(Fe.value){case",":$e="beforePropertyName";return;case"}":Yn()}},afterArrayValue(){if(Fe.type==="eof")throw Yt();switch(Fe.value){case",":$e="beforeArrayValue";return;case"]":Yn()}},end(){}};function Kr(){let t;switch(Fe.type){case"punctuator":switch(Fe.value){case"{":t={};break;case"[":t=[];break}break;case"null":case"boolean":case"numeric":case"string":t=Fe.value;break}if(En===void 0)En=t;else{const e=At[At.length-1];Array.isArray(e)?e.push(t):Object.defineProperty(e,js,{value:t,writable:!0,enumerable:!0,configurable:!0})}if(t!==null&&typeof t=="object")At.push(t),Array.isArray(t)?$e="beforeArrayValue":$e="beforePropertyName";else{const e=At[At.length-1];e==null?$e="end":Array.isArray(e)?$e="afterArrayValue":$e="afterPropertyValue"}}function Yn(){At.pop();const t=At[At.length-1];t==null?$e="end":Array.isArray(t)?$e="afterArrayValue":$e="afterPropertyValue"}function le(t){return ur(t===void 0?`JSON5: invalid end of input at ${Vt}:${lt}`:`JSON5: invalid character '${ec(t)}' at ${Vt}:${lt}`)}function Yt(){return ur(`JSON5: invalid end of input at ${Vt}:${lt}`)}function so(){return lt-=5,ur(`JSON5: invalid identifier character at ${Vt}:${lt}`)}function cf(t){console.warn(`JSON5: '${ec(t)}' in strings is not valid ECMAScript; consider escaping`)}function ec(t){const e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[t])return e[t];if(t<" "){const n=t.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return t}function ur(t){const e=new SyntaxError(t);return e.lineNumber=Vt,e.columnNumber=lt,e}var uf=function(e,n,r){const s=[];let i="",o,a,c="",u;if(n!=null&&typeof n=="object"&&!Array.isArray(n)&&(r=n.space,u=n.quote,n=n.replacer),typeof n=="function")a=n;else if(Array.isArray(n)){o=[];for(const f of n){let p;typeof f=="string"?p=f:(typeof f=="number"||f instanceof String||f instanceof Number)&&(p=String(f)),p!==void 0&&o.indexOf(p)<0&&o.push(p)}}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)),c=" ".substr(0,r)):typeof r=="string"&&(c=r.substr(0,10)),l("",{"":e});function l(f,p){let h=p[f];switch(h!=null&&(typeof h.toJSON5=="function"?h=h.toJSON5(f):typeof h.toJSON=="function"&&(h=h.toJSON(f))),a&&(h=a.call(p,f,h)),h instanceof Number?h=Number(h):h instanceof String?h=String(h):h instanceof Boolean&&(h=h.valueOf()),h){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof h=="string")return d(h);if(typeof h=="number")return String(h);if(typeof h=="object")return Array.isArray(h)?D(h):m(h)}function d(f){const p={"'":.1,'"':.2},h={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let x="";for(let E=0;E<f.length;E++){const _=f[E];switch(_){case"'":case'"':p[_]++,x+=_;continue;case"\0":if(Ee.isDigit(f[E+1])){x+="\\x00";continue}}if(h[_]){x+=h[_];continue}if(_<" "){let w=_.charCodeAt(0).toString(16);x+="\\x"+("00"+w).substring(w.length);continue}x+=_}const y=u||Object.keys(p).reduce((E,_)=>p[E]<p[_]?E:_);return x=x.replace(new RegExp(y,"g"),h[y]),y+x+y}function m(f){if(s.indexOf(f)>=0)throw TypeError("Converting circular structure to JSON5");s.push(f);let p=i;i=i+c;let h=o||Object.keys(f),x=[];for(const E of h){const _=l(E,f);if(_!==void 0){let w=g(E)+":";c!==""&&(w+=" "),w+=_,x.push(w)}}let y;if(x.length===0)y="{}";else{let E;if(c==="")E=x.join(","),y="{"+E+"}";else{let _=`,
|
|
10
|
+
`+i;E=x.join(_),y=`{
|
|
11
|
+
`+i+E+`,
|
|
12
|
+
`+p+"}"}}return s.pop(),i=p,y}function g(f){if(f.length===0)return d(f);const p=String.fromCodePoint(f.codePointAt(0));if(!Ee.isIdStartChar(p))return d(f);for(let h=p.length;h<f.length;h++)if(!Ee.isIdContinueChar(String.fromCodePoint(f.codePointAt(h))))return d(f);return f}function D(f){if(s.indexOf(f)>=0)throw TypeError("Converting circular structure to JSON5");s.push(f);let p=i;i=i+c;let h=[];for(let y=0;y<f.length;y++){const E=l(String(y),f);h.push(E!==void 0?E:"null")}let x;if(h.length===0)x="[]";else if(c==="")x="["+h.join(",")+"]";else{let y=`,
|
|
13
|
+
`+i,E=h.join(y);x=`[
|
|
14
|
+
`+i+E+`,
|
|
15
|
+
`+p+"]"}return s.pop(),i=p,x}};const lf={parse:nf,stringify:uf};var ff=lf,qs=10**-4;function Zd(t){return t*Math.PI/180}function qe(t){return 180*t/Math.PI}function ae(t){let e=t;return Math.abs(e)<qs&&(e=0),e}function Tt(t){let e=t%(2*Math.PI);return e<0&&(e+=2*Math.PI),e}function we(t){let e=Tt(t);return e>Math.PI&&(e-=2*Math.PI),e}function gt(t){let e=t%Math.PI;return e<0&&(e+=Math.PI),e}function Ze(t){let e=gt(t);return e>Math.PI/2&&(e-=Math.PI),e}function gs(t,e,n){const r=we(e)-we(t);return n?Tt(r):Tt(r)-2*Math.PI}function tc(t,e,n,r){let s=!1;if(ae(we(t-e))===0)s=!0;else if(ae(we(t-n))===0)s=!0;else{const i=gs(e,n,r),o=gs(e,t,r);Math.abs(o)<Math.abs(i)&&(s=!0)}return s}function Dt(t){return t.toFixed(2)}var _e={point:"grey",line:"grey",contour:"green",mainOuter:"SlateBlue",mainInner:"SteelBlue",mainB:"SlateGrey",second:"Violet",secondB:"SlateGrey",dynamics:"Tomato",ruler:"blue",origin:"red",reference:"blue",mouse:"yellow"},sn=.05;function zt(t,e,n){const r=n.shiftX+(t-n.xMin)*n.scaleX,s=n.shiftY+(e-n.yMin)*n.scaleY;return[r,s]}function Xd(t,e,n){const r=(t-n.shiftX)/n.scaleX+n.xMin,s=(e-n.shiftY)/n.scaleY+n.yMin;return[r,s]}function nc(t,e){if(ae(e.scaleX-Math.abs(e.scaleY))!==0)throw`err683: iAdjust.scaleX and scaleY differ ${e.scaleX} ${e.scaleY}`;if(e.scaleX<0)throw`err684: iAdjust.scaleX ${e.scaleX} is negative`;const n=t*e.scaleX;if(n<0)throw`err685: rRadius for canvas ${n} is negative`;return n}function Ds(){return{init:0,xMin:0,yMin:0,xyDiff:1,shiftX:0,shiftY:0,scaleX:1,scaleY:1}}function Dr(t){return{init:t.init,xMin:t.xMin,yMin:t.yMin,xyDiff:t.xyDiff,shiftX:t.shiftX,shiftY:t.shiftY,scaleX:t.scaleX,scaleY:t.scaleY}}function ws(t,e,n,r,s,i){const o=Ds(),a=Math.max(e-t,1),c=Math.max(r-n,1),u=s/a,l=i/c;let d=.9*u,m=a;return l<u&&(d=.9*l,m=c),o.init=1,o.xMin=t,o.yMin=n,o.xyDiff=m,o.shiftX=sn*s,o.scaleX=d,o.shiftY=i-sn*i,o.scaleY=-1*d,o}function zd(t,e,n){const r=Dr(n);return r.xMin=t-r.xyDiff/2,r.yMin=e-r.xyDiff/2,r}function Kd(t,e,n,r,s,i){const o=Math.min(t,n),a=Math.max(t,n),c=Math.min(e,r),u=Math.max(e,r);return ws(o,a,c,u,s,i)}function Jd(t,e){const n=Dr(e),r=(1-t)/2;return n.xMin+=r*e.xyDiff,n.yMin+=r*e.xyDiff,n.xyDiff*=t,n.scaleX*=1/t,n.scaleY*=1/t,n}function Qd(t,e,n,r,s){const i=Dr(s),o=n-t,a=r-e;return i.xMin+=-o,i.yMin+=-a,i}function e1(t,e,n){const r=Dr(n);if(t>0&&e>0){const s=t/e;r.xyDiff*=s,r.scaleX*=1/s,r.scaleY*=1/s,r.shiftX+=sn*e-sn*t,r.shiftY+=(1-sn)*e-(1-sn)*t}return r}function wr(t,e){let n=0;if(e>t)throw`err539: ila < ilc ${t} ${e}`;return n=Math.sqrt(t**2-e**2),n}function io(t,e,n){let r=0;const s=[t,e,n];for(let o=0;o<s.length;o++)if(s[o]<0)throw`err209: l3[${o}] = ${s[o]}`;const i=s.sort(function(o,a){return a-o});if(i[0]>i[1]+i[2])throw`err839: impossible triangle with length ${t}, ${e} and ${n}`;return r=Math.acos((t**2+e**2-n**2)/(2*t*e)),r}function oo(t,e,n){let r=0;const s=[t,e,n];for(let c=0;c<s.length;c++)if(ae(s[c])===0||s[c]<0)throw`err329: negative or zero triangle-args ${c} : ${s[c]}`;const i=gt(e),o=gt(n);if(i+o>Math.PI)throw`err939: impossible triangle with angles ${e} and ${n}`;return r=t*Math.sin(n)/Math.sin(e),r}var df=(t=>(t[t.eDefault=0]="eDefault",t[t.eCircle=1]="eCircle",t[t.eCross=2]="eCross",t[t.eSquare=3]="eSquare",t[t.eBigSquare=4]="eBigSquare",t[t.eTwoTri=5]="eTwoTri",t[t.eTri1=6]="eTri1",t[t.eTri2=7]="eTri2",t[t.eTri3=8]="eTri3",t[t.eTri4=9]="eTri4",t))(df||{}),tt=class nn{cx;cy;shape;constructor(e,n,r=0){this.cx=e,this.cy=n,this.shape=r}draw(e,n,r=_e.point,s=0){if(isFinite(this.cx)&&isFinite(this.cy)){const i=e.canvas.width*.006999999999999999,o=2*i,[a,c]=zt(this.cx,this.cy,n);let u=s;switch(u===0&&(u=this.shape),e.beginPath(),u){case 2:e.moveTo(a-o,c),e.lineTo(a+o,c),e.moveTo(a,c-o),e.lineTo(a,c+o);break;case 3:e.rect(a-i,c-i,2*i,2*i);break;case 4:e.rect(a-2*i,c-2*i,4*i,4*i);break;case 5:e.moveTo(a-o,c),e.lineTo(a+o,c),e.lineTo(a,c+o),e.lineTo(a,c-o),e.lineTo(a-o,c);break;case 6:e.moveTo(a-o,c),e.lineTo(a+o,c),e.lineTo(a,c-o),e.lineTo(a,c+o);break;case 7:e.moveTo(a+o,c),e.lineTo(a-o,c),e.lineTo(a,c-o),e.lineTo(a,c+o);break;case 8:e.moveTo(a+o,c),e.lineTo(a-o,c),e.lineTo(a,c+o),e.lineTo(a,c-o);break;case 9:e.moveTo(a-o,c),e.lineTo(a+o,c),e.lineTo(a,c+o),e.lineTo(a,c-o);break;case 1:default:e.arc(a,c,i,0,2*Math.PI)}e.strokeStyle=r,e.stroke()}else console.log(`INFO489: point not draw because of infinity ${this.cx} ${this.cy}`)}distanceOrig(){return Math.sqrt(this.cx**2+this.cy**2)}angleOrig(){return Math.atan2(this.cy,this.cx)}getPolar(){return[this.angleOrig(),this.distanceOrig()]}setPolar(e,n){return new nn(n*Math.cos(e),n*Math.sin(e))}translate(e,n){return new nn(this.cx+e,this.cy+n)}translatePolar(e,n){return new nn(this.cx+n*Math.cos(e),this.cy+n*Math.sin(e))}clone(e=0){return new nn(this.cx,this.cy,e)}rotateOrig(e){const n=this.getPolar();return this.setPolar(n[0]+e,n[1])}scaleOrig(e){const n=this.getPolar();return this.setPolar(n[0],n[1]*e)}rotate(e,n){const s=this.translate(-1*e.cx,-1*e.cy).getPolar();return this.setPolar(s[0]+n,s[1]).translate(e.cx,e.cy)}scale(e,n){const s=this.translate(-1*e.cx,-1*e.cy).getPolar();return this.setPolar(s[0],s[1]*n).translate(e.cx,e.cy)}isEqual(e){return ae(this.cx-e.cx)===0&&ae(this.cy-e.cy)===0}distanceToPoint(e){return Math.sqrt((e.cx-this.cx)**2+(e.cy-this.cy)**2)}angleToPoint(e){if(ae(this.distanceToPoint(e))===0)throw`err434: no angle because points identical ${this.cx} ${e.cx} ${this.cy} ${e.cy}`;return Math.atan2(e.cy-this.cy,e.cx-this.cx)}angleFromToPoints(e,n){const r=this.angleToPoint(e),s=this.angleToPoint(n);return we(s-r)}middlePoint(e){const n=(this.cx+e.cx)/2,r=(this.cy+e.cy)/2;return new nn(n,r)}equidistantPoint(e,n,r){const s=this.distanceToPoint(e)/2;if(this.isEqual(e))throw`err633: no equidistance because identical point ${this.cx} ${this.cy}`;if(n<s)throw`err392: equidistance ${n} smaller than lp1p2h ${s}`;const i=this.middlePoint(e),o=this.angleToPoint(e)+Math.PI/2,a=Math.sqrt(n**2-s**2),c=i.translatePolar(o,a),u=i.translatePolar(o+Math.PI,a),l=r.distanceToPoint(c),d=r.distanceToPoint(u);if(a!==0&&l===d)throw`err284: magnet point p3 is on line p1p2. cx ${r.cx} cy: ${r.cy}`;let m=c;return d<l&&(m=u),m}};function K(t,e,n=0){return new tt(t,e,n)}function rc(t){let e=0,n=0,r=0,s=0;if(t.length>0){const i=t[0];if(i.cx===Number.NEGATIVE_INFINITY||i.cx===Number.POSITIVE_INFINITY||i.cy===Number.NEGATIVE_INFINITY||i.cy===Number.POSITIVE_INFINITY)throw`err292: pointMinMax first point with infinity: ${i.cx} ${i.cy}`;e=t[0].cx,n=t[0].cx,r=t[0].cy,s=t[0].cy;for(const o of t)o.cx!==Number.NEGATIVE_INFINITY&&(e=Math.min(e,o.cx)),o.cx!==Number.POSITIVE_INFINITY&&(n=Math.max(n,o.cx)),o.cy!==Number.NEGATIVE_INFINITY&&(r=Math.min(r,o.cy)),o.cy!==Number.POSITIVE_INFINITY&&(s=Math.max(s,o.cy))}return[e,n,r,s]}var pf=class Ve{cx;cy;ca;constructor(e,n,r){this.cx=e,this.cy=n,this.ca=r}draw(e,n,r=_e.line){const s=e.canvas.width*2,[i,o]=zt(this.cx-s*Math.cos(this.ca),this.cy-s*Math.sin(this.ca),n),[a,c]=zt(this.cx+2*s*Math.cos(this.ca),this.cy+2*s*Math.sin(this.ca),n);e.beginPath(),e.moveTo(i,o),e.lineTo(a,c),e.strokeStyle=r,e.stroke()}setFromPoints(e,n){return this.cx=e.cx,this.cy=e.cy,this.ca=e.angleToPoint(n),this}getAffine(){const e={quasiVertical:!1,ha:0,hb:0,va:0,vb:0};return Math.abs(Ze(this.ca))>Math.PI/4?(e.quasiVertical=!0,e.va=-1*Math.tan(Ze(this.ca-Math.PI/2)),e.vb=this.cx-e.va*this.cy):(e.ha=Math.tan(Ze(this.ca)),e.hb=this.cy-e.ha*this.cx),e}setAffine(e){const n=new Ve(0,0,0);return e.quasiVertical?(n.ca=Math.PI/2-Math.atan(e.va),n.cx=e.vb,n.cy=0):(n.ca=Math.atan(e.ha),n.cx=0,n.cy=e.hb),n}intersection(e){if(this.isParallel(e))throw`err902: no intersection, lines are parallel ca1: ${this.ca} ca2: ${e.ca}`;let n=0,r=0;const s=this.getAffine(),i=e.getAffine();return s.quasiVertical?i.quasiVertical?(r=(s.vb-i.vb)/(i.va-s.va),n=s.va*r+s.vb):(n=(s.va*i.hb+s.vb)/(1-s.va*i.ha),r=i.ha*n+i.hb):i.quasiVertical?(r=(s.ha*i.vb+s.hb)/(1-s.ha*i.va),n=i.va*r+i.vb):(n=(s.hb-i.hb)/(i.ha-s.ha),r=s.ha*n+s.hb),K(n,r)}getAxisXIntersection(){const e=new Ve(0,0,0);return this.intersection(e).cx}getAxisYIntersection(){const e=new Ve(0,0,Math.PI/2);return this.intersection(e).cy}getAxisXIntersecTri(){let e=1/0;if(ae(Ze(this.ca))!==0){const n=new tt(this.cx,this.cy),r=gt(this.ca),s=n.angleOrig(),i=n.distanceOrig();if(ae(i)===0)e=0;else if(ae(Ze(r-s))===0)e=0;else{const o=Math.min(r,Math.PI-r),a=we(r-s),c=Math.min(Math.abs(a),Math.PI-Math.abs(a));e=Math.sign(a)*oo(i,o,c)}}return e}getAxisYIntersecTri(){let e=1/0;if(ae(Ze(this.ca-Math.PI/2))!==0){const n=new tt(this.cx,this.cy),r=Ze(this.ca),s=n.angleOrig(),i=n.distanceOrig(),o=Ze(r-s);if(ae(i)===0)e=0;else if(ae(o)===0)e=0;else{const a=gt(r-Math.PI/2),c=-1*we(r-s),u=Math.min(a,Math.PI-a),l=Math.min(Math.abs(c),Math.PI-Math.abs(c));e=Math.sign(c)*oo(i,u,l)}}return e}angleOrig(){const n=new tt(this.cx,this.cy).angleOrig(),r=Ze(this.ca),s=-1*we(r-n);let i=0;return s<0&&(i=-Math.PI),gt(Math.PI/2+this.ca)+i}distanceOrig(){const e=this.angleOrig(),n=new tt(this.cx,this.cy),r=n.angleOrig(),s=n.distanceOrig(),i=Ze(r-e);return s*Math.cos(i)}projectOrig(){const e=this.angleOrig(),n=this.distanceOrig();return K(0,0).setPolar(e,n)}translate(e,n){return new Ve(this.cx+e,this.cy+n,this.ca)}rotateOrig(e){const n=new tt(this.cx,this.cy).rotateOrig(e);return new Ve(n.cx,n.cy,we(this.ca+e))}scaleOrig(e){const n=new tt(this.cx,this.cy).scaleOrig(e);return new Ve(n.cx,n.cy,this.ca)}rotate(e,n){const r=new tt(this.cx,this.cy).rotate(e,n);return new Ve(r.cx,r.cy,we(this.ca+n))}scale(e,n){const r=new tt(this.cx,this.cy).scale(e,n);return new Ve(r.cx,r.cy,this.ca)}clone(){const e=new tt(this.cx,this.cy);return new Ve(e.cx,e.cy,this.ca)}lineOrthogonal(e){return new Ve(e.cx,e.cy,this.ca+Math.PI/2)}lineParallel(e){return new Ve(e.cx,e.cy,this.ca)}distanceToPoint(e){let n=0;const r=new tt(this.cx,this.cy),s=r.distanceToPoint(e);if(ae(s)!==0){const i=r.angleToPoint(e),o=Ze(i-this.ca);n=s*Math.abs(Math.sin(o))}return n}projectPoint(e){let n=0;const r=new tt(this.cx,this.cy),s=r.distanceToPoint(e);if(ae(s)!==0){const o=r.angleToPoint(e),a=we(o-this.ca);n=s*Math.cos(a)}return r.translatePolar(this.ca,n)}isParallel(e){return ae(Ze(this.ca-e.ca))===0}isOrthogonal(e){return ae(Ze(Math.PI/2+this.ca-e.ca))===0}isEqual(e){const n=K(e.cx,e.cy),r=this.distanceToPoint(n);return ae(r)===0&&this.isParallel(e)}bisector(e,n){const r=this.intersection(e),s=gt(this.ca),i=gt(e.ca),o=Math.min(s,i),a=Math.max(s,i),c=[o,a,o+Math.PI,a+Math.PI,o],u=r.angleToPoint(n);let l=0;for(let g=0;g<4;g++){const D=we(c[g]-u),f=we(c[g+1]-u);if(D===0||f===0)throw`err419: bad reference point for bisecor ${n.cx} ${n.cy}`;D<0&&f>0&&(l=g)}const m=gt((o+a)/2)+l*Math.PI/2;return new Ve(r.cx,r.cy,m)}lineParallelDistance(e,n,r){const s=K(this.cx,this.cy),i=s.translatePolar(this.ca+Math.PI/2,e),o=s.translatePolar(this.ca-Math.PI/2,e);let a=o,c=n;return ae(this.distanceToPoint(c))===0&&(c=r),c.distanceToPoint(i)<c.distanceToPoint(o)&&(a=i),new Ve(a.cx,a.cy,this.ca)}};function yr(t,e,n){return new pf(t,e,n)}function Pn(t,e){return yr(0,0,0).setFromPoints(t,e)}function ys(t,e){if(t.isEqual(e))throw`err546: no bisector with two same points cx: ${t.cx} cy: ${t.cy}`;const n=t.middlePoint(e),r=gt(t.angleToPoint(e)+Math.PI/2);return yr(n.cx,n.cy,r)}function hf(t,e,n){if(t.isEqual(e)||e.isEqual(n)||t.isEqual(n))throw`err833: no bisector with two same points cx: ${t.cx} cy: ${t.cy}`;const r=ys(t,e),s=ys(e,n);return r.intersection(s)}var mf=(t=>(t[t.eStroke=0]="eStroke",t[t.eArc=1]="eArc",t[t.ePointed=2]="ePointed",t[t.eRounded=3]="eRounded",t[t.eWidened=4]="eWidened",t[t.eWideAcc=5]="eWideAcc",t[t.eStart=6]="eStart",t))(mf||{});function at(t){let e=!1;return(t===0||t===1)&&(e=!0),e}function wn(t){let e=!1;return(at(t)||t===6)&&(e=!0),e}function er(t){let e=!1;return(t===3||t===4||t===5)&&(e=!0),e}function Hn(t){let e=!1;return(t===2||er(t))&&(e=!0),e}var nt=class sc{sType;px;py;radius;arcLarge;arcCcw;constructor(e,n,r,s,i=!1,o=!1){this.sType=e,this.px=n,this.py=r,this.radius=s,this.arcLarge=i,this.arcCcw=o}clone(){return new sc(this.sType,this.px,this.py,this.radius,this.arcLarge,this.arcCcw)}},st=class{sType;p1;p2;pc;radius;a1;a2;arcCcw;constructor(t,e,n,r,s,i,o,a=!1){this.sType=t,this.p1=e,this.p2=n,this.pc=r,this.radius=s,this.a1=i,this.a2=o,this.arcCcw=a}},xf=class{debugPoints;debugLines;logMessage;constructor(){this.debugPoints=[],this.debugLines=[],this.logMessage=""}addPoint(t){this.debugPoints.push(t)}getPoints(){return this.debugPoints}clearPoints(){this.debugPoints=[]}addLine(t){this.debugLines.push(t)}getLines(){return this.debugLines}clearLines(){this.debugLines=[]}addMsg(t){this.logMessage+=t}getMsg(){return this.logMessage}clearMsg(){this.logMessage=""}},Lt=new xf;function Nt(t,e,n){if(n.sType!==1)throw`err202: arcSeg1To2 has unexpected type ${n.sType}`;const r=K(t,e),s=K(n.px,n.py),i=r.distanceToPoint(s)/2;if(r.isEqual(s))throw`err638: no equidistance because identical point ${r.cx} ${s.cy}`;let o=0;if(ae(n.radius-i)===0)o=0;else{if(n.radius<i)throw`err399: radius ${n.radius} smaller than lp1p2h ${i}`;o=wr(n.radius,i)}const a=r.middlePoint(s),c=r.angleToPoint(s)+Math.PI/2,u=a.translatePolar(c,o),l=a.translatePolar(c+Math.PI,o);let d=u;(!n.arcLarge&&!n.arcCcw||n.arcLarge&&n.arcCcw)&&(d=l);const m=d.angleToPoint(r),g=d.angleToPoint(s);return new st(1,r,s,d,n.radius,m,g,n.arcCcw)}function gf(t){let e=Tt(t.a2-t.a1);t.arcCcw||(e=2*Math.PI-e);let n=!1;return e>Math.PI&&(n=!0),new nt(1,t.p2.cx,t.p2.cy,t.radius,n,t.arcCcw)}function Df(t,e,n){const r=t.p1,s=t.p2,i=n.p1,o=n.p2;if(!s.isEqual(i))throw`err309: makeCorner-prepare p2 and p2b differ px ${s.cx} ${i.cx} py ${s.cy} ${i.cy}`;let a=s.angleToPoint(r);if(t.sType===1){const f=t.arcCcw?1:-1;a=t.a2-f*Math.PI/2}let c=s.angleToPoint(o);if(n.sType===1){const f=n.arcCcw?1:-1;c=n.a1+f*Math.PI/2}const u=c-a;let d=we(u)/2;if(ae(d)===0){const f=qs*.01;if(t.sType===0&&n.sType===1)d=n.arcCcw?f:-f;else if(t.sType===1&&n.sType===0)d=t.arcCcw?f:-f;else if(t.sType===0&&n.sType===0)throw`err402: prepare aPeakHalf too closed to zero ${d}`}const m=a+d,g=s.translatePolar(m,e.radius);return{s1:t,s2:e,s3:n,ra:e.radius,p1:r,p2:s,p3:o,p4:t.pc,p5:n.pc,p6:g,at1:a,at3:c,abi:m,aph:d}}function lr(t,e,n){if(e.sType!==1)throw`err510: modifRadius with wrong type ${e.sType}`;const r=t>0?1:-1,s=e.arcCcw?1:-1,i=ae(t)===0?1:r*s,o=e.radius+i*n;if(o<=0)throw`err621: modifRadius with negative modified lenght ${o}`;return o}function Ws(t,e,n,r){const s=n.translatePolar(t,e),i=n.translatePolar(t+Math.PI,e),o=r.distanceToPoint(s),a=r.distanceToPoint(i);return o<a?s:i}function ao(t,e,n,r,s){const i=t.translatePolar(e-n,r),o=t.translatePolar(e+n,r),a=s.distanceToPoint(i),c=s.distanceToPoint(o);return a<c?-1:1}function _r(t,e){const n=e.clone(),r=t.p1.clone(),s=t.p2;if(t.sType!==0)throw`err103: newStrokeFirst unexpected sType ${t.sType}`;const i=Pn(r,s).distanceToPoint(n);if(ae(i)!==0)throw`err104: newStrokeFirst new point not aligned ${i} ${n.cx} ${n.cy}`;const o=r.angleToPoint(s),a=r.angleToPoint(n);if(ae(we(a-o))!==0)throw`err105: newStrokeFirst new point miss aligned ${o} ${a} ${n.cx} ${n.cy}`;const c=r.distanceToPoint(n),u=r.distanceToPoint(s);if(u<c)throw`err106: newStrokeFirst new point out of scope ${u} ${c} ${n.cx} ${n.cy}`;const l=K(0,0);return new st(0,r,n,l,0,0,0,!1)}function br(t,e){const n=e.clone(),r=t.p2.clone(),s=t.p1;if(t.sType!==0)throw`err203: newStrokeSecond unexpected sType ${t.sType}`;const i=Pn(r,s).distanceToPoint(n);if(ae(i)!==0)throw`err204: newStrokeSecond new point not aligned ${i} ${n.cx} ${n.cy}`;const o=r.angleToPoint(s),a=r.angleToPoint(n);if(ae(we(a-o))!==0)throw`err205: newStrokeSecond new point miss aligned ${o} ${a} ${n.cx} ${n.cy}`;const c=r.distanceToPoint(n),u=r.distanceToPoint(s);if(u<c)throw`err206: newStrokeSecond new point out of scope ${u} ${c} ${n.cx} ${n.cy}`;const l=K(0,0);return new st(0,n,r,l,0,0,0,!1)}function Ar(t,e){if(t.sType!==1)throw`err203: newArcFirst unexpected sType ${t.sType}`;const n=t.p1.clone(),r=t.pc.clone(),s=e.clone(),i=r.angleToPoint(s);if(!tc(i,t.a1,t.a2,t.arcCcw))throw`err908: newArcFirst a48 out of scope ${i} ${t.a1} ${t.a2} ${t.arcCcw}`;return new st(1,n,s,r,t.radius,t.a1,i,t.arcCcw)}function Er(t,e){if(t.sType!==1)throw`err204: newArcSecond unexpected sType ${t.sType}`;const n=t.p2.clone(),r=t.pc.clone(),s=e.clone(),i=r.angleToPoint(s);if(!tc(i,t.a1,t.a2,t.arcCcw))throw`err907: newArcSecond a59 out of scope ${i} ${t.a1} ${t.a2} ${t.arcCcw}`;return new st(1,s,n,r,t.radius,i,t.a2,t.arcCcw)}function In(t,e,n,r,s,i){const o=t.clone(),a=e.clone(),c=n.clone(),u=c.distanceToPoint(o),l=c.distanceToPoint(a);if(ae(u-r)!==0||ae(l-r)!==0)throw`err610: newRounded not on circle ${r} ${u} ${l}`;const d=c.angleToPoint(o),m=c.angleToPoint(a),g=we(d-i+Math.PI),D=we(m-i+Math.PI);Math.abs(D-g)>Math.PI+qs&&Lt.addMsg(`warn882: newRounded a873 or a972 larger than PI/2 ${Dt(g)} ${Dt(D)} at ${Dt(c.cx)} ${Dt(c.cy)}
|
|
16
|
+
`);const f=!(s>0);return new st(1,o,a,c,r,d,m,f)}function wf(t){const e=Math.abs(t.ra/Math.sin(t.aph)),n=e*Math.cos(t.aph),r=t.p2.translatePolar(t.abi,e),s=t.p2.translatePolar(t.at1,n),i=t.p2.translatePolar(t.at3,n),o=[];return o.push(_r(t.s1,s)),o.push(In(s,i,r,t.ra,t.aph,t.abi)),o.push(br(t.s3,i)),o}function yf(t){const n=Pn(t.p1,t.p2).lineParallelDistance(t.ra,t.p6,t.p5),r=n.projectPoint(t.p5),s=r.distanceToPoint(t.p5),i=lr(t.aph,t.s3,t.ra),o=wr(i,s),a=Ws(n.ca,o,r,t.p6),c=t.p5.angleToPoint(a),u=t.p5.translatePolar(c,t.s3.radius),l=t.p2.angleFromToPoints(t.p1,a),m=Math.abs(t.ra/Math.sin(l))*Math.cos(l),g=t.p2.angleToPoint(t.p1),D=t.p2.translatePolar(g,m),f=[];return f.push(_r(t.s1,D)),f.push(In(D,u,a,t.ra,t.aph,t.abi)),f.push(Er(t.s3,u)),f}function _f(t){const n=Pn(t.p3,t.p2).lineParallelDistance(t.ra,t.p6,t.p4),r=n.projectPoint(t.p4),s=r.distanceToPoint(t.p4),i=lr(t.aph,t.s1,t.ra),o=wr(i,s),a=Ws(n.ca,o,r,t.p6),c=t.p4.angleToPoint(a),u=t.p4.translatePolar(c,t.s1.radius),l=t.p2.angleFromToPoints(t.p3,a),m=Math.abs(t.ra/Math.sin(l))*Math.cos(l),g=t.p2.angleToPoint(t.p3),D=t.p2.translatePolar(g,m),f=[];return f.push(Ar(t.s1,u)),f.push(In(u,D,a,t.ra,t.aph,t.abi)),f.push(br(t.s3,D)),f}function bf(t){const e=lr(t.aph,t.s1,t.ra),n=lr(t.aph,t.s3,t.ra),r=t.p4.distanceToPoint(t.p5),s=t.p4.angleToPoint(t.p5),i=io(r,e,n),o=ao(t.p4,s,i,e,t.p6),a=s+o*i,c=t.p4.translatePolar(a,e),u=t.p4.translatePolar(a,t.s1.radius),l=Math.PI+s,d=io(r,n,e),m=ao(t.p5,l,d,n,t.p6),g=l+m*d,D=t.p5.translatePolar(g,n);if(!D.isEqual(c))throw`err909: roundArcArc p7 anf p7b differ ${c.cx} ${D.cx} ${c.cy} ${D.cy} 0`;const f=t.p5.translatePolar(g,t.s3.radius),p=[];return p.push(Ar(t.s1,u)),p.push(In(u,f,c,t.ra,t.aph,t.abi)),p.push(Er(t.s3,f)),p}function ic(t){const e=t.abi-2*t.aph,n=t.abi+2*t.aph;let r=t.p6.translatePolar(e,t.ra),s=t.p6.translatePolar(n,t.ra);if(t.s1.sType===1){const c=t.p4.angleFromToPoints(t.p2,t.p6),l=t.p4.angleToPoint(t.p2)+2*c;r=t.p4.translatePolar(l,t.s1.radius)}if(t.s3.sType===1){const c=t.p5.angleFromToPoints(t.p2,t.p6),l=t.p5.angleToPoint(t.p2)+2*c;s=t.p5.translatePolar(l,t.s3.radius)}const i=!(t.aph>0),o=new st(1,r,s,t.p6,t.ra,e,n,i),a=[];return t.s1.sType===0?a.push(_r(t.s1,r)):t.s1.sType===1&&a.push(Ar(t.s1,r)),a.push(o),t.s3.sType===0?a.push(br(t.s3,s)):t.s3.sType===1&&a.push(Er(t.s3,s)),a}function co(t,e,n,r){let s=n,i=n;const o=r.p6.angleFromToPoints(r.p2,n);if(Math.abs(o)>Math.PI/2){i=r.p6.translatePolar(r.abi+t*Math.PI/2,r.ra);const a=yr(i.cx,i.cy,r.abi);if(e.sType===0)s=Pn(e.p1,e.p2).intersection(a);else if(e.sType===1){const c=a.projectPoint(e.pc),u=c.distanceToPoint(e.pc);if(u<e.radius){const l=wr(e.radius,u);s=Ws(r.abi,l,c,n)}else Lt.addMsg(`warn222: wideAccess not possible on arc ${Dt(e.radius)} ${Dt(u)} at ${Dt(n.cx)} ${Dt(n.cy)}
|
|
17
|
+
`),s=n,i=n}}return[s,i]}function Af(t){const e=ic(t),n=e[1].arcCcw?1:-1,[r,s]=co(n,t.s1,e[1].p1,t),[i,o]=co(-n,t.s3,e[1].p2,t),a=[];if(r.isEqual(s))a.push(e[0]);else{t.s1.sType===0?a.push(_r(t.s1,r)):t.s1.sType===1&&a.push(Ar(t.s1,r));const c=K(0,0),u=new st(0,r,s,c,0,0,0,!1);a.push(u)}if(a.push(In(s,o,t.p6,t.ra,t.aph,t.abi)),i.isEqual(o))a.push(e[2]);else{const c=K(0,0),u=new st(0,o,i,c,0,0,0,!1);a.push(u),t.s3.sType===0?a.push(br(t.s3,i)):t.s3.sType===1&&a.push(Er(t.s3,i))}return a}function uo(t,e,n){const r=Df(t,e,n),s=[];if(e.sType===3)if(t.sType===0&&n.sType===0)s.push(...wf(r));else if(t.sType===0&&n.sType===1)s.push(...yf(r));else if(t.sType===1&&n.sType===0)s.push(..._f(r));else if(t.sType===1&&n.sType===1)s.push(...bf(r));else throw`err123: makeCorner unexpected s1s3.sType ${t.sType} ${n.sType}`;else if(e.sType===4)s.push(...ic(r));else if(e.sType===5)s.push(...Af(r));else throw`err723: makeCorner unexpected s2.sType ${e.sType}`;return s}function xt(t){return t.toFixed(4)}function Ef(t,e,n,r=""){let s=r;return s===""&&(s="black"),`<circle cx="${xt(t)}" cy="${xt(e)}" r="${xt(n)}" stroke="${s}" stroke-width="1" fill="none" />`}var vf=class{pathD;constructor(){this.pathD=""}addStart(t,e){this.pathD=`M ${xt(t)} ${xt(e)}`}addStroke(t,e){this.pathD+=` L ${xt(t)} ${xt(e)}`}addArc(t,e,n,r,s){const i=xt(n),o=r?1:0,a=s?1:0;this.pathD+=` A ${i} ${i} 0 ${o} ${a} ${xt(t)} ${xt(e)}`}stringify(t=""){let e=t;return e===""&&(e="black"),`<path d="${this.pathD} Z" stroke="${e}" stroke-width="1" fill="none" />`}};function Cf(){return new vf}var Ff=class{svgStr;payloadStr;groupActive;constructor(){this.payloadStr="",this.svgStr="",this.groupActive=!1}addHeader(t,e,n,r){const s=`${t} ${n} ${e} ${r}`;this.svgStr=`<svg width="${e}" height="${r}" viewBox="${s}" xmlns="http://www.w3.org/2000/svg">`}addSvgString(t){this.payloadStr+=t}addGroup(t){if(this.groupActive)throw"err321: group must be closed before opening a new one";this.groupActive=!0,this.payloadStr+=`<g id="${t}">`}closeGroup(){if(!this.groupActive)throw"err331: group is not active so can not be closed";this.groupActive=!1,this.payloadStr+="</g>"}closeSvg(){if(this.svgStr==="")throw"err301: no header set for the svg";if(this.groupActive)throw"err311: group is not closed";this.svgStr+=this.payloadStr,this.svgStr+="</svg>"}stringify(){return this.closeSvg(),this.svgStr}};function Sf(){return new Ff}function et(t){return t.toFixed(4)}var Ys=class{arc;p1x;p1y;radius;a1;a2;p2x;p2y;constructor(t,e,n,r,s,i,o,a){this.arc=t,this.p1x=e,this.p1y=n,this.radius=r,this.a1=s,this.a2=i,this.p2x=o,this.p2y=a}};function Tf(t,e,n,r){return new Ys(!1,t,e,0,0,0,n,r)}function kf(t,e,n,r,s,i){const o=i?r:s,a=i?s:r,c=qe(Tt(o)),u=qe(Tt(a));return new Ys(!0,t,e,n,c,u,0,0)}function Pf(t,e,n){return new Ys(!1,t,e,n,0,0,0,0)}var If=class{dxfStr;constructor(){this.dxfStr=`0
|
|
18
|
+
SECTION
|
|
19
|
+
2
|
|
20
|
+
ENTITIES
|
|
21
|
+
`}addCircle(t,e,n){this.dxfStr+=`0
|
|
22
|
+
CIRCLE
|
|
23
|
+
8
|
|
24
|
+
PARAMETRIX
|
|
25
|
+
`,this.dxfStr+=`10
|
|
26
|
+
${et(t)}
|
|
27
|
+
20
|
|
28
|
+
${et(e)}
|
|
29
|
+
40
|
|
30
|
+
${et(n)}
|
|
31
|
+
`}addLine(t,e,n,r){this.dxfStr+=`0
|
|
32
|
+
LINE
|
|
33
|
+
8
|
|
34
|
+
PARAMETRIX
|
|
35
|
+
`,this.dxfStr+=`10
|
|
36
|
+
${et(t)}
|
|
37
|
+
20
|
|
38
|
+
${et(e)}
|
|
39
|
+
11
|
|
40
|
+
${et(n)}
|
|
41
|
+
21
|
|
42
|
+
${et(r)}
|
|
43
|
+
`}addArc(t,e,n,r,s){this.dxfStr+=`0
|
|
44
|
+
ARC
|
|
45
|
+
8
|
|
46
|
+
PARAMETRIX
|
|
47
|
+
`,this.dxfStr+=`10
|
|
48
|
+
${et(t)}
|
|
49
|
+
20
|
|
50
|
+
${et(e)}
|
|
51
|
+
40
|
|
52
|
+
${et(n)}
|
|
53
|
+
50
|
|
54
|
+
${et(r)}
|
|
55
|
+
51
|
|
56
|
+
${et(s)}
|
|
57
|
+
`}close(){this.dxfStr+=`0
|
|
58
|
+
ENDSEC
|
|
59
|
+
0
|
|
60
|
+
EOF
|
|
61
|
+
`}stringify(){return this.close(),this.dxfStr}};function Mf(){return new If}function Bf(t,e,n){return{circle:!0,cx:t,cy:e,radius:n}}var Of=class{seg;constructor(){this.seg=[]}addStart(t,e){this.seg=[];const n={typ:0,px:t,py:e};this.seg.push(n)}addStroke(t,e){const n={typ:1,px:t,py:e};this.seg.push(n)}addArc(t,e,n,r,s){const i={typ:2,px:t,py:e,radius:n,large:r,ccw:s};this.seg.push(i)}toJson(){return{circle:!1,seg:this.seg}}};function Rf(){return new Of}var oc=class{};function ac(t,e,n,r){const s=Nt(t,e,n),i=K(s.pc.cx,s.pc.cy),o=Tt(s.a2-s.a1),c=(n.arcCcw?o:o-2*Math.PI)/r,u=[];for(let l=1;l<r;l++)u.push(i.translatePolar(s.a1+l*c,n.radius));return u}var Lf=class Ot extends oc{circle=!1;segments;points;debugPoints;debugLines;lastPoint;lastPoint2;imposedColor;constructor(e,n,r=""){super(),this.segments=[new nt(6,e,n,0)],this.points=[],this.debugPoints=[],this.debugLines=[],this.lastPoint=K(e,n),this.lastPoint2=K(e,n),this.imposedColor=r}setLastPoint(e,n){this.lastPoint2=this.lastPoint,this.lastPoint=K(e,n)}getLastPoint(){return this.lastPoint}getFirstPoint(){return K(this.segments[0].px,this.segments[0].py)}addPointA(e,n){if(this.points.length>2)throw`err311: contour add too much point ${e} ${n}`;return this.points.push(K(e,n)),this}addPointAP(e,n){const r=K(0,0).translatePolar(e,n);return this.addPointA(r.cx,r.cy),this}addPointR(e,n){const s=this.getLastPoint().translate(e,n);return this.addPointA(s.cx,s.cy),this}addPointRP(e,n){const s=this.getLastPoint().translatePolar(e,n);return this.addPointA(s.cx,s.cy),this}addSeg(e){return this.segments.push(e),this}addSegStroke(){if(this.points.length!==1)throw`err554: contour addSegStroke at segment ${this.segments.length} with unexpected points.length ${this.points.length}`;const e=this.points.pop();if(e!==void 0){const n=new nt(0,e.cx,e.cy,0);e.isEqual(this.getLastPoint())||(this.addSeg(n),this.setLastPoint(e.cx,e.cy))}else throw"err284: contour p1 is undefined";return this}addSegStrokeA(e,n){return this.addPointA(e,n).addSegStroke(),this}addSegStrokeAP(e,n){return this.addPointAP(e,n).addSegStroke(),this}addSegStrokeR(e,n){return this.addPointR(e,n).addSegStroke(),this}addSegStrokeRP(e,n){return this.addPointRP(e,n).addSegStroke(),this}addSegArc(e,n,r){if(this.points.length!==1)throw`err954: contour addSegArc at segment ${this.segments.length} with unexpected points.length ${this.points.length}`;const s=this.points.pop();if(s!==void 0){const i=new nt(1,s.cx,s.cy,e,n,r);s.isEqual(this.getLastPoint())?console.log(`warn144: addSegArc last and new point identical ${Dt(s.cx)} ${Dt(s.cy)}`):(this.addSeg(i),this.setLastPoint(s.cx,s.cy))}else throw"err482: contour p1 is undefined";return this}addSegArc2(){if(this.points.length!==2)throw`err958: contour addSegArc2 at segment ${this.segments.length} with unexpected points.length ${this.points.length}`;const e=this.points.pop(),n=this.points.pop();if(n!==void 0&&e!==void 0){const r=this.getLastPoint(),s=hf(r,n,e),i=s.distanceToPoint(r),o=r.middlePoint(e),a=o.angleToPoint(r),c=o.angleToPoint(n),u=we(c-a);let l=!1,d=!1;if(!o.isEqual(s)){const m=o.angleToPoint(s),g=we(m-a);Math.sign(g)*Math.sign(u)>0&&(l=!0)}Math.sign(u)>0&&(d=!0),this.addPointA(e.cx,e.cy).addSegArc(i,l,d),this.debugPoints.push(n)}else throw"err488: contour p1 or p2 or seg is undefined";return this}addSegArc3(e,n){if(this.points.length!==1)throw`err914: contour addSegArc3 at segment ${this.segments.length} with unexpected points.length ${this.points.length}`;const r=this.points.pop();if(r!==void 0){const s=this.getLastPoint(),i=ys(s,r);let o=r;n&&(o=s);const a=yr(o.cx,o.cy,e+Math.PI/2),c=i.intersection(a),u=c.distanceToPoint(s),l=s.middlePoint(r),d=o.angleToPoint(l),m=we(e-d);let g=!1;Math.abs(m)>Math.PI/2&&(g=!0);let D=!1;m<0&&(D=!0),n||(D=!D),this.addPointA(r.cx,r.cy).addSegArc(u,g,D),this.debugPoints.push(l),this.debugPoints.push(c)}else throw"err282: contour p1 is undefined";return this}addSeg2Arcs(e,n){if(this.points.length!==1)throw`err214: contour addSeg2Arcs at segment ${this.segments.length} with unexpected points.length ${this.points.length}`;const r=this.points.pop();if(r!==void 0){const s=this.getLastPoint(),i=s.distanceToPoint(r),o=s.angleToPoint(r),a=r.angleToPoint(s),c=we(e-o),u=-1*we(n-a);if(Math.abs(c)>=Math.PI/2)throw`err545: addSeg2Arcs with too large au ${c}`;if(Math.abs(u)>=Math.PI/2)throw`err546: addSeg2Arcs with too large av ${u}`;if(ae(c)===0)throw`err765: addSeg2Arcs with almost zero au ${c}`;if(ae(u)===0)throw`err766: addSeg2Arcs with almost zero av ${u}`;if(Math.sign(c)*Math.sign(u)<1)throw`err767: addSeg2Arcs with au/av bad orientation ${c} ${u}`;const l=Math.tan(c/2),d=Math.tan(u/2),m=i*d/(d+l),g=Math.abs(m/Math.sin(c)),D=m/Math.cos(c/2),f=i*l/(d+l),p=Math.abs(f/Math.sin(u)),h=s.translatePolar(o+c/2,D);let x=!1;Math.sign(c)<0&&(x=!0),this.addPointA(h.cx,h.cy).addSegArc(g,!1,x),this.addPointA(r.cx,r.cy).addSegArc(p,!1,x),this.debugPoints.push(s.translatePolar(o,m)),this.debugPoints.push(s.translatePolar(o+c-Math.sign(c)*Math.PI/2,g)),this.debugPoints.push(r.translatePolar(a-u+Math.sign(c)*Math.PI/2,p))}else throw"err182: contour p1 is undefined";return this}addSegStrokeAifBig(e,n,r,s){const i=this.getLastPoint();if(Math.sqrt((e-i.cx)**2+(n-i.cy)**2)>r)this.addPointA(e,n).addSegStroke();else if(s){const a=this.segments[this.segments.length-1],c=this.lastPoint2;if(this.setLastPoint(c.cx,c.cy),a.sType===0)this.segments.pop(),this.addPointA(e,n).addSegStroke();else if(a.sType===1)this.segments.pop(),this.addPointA(e,n).addSegArc(a.radius,a.arcLarge,a.arcCcw);else throw`err186: addSegStrokeA-ifBig used after eStart or eCorner ${a.sType} at segment ${this.segments.length}`}return this}addCornerPointed(){const e=new nt(2,0,0,0);return this.addSeg(e),this}addCornerRounded(e){const n=new nt(3,0,0,e);return this.addSeg(n),this}addCornerWidened(e){const n=new nt(4,0,0,e);return this.addSeg(n),this}addCornerWideAcc(e){const n=new nt(5,0,0,e);return this.addSeg(n),this}closeSegStroke(){const e=this.segments[0].px,n=this.segments[0].py;return this.addSegStrokeA(e,n),this}closeSegArc(e,n,r){const s=this.segments[0].px,i=this.segments[0].py;return this.addPointA(s,i).addSegArc(e,n,r),this}clone(){const e=new Ot(this.segments[0].px,this.segments[0].py);for(const n of this.segments){const r=n.clone();r.sType!==6&&(e.addSeg(r),at(r.sType)&&e.setLastPoint(r.px,r.py))}return e}translate(e,n){const r=this.segments[0].px+e,s=this.segments[0].py+n,i=new Ot(r,s);for(const o of this.segments){const a=o.clone();at(o.sType)&&(a.px+=e,a.py+=n),a.sType!==6&&(i.addSeg(a),at(a.sType)&&i.setLastPoint(a.px,a.py))}return i}translatePolar(e,n){return this.translate(n*Math.cos(e),n*Math.sin(e))}rotate(e,n,r){const s=K(e,n),o=K(this.segments[0].px,this.segments[0].py).rotate(s,r),a=new Ot(o.cx,o.cy);for(const c of this.segments){const u=c.clone();if(at(c.sType)){const d=K(u.px,u.py).rotate(s,r);u.px=d.cx,u.py=d.cy}u.sType!==6&&(a.addSeg(u),at(u.sType)&&a.setLastPoint(u.px,u.py))}return a}scale(e,n,r,s=!1){const i=K(e,n),a=K(this.segments[0].px,this.segments[0].py).scale(i,r),c=new Ot(a.cx,a.cy);for(const u of this.segments){const l=u.clone();if(at(u.sType)){const m=K(l.px,l.py).scale(i,r);l.px=m.cx,l.py=m.cy}u.sType===1&&(l.radius*=r),er(u.sType)&&s&&(l.radius*=r),l.sType!==6&&(c.addSeg(l),at(l.sType)&&c.setLastPoint(l.px,l.py))}return c}addPartial(e){if(this.points.length>0)throw`err911: addPartial, points should be used ${this.points.length}`;let n=e;if(e.segments.length>0){const r=e.segments[0],s=this.getLastPoint(),i=r.px-s.cx,o=r.py-s.cy;r.sType===6&&(n=e.translate(-i,-o))}for(const r of n.segments)r.sType!==6&&(this.addSeg(r),at(r.sType)&&this.setLastPoint(r.px,r.py));return this}draw(e,n,r=_e.contour){const s=this.imposedColor===""?r:this.imposedColor;let i=0,o=0;for(const a of this.segments){if(a.sType===0){const[c,u]=zt(i,o,n),[l,d]=zt(a.px,a.py,n);e.beginPath(),e.moveTo(c,u),e.lineTo(l,d),e.strokeStyle=s,e.stroke()}if(a.sType===1)try{const c=Nt(i,o,a),[u,l]=zt(c.pc.cx,c.pc.cy,n),d=nc(a.radius,n);e.beginPath(),e.arc(u,l,d,-c.a1,-c.a2,a.arcCcw),e.strokeStyle=s,e.stroke()}catch(c){console.log("err413: "+c)}wn(a.sType)&&(i=a.px,o=a.py)}}extractSkeleton(){const e=this.segments[0],n=new Ot(e.px,e.py);for(const r of this.segments)at(r.sType)&&n.addSeg(r);return n}generateContour(){Lt.clearPoints(),Lt.clearLines();const e=[],n=[];let r=0,s=0,i=0;for(const u of this.segments){if(u.sType===0){const m=K(s,i),g=K(u.px,u.py),D=K(0,0);e.push(new st(u.sType,m,g,D,0,0,0,!1)),r=1}if(u.sType===1){const m=Nt(s,i,u);e.push(m),r=1}const l=e.at(-1),d=e.at(-2);if(l!==void 0&&d!==void 0&&at(l.sType)&&Hn(d.sType)){const m=e.pop(),g=e.pop(),D=e.pop();if(D!==void 0&&g!==void 0&&m!==void 0){const f=uo(D,g,m);e.push(...f)}else throw"err603: contour generateContour internal error"}if(Hn(u.sType)){if(r===2)throw`err419: generateContour with two consecutive corners ${u.sType}`;if(r===0&&er(u.sType)&&u.radius>0){const m=K(0,0);n.push(new st(u.sType,m,m,m,u.radius,0,0,!1))}if(r===1&&er(u.sType)&&u.radius>0){const m=K(0,0);e.push(new st(u.sType,m,m,m,u.radius,0,0,!1))}r=2}wn(u.sType)&&(s=u.px,i=u.py)}if(n.length>0)if(r===1)e.push(...n);else throw"err397: contour generateContour Corners defined at end and begining";const o=e.at(-1);if(o!==void 0&&Hn(o.sType)){const u=e[0],l=e.pop(),d=e.pop();if(d!==void 0&&l!==void 0&&u!==void 0){const m=uo(d,l,u);e.push(...m.slice(0,-1));const g=m.at(-1);if(g!==void 0)e[0]=g;else throw"err606: contour generateContour internal error"}else throw"err602: contour generateContour internal error"}const a=e[0],c=new Ot(a.p1.cx,a.p1.cy,this.imposedColor);c.debugPoints.push(...Lt.getPoints()),c.debugLines.push(...Lt.getLines());for(const u of e)if(u.sType===0)c.addSegStrokeA(u.p2.cx,u.p2.cy);else if(u.sType===1){const l=gf(u);c.addPointA(u.p2.cx,u.p2.cy).addSegArc(l.radius,l.arcLarge,l.arcCcw)}else throw`err986: contour generateContour unexpected in seg2 Enum ${u.sType}`;return c}generatePoints(e){const n=[];let r=0,s=0;for(const i of this.segments){if(i.sType===1)try{const o=ac(r,s,i,e);n.push(...o)}catch(o){console.log("err453: "+o)}wn(i.sType)&&(r=i.px,s=i.py,n.push(K(r,s)))}return n}getOrientation(e,n,r){const i=e.slice(1);let o=0,a=i.at(-3),c=i.at(-2),u=i.at(-1),l=-1;for(const[m,g]of i.entries()){a=c,c=u,u=g;const D=r?c.cx>n-.001:c.cx<n+.001,f=r?a.cx>n-.001:a.cx<n+.001;if(D&&!f){const p=a.cx-c.cx,h=a.cy-c.cy,x=u.cx-c.cx,y=u.cy-c.cy,E=x*h-y*p;o=Math.sign(E),l=m}}if(o===0)throw`err299: Orientation not found with ${i.length} points and foundIdx ${l}`;return o>0}getEnvelop(){const e=this.generatePoints(24),n=[],r=[];for(const l of e)n.push(l.cx),r.push(l.cy);const s=Math.min(...n),i=Math.max(...n),o=Math.min(...r),a=Math.max(...r),c=this.getOrientation(e,s,!1),u=this.getOrientation(e,i,!0);if(u!==c)throw`err390: orientation unstable ${c} ${u} with ${e.length} points`;return{xMin:s,xMax:i,yMin:o,yMax:a,orientation:c}}generateLines(){const e=[];return e.push(...this.debugLines),e}checkContour(e){if(e.segments[0].sType!==6)throw`err412: contour check first seg is not eStart ${e.segments[0].sType}`;let n=0,r=0;for(const o of e.segments){if(o.sType===1)try{Nt(n,r,o)}catch(a){throw`err778: ${a}`}wn(o.sType)&&(n=o.px,r=o.py)}const s=e.segments[0].px,i=e.segments[0].py;if(ae(n-s)!==0||ae(r-i)!==0)throw`err414: contour check, contour is not closed px ${s} ${n} py ${s} ${i}`}check(){Lt.clearMsg(),this.checkContour(this);const e=this.generateContour();return this.checkContour(e),Lt.getMsg()}toSvg(e,n=""){const r=Cf();for(const i of this.segments)i.sType===6?r.addStart(i.px,e-i.py):i.sType===0?r.addStroke(i.px,e-i.py):i.sType===1?r.addArc(i.px,e-i.py,i.radius,i.arcLarge,!i.arcCcw):console.log(`err631: contour.toSvg has unknown segment type ${i.sType}`);return r.stringify(n)}toDxfSeg(){const e=[];let n=0,r=0;for(const s of this.segments){if(s.sType===0)e.push(Tf(n,r,s.px,s.py));else if(s.sType===1)try{const i=Nt(n,r,s);e.push(kf(i.pc.cx,i.pc.cy,s.radius,i.a1,i.a2,i.arcCcw))}catch(i){console.log("err413: "+i)}wn(s.sType)&&(n=s.px,r=s.py)}return e}toPax(){const e=Rf();for(const r of this.segments)r.sType===6?e.addStart(r.px,r.py):r.sType===0?e.addStroke(r.px,r.py):r.sType===1?e.addArc(r.px,r.py,r.radius,r.arcLarge,r.arcCcw):console.log(`err709: contour.toPax has unknown segment type ${r.sType}`);return e.toJson()}getPerimeter(){let e=0;const n=this.generateContour();let r=0,s=0;for(const i of n.segments)if(i.sType===6)r=i.px,s=i.py;else if(i.sType===0){const o=Math.sqrt((i.px-r)**2+(i.py-s)**2);r=i.px,s=i.py,e+=o}else if(i.sType===1){const o=Nt(r,s,i),a=Tt(o.a2-o.a1),c=o.arcCcw?a:Tt(2*Math.PI-a),u=i.radius*c;r=i.px,s=i.py,e+=u}else console.log(`err760: contour.getPerimeter has unknown segment type ${i.sType}`);return e}generateRevertOrientation(){let e=this.segments[0];const n=new Ot(e.px,e.py);let r=this.segments[0],s=!1;for(const i of this.segments.slice().reverse())if(Hn(i.sType))s=!0,e=i;else{if(r.sType!==6){const o=new nt(r.sType,i.px,i.py,r.radius,r.arcLarge,!r.arcCcw);n.addSeg(o)}r=i,s&&(n.addSeg(e),s=!1)}return n}},Nf=class Gt extends oc{circle=!0;px;py;radius;imposedColor;constructor(e,n,r,s=""){if(super(),this.px=e,this.py=n,this.radius=r,this.imposedColor=s,r<0)throw`err432: iRadius ${r} is negative at circle ix ${e}, iy ${n}`}clone(){return new Gt(this.px,this.py,this.radius,this.imposedColor)}translate(e,n){return new Gt(this.px+e,this.py+n,this.radius,this.imposedColor)}translatePolar(e,n){return this.translate(n*Math.cos(e),n*Math.sin(e))}rotate(e,n,r){const s=K(e,n),i=K(this.px,this.py).rotate(s,r);return new Gt(i.cx,i.cy,this.radius,this.imposedColor)}draw(e,n,r=_e.contour){const[s,i]=zt(this.px,this.py,n),o=nc(this.radius,n),a=this.imposedColor===""?r:this.imposedColor;e.beginPath(),e.arc(s,i,o,0,2*Math.PI,!0),e.strokeStyle=a,e.stroke()}extractSkeleton(){return new Gt(this.px,this.py,this.radius)}generateContour(){return new Gt(this.px,this.py,this.radius,this.imposedColor)}generatePoints(e){const n=[],r=K(this.px,this.py),s=e*2;n.push(r);for(let i=0;i<s;i++){const o=r.translatePolar(i*2*Math.PI/s,this.radius);n.push(o)}return n}getEnvelop(){return{xMin:this.px-this.radius,xMax:this.px+this.radius,yMin:this.py-this.radius,yMax:this.py+this.radius,orientation:!0}}generateLines(){return[]}check(){return""}toSvg(e,n=""){return Ef(this.px,e-this.py,this.radius,n)}toDxfSeg(){const e=[];return e.push(Pf(this.px,this.py,this.radius)),e}toPax(){return Bf(this.px,this.py,this.radius)}getPerimeter(){return 2*Math.PI*this.radius}generateRevertOrientation(){return new Gt(this.px,this.py,this.radius,this.imposedColor)}};function $f(t,e,n=""){return new Lf(t,e,n)}function t1(t,e,n,r=""){return new Nf(t,e,n,r)}var Uf=class _s{pointList;lineList;vectorList;mainList;mainBList;secondList;secondBList;dynamicsList;xMin;xMax;yMin;yMax;constructor(){this.pointList=[],this.lineList=[],this.vectorList=[],this.mainList=[],this.mainBList=[],this.secondList=[],this.secondBList=[],this.dynamicsList=[],this.xMin=0,this.xMax=0,this.yMin=0,this.yMax=0}addPoint(e){this.pointList.push(e)}addPoints(e){this.pointList.push(...e)}addLine(e){this.lineList.push(e)}addLines(e){for(const n of e)this.lineList.push(n)}addVector(e){this.vectorList.push(e)}addMainOI(e){const n=[];for(const r of e){const s=r.generateContour();this.addPoints(s.generatePoints(2)),this.addLines(s.generateLines()),n.push(s),this.mainBList.push(r.extractSkeleton())}this.mainList.push(n)}addMainO(e){const n=[e];this.addMainOI(n)}addSecond(e){const n=e.generateContour();this.addPoints(n.generatePoints(2)),this.addLines(n.generateLines()),this.secondList.push(n),this.secondBList.push(e.extractSkeleton())}addDynamics(e){this.addPoints(e.generatePoints(2)),this.addLines(e.generateLines()),this.dynamicsList.push(e)}translate(e,n){const r=new _s;for(const s of this.pointList)r.addPoint(s.translate(e,n));for(const s of this.lineList)r.addLine(s.translate(e,n));for(const s of this.vectorList)r.addVector(s.translate(e,n));for(const s of this.mainList){const i=[];for(const o of s)i.push(o.translate(e,n));r.addMainOI(i)}for(const s of this.secondList)r.addSecond(s.translate(e,n));for(const s of this.dynamicsList)r.addDynamics(s.translate(e,n));return r}translatePolar(e,n){return this.translate(n*Math.cos(e),n*Math.sin(e))}rotate(e,n,r){const s=new _s,i=K(e,n);for(const o of this.pointList)s.addPoint(o.rotate(i,r));for(const o of this.lineList)s.addLine(o.rotate(i,r));for(const o of this.vectorList)s.addVector(o.rotate(i,r));for(const o of this.mainList){const a=[];for(const c of o)a.push(c.rotate(e,n,r));s.addMainOI(a)}for(const o of this.secondList)s.addSecond(o.rotate(e,n,r));for(const o of this.dynamicsList)s.addDynamics(o.rotate(e,n,r));return s}mergeFigure(e,n=!1){for(const r of e.pointList)this.addPoint(r.clone());for(const r of e.lineList)this.addLine(r.clone());for(const r of e.vectorList)this.addVector(r.clone());for(const r of e.mainList){const s=[];for(const i of r)s.push(i.clone());if(n)for(const i of s)this.addSecond(i);else this.addMainOI(s)}for(const r of e.secondList)this.addSecond(r.clone());for(const r of e.dynamicsList)this.addDynamics(r.clone())}mainListC(){const e=[];for(const n of this.mainList)for(const r of n)e.push(r);return e}clear(){this.pointList=[],this.lineList=[],this.vectorList=[],this.mainList=[],this.mainBList=[],this.secondList=[],this.secondBList=[],this.dynamicsList=[]}getMinMax(){[this.xMin,this.xMax,this.yMin,this.yMax]=rc(this.pointList)}getAdjustFull(e,n){let r=Ds();return this.pointList.length>0&&(this.getMinMax(),r=ws(this.xMin,this.xMax,this.yMin,this.yMax,e,n)),r}getAdjustZoom(e,n){let r=Ds();if(this.pointList.length>0){this.getMinMax();const s=(this.xMin+this.xMax)/2,i=(this.yMin+this.yMax)/2;r=ws(s,this.xMax,i,this.yMax,e,n)}return r}quantifyRuler(e,n){const s=e/10/n.scaleX;let i=1e-4;for(;i<s;)i*=10;i/5>s?i/=5:i/2>s&&(i/=2);const o=i*n.scaleX;return[i,o]}drawRuler(e,n,r){const[s,i]=this.quantifyRuler(e.canvas.width,n),o=e.canvas.width-10-i;e.font="15px Arial",e.fillStyle=r,e.fillText(`${s.toFixed(4)}`,o,20),e.beginPath(),e.moveTo(o,25),e.lineTo(o+i,25),e.lineTo(o+i,25+i),e.strokeStyle=r,e.stroke()}draw(e,n,r){if(r.points)for(const s of this.pointList)s.draw(e,n);if(r.lines)for(const s of this.lineList)s.draw(e,n);if(r.vectors)for(const s of this.vectorList)s.draw(e,n);if(r.main)for(const s of this.mainList)for(const[i,o]of s.entries()){let a=_e.mainOuter;i>0&&(a=_e.mainInner),o.draw(e,n,a)}if(r.mainB)for(const s of this.mainBList)s.draw(e,n,_e.mainB);if(r.second)for(const s of this.secondList)s.draw(e,n,_e.second);if(r.secondB)for(const s of this.secondBList)s.draw(e,n,_e.secondB);if(r.dynamics)for(const s of this.dynamicsList)s.draw(e,n,_e.dynamics);if(r.ruler&&this.drawRuler(e,n,_e.ruler),r.refframe){for(const s of[10,100,200])K(s,0).draw(e,n,_e.reference,2),K(-s,0).draw(e,n,_e.reference,2),K(0,s).draw(e,n,_e.reference,2),K(0,-s).draw(e,n,_e.reference,2);K(0,0).draw(e,n,_e.origin,2)}}};function Vf(){return new Uf}function bs(t){const e=Vf();for(const n in t){const r=t[n];for(const s of r.pointList)e.pointList.push(s);for(const s of r.lineList)e.lineList.push(s);for(const s of r.vectorList)e.vectorList.push(s);for(const s of r.mainList)e.mainList.push(s);for(const s of r.mainBList)e.mainBList.push(s);for(const s of r.secondList)e.secondList.push(s);for(const s of r.secondBList)e.secondBList.push(s);for(const s of r.dynamicsList)e.dynamicsList.push(s)}return e}function n1(){return{points:!1,lines:!1,vectors:!1,main:!0,mainB:!1,second:!0,secondB:!1,dynamics:!1,ruler:!0,refframe:!1}}function r1(t){return{points:t.points,lines:t.lines,vectors:t.vectors,main:t.main,mainB:t.mainB,second:t.second,secondB:t.secondB,dynamics:t.dynamics,ruler:t.ruler,refframe:t.refframe}}var jf=(t=>(t[t.eNumber=0]="eNumber",t[t.eCheckbox=1]="eCheckbox",t[t.eDropdown=2]="eDropdown",t[t.eSectionSeparator=3]="eSectionSeparator",t))(jf||{}),fn={partName:"",params:[],paramSvg:{},sim:{tMax:0,tStep:0,tUpdate:0}};function s1(t){const e={};for(const n of Object.keys(t))e[n]=t[n].val;return e}function i1(t,e,n,r=0,s=100,i=1){return{name:t,unit:e,init:n,min:r,max:s,step:i,dropdown:[],pType:0}}function o1(t,e){return{name:t,unit:"checkbox",init:e?1:0,min:0,max:1,step:1,dropdown:[],pType:1}}function a1(t,e,n=0){let r=0;return n<e.length&&(r=n),{name:t,unit:"dropdown",init:r,min:0,max:e.length-1,step:1,dropdown:e,pType:2}}function c1(t){return{name:t,unit:"section-separator",init:0,min:0,max:0,step:0,dropdown:[],pType:3}}var qf=(t=>(t[t.eLinearOrtho=0]="eLinearOrtho",t[t.eRotate=1]="eRotate",t))(qf||{}),Wf=(t=>(t[t.eIdentity=0]="eIdentity",t[t.eIntersection=1]="eIntersection",t[t.eUnion=2]="eUnion",t[t.eSubstraction=3]="eSubstraction",t))(Wf||{});function u1(t){return{partName:t,calcErr:!0,logstr:"",fig:{},vol:{extrudes:[],volumes:[]},sub:{}}}var Yf=class{figureToPaxF(t){const e=[];for(const n of t){const r=[];for(const s of n)r.push(s.toPax());e.push(r)}return e}getFigures(t){const e={};for(const n in t){const r=this.figureToPaxF(t[n].mainList);e[n]=r}return e}getPaxJson(t,e,n){return{partName:e.partName,pDef:n,params:t,figures:this.getFigures(e.fig),volume:e.vol,subs:e.sub,log:e.logstr}}getPaxStr(t,e,n){const r=this.getPaxJson(t,e,n);return JSON.stringify(r,null,2)}};function Jt(){return new Yf}function Hs(t){let e=6;return t===1?e=0:t===2&&(e=1),e}function Hf(t){return new nt(Hs(t.typ),t.px,t.py,t.radius,t.large,t.ccw)}function cc(t,e,n,r){let s=Math.PI/2;e<2*n&&(s=2*Math.asin(e/(2*n)));const i=Math.min(t,s),o=Math.ceil(r/i),a=r/o;return[o,a]}function uc(t,e,n,r=Math.PI/6,s=2){const[i,o]=cc(r,s,n,2*Math.PI),a=[];for(let l=0;l<i;l++){const d=t+n*Math.cos(l*o),m=e+n*Math.sin(l*o);a.push([d,m])}const c=a[0][0],u=a[0][1];return a.push([c,u]),a}function lc(t,e,n,r,s,i,o=Math.PI/6,a=2){const c=gs(r,s,i),[u,l]=cc(o,a,n,Math.abs(c)),d=i?l:-l,m=u+1,g=[];for(let D=1;D<m;D++){const f=r+D*d,p=t+n*Math.cos(f),h=e+n*Math.sin(f);g.push([p,h])}return g}var fc=Math.PI/16,dc=2;function lo(t){return t.toFixed(4)}function fo(t){return t.toString().padStart(3,"0")}function po(t,e){return[[t,e]]}function Gf(t,e,n,r,s,i){return lc(t,e,n,r,s,i,fc,dc)}function Zf(t,e,n){return uc(t,e,n,fc,dc)}function Xf(t){const e=[];let n=0,r=0;for(const s of t){if(s.typ===0)e.push(...po(s.px,s.py));else if(s.typ===1)e.push(...po(s.px,s.py));else if(s.typ===2)try{const i=s,o=new nt(Hs(i.typ),i.px,i.py,i.radius,i.large,i.ccw),a=Nt(n,r,o);e.push(...Gf(a.pc.cx,a.pc.cy,o.radius,a.a1,a.a2,a.arcCcw))}catch(i){console.log("err730: "+i)}n=s.px,r=s.py}return e}var zf=class{pts;ptIdx;idx;constructor(){this.pts=[],this.ptIdx=[],this.idx=0}addContour(t){const e=[],n=[];for(const i of t){const[o,a]=i;e.push(`[ ${lo(o)}, ${lo(a)} ]`),n.push(` ${this.idx}`),this.idx+=1}const r=`[ ${e.join(",")} ]`,s=`[ ${n.join(",")} ]`;this.pts.push(r),this.ptIdx.push(s)}getFigure(t){let e="";const n=[],r=[];for(const o of this.pts.keys()){const a=`ca_${t}_${fo(o)}`,c=`cb_${t}_${fo(o)}`;e+=`${a} = ${this.pts[o]};
|
|
62
|
+
`,e+=`${c} = ${this.ptIdx[o]};
|
|
63
|
+
`,n.push(a),r.push(c)}const s=n.join(", "),i=r.join(", ");return e+=`a_${t} = concat(${s});
|
|
64
|
+
`,e+=`b_${t} = [${i}];
|
|
65
|
+
`,e}},Kf=class{getHeader(){return`// Generated by Parametrix
|
|
66
|
+
`}getOneFigure(t,e){const n=new zf;for(const s of t)for(const i of s)if(i.circle===!0){const o=i,a=Zf(o.cx,o.cy,o.radius);n.addContour(a)}else{const a=Xf(i.seg);n.addContour(a)}return n.getFigure(e)}getAllFigures(t,e){let n="";for(const r in t){const s=this.getOneFigure(t[r],`${e}_${r}`);n+=s}return n}getOneExtrude(t){let e="rotate_extrude",n="";return t.extrudeMethod===0&&(t.length===void 0&&console.log("err103: design error: scad-linear_extrude length undefined!"),e="linear_extrude",n=`height = ${t.length}`),`
|
|
67
|
+
module ${t.outName} () {
|
|
68
|
+
translate( [ ${t.translate[0]}, ${t.translate[1]}, ${t.translate[2]} ])
|
|
69
|
+
rotate( [ ${qe(t.rotate[0])}, ${qe(t.rotate[1])}, ${qe(t.rotate[2])} ])
|
|
70
|
+
${e}(${n}) polygon(a_${t.face}, b_${t.face});
|
|
71
|
+
}
|
|
72
|
+
`}getAllExtrudes(t){let e="";for(const n of t){const r=this.getOneExtrude(n);e+=r}return e}getOneVolume(t){let e="identity";switch(t.boolMethod){case 1:e="intersection";break;case 2:e="union";break;case 3:e="difference";break}const n=[];for(const i of t.inList)n.push(`${i}();`);const r=n.join(`
|
|
73
|
+
`);let s=`
|
|
74
|
+
module ${t.outName} () {
|
|
75
|
+
${e} () {
|
|
76
|
+
${r}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
`;return t.boolMethod===0&&(s=`
|
|
80
|
+
module ${t.outName} () {
|
|
81
|
+
${r}
|
|
82
|
+
}
|
|
83
|
+
`),s}getAllVolumes(t){let e="";for(const n of t){const r=this.getOneVolume(n);e+=r}return e}getAllSubGeoms(t){const e=[];for(const n of t)e.includes(n.subgeom)||e.push(n.subgeom);return e}getOneInherit(t){return`
|
|
84
|
+
module ${t.outName} () {
|
|
85
|
+
translate( [ ${t.translate[0]}, ${t.translate[1]}, ${t.translate[2]} ])
|
|
86
|
+
rotate( [ ${qe(t.rotate[0])}, ${qe(t.rotate[1])}, ${qe(t.rotate[2])} ])
|
|
87
|
+
${t.subdesign}();
|
|
88
|
+
}
|
|
89
|
+
`}getAllInherits(t){let e="";for(const n of t){const r=this.getOneInherit(n);e+=r}return e}getVolume(t){let e="";if(t.inherits!==void 0){const n=this.getAllSubGeoms(t.inherits);for(const r of n){const s=Jt().getPaxJson({},r,fn);e+=this.getAllFigures(s.figures,s.partName),e+=this.getVolume(r.vol)}e+=this.getAllInherits(t.inherits)}return e+=this.getAllExtrudes(t.extrudes),e+=this.getAllVolumes(t.volumes),e}getFooter(t){return`
|
|
90
|
+
pax_${t}();
|
|
91
|
+
`}getExportFile(t){let e=this.getHeader();return e+=this.getAllFigures(t.figures,t.partName),e+=this.getVolume(t.volume),e+=this.getFooter(t.partName),e}};function Jf(){return new Kf}var pc=Math.PI/16,hc=2;function ho(t){return t.toFixed(4)}function mo(t){return t.toString().padStart(3,"0")}function xo(t,e){return[[t,e]]}function Qf(t,e,n,r,s,i){return lc(t,e,n,r,s,i,pc,hc)}function ed(t){const e=[];let n=0,r=0;for(const s of t){if(s.typ===0)e.push(...xo(s.px,s.py));else if(s.typ===1)e.push(...xo(s.px,s.py));else if(s.typ===2)try{const i=s,o=new nt(Hs(i.typ),i.px,i.py,i.radius,i.large,i.ccw),a=Nt(n,r,o);e.push(...Qf(a.pc.cx,a.pc.cy,o.radius,a.a1,a.a2,a.arcCcw))}catch(i){console.log("err730: "+i)}n=s.px,r=s.py}return e}function td(t,e,n){return uc(t,e,n,pc,hc)}function mc(t,e){const n=[];for(const i of t){const[o,a]=i;n.push(`[ ${ho(o)}, ${ho(a)} ]`)}const r=`[ ${n.join(`,
|
|
92
|
+
`)} ]`;return`const ${e} = polygon({ points: ${r} });
|
|
93
|
+
|
|
94
|
+
`}function nd(t,e,n,r){const s=td(t,e,n);return mc(s,r)}function rd(t,e){const n=ed(t);return mc(n,e)}function sd(t,e){let n="";const r=t[0];return t.slice(1).length>0?n+=`${e} = subtract( ${t.join(", ")} );
|
|
95
|
+
`:n+=`${e} = ${r};
|
|
96
|
+
`,n}function id(t,e){let n="";const r=t[0];return t.slice(1).length>0?n+=`${e} = union( ${t.join(", ")} );
|
|
97
|
+
`:n+=`${e} = ${r};
|
|
98
|
+
`,n}var od=class{getHeader(){return`// Generated by Parametrix
|
|
99
|
+
|
|
100
|
+
const { polygon } = require('@jscad/modeling').primitives;
|
|
101
|
+
//const { subtract } = require('@jscad/modeling').booleans;
|
|
102
|
+
//const { union, intersect, scission, subtract } = require('@jscad/modeling').booleans;
|
|
103
|
+
const { union, intersect, subtract } = require('@jscad/modeling').booleans;
|
|
104
|
+
const { extrudeLinear, extrudeRotate } = require('@jscad/modeling').extrusions;
|
|
105
|
+
const { translate, rotate } = require('@jscad/modeling').transforms;
|
|
106
|
+
|
|
107
|
+
const main = () => {
|
|
108
|
+
|
|
109
|
+
`}getOneFigure(t,e){let n="";const r=[];for(const[s,i]of t.entries()){const o=`face_${e}_Fa${mo(s)}`,a=[];for(const[c,u]of i.entries()){const l=`ctr_${o}_Ctr${mo(c)}`;if(u.circle===!0){const d=u;n+=nd(d.cx,d.cy,d.radius,l)}else n+=rd(u.seg,l);a.push(l)}n+=sd(a,o),r.push(o)}return n+=id(r,e),n}getAllFigures(t,e){let n="";for(const r in t){const s=this.getOneFigure(t[r],`fig_${e}_${r}`);n+=s}return n}getOneExtrude(t){let e="extrudeRotate",n="{segments: 32}";return t.extrudeMethod===0&&(t.length===void 0&&console.log("err079: design error: extrudeLinear length undefined!"),e="extrudeLinear",n=`{height: ${t.length}}`),`
|
|
110
|
+
const ${t.outName} =
|
|
111
|
+
translate( [ ${t.translate[0]}, ${t.translate[1]}, ${t.translate[2]}, ],
|
|
112
|
+
rotate( [ ${t.rotate[0]}, ${t.rotate[1]}, ${t.rotate[2]}, ],
|
|
113
|
+
${e}( ${n}, fig_${t.face} )
|
|
114
|
+
)
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
`}getAllExtrudes(t){let e="";for(const n of t){const r=this.getOneExtrude(n);e+=r}return e}getOneVolume(t){let e="identity";switch(t.boolMethod){case 1:e="intersect";break;case 2:e="union";break;case 3:e="subtract";break}const n=t.inList.join(", ");let r=`const ${t.outName} = ${e}( ${n} );
|
|
118
|
+
`;return t.boolMethod===0&&(r=`const ${t.outName} = ${t.inList[0]};
|
|
119
|
+
`),r}getAllVolumes(t){let e="";for(const n of t){const r=this.getOneVolume(n);e+=r}return e}getAllSubGeoms(t){const e=[];for(const n of t)e.includes(n.subgeom)||e.push(n.subgeom);return e}getOneInherit(t){return`
|
|
120
|
+
const ${t.outName} =
|
|
121
|
+
translate( [ ${t.translate[0]}, ${t.translate[1]}, ${t.translate[2]}, ],
|
|
122
|
+
rotate( [ ${t.rotate[0]}, ${t.rotate[1]}, ${t.rotate[2]}, ],
|
|
123
|
+
${t.subdesign}
|
|
124
|
+
)
|
|
125
|
+
);
|
|
126
|
+
`}getAllInherits(t){let e="";for(const n of t){const r=this.getOneInherit(n);e+=r}return e}getVolume(t){let e="";if(t.inherits!==void 0){const n=this.getAllSubGeoms(t.inherits);for(const r of n){const s=Jt().getPaxJson({},r,fn);e+=this.getAllFigures(s.figures,s.partName),e+=this.getVolume(r.vol)}e+=this.getAllInherits(t.inherits)}return e+=this.getAllExtrudes(t.extrudes),e+=this.getAllVolumes(t.volumes),e}getFooter(t){return`
|
|
127
|
+
return pax_${t};
|
|
128
|
+
}
|
|
129
|
+
module.exports = { main };
|
|
130
|
+
`}getExportFile(t){let e=this.getHeader();return e+=this.getAllFigures(t.figures,t.partName),e+=this.getVolume(t.volume),e+=this.getFooter(t.partName),e}};function ad(){return new od}function De(t){return t.toFixed(4)}function ke(t){return t.toString().padStart(3,"0")}function cd(t,e,n,r){return`def ${r}():
|
|
131
|
+
# Radius, XYZ-position, orientation
|
|
132
|
+
aCircle = Part.makeCircle(${De(n)}, App.Vector(${De(t)}, ${De(e)}, 0), App.Vector(0, 0, 1))
|
|
133
|
+
aWire = Part.Wire(aCircle)
|
|
134
|
+
rFace = Part.Face(aWire)
|
|
135
|
+
return rFace
|
|
136
|
+
|
|
137
|
+
`}function ud(t,e){let n=`def ${e}():
|
|
138
|
+
`,r=0,s=0,i=0,o=0,a=0;for(const[u,l]of t.entries()){if(l.typ===0)n+=` P${ke(i)} = App.Vector(${De(l.px)}, ${De(l.py)}, 0)
|
|
139
|
+
`,i+=1;else if(l.typ===1)n+=` P${ke(i)} = App.Vector(${De(l.px)}, ${De(l.py)}, 0)
|
|
140
|
+
`,u<t.length-1?o=i:o=0,n+=` S${ke(a)} = Part.LineSegment(P${ke(i-1)}, P${ke(o)})
|
|
141
|
+
`,i+=1,a+=1;else if(l.typ===2){try{const d=Hf(l),m=ac(r,s,d,2)[0];n+=` P${ke(i)} = App.Vector(${De(m.cx)}, ${De(m.cy)}, 0)
|
|
142
|
+
`,i+=1}catch(d){console.log("err730: "+d)}n+=` P${ke(i)} = App.Vector(${De(l.px)}, ${De(l.py)}, 0)
|
|
143
|
+
`,u<t.length-1?o=i:o=0,n+=` S${ke(a)} = Part.Arc(P${ke(i-2)}, P${ke(i-1)}, P${ke(o)})
|
|
144
|
+
`,i+=1,a+=1}r=l.px,s=l.py}const c=Array.from({length:a},(u,l)=>`S${ke(l)}`);return n+=` aShape = Part.Shape([${c.join(", ")}])
|
|
145
|
+
aWire = Part.Wire(aShape.Edges)
|
|
146
|
+
subFace = Part.Face(aWire)
|
|
147
|
+
subFace.check()
|
|
148
|
+
return subFace
|
|
149
|
+
|
|
150
|
+
`,n}function ld(t,e){let n=`def ${e}():
|
|
151
|
+
`;const r=[];for(const[o,a]of t.entries()){const c=`FC${ke(o)}`;n+=` ${c} = ${a}()
|
|
152
|
+
`,r.push(c)}const s=r[0],i=r.slice(1);return i.length>0?n+=` rOneFace = ${s}.cut([${i.join(", ")}])
|
|
153
|
+
`:n+=` rOneFace = ${s}
|
|
154
|
+
`,n+=` rOneFace.check()
|
|
155
|
+
return rOneFace
|
|
156
|
+
|
|
157
|
+
`,n}function fd(t,e){let n=`def ${e}():
|
|
158
|
+
`;const r=[];for(const[o,a]of t.entries()){const c=`FA${ke(o)}`;n+=` ${c} = ${a}()
|
|
159
|
+
`,r.push(c)}const s=r[0],i=r.slice(1);return i.length>0?n+=` rOneFig = ${s}.fuse([${i.join(", ")}])
|
|
160
|
+
`:n+=` rOneFig = ${s}
|
|
161
|
+
`,n+=` rOneFig.check()
|
|
162
|
+
return rOneFig
|
|
163
|
+
|
|
164
|
+
`,n}var dd=class{getHeader(t){return`# freecad-python generated by Parametrix
|
|
165
|
+
# run the script with:
|
|
166
|
+
# freecad.cmd myScript.py
|
|
167
|
+
|
|
168
|
+
import FreeCAD as App
|
|
169
|
+
import Part
|
|
170
|
+
|
|
171
|
+
#print(sys.argv)
|
|
172
|
+
outFileName = "${t}"
|
|
173
|
+
if (len(sys.argv) == 3):
|
|
174
|
+
outFileName = sys.argv[2]
|
|
175
|
+
print(f"outFileName: {outFileName}")
|
|
176
|
+
|
|
177
|
+
`}getOneFigure(t,e){let n="";const r=[];for(const[s,i]of t.entries()){const o=`face_${e}_Fa${s}`,a=[];for(const[c,u]of i.entries()){const l=`ctr_${o}_Ctr${c}`;if(u.circle===!0){const d=u;n+=cd(d.cx,d.cy,d.radius,l)}else n+=ud(u.seg,l);a.push(l)}n+=ld(a,o),r.push(o)}return n+=fd(r,e),n}getAllFigures(t,e){let n="";for(const r in t){const s=this.getOneFigure(t[r],`${e}_${r}`);n+=s}return n}getOneExtrude(t){let e=`def fex_${t.outName}():
|
|
178
|
+
FIG = ${t.face}()
|
|
179
|
+
`;return t.extrudeMethod===0?(t.length===void 0&&console.log(`err103: ${t.face} ${t.outName} design error: eLinearOrtho length undefined!`),e+=` VEX = FIG.extrude(App.Vector(0, 0, ${t.length}))`):t.extrudeMethod===1&&(e+=" VEX = FIG.revolve(App.Vector(0, 0, 0), App.Vector(0, 1, 0), 360).rotate(App.Vector(0, 0, 0), App.Vector(1, 0, 0), 90)"),e+=`
|
|
180
|
+
VR1 = VEX.rotate(App.Vector(0, 0, 0), App.Vector(1, 0, 0), ${De(qe(t.rotate[0]))})
|
|
181
|
+
VR2 = VR1.rotate(App.Vector(0, 0, 0), App.Vector(0, 1, 0), ${De(qe(t.rotate[1]))})
|
|
182
|
+
VR3 = VR2.rotate(App.Vector(0, 0, 0), App.Vector(0, 0, 1), ${De(qe(t.rotate[2]))})
|
|
183
|
+
VFP = VR3.translate(App.Vector(${De(t.translate[0])}, ${De(t.translate[1])}, ${De(t.translate[2])}))
|
|
184
|
+
return VFP
|
|
185
|
+
${t.outName} = fex_${t.outName}()
|
|
186
|
+
|
|
187
|
+
`,e}getAllExtrudes(t){let e="";for(const n of t){const r=this.getOneExtrude(n);e+=r}return e}getOneVolume(t){let e="";if(t.inList.length===0)console.log(`err215: ${t.outName} has an empty inList`);else if(t.inList.length===1||t.boolMethod===0)e+=`${t.outName} = ${t.inList[0]}
|
|
188
|
+
`;else{const n=t.inList[0],r=t.inList.slice(1);let s="dbg897";switch(t.boolMethod){case 1:s="common";break;case 2:s="fuse";break;case 3:s="cut";break}e+=`def fvol_${t.outName}():
|
|
189
|
+
V000 = ${n}
|
|
190
|
+
`;let i=0;for(const o of r)e+=` V${ke(i+1)} = V${ke(i)}.${s}(${o})
|
|
191
|
+
`,i+=1;e+=` VFC = V${ke(i)}.removeSplitter()
|
|
192
|
+
return VFC
|
|
193
|
+
${t.outName} = fvol_${t.outName}()
|
|
194
|
+
|
|
195
|
+
`}return e}getAllVolumes(t){let e="";for(const n of t){const r=this.getOneVolume(n);e+=r}return e}getAllSubGeoms(t){const e=[];for(const n of t)e.includes(n.subgeom)||e.push(n.subgeom);return e}getOneInherit(t){return`def finh_${t.outName}():
|
|
196
|
+
IVR1 = ${t.subdesign}.rotate(App.Vector(0, 0, 0), App.Vector(1, 0, 0), ${De(qe(t.rotate[0]))})
|
|
197
|
+
IVR2 = IVR1.rotate(App.Vector(0, 0, 0), App.Vector(0, 1, 0), ${De(qe(t.rotate[1]))})
|
|
198
|
+
IVR3 = IVR2.rotate(App.Vector(0, 0, 0), App.Vector(0, 0, 1), ${De(qe(t.rotate[2]))})
|
|
199
|
+
IVF = IVR3.translate(App.Vector(${De(t.translate[0])}, ${De(t.translate[1])}, ${De(t.translate[2])}))
|
|
200
|
+
return IVF
|
|
201
|
+
${t.outName} = finh_${t.outName}()
|
|
202
|
+
|
|
203
|
+
`}getAllInherits(t){let e="";for(const n of t){const r=this.getOneInherit(n);e+=r}return e}getVolume(t){let e="";if(t.inherits!==void 0){const n=this.getAllSubGeoms(t.inherits);for(const r of n){const s=Jt().getPaxJson({},r,fn);e+=this.getAllFigures(s.figures,s.partName),e+=this.getVolume(r.vol)}e+=this.getAllInherits(t.inherits)}return e+=this.getAllExtrudes(t.extrudes),e+=this.getAllVolumes(t.volumes),e}getFooter(t){return`
|
|
204
|
+
pax_${t}.check()
|
|
205
|
+
#pax_${t}.exportBrep(f"{outFileName}.brep")
|
|
206
|
+
#pax_${t}.exportIges(f"{outFileName}.igs")
|
|
207
|
+
#pax_${t}.exportStep(f"{outFileName}.stp")
|
|
208
|
+
pax_${t}.exportStl(f"{outFileName}.stl")
|
|
209
|
+
|
|
210
|
+
`}getExportFile(t){let e=this.getHeader(t.partName);return e+=this.getAllFigures(t.figures,t.partName),e+=this.getVolume(t.volume),e+=this.getFooter(t.partName),e}};function pd(){return new dd}var hd=class{xMin;xMax;yMin;yMax;firstDone;constructor(){this.firstDone=!1,this.xMin=0,this.xMax=0,this.yMin=0,this.yMax=0}addAContour(t){if(t.length>0){const e=[];this.firstDone&&(e.push(K(this.xMin,this.yMin)),e.push(K(this.xMax,this.yMax)));for(const o of t)e.push(...o.generatePoints(2));const[n,r,s,i]=rc(e);this.xMin=n,this.xMax=r,this.yMin=s,this.yMax=i}}getViewBox(){const t=Math.round((this.xMax-this.xMin)*1.1)+10,e=Math.round((this.yMax-this.yMin)*1.1)+10,n=Math.round(this.xMin-t*.05),r=Math.round(this.yMin-e*.05);return[n,t,r,e]}},md=class{minMax;groups;svg;constructor(){this.minMax=new hd,this.groups=[],this.svg=Sf()}addAContour(t,e="",n=_e.contour){this.minMax.addAContour(t);const r={gpName:e,gpColor:n,ctrs:t};this.groups.push(r)}makeSvg(t){for(const e of this.groups){e.gpName!==""&&this.svg.addGroup(e.gpName);for(const n of e.ctrs){let r=n.imposedColor;r===""&&(r=e.gpColor),this.svg.addSvgString(n.toSvg(t,r))}e.gpName!==""&&this.svg.closeGroup()}}stringify(){const[t,e,n,r]=this.minMax.getViewBox();return this.svg.addHeader(t,e,n,r),this.makeSvg(this.minMax.yMax+this.minMax.yMin),this.svg.stringify()}};function xc(){return new md}function fr(t){const e=xc();return e.addAContour(t),e.stringify()}function Gn(t){const e=xc();return e.addAContour(t.mainListC(),"main",_e.mainInner),e.addAContour(t.mainBList,"mainB",_e.mainB),e.addAContour(t.secondList,"second",_e.second),e.addAContour(t.secondBList,"secondB",_e.secondB),e.addAContour(t.dynamicsList,"dynamics",_e.dynamics),e.stringify()}function dr(t){const e=Mf();for(const r of t)if(r.circle){const s=r.toDxfSeg()[0];e.addCircle(s.p1x,s.p1y,s.radius)}else for(const s of r.toDxfSeg())s.arc?e.addArc(s.p1x,s.p1y,s.radius,s.a1,s.a2):e.addLine(s.p1x,s.p1y,s.p2x,s.p2y);return e.stringify()}function xd(t){let e="";return e+=t.logstr,e}function gc(t,e,n){return Jt().getPaxStr(t,e,n)}function Dc(t){const e=Jt().getPaxJson({},t,fn);return Jf().getExportFile(e)}function wc(t){const e=Jt().getPaxJson({},t,fn);return ad().getExportFile(e)}function yc(t){const e=Jt().getPaxJson({},t,fn);return pd().getExportFile(e)}async function gd(t,e,n,r,s){const i=new j0("application/zip"),o=new ql(i),a=e.partName,c=new Le(JSON.stringify(t,null,2));await o.add(`param_${a}.json`,c);const u=new Le(e.logstr);await o.add(`geom_${a}_log.txt`,u);const l=new Le(r.logstr);await o.add(`geom_${a}_t${n}_log.txt`,l);for(const _ in e.fig){const w=new Le(fr(e.fig[_].mainListC()));await o.add(`face_${a}_${_}.svg`,w);const b=new Le(dr(e.fig[_].mainListC()));await o.add(`face_${a}_${_}.dxf`,b);const A=new Le(Gn(e.fig[_]));await o.add(`deco_${a}_${_}.svg`,A);const F=new Le(Gn(r.fig[_]));await o.add(`deco_${a}_${_}_t${n}.svg`,F)}const d=bs(e.fig),m=new Le(fr(d.mainListC()));await o.add(`face_${a}_all_merged.svg`,m);const g=new Le(dr(d.mainListC()));await o.add(`face_${a}_all_merged.dxf`,g);const D=new Le(Gn(d));await o.add(`deco_${a}_all_merged.svg`,D);const f=new Le(Gn(d));await o.add(`deco_${a}_all_merged_t${n}.svg`,f);const p=new Le(gc(t,e,s));await o.add(`${a}.pax.json`,p);const h=new Le(Dc(e));await o.add(`${a}_noarc_openscad.scad`,h);const x=new Le(wc(e));await o.add(`${a}_noarc_jscad.js`,x);const y=new Le(yc(e));return await o.add(`${a}_freecad.py`,y),await o.close(),await i.getData()}var Dd=(t=>(t[t.eSVG=0]="eSVG",t[t.eSVGALL=1]="eSVGALL",t[t.eDXF=2]="eDXF",t[t.eDXFALL=3]="eDXFALL",t[t.eTXTLOG=4]="eTXTLOG",t[t.ePAX=5]="ePAX",t[t.eOPENSCAD=6]="eOPENSCAD",t[t.eJSCAD=7]="eJSCAD",t[t.eFREECAD=8]="eFREECAD",t[t.eZIP=9]="eZIP",t))(Dd||{});function l1(t,e,n,r,s){const i=t(0,e);let o="";if(i.calcErr)console.log("err931: error by calling geome ${geome0.calcErr}");else{const a=Object.keys(i.fig);if(s===0)if(a.includes(r)){const c=i.fig[r];o=fr(c.mainListC())}else console.log(`err749: fileTextContent eFace ${r} invalid`);else if(s===1){const c=bs(i.fig);o=fr(c.mainListC())}else if(s===2)if(a.includes(r)){const c=i.fig[r];o=dr(c.mainListC())}else console.log(`err759: fileTextContent eFace ${r} invalid`);else if(s===3){const c=bs(i.fig);o=dr(c.mainListC())}else s===4?o=xd(i):s===5?o=gc(e,i,n):s===6?o=Dc(i):s===7?o=wc(i):s===8?o=yc(i):console.log(`err912: unknown exportFormat ${s}`)}return o}async function f1(t,e,n,r,s){const i=t(0,n),o=t(e,n);let a=new Blob;return!i.calcErr&&!o.calcErr?s===9?a=await gd(n,i,e,o,r):console.log(`err913: unknown exportFormat ${s}`):console.log("err932: error by calling geome ${geome0.calcErr} ${geome1.calcErr}"),a}function d1(t){let e="";return t===0||t===1?e="image/svg+xml":t===2||t===3?e="application/dxf":t===4?e="text/plain":t===5?e="application/json":t===6||t===7||t===8?e="text/plain":t===9&&(e="application/zip"),e}function p1(t){let e="";return t===0||t===1?e=".svg":t===2||t===3?e=".dxf":t===4?e=".log":t===5?e=".pax.json":t===6?e="_noarc_openscad.scad":t===7?e="_noarc_jscad.js":t===8?e="_freecad.py":t===9&&(e=".zip"),e}function h1(t){let e=!1;return t===9&&(e=!0),e}function m1(t,e,n,r){return JSON.stringify({lastModif:t,partName:e,pVal:n,comment:r},null," ")}function x1(t){const e=ff.parse(t),n="lastModif",r="partName",s="pVal",i="comment";let o="";const a={lastModif:"",partName:"",pVal:{},comment:""};if(Object.hasOwn(e,n)&&(a[n]=e[n]),Object.hasOwn(e,r)&&(a[r]=e[r]),Object.hasOwn(e,s)){const c=e[s];for(const u of Object.keys(c)){const l=c[u];if(isNaN(l))throw`err905: ${l} is not a number!`;a[s][u]=l}o+=`info398: parsing file has found ${Object.keys(a[s]).length} parameters
|
|
211
|
+
`}else throw`err489: parameter-json-file has no key ${s}
|
|
212
|
+
`;return Object.hasOwn(e,i)&&(a[i]=e[i]),[a,o]}var wd=class{pEnvelop={xMin:0,xMax:0,yMin:0,yMax:0,orientation:!0};constructor(t){this.pEnvelop.xMin=t.xMin,this.pEnvelop.xMax=t.xMax,this.pEnvelop.yMin=t.yMin,this.pEnvelop.yMax=t.yMax,this.pEnvelop.orientation=t.orientation}add(t){let e=!1;return t.xMin<this.pEnvelop.xMin&&(e=!0,this.pEnvelop.xMin=t.xMin,this.pEnvelop.orientation=t.orientation),t.xMax>this.pEnvelop.xMax&&(this.pEnvelop.xMax=t.xMax),t.yMin<this.pEnvelop.yMin&&(this.pEnvelop.yMin=t.yMin),t.yMax>this.pEnvelop.yMax&&(this.pEnvelop.yMax=t.yMax),e}check(t){let e=!1;const n=10**-2;return t.xMin<this.pEnvelop.xMin+n&&t.xMax>this.pEnvelop.xMax-n&&t.yMin<this.pEnvelop.yMin+n&&t.yMax>this.pEnvelop.yMax-n&&(e=!0),e}};function g1(t){return new wd(t)}function _c(){return[[0,0,0],[0,0,0],[0,0,0]]}function vr(){return[[1,0,0],[0,1,0],[0,0,1]]}function yd(t){const e=vr(),n=Math.cos(t),r=Math.sin(t);return e[0][0]=n,e[1][1]=n,e[0][1]=-r,e[1][0]=r,e}function _d(t,e){const n=_c();for(let r=0;r<3;r++)for(let s=0;s<3;s++){let i=0;for(let o=0;o<3;o++)i+=t[r][o]*e[o][s];n[r][s]=i}return n}function go(t){let e=vr();for(const n of t)e=_d(n,e);return e}function bd(t,e){const n=vr();return n[0][2]=t,n[1][2]=e,n}function Ad(t){const e=_c();for(let n=0;n<3;n++)for(let r=0;r<3;r++)e[n][r]=t[n][r];return e}function Ed(t,e){const n=[e[0],e[1],1],r=[0,0];for(let s=0;s<2;s++){let i=0;for(let o=0;o<3;o++)i+=t[s][o]*n[o];r[s]=i}return r}function vd(t){return[t[0][2],t[1][2]]}function Cd(t){return Math.atan2(t[1][0],t[0][0])}var Fd=class{mmat;constructor(t){this.mmat=Ad(t)}addRotation(t){const e=yd(t);return this.mmat=go([this.mmat,e]),this}addTranslation(t,e){const n=bd(t,e);return this.mmat=go([this.mmat,n]),this}getMatrix(){return this.mmat}getRotation(){return Cd(this.mmat)}getTranslation(){return vd(this.mmat)}transform(t){return Ed(this.mmat,t)}},Sd=vr();function D1(t=Sd){return new Fd(t)}function bc(){return[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]}function dn(){return[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]}function Td(t){const e=dn(),n=Math.cos(t),r=Math.sin(t);return e[1][1]=n,e[2][2]=n,e[2][1]=r,e[1][2]=-r,e}function kd(t){const e=dn(),n=Math.cos(t),r=Math.sin(t);return e[0][0]=n,e[2][2]=n,e[0][2]=r,e[2][0]=-r,e}function Pd(t){const e=dn(),n=Math.cos(t),r=Math.sin(t);return e[0][0]=n,e[1][1]=n,e[0][1]=-r,e[1][0]=r,e}function Id(t,e){const n=bc();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+=t[r][o]*e[o][s];n[r][s]=i}return n}function As(t){let e=dn();for(const n of t)e=Id(n,e);return e}function Md(t,e,n){return As([Td(t),kd(e),Pd(n)])}function Bd(t,e,n){const r=dn();return r[0][3]=t,r[1][3]=e,r[2][3]=n,r}function Od(t){const e=bc();for(let n=0;n<4;n++)for(let r=0;r<4;r++)e[n][r]=t[n][r];return e}function Rd(t,e){const n=[e[0],e[1],e[2],1],r=[0,0,0];for(let s=0;s<3;s++){let i=0;for(let o=0;o<4;o++)i+=t[s][o]*n[o];r[s]=i}return r}function Ld(t){return[t[0][3],t[1][3],t[2][3]]}function Nd(t){let e=0,n=0,r=0;const s=t[2][0],i=10**-5;return Math.abs(s-1)<i?(r=0,n=-Math.PI/2,e=-r+Math.atan2(-t[0][1],-t[0][2])):Math.abs(s+1)<i?(r=0,n=Math.PI/2,e=r+Math.atan2(t[0][1],t[0][2])):(e=Math.atan2(t[2][1],t[2][2]),n=Math.atan2(-t[2][0],Math.sqrt(t[2][1]**2+t[2][2]**2)),r=Math.atan2(t[1][0],t[0][0])),[e,n,r]}var $d=class{mmat;constructor(t){this.mmat=Od(t)}addRotation(t,e,n){const r=Md(t,e,n);return this.mmat=As([this.mmat,r]),this}addTranslation(t,e,n){const r=Bd(t,e,n);return this.mmat=As([this.mmat,r]),this}getMatrix(){return this.mmat}getRotation(){return Nd(this.mmat)}getTranslation(){return Ld(this.mmat)}transform(t){return Rd(this.mmat,t)}},Ud=dn();function w1(t=Ud){return new $d(t)}function Vd(t,e,n,r,s=0){return $f(t,e).addCornerRounded(s).addSegStrokeR(n,0).addCornerRounded(s).addSegStrokeR(0,r).addCornerRounded(s).addSegStrokeR(-n,0).addCornerRounded(s).closeSegStroke()}function y1(t,e,n,r,s,i=0){return Vd(t,e,n,r,i).rotate(t,e,s)}function _1(t){const e=[];e.push("version details:"),e.push(`${t.name} : ${t.version}`),e.push("dependencies:");const n=Object.keys(t.dependencies);for(const[r,s]of n.entries()){const i=s;e.push(`${r+1} : ${s} : ${t.dependencies[i]}`)}return e}export{h1 as $,_1 as A,qd as B,Lf as C,Yd as D,qf as E,Hd as F,Ds as G,n1 as H,r1 as I,e1 as J,m1 as K,x1 as L,Jd as M,Xd as N,zd as O,jf as P,Kd as Q,Dr as R,mf as S,Qd as T,_e as U,Gd as V,s1 as W,Dd as X,f1 as Y,l1 as Z,p1 as _,er as a,bs as a0,d1 as a1,Dt as b,$f as c,Vd as d,Wd as e,Vf as f,g1 as g,y1 as h,at as i,w1 as j,Wf as k,i1 as l,c1 as m,a1 as n,o1 as o,K as p,u1 as q,t1 as r,ei as s,D1 as t,Zd as u,qe as v,we as w,df as x,Ze as y,gt as z};
|