modern-canvas 0.4.47 → 0.4.48

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/index.cjs CHANGED
@@ -9270,7 +9270,7 @@ class BaseElement2DShape extends CoreObject {
9270
9270
  super._updateProperty(key, value, oldValue, declaration);
9271
9271
  switch (key) {
9272
9272
  case "svg":
9273
- case "data":
9273
+ case "paths":
9274
9274
  case "viewBox":
9275
9275
  this._updatePath2DSet();
9276
9276
  this.parent.requestRedraw();
@@ -9285,7 +9285,7 @@ class BaseElement2DShape extends CoreObject {
9285
9285
  viewBox = this._path2DSet.viewBox ?? this.viewBox;
9286
9286
  } else {
9287
9287
  viewBox = this.viewBox;
9288
- this.data?.forEach((path, i) => {
9288
+ this.paths?.forEach((path, i) => {
9289
9289
  const { data, ...style } = path;
9290
9290
  const path2D = new modernPath2d.Path2D();
9291
9291
  path2D.style = style;
@@ -9333,7 +9333,7 @@ __decorateClass$p([
9333
9333
  ], BaseElement2DShape.prototype, "viewBox");
9334
9334
  __decorateClass$p([
9335
9335
  property({ default: () => [] })
9336
- ], BaseElement2DShape.prototype, "data");
9336
+ ], BaseElement2DShape.prototype, "paths");
9337
9337
 
9338
9338
  class BaseElement2DStyle extends Resource {
9339
9339
  constructor(properties) {
package/dist/index.d.cts CHANGED
@@ -1959,7 +1959,7 @@ declare class BaseElement2DShape extends CoreObject {
1959
1959
  preset?: Required<NormalizedShape>['preset'];
1960
1960
  svg?: Required<NormalizedShape>['svg'];
1961
1961
  viewBox: Required<NormalizedShape>['viewBox'];
1962
- data: Required<NormalizedShape>['paths'];
1962
+ paths: Required<NormalizedShape>['paths'];
1963
1963
  protected _path2DSet: Path2DSet;
1964
1964
  constructor(parent: BaseElement2D);
1965
1965
  setProperties(properties?: Shape): this;
package/dist/index.d.mts CHANGED
@@ -1959,7 +1959,7 @@ declare class BaseElement2DShape extends CoreObject {
1959
1959
  preset?: Required<NormalizedShape>['preset'];
1960
1960
  svg?: Required<NormalizedShape>['svg'];
1961
1961
  viewBox: Required<NormalizedShape>['viewBox'];
1962
- data: Required<NormalizedShape>['paths'];
1962
+ paths: Required<NormalizedShape>['paths'];
1963
1963
  protected _path2DSet: Path2DSet;
1964
1964
  constructor(parent: BaseElement2D);
1965
1965
  setProperties(properties?: Shape): this;
package/dist/index.d.ts CHANGED
@@ -1959,7 +1959,7 @@ declare class BaseElement2DShape extends CoreObject {
1959
1959
  preset?: Required<NormalizedShape>['preset'];
1960
1960
  svg?: Required<NormalizedShape>['svg'];
1961
1961
  viewBox: Required<NormalizedShape>['viewBox'];
1962
- data: Required<NormalizedShape>['paths'];
1962
+ paths: Required<NormalizedShape>['paths'];
1963
1963
  protected _path2DSet: Path2DSet;
1964
1964
  constructor(parent: BaseElement2D);
1965
1965
  setProperties(properties?: Shape): this;
package/dist/index.js CHANGED
@@ -854,7 +854,7 @@ void main() {
854
854
  color /= total;
855
855
 
856
856
  gl_FragColor = color;
857
- }`})),Ti([S()],g.ZoomBlurEffect.prototype,"center",2),Ti([S({default:20})],g.ZoomBlurEffect.prototype,"innerRadius",2),Ti([S({default:-1})],g.ZoomBlurEffect.prototype,"radius",2),Ti([S({default:.1})],g.ZoomBlurEffect.prototype,"strength",2),g.ZoomBlurEffect=Ti([ne("ZoomBlurEffect")],g.ZoomBlurEffect);var wf=Object.defineProperty,kt=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&wf(A,e,i),i};class it extends rA{constructor(e){super();u(this,"_texture");this.parent=e}_setProperties(e){return super.setProperties(e)}setProperties(e){return this._setProperties(he(e)?void 0:mA(e))}_updateProperty(e,t,i,s){switch(super._updateProperty(e,t,i,s),e){case"color":case"cropRect":case"stretchRect":case"dpi":case"rotateWithShape":case"tile":case"opacity":this.parent.requestRedraw();break;case"image":case"linearGradient":case"radialGradient":this._updateTexture();break}}async loadTexture(){return this.linearGradient||this.radialGradient?new Br(this.linearGradient??this.radialGradient,this.parent.size.width,this.parent.size.height):he(this.image)?void 0:await Gt.texture.load(this.image)}async _updateTexture(){this._texture=await this.loadTexture(),this.parent.requestRedraw()}canDraw(){return!!(this._texture||this.color)}_getDrawOptions(){let e=!1;const{width:t,height:i}=this.parent.size,s=new Et().scale(1/t,1/i);if(this.cropRect){const{left:n=0,top:o=0,right:a=0,bottom:l=0}=this.cropRect;s.scale(Math.abs(1-(n+a)),Math.abs(1-(o+l))).translate(n,o),e=!0}if(this.tile){const{translateX:n=0,translateY:o=0,scaleX:a=1,scaleY:l=1}=this.tile;s.translate(-n/t,-o/i).scale(1/a,1/l),e=!0}else if(this.stretchRect){const{left:n=0,top:o=0,right:a=0,bottom:l=0}=this.stretchRect;s.scale(Math.abs(1-(-n+-a)),Math.abs(1-(-o+-l))).translate(-n,-o),e=!0}return{disableWrapMode:e,textureTransform:s}}draw(){const e=this.parent.context,{textureTransform:t,disableWrapMode:i}=this._getDrawOptions();e.textureTransform=t,e.fillStyle=this._texture??this.color,e.fill({disableWrapMode:i})}}kt([S()],it.prototype,"color"),kt([S()],it.prototype,"image"),kt([S()],it.prototype,"linearGradient"),kt([S()],it.prototype,"radialGradient"),kt([S()],it.prototype,"cropRect"),kt([S()],it.prototype,"stretchRect"),kt([S()],it.prototype,"dpi"),kt([S()],it.prototype,"rotateWithShape"),kt([S()],it.prototype,"tile"),kt([S()],it.prototype,"opacity");var vf=Object.defineProperty,_f=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&vf(A,e,i),i};class un extends it{setProperties(A){return super._setProperties(he(A)?void 0:Cc(A))}}_f([S()],un.prototype,"fillWithShape");var bf=Object.defineProperty,Df=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&bf(A,e,i),i};class fn extends it{setProperties(A){return super._setProperties(he(A)?void 0:Qc(A))}}Df([S()],fn.prototype,"fillWithShape");var xf=Object.defineProperty,dn=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&xf(A,e,i),i};class Gi extends it{setProperties(A){return super._setProperties(he(A)?void 0:yc(A))}_updateProperty(A,e,t,i){switch(super._updateProperty(A,e,t,i),A){case"width":case"style":this.parent.requestRedraw();break}}canDraw(){return!!(this.width||super.canDraw())}draw(){const A=this.parent.context,{textureTransform:e,disableWrapMode:t}=this._getDrawOptions();A.lineWidth=this.width,A.textureTransform=e,A.strokeStyle=this._texture??this.color,A.stroke({disableWrapMode:t})}}dn([S({default:0})],Gi.prototype,"color"),dn([S({default:0})],Gi.prototype,"width"),dn([S({default:"solid"})],Gi.prototype,"style");var Sf=Object.defineProperty,br=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&Sf(A,e,i),i};class VA extends rA{constructor(A){super(),this.parent=A}setProperties(A){return super.setProperties(he(A)?void 0:mc(A))}_updateProperty(A,e,t,i){switch(super._updateProperty(A,e,t,i),A){case"color":case"blur":case"offsetX":case"offsetY":this.updateEffect();break}}updateEffect(){const A="__$shadow";let e=this.parent.getNode(A);this.blur||this.offsetX||this.offsetY?(e||(e=new g.DropShadowEffect({name:A}),this.parent.appendChild(e,"back")),e.setProperties(this.getProperties())):e&&this.parent.removeChild(e)}}br([S({default:"#000000"})],VA.prototype,"color"),br([S({default:0})],VA.prototype,"blur"),br([S({default:0})],VA.prototype,"offsetY"),br([S({default:0})],VA.prototype,"offsetX");var Mf=Object.defineProperty,Dr=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&Mf(A,e,i),i};class qA extends rA{constructor(e){super();u(this,"_path2DSet",new oA);this.parent=e,this._updatePath2DSet()}setProperties(e){return super.setProperties(he(e)?void 0:vc(e))}_updateProperty(e,t,i,s){switch(super._updateProperty(e,t,i,s),e){case"svg":case"data":case"viewBox":this._updatePath2DSet(),this.parent.requestRedraw();break}}_updatePath2DSet(){var o;let e;if(this.svg){const a=on(this.svg);this._path2DSet=ln(a),e=this._path2DSet.viewBox??this.viewBox}else e=this.viewBox,(o=this.data)==null||o.forEach((a,l)=>{const{data:h,...c}=a,f=new Ne;f.style=c,f.addData(h),this._path2DSet.paths[l]=f});const[t,i,s,n]=e;this._path2DSet.paths.forEach(a=>{a.applyTransform(new Ke().translate(-t,-i).scale(1/s,1/n))})}draw(){if(this._path2DSet.paths.length){const e=this.parent.context,{width:t,height:i}=this.parent.size;this._path2DSet.paths.forEach(s=>{e.addPath(s.clone().applyTransform(new Ke().scale(t,i)))})}else this.drawRect()}drawRect(){const e=this.parent.context,{width:t,height:i}=this.parent.size,{borderRadius:s}=this.parent.style;t&&i&&(s?e.roundRect(0,0,t,i,s):e.rect(0,0,t,i))}}Dr([S()],qA.prototype,"preset"),Dr([S()],qA.prototype,"svg"),Dr([S({default:()=>[0,0,1,1]})],qA.prototype,"viewBox"),Dr([S({default:()=>[]})],qA.prototype,"data");class Li extends Yt{constructor(A){super(),this.setProperties(A)}}const XA=Yo();delete XA.top,delete XA.left,delete XA.width,delete XA.height;for(const r in XA)Qi(Li,r,{default:XA[r]});var qe=Uint8Array,ut=Uint16Array,In=Int32Array,xr=new qe([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,0,0,0]),Sr=new qe([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,0,0]),pn=new qe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Bl=function(r,A){for(var e=new ut(31),t=0;t<31;++t)e[t]=A+=1<<r[t-1];for(var i=new In(e[30]),t=1;t<30;++t)for(var s=e[t];s<e[t+1];++s)i[s]=s-e[t]<<5|t;return{b:e,r:i}},Cl=Bl(xr,2),Ql=Cl.b,En=Cl.r;Ql[28]=258,En[258]=28;for(var yl=Bl(Sr,0),Rf=yl.b,ml=yl.r,Bn=new ut(32768),Qe=0;Qe<32768;++Qe){var hA=(Qe&43690)>>1|(Qe&21845)<<1;hA=(hA&52428)>>2|(hA&13107)<<2,hA=(hA&61680)>>4|(hA&3855)<<4,Bn[Qe]=((hA&65280)>>8|(hA&255)<<8)>>1}for(var Ut=function(r,A,e){for(var t=r.length,i=0,s=new ut(A);i<t;++i)r[i]&&++s[r[i]-1];var n=new ut(A);for(i=1;i<A;++i)n[i]=n[i-1]+s[i-1]<<1;var o;if(e){o=new ut(1<<A);var a=15-A;for(i=0;i<t;++i)if(r[i])for(var l=i<<4|r[i],h=A-r[i],c=n[r[i]-1]++<<h,f=c|(1<<h)-1;c<=f;++c)o[Bn[c]>>a]=l}else for(o=new ut(t),i=0;i<t;++i)r[i]&&(o[i]=Bn[n[r[i]-1]++]>>15-r[i]);return o},cA=new qe(288),Qe=0;Qe<144;++Qe)cA[Qe]=8;for(var Qe=144;Qe<256;++Qe)cA[Qe]=9;for(var Qe=256;Qe<280;++Qe)cA[Qe]=7;for(var Qe=280;Qe<288;++Qe)cA[Qe]=8;for(var Oi=new qe(32),Qe=0;Qe<32;++Qe)Oi[Qe]=5;var Pf=Ut(cA,9,0),kf=Ut(cA,9,1),Uf=Ut(Oi,5,0),Nf=Ut(Oi,5,1),Cn=function(r){for(var A=r[0],e=1;e<r.length;++e)r[e]>A&&(A=r[e]);return A},vt=function(r,A,e){var t=A/8|0;return(r[t]|r[t+1]<<8)>>(A&7)&e},Qn=function(r,A){var e=A/8|0;return(r[e]|r[e+1]<<8|r[e+2]<<16)>>(A&7)},yn=function(r){return(r+7)/8|0},wl=function(r,A,e){return(e==null||e>r.length)&&(e=r.length),new qe(r.subarray(A,e))},Ff=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],_t=function(r,A,e){var t=new Error(A||Ff[r]);if(t.code=r,Error.captureStackTrace&&Error.captureStackTrace(t,_t),!e)throw t;return t},Tf=function(r,A,e,t){var i=r.length,s=0;if(!i||A.f&&!A.l)return e||new qe(0);var n=!e,o=n||A.i!=2,a=A.i;n&&(e=new qe(i*3));var l=function(He){var ge=e.length;if(He>ge){var we=new qe(Math.max(ge*2,He));we.set(e),e=we}},h=A.f||0,c=A.p||0,f=A.b||0,I=A.l,d=A.d,C=A.m,p=A.n,M=i*8;do{if(!I){h=vt(r,c,1);var P=vt(r,c+1,3);if(c+=3,P)if(P==1)I=kf,d=Nf,C=9,p=5;else if(P==2){var m=vt(r,c,31)+257,b=vt(r,c+10,15)+4,D=m+vt(r,c+5,31)+1;c+=14;for(var z=new qe(D),Ae=new qe(19),V=0;V<b;++V)Ae[pn[V]]=vt(r,c+V*3,7);c+=b*3;for(var K=Cn(Ae),te=(1<<K)-1,W=Ut(Ae,K,1),V=0;V<D;){var L=W[vt(r,c,te)];c+=L&15;var w=L>>4;if(w<16)z[V++]=w;else{var se=0,H=0;for(w==16?(H=3+vt(r,c,3),c+=2,se=z[V-1]):w==17?(H=3+vt(r,c,7),c+=3):w==18&&(H=11+vt(r,c,127),c+=7);H--;)z[V++]=se}}var q=z.subarray(0,m),ie=z.subarray(m);C=Cn(q),p=Cn(ie),I=Ut(q,C,1),d=Ut(ie,p,1)}else _t(1);else{var w=yn(c)+4,R=r[w-4]|r[w-3]<<8,_=w+R;if(_>i){a&&_t(0);break}o&&l(f+R),e.set(r.subarray(w,_),f),A.b=f+=R,A.p=c=_*8,A.f=h;continue}if(c>M){a&&_t(0);break}}o&&l(f+131072);for(var J=(1<<C)-1,$=(1<<p)-1,N=c;;N=c){var se=I[Qn(r,c)&J],U=se>>4;if(c+=se&15,c>M){a&&_t(0);break}if(se||_t(2),U<256)e[f++]=U;else if(U==256){N=c,I=null;break}else{var X=U-254;if(U>264){var V=U-257,ee=xr[V];X=vt(r,c,(1<<ee)-1)+Ql[V],c+=ee}var oe=d[Qn(r,c)&$],j=oe>>4;oe||_t(3),c+=oe&15;var ie=Rf[j];if(j>3){var ee=Sr[j];ie+=Qn(r,c)&(1<<ee)-1,c+=ee}if(c>M){a&&_t(0);break}o&&l(f+131072);var pe=f+X;if(f<ie){var at=s-ie,lt=Math.min(ie,pe);for(at+f<0&&_t(3);f<lt;++f)e[f]=t[at+f]}for(;f<pe;++f)e[f]=e[f-ie]}}A.l=I,A.p=N,A.b=f,A.f=h,I&&(h=1,A.m=C,A.d=d,A.n=p)}while(!h);return f!=e.length&&n?wl(e,0,f):e.subarray(0,f)},Zt=function(r,A,e){e<<=A&7;var t=A/8|0;r[t]|=e,r[t+1]|=e>>8},Hi=function(r,A,e){e<<=A&7;var t=A/8|0;r[t]|=e,r[t+1]|=e>>8,r[t+2]|=e>>16},mn=function(r,A){for(var e=[],t=0;t<r.length;++t)r[t]&&e.push({s:t,f:r[t]});var i=e.length,s=e.slice();if(!i)return{t:Dl,l:0};if(i==1){var n=new qe(e[0].s+1);return n[e[0].s]=1,{t:n,l:1}}e.sort(function(_,m){return _.f-m.f}),e.push({s:-1,f:25001});var o=e[0],a=e[1],l=0,h=1,c=2;for(e[0]={s:-1,f:o.f+a.f,l:o,r:a};h!=i-1;)o=e[e[l].f<e[c].f?l++:c++],a=e[l!=h&&e[l].f<e[c].f?l++:c++],e[h++]={s:-1,f:o.f+a.f,l:o,r:a};for(var f=s[0].s,t=1;t<i;++t)s[t].s>f&&(f=s[t].s);var I=new ut(f+1),d=wn(e[h-1],I,0);if(d>A){var t=0,C=0,p=d-A,M=1<<p;for(s.sort(function(m,b){return I[b.s]-I[m.s]||m.f-b.f});t<i;++t){var P=s[t].s;if(I[P]>A)C+=M-(1<<d-I[P]),I[P]=A;else break}for(C>>=p;C>0;){var w=s[t].s;I[w]<A?C-=1<<A-I[w]++-1:++t}for(;t>=0&&C;--t){var R=s[t].s;I[R]==A&&(--I[R],++C)}d=A}return{t:new qe(I),l:d}},wn=function(r,A,e){return r.s==-1?Math.max(wn(r.l,A,e+1),wn(r.r,A,e+1)):A[r.s]=e},vl=function(r){for(var A=r.length;A&&!r[--A];);for(var e=new ut(++A),t=0,i=r[0],s=1,n=function(a){e[t++]=a},o=1;o<=A;++o)if(r[o]==i&&o!=A)++s;else{if(!i&&s>2){for(;s>138;s-=138)n(32754);s>2&&(n(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(n(i),--s;s>6;s-=6)n(8304);s>2&&(n(s-3<<5|8208),s=0)}for(;s--;)n(i);s=1,i=r[o]}return{c:e.subarray(0,t),n:A}},Ji=function(r,A){for(var e=0,t=0;t<A.length;++t)e+=r[t]*A[t];return e},_l=function(r,A,e){var t=e.length,i=yn(A+2);r[i]=t&255,r[i+1]=t>>8,r[i+2]=r[i]^255,r[i+3]=r[i+1]^255;for(var s=0;s<t;++s)r[i+s+4]=e[s];return(i+4+t)*8},bl=function(r,A,e,t,i,s,n,o,a,l,h){Zt(A,h++,e),++i[256];for(var c=mn(i,15),f=c.t,I=c.l,d=mn(s,15),C=d.t,p=d.l,M=vl(f),P=M.c,w=M.n,R=vl(C),_=R.c,m=R.n,b=new ut(19),D=0;D<P.length;++D)++b[P[D]&31];for(var D=0;D<_.length;++D)++b[_[D]&31];for(var z=mn(b,7),Ae=z.t,V=z.l,K=19;K>4&&!Ae[pn[K-1]];--K);var te=l+5<<3,W=Ji(i,cA)+Ji(s,Oi)+n,L=Ji(i,f)+Ji(s,C)+n+14+3*K+Ji(b,Ae)+2*b[16]+3*b[17]+7*b[18];if(a>=0&&te<=W&&te<=L)return _l(A,h,r.subarray(a,a+l));var se,H,q,ie;if(Zt(A,h,1+(L<W)),h+=2,L<W){se=Ut(f,I,0),H=f,q=Ut(C,p,0),ie=C;var J=Ut(Ae,V,0);Zt(A,h,w-257),Zt(A,h+5,m-1),Zt(A,h+10,K-4),h+=14;for(var D=0;D<K;++D)Zt(A,h+3*D,Ae[pn[D]]);h+=3*K;for(var $=[P,_],N=0;N<2;++N)for(var U=$[N],D=0;D<U.length;++D){var X=U[D]&31;Zt(A,h,J[X]),h+=Ae[X],X>15&&(Zt(A,h,U[D]>>5&127),h+=U[D]>>12)}}else se=Pf,H=cA,q=Uf,ie=Oi;for(var D=0;D<o;++D){var ee=t[D];if(ee>255){var X=ee>>18&31;Hi(A,h,se[X+257]),h+=H[X+257],X>7&&(Zt(A,h,ee>>23&31),h+=xr[X]);var oe=ee&31;Hi(A,h,q[oe]),h+=ie[oe],oe>3&&(Hi(A,h,ee>>5&8191),h+=Sr[oe])}else Hi(A,h,se[ee]),h+=H[ee]}return Hi(A,h,se[256]),h+H[256]},Gf=new In([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Dl=new qe(0),Lf=function(r,A,e,t,i,s){var n=s.z||r.length,o=new qe(t+n+5*(1+Math.ceil(n/7e3))+i),a=o.subarray(t,o.length-i),l=s.l,h=(s.r||0)&7;if(A){h&&(a[0]=s.r>>3);for(var c=Gf[A-1],f=c>>13,I=c&8191,d=(1<<e)-1,C=s.p||new ut(32768),p=s.h||new ut(d+1),M=Math.ceil(e/3),P=2*M,w=function(Je){return(r[Je]^r[Je+1]<<M^r[Je+2]<<P)&d},R=new In(25e3),_=new ut(288),m=new ut(32),b=0,D=0,z=s.i||0,Ae=0,V=s.w||0,K=0;z+2<n;++z){var te=w(z),W=z&32767,L=p[te];if(C[W]=L,p[te]=W,V<=z){var se=n-z;if((b>7e3||Ae>24576)&&(se>423||!l)){h=bl(r,a,0,R,_,m,D,Ae,K,z-K,h),Ae=b=D=0,K=z;for(var H=0;H<286;++H)_[H]=0;for(var H=0;H<30;++H)m[H]=0}var q=2,ie=0,J=I,$=W-L&32767;if(se>2&&te==w(z-$))for(var N=Math.min(f,se)-1,U=Math.min(32767,z),X=Math.min(258,se);$<=U&&--J&&W!=L;){if(r[z+q]==r[z+q-$]){for(var ee=0;ee<X&&r[z+ee]==r[z+ee-$];++ee);if(ee>q){if(q=ee,ie=$,ee>N)break;for(var oe=Math.min($,ee-2),j=0,H=0;H<oe;++H){var pe=z-$+H&32767,at=C[pe],lt=pe-at&32767;lt>j&&(j=lt,L=pe)}}}W=L,L=C[W],$+=W-L&32767}if(ie){R[Ae++]=268435456|En[q]<<18|ml[ie];var He=En[q]&31,ge=ml[ie]&31;D+=xr[He]+Sr[ge],++_[257+He],++m[ge],V=z+q,++b}else R[Ae++]=r[z],++_[r[z]]}}for(z=Math.max(z,V);z<n;++z)R[Ae++]=r[z],++_[r[z]];h=bl(r,a,l,R,_,m,D,Ae,K,z-K,h),l||(s.r=h&7|a[h/8|0]<<3,h-=7,s.h=p,s.p=C,s.i=z,s.w=V)}else{for(var z=s.w||0;z<n+l;z+=65535){var we=z+65535;we>=n&&(a[h/8|0]=l,we=n),h=_l(a,h+1,r.subarray(z,we))}s.i=n}return wl(o,0,t+yn(h)+i)},xl=function(){var r=1,A=0;return{p:function(e){for(var t=r,i=A,s=e.length|0,n=0;n!=s;){for(var o=Math.min(n+2655,s);n<o;++n)i+=t+=e[n];t=(t&65535)+15*(t>>16),i=(i&65535)+15*(i>>16)}r=t,A=i},d:function(){return r%=65521,A%=65521,(r&255)<<24|(r&65280)<<8|(A&255)<<8|A>>8}}},Of=function(r,A,e,t,i){if(!i&&(i={l:1},A.dictionary)){var s=A.dictionary.subarray(-32768),n=new qe(s.length+r.length);n.set(s),n.set(r,s.length),r=n,i.w=s.length}return Lf(r,A.level==null?6:A.level,A.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):20:12+A.mem,e,t,i)},Sl=function(r,A,e){for(;e;++A)r[A]=e,e>>>=8},Hf=function(r,A){var e=A.level,t=e==0?0:e<6?1:e==9?3:2;if(r[0]=120,r[1]=t<<6|(A.dictionary&&32),r[1]|=31-(r[0]<<8|r[1])%31,A.dictionary){var i=xl();i.p(A.dictionary),Sl(r,2,i.d())}},Jf=function(r,A){return((r[0]&15)!=8||r[0]>>4>7||(r[0]<<8|r[1])%31)&&_t(6,"invalid zlib data"),(r[1]>>5&1)==1&&_t(6,"invalid zlib data: "+(r[1]&32?"need":"unexpected")+" dictionary"),(r[1]>>3&4)+2};function Kf(r,A){A||(A={});var e=xl();e.p(r);var t=Of(r,A,A.dictionary?6:2,4);return Hf(t,A),Sl(t,t.length-4,e.d()),t}function Yf(r,A){return Tf(r.subarray(Jf(r),-4),{i:2},A,A)}var zf=typeof TextDecoder<"u"&&new TextDecoder,Wf=0;try{zf.decode(Dl,{stream:!0}),Wf=1}catch{}const Vf="modern-font";function Ki(r,A){if(!r)throw new Error(`[${Vf}] ${A}`)}function qf(r){if("buffer"in r){const A=r.buffer;return r.byteOffset>0||r.byteLength<r.buffer.byteLength?A.slice(r.byteOffset,r.byteOffset+r.byteLength):A}else return r}function jA(r){return"buffer"in r?new DataView(r.buffer,r.byteOffset,r.byteLength):new DataView(r)}function Xf(r){let A="";for(let e=0,t=r.length,i;e<t;e++)i=r.charCodeAt(e),i!==0&&(A+=String.fromCharCode(i));return A}function Mr(r){r=Xf(r);const A=[];for(let e=0,t=r.length,i;e<t;e++)i=r.charCodeAt(e),A.push(i>>8),A.push(i&255);return A}function jf(r){let A="";for(let e=0,t=r.length;e<t;e++)r[e]<127?A+=String.fromCharCode(r[e]):A+=`%${(256+r[e]).toString(16).slice(1)}`;return unescape(A)}function Zf(r){let A="";for(let e=0,t=r.length;e<t;e+=2)A+=String.fromCharCode((r[e]<<8)+r[e+1]);return A}var $f=Object.defineProperty,Xe=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&$f(A,e,i),i};const Yi={int8:1,int16:2,int32:4,uint8:1,uint16:2,uint32:4,float32:4,float64:8,fixed:4,longDateTime:8,char:1};function je(){return function(r,A){Object.defineProperty(r.constructor.prototype,A,{get(){if(typeof A=="string"){if(A.startsWith("read"))return(...e)=>this.read(A.substring(4).toLowerCase(),...e);if(A.startsWith("write"))return(...e)=>this.write(A.substring(5).toLowerCase(),...e)}},configurable:!0,enumerable:!0})}}class Fe extends DataView{constructor(e,t,i,s){super(qf(e),t,i);u(this,"cursor",0);this.littleEndian=s}readColumn(e){if(e.size){const t=Array.from({length:e.size},(i,s)=>this.read(e.type,e.offset+s));switch(e.type){case"char":return t.join("");default:return t}}else return this.read(e.type,e.offset)}writeColumn(e,t){e.size?Array.from({length:e.size},(i,s)=>{this.write(e.type,t[s],e.offset+s)}):this.write(e.type,t,e.offset)}read(e,t=this.cursor,i=this.littleEndian){var l;switch(e){case"char":return this.readChar(t);case"fixed":return this.readFixed(t,i);case"longDateTime":return this.readLongDateTime(t,i)}const s=`get${e.replace(/^\S/,h=>h.toUpperCase())}`,n=this,o=(l=n[s])==null?void 0:l.bind(n),a=o==null?void 0:o(t,i);return this.cursor+=Yi[e],a}readUint24(e=this.cursor){const[t,i,s]=this.readBytes(e,3);return(t<<16)+(i<<8)+s}readBytes(e,t){t==null&&(t=e,e=this.cursor);const i=[];for(let s=0;s<t;++s)i.push(this.getUint8(e+s));return this.cursor=e+t,i}readString(e,t){const i=this.readBytes(e,t);let s="";for(let n=0,o=i.length;n<o;n++)s+=String.fromCharCode(i[n]);return s}readFixed(e,t){const i=this.readInt32(e,t)/65536;return Math.ceil(i*1e5)/1e5}readLongDateTime(e=this.cursor,t){const i=this.readUint32(e+4,t),s=new Date;return s.setTime(i*1e3+-20775456e5),s}readChar(e){return this.readString(e,1)}write(e,t,i=this.cursor,s=this.littleEndian){var h;switch(e){case"char":return this.writeChar(t,i);case"fixed":return this.writeFixed(t,i);case"longDateTime":return this.writeLongDateTime(t,i)}const n=`set${e.replace(/^\S/,c=>c.toUpperCase())}`,o=this,a=(h=o[n])==null?void 0:h.bind(o),l=a==null?void 0:a(i,t,s);return this.cursor+=Yi[e.toLowerCase()],l}writeString(e="",t=this.cursor){const i=e.replace(/[^\x00-\xFF]/g,"11").length;this.seek(t);for(let s=0,n=e.length,o;s<n;++s)o=e.charCodeAt(s)||0,o>127?this.writeUint16(o):this.writeUint8(o);return this.cursor+=i,this}writeChar(e,t){return this.writeString(e,t)}writeFixed(e,t){return this.writeInt32(Math.round(e*65536),t),this}writeLongDateTime(e,t=this.cursor){typeof e>"u"?e=-20775456e5:typeof e.getTime=="function"?e=e.getTime():/^\d+$/.test(e)?e=+e:e=Date.parse(e);const s=Math.round((e- -20775456e5)/1e3);return this.writeUint32(0,t),this.writeUint32(s,t+4),this}writeBytes(e,t=this.cursor){let i;if(Array.isArray(e)){i=e.length;for(let s=0;s<i;++s)this.setUint8(t+s,e[s])}else{const s=jA(e);i=s.byteLength;for(let n=0;n<i;++n)this.setUint8(t+n,s.getUint8(n))}return this.cursor=t+i,this}seek(e){return this.cursor=e,this}}Xe([je()],Fe.prototype,"readInt8"),Xe([je()],Fe.prototype,"readInt16"),Xe([je()],Fe.prototype,"readInt32"),Xe([je()],Fe.prototype,"readUint8"),Xe([je()],Fe.prototype,"readUint16"),Xe([je()],Fe.prototype,"readUint32"),Xe([je()],Fe.prototype,"readFloat32"),Xe([je()],Fe.prototype,"readFloat64"),Xe([je()],Fe.prototype,"writeInt8"),Xe([je()],Fe.prototype,"writeInt16"),Xe([je()],Fe.prototype,"writeInt32"),Xe([je()],Fe.prototype,"writeUint8"),Xe([je()],Fe.prototype,"writeUint16"),Xe([je()],Fe.prototype,"writeUint32"),Xe([je()],Fe.prototype,"writeFloat32"),Xe([je()],Fe.prototype,"writeFloat64");const Ml=new WeakMap;function y(r){const A=typeof r=="object"?r:{type:r},{size:e=1,type:t}=A;return(i,s)=>{if(typeof s!="string")return;let n=Ml.get(i);n||(n={columns:[],byteLength:0},Ml.set(i,n));const o={...A,name:s,byteLength:e*Yi[t],offset:A.offset??n.columns.reduce((a,l)=>a+l.byteLength,0)};n.columns.push(o),n.byteLength=n.columns.reduce((a,l)=>a+Yi[l.type]*(l.size??1),0),Object.defineProperty(i.constructor.prototype,s,{get(){return this.view.readColumn(o)},set(a){this.view.writeColumn(o,a)},configurable:!0,enumerable:!0})}}class ft{constructor(A,e,t,i){u(this,"view");this.view=new Fe(A,e,t,i)}}class Rr extends ft{get buffer(){return this.view.buffer}toBuffer(){return this.view.buffer.slice(this.view.byteOffset,this.view.byteOffset+this.view.byteLength)}toBlob(){return new Blob([new Uint8Array(this.view.buffer,this.view.byteOffset,this.view.byteLength)],{type:this.mimeType})}toFontFace(A){return new FontFace(A,this.view.buffer)}}var ed=Object.defineProperty,rt=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&ed(A,e,i),i};const st=class Uh extends Rr{constructor(){super(...arguments);u(this,"format","EmbeddedOpenType");u(this,"mimeType","application/vnd.ms-fontobject")}static from(e){const t=e.sfnt,s=t.name.names,n=Mr(s.fontFamily||""),o=n.length,a=Mr(s.fontStyle||""),l=a.length,h=Mr(s.version||""),c=h.length,f=Mr(s.fullName||""),I=f.length,d=86+o+4+l+4+c+4+I+2+e.view.byteLength,C=new Uh(new ArrayBuffer(d),0,d,!0);C.EOTSize=C.view.byteLength,C.FontDataSize=e.view.byteLength,C.Version=131073,C.Flags=0,C.Charset=1,C.MagicNumber=20556,C.Padding1=0,C.CheckSumAdjustment=t.head.checkSumAdjustment;const p=t.os2;return p&&(C.FontPANOSE=p.fontPANOSE,C.Italic=p.fsSelection,C.Weight=p.usWeightClass,C.fsType=p.fsType,C.UnicodeRange=p.ulUnicodeRange,C.CodePageRange=p.ulCodePageRange),C.view.writeUint16(o),C.view.writeBytes(n),C.view.writeUint16(0),C.view.writeUint16(l),C.view.writeBytes(a),C.view.writeUint16(0),C.view.writeUint16(c),C.view.writeBytes(h),C.view.writeUint16(0),C.view.writeUint16(I),C.view.writeBytes(f),C.view.writeUint16(0),C.view.writeUint16(0),C.view.writeBytes(e.view),C}};rt([y("uint32")],st.prototype,"EOTSize"),rt([y("uint32")],st.prototype,"FontDataSize"),rt([y("uint32")],st.prototype,"Version"),rt([y("uint32")],st.prototype,"Flags"),rt([y({type:"uint8",size:10})],st.prototype,"FontPANOSE"),rt([y("uint8")],st.prototype,"Charset"),rt([y("uint8")],st.prototype,"Italic"),rt([y("uint32")],st.prototype,"Weight"),rt([y("uint16")],st.prototype,"fsType"),rt([y("uint16")],st.prototype,"MagicNumber"),rt([y({type:"uint8",size:16})],st.prototype,"UnicodeRange"),rt([y({type:"uint8",size:8})],st.prototype,"CodePageRange"),rt([y("uint32")],st.prototype,"CheckSumAdjustment"),rt([y({type:"uint8",size:16})],st.prototype,"Reserved"),rt([y("uint16")],st.prototype,"Padding1");var td=Object.defineProperty,Pr=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&td(A,e,i),i};class ZA extends ft{constructor(A,e){super(A,e,16)}}Pr([y({type:"char",size:4})],ZA.prototype,"tag"),Pr([y("uint32")],ZA.prototype,"checkSum"),Pr([y("uint32")],ZA.prototype,"offset"),Pr([y("uint32")],ZA.prototype,"length");const vn=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls"],Ad=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"];class _n{constructor(A){u(this,"index");u(this,"name");u(this,"isComposite",!1);u(this,"components",[]);u(this,"pathCommands",[]);const e={...A};if(this.index=e.index??0,e.name===".notdef"?e.unicode=void 0:e.name===".null"&&(e.unicode=0),e.unicode===0&&e.name!==".null")throw new Error('The unicode value "0" is reserved for the glyph name ".null" and cannot be used by any other glyph.');this.name=e.name??null,e.unicode&&(this.unicode=e.unicode),e.unicodes?this.unicodes=e.unicodes:e.unicode&&(this.unicodes=[e.unicode])}getPathCommands(A=0,e=0,t=72,i={},s){const n=1/((s==null?void 0:s.unitsPerEm)??1e3)*t,{xScale:o=n,yScale:a=n}=i,l=this.pathCommands,h=[];for(let c=0,f=l.length;c<f;c+=1){const I=l[c];I.type==="M"?h.push({type:"M",x:A+I.x*o,y:e+-I.y*a}):I.type==="L"?h.push({type:"L",x:A+I.x*o,y:e+-I.y*a}):I.type==="Q"?h.push({type:"Q",x1:A+I.x1*o,y1:e+-I.y1*a,x:A+I.x*o,y:e+-I.y*a}):I.type==="C"?h.push({type:"C",x1:A+I.x1*o,y1:e+-I.y1*a,x2:A+I.x2*o,y2:e+-I.y2*a,x:A+I.x*o,y:e+-I.y*a}):I.type==="Z"&&h.push({type:"Z"})}return h}}class id extends _n{parse(A,e,t){const i=this,{nominalWidthX:s,defaultWidthX:n,gsubrsBias:o,subrsBias:a}=A,l=A.topDict.paintType,h=this.index;let c,f,I,d;const C=[],p=[];let M=0,P=!1,w=!1,R=n,_=0,m=0;function b(W,L){C.push({type:"L",x:W,y:L})}function D(W,L,se,H,q,ie){C.push({type:"C",x1:W,y1:L,x2:se,y2:H,x:q,y:ie})}function z(W,L){w&&l!==2&&Ae(),w=!0,C.push({type:"M",x:W,y:L})}function Ae(){C.push({type:"Z"})}function V(W){C.push(...W)}function K(){p.length%2!==0&&!P&&(R=p.shift()+s),M+=p.length>>1,p.length=0,P=!0}function te(W){let L,se,H,q,ie,J,$,N,U,X,ee,oe,j=0;for(;j<W.length;){let pe=W[j++];switch(pe){case 1:K();break;case 3:K();break;case 4:p.length>1&&!P&&(R=p.shift()+s,P=!0),m+=p.pop(),z(_,m);break;case 5:for(;p.length>0;)_+=p.shift(),m+=p.shift(),b(_,m);break;case 6:for(;p.length>0&&(_+=p.shift(),b(_,m),p.length!==0);)m+=p.shift(),b(_,m);break;case 7:for(;p.length>0&&(m+=p.shift(),b(_,m),p.length!==0);)_+=p.shift(),b(_,m);break;case 8:for(;p.length>0;)c=_+p.shift(),f=m+p.shift(),I=c+p.shift(),d=f+p.shift(),_=I+p.shift(),m=d+p.shift(),D(c,f,I,d,_,m);break;case 10:ie=p.pop()+a,J=A.subrs[ie],J&&te(J);break;case 11:return;case 12:switch(pe=W[j],j+=1,pe){case 35:c=_+p.shift(),f=m+p.shift(),I=c+p.shift(),d=f+p.shift(),$=I+p.shift(),N=d+p.shift(),U=$+p.shift(),X=N+p.shift(),ee=U+p.shift(),oe=X+p.shift(),_=ee+p.shift(),m=oe+p.shift(),p.shift(),D(c,f,I,d,$,N),D(U,X,ee,oe,_,m);break;case 34:c=_+p.shift(),f=m,I=c+p.shift(),d=f+p.shift(),$=I+p.shift(),N=d,U=$+p.shift(),X=d,ee=U+p.shift(),oe=m,_=ee+p.shift(),D(c,f,I,d,$,N),D(U,X,ee,oe,_,m);break;case 36:c=_+p.shift(),f=m+p.shift(),I=c+p.shift(),d=f+p.shift(),$=I+p.shift(),N=d,U=$+p.shift(),X=d,ee=U+p.shift(),oe=X+p.shift(),_=ee+p.shift(),D(c,f,I,d,$,N),D(U,X,ee,oe,_,m);break;case 37:c=_+p.shift(),f=m+p.shift(),I=c+p.shift(),d=f+p.shift(),$=I+p.shift(),N=d+p.shift(),U=$+p.shift(),X=N+p.shift(),ee=U+p.shift(),oe=X+p.shift(),Math.abs(ee-_)>Math.abs(oe-m)?_=ee+p.shift():m=oe+p.shift(),D(c,f,I,d,$,N),D(U,X,ee,oe,_,m);break;default:console.warn(`Glyph ${h}: unknown operator ${1200+pe}`),p.length=0}break;case 14:if(p.length>=4){const at=vn[p.pop()],lt=vn[p.pop()],He=p.pop(),ge=p.pop();if(at&&lt){i.isComposite=!0,i.components=[];const we=A.charset.indexOf(at),Je=A.charset.indexOf(lt);i.components.push({glyphIndex:Je,dx:0,dy:0}),i.components.push({glyphIndex:we,dx:ge,dy:He}),V(t.get(Je).pathCommands);const Ve=JSON.parse(JSON.stringify(t.get(we).pathCommands));for(let xe=0;xe<Ve.length;xe+=1){const et=Ve[xe];et.type!=="Z"&&(et.x+=ge,et.y+=He),(et.type==="Q"||et.type==="C")&&(et.x1+=ge,et.y1+=He),et.type==="C"&&(et.x2+=ge,et.y2+=He)}V(Ve)}}else p.length>0&&!P&&(R=p.shift()+s,P=!0);w&&l!==2&&(Ae(),w=!1);break;case 18:K();break;case 19:case 20:K(),j+=M+7>>3;break;case 21:p.length>2&&!P&&(R=p.shift()+s,P=!0),m+=p.pop(),_+=p.pop(),z(_,m);break;case 22:p.length>1&&!P&&(R=p.shift()+s,P=!0),_+=p.pop(),z(_,m);break;case 23:K();break;case 24:for(;p.length>2;)c=_+p.shift(),f=m+p.shift(),I=c+p.shift(),d=f+p.shift(),_=I+p.shift(),m=d+p.shift(),D(c,f,I,d,_,m);_+=p.shift(),m+=p.shift(),b(_,m);break;case 25:for(;p.length>6;)_+=p.shift(),m+=p.shift(),b(_,m);c=_+p.shift(),f=m+p.shift(),I=c+p.shift(),d=f+p.shift(),_=I+p.shift(),m=d+p.shift(),D(c,f,I,d,_,m);break;case 26:for(p.length%2&&(_+=p.shift());p.length>0;)c=_,f=m+p.shift(),I=c+p.shift(),d=f+p.shift(),_=I,m=d+p.shift(),D(c,f,I,d,_,m);break;case 27:for(p.length%2&&(m+=p.shift());p.length>0;)c=_+p.shift(),f=m,I=c+p.shift(),d=f+p.shift(),_=I+p.shift(),m=d,D(c,f,I,d,_,m);break;case 28:L=W[j],se=W[j+1],p.push((L<<24|se<<16)>>16),j+=2;break;case 29:ie=p.pop()+o,J=A.gsubrs[ie],J&&te(J);break;case 30:for(;p.length>0&&(c=_,f=m+p.shift(),I=c+p.shift(),d=f+p.shift(),_=I+p.shift(),m=d+(p.length===1?p.shift():0),D(c,f,I,d,_,m),p.length!==0);)c=_+p.shift(),f=m,I=c+p.shift(),d=f+p.shift(),m=d+p.shift(),_=I+(p.length===1?p.shift():0),D(c,f,I,d,_,m);break;case 31:for(;p.length>0&&(c=_+p.shift(),f=m,I=c+p.shift(),d=f+p.shift(),m=d+p.shift(),_=I+(p.length===1?p.shift():0),D(c,f,I,d,_,m),p.length!==0);)c=_,f=m+p.shift(),I=c+p.shift(),d=f+p.shift(),_=I+p.shift(),m=d+(p.length===1?p.shift():0),D(c,f,I,d,_,m);break;default:pe<32?console.warn(`Glyph ${h}: unknown operator ${pe}`):pe<247?p.push(pe-139):pe<251?(L=W[j],j+=1,p.push((pe-247)*256+L+108)):pe<255?(L=W[j],j+=1,p.push(-(pe-251)*256-L-108)):(L=W[j],se=W[j+1],H=W[j+2],q=W[j+3],j+=4,p.push((L<<24|se<<16|H<<8|q)/65536))}}}te(e),this.pathCommands=C,P&&(this.advanceWidth=R)}}class bn{constructor(A){u(this,"_items",[]);this._sfnt=A}get(A){const e=this._items[A];let t;if(e)t=e;else{t=this._get(A);const i=this._sfnt.hmtx.metrics[A];i&&(t.advanceWidth=t.advanceWidth||i.advanceWidth,t.leftSideBearing=t.leftSideBearing||i.leftSideBearing);const s=this._sfnt.cmap.glyphIndexToUnicodesMap.get(A);s&&(t.unicode??(t.unicode=s[0]),t.unicodes??(t.unicodes=s)),this._items[A]=t}return t}}class rd extends bn{get length(){return this._sfnt.cff.charStringsIndex.offsets.length-1}_get(A){const e=this._sfnt.cff,t=new id({index:A});return t.parse(e,e.charStringsIndex.get(A),this),t.name=e.charset[A],t}}var sd=Object.defineProperty,Rl=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&sd(A,e,i),i};class kr extends ft{constructor(e,t,i,s){super(e,t,i,s);u(this,"_offsets");u(this,"_objects");this._init()}get offsets(){return this._offsets??(this._offsets=this.readOffsets())}get objects(){return this._objects??(this._objects=this.readObjects())}_init(){const e=this.view,t=this.count,i=this.offsetSize;this.objectOffset=(t+1)*i+2,this.endOffset=e.byteOffset+this.objectOffset+this.offsets[t]}readOffsets(){const e=this.view,t=this.count,i=this.offsetSize;e.seek(3);const s=[];for(let n=0,o=t+1;n<o;n++){const a=this.view;let l=0;for(let h=0;h<i;h++)l<<=8,l+=a.readUint8();s.push(l)}return s}readObjects(){const e=[];for(let t=0,i=this.count;t<i;t++)e.push(this.get(t));return e}get(e){const t=this.offsets,i=this.objectOffset,s=i+t[e],o=i+t[e+1]-s;return this._isString?this.view.readString(s,o):this.view.readBytes(s,o)}}Rl([y("uint16")],kr.prototype,"count"),Rl([y("uint8")],kr.prototype,"offsetSize");class Ur extends kr{constructor(){super(...arguments);u(this,"_isString",!1)}}class Pl extends kr{constructor(){super(...arguments);u(this,"_isString",!0)}}const nd=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","266 ff","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],od=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron"],ad=[".notdef","space","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],ld=[".notdef","space","dollaroldstyle","dollarsuperior","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","hyphensuperior","colonmonetary","onefitted","rupiah","centoldstyle","figuredash","hypheninferior","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior"];function Nr(r,A){return A<=390?nd[A]:r[A-391]}function ye(r,A="number",e){return(t,i)=>{if(typeof i!="string")return;const s={type:A,operator:r,default:e??A==="number"?0:void 0};Object.defineProperty(t.constructor.prototype,i,{get(){return this._getProp(s)},set(n){this._setProp(s,n)},configurable:!0,enumerable:!0})}}class kl extends ft{constructor(){super(...arguments);u(this,"_dict");u(this,"_stringIndex")}get dict(){return this._dict??(this._dict=this._readDict())}setStringIndex(e){return this._stringIndex=e,this}_readFloatOperand(){const e=this.view;let t="";const i=15,s=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"];for(;;){const n=e.readUint8(),o=n>>4,a=n&15;if(o===i||(t+=s[o],a===i))break;t+=s[a]}return Number.parseFloat(t)}_readOperand(e){const t=this.view;let i,s,n,o;if(e===28)return i=t.readUint8(),s=t.readUint8(),i<<8|s;if(e===29)return i=t.readUint8(),s=t.readUint8(),n=t.readUint8(),o=t.readUint8(),i<<24|s<<16|n<<8|o;if(e===30)return this._readFloatOperand();if(e>=32&&e<=246)return e-139;if(e>=247&&e<=250)return i=t.readUint8(),(e-247)*256+i+108;if(e>=251&&e<=254)return i=t.readUint8(),-(e-251)*256-i-108;throw new Error(`invalid b0 ${e}, at: ${t.cursor}`)}_readDict(){const e=this.view;e.seek(0);let t=[];const i=e.cursor+e.byteLength,s={};for(;e.cursor<i;){let n=e.readUint8();n<=21?(n===12&&(n=1200+e.readUint8()),s[n]=t,t=[]):t.push(this._readOperand(n))}return s}_getProp(e){var i;const t=this.dict[e.operator]??e.default;switch(e.type){case"number":return t[0];case"string":return Nr(((i=this._stringIndex)==null?void 0:i.objects)??[],t[0]);case"number[]":return t}return t}_setProp(e,t){}}var hd=Object.defineProperty,Dn=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&hd(A,e,i),i};class Fr extends kl{}Dn([ye(19)],Fr.prototype,"subrs"),Dn([ye(20)],Fr.prototype,"defaultWidthX"),Dn([ye(21)],Fr.prototype,"nominalWidthX");var cd=Object.defineProperty,De=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&cd(A,e,i),i};class ve extends kl{}De([ye(0,"string")],ve.prototype,"version"),De([ye(1,"string")],ve.prototype,"notice"),De([ye(1200,"string")],ve.prototype,"copyright"),De([ye(2,"string")],ve.prototype,"fullName"),De([ye(3,"string")],ve.prototype,"familyName"),De([ye(4,"string")],ve.prototype,"weight"),De([ye(1201)],ve.prototype,"isFixedPitch"),De([ye(1202)],ve.prototype,"italicAngle"),De([ye(1203,"number",-100)],ve.prototype,"underlinePosition"),De([ye(1204,"number",50)],ve.prototype,"underlineThickness"),De([ye(1205)],ve.prototype,"paintType"),De([ye(1206,"number",2)],ve.prototype,"charstringType"),De([ye(1207,"number[]",[.001,0,0,.001,0,0])],ve.prototype,"fontMatrix"),De([ye(13)],ve.prototype,"uniqueId"),De([ye(5,"number[]",[0,0,0,0])],ve.prototype,"fontBBox"),De([ye(1208)],ve.prototype,"strokeWidth"),De([ye(14)],ve.prototype,"xuid"),De([ye(15)],ve.prototype,"charset"),De([ye(16)],ve.prototype,"encoding"),De([ye(17)],ve.prototype,"charStrings"),De([ye(18,"number[]",[0,0])],ve.prototype,"private");function Ye(r,A=r){return e=>{DA.tableDefinitions.set(r,{tag:r,prop:A,class:e}),Object.defineProperty(DA.prototype,A,{get(){return this.get(r)},set(t){return this.set(r,t)},configurable:!0,enumerable:!0})}}const UA=class UA{constructor(A){u(this,"tables",new Map);u(this,"tableViews",new Map);(A instanceof Map?A:new Map(Object.entries(A))).forEach((t,i)=>{this.tableViews.set(i,new DataView(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)))})}get hasGlyf(){return this.tableViews.has("glyf")}get names(){return this.name.names}get unitsPerEm(){return this.head.unitsPerEm}get ascender(){return this.hhea.ascent}get descender(){return this.hhea.descent}get createdTimestamp(){return this.head.created}get modifiedTimestamp(){return this.head.modified}get numGlyphs(){return this.maxp.numGlyphs}get unicodes(){return this.cmap.glyphIndexToUnicodesMap}get glyphs(){return this.hasGlyf?this.glyf.glyphs:this.cff.glyphs}charToGlyphIndex(A){let e=this.cmap.unicodeToGlyphIndexMap.get(A.codePointAt(0));if(e===void 0&&!this.hasGlyf){const{encoding:t,charset:i}=this.cff;e=i.indexOf(t[A.codePointAt(0)])}return e??0}charToGlyph(A){return this.glyphs.get(this.charToGlyphIndex(A))}textToGlyphIndexes(A){const e=[];for(const t of A)e.push(this.charToGlyphIndex(t));return e}textToGlyphs(A){const e=this.glyphs,t=this.textToGlyphIndexes(A),i=t.length,s=Array.from({length:i}),n=e.get(0);for(let o=0;o<i;o+=1)s[o]=e.get(t[o])||n;return s}getPathCommands(A,e,t,i,s){const n=[];return this.forEachGlyph(A,e,t,i,s,(o,a,l,h,c)=>{n.push(...o.getPathCommands(a,l,h,c,this))}),n}getAdvanceWidth(A,e,t){return this.forEachGlyph(A,0,0,e,t,()=>{})}forEachGlyph(A,e=0,t=0,i=72,s={},n){const o=1/this.unitsPerEm*i,a=this.textToGlyphs(A);for(let l=0;l<a.length;l+=1){const h=a[l];n.call(this,h,e,t,i,s),h.advanceWidth&&(e+=h.advanceWidth*o),s.letterSpacing?e+=s.letterSpacing*i:s.tracking&&(e+=s.tracking/1e3*i)}return e}clone(){return new UA(this.tableViews)}delete(A){const e=UA.tableDefinitions.get(A);return e?(this.tableViews.delete(A),this.tables.delete(e.prop),this):this}set(A,e){const t=UA.tableDefinitions.get(A);return t&&this.tables.set(t.prop,e),this.tableViews.set(A,e.view),this}get(A){const e=UA.tableDefinitions.get(A);if(!e)return;let t=this.tables.get(e.prop);if(!t){const i=e.class;if(i){const s=this.tableViews.get(A);if(!s)return;t=new i(s.buffer,s.byteOffset,s.byteLength).setSFNT(this),this.tables.set(e.prop,t)}}return t}};u(UA,"tableDefinitions",new Map);let DA=UA;class Ze extends ft{setSFNT(A){return this._sfnt=A,this}getSFNT(){return this._sfnt}}var gd=Object.defineProperty,ud=Object.getOwnPropertyDescriptor,zi=(r,A,e,t)=>{for(var i=t>1?void 0:t?ud(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(t?n(A,e,i):n(i))||i);return t&&i&&gd(A,e,i),i};let xA=class extends Ze{constructor(A,e,t,i){super(A,e,t,i);u(this,"_glyphs");u(this,"privateDict");u(this,"subrsIndex");this._init()}get glyphs(){return this._glyphs??(this._glyphs=new rd(this._sfnt))}get gsubrs(){return this.globalSubrIndex.objects}get gsubrsBias(){return this._calcSubroutineBias(this.globalSubrIndex.objects)}get defaultWidthX(){var A;return((A=this.privateDict)==null?void 0:A.defaultWidthX)??0}get nominalWidthX(){var A;return((A=this.privateDict)==null?void 0:A.nominalWidthX)??0}get subrs(){var A;return((A=this.subrsIndex)==null?void 0:A.objects)??[]}get subrsBias(){return this._calcSubroutineBias(this.subrs)}_init(){const A=this.view,{buffer:e,byteOffset:t}=A,i=t+4;this.nameIndex=new Pl(e,i),this.topDictIndex=new Ur(e,this.nameIndex.endOffset),this.stringIndex=new Pl(e,this.topDictIndex.endOffset),this.globalSubrIndex=new Ur(e,this.stringIndex.endOffset),this.topDict=new ve(new Uint8Array(this.topDictIndex.objects[0]).buffer).setStringIndex(this.stringIndex);const s=this.topDict.private[0],n=this.topDict.private[1];s&&(this.privateDict=new Fr(e,t+n,s).setStringIndex(this.stringIndex),this.privateDict.subrs&&(this.subrsIndex=new Ur(e,t+n+this.privateDict.subrs))),this.charStringsIndex=new Ur(e,t+this.topDict.charStrings);const o=this.charStringsIndex.offsets.length-1;this.topDict.charset===0?this.charset=od:this.topDict.charset===1?this.charset=ad:this.topDict.charset===2?this.charset=ld:this.charset=this._readCharset(t+this.topDict.charset,o,this.stringIndex.objects),this.topDict.encoding===0?this.encoding=vn:this.topDict.encoding===1?this.encoding=Ad:this.encoding=this._readEncoding(t+this.topDict.encoding)}_readCharset(A,e,t){const i=this.view;i.seek(A);let s,n,o;e-=1;const a=[".notdef"],l=i.readUint8();if(l===0)for(s=0;s<e;s+=1)n=i.readUint16(),a.push(Nr(t,n));else if(l===1)for(;a.length<=e;)for(n=i.readUint16(),o=i.readUint8(),s=0;s<=o;s+=1)a.push(Nr(t,n)),n+=1;else if(l===2)for(;a.length<=e;)for(n=i.readUint16(),o=i.readUint16(),s=0;s<=o;s+=1)a.push(Nr(t,n)),n+=1;else throw new Error(`Unknown charset format ${l}`);return a}_readEncoding(A){const e=this.view;e.seek(A);let t,i;const s={},n=e.readUint8();if(n===0){const o=e.readUint8();for(t=0;t<o;t+=1)i=e.readUint8(),s[i]=t}else if(n===1){const o=e.readUint8();for(i=1,t=0;t<o;t+=1){const a=e.readUint8(),l=e.readUint8();for(let h=a;h<=a+l;h+=1)s[h]=i,i+=1}}else console.warn(`unknown encoding format:${n}`);return s}_calcSubroutineBias(A){let e;return A.length<1240?e=107:A.length<33900?e=1131:e=32768,e}};zi([y("uint8")],xA.prototype,"majorVersion",2),zi([y("uint8")],xA.prototype,"minorVersion",2),zi([y("uint8")],xA.prototype,"headerSize",2),zi([y("uint8")],xA.prototype,"offsetSize",2),xA=zi([Ye("CFF ","cff")],xA);var fd=Object.defineProperty,Tr=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&fd(A,e,i),i};const Wi=class Nh extends ft{constructor(A=new ArrayBuffer(262),e){super(A,e,262)}static from(A){const e=new Nh;return e.format=0,e.length=e.view.byteLength,e.language=0,A.forEach((t,i)=>{i<256&&t<256&&e.view.writeUint8(t,6+i)}),e}getUnicodeToGlyphIndexMap(){const A=new Map;return this.glyphIndexArray.forEach((e,t)=>{A.set(t,e)}),A}};Tr([y("uint16")],Wi.prototype,"format"),Tr([y("uint16")],Wi.prototype,"length"),Tr([y("uint16")],Wi.prototype,"language"),Tr([y({type:"uint8",size:256})],Wi.prototype,"glyphIndexArray");let xn=Wi;var dd=Object.defineProperty,Sn=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&dd(A,e,i),i};class Vi extends ft{get subHeaderKeys(){return this.view.seek(6),Array.from({length:256},()=>this.view.readUint16()/8)}get maxSubHeaderKey(){return this.subHeaderKeys.reduce((A,e)=>Math.max(A,e),0)}get subHeaders(){const A=this.maxSubHeaderKey;return this.view.seek(6+256*2),Array.from({length:A},(e,t)=>({firstCode:this.view.readUint16(),entryCount:this.view.readUint16(),idDelta:this.view.readUint16(),idRangeOffset:(this.view.readUint16()-(A-t)*8-2)/2}))}get glyphIndexArray(){const A=this.maxSubHeaderKey,e=6+256*2+A*8;this.view.seek(e);const t=(this.view.byteLength-e)/2;return Array.from({length:t},()=>this.view.readUint16())}getUnicodeToGlyphIndexMap(A){const e=new Map,t=this.subHeaderKeys,i=this.maxSubHeaderKey,s=this.subHeaders,n=this.glyphIndexArray,o=t.findIndex(l=>l===i);let a=0;for(let l=0;l<256;l++)if(t[l]===0)l>=o||l<s[0].firstCode||l>=s[0].firstCode+s[0].entryCount||s[0].idRangeOffset+(l-s[0].firstCode)>=n.length?a=0:(a=n[s[0].idRangeOffset+(l-s[0].firstCode)],a!==0&&(a=a+s[0].idDelta)),a!==0&&a<A&&e.set(l,a);else{const h=t[l];for(let c=0,f=s[h].entryCount;c<f;c++)if(s[h].idRangeOffset+c>=n.length?a=0:(a=n[s[h].idRangeOffset+c],a!==0&&(a=a+s[h].idDelta)),a!==0&&a<A){const I=(l<<8|c+s[h].firstCode)%65535;e.set(I,a)}}return e}}Sn([y("uint16")],Vi.prototype,"format"),Sn([y("uint16")],Vi.prototype,"length"),Sn([y("uint16")],Vi.prototype,"language");function Ul(r){return r>32767?r-65536:r<-32767?r+65536:r}function Mn(r,A){let e;const t=[];let i={};return r.forEach((s,n)=>{A&&n>A||((!e||n!==e.unicode+1||s!==e.glyphIndex+1)&&(e?(i.end=e.unicode,t.push(i),i={start:n,startId:s,delta:Ul(s-n)}):(i.start=Number(n),i.startId=s,i.delta=Ul(s-n))),e={unicode:n,glyphIndex:s})}),e&&(i.end=e.unicode,t.push(i)),t}var Id=Object.defineProperty,SA=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&Id(A,e,i),i};const gA=class Fh extends ft{get endCode(){const A=this.segCountX2;return this.view.seek(14),Array.from({length:A/2},()=>this.view.readUint16())}set endCode(A){this.view.seek(14),A.forEach(e=>this.view.writeUint16(e))}get reservedPad(){return this.view.readUint16(14+this.segCountX2)}set reservedPad(A){this.view.writeUint16(A,14+this.segCountX2)}get startCode(){const A=this.segCountX2;return this.view.seek(14+A+2),Array.from({length:A/2},()=>this.view.readUint16())}set startCode(A){this.view.seek(14+this.segCountX2+2),A.forEach(e=>this.view.writeUint16(e))}get idDelta(){const A=this.segCountX2;return this.view.seek(14+A+2+A),Array.from({length:A/2},()=>this.view.readUint16())}set idDelta(A){const e=this.segCountX2;this.view.seek(14+e+2+e),A.forEach(t=>this.view.writeUint16(t))}get idRangeOffsetCursor(){const A=this.segCountX2;return 14+A+2+A*2}get idRangeOffset(){const A=this.segCountX2;return this.view.seek(this.idRangeOffsetCursor),Array.from({length:A/2},()=>this.view.readUint16())}set idRangeOffset(A){this.view.seek(this.idRangeOffsetCursor),A.forEach(e=>this.view.writeUint16(e))}get glyphIndexArrayCursor(){const A=this.segCountX2;return 14+A+2+A*3}get glyphIndexArray(){const A=this.glyphIndexArrayCursor;this.view.seek(A);const e=(this.view.byteLength-A)/2;return Array.from({length:e},()=>this.view.readUint16())}static from(A){const e=Mn(A,65535),t=e.length+1,i=Math.floor(Math.log(t)/Math.LN2),s=2*2**i,n=new Fh(new ArrayBuffer(24+e.length*8));return n.format=4,n.length=n.view.byteLength,n.language=0,n.segCountX2=t*2,n.searchRange=s,n.entrySelector=i,n.rangeShift=2*t-s,n.endCode=[...e.map(o=>o.end),65535],n.reservedPad=0,n.startCode=[...e.map(o=>o.start),65535],n.idDelta=[...e.map(o=>o.delta),1],n.idRangeOffset=Array.from({length:t},()=>0),n}getUnicodeToGlyphIndexMap(){const A=new Map,e=this.segCountX2/2,t=(this.glyphIndexArrayCursor-this.idRangeOffsetCursor)/2,i=this.startCode,s=this.endCode,n=this.idRangeOffset,o=this.idDelta,a=this.glyphIndexArray;for(let l=0;l<e;++l)for(let h=i[l],c=s[l];h<=c;++h)if(n[l]===0)A.set(h,(h+o[l])%65536);else{const f=l+n[l]/2+(h-i[l])-t,I=a[f];I!==0?A.set(h,(I+o[l])%65536):A.set(h,0)}return A.delete(65535),A}};SA([y("uint16")],gA.prototype,"format"),SA([y("uint16")],gA.prototype,"length"),SA([y("uint16")],gA.prototype,"language"),SA([y("uint16")],gA.prototype,"segCountX2"),SA([y("uint16")],gA.prototype,"searchRange"),SA([y("uint16")],gA.prototype,"entrySelector"),SA([y("uint16")],gA.prototype,"rangeShift");let Rn=gA;var pd=Object.defineProperty,qi=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&pd(A,e,i),i};class MA extends ft{get glyphIndexArray(){return this.view.seek(12),Array.from({length:this.entryCount},()=>this.view.readUint16())}getUnicodeToGlyphIndexMap(){const A=this.glyphIndexArray,e=new Map;return A.forEach((t,i)=>{e.set(i,t)}),e}}qi([y("uint16")],MA.prototype,"format"),qi([y("uint16")],MA.prototype,"length"),qi([y("uint16")],MA.prototype,"language"),qi([y("uint16")],MA.prototype,"firstCode"),qi([y("uint16")],MA.prototype,"entryCount");var Ed=Object.defineProperty,Xi=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&Ed(A,e,i),i};const $A=class Th extends ft{get groups(){const A=this.nGroups;return this.view.seek(16),Array.from({length:A},()=>({startCharCode:this.view.readUint32(),endCharCode:this.view.readUint32(),startGlyphCode:this.view.readUint32()}))}static from(A){const e=Mn(A),t=new Th(new ArrayBuffer(16+e.length*12));return t.format=12,t.reserved=0,t.length=t.view.byteLength,t.language=0,t.nGroups=e.length,e.forEach(i=>{t.view.writeUint32(i.start),t.view.writeUint32(i.end),t.view.writeUint32(i.startId)}),t}getUnicodeToGlyphIndexMap(){const A=new Map,e=this.groups;for(let t=0,i=e.length;t<i;t++){const s=e[t];let n=s.startGlyphCode,o=s.startCharCode;const a=s.endCharCode;for(;o<=a;)A.set(o++,n++)}return A}};Xi([y("uint16")],$A.prototype,"format"),Xi([y("uint16")],$A.prototype,"reserved"),Xi([y("uint32")],$A.prototype,"length"),Xi([y("uint32")],$A.prototype,"language"),Xi([y("uint32")],$A.prototype,"nGroups");let Pn=$A;var Bd=Object.defineProperty,kn=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&Bd(A,e,i),i};class ji extends ft{getVarSelectorRecords(){const A=this.numVarSelectorRecords;return this.view.seek(10),Array.from({length:A},()=>{const e={varSelector:this.view.readUint24(),defaultUVSOffset:this.view.readUint32(),unicodeValueRanges:[],nonDefaultUVSOffset:this.view.readUint32(),uVSMappings:[]};if(e.defaultUVSOffset){this.view.seek(e.defaultUVSOffset);const t=this.view.readUint32();e.unicodeValueRanges=Array.from({length:t},()=>({startUnicodeValue:this.view.readUint24(),additionalCount:this.view.readUint8()}))}if(e.nonDefaultUVSOffset){this.view.seek(e.nonDefaultUVSOffset);const t=this.view.readUint32();e.uVSMappings=Array.from({length:t},()=>({unicodeValue:this.view.readUint24(),glyphID:this.view.readUint16()}))}return e})}getUnicodeToGlyphIndexMap(){const A=new Map,e=this.getVarSelectorRecords();for(let t=0,i=e.length;t<i;t++){const{uVSMappings:s}=e[t];s.forEach(n=>{A.set(n.unicodeValue,n.glyphID)})}return A}}kn([y("uint16")],ji.prototype,"format"),kn([y("uint32")],ji.prototype,"length"),kn([y("uint32")],ji.prototype,"numVarSelectorRecords");var Cd=Object.defineProperty,Qd=Object.getOwnPropertyDescriptor,Un=(r,A,e,t)=>{for(var i=t>1?void 0:t?Qd(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(t?n(A,e,i):n(i))||i);return t&&i&&Cd(A,e,i),i};let ei=class extends Ze{constructor(){super(...arguments);u(this,"_unicodeToGlyphIndexMap");u(this,"_glyphIndexToUnicodesMap")}static from(A){const e=Array.from(A.keys()).some(c=>c>65535),t=Rn.from(A),i=xn.from(A),s=e?Pn.from(A):void 0,n=4+(s?32:24),o=n+t.view.byteLength,a=o+i.view.byteLength,l=[{platformID:0,platformSpecificID:3,offset:n},{platformID:1,platformSpecificID:0,offset:o},{platformID:3,platformSpecificID:1,offset:n},s&&{platformID:3,platformSpecificID:10,offset:a}].filter(Boolean),h=new ei(new ArrayBuffer(4+8*l.length+t.view.byteLength+i.view.byteLength+((s==null?void 0:s.view.byteLength)??0)));return h.numberSubtables=l.length,h.view.seek(4),l.forEach(c=>{h.view.writeUint16(c.platformID),h.view.writeUint16(c.platformSpecificID),h.view.writeUint32(c.offset)}),h.view.writeBytes(t.view,n),h.view.writeBytes(i.view,o),s&&h.view.writeBytes(s.view,a),h}get unicodeToGlyphIndexMap(){return this._unicodeToGlyphIndexMap??(this._unicodeToGlyphIndexMap=this.readunicodeToGlyphIndexMap())}get glyphIndexToUnicodesMap(){if(!this._glyphIndexToUnicodesMap){const A=new Map,e=this.unicodeToGlyphIndexMap,t=Array.from(e.keys());for(let i=0,s=t.length;i<s;i++){const n=t[i],o=e.get(n);A.has(o)?A.get(o).push(n):A.set(o,[n])}this._glyphIndexToUnicodesMap=A}return this._glyphIndexToUnicodesMap}readSubtables(){const A=this.numberSubtables;return this.view.seek(4),Array.from({length:A},()=>({platformID:this.view.readUint16(),platformSpecificID:this.view.readUint16(),offset:this.view.readUint32()})).map(e=>{this.view.seek(e.offset);const t=this.view.readUint16();let i;switch(t){case 0:i=new xn(this.view.buffer,e.offset);break;case 2:i=new Vi(this.view.buffer,e.offset,this.view.readUint16());break;case 4:i=new Rn(this.view.buffer,e.offset,this.view.readUint16());break;case 6:i=new MA(this.view.buffer,e.offset,this.view.readUint16());break;case 12:i=new Pn(this.view.buffer,e.offset,this.view.readUint32(e.offset+4));break;case 14:default:i=new ji(this.view.buffer,e.offset,this.view.readUint32());break}return{...e,format:t,view:i}})}readunicodeToGlyphIndexMap(){var o,a,l,h,c;const A=this.readSubtables(),e=(o=A.find(f=>f.format===0))==null?void 0:o.view,t=(a=A.find(f=>f.platformID===3&&f.platformSpecificID===3&&f.format===2))==null?void 0:a.view,i=(l=A.find(f=>f.platformID===3&&f.platformSpecificID===1&&f.format===4))==null?void 0:l.view,s=(h=A.find(f=>f.platformID===3&&f.platformSpecificID===10&&f.format===12))==null?void 0:h.view,n=(c=A.find(f=>f.platformID===0&&f.platformSpecificID===5&&f.format===14))==null?void 0:c.view;return new Map([...(e==null?void 0:e.getUnicodeToGlyphIndexMap())??[],...(t==null?void 0:t.getUnicodeToGlyphIndexMap(this._sfnt.maxp.numGlyphs))??[],...(i==null?void 0:i.getUnicodeToGlyphIndexMap())??[],...(s==null?void 0:s.getUnicodeToGlyphIndexMap())??[],...(n==null?void 0:n.getUnicodeToGlyphIndexMap())??[]])}};Un([y("uint16")],ei.prototype,"version",2),Un([y("uint16")],ei.prototype,"numberSubtables",2),ei=Un([Ye("cmap")],ei);class yd extends _n{_parseContours(A){const e=[];let t=[];for(let i=0;i<A.length;i+=1){const s=A[i];t.push(s),s.lastPointOfContour&&(e.push(t),t=[])}return Ki(t.length===0,"There are still points left in the current contour."),e}_transformPoints(A,e){const t=[];for(let i=0;i<A.length;i+=1){const s=A[i],n={x:e.xScale*s.x+e.scale10*s.y+e.dx,y:e.scale01*s.x+e.yScale*s.y+e.dy,onCurve:s.onCurve,lastPointOfContour:s.lastPointOfContour};t.push(n)}return t}_parseGlyphCoordinate(A,e,t,i,s){let n;return(e&i)>0?(n=A.view.readUint8(),(e&s)===0&&(n=-n),n=t+n):(e&s)>0?n=t:n=t+A.view.readInt16(),n}parse(A,e,t){A.view.seek(e);const i=this.numberOfContours=A.view.readInt16();if(this.xMin=A.view.readInt16(),this.yMin=A.view.readInt16(),this.xMax=A.view.readInt16(),this.yMax=A.view.readInt16(),i>0){const o=this.endPointIndices=[];for(let C=0;C<i;C++)o.push(A.view.readUint16());const a=this.instructionLength=A.view.readUint16();Ki(a<5e3,`Bad instructionLength:${a}`);const l=this.instructions=[];for(let C=0;C<a;++C)l.push(A.view.readUint8());const h=A.view.byteOffset,c=o[o.length-1]+1;Ki(c<2e4,`Bad numberOfCoordinates:${h}`);const f=[];let I,d=0;for(;d<c;)if(I=A.view.readUint8(),f.push(I),d++,I&8&&d<c){const C=A.view.readUint8();for(let p=0;p<C;p++)f.push(I),d++}if(Ki(f.length===c,`Bad flags length: ${f.length}, numberOfCoordinates: ${c}`),o.length>0){const C=[];let p;if(c>0){for(let w=0;w<c;w+=1)I=f[w],p={},p.onCurve=!!(I&1),p.lastPointOfContour=o.includes(w),C.push(p);let M=0;for(let w=0;w<c;w+=1)I=f[w],p=C[w],p.x=this._parseGlyphCoordinate(A,I,M,2,16),M=p.x;let P=0;for(let w=0;w<c;w+=1)I=f[w],p=C[w],p.y=this._parseGlyphCoordinate(A,I,P,4,32),P=p.y}this.points=C}else this.points=[]}else if(i===0)this.points=[];else{this.isComposite=!0,this.points=[],this.components=[];let o,a=!0;for(;a;){o=A.view.readUint16();const l={glyphIndex:A.view.readUint16(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0};(o&1)>0?(o&2)>0?(l.dx=A.view.readInt16(),l.dy=A.view.readInt16()):l.matchedPoints=[A.view.readUint16(),A.view.readUint16()]:(o&2)>0?(l.dx=A.view.readInt8(),l.dy=A.view.readInt8()):l.matchedPoints=[A.view.readUint8(),A.view.readUint8()],(o&8)>0?l.xScale=l.yScale=A.view.readInt16()/16384:(o&64)>0?(l.xScale=A.view.readInt16()/16384,l.yScale=A.view.readInt16()/16384):(o&128)>0&&(l.xScale=A.view.readInt16()/16384,l.scale01=A.view.readInt16()/16384,l.scale10=A.view.readInt16()/16384,l.yScale=A.view.readInt16()/16384),this.components.push(l),a=!!(o&32)}if(o&256){this.instructionLength=A.view.readUint16(),this.instructions=[];for(let l=0;l<this.instructionLength;l+=1)this.instructions.push(A.view.readUint8())}}if(this.isComposite)for(let o=0;o<this.components.length;o+=1){const a=this.components[o],l=t.get(a.glyphIndex);if(l.getPathCommands(),l.points){let h;if(a.matchedPoints===void 0)h=this._transformPoints(l.points,a);else{Ki(a.matchedPoints[0]>this.points.length-1||a.matchedPoints[1]>l.points.length-1,`Matched points out of range in ${this.name}`);const c=this.points[a.matchedPoints[0]];let f=l.points[a.matchedPoints[1]];const I={xScale:a.xScale,scale01:a.scale01,scale10:a.scale10,yScale:a.yScale,dx:0,dy:0};f=this._transformPoints([f],I)[0],I.dx=c.x-f.x,I.dy=c.y-f.y,h=this._transformPoints(l.points,I)}this.points=this.points.concat(h)}}const s=[],n=this._parseContours(this.points);for(let o=0,a=n.length;o<a;++o){const l=n[o];let h=l[l.length-1],c=l[0];h.onCurve?s.push({type:"M",x:h.x,y:h.y}):c.onCurve?s.push({type:"M",x:c.x,y:c.y}):s.push({type:"M",x:(h.x+c.x)*.5,y:(h.y+c.y)*.5});for(let f=0,I=l.length;f<I;++f)if(h=c,c=l[(f+1)%I],h.onCurve)s.push({type:"L",x:h.x,y:h.y});else{let d=c;c.onCurve||(d={x:(h.x+c.x)*.5,y:(h.y+c.y)*.5}),s.push({type:"Q",x1:h.x,y1:h.y,x:d.x,y:d.y})}s.push({type:"Z"})}this.pathCommands=s}}class md extends bn{get length(){return this._sfnt.loca.locations.length}_get(A){const e=this._sfnt.loca.locations,t=e[A],i=new yd({index:A});return t!==e[A+1]&&i.parse(this._sfnt.glyf,t,this),i}}var wd=Object.getOwnPropertyDescriptor,vd=(r,A,e,t)=>{for(var i=t>1?void 0:t?wd(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};let Gr=class extends Ze{constructor(){super(...arguments);u(this,"_glyphs")}static from(A){const e=A.reduce((i,s)=>i+s.byteLength,0),t=new Gr(new ArrayBuffer(e));return A.forEach(i=>{t.view.writeBytes(i)}),t}get glyphs(){return this._glyphs??(this._glyphs=new md(this._sfnt))}};Gr=vd([Ye("glyf")],Gr);var _d=Object.getOwnPropertyDescriptor,bd=(r,A,e,t)=>{for(var i=t>1?void 0:t?_d(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};let Nn=class extends Ze{};Nn=bd([Ye("GPOS","gpos")],Nn);var Dd=Object.defineProperty,xd=Object.getOwnPropertyDescriptor,RA=(r,A,e,t)=>{for(var i=t>1?void 0:t?xd(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(t?n(A,e,i):n(i))||i);return t&&i&&Dd(A,e,i),i};let $t=class extends Ze{};RA([y("uint16")],$t.prototype,"majorVersion",2),RA([y("uint16")],$t.prototype,"minorVersion",2),RA([y("uint16")],$t.prototype,"scriptListOffset",2),RA([y("uint16")],$t.prototype,"featureListOffset",2),RA([y("uint16")],$t.prototype,"lookupListOffset",2),RA([y("uint16")],$t.prototype,"featureVariationsOffset",2),$t=RA([Ye("GSUB","gsub")],$t);var Sd=Object.defineProperty,Md=Object.getOwnPropertyDescriptor,Te=(r,A,e,t)=>{for(var i=t>1?void 0:t?Md(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(t?n(A,e,i):n(i))||i);return t&&i&&Sd(A,e,i),i};let Re=class extends Ze{constructor(r=new ArrayBuffer(54),A){super(r,A,Math.min(54,r.byteLength-(A??0)))}};Te([y("fixed")],Re.prototype,"version",2),Te([y("fixed")],Re.prototype,"fontRevision",2),Te([y("uint32")],Re.prototype,"checkSumAdjustment",2),Te([y("uint32")],Re.prototype,"magickNumber",2),Te([y("uint16")],Re.prototype,"flags",2),Te([y("uint16")],Re.prototype,"unitsPerEm",2),Te([y({type:"longDateTime"})],Re.prototype,"created",2),Te([y({type:"longDateTime"})],Re.prototype,"modified",2),Te([y("int16")],Re.prototype,"xMin",2),Te([y("int16")],Re.prototype,"yMin",2),Te([y("int16")],Re.prototype,"xMax",2),Te([y("int16")],Re.prototype,"yMax",2),Te([y("uint16")],Re.prototype,"macStyle",2),Te([y("uint16")],Re.prototype,"lowestRecPPEM",2),Te([y("int16")],Re.prototype,"fontDirectionHint",2),Te([y("int16")],Re.prototype,"indexToLocFormat",2),Te([y("int16")],Re.prototype,"glyphDataFormat",2),Re=Te([Ye("head")],Re);var Rd=Object.defineProperty,Pd=Object.getOwnPropertyDescriptor,nt=(r,A,e,t)=>{for(var i=t>1?void 0:t?Pd(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(t?n(A,e,i):n(i))||i);return t&&i&&Rd(A,e,i),i};let ze=class extends Ze{constructor(r=new ArrayBuffer(36),A){super(r,A,Math.min(36,r.byteLength-(A??0)))}};nt([y("fixed")],ze.prototype,"version",2),nt([y("int16")],ze.prototype,"ascent",2),nt([y("int16")],ze.prototype,"descent",2),nt([y("int16")],ze.prototype,"lineGap",2),nt([y("uint16")],ze.prototype,"advanceWidthMax",2),nt([y("int16")],ze.prototype,"minLeftSideBearing",2),nt([y("int16")],ze.prototype,"minRightSideBearing",2),nt([y("int16")],ze.prototype,"xMaxExtent",2),nt([y("int16")],ze.prototype,"caretSlopeRise",2),nt([y("int16")],ze.prototype,"caretSlopeRun",2),nt([y("int16")],ze.prototype,"caretOffset",2),nt([y({type:"int16",size:4})],ze.prototype,"reserved",2),nt([y("int16")],ze.prototype,"metricDataFormat",2),nt([y("uint16")],ze.prototype,"numOfLongHorMetrics",2),ze=nt([Ye("hhea")],ze);var kd=Object.getOwnPropertyDescriptor,Ud=(r,A,e,t)=>{for(var i=t>1?void 0:t?kd(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};let Lr=class extends Ze{constructor(){super(...arguments);u(this,"_metrics")}static from(A){const e=A.length*4,t=new Lr(new ArrayBuffer(e));return A.forEach(i=>{t.view.writeUint16(i.advanceWidth),t.view.writeUint16(i.leftSideBearing)}),t}get metrics(){return this._metrics??(this._metrics=this.readMetrics())}readMetrics(){const A=this._sfnt.maxp.numGlyphs,e=this._sfnt.hhea.numOfLongHorMetrics;let t=0;const i=this.view;return i.seek(0),Array.from({length:A}).map((s,n)=>(n<e&&(t=i.readUint16()),{advanceWidth:t,leftSideBearing:i.readUint16()}))}};Lr=Ud([Ye("hmtx")],Lr);var Nd=Object.getOwnPropertyDescriptor,Fd=(r,A,e,t)=>{for(var i=t>1?void 0:t?Nd(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};let Fn=class extends Ze{};Fn=Fd([Ye("kern","kern")],Fn);var Td=Object.getOwnPropertyDescriptor,Gd=(r,A,e,t)=>{for(var i=t>1?void 0:t?Td(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};let Or=class extends Ze{constructor(){super(...arguments);u(this,"_locations")}static from(A,e=1){const t=A.length*(e?4:2),i=new Or(new ArrayBuffer(t));return A.forEach(s=>{e?i.view.writeUint32(s):i.view.writeUint16(s/2)}),i}get locations(){return this._locations??(this._locations=this.readLocations())}readLocations(){const A=this._sfnt.maxp.numGlyphs,e=this._sfnt.head.indexToLocFormat,t=this.view;return t.seek(0),Array.from({length:A}).map(()=>e?t.readUint32():t.readUint16()*2)}};Or=Gd([Ye("loca")],Or);var Ld=Object.defineProperty,Od=Object.getOwnPropertyDescriptor,$e=(r,A,e,t)=>{for(var i=t>1?void 0:t?Od(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(t?n(A,e,i):n(i))||i);return t&&i&&Ld(A,e,i),i};let Ge=class extends Ze{constructor(r=new ArrayBuffer(32),A){super(r,A,Math.min(32,r.byteLength-(A??0)))}};$e([y("fixed")],Ge.prototype,"version",2),$e([y("uint16")],Ge.prototype,"numGlyphs",2),$e([y("uint16")],Ge.prototype,"maxPoints",2),$e([y("uint16")],Ge.prototype,"maxContours",2),$e([y("uint16")],Ge.prototype,"maxComponentPoints",2),$e([y("uint16")],Ge.prototype,"maxComponentContours",2),$e([y("uint16")],Ge.prototype,"maxZones",2),$e([y("uint16")],Ge.prototype,"maxTwilightPoints",2),$e([y("uint16")],Ge.prototype,"maxStorage",2),$e([y("uint16")],Ge.prototype,"maxFunctionDefs",2),$e([y("uint16")],Ge.prototype,"maxInstructionDefs",2),$e([y("uint16")],Ge.prototype,"maxStackElements",2),$e([y("uint16")],Ge.prototype,"maxSizeOfInstructions",2),$e([y("uint16")],Ge.prototype,"maxComponentElements",2),$e([y("uint16")],Ge.prototype,"maxComponentDepth",2),Ge=$e([Ye("maxp")],Ge);var Hd=Object.defineProperty,Jd=Object.getOwnPropertyDescriptor,Hr=(r,A,e,t)=>{for(var i=t>1?void 0:t?Jd(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(t?n(A,e,i):n(i))||i);return t&&i&&Hd(A,e,i),i};const Nl={0:"copyright",1:"fontFamily",2:"fontSubFamily",3:"uniqueSubFamily",4:"fullName",5:"version",6:"postScriptName",7:"tradeMark",8:"manufacturer",9:"designer",10:"description",11:"urlOfFontVendor",12:"urlOfFontDesigner",13:"licence",14:"urlOfLicence",16:"preferredFamily",17:"preferredSubFamily",18:"compatibleFull",19:"sampleText"},Tn={Macintosh:1,Microsoft:3},Kd={Default:0},Fl={UCS2:1};let ti=class extends Ze{constructor(){super(...arguments);u(this,"_names")}get names(){return this._names??(this._names=this.readNames())}readNames(){const A=this.count;this.view.seek(6);const e=[];for(let a=0;a<A;++a)e.push({platform:this.view.readUint16(),encoding:this.view.readUint16(),language:this.view.readUint16(),nameId:this.view.readUint16(),length:this.view.readUint16(),offset:this.view.readUint16()});const t=this.stringOffset;for(let a=0;a<A;++a){const l=e[a];l.name=this.view.readBytes(t+l.offset,l.length)}let i=Tn.Macintosh,s=Kd.Default,n=0;e.some(a=>a.platform===Tn.Microsoft&&a.encoding===Fl.UCS2&&a.language===1033)&&(i=Tn.Microsoft,s=Fl.UCS2,n=1033);const o={};for(let a=0;a<A;++a){const l=e[a];l.platform===i&&l.encoding===s&&l.language===n&&Nl[l.nameId]&&(o[Nl[l.nameId]]=n===0?jf(l.name):Zf(l.name))}return o}};Hr([y("uint16")],ti.prototype,"format",2),Hr([y("uint16")],ti.prototype,"count",2),Hr([y("uint16")],ti.prototype,"stringOffset",2),ti=Hr([Ye("name")],ti);var Yd=Object.defineProperty,zd=Object.getOwnPropertyDescriptor,le=(r,A,e,t)=>{for(var i=t>1?void 0:t?zd(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(t?n(A,e,i):n(i))||i);return t&&i&&Yd(A,e,i),i};let ae=class extends Ze{get fontPANOSE(){return[this.bFamilyType,this.bSerifStyle,this.bWeight,this.bProportion,this.bContrast,this.bStrokeVariation,this.bArmStyle,this.bLetterform,this.bMidline,this.bXHeight]}};le([y("uint16")],ae.prototype,"version",2),le([y("int16")],ae.prototype,"xAvgCharWidth",2),le([y("uint16")],ae.prototype,"usWeightClass",2),le([y("uint16")],ae.prototype,"usWidthClass",2),le([y("uint16")],ae.prototype,"fsType",2),le([y("uint16")],ae.prototype,"ySubscriptXSize",2),le([y("uint16")],ae.prototype,"ySubscriptYSize",2),le([y("uint16")],ae.prototype,"ySubscriptXOffset",2),le([y("uint16")],ae.prototype,"ySubscriptYOffset",2),le([y("uint16")],ae.prototype,"ySuperscriptXSize",2),le([y("uint16")],ae.prototype,"ySuperscriptYSize",2),le([y("uint16")],ae.prototype,"ySuperscriptXOffset",2),le([y("uint16")],ae.prototype,"ySuperscriptYOffset",2),le([y("uint16")],ae.prototype,"yStrikeoutSize",2),le([y("uint16")],ae.prototype,"yStrikeoutPosition",2),le([y("uint16")],ae.prototype,"sFamilyClass",2),le([y({type:"uint8"})],ae.prototype,"bFamilyType",2),le([y({type:"uint8"})],ae.prototype,"bSerifStyle",2),le([y({type:"uint8"})],ae.prototype,"bWeight",2),le([y({type:"uint8"})],ae.prototype,"bProportion",2),le([y({type:"uint8"})],ae.prototype,"bContrast",2),le([y({type:"uint8"})],ae.prototype,"bStrokeVariation",2),le([y({type:"uint8"})],ae.prototype,"bArmStyle",2),le([y({type:"uint8"})],ae.prototype,"bLetterform",2),le([y({type:"uint8"})],ae.prototype,"bMidline",2),le([y({type:"uint8"})],ae.prototype,"bXHeight",2),le([y({type:"uint8",size:16})],ae.prototype,"ulUnicodeRange",2),le([y({type:"char",size:4})],ae.prototype,"achVendID",2),le([y("uint16")],ae.prototype,"fsSelection",2),le([y("uint16")],ae.prototype,"usFirstCharIndex",2),le([y("uint16")],ae.prototype,"usLastCharIndex",2),le([y("int16")],ae.prototype,"sTypoAscender",2),le([y("int16")],ae.prototype,"sTypoDescender",2),le([y("int16")],ae.prototype,"sTypoLineGap",2),le([y("uint16")],ae.prototype,"usWinAscent",2),le([y("uint16")],ae.prototype,"usWinDescent",2),le([y({offset:72,type:"uint8",size:8})],ae.prototype,"ulCodePageRange",2),le([y({offset:72,type:"int16"})],ae.prototype,"sxHeight",2),le([y("int16")],ae.prototype,"sCapHeight",2),le([y("uint16")],ae.prototype,"usDefaultChar",2),le([y("uint16")],ae.prototype,"usBreakChar",2),le([y("uint16")],ae.prototype,"usMaxContext",2),ae=le([Ye("OS/2","os2")],ae);var Wd=Object.defineProperty,Vd=Object.getOwnPropertyDescriptor,Nt=(r,A,e,t)=>{for(var i=t>1?void 0:t?Vd(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(t?n(A,e,i):n(i))||i);return t&&i&&Wd(A,e,i),i};let Ct=class extends Ze{constructor(r=new ArrayBuffer(32),A,e){super(r,A,e)}};Nt([y("fixed")],Ct.prototype,"format",2),Nt([y("fixed")],Ct.prototype,"italicAngle",2),Nt([y("int16")],Ct.prototype,"underlinePosition",2),Nt([y("int16")],Ct.prototype,"underlineThickness",2),Nt([y("uint32")],Ct.prototype,"isFixedPitch",2),Nt([y("uint32")],Ct.prototype,"minMemType42",2),Nt([y("uint32")],Ct.prototype,"maxMemType42",2),Nt([y("uint32")],Ct.prototype,"minMemType1",2),Nt([y("uint32")],Ct.prototype,"maxMemType1",2),Ct=Nt([Ye("post")],Ct);var qd=Object.defineProperty,Xd=Object.getOwnPropertyDescriptor,ot=(r,A,e,t)=>{for(var i=t>1?void 0:t?Xd(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(t?n(A,e,i):n(i))||i);return t&&i&&qd(A,e,i),i};let We=class extends Ze{constructor(r=new ArrayBuffer(36),A){super(r,A,Math.min(36,r.byteLength-(A??0)))}};ot([y("fixed")],We.prototype,"version",2),ot([y("int16")],We.prototype,"vertTypoAscender",2),ot([y("int16")],We.prototype,"vertTypoDescender",2),ot([y("int16")],We.prototype,"vertTypoLineGap",2),ot([y("int16")],We.prototype,"advanceHeightMax",2),ot([y("int16")],We.prototype,"minTopSideBearing",2),ot([y("int16")],We.prototype,"minBottomSideBearing",2),ot([y("int16")],We.prototype,"yMaxExtent",2),ot([y("int16")],We.prototype,"caretSlopeRise",2),ot([y("int16")],We.prototype,"caretSlopeRun",2),ot([y("int16")],We.prototype,"caretOffset",2),ot([y({type:"int16",size:4})],We.prototype,"reserved",2),ot([y("int16")],We.prototype,"metricDataFormat",2),ot([y("int16")],We.prototype,"numOfLongVerMetrics",2),We=ot([Ye("vhea")],We);var jd=Object.getOwnPropertyDescriptor,Zd=(r,A,e,t)=>{for(var i=t>1?void 0:t?jd(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};let Jr=class extends Ze{constructor(){super(...arguments);u(this,"_metrics")}static from(A){const e=A.length*4,t=new Jr(new ArrayBuffer(e));return A.forEach(i=>{t.view.writeUint16(i.advanceHeight),t.view.writeInt16(i.topSideBearing)}),t}get metrics(){return this._metrics??(this._metrics=this.readMetrics())}readMetrics(){var s;const A=this._sfnt.maxp.numGlyphs,e=((s=this._sfnt.vhea)==null?void 0:s.numOfLongVerMetrics)??0,t=this.view;t.seek(0);let i=0;return Array.from({length:A}).map((n,o)=>(o<e&&(i=t.readUint16()),{advanceHeight:i,topSideBearing:t.readUint8()}))}};Jr=Zd([Ye("vmtx")],Jr);var $d=Object.defineProperty,Zi=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&$d(A,e,i),i};class Qt extends Rr{constructor(){super(...arguments);u(this,"format","TrueType");u(this,"mimeType","font/ttf");u(this,"_sfnt")}get sfnt(){return this._sfnt||(this._sfnt=this.createSFNT()),this._sfnt}static is(e){return typeof e=="number"?this.signature.has(e):this.signature.has(jA(e).getUint32(0))}static checksum(e){const t=jA(e);let i=t.byteLength;for(;i%4;)i++;let s=0;for(let n=0,o=i/4;n<o;n+=4)n*4<i-4&&(s+=t.getUint32(n*4,!1));return s&4294967295}static from(e){const t=f=>f+3&-4,i=e.tableViews.size,s=Array.from(e.tableViews.values()).reduce((f,I)=>f+t(I.byteLength),0),n=new this(new ArrayBuffer(12+i*16+s));n.scalerType=65536,n.numTables=i;const o=Math.log(2);n.searchRange=Math.floor(Math.log(i)/o)*16,n.entrySelector=Math.floor(n.searchRange/o),n.rangeShift=i*16-n.searchRange;let a=12+i*16,l=0;const h=n.getDirectories();e.tableViews.forEach((f,I)=>{const d=h[l++];d.tag=I,d.checkSum=this.checksum(f),d.offset=a,d.length=f.byteLength,n.view.writeBytes(f,a),a+=t(d.length)});const c=n.createSFNT().head;return c.checkSumAdjustment=0,c.checkSumAdjustment=2981146554-this.checksum(n.view),n}getDirectories(){let e=this.view.byteOffset+12;return Array.from({length:this.numTables},()=>{const t=new ZA(this.view.buffer,e);return e+=t.view.byteLength,t})}createSFNT(){return new DA(this.getDirectories().reduce((e,t)=>(e[t.tag]=new DataView(this.view.buffer,this.view.byteOffset+t.offset,t.length),e),{}))}}u(Qt,"signature",new Set([65536,1953658213,1954115633])),Zi([y("uint32")],Qt.prototype,"scalerType"),Zi([y("uint16")],Qt.prototype,"numTables"),Zi([y("uint16")],Qt.prototype,"searchRange"),Zi([y("uint16")],Qt.prototype,"entrySelector"),Zi([y("uint16")],Qt.prototype,"rangeShift");class Kr extends Qt{constructor(){super(...arguments);u(this,"format","OpenType");u(this,"mimeType","font/otf")}static from(e){return super.from(e)}}u(Kr,"signature",new Set([1330926671]));var eI=Object.defineProperty,$i=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&eI(A,e,i),i};class PA extends ft{constructor(A,e){super(A,e,20)}}$i([y({type:"char",size:4})],PA.prototype,"tag"),$i([y("uint32")],PA.prototype,"offset"),$i([y("uint32")],PA.prototype,"compLength"),$i([y("uint32")],PA.prototype,"origLength"),$i([y("uint32")],PA.prototype,"origChecksum");var tI=Object.defineProperty,dt=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&tI(A,e,i),i};const ct=(CA=class extends Rr{constructor(){super(...arguments);u(this,"format","WOFF");u(this,"mimeType","font/woff");u(this,"_sfnt")}get subfontFormat(){return Qt.is(this.flavor)?"TrueType":Kr.is(this.flavor)?"OpenType":"Open"}get sfnt(){return this._sfnt||(this._sfnt=this.createSFNT()),this._sfnt}static is(e){return typeof e=="number"?this.signature.has(e):this.signature.has(jA(e).getUint32(0))}static checkSum(e){const t=jA(e),i=t.byteLength,s=Math.floor(i/4);let n=0,o=0;for(;o<s;)n+=t.getUint32(4*o++,!1);let a=i-s*4;if(a){let l=s*4;for(;a>0;)n+=t.getUint8(l)<<a*8,l++,a--}return n%4294967296}static from(e,t=new ArrayBuffer(0)){const i=f=>f+3&-4,s=[];e.tableViews.forEach((f,I)=>{const d=jA(Kf(new Uint8Array(f.buffer,f.byteOffset,f.byteLength)));s.push({tag:I,view:d.byteLength<f.byteLength?d:f,rawView:f})});const n=s.length,o=s.reduce((f,I)=>f+i(I.view.byteLength),0),a=new CA(new ArrayBuffer(44+20*n+o+t.byteLength));a.signature=2001684038,a.flavor=65536,a.length=a.view.byteLength,a.numTables=n,a.totalSFNTSize=12+16*n+s.reduce((f,I)=>f+i(I.rawView.byteLength),0);let l=44+n*20,h=0;const c=a.getDirectories();return s.forEach(f=>{const I=c[h++];I.tag=f.tag,I.offset=l,I.compLength=f.view.byteLength,I.origChecksum=CA.checkSum(f.rawView),I.origLength=f.rawView.byteLength,a.view.writeBytes(f.view,l),l+=i(I.compLength)}),a.view.writeBytes(t),a}getDirectories(){let e=44;return Array.from({length:this.numTables},()=>{const t=new PA(this.view.buffer,e);return e+=t.view.byteLength,t})}createSFNT(){return new DA(this.getDirectories().reduce((e,t)=>{const i=t.tag,s=this.view.byteOffset+t.offset,n=t.compLength,o=t.origLength,a=s+n;return e[i]=n>=o?new DataView(this.view.buffer,s,n):new DataView(Yf(new Uint8Array(this.view.buffer.slice(s,a))).buffer),e},{}))}},u(CA,"signature",new Set([2001684038])),CA);dt([y("uint32")],ct.prototype,"signature"),dt([y("uint32")],ct.prototype,"flavor"),dt([y("uint32")],ct.prototype,"length"),dt([y("uint16")],ct.prototype,"numTables"),dt([y("uint16")],ct.prototype,"reserved"),dt([y("uint32")],ct.prototype,"totalSFNTSize"),dt([y("uint16")],ct.prototype,"majorVersion"),dt([y("uint16")],ct.prototype,"minorVersion"),dt([y("uint32")],ct.prototype,"metaOffset"),dt([y("uint32")],ct.prototype,"metaLength"),dt([y("uint32")],ct.prototype,"metaOrigLength"),dt([y("uint32")],ct.prototype,"privOffset"),dt([y("uint32")],ct.prototype,"privLength");let Yr=ct;function Tl(r,A=!0){if(Qt.is(r))return new Qt(r);if(Kr.is(r))return new Kr(r);if(Yr.is(r))return new Yr(r);if(A)throw new Error("Failed to parseFont")}function Gl(r,A=!0){const e=Tl(r,!1);if(e)return e;if(A)throw new Error("Failed to parseFont")}const os=class os{constructor(){u(this,"fallbackFont");u(this,"loading",new Map);u(this,"loaded",new Map);u(this,"familyToUrl",new Map)}setFallbackFont(A){this.fallbackFont=A}async loadFallbackFont(A,e={}){this.fallbackFont=await this.load(A,e)}_createRequest(A,e){const t=new AbortController;return{url:A,when:fetch(A,{...os.defaultRequestInit,...e,signal:t.signal}).then(i=>i.arrayBuffer()),cancel:()=>t.abort()}}injectFontFace(A,e){return document.fonts.add(new FontFace(A,e)),this}injectStyleTag(A,e){const t=document.createElement("style");return t.appendChild(document.createTextNode(`@font-face {
857
+ }`})),Ti([S()],g.ZoomBlurEffect.prototype,"center",2),Ti([S({default:20})],g.ZoomBlurEffect.prototype,"innerRadius",2),Ti([S({default:-1})],g.ZoomBlurEffect.prototype,"radius",2),Ti([S({default:.1})],g.ZoomBlurEffect.prototype,"strength",2),g.ZoomBlurEffect=Ti([ne("ZoomBlurEffect")],g.ZoomBlurEffect);var wf=Object.defineProperty,kt=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&wf(A,e,i),i};class it extends rA{constructor(e){super();u(this,"_texture");this.parent=e}_setProperties(e){return super.setProperties(e)}setProperties(e){return this._setProperties(he(e)?void 0:mA(e))}_updateProperty(e,t,i,s){switch(super._updateProperty(e,t,i,s),e){case"color":case"cropRect":case"stretchRect":case"dpi":case"rotateWithShape":case"tile":case"opacity":this.parent.requestRedraw();break;case"image":case"linearGradient":case"radialGradient":this._updateTexture();break}}async loadTexture(){return this.linearGradient||this.radialGradient?new Br(this.linearGradient??this.radialGradient,this.parent.size.width,this.parent.size.height):he(this.image)?void 0:await Gt.texture.load(this.image)}async _updateTexture(){this._texture=await this.loadTexture(),this.parent.requestRedraw()}canDraw(){return!!(this._texture||this.color)}_getDrawOptions(){let e=!1;const{width:t,height:i}=this.parent.size,s=new Et().scale(1/t,1/i);if(this.cropRect){const{left:n=0,top:o=0,right:a=0,bottom:l=0}=this.cropRect;s.scale(Math.abs(1-(n+a)),Math.abs(1-(o+l))).translate(n,o),e=!0}if(this.tile){const{translateX:n=0,translateY:o=0,scaleX:a=1,scaleY:l=1}=this.tile;s.translate(-n/t,-o/i).scale(1/a,1/l),e=!0}else if(this.stretchRect){const{left:n=0,top:o=0,right:a=0,bottom:l=0}=this.stretchRect;s.scale(Math.abs(1-(-n+-a)),Math.abs(1-(-o+-l))).translate(-n,-o),e=!0}return{disableWrapMode:e,textureTransform:s}}draw(){const e=this.parent.context,{textureTransform:t,disableWrapMode:i}=this._getDrawOptions();e.textureTransform=t,e.fillStyle=this._texture??this.color,e.fill({disableWrapMode:i})}}kt([S()],it.prototype,"color"),kt([S()],it.prototype,"image"),kt([S()],it.prototype,"linearGradient"),kt([S()],it.prototype,"radialGradient"),kt([S()],it.prototype,"cropRect"),kt([S()],it.prototype,"stretchRect"),kt([S()],it.prototype,"dpi"),kt([S()],it.prototype,"rotateWithShape"),kt([S()],it.prototype,"tile"),kt([S()],it.prototype,"opacity");var vf=Object.defineProperty,_f=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&vf(A,e,i),i};class un extends it{setProperties(A){return super._setProperties(he(A)?void 0:Cc(A))}}_f([S()],un.prototype,"fillWithShape");var bf=Object.defineProperty,Df=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&bf(A,e,i),i};class fn extends it{setProperties(A){return super._setProperties(he(A)?void 0:Qc(A))}}Df([S()],fn.prototype,"fillWithShape");var xf=Object.defineProperty,dn=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&xf(A,e,i),i};class Gi extends it{setProperties(A){return super._setProperties(he(A)?void 0:yc(A))}_updateProperty(A,e,t,i){switch(super._updateProperty(A,e,t,i),A){case"width":case"style":this.parent.requestRedraw();break}}canDraw(){return!!(this.width||super.canDraw())}draw(){const A=this.parent.context,{textureTransform:e,disableWrapMode:t}=this._getDrawOptions();A.lineWidth=this.width,A.textureTransform=e,A.strokeStyle=this._texture??this.color,A.stroke({disableWrapMode:t})}}dn([S({default:0})],Gi.prototype,"color"),dn([S({default:0})],Gi.prototype,"width"),dn([S({default:"solid"})],Gi.prototype,"style");var Sf=Object.defineProperty,br=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&Sf(A,e,i),i};class VA extends rA{constructor(A){super(),this.parent=A}setProperties(A){return super.setProperties(he(A)?void 0:mc(A))}_updateProperty(A,e,t,i){switch(super._updateProperty(A,e,t,i),A){case"color":case"blur":case"offsetX":case"offsetY":this.updateEffect();break}}updateEffect(){const A="__$shadow";let e=this.parent.getNode(A);this.blur||this.offsetX||this.offsetY?(e||(e=new g.DropShadowEffect({name:A}),this.parent.appendChild(e,"back")),e.setProperties(this.getProperties())):e&&this.parent.removeChild(e)}}br([S({default:"#000000"})],VA.prototype,"color"),br([S({default:0})],VA.prototype,"blur"),br([S({default:0})],VA.prototype,"offsetY"),br([S({default:0})],VA.prototype,"offsetX");var Mf=Object.defineProperty,Dr=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&Mf(A,e,i),i};class qA extends rA{constructor(e){super();u(this,"_path2DSet",new oA);this.parent=e,this._updatePath2DSet()}setProperties(e){return super.setProperties(he(e)?void 0:vc(e))}_updateProperty(e,t,i,s){switch(super._updateProperty(e,t,i,s),e){case"svg":case"paths":case"viewBox":this._updatePath2DSet(),this.parent.requestRedraw();break}}_updatePath2DSet(){var o;let e;if(this.svg){const a=on(this.svg);this._path2DSet=ln(a),e=this._path2DSet.viewBox??this.viewBox}else e=this.viewBox,(o=this.paths)==null||o.forEach((a,l)=>{const{data:h,...c}=a,f=new Ne;f.style=c,f.addData(h),this._path2DSet.paths[l]=f});const[t,i,s,n]=e;this._path2DSet.paths.forEach(a=>{a.applyTransform(new Ke().translate(-t,-i).scale(1/s,1/n))})}draw(){if(this._path2DSet.paths.length){const e=this.parent.context,{width:t,height:i}=this.parent.size;this._path2DSet.paths.forEach(s=>{e.addPath(s.clone().applyTransform(new Ke().scale(t,i)))})}else this.drawRect()}drawRect(){const e=this.parent.context,{width:t,height:i}=this.parent.size,{borderRadius:s}=this.parent.style;t&&i&&(s?e.roundRect(0,0,t,i,s):e.rect(0,0,t,i))}}Dr([S()],qA.prototype,"preset"),Dr([S()],qA.prototype,"svg"),Dr([S({default:()=>[0,0,1,1]})],qA.prototype,"viewBox"),Dr([S({default:()=>[]})],qA.prototype,"paths");class Li extends Yt{constructor(A){super(),this.setProperties(A)}}const XA=Yo();delete XA.top,delete XA.left,delete XA.width,delete XA.height;for(const r in XA)Qi(Li,r,{default:XA[r]});var qe=Uint8Array,ut=Uint16Array,In=Int32Array,xr=new qe([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,0,0,0]),Sr=new qe([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,0,0]),pn=new qe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Bl=function(r,A){for(var e=new ut(31),t=0;t<31;++t)e[t]=A+=1<<r[t-1];for(var i=new In(e[30]),t=1;t<30;++t)for(var s=e[t];s<e[t+1];++s)i[s]=s-e[t]<<5|t;return{b:e,r:i}},Cl=Bl(xr,2),Ql=Cl.b,En=Cl.r;Ql[28]=258,En[258]=28;for(var yl=Bl(Sr,0),Rf=yl.b,ml=yl.r,Bn=new ut(32768),Qe=0;Qe<32768;++Qe){var hA=(Qe&43690)>>1|(Qe&21845)<<1;hA=(hA&52428)>>2|(hA&13107)<<2,hA=(hA&61680)>>4|(hA&3855)<<4,Bn[Qe]=((hA&65280)>>8|(hA&255)<<8)>>1}for(var Ut=function(r,A,e){for(var t=r.length,i=0,s=new ut(A);i<t;++i)r[i]&&++s[r[i]-1];var n=new ut(A);for(i=1;i<A;++i)n[i]=n[i-1]+s[i-1]<<1;var o;if(e){o=new ut(1<<A);var a=15-A;for(i=0;i<t;++i)if(r[i])for(var l=i<<4|r[i],h=A-r[i],c=n[r[i]-1]++<<h,f=c|(1<<h)-1;c<=f;++c)o[Bn[c]>>a]=l}else for(o=new ut(t),i=0;i<t;++i)r[i]&&(o[i]=Bn[n[r[i]-1]++]>>15-r[i]);return o},cA=new qe(288),Qe=0;Qe<144;++Qe)cA[Qe]=8;for(var Qe=144;Qe<256;++Qe)cA[Qe]=9;for(var Qe=256;Qe<280;++Qe)cA[Qe]=7;for(var Qe=280;Qe<288;++Qe)cA[Qe]=8;for(var Oi=new qe(32),Qe=0;Qe<32;++Qe)Oi[Qe]=5;var Pf=Ut(cA,9,0),kf=Ut(cA,9,1),Uf=Ut(Oi,5,0),Nf=Ut(Oi,5,1),Cn=function(r){for(var A=r[0],e=1;e<r.length;++e)r[e]>A&&(A=r[e]);return A},vt=function(r,A,e){var t=A/8|0;return(r[t]|r[t+1]<<8)>>(A&7)&e},Qn=function(r,A){var e=A/8|0;return(r[e]|r[e+1]<<8|r[e+2]<<16)>>(A&7)},yn=function(r){return(r+7)/8|0},wl=function(r,A,e){return(e==null||e>r.length)&&(e=r.length),new qe(r.subarray(A,e))},Ff=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],_t=function(r,A,e){var t=new Error(A||Ff[r]);if(t.code=r,Error.captureStackTrace&&Error.captureStackTrace(t,_t),!e)throw t;return t},Tf=function(r,A,e,t){var i=r.length,s=0;if(!i||A.f&&!A.l)return e||new qe(0);var n=!e,o=n||A.i!=2,a=A.i;n&&(e=new qe(i*3));var l=function(He){var ge=e.length;if(He>ge){var we=new qe(Math.max(ge*2,He));we.set(e),e=we}},h=A.f||0,c=A.p||0,f=A.b||0,I=A.l,d=A.d,C=A.m,p=A.n,M=i*8;do{if(!I){h=vt(r,c,1);var P=vt(r,c+1,3);if(c+=3,P)if(P==1)I=kf,d=Nf,C=9,p=5;else if(P==2){var m=vt(r,c,31)+257,b=vt(r,c+10,15)+4,D=m+vt(r,c+5,31)+1;c+=14;for(var z=new qe(D),Ae=new qe(19),V=0;V<b;++V)Ae[pn[V]]=vt(r,c+V*3,7);c+=b*3;for(var K=Cn(Ae),te=(1<<K)-1,W=Ut(Ae,K,1),V=0;V<D;){var L=W[vt(r,c,te)];c+=L&15;var w=L>>4;if(w<16)z[V++]=w;else{var se=0,H=0;for(w==16?(H=3+vt(r,c,3),c+=2,se=z[V-1]):w==17?(H=3+vt(r,c,7),c+=3):w==18&&(H=11+vt(r,c,127),c+=7);H--;)z[V++]=se}}var q=z.subarray(0,m),ie=z.subarray(m);C=Cn(q),p=Cn(ie),I=Ut(q,C,1),d=Ut(ie,p,1)}else _t(1);else{var w=yn(c)+4,R=r[w-4]|r[w-3]<<8,_=w+R;if(_>i){a&&_t(0);break}o&&l(f+R),e.set(r.subarray(w,_),f),A.b=f+=R,A.p=c=_*8,A.f=h;continue}if(c>M){a&&_t(0);break}}o&&l(f+131072);for(var J=(1<<C)-1,$=(1<<p)-1,N=c;;N=c){var se=I[Qn(r,c)&J],U=se>>4;if(c+=se&15,c>M){a&&_t(0);break}if(se||_t(2),U<256)e[f++]=U;else if(U==256){N=c,I=null;break}else{var X=U-254;if(U>264){var V=U-257,ee=xr[V];X=vt(r,c,(1<<ee)-1)+Ql[V],c+=ee}var oe=d[Qn(r,c)&$],j=oe>>4;oe||_t(3),c+=oe&15;var ie=Rf[j];if(j>3){var ee=Sr[j];ie+=Qn(r,c)&(1<<ee)-1,c+=ee}if(c>M){a&&_t(0);break}o&&l(f+131072);var pe=f+X;if(f<ie){var at=s-ie,lt=Math.min(ie,pe);for(at+f<0&&_t(3);f<lt;++f)e[f]=t[at+f]}for(;f<pe;++f)e[f]=e[f-ie]}}A.l=I,A.p=N,A.b=f,A.f=h,I&&(h=1,A.m=C,A.d=d,A.n=p)}while(!h);return f!=e.length&&n?wl(e,0,f):e.subarray(0,f)},Zt=function(r,A,e){e<<=A&7;var t=A/8|0;r[t]|=e,r[t+1]|=e>>8},Hi=function(r,A,e){e<<=A&7;var t=A/8|0;r[t]|=e,r[t+1]|=e>>8,r[t+2]|=e>>16},mn=function(r,A){for(var e=[],t=0;t<r.length;++t)r[t]&&e.push({s:t,f:r[t]});var i=e.length,s=e.slice();if(!i)return{t:Dl,l:0};if(i==1){var n=new qe(e[0].s+1);return n[e[0].s]=1,{t:n,l:1}}e.sort(function(_,m){return _.f-m.f}),e.push({s:-1,f:25001});var o=e[0],a=e[1],l=0,h=1,c=2;for(e[0]={s:-1,f:o.f+a.f,l:o,r:a};h!=i-1;)o=e[e[l].f<e[c].f?l++:c++],a=e[l!=h&&e[l].f<e[c].f?l++:c++],e[h++]={s:-1,f:o.f+a.f,l:o,r:a};for(var f=s[0].s,t=1;t<i;++t)s[t].s>f&&(f=s[t].s);var I=new ut(f+1),d=wn(e[h-1],I,0);if(d>A){var t=0,C=0,p=d-A,M=1<<p;for(s.sort(function(m,b){return I[b.s]-I[m.s]||m.f-b.f});t<i;++t){var P=s[t].s;if(I[P]>A)C+=M-(1<<d-I[P]),I[P]=A;else break}for(C>>=p;C>0;){var w=s[t].s;I[w]<A?C-=1<<A-I[w]++-1:++t}for(;t>=0&&C;--t){var R=s[t].s;I[R]==A&&(--I[R],++C)}d=A}return{t:new qe(I),l:d}},wn=function(r,A,e){return r.s==-1?Math.max(wn(r.l,A,e+1),wn(r.r,A,e+1)):A[r.s]=e},vl=function(r){for(var A=r.length;A&&!r[--A];);for(var e=new ut(++A),t=0,i=r[0],s=1,n=function(a){e[t++]=a},o=1;o<=A;++o)if(r[o]==i&&o!=A)++s;else{if(!i&&s>2){for(;s>138;s-=138)n(32754);s>2&&(n(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(n(i),--s;s>6;s-=6)n(8304);s>2&&(n(s-3<<5|8208),s=0)}for(;s--;)n(i);s=1,i=r[o]}return{c:e.subarray(0,t),n:A}},Ji=function(r,A){for(var e=0,t=0;t<A.length;++t)e+=r[t]*A[t];return e},_l=function(r,A,e){var t=e.length,i=yn(A+2);r[i]=t&255,r[i+1]=t>>8,r[i+2]=r[i]^255,r[i+3]=r[i+1]^255;for(var s=0;s<t;++s)r[i+s+4]=e[s];return(i+4+t)*8},bl=function(r,A,e,t,i,s,n,o,a,l,h){Zt(A,h++,e),++i[256];for(var c=mn(i,15),f=c.t,I=c.l,d=mn(s,15),C=d.t,p=d.l,M=vl(f),P=M.c,w=M.n,R=vl(C),_=R.c,m=R.n,b=new ut(19),D=0;D<P.length;++D)++b[P[D]&31];for(var D=0;D<_.length;++D)++b[_[D]&31];for(var z=mn(b,7),Ae=z.t,V=z.l,K=19;K>4&&!Ae[pn[K-1]];--K);var te=l+5<<3,W=Ji(i,cA)+Ji(s,Oi)+n,L=Ji(i,f)+Ji(s,C)+n+14+3*K+Ji(b,Ae)+2*b[16]+3*b[17]+7*b[18];if(a>=0&&te<=W&&te<=L)return _l(A,h,r.subarray(a,a+l));var se,H,q,ie;if(Zt(A,h,1+(L<W)),h+=2,L<W){se=Ut(f,I,0),H=f,q=Ut(C,p,0),ie=C;var J=Ut(Ae,V,0);Zt(A,h,w-257),Zt(A,h+5,m-1),Zt(A,h+10,K-4),h+=14;for(var D=0;D<K;++D)Zt(A,h+3*D,Ae[pn[D]]);h+=3*K;for(var $=[P,_],N=0;N<2;++N)for(var U=$[N],D=0;D<U.length;++D){var X=U[D]&31;Zt(A,h,J[X]),h+=Ae[X],X>15&&(Zt(A,h,U[D]>>5&127),h+=U[D]>>12)}}else se=Pf,H=cA,q=Uf,ie=Oi;for(var D=0;D<o;++D){var ee=t[D];if(ee>255){var X=ee>>18&31;Hi(A,h,se[X+257]),h+=H[X+257],X>7&&(Zt(A,h,ee>>23&31),h+=xr[X]);var oe=ee&31;Hi(A,h,q[oe]),h+=ie[oe],oe>3&&(Hi(A,h,ee>>5&8191),h+=Sr[oe])}else Hi(A,h,se[ee]),h+=H[ee]}return Hi(A,h,se[256]),h+H[256]},Gf=new In([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Dl=new qe(0),Lf=function(r,A,e,t,i,s){var n=s.z||r.length,o=new qe(t+n+5*(1+Math.ceil(n/7e3))+i),a=o.subarray(t,o.length-i),l=s.l,h=(s.r||0)&7;if(A){h&&(a[0]=s.r>>3);for(var c=Gf[A-1],f=c>>13,I=c&8191,d=(1<<e)-1,C=s.p||new ut(32768),p=s.h||new ut(d+1),M=Math.ceil(e/3),P=2*M,w=function(Je){return(r[Je]^r[Je+1]<<M^r[Je+2]<<P)&d},R=new In(25e3),_=new ut(288),m=new ut(32),b=0,D=0,z=s.i||0,Ae=0,V=s.w||0,K=0;z+2<n;++z){var te=w(z),W=z&32767,L=p[te];if(C[W]=L,p[te]=W,V<=z){var se=n-z;if((b>7e3||Ae>24576)&&(se>423||!l)){h=bl(r,a,0,R,_,m,D,Ae,K,z-K,h),Ae=b=D=0,K=z;for(var H=0;H<286;++H)_[H]=0;for(var H=0;H<30;++H)m[H]=0}var q=2,ie=0,J=I,$=W-L&32767;if(se>2&&te==w(z-$))for(var N=Math.min(f,se)-1,U=Math.min(32767,z),X=Math.min(258,se);$<=U&&--J&&W!=L;){if(r[z+q]==r[z+q-$]){for(var ee=0;ee<X&&r[z+ee]==r[z+ee-$];++ee);if(ee>q){if(q=ee,ie=$,ee>N)break;for(var oe=Math.min($,ee-2),j=0,H=0;H<oe;++H){var pe=z-$+H&32767,at=C[pe],lt=pe-at&32767;lt>j&&(j=lt,L=pe)}}}W=L,L=C[W],$+=W-L&32767}if(ie){R[Ae++]=268435456|En[q]<<18|ml[ie];var He=En[q]&31,ge=ml[ie]&31;D+=xr[He]+Sr[ge],++_[257+He],++m[ge],V=z+q,++b}else R[Ae++]=r[z],++_[r[z]]}}for(z=Math.max(z,V);z<n;++z)R[Ae++]=r[z],++_[r[z]];h=bl(r,a,l,R,_,m,D,Ae,K,z-K,h),l||(s.r=h&7|a[h/8|0]<<3,h-=7,s.h=p,s.p=C,s.i=z,s.w=V)}else{for(var z=s.w||0;z<n+l;z+=65535){var we=z+65535;we>=n&&(a[h/8|0]=l,we=n),h=_l(a,h+1,r.subarray(z,we))}s.i=n}return wl(o,0,t+yn(h)+i)},xl=function(){var r=1,A=0;return{p:function(e){for(var t=r,i=A,s=e.length|0,n=0;n!=s;){for(var o=Math.min(n+2655,s);n<o;++n)i+=t+=e[n];t=(t&65535)+15*(t>>16),i=(i&65535)+15*(i>>16)}r=t,A=i},d:function(){return r%=65521,A%=65521,(r&255)<<24|(r&65280)<<8|(A&255)<<8|A>>8}}},Of=function(r,A,e,t,i){if(!i&&(i={l:1},A.dictionary)){var s=A.dictionary.subarray(-32768),n=new qe(s.length+r.length);n.set(s),n.set(r,s.length),r=n,i.w=s.length}return Lf(r,A.level==null?6:A.level,A.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):20:12+A.mem,e,t,i)},Sl=function(r,A,e){for(;e;++A)r[A]=e,e>>>=8},Hf=function(r,A){var e=A.level,t=e==0?0:e<6?1:e==9?3:2;if(r[0]=120,r[1]=t<<6|(A.dictionary&&32),r[1]|=31-(r[0]<<8|r[1])%31,A.dictionary){var i=xl();i.p(A.dictionary),Sl(r,2,i.d())}},Jf=function(r,A){return((r[0]&15)!=8||r[0]>>4>7||(r[0]<<8|r[1])%31)&&_t(6,"invalid zlib data"),(r[1]>>5&1)==1&&_t(6,"invalid zlib data: "+(r[1]&32?"need":"unexpected")+" dictionary"),(r[1]>>3&4)+2};function Kf(r,A){A||(A={});var e=xl();e.p(r);var t=Of(r,A,A.dictionary?6:2,4);return Hf(t,A),Sl(t,t.length-4,e.d()),t}function Yf(r,A){return Tf(r.subarray(Jf(r),-4),{i:2},A,A)}var zf=typeof TextDecoder<"u"&&new TextDecoder,Wf=0;try{zf.decode(Dl,{stream:!0}),Wf=1}catch{}const Vf="modern-font";function Ki(r,A){if(!r)throw new Error(`[${Vf}] ${A}`)}function qf(r){if("buffer"in r){const A=r.buffer;return r.byteOffset>0||r.byteLength<r.buffer.byteLength?A.slice(r.byteOffset,r.byteOffset+r.byteLength):A}else return r}function jA(r){return"buffer"in r?new DataView(r.buffer,r.byteOffset,r.byteLength):new DataView(r)}function Xf(r){let A="";for(let e=0,t=r.length,i;e<t;e++)i=r.charCodeAt(e),i!==0&&(A+=String.fromCharCode(i));return A}function Mr(r){r=Xf(r);const A=[];for(let e=0,t=r.length,i;e<t;e++)i=r.charCodeAt(e),A.push(i>>8),A.push(i&255);return A}function jf(r){let A="";for(let e=0,t=r.length;e<t;e++)r[e]<127?A+=String.fromCharCode(r[e]):A+=`%${(256+r[e]).toString(16).slice(1)}`;return unescape(A)}function Zf(r){let A="";for(let e=0,t=r.length;e<t;e+=2)A+=String.fromCharCode((r[e]<<8)+r[e+1]);return A}var $f=Object.defineProperty,Xe=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&$f(A,e,i),i};const Yi={int8:1,int16:2,int32:4,uint8:1,uint16:2,uint32:4,float32:4,float64:8,fixed:4,longDateTime:8,char:1};function je(){return function(r,A){Object.defineProperty(r.constructor.prototype,A,{get(){if(typeof A=="string"){if(A.startsWith("read"))return(...e)=>this.read(A.substring(4).toLowerCase(),...e);if(A.startsWith("write"))return(...e)=>this.write(A.substring(5).toLowerCase(),...e)}},configurable:!0,enumerable:!0})}}class Fe extends DataView{constructor(e,t,i,s){super(qf(e),t,i);u(this,"cursor",0);this.littleEndian=s}readColumn(e){if(e.size){const t=Array.from({length:e.size},(i,s)=>this.read(e.type,e.offset+s));switch(e.type){case"char":return t.join("");default:return t}}else return this.read(e.type,e.offset)}writeColumn(e,t){e.size?Array.from({length:e.size},(i,s)=>{this.write(e.type,t[s],e.offset+s)}):this.write(e.type,t,e.offset)}read(e,t=this.cursor,i=this.littleEndian){var l;switch(e){case"char":return this.readChar(t);case"fixed":return this.readFixed(t,i);case"longDateTime":return this.readLongDateTime(t,i)}const s=`get${e.replace(/^\S/,h=>h.toUpperCase())}`,n=this,o=(l=n[s])==null?void 0:l.bind(n),a=o==null?void 0:o(t,i);return this.cursor+=Yi[e],a}readUint24(e=this.cursor){const[t,i,s]=this.readBytes(e,3);return(t<<16)+(i<<8)+s}readBytes(e,t){t==null&&(t=e,e=this.cursor);const i=[];for(let s=0;s<t;++s)i.push(this.getUint8(e+s));return this.cursor=e+t,i}readString(e,t){const i=this.readBytes(e,t);let s="";for(let n=0,o=i.length;n<o;n++)s+=String.fromCharCode(i[n]);return s}readFixed(e,t){const i=this.readInt32(e,t)/65536;return Math.ceil(i*1e5)/1e5}readLongDateTime(e=this.cursor,t){const i=this.readUint32(e+4,t),s=new Date;return s.setTime(i*1e3+-20775456e5),s}readChar(e){return this.readString(e,1)}write(e,t,i=this.cursor,s=this.littleEndian){var h;switch(e){case"char":return this.writeChar(t,i);case"fixed":return this.writeFixed(t,i);case"longDateTime":return this.writeLongDateTime(t,i)}const n=`set${e.replace(/^\S/,c=>c.toUpperCase())}`,o=this,a=(h=o[n])==null?void 0:h.bind(o),l=a==null?void 0:a(i,t,s);return this.cursor+=Yi[e.toLowerCase()],l}writeString(e="",t=this.cursor){const i=e.replace(/[^\x00-\xFF]/g,"11").length;this.seek(t);for(let s=0,n=e.length,o;s<n;++s)o=e.charCodeAt(s)||0,o>127?this.writeUint16(o):this.writeUint8(o);return this.cursor+=i,this}writeChar(e,t){return this.writeString(e,t)}writeFixed(e,t){return this.writeInt32(Math.round(e*65536),t),this}writeLongDateTime(e,t=this.cursor){typeof e>"u"?e=-20775456e5:typeof e.getTime=="function"?e=e.getTime():/^\d+$/.test(e)?e=+e:e=Date.parse(e);const s=Math.round((e- -20775456e5)/1e3);return this.writeUint32(0,t),this.writeUint32(s,t+4),this}writeBytes(e,t=this.cursor){let i;if(Array.isArray(e)){i=e.length;for(let s=0;s<i;++s)this.setUint8(t+s,e[s])}else{const s=jA(e);i=s.byteLength;for(let n=0;n<i;++n)this.setUint8(t+n,s.getUint8(n))}return this.cursor=t+i,this}seek(e){return this.cursor=e,this}}Xe([je()],Fe.prototype,"readInt8"),Xe([je()],Fe.prototype,"readInt16"),Xe([je()],Fe.prototype,"readInt32"),Xe([je()],Fe.prototype,"readUint8"),Xe([je()],Fe.prototype,"readUint16"),Xe([je()],Fe.prototype,"readUint32"),Xe([je()],Fe.prototype,"readFloat32"),Xe([je()],Fe.prototype,"readFloat64"),Xe([je()],Fe.prototype,"writeInt8"),Xe([je()],Fe.prototype,"writeInt16"),Xe([je()],Fe.prototype,"writeInt32"),Xe([je()],Fe.prototype,"writeUint8"),Xe([je()],Fe.prototype,"writeUint16"),Xe([je()],Fe.prototype,"writeUint32"),Xe([je()],Fe.prototype,"writeFloat32"),Xe([je()],Fe.prototype,"writeFloat64");const Ml=new WeakMap;function y(r){const A=typeof r=="object"?r:{type:r},{size:e=1,type:t}=A;return(i,s)=>{if(typeof s!="string")return;let n=Ml.get(i);n||(n={columns:[],byteLength:0},Ml.set(i,n));const o={...A,name:s,byteLength:e*Yi[t],offset:A.offset??n.columns.reduce((a,l)=>a+l.byteLength,0)};n.columns.push(o),n.byteLength=n.columns.reduce((a,l)=>a+Yi[l.type]*(l.size??1),0),Object.defineProperty(i.constructor.prototype,s,{get(){return this.view.readColumn(o)},set(a){this.view.writeColumn(o,a)},configurable:!0,enumerable:!0})}}class ft{constructor(A,e,t,i){u(this,"view");this.view=new Fe(A,e,t,i)}}class Rr extends ft{get buffer(){return this.view.buffer}toBuffer(){return this.view.buffer.slice(this.view.byteOffset,this.view.byteOffset+this.view.byteLength)}toBlob(){return new Blob([new Uint8Array(this.view.buffer,this.view.byteOffset,this.view.byteLength)],{type:this.mimeType})}toFontFace(A){return new FontFace(A,this.view.buffer)}}var ed=Object.defineProperty,rt=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&ed(A,e,i),i};const st=class Uh extends Rr{constructor(){super(...arguments);u(this,"format","EmbeddedOpenType");u(this,"mimeType","application/vnd.ms-fontobject")}static from(e){const t=e.sfnt,s=t.name.names,n=Mr(s.fontFamily||""),o=n.length,a=Mr(s.fontStyle||""),l=a.length,h=Mr(s.version||""),c=h.length,f=Mr(s.fullName||""),I=f.length,d=86+o+4+l+4+c+4+I+2+e.view.byteLength,C=new Uh(new ArrayBuffer(d),0,d,!0);C.EOTSize=C.view.byteLength,C.FontDataSize=e.view.byteLength,C.Version=131073,C.Flags=0,C.Charset=1,C.MagicNumber=20556,C.Padding1=0,C.CheckSumAdjustment=t.head.checkSumAdjustment;const p=t.os2;return p&&(C.FontPANOSE=p.fontPANOSE,C.Italic=p.fsSelection,C.Weight=p.usWeightClass,C.fsType=p.fsType,C.UnicodeRange=p.ulUnicodeRange,C.CodePageRange=p.ulCodePageRange),C.view.writeUint16(o),C.view.writeBytes(n),C.view.writeUint16(0),C.view.writeUint16(l),C.view.writeBytes(a),C.view.writeUint16(0),C.view.writeUint16(c),C.view.writeBytes(h),C.view.writeUint16(0),C.view.writeUint16(I),C.view.writeBytes(f),C.view.writeUint16(0),C.view.writeUint16(0),C.view.writeBytes(e.view),C}};rt([y("uint32")],st.prototype,"EOTSize"),rt([y("uint32")],st.prototype,"FontDataSize"),rt([y("uint32")],st.prototype,"Version"),rt([y("uint32")],st.prototype,"Flags"),rt([y({type:"uint8",size:10})],st.prototype,"FontPANOSE"),rt([y("uint8")],st.prototype,"Charset"),rt([y("uint8")],st.prototype,"Italic"),rt([y("uint32")],st.prototype,"Weight"),rt([y("uint16")],st.prototype,"fsType"),rt([y("uint16")],st.prototype,"MagicNumber"),rt([y({type:"uint8",size:16})],st.prototype,"UnicodeRange"),rt([y({type:"uint8",size:8})],st.prototype,"CodePageRange"),rt([y("uint32")],st.prototype,"CheckSumAdjustment"),rt([y({type:"uint8",size:16})],st.prototype,"Reserved"),rt([y("uint16")],st.prototype,"Padding1");var td=Object.defineProperty,Pr=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&td(A,e,i),i};class ZA extends ft{constructor(A,e){super(A,e,16)}}Pr([y({type:"char",size:4})],ZA.prototype,"tag"),Pr([y("uint32")],ZA.prototype,"checkSum"),Pr([y("uint32")],ZA.prototype,"offset"),Pr([y("uint32")],ZA.prototype,"length");const vn=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls"],Ad=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"];class _n{constructor(A){u(this,"index");u(this,"name");u(this,"isComposite",!1);u(this,"components",[]);u(this,"pathCommands",[]);const e={...A};if(this.index=e.index??0,e.name===".notdef"?e.unicode=void 0:e.name===".null"&&(e.unicode=0),e.unicode===0&&e.name!==".null")throw new Error('The unicode value "0" is reserved for the glyph name ".null" and cannot be used by any other glyph.');this.name=e.name??null,e.unicode&&(this.unicode=e.unicode),e.unicodes?this.unicodes=e.unicodes:e.unicode&&(this.unicodes=[e.unicode])}getPathCommands(A=0,e=0,t=72,i={},s){const n=1/((s==null?void 0:s.unitsPerEm)??1e3)*t,{xScale:o=n,yScale:a=n}=i,l=this.pathCommands,h=[];for(let c=0,f=l.length;c<f;c+=1){const I=l[c];I.type==="M"?h.push({type:"M",x:A+I.x*o,y:e+-I.y*a}):I.type==="L"?h.push({type:"L",x:A+I.x*o,y:e+-I.y*a}):I.type==="Q"?h.push({type:"Q",x1:A+I.x1*o,y1:e+-I.y1*a,x:A+I.x*o,y:e+-I.y*a}):I.type==="C"?h.push({type:"C",x1:A+I.x1*o,y1:e+-I.y1*a,x2:A+I.x2*o,y2:e+-I.y2*a,x:A+I.x*o,y:e+-I.y*a}):I.type==="Z"&&h.push({type:"Z"})}return h}}class id extends _n{parse(A,e,t){const i=this,{nominalWidthX:s,defaultWidthX:n,gsubrsBias:o,subrsBias:a}=A,l=A.topDict.paintType,h=this.index;let c,f,I,d;const C=[],p=[];let M=0,P=!1,w=!1,R=n,_=0,m=0;function b(W,L){C.push({type:"L",x:W,y:L})}function D(W,L,se,H,q,ie){C.push({type:"C",x1:W,y1:L,x2:se,y2:H,x:q,y:ie})}function z(W,L){w&&l!==2&&Ae(),w=!0,C.push({type:"M",x:W,y:L})}function Ae(){C.push({type:"Z"})}function V(W){C.push(...W)}function K(){p.length%2!==0&&!P&&(R=p.shift()+s),M+=p.length>>1,p.length=0,P=!0}function te(W){let L,se,H,q,ie,J,$,N,U,X,ee,oe,j=0;for(;j<W.length;){let pe=W[j++];switch(pe){case 1:K();break;case 3:K();break;case 4:p.length>1&&!P&&(R=p.shift()+s,P=!0),m+=p.pop(),z(_,m);break;case 5:for(;p.length>0;)_+=p.shift(),m+=p.shift(),b(_,m);break;case 6:for(;p.length>0&&(_+=p.shift(),b(_,m),p.length!==0);)m+=p.shift(),b(_,m);break;case 7:for(;p.length>0&&(m+=p.shift(),b(_,m),p.length!==0);)_+=p.shift(),b(_,m);break;case 8:for(;p.length>0;)c=_+p.shift(),f=m+p.shift(),I=c+p.shift(),d=f+p.shift(),_=I+p.shift(),m=d+p.shift(),D(c,f,I,d,_,m);break;case 10:ie=p.pop()+a,J=A.subrs[ie],J&&te(J);break;case 11:return;case 12:switch(pe=W[j],j+=1,pe){case 35:c=_+p.shift(),f=m+p.shift(),I=c+p.shift(),d=f+p.shift(),$=I+p.shift(),N=d+p.shift(),U=$+p.shift(),X=N+p.shift(),ee=U+p.shift(),oe=X+p.shift(),_=ee+p.shift(),m=oe+p.shift(),p.shift(),D(c,f,I,d,$,N),D(U,X,ee,oe,_,m);break;case 34:c=_+p.shift(),f=m,I=c+p.shift(),d=f+p.shift(),$=I+p.shift(),N=d,U=$+p.shift(),X=d,ee=U+p.shift(),oe=m,_=ee+p.shift(),D(c,f,I,d,$,N),D(U,X,ee,oe,_,m);break;case 36:c=_+p.shift(),f=m+p.shift(),I=c+p.shift(),d=f+p.shift(),$=I+p.shift(),N=d,U=$+p.shift(),X=d,ee=U+p.shift(),oe=X+p.shift(),_=ee+p.shift(),D(c,f,I,d,$,N),D(U,X,ee,oe,_,m);break;case 37:c=_+p.shift(),f=m+p.shift(),I=c+p.shift(),d=f+p.shift(),$=I+p.shift(),N=d+p.shift(),U=$+p.shift(),X=N+p.shift(),ee=U+p.shift(),oe=X+p.shift(),Math.abs(ee-_)>Math.abs(oe-m)?_=ee+p.shift():m=oe+p.shift(),D(c,f,I,d,$,N),D(U,X,ee,oe,_,m);break;default:console.warn(`Glyph ${h}: unknown operator ${1200+pe}`),p.length=0}break;case 14:if(p.length>=4){const at=vn[p.pop()],lt=vn[p.pop()],He=p.pop(),ge=p.pop();if(at&&lt){i.isComposite=!0,i.components=[];const we=A.charset.indexOf(at),Je=A.charset.indexOf(lt);i.components.push({glyphIndex:Je,dx:0,dy:0}),i.components.push({glyphIndex:we,dx:ge,dy:He}),V(t.get(Je).pathCommands);const Ve=JSON.parse(JSON.stringify(t.get(we).pathCommands));for(let xe=0;xe<Ve.length;xe+=1){const et=Ve[xe];et.type!=="Z"&&(et.x+=ge,et.y+=He),(et.type==="Q"||et.type==="C")&&(et.x1+=ge,et.y1+=He),et.type==="C"&&(et.x2+=ge,et.y2+=He)}V(Ve)}}else p.length>0&&!P&&(R=p.shift()+s,P=!0);w&&l!==2&&(Ae(),w=!1);break;case 18:K();break;case 19:case 20:K(),j+=M+7>>3;break;case 21:p.length>2&&!P&&(R=p.shift()+s,P=!0),m+=p.pop(),_+=p.pop(),z(_,m);break;case 22:p.length>1&&!P&&(R=p.shift()+s,P=!0),_+=p.pop(),z(_,m);break;case 23:K();break;case 24:for(;p.length>2;)c=_+p.shift(),f=m+p.shift(),I=c+p.shift(),d=f+p.shift(),_=I+p.shift(),m=d+p.shift(),D(c,f,I,d,_,m);_+=p.shift(),m+=p.shift(),b(_,m);break;case 25:for(;p.length>6;)_+=p.shift(),m+=p.shift(),b(_,m);c=_+p.shift(),f=m+p.shift(),I=c+p.shift(),d=f+p.shift(),_=I+p.shift(),m=d+p.shift(),D(c,f,I,d,_,m);break;case 26:for(p.length%2&&(_+=p.shift());p.length>0;)c=_,f=m+p.shift(),I=c+p.shift(),d=f+p.shift(),_=I,m=d+p.shift(),D(c,f,I,d,_,m);break;case 27:for(p.length%2&&(m+=p.shift());p.length>0;)c=_+p.shift(),f=m,I=c+p.shift(),d=f+p.shift(),_=I+p.shift(),m=d,D(c,f,I,d,_,m);break;case 28:L=W[j],se=W[j+1],p.push((L<<24|se<<16)>>16),j+=2;break;case 29:ie=p.pop()+o,J=A.gsubrs[ie],J&&te(J);break;case 30:for(;p.length>0&&(c=_,f=m+p.shift(),I=c+p.shift(),d=f+p.shift(),_=I+p.shift(),m=d+(p.length===1?p.shift():0),D(c,f,I,d,_,m),p.length!==0);)c=_+p.shift(),f=m,I=c+p.shift(),d=f+p.shift(),m=d+p.shift(),_=I+(p.length===1?p.shift():0),D(c,f,I,d,_,m);break;case 31:for(;p.length>0&&(c=_+p.shift(),f=m,I=c+p.shift(),d=f+p.shift(),m=d+p.shift(),_=I+(p.length===1?p.shift():0),D(c,f,I,d,_,m),p.length!==0);)c=_,f=m+p.shift(),I=c+p.shift(),d=f+p.shift(),_=I+p.shift(),m=d+(p.length===1?p.shift():0),D(c,f,I,d,_,m);break;default:pe<32?console.warn(`Glyph ${h}: unknown operator ${pe}`):pe<247?p.push(pe-139):pe<251?(L=W[j],j+=1,p.push((pe-247)*256+L+108)):pe<255?(L=W[j],j+=1,p.push(-(pe-251)*256-L-108)):(L=W[j],se=W[j+1],H=W[j+2],q=W[j+3],j+=4,p.push((L<<24|se<<16|H<<8|q)/65536))}}}te(e),this.pathCommands=C,P&&(this.advanceWidth=R)}}class bn{constructor(A){u(this,"_items",[]);this._sfnt=A}get(A){const e=this._items[A];let t;if(e)t=e;else{t=this._get(A);const i=this._sfnt.hmtx.metrics[A];i&&(t.advanceWidth=t.advanceWidth||i.advanceWidth,t.leftSideBearing=t.leftSideBearing||i.leftSideBearing);const s=this._sfnt.cmap.glyphIndexToUnicodesMap.get(A);s&&(t.unicode??(t.unicode=s[0]),t.unicodes??(t.unicodes=s)),this._items[A]=t}return t}}class rd extends bn{get length(){return this._sfnt.cff.charStringsIndex.offsets.length-1}_get(A){const e=this._sfnt.cff,t=new id({index:A});return t.parse(e,e.charStringsIndex.get(A),this),t.name=e.charset[A],t}}var sd=Object.defineProperty,Rl=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&sd(A,e,i),i};class kr extends ft{constructor(e,t,i,s){super(e,t,i,s);u(this,"_offsets");u(this,"_objects");this._init()}get offsets(){return this._offsets??(this._offsets=this.readOffsets())}get objects(){return this._objects??(this._objects=this.readObjects())}_init(){const e=this.view,t=this.count,i=this.offsetSize;this.objectOffset=(t+1)*i+2,this.endOffset=e.byteOffset+this.objectOffset+this.offsets[t]}readOffsets(){const e=this.view,t=this.count,i=this.offsetSize;e.seek(3);const s=[];for(let n=0,o=t+1;n<o;n++){const a=this.view;let l=0;for(let h=0;h<i;h++)l<<=8,l+=a.readUint8();s.push(l)}return s}readObjects(){const e=[];for(let t=0,i=this.count;t<i;t++)e.push(this.get(t));return e}get(e){const t=this.offsets,i=this.objectOffset,s=i+t[e],o=i+t[e+1]-s;return this._isString?this.view.readString(s,o):this.view.readBytes(s,o)}}Rl([y("uint16")],kr.prototype,"count"),Rl([y("uint8")],kr.prototype,"offsetSize");class Ur extends kr{constructor(){super(...arguments);u(this,"_isString",!1)}}class Pl extends kr{constructor(){super(...arguments);u(this,"_isString",!0)}}const nd=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","266 ff","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],od=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron"],ad=[".notdef","space","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],ld=[".notdef","space","dollaroldstyle","dollarsuperior","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","hyphensuperior","colonmonetary","onefitted","rupiah","centoldstyle","figuredash","hypheninferior","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior"];function Nr(r,A){return A<=390?nd[A]:r[A-391]}function ye(r,A="number",e){return(t,i)=>{if(typeof i!="string")return;const s={type:A,operator:r,default:e??A==="number"?0:void 0};Object.defineProperty(t.constructor.prototype,i,{get(){return this._getProp(s)},set(n){this._setProp(s,n)},configurable:!0,enumerable:!0})}}class kl extends ft{constructor(){super(...arguments);u(this,"_dict");u(this,"_stringIndex")}get dict(){return this._dict??(this._dict=this._readDict())}setStringIndex(e){return this._stringIndex=e,this}_readFloatOperand(){const e=this.view;let t="";const i=15,s=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"];for(;;){const n=e.readUint8(),o=n>>4,a=n&15;if(o===i||(t+=s[o],a===i))break;t+=s[a]}return Number.parseFloat(t)}_readOperand(e){const t=this.view;let i,s,n,o;if(e===28)return i=t.readUint8(),s=t.readUint8(),i<<8|s;if(e===29)return i=t.readUint8(),s=t.readUint8(),n=t.readUint8(),o=t.readUint8(),i<<24|s<<16|n<<8|o;if(e===30)return this._readFloatOperand();if(e>=32&&e<=246)return e-139;if(e>=247&&e<=250)return i=t.readUint8(),(e-247)*256+i+108;if(e>=251&&e<=254)return i=t.readUint8(),-(e-251)*256-i-108;throw new Error(`invalid b0 ${e}, at: ${t.cursor}`)}_readDict(){const e=this.view;e.seek(0);let t=[];const i=e.cursor+e.byteLength,s={};for(;e.cursor<i;){let n=e.readUint8();n<=21?(n===12&&(n=1200+e.readUint8()),s[n]=t,t=[]):t.push(this._readOperand(n))}return s}_getProp(e){var i;const t=this.dict[e.operator]??e.default;switch(e.type){case"number":return t[0];case"string":return Nr(((i=this._stringIndex)==null?void 0:i.objects)??[],t[0]);case"number[]":return t}return t}_setProp(e,t){}}var hd=Object.defineProperty,Dn=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&hd(A,e,i),i};class Fr extends kl{}Dn([ye(19)],Fr.prototype,"subrs"),Dn([ye(20)],Fr.prototype,"defaultWidthX"),Dn([ye(21)],Fr.prototype,"nominalWidthX");var cd=Object.defineProperty,De=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&cd(A,e,i),i};class ve extends kl{}De([ye(0,"string")],ve.prototype,"version"),De([ye(1,"string")],ve.prototype,"notice"),De([ye(1200,"string")],ve.prototype,"copyright"),De([ye(2,"string")],ve.prototype,"fullName"),De([ye(3,"string")],ve.prototype,"familyName"),De([ye(4,"string")],ve.prototype,"weight"),De([ye(1201)],ve.prototype,"isFixedPitch"),De([ye(1202)],ve.prototype,"italicAngle"),De([ye(1203,"number",-100)],ve.prototype,"underlinePosition"),De([ye(1204,"number",50)],ve.prototype,"underlineThickness"),De([ye(1205)],ve.prototype,"paintType"),De([ye(1206,"number",2)],ve.prototype,"charstringType"),De([ye(1207,"number[]",[.001,0,0,.001,0,0])],ve.prototype,"fontMatrix"),De([ye(13)],ve.prototype,"uniqueId"),De([ye(5,"number[]",[0,0,0,0])],ve.prototype,"fontBBox"),De([ye(1208)],ve.prototype,"strokeWidth"),De([ye(14)],ve.prototype,"xuid"),De([ye(15)],ve.prototype,"charset"),De([ye(16)],ve.prototype,"encoding"),De([ye(17)],ve.prototype,"charStrings"),De([ye(18,"number[]",[0,0])],ve.prototype,"private");function Ye(r,A=r){return e=>{DA.tableDefinitions.set(r,{tag:r,prop:A,class:e}),Object.defineProperty(DA.prototype,A,{get(){return this.get(r)},set(t){return this.set(r,t)},configurable:!0,enumerable:!0})}}const UA=class UA{constructor(A){u(this,"tables",new Map);u(this,"tableViews",new Map);(A instanceof Map?A:new Map(Object.entries(A))).forEach((t,i)=>{this.tableViews.set(i,new DataView(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)))})}get hasGlyf(){return this.tableViews.has("glyf")}get names(){return this.name.names}get unitsPerEm(){return this.head.unitsPerEm}get ascender(){return this.hhea.ascent}get descender(){return this.hhea.descent}get createdTimestamp(){return this.head.created}get modifiedTimestamp(){return this.head.modified}get numGlyphs(){return this.maxp.numGlyphs}get unicodes(){return this.cmap.glyphIndexToUnicodesMap}get glyphs(){return this.hasGlyf?this.glyf.glyphs:this.cff.glyphs}charToGlyphIndex(A){let e=this.cmap.unicodeToGlyphIndexMap.get(A.codePointAt(0));if(e===void 0&&!this.hasGlyf){const{encoding:t,charset:i}=this.cff;e=i.indexOf(t[A.codePointAt(0)])}return e??0}charToGlyph(A){return this.glyphs.get(this.charToGlyphIndex(A))}textToGlyphIndexes(A){const e=[];for(const t of A)e.push(this.charToGlyphIndex(t));return e}textToGlyphs(A){const e=this.glyphs,t=this.textToGlyphIndexes(A),i=t.length,s=Array.from({length:i}),n=e.get(0);for(let o=0;o<i;o+=1)s[o]=e.get(t[o])||n;return s}getPathCommands(A,e,t,i,s){const n=[];return this.forEachGlyph(A,e,t,i,s,(o,a,l,h,c)=>{n.push(...o.getPathCommands(a,l,h,c,this))}),n}getAdvanceWidth(A,e,t){return this.forEachGlyph(A,0,0,e,t,()=>{})}forEachGlyph(A,e=0,t=0,i=72,s={},n){const o=1/this.unitsPerEm*i,a=this.textToGlyphs(A);for(let l=0;l<a.length;l+=1){const h=a[l];n.call(this,h,e,t,i,s),h.advanceWidth&&(e+=h.advanceWidth*o),s.letterSpacing?e+=s.letterSpacing*i:s.tracking&&(e+=s.tracking/1e3*i)}return e}clone(){return new UA(this.tableViews)}delete(A){const e=UA.tableDefinitions.get(A);return e?(this.tableViews.delete(A),this.tables.delete(e.prop),this):this}set(A,e){const t=UA.tableDefinitions.get(A);return t&&this.tables.set(t.prop,e),this.tableViews.set(A,e.view),this}get(A){const e=UA.tableDefinitions.get(A);if(!e)return;let t=this.tables.get(e.prop);if(!t){const i=e.class;if(i){const s=this.tableViews.get(A);if(!s)return;t=new i(s.buffer,s.byteOffset,s.byteLength).setSFNT(this),this.tables.set(e.prop,t)}}return t}};u(UA,"tableDefinitions",new Map);let DA=UA;class Ze extends ft{setSFNT(A){return this._sfnt=A,this}getSFNT(){return this._sfnt}}var gd=Object.defineProperty,ud=Object.getOwnPropertyDescriptor,zi=(r,A,e,t)=>{for(var i=t>1?void 0:t?ud(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(t?n(A,e,i):n(i))||i);return t&&i&&gd(A,e,i),i};let xA=class extends Ze{constructor(A,e,t,i){super(A,e,t,i);u(this,"_glyphs");u(this,"privateDict");u(this,"subrsIndex");this._init()}get glyphs(){return this._glyphs??(this._glyphs=new rd(this._sfnt))}get gsubrs(){return this.globalSubrIndex.objects}get gsubrsBias(){return this._calcSubroutineBias(this.globalSubrIndex.objects)}get defaultWidthX(){var A;return((A=this.privateDict)==null?void 0:A.defaultWidthX)??0}get nominalWidthX(){var A;return((A=this.privateDict)==null?void 0:A.nominalWidthX)??0}get subrs(){var A;return((A=this.subrsIndex)==null?void 0:A.objects)??[]}get subrsBias(){return this._calcSubroutineBias(this.subrs)}_init(){const A=this.view,{buffer:e,byteOffset:t}=A,i=t+4;this.nameIndex=new Pl(e,i),this.topDictIndex=new Ur(e,this.nameIndex.endOffset),this.stringIndex=new Pl(e,this.topDictIndex.endOffset),this.globalSubrIndex=new Ur(e,this.stringIndex.endOffset),this.topDict=new ve(new Uint8Array(this.topDictIndex.objects[0]).buffer).setStringIndex(this.stringIndex);const s=this.topDict.private[0],n=this.topDict.private[1];s&&(this.privateDict=new Fr(e,t+n,s).setStringIndex(this.stringIndex),this.privateDict.subrs&&(this.subrsIndex=new Ur(e,t+n+this.privateDict.subrs))),this.charStringsIndex=new Ur(e,t+this.topDict.charStrings);const o=this.charStringsIndex.offsets.length-1;this.topDict.charset===0?this.charset=od:this.topDict.charset===1?this.charset=ad:this.topDict.charset===2?this.charset=ld:this.charset=this._readCharset(t+this.topDict.charset,o,this.stringIndex.objects),this.topDict.encoding===0?this.encoding=vn:this.topDict.encoding===1?this.encoding=Ad:this.encoding=this._readEncoding(t+this.topDict.encoding)}_readCharset(A,e,t){const i=this.view;i.seek(A);let s,n,o;e-=1;const a=[".notdef"],l=i.readUint8();if(l===0)for(s=0;s<e;s+=1)n=i.readUint16(),a.push(Nr(t,n));else if(l===1)for(;a.length<=e;)for(n=i.readUint16(),o=i.readUint8(),s=0;s<=o;s+=1)a.push(Nr(t,n)),n+=1;else if(l===2)for(;a.length<=e;)for(n=i.readUint16(),o=i.readUint16(),s=0;s<=o;s+=1)a.push(Nr(t,n)),n+=1;else throw new Error(`Unknown charset format ${l}`);return a}_readEncoding(A){const e=this.view;e.seek(A);let t,i;const s={},n=e.readUint8();if(n===0){const o=e.readUint8();for(t=0;t<o;t+=1)i=e.readUint8(),s[i]=t}else if(n===1){const o=e.readUint8();for(i=1,t=0;t<o;t+=1){const a=e.readUint8(),l=e.readUint8();for(let h=a;h<=a+l;h+=1)s[h]=i,i+=1}}else console.warn(`unknown encoding format:${n}`);return s}_calcSubroutineBias(A){let e;return A.length<1240?e=107:A.length<33900?e=1131:e=32768,e}};zi([y("uint8")],xA.prototype,"majorVersion",2),zi([y("uint8")],xA.prototype,"minorVersion",2),zi([y("uint8")],xA.prototype,"headerSize",2),zi([y("uint8")],xA.prototype,"offsetSize",2),xA=zi([Ye("CFF ","cff")],xA);var fd=Object.defineProperty,Tr=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&fd(A,e,i),i};const Wi=class Nh extends ft{constructor(A=new ArrayBuffer(262),e){super(A,e,262)}static from(A){const e=new Nh;return e.format=0,e.length=e.view.byteLength,e.language=0,A.forEach((t,i)=>{i<256&&t<256&&e.view.writeUint8(t,6+i)}),e}getUnicodeToGlyphIndexMap(){const A=new Map;return this.glyphIndexArray.forEach((e,t)=>{A.set(t,e)}),A}};Tr([y("uint16")],Wi.prototype,"format"),Tr([y("uint16")],Wi.prototype,"length"),Tr([y("uint16")],Wi.prototype,"language"),Tr([y({type:"uint8",size:256})],Wi.prototype,"glyphIndexArray");let xn=Wi;var dd=Object.defineProperty,Sn=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&dd(A,e,i),i};class Vi extends ft{get subHeaderKeys(){return this.view.seek(6),Array.from({length:256},()=>this.view.readUint16()/8)}get maxSubHeaderKey(){return this.subHeaderKeys.reduce((A,e)=>Math.max(A,e),0)}get subHeaders(){const A=this.maxSubHeaderKey;return this.view.seek(6+256*2),Array.from({length:A},(e,t)=>({firstCode:this.view.readUint16(),entryCount:this.view.readUint16(),idDelta:this.view.readUint16(),idRangeOffset:(this.view.readUint16()-(A-t)*8-2)/2}))}get glyphIndexArray(){const A=this.maxSubHeaderKey,e=6+256*2+A*8;this.view.seek(e);const t=(this.view.byteLength-e)/2;return Array.from({length:t},()=>this.view.readUint16())}getUnicodeToGlyphIndexMap(A){const e=new Map,t=this.subHeaderKeys,i=this.maxSubHeaderKey,s=this.subHeaders,n=this.glyphIndexArray,o=t.findIndex(l=>l===i);let a=0;for(let l=0;l<256;l++)if(t[l]===0)l>=o||l<s[0].firstCode||l>=s[0].firstCode+s[0].entryCount||s[0].idRangeOffset+(l-s[0].firstCode)>=n.length?a=0:(a=n[s[0].idRangeOffset+(l-s[0].firstCode)],a!==0&&(a=a+s[0].idDelta)),a!==0&&a<A&&e.set(l,a);else{const h=t[l];for(let c=0,f=s[h].entryCount;c<f;c++)if(s[h].idRangeOffset+c>=n.length?a=0:(a=n[s[h].idRangeOffset+c],a!==0&&(a=a+s[h].idDelta)),a!==0&&a<A){const I=(l<<8|c+s[h].firstCode)%65535;e.set(I,a)}}return e}}Sn([y("uint16")],Vi.prototype,"format"),Sn([y("uint16")],Vi.prototype,"length"),Sn([y("uint16")],Vi.prototype,"language");function Ul(r){return r>32767?r-65536:r<-32767?r+65536:r}function Mn(r,A){let e;const t=[];let i={};return r.forEach((s,n)=>{A&&n>A||((!e||n!==e.unicode+1||s!==e.glyphIndex+1)&&(e?(i.end=e.unicode,t.push(i),i={start:n,startId:s,delta:Ul(s-n)}):(i.start=Number(n),i.startId=s,i.delta=Ul(s-n))),e={unicode:n,glyphIndex:s})}),e&&(i.end=e.unicode,t.push(i)),t}var Id=Object.defineProperty,SA=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&Id(A,e,i),i};const gA=class Fh extends ft{get endCode(){const A=this.segCountX2;return this.view.seek(14),Array.from({length:A/2},()=>this.view.readUint16())}set endCode(A){this.view.seek(14),A.forEach(e=>this.view.writeUint16(e))}get reservedPad(){return this.view.readUint16(14+this.segCountX2)}set reservedPad(A){this.view.writeUint16(A,14+this.segCountX2)}get startCode(){const A=this.segCountX2;return this.view.seek(14+A+2),Array.from({length:A/2},()=>this.view.readUint16())}set startCode(A){this.view.seek(14+this.segCountX2+2),A.forEach(e=>this.view.writeUint16(e))}get idDelta(){const A=this.segCountX2;return this.view.seek(14+A+2+A),Array.from({length:A/2},()=>this.view.readUint16())}set idDelta(A){const e=this.segCountX2;this.view.seek(14+e+2+e),A.forEach(t=>this.view.writeUint16(t))}get idRangeOffsetCursor(){const A=this.segCountX2;return 14+A+2+A*2}get idRangeOffset(){const A=this.segCountX2;return this.view.seek(this.idRangeOffsetCursor),Array.from({length:A/2},()=>this.view.readUint16())}set idRangeOffset(A){this.view.seek(this.idRangeOffsetCursor),A.forEach(e=>this.view.writeUint16(e))}get glyphIndexArrayCursor(){const A=this.segCountX2;return 14+A+2+A*3}get glyphIndexArray(){const A=this.glyphIndexArrayCursor;this.view.seek(A);const e=(this.view.byteLength-A)/2;return Array.from({length:e},()=>this.view.readUint16())}static from(A){const e=Mn(A,65535),t=e.length+1,i=Math.floor(Math.log(t)/Math.LN2),s=2*2**i,n=new Fh(new ArrayBuffer(24+e.length*8));return n.format=4,n.length=n.view.byteLength,n.language=0,n.segCountX2=t*2,n.searchRange=s,n.entrySelector=i,n.rangeShift=2*t-s,n.endCode=[...e.map(o=>o.end),65535],n.reservedPad=0,n.startCode=[...e.map(o=>o.start),65535],n.idDelta=[...e.map(o=>o.delta),1],n.idRangeOffset=Array.from({length:t},()=>0),n}getUnicodeToGlyphIndexMap(){const A=new Map,e=this.segCountX2/2,t=(this.glyphIndexArrayCursor-this.idRangeOffsetCursor)/2,i=this.startCode,s=this.endCode,n=this.idRangeOffset,o=this.idDelta,a=this.glyphIndexArray;for(let l=0;l<e;++l)for(let h=i[l],c=s[l];h<=c;++h)if(n[l]===0)A.set(h,(h+o[l])%65536);else{const f=l+n[l]/2+(h-i[l])-t,I=a[f];I!==0?A.set(h,(I+o[l])%65536):A.set(h,0)}return A.delete(65535),A}};SA([y("uint16")],gA.prototype,"format"),SA([y("uint16")],gA.prototype,"length"),SA([y("uint16")],gA.prototype,"language"),SA([y("uint16")],gA.prototype,"segCountX2"),SA([y("uint16")],gA.prototype,"searchRange"),SA([y("uint16")],gA.prototype,"entrySelector"),SA([y("uint16")],gA.prototype,"rangeShift");let Rn=gA;var pd=Object.defineProperty,qi=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&pd(A,e,i),i};class MA extends ft{get glyphIndexArray(){return this.view.seek(12),Array.from({length:this.entryCount},()=>this.view.readUint16())}getUnicodeToGlyphIndexMap(){const A=this.glyphIndexArray,e=new Map;return A.forEach((t,i)=>{e.set(i,t)}),e}}qi([y("uint16")],MA.prototype,"format"),qi([y("uint16")],MA.prototype,"length"),qi([y("uint16")],MA.prototype,"language"),qi([y("uint16")],MA.prototype,"firstCode"),qi([y("uint16")],MA.prototype,"entryCount");var Ed=Object.defineProperty,Xi=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&Ed(A,e,i),i};const $A=class Th extends ft{get groups(){const A=this.nGroups;return this.view.seek(16),Array.from({length:A},()=>({startCharCode:this.view.readUint32(),endCharCode:this.view.readUint32(),startGlyphCode:this.view.readUint32()}))}static from(A){const e=Mn(A),t=new Th(new ArrayBuffer(16+e.length*12));return t.format=12,t.reserved=0,t.length=t.view.byteLength,t.language=0,t.nGroups=e.length,e.forEach(i=>{t.view.writeUint32(i.start),t.view.writeUint32(i.end),t.view.writeUint32(i.startId)}),t}getUnicodeToGlyphIndexMap(){const A=new Map,e=this.groups;for(let t=0,i=e.length;t<i;t++){const s=e[t];let n=s.startGlyphCode,o=s.startCharCode;const a=s.endCharCode;for(;o<=a;)A.set(o++,n++)}return A}};Xi([y("uint16")],$A.prototype,"format"),Xi([y("uint16")],$A.prototype,"reserved"),Xi([y("uint32")],$A.prototype,"length"),Xi([y("uint32")],$A.prototype,"language"),Xi([y("uint32")],$A.prototype,"nGroups");let Pn=$A;var Bd=Object.defineProperty,kn=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&Bd(A,e,i),i};class ji extends ft{getVarSelectorRecords(){const A=this.numVarSelectorRecords;return this.view.seek(10),Array.from({length:A},()=>{const e={varSelector:this.view.readUint24(),defaultUVSOffset:this.view.readUint32(),unicodeValueRanges:[],nonDefaultUVSOffset:this.view.readUint32(),uVSMappings:[]};if(e.defaultUVSOffset){this.view.seek(e.defaultUVSOffset);const t=this.view.readUint32();e.unicodeValueRanges=Array.from({length:t},()=>({startUnicodeValue:this.view.readUint24(),additionalCount:this.view.readUint8()}))}if(e.nonDefaultUVSOffset){this.view.seek(e.nonDefaultUVSOffset);const t=this.view.readUint32();e.uVSMappings=Array.from({length:t},()=>({unicodeValue:this.view.readUint24(),glyphID:this.view.readUint16()}))}return e})}getUnicodeToGlyphIndexMap(){const A=new Map,e=this.getVarSelectorRecords();for(let t=0,i=e.length;t<i;t++){const{uVSMappings:s}=e[t];s.forEach(n=>{A.set(n.unicodeValue,n.glyphID)})}return A}}kn([y("uint16")],ji.prototype,"format"),kn([y("uint32")],ji.prototype,"length"),kn([y("uint32")],ji.prototype,"numVarSelectorRecords");var Cd=Object.defineProperty,Qd=Object.getOwnPropertyDescriptor,Un=(r,A,e,t)=>{for(var i=t>1?void 0:t?Qd(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(t?n(A,e,i):n(i))||i);return t&&i&&Cd(A,e,i),i};let ei=class extends Ze{constructor(){super(...arguments);u(this,"_unicodeToGlyphIndexMap");u(this,"_glyphIndexToUnicodesMap")}static from(A){const e=Array.from(A.keys()).some(c=>c>65535),t=Rn.from(A),i=xn.from(A),s=e?Pn.from(A):void 0,n=4+(s?32:24),o=n+t.view.byteLength,a=o+i.view.byteLength,l=[{platformID:0,platformSpecificID:3,offset:n},{platformID:1,platformSpecificID:0,offset:o},{platformID:3,platformSpecificID:1,offset:n},s&&{platformID:3,platformSpecificID:10,offset:a}].filter(Boolean),h=new ei(new ArrayBuffer(4+8*l.length+t.view.byteLength+i.view.byteLength+((s==null?void 0:s.view.byteLength)??0)));return h.numberSubtables=l.length,h.view.seek(4),l.forEach(c=>{h.view.writeUint16(c.platformID),h.view.writeUint16(c.platformSpecificID),h.view.writeUint32(c.offset)}),h.view.writeBytes(t.view,n),h.view.writeBytes(i.view,o),s&&h.view.writeBytes(s.view,a),h}get unicodeToGlyphIndexMap(){return this._unicodeToGlyphIndexMap??(this._unicodeToGlyphIndexMap=this.readunicodeToGlyphIndexMap())}get glyphIndexToUnicodesMap(){if(!this._glyphIndexToUnicodesMap){const A=new Map,e=this.unicodeToGlyphIndexMap,t=Array.from(e.keys());for(let i=0,s=t.length;i<s;i++){const n=t[i],o=e.get(n);A.has(o)?A.get(o).push(n):A.set(o,[n])}this._glyphIndexToUnicodesMap=A}return this._glyphIndexToUnicodesMap}readSubtables(){const A=this.numberSubtables;return this.view.seek(4),Array.from({length:A},()=>({platformID:this.view.readUint16(),platformSpecificID:this.view.readUint16(),offset:this.view.readUint32()})).map(e=>{this.view.seek(e.offset);const t=this.view.readUint16();let i;switch(t){case 0:i=new xn(this.view.buffer,e.offset);break;case 2:i=new Vi(this.view.buffer,e.offset,this.view.readUint16());break;case 4:i=new Rn(this.view.buffer,e.offset,this.view.readUint16());break;case 6:i=new MA(this.view.buffer,e.offset,this.view.readUint16());break;case 12:i=new Pn(this.view.buffer,e.offset,this.view.readUint32(e.offset+4));break;case 14:default:i=new ji(this.view.buffer,e.offset,this.view.readUint32());break}return{...e,format:t,view:i}})}readunicodeToGlyphIndexMap(){var o,a,l,h,c;const A=this.readSubtables(),e=(o=A.find(f=>f.format===0))==null?void 0:o.view,t=(a=A.find(f=>f.platformID===3&&f.platformSpecificID===3&&f.format===2))==null?void 0:a.view,i=(l=A.find(f=>f.platformID===3&&f.platformSpecificID===1&&f.format===4))==null?void 0:l.view,s=(h=A.find(f=>f.platformID===3&&f.platformSpecificID===10&&f.format===12))==null?void 0:h.view,n=(c=A.find(f=>f.platformID===0&&f.platformSpecificID===5&&f.format===14))==null?void 0:c.view;return new Map([...(e==null?void 0:e.getUnicodeToGlyphIndexMap())??[],...(t==null?void 0:t.getUnicodeToGlyphIndexMap(this._sfnt.maxp.numGlyphs))??[],...(i==null?void 0:i.getUnicodeToGlyphIndexMap())??[],...(s==null?void 0:s.getUnicodeToGlyphIndexMap())??[],...(n==null?void 0:n.getUnicodeToGlyphIndexMap())??[]])}};Un([y("uint16")],ei.prototype,"version",2),Un([y("uint16")],ei.prototype,"numberSubtables",2),ei=Un([Ye("cmap")],ei);class yd extends _n{_parseContours(A){const e=[];let t=[];for(let i=0;i<A.length;i+=1){const s=A[i];t.push(s),s.lastPointOfContour&&(e.push(t),t=[])}return Ki(t.length===0,"There are still points left in the current contour."),e}_transformPoints(A,e){const t=[];for(let i=0;i<A.length;i+=1){const s=A[i],n={x:e.xScale*s.x+e.scale10*s.y+e.dx,y:e.scale01*s.x+e.yScale*s.y+e.dy,onCurve:s.onCurve,lastPointOfContour:s.lastPointOfContour};t.push(n)}return t}_parseGlyphCoordinate(A,e,t,i,s){let n;return(e&i)>0?(n=A.view.readUint8(),(e&s)===0&&(n=-n),n=t+n):(e&s)>0?n=t:n=t+A.view.readInt16(),n}parse(A,e,t){A.view.seek(e);const i=this.numberOfContours=A.view.readInt16();if(this.xMin=A.view.readInt16(),this.yMin=A.view.readInt16(),this.xMax=A.view.readInt16(),this.yMax=A.view.readInt16(),i>0){const o=this.endPointIndices=[];for(let C=0;C<i;C++)o.push(A.view.readUint16());const a=this.instructionLength=A.view.readUint16();Ki(a<5e3,`Bad instructionLength:${a}`);const l=this.instructions=[];for(let C=0;C<a;++C)l.push(A.view.readUint8());const h=A.view.byteOffset,c=o[o.length-1]+1;Ki(c<2e4,`Bad numberOfCoordinates:${h}`);const f=[];let I,d=0;for(;d<c;)if(I=A.view.readUint8(),f.push(I),d++,I&8&&d<c){const C=A.view.readUint8();for(let p=0;p<C;p++)f.push(I),d++}if(Ki(f.length===c,`Bad flags length: ${f.length}, numberOfCoordinates: ${c}`),o.length>0){const C=[];let p;if(c>0){for(let w=0;w<c;w+=1)I=f[w],p={},p.onCurve=!!(I&1),p.lastPointOfContour=o.includes(w),C.push(p);let M=0;for(let w=0;w<c;w+=1)I=f[w],p=C[w],p.x=this._parseGlyphCoordinate(A,I,M,2,16),M=p.x;let P=0;for(let w=0;w<c;w+=1)I=f[w],p=C[w],p.y=this._parseGlyphCoordinate(A,I,P,4,32),P=p.y}this.points=C}else this.points=[]}else if(i===0)this.points=[];else{this.isComposite=!0,this.points=[],this.components=[];let o,a=!0;for(;a;){o=A.view.readUint16();const l={glyphIndex:A.view.readUint16(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0};(o&1)>0?(o&2)>0?(l.dx=A.view.readInt16(),l.dy=A.view.readInt16()):l.matchedPoints=[A.view.readUint16(),A.view.readUint16()]:(o&2)>0?(l.dx=A.view.readInt8(),l.dy=A.view.readInt8()):l.matchedPoints=[A.view.readUint8(),A.view.readUint8()],(o&8)>0?l.xScale=l.yScale=A.view.readInt16()/16384:(o&64)>0?(l.xScale=A.view.readInt16()/16384,l.yScale=A.view.readInt16()/16384):(o&128)>0&&(l.xScale=A.view.readInt16()/16384,l.scale01=A.view.readInt16()/16384,l.scale10=A.view.readInt16()/16384,l.yScale=A.view.readInt16()/16384),this.components.push(l),a=!!(o&32)}if(o&256){this.instructionLength=A.view.readUint16(),this.instructions=[];for(let l=0;l<this.instructionLength;l+=1)this.instructions.push(A.view.readUint8())}}if(this.isComposite)for(let o=0;o<this.components.length;o+=1){const a=this.components[o],l=t.get(a.glyphIndex);if(l.getPathCommands(),l.points){let h;if(a.matchedPoints===void 0)h=this._transformPoints(l.points,a);else{Ki(a.matchedPoints[0]>this.points.length-1||a.matchedPoints[1]>l.points.length-1,`Matched points out of range in ${this.name}`);const c=this.points[a.matchedPoints[0]];let f=l.points[a.matchedPoints[1]];const I={xScale:a.xScale,scale01:a.scale01,scale10:a.scale10,yScale:a.yScale,dx:0,dy:0};f=this._transformPoints([f],I)[0],I.dx=c.x-f.x,I.dy=c.y-f.y,h=this._transformPoints(l.points,I)}this.points=this.points.concat(h)}}const s=[],n=this._parseContours(this.points);for(let o=0,a=n.length;o<a;++o){const l=n[o];let h=l[l.length-1],c=l[0];h.onCurve?s.push({type:"M",x:h.x,y:h.y}):c.onCurve?s.push({type:"M",x:c.x,y:c.y}):s.push({type:"M",x:(h.x+c.x)*.5,y:(h.y+c.y)*.5});for(let f=0,I=l.length;f<I;++f)if(h=c,c=l[(f+1)%I],h.onCurve)s.push({type:"L",x:h.x,y:h.y});else{let d=c;c.onCurve||(d={x:(h.x+c.x)*.5,y:(h.y+c.y)*.5}),s.push({type:"Q",x1:h.x,y1:h.y,x:d.x,y:d.y})}s.push({type:"Z"})}this.pathCommands=s}}class md extends bn{get length(){return this._sfnt.loca.locations.length}_get(A){const e=this._sfnt.loca.locations,t=e[A],i=new yd({index:A});return t!==e[A+1]&&i.parse(this._sfnt.glyf,t,this),i}}var wd=Object.getOwnPropertyDescriptor,vd=(r,A,e,t)=>{for(var i=t>1?void 0:t?wd(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};let Gr=class extends Ze{constructor(){super(...arguments);u(this,"_glyphs")}static from(A){const e=A.reduce((i,s)=>i+s.byteLength,0),t=new Gr(new ArrayBuffer(e));return A.forEach(i=>{t.view.writeBytes(i)}),t}get glyphs(){return this._glyphs??(this._glyphs=new md(this._sfnt))}};Gr=vd([Ye("glyf")],Gr);var _d=Object.getOwnPropertyDescriptor,bd=(r,A,e,t)=>{for(var i=t>1?void 0:t?_d(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};let Nn=class extends Ze{};Nn=bd([Ye("GPOS","gpos")],Nn);var Dd=Object.defineProperty,xd=Object.getOwnPropertyDescriptor,RA=(r,A,e,t)=>{for(var i=t>1?void 0:t?xd(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(t?n(A,e,i):n(i))||i);return t&&i&&Dd(A,e,i),i};let $t=class extends Ze{};RA([y("uint16")],$t.prototype,"majorVersion",2),RA([y("uint16")],$t.prototype,"minorVersion",2),RA([y("uint16")],$t.prototype,"scriptListOffset",2),RA([y("uint16")],$t.prototype,"featureListOffset",2),RA([y("uint16")],$t.prototype,"lookupListOffset",2),RA([y("uint16")],$t.prototype,"featureVariationsOffset",2),$t=RA([Ye("GSUB","gsub")],$t);var Sd=Object.defineProperty,Md=Object.getOwnPropertyDescriptor,Te=(r,A,e,t)=>{for(var i=t>1?void 0:t?Md(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(t?n(A,e,i):n(i))||i);return t&&i&&Sd(A,e,i),i};let Re=class extends Ze{constructor(r=new ArrayBuffer(54),A){super(r,A,Math.min(54,r.byteLength-(A??0)))}};Te([y("fixed")],Re.prototype,"version",2),Te([y("fixed")],Re.prototype,"fontRevision",2),Te([y("uint32")],Re.prototype,"checkSumAdjustment",2),Te([y("uint32")],Re.prototype,"magickNumber",2),Te([y("uint16")],Re.prototype,"flags",2),Te([y("uint16")],Re.prototype,"unitsPerEm",2),Te([y({type:"longDateTime"})],Re.prototype,"created",2),Te([y({type:"longDateTime"})],Re.prototype,"modified",2),Te([y("int16")],Re.prototype,"xMin",2),Te([y("int16")],Re.prototype,"yMin",2),Te([y("int16")],Re.prototype,"xMax",2),Te([y("int16")],Re.prototype,"yMax",2),Te([y("uint16")],Re.prototype,"macStyle",2),Te([y("uint16")],Re.prototype,"lowestRecPPEM",2),Te([y("int16")],Re.prototype,"fontDirectionHint",2),Te([y("int16")],Re.prototype,"indexToLocFormat",2),Te([y("int16")],Re.prototype,"glyphDataFormat",2),Re=Te([Ye("head")],Re);var Rd=Object.defineProperty,Pd=Object.getOwnPropertyDescriptor,nt=(r,A,e,t)=>{for(var i=t>1?void 0:t?Pd(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(t?n(A,e,i):n(i))||i);return t&&i&&Rd(A,e,i),i};let ze=class extends Ze{constructor(r=new ArrayBuffer(36),A){super(r,A,Math.min(36,r.byteLength-(A??0)))}};nt([y("fixed")],ze.prototype,"version",2),nt([y("int16")],ze.prototype,"ascent",2),nt([y("int16")],ze.prototype,"descent",2),nt([y("int16")],ze.prototype,"lineGap",2),nt([y("uint16")],ze.prototype,"advanceWidthMax",2),nt([y("int16")],ze.prototype,"minLeftSideBearing",2),nt([y("int16")],ze.prototype,"minRightSideBearing",2),nt([y("int16")],ze.prototype,"xMaxExtent",2),nt([y("int16")],ze.prototype,"caretSlopeRise",2),nt([y("int16")],ze.prototype,"caretSlopeRun",2),nt([y("int16")],ze.prototype,"caretOffset",2),nt([y({type:"int16",size:4})],ze.prototype,"reserved",2),nt([y("int16")],ze.prototype,"metricDataFormat",2),nt([y("uint16")],ze.prototype,"numOfLongHorMetrics",2),ze=nt([Ye("hhea")],ze);var kd=Object.getOwnPropertyDescriptor,Ud=(r,A,e,t)=>{for(var i=t>1?void 0:t?kd(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};let Lr=class extends Ze{constructor(){super(...arguments);u(this,"_metrics")}static from(A){const e=A.length*4,t=new Lr(new ArrayBuffer(e));return A.forEach(i=>{t.view.writeUint16(i.advanceWidth),t.view.writeUint16(i.leftSideBearing)}),t}get metrics(){return this._metrics??(this._metrics=this.readMetrics())}readMetrics(){const A=this._sfnt.maxp.numGlyphs,e=this._sfnt.hhea.numOfLongHorMetrics;let t=0;const i=this.view;return i.seek(0),Array.from({length:A}).map((s,n)=>(n<e&&(t=i.readUint16()),{advanceWidth:t,leftSideBearing:i.readUint16()}))}};Lr=Ud([Ye("hmtx")],Lr);var Nd=Object.getOwnPropertyDescriptor,Fd=(r,A,e,t)=>{for(var i=t>1?void 0:t?Nd(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};let Fn=class extends Ze{};Fn=Fd([Ye("kern","kern")],Fn);var Td=Object.getOwnPropertyDescriptor,Gd=(r,A,e,t)=>{for(var i=t>1?void 0:t?Td(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};let Or=class extends Ze{constructor(){super(...arguments);u(this,"_locations")}static from(A,e=1){const t=A.length*(e?4:2),i=new Or(new ArrayBuffer(t));return A.forEach(s=>{e?i.view.writeUint32(s):i.view.writeUint16(s/2)}),i}get locations(){return this._locations??(this._locations=this.readLocations())}readLocations(){const A=this._sfnt.maxp.numGlyphs,e=this._sfnt.head.indexToLocFormat,t=this.view;return t.seek(0),Array.from({length:A}).map(()=>e?t.readUint32():t.readUint16()*2)}};Or=Gd([Ye("loca")],Or);var Ld=Object.defineProperty,Od=Object.getOwnPropertyDescriptor,$e=(r,A,e,t)=>{for(var i=t>1?void 0:t?Od(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(t?n(A,e,i):n(i))||i);return t&&i&&Ld(A,e,i),i};let Ge=class extends Ze{constructor(r=new ArrayBuffer(32),A){super(r,A,Math.min(32,r.byteLength-(A??0)))}};$e([y("fixed")],Ge.prototype,"version",2),$e([y("uint16")],Ge.prototype,"numGlyphs",2),$e([y("uint16")],Ge.prototype,"maxPoints",2),$e([y("uint16")],Ge.prototype,"maxContours",2),$e([y("uint16")],Ge.prototype,"maxComponentPoints",2),$e([y("uint16")],Ge.prototype,"maxComponentContours",2),$e([y("uint16")],Ge.prototype,"maxZones",2),$e([y("uint16")],Ge.prototype,"maxTwilightPoints",2),$e([y("uint16")],Ge.prototype,"maxStorage",2),$e([y("uint16")],Ge.prototype,"maxFunctionDefs",2),$e([y("uint16")],Ge.prototype,"maxInstructionDefs",2),$e([y("uint16")],Ge.prototype,"maxStackElements",2),$e([y("uint16")],Ge.prototype,"maxSizeOfInstructions",2),$e([y("uint16")],Ge.prototype,"maxComponentElements",2),$e([y("uint16")],Ge.prototype,"maxComponentDepth",2),Ge=$e([Ye("maxp")],Ge);var Hd=Object.defineProperty,Jd=Object.getOwnPropertyDescriptor,Hr=(r,A,e,t)=>{for(var i=t>1?void 0:t?Jd(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(t?n(A,e,i):n(i))||i);return t&&i&&Hd(A,e,i),i};const Nl={0:"copyright",1:"fontFamily",2:"fontSubFamily",3:"uniqueSubFamily",4:"fullName",5:"version",6:"postScriptName",7:"tradeMark",8:"manufacturer",9:"designer",10:"description",11:"urlOfFontVendor",12:"urlOfFontDesigner",13:"licence",14:"urlOfLicence",16:"preferredFamily",17:"preferredSubFamily",18:"compatibleFull",19:"sampleText"},Tn={Macintosh:1,Microsoft:3},Kd={Default:0},Fl={UCS2:1};let ti=class extends Ze{constructor(){super(...arguments);u(this,"_names")}get names(){return this._names??(this._names=this.readNames())}readNames(){const A=this.count;this.view.seek(6);const e=[];for(let a=0;a<A;++a)e.push({platform:this.view.readUint16(),encoding:this.view.readUint16(),language:this.view.readUint16(),nameId:this.view.readUint16(),length:this.view.readUint16(),offset:this.view.readUint16()});const t=this.stringOffset;for(let a=0;a<A;++a){const l=e[a];l.name=this.view.readBytes(t+l.offset,l.length)}let i=Tn.Macintosh,s=Kd.Default,n=0;e.some(a=>a.platform===Tn.Microsoft&&a.encoding===Fl.UCS2&&a.language===1033)&&(i=Tn.Microsoft,s=Fl.UCS2,n=1033);const o={};for(let a=0;a<A;++a){const l=e[a];l.platform===i&&l.encoding===s&&l.language===n&&Nl[l.nameId]&&(o[Nl[l.nameId]]=n===0?jf(l.name):Zf(l.name))}return o}};Hr([y("uint16")],ti.prototype,"format",2),Hr([y("uint16")],ti.prototype,"count",2),Hr([y("uint16")],ti.prototype,"stringOffset",2),ti=Hr([Ye("name")],ti);var Yd=Object.defineProperty,zd=Object.getOwnPropertyDescriptor,le=(r,A,e,t)=>{for(var i=t>1?void 0:t?zd(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(t?n(A,e,i):n(i))||i);return t&&i&&Yd(A,e,i),i};let ae=class extends Ze{get fontPANOSE(){return[this.bFamilyType,this.bSerifStyle,this.bWeight,this.bProportion,this.bContrast,this.bStrokeVariation,this.bArmStyle,this.bLetterform,this.bMidline,this.bXHeight]}};le([y("uint16")],ae.prototype,"version",2),le([y("int16")],ae.prototype,"xAvgCharWidth",2),le([y("uint16")],ae.prototype,"usWeightClass",2),le([y("uint16")],ae.prototype,"usWidthClass",2),le([y("uint16")],ae.prototype,"fsType",2),le([y("uint16")],ae.prototype,"ySubscriptXSize",2),le([y("uint16")],ae.prototype,"ySubscriptYSize",2),le([y("uint16")],ae.prototype,"ySubscriptXOffset",2),le([y("uint16")],ae.prototype,"ySubscriptYOffset",2),le([y("uint16")],ae.prototype,"ySuperscriptXSize",2),le([y("uint16")],ae.prototype,"ySuperscriptYSize",2),le([y("uint16")],ae.prototype,"ySuperscriptXOffset",2),le([y("uint16")],ae.prototype,"ySuperscriptYOffset",2),le([y("uint16")],ae.prototype,"yStrikeoutSize",2),le([y("uint16")],ae.prototype,"yStrikeoutPosition",2),le([y("uint16")],ae.prototype,"sFamilyClass",2),le([y({type:"uint8"})],ae.prototype,"bFamilyType",2),le([y({type:"uint8"})],ae.prototype,"bSerifStyle",2),le([y({type:"uint8"})],ae.prototype,"bWeight",2),le([y({type:"uint8"})],ae.prototype,"bProportion",2),le([y({type:"uint8"})],ae.prototype,"bContrast",2),le([y({type:"uint8"})],ae.prototype,"bStrokeVariation",2),le([y({type:"uint8"})],ae.prototype,"bArmStyle",2),le([y({type:"uint8"})],ae.prototype,"bLetterform",2),le([y({type:"uint8"})],ae.prototype,"bMidline",2),le([y({type:"uint8"})],ae.prototype,"bXHeight",2),le([y({type:"uint8",size:16})],ae.prototype,"ulUnicodeRange",2),le([y({type:"char",size:4})],ae.prototype,"achVendID",2),le([y("uint16")],ae.prototype,"fsSelection",2),le([y("uint16")],ae.prototype,"usFirstCharIndex",2),le([y("uint16")],ae.prototype,"usLastCharIndex",2),le([y("int16")],ae.prototype,"sTypoAscender",2),le([y("int16")],ae.prototype,"sTypoDescender",2),le([y("int16")],ae.prototype,"sTypoLineGap",2),le([y("uint16")],ae.prototype,"usWinAscent",2),le([y("uint16")],ae.prototype,"usWinDescent",2),le([y({offset:72,type:"uint8",size:8})],ae.prototype,"ulCodePageRange",2),le([y({offset:72,type:"int16"})],ae.prototype,"sxHeight",2),le([y("int16")],ae.prototype,"sCapHeight",2),le([y("uint16")],ae.prototype,"usDefaultChar",2),le([y("uint16")],ae.prototype,"usBreakChar",2),le([y("uint16")],ae.prototype,"usMaxContext",2),ae=le([Ye("OS/2","os2")],ae);var Wd=Object.defineProperty,Vd=Object.getOwnPropertyDescriptor,Nt=(r,A,e,t)=>{for(var i=t>1?void 0:t?Vd(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(t?n(A,e,i):n(i))||i);return t&&i&&Wd(A,e,i),i};let Ct=class extends Ze{constructor(r=new ArrayBuffer(32),A,e){super(r,A,e)}};Nt([y("fixed")],Ct.prototype,"format",2),Nt([y("fixed")],Ct.prototype,"italicAngle",2),Nt([y("int16")],Ct.prototype,"underlinePosition",2),Nt([y("int16")],Ct.prototype,"underlineThickness",2),Nt([y("uint32")],Ct.prototype,"isFixedPitch",2),Nt([y("uint32")],Ct.prototype,"minMemType42",2),Nt([y("uint32")],Ct.prototype,"maxMemType42",2),Nt([y("uint32")],Ct.prototype,"minMemType1",2),Nt([y("uint32")],Ct.prototype,"maxMemType1",2),Ct=Nt([Ye("post")],Ct);var qd=Object.defineProperty,Xd=Object.getOwnPropertyDescriptor,ot=(r,A,e,t)=>{for(var i=t>1?void 0:t?Xd(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(t?n(A,e,i):n(i))||i);return t&&i&&qd(A,e,i),i};let We=class extends Ze{constructor(r=new ArrayBuffer(36),A){super(r,A,Math.min(36,r.byteLength-(A??0)))}};ot([y("fixed")],We.prototype,"version",2),ot([y("int16")],We.prototype,"vertTypoAscender",2),ot([y("int16")],We.prototype,"vertTypoDescender",2),ot([y("int16")],We.prototype,"vertTypoLineGap",2),ot([y("int16")],We.prototype,"advanceHeightMax",2),ot([y("int16")],We.prototype,"minTopSideBearing",2),ot([y("int16")],We.prototype,"minBottomSideBearing",2),ot([y("int16")],We.prototype,"yMaxExtent",2),ot([y("int16")],We.prototype,"caretSlopeRise",2),ot([y("int16")],We.prototype,"caretSlopeRun",2),ot([y("int16")],We.prototype,"caretOffset",2),ot([y({type:"int16",size:4})],We.prototype,"reserved",2),ot([y("int16")],We.prototype,"metricDataFormat",2),ot([y("int16")],We.prototype,"numOfLongVerMetrics",2),We=ot([Ye("vhea")],We);var jd=Object.getOwnPropertyDescriptor,Zd=(r,A,e,t)=>{for(var i=t>1?void 0:t?jd(A,e):A,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(i)||i);return i};let Jr=class extends Ze{constructor(){super(...arguments);u(this,"_metrics")}static from(A){const e=A.length*4,t=new Jr(new ArrayBuffer(e));return A.forEach(i=>{t.view.writeUint16(i.advanceHeight),t.view.writeInt16(i.topSideBearing)}),t}get metrics(){return this._metrics??(this._metrics=this.readMetrics())}readMetrics(){var s;const A=this._sfnt.maxp.numGlyphs,e=((s=this._sfnt.vhea)==null?void 0:s.numOfLongVerMetrics)??0,t=this.view;t.seek(0);let i=0;return Array.from({length:A}).map((n,o)=>(o<e&&(i=t.readUint16()),{advanceHeight:i,topSideBearing:t.readUint8()}))}};Jr=Zd([Ye("vmtx")],Jr);var $d=Object.defineProperty,Zi=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&$d(A,e,i),i};class Qt extends Rr{constructor(){super(...arguments);u(this,"format","TrueType");u(this,"mimeType","font/ttf");u(this,"_sfnt")}get sfnt(){return this._sfnt||(this._sfnt=this.createSFNT()),this._sfnt}static is(e){return typeof e=="number"?this.signature.has(e):this.signature.has(jA(e).getUint32(0))}static checksum(e){const t=jA(e);let i=t.byteLength;for(;i%4;)i++;let s=0;for(let n=0,o=i/4;n<o;n+=4)n*4<i-4&&(s+=t.getUint32(n*4,!1));return s&4294967295}static from(e){const t=f=>f+3&-4,i=e.tableViews.size,s=Array.from(e.tableViews.values()).reduce((f,I)=>f+t(I.byteLength),0),n=new this(new ArrayBuffer(12+i*16+s));n.scalerType=65536,n.numTables=i;const o=Math.log(2);n.searchRange=Math.floor(Math.log(i)/o)*16,n.entrySelector=Math.floor(n.searchRange/o),n.rangeShift=i*16-n.searchRange;let a=12+i*16,l=0;const h=n.getDirectories();e.tableViews.forEach((f,I)=>{const d=h[l++];d.tag=I,d.checkSum=this.checksum(f),d.offset=a,d.length=f.byteLength,n.view.writeBytes(f,a),a+=t(d.length)});const c=n.createSFNT().head;return c.checkSumAdjustment=0,c.checkSumAdjustment=2981146554-this.checksum(n.view),n}getDirectories(){let e=this.view.byteOffset+12;return Array.from({length:this.numTables},()=>{const t=new ZA(this.view.buffer,e);return e+=t.view.byteLength,t})}createSFNT(){return new DA(this.getDirectories().reduce((e,t)=>(e[t.tag]=new DataView(this.view.buffer,this.view.byteOffset+t.offset,t.length),e),{}))}}u(Qt,"signature",new Set([65536,1953658213,1954115633])),Zi([y("uint32")],Qt.prototype,"scalerType"),Zi([y("uint16")],Qt.prototype,"numTables"),Zi([y("uint16")],Qt.prototype,"searchRange"),Zi([y("uint16")],Qt.prototype,"entrySelector"),Zi([y("uint16")],Qt.prototype,"rangeShift");class Kr extends Qt{constructor(){super(...arguments);u(this,"format","OpenType");u(this,"mimeType","font/otf")}static from(e){return super.from(e)}}u(Kr,"signature",new Set([1330926671]));var eI=Object.defineProperty,$i=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&eI(A,e,i),i};class PA extends ft{constructor(A,e){super(A,e,20)}}$i([y({type:"char",size:4})],PA.prototype,"tag"),$i([y("uint32")],PA.prototype,"offset"),$i([y("uint32")],PA.prototype,"compLength"),$i([y("uint32")],PA.prototype,"origLength"),$i([y("uint32")],PA.prototype,"origChecksum");var tI=Object.defineProperty,dt=(r,A,e,t)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(A,e,i)||i);return i&&tI(A,e,i),i};const ct=(CA=class extends Rr{constructor(){super(...arguments);u(this,"format","WOFF");u(this,"mimeType","font/woff");u(this,"_sfnt")}get subfontFormat(){return Qt.is(this.flavor)?"TrueType":Kr.is(this.flavor)?"OpenType":"Open"}get sfnt(){return this._sfnt||(this._sfnt=this.createSFNT()),this._sfnt}static is(e){return typeof e=="number"?this.signature.has(e):this.signature.has(jA(e).getUint32(0))}static checkSum(e){const t=jA(e),i=t.byteLength,s=Math.floor(i/4);let n=0,o=0;for(;o<s;)n+=t.getUint32(4*o++,!1);let a=i-s*4;if(a){let l=s*4;for(;a>0;)n+=t.getUint8(l)<<a*8,l++,a--}return n%4294967296}static from(e,t=new ArrayBuffer(0)){const i=f=>f+3&-4,s=[];e.tableViews.forEach((f,I)=>{const d=jA(Kf(new Uint8Array(f.buffer,f.byteOffset,f.byteLength)));s.push({tag:I,view:d.byteLength<f.byteLength?d:f,rawView:f})});const n=s.length,o=s.reduce((f,I)=>f+i(I.view.byteLength),0),a=new CA(new ArrayBuffer(44+20*n+o+t.byteLength));a.signature=2001684038,a.flavor=65536,a.length=a.view.byteLength,a.numTables=n,a.totalSFNTSize=12+16*n+s.reduce((f,I)=>f+i(I.rawView.byteLength),0);let l=44+n*20,h=0;const c=a.getDirectories();return s.forEach(f=>{const I=c[h++];I.tag=f.tag,I.offset=l,I.compLength=f.view.byteLength,I.origChecksum=CA.checkSum(f.rawView),I.origLength=f.rawView.byteLength,a.view.writeBytes(f.view,l),l+=i(I.compLength)}),a.view.writeBytes(t),a}getDirectories(){let e=44;return Array.from({length:this.numTables},()=>{const t=new PA(this.view.buffer,e);return e+=t.view.byteLength,t})}createSFNT(){return new DA(this.getDirectories().reduce((e,t)=>{const i=t.tag,s=this.view.byteOffset+t.offset,n=t.compLength,o=t.origLength,a=s+n;return e[i]=n>=o?new DataView(this.view.buffer,s,n):new DataView(Yf(new Uint8Array(this.view.buffer.slice(s,a))).buffer),e},{}))}},u(CA,"signature",new Set([2001684038])),CA);dt([y("uint32")],ct.prototype,"signature"),dt([y("uint32")],ct.prototype,"flavor"),dt([y("uint32")],ct.prototype,"length"),dt([y("uint16")],ct.prototype,"numTables"),dt([y("uint16")],ct.prototype,"reserved"),dt([y("uint32")],ct.prototype,"totalSFNTSize"),dt([y("uint16")],ct.prototype,"majorVersion"),dt([y("uint16")],ct.prototype,"minorVersion"),dt([y("uint32")],ct.prototype,"metaOffset"),dt([y("uint32")],ct.prototype,"metaLength"),dt([y("uint32")],ct.prototype,"metaOrigLength"),dt([y("uint32")],ct.prototype,"privOffset"),dt([y("uint32")],ct.prototype,"privLength");let Yr=ct;function Tl(r,A=!0){if(Qt.is(r))return new Qt(r);if(Kr.is(r))return new Kr(r);if(Yr.is(r))return new Yr(r);if(A)throw new Error("Failed to parseFont")}function Gl(r,A=!0){const e=Tl(r,!1);if(e)return e;if(A)throw new Error("Failed to parseFont")}const os=class os{constructor(){u(this,"fallbackFont");u(this,"loading",new Map);u(this,"loaded",new Map);u(this,"familyToUrl",new Map)}setFallbackFont(A){this.fallbackFont=A}async loadFallbackFont(A,e={}){this.fallbackFont=await this.load(A,e)}_createRequest(A,e){const t=new AbortController;return{url:A,when:fetch(A,{...os.defaultRequestInit,...e,signal:t.signal}).then(i=>i.arrayBuffer()),cancel:()=>t.abort()}}injectFontFace(A,e){return document.fonts.add(new FontFace(A,e)),this}injectStyleTag(A,e){const t=document.createElement("style");return t.appendChild(document.createTextNode(`@font-face {
858
858
  font-family: "${A}";
859
859
  src: url(${e});
860
860
  }`)),document.head.appendChild(t),this}_parseUrls(A){const e=Array.from(new Set([...A.split(","),A]));return Array.from(new Set(e.map(t=>this.familyToUrl.get(t.trim())??this.familyToUrl.get(t)??t)))}get(A){let e;return A&&(e=this._parseUrls(A).reduce((i,s)=>i||this.loaded.get(s),void 0)),e??this.fallbackFont}set(A,e){return this.familyToUrl.set(A,e.src),this.loaded.set(e.src,e),this}delete(A){return this._parseUrls(A).forEach(e=>{this.familyToUrl.delete(e),this.loaded.delete(e)}),this}clear(){return this.familyToUrl.clear(),this.loading.clear(),this.loaded.clear(),this}async load(A,e={}){const{cancelOther:t,injectFontFace:i=!0,injectStyleTag:s=!0,...n}=e;let o,a;if(typeof A=="string"?o=A:{src:o,family:a}=A,this.loaded.has(o))return t&&(this.loading.forEach(I=>I.cancel()),this.loading.clear()),c(this.loaded.get(o));let l=this.loading.get(o);return l||(l=this._createRequest(o,n),this.loading.set(o,l)),t&&this.loading.forEach((I,d)=>{I!==l&&(I.cancel(),this.loading.delete(d))}),l.when.then(I=>{if(this.loaded.has(o))return c(this.loaded.get(o));{const d=f(I);return e.noAdd||this.loaded.set(o,d),d.familySet.forEach(C=>{this.familyToUrl.set(C,o),typeof document<"u"&&(i&&this.injectFontFace(C,I),s&&this.injectStyleTag(C,o))}),d}}).catch(I=>{if(I instanceof DOMException&&I.message==="The user aborted a request.")return f();throw I}).finally(()=>{this.loading.delete(o)});function h(){return a?Array.isArray(a)?a:[a]:[]}function c(I){return h().forEach(d=>{I.familySet.add(d)}),I}function f(I=new ArrayBuffer(0)){let d;function C(){return d||(d=I.byteLength?Gl(I,!1):void 0),d}function p(){const M=C();if(M instanceof Qt||M instanceof Yr)return M.sfnt}return{src:o,family:a,buffer:I,familySet:new Set(h()),getFont:C,getSFNT:p}}}async waitUntilLoad(){await Promise.all(Array.from(this.loading.values()).map(A=>A.when))}};u(os,"defaultRequestInit",{cache:"force-cache"});let zr=os;const Ll=new zr,AI=Object.freeze(Object.defineProperty({__proto__:null,BaseFont:Rr,get Cff(){return xA},get Cmap(){return ei},CmapSubtableFormat0:xn,CmapSubtableFormat12:Pn,CmapSubtableFormat14:ji,CmapSubtableFormat2:Vi,CmapSubtableFormat4:Rn,CmapSubtableFormat6:MA,FontDataObject:ft,FontDataView:Fe,Fonts:zr,get Glyf(){return Gr},Glyph:_n,GlyphSet:bn,get Gpos(){return Nn},get Gsub(){return $t},get Head(){return Re},get Hhea(){return ze},get Hmtx(){return Lr},get Kern(){return Fn},get Loca(){return Or},get Maxp(){return Ge},get Name(){return ti},get Os2(){return ae},get Post(){return Ct},SFNT:DA,TTF:Qt,TableDirectory:ZA,get Vhea(){return We},get Vmtx(){return Jr},WOFF:Yr,WOFFTableDirectoryEntry:PA,createCmapSegments:Mn,dataTypeToByteLength:Yi,defineColumn:y,defineSFNTTable:Ye,fonts:Ll,parseFont:Gl,parseSFNTFont:Tl},Symbol.toStringTag,{value:"Module"}));function Gn(r,A,e){if(typeof A=="string"&&A.startsWith("linear-gradient")){const{x0:t,y0:i,x1:s,y1:n,stops:o}=iI(A,e.left,e.top,e.width,e.height),a=r.createLinearGradient(t,i,s,n);return o.forEach(l=>a.addColorStop(l.offset,l.color)),a}return A}function Wr(r,A,e){r!=null&&r.color&&(r.color=Gn(e,r.color,A)),r!=null&&r.backgroundColor&&(r.backgroundColor=Gn(e,r.backgroundColor,A)),r!=null&&r.textStrokeColor&&(r.textStrokeColor=Gn(e,r.textStrokeColor,A))}function iI(r,A,e,t,i){var I;const s=((I=r.match(/linear-gradient\((.+)\)$/))==null?void 0:I[1])??"",n=s.split(",")[0],o=n.includes("deg")?n:"0deg",a=s.replace(o,"").matchAll(/(#|rgba|rgb)(.+?) ([\d.]+%)/gi),h=(Number(o.replace("deg",""))||0)*Math.PI/180,c=t*Math.sin(h),f=i*Math.cos(h);return{x0:A+t/2-c,y0:e+i/2+f,x1:A+t/2+c,y1:e+i/2-f,stops:Array.from(a).map(d=>{let C=d[2];return C.startsWith("(")?C=C.split(",").length>3?`rgba${C}`:`rgb${C}`:C=`#${C}`,{offset:Number(d[3].replace("%",""))/100,color:C}})}}function Ai(r){const{ctx:A,path:e,fontSize:t,clipRect:i}=r;A.save(),A.beginPath();const s=e.style,n={...s,fill:r.color??s.fill,stroke:r.textStrokeColor??s.stroke,strokeWidth:r.textStrokeWidth?r.textStrokeWidth*t:s.strokeWidth,strokeLinecap:"round",strokeLinejoin:"round",shadowOffsetX:(r.shadowOffsetX??0)*t,shadowOffsetY:(r.shadowOffsetY??0)*t,shadowBlur:(r.shadowBlur??0)*t,shadowColor:r.shadowColor};i&&(A.rect(i.left,i.top,i.width,i.height),A.clip(),A.beginPath()),e.drawTo(A,n),A.restore()}function rI(r,A,e){const{left:t,top:i,width:s,height:n}=e,o=r.canvas;o.dataset.viewBox=`${t} ${i} ${s} ${n}`,o.dataset.pixelRatio=String(A);const a=s,l=n;o.width=Math.max(1,Math.ceil(a*A)),o.height=Math.max(1,Math.ceil(l*A)),o.style.width=`${a}px`,o.style.height=`${l}px`,r.clearRect(0,0,o.width,o.height),r.scale(A,A),r.translate(-t,-i)}function sI(r,A){const{paragraphs:e,computedStyle:t,glyphBox:i}=A;Wr(t,i,r),e.forEach(s=>{Wr(s.computedStyle,s.lineBox,r),s.fragments.forEach(n=>{Wr(n.computedStyle,n.inlineBox,r)})})}const nI=new Set(["©","®","÷"]),oI=new Set(["—","…","“","”","﹏","﹋","﹌","‘","’","˜"]),aI={1:"italic",32:"bold"},lI={1:"italic",2:"bold"},Ol={100:-.2,200:-.1,300:0,400:0,normal:0,500:.1,600:.2,700:.3,bold:.3,800:.4,900:.5};class hI{constructor(A,e,t){u(this,"path",new Ne);u(this,"lineBox",new ce);u(this,"inlineBox",new ce);u(this,"glyphBox");u(this,"advanceWidth",0);u(this,"advanceHeight",0);u(this,"underlinePosition",0);u(this,"underlineThickness",0);u(this,"strikeoutPosition",0);u(this,"strikeoutSize",0);u(this,"ascender",0);u(this,"descender",0);u(this,"typoAscender",0);u(this,"typoDescender",0);u(this,"typoLineGap",0);u(this,"winAscent",0);u(this,"winDescent",0);u(this,"xHeight",0);u(this,"capHeight",0);u(this,"baseline",0);u(this,"centerDiviation",0);u(this,"fontStyle");this.content=A,this.index=e,this.parent=t}get compatibleGlyphBox(){const A=this.computedStyle.fontSize*.8;return this.glyphBox??(this.isVertical?new ce(this.lineBox.left+this.lineBox.width/2-A/2,this.lineBox.top,A,this.lineBox.height):new ce(this.lineBox.left,this.lineBox.top+this.lineBox.height/2-A/2,this.lineBox.width,A))}get center(){return this.compatibleGlyphBox.center}get computedStyle(){return this.parent.computedStyle}get isVertical(){return this.computedStyle.writingMode.includes("vertical")}get fontSize(){return this.computedStyle.fontSize}get fontHeight(){return this.fontSize*this.computedStyle.lineHeight}_getFontSFNT(A){const e=this.computedStyle.fontFamily,t=A??Ll,i=e?t.get(e):t.fallbackFont;return i==null?void 0:i.getSFNT()}updateGlyph(A=this._getFontSFNT()){if(!A)return this;const{hhea:e,os2:t,post:i,head:s}=A,n=s.unitsPerEm,o=e.ascent,a=e.descent,{content:l,computedStyle:h,isVertical:c}=this,{fontSize:f}=h,I=n/f,d=A.getAdvanceWidth(l,f),C=(o+Math.abs(a))/I,p=o/I;return this.advanceWidth=d,this.advanceHeight=C,this.inlineBox.width=c?C:d,this.inlineBox.height=c?d:C,this.underlinePosition=(o-i.underlinePosition)/I,this.underlineThickness=i.underlineThickness/I,this.strikeoutPosition=(o-t.yStrikeoutPosition)/I,this.strikeoutSize=t.yStrikeoutSize/I,this.ascender=o/I,this.descender=a/I,this.typoAscender=t.sTypoAscender/I,this.typoDescender=t.sTypoDescender/I,this.typoLineGap=t.sTypoLineGap/I,this.winAscent=t.usWinAscent/I,this.winDescent=t.usWinDescent/I,this.xHeight=t.sxHeight/I,this.capHeight=t.sCapHeight/I,this.baseline=p,this.centerDiviation=C/2-p,this.fontStyle=aI[t.fsSelection]??lI[s.macStyle],this}update(A){const e=this._getFontSFNT(A);if(!e)return this;this.updateGlyph(e);const{isVertical:t,content:i,computedStyle:s,baseline:n,inlineBox:o,ascender:a,descender:l,typoAscender:h,fontStyle:c,advanceWidth:f,advanceHeight:I}=this,{left:d,top:C}=o,p=s.fontStyle==="italic"&&c!=="italic";let M=d,P=C+n,w;const R=new Ne;if(t&&(M+=(I-f)/2,Math.abs(f-I)>.1&&(P-=(a-h)/(a+Math.abs(l))*I),w=void 0),t&&!nI.has(i)&&(i.codePointAt(0)<=256||oI.has(i))){R.addCommands(e.getPathCommands(i,M,C+n-(I-f)/2,s.fontSize));const m={y:C-(I-f)/2+I/2,x:M+f/2};p&&this._italic(R,t?{x:m.x,y:C-(I-f)/2+n}:void 0),R.rotate(90,m)}else w!==void 0?(R.addCommands(e.glyphs.get(w).getPathCommands(M,P,s.fontSize)),p&&this._italic(R,t?{x:M+f/2,y:C+h/(a+Math.abs(l))*I}:void 0)):(R.addCommands(e.getPathCommands(i,M,P,s.fontSize)),p&&this._italic(R,t?{x:M+I/2,y:P}:void 0));const _=s.fontWeight??400;return _ in Ol&&(_===700||_==="bold")&&c!=="bold"&&R.bold(Ol[_]*s.fontSize*.05),R.style={fill:s.color,stroke:s.textStrokeWidth?s.textStrokeColor:"none",strokeWidth:s.textStrokeWidth?s.textStrokeWidth*s.fontSize*.03:0},this.path=R,this.glyphBox=this.getGlyphBoundingBox(),this}_italic(A,e){A.skew(-.24,0,e||{y:this.inlineBox.top+this.baseline,x:this.inlineBox.left+this.inlineBox.width/2})}getGlyphMinMax(A,e,t){var i;if((i=this.path.curves[0])!=null&&i.curves.length)return this.path.getMinMax(A,e,t)}getGlyphBoundingBox(A){const e=this.getGlyphMinMax(void 0,void 0,A);if(!e)return;const{min:t,max:i}=e;return new ce(t.x,t.y,i.x-t.x,i.y-t.y)}drawTo(A,e={}){const t=this.computedStyle,i={ctx:A,path:this.path,fontSize:t.fontSize,color:t.color,...e};if(this.glyphBox)Ai(i);else{A.save(),A.beginPath();const s=this.path.style,n={...s,fill:i.color??s.fill,stroke:i.textStrokeColor??s.stroke,strokeWidth:i.textStrokeWidth?i.textStrokeWidth*i.fontSize:s.strokeWidth,shadowOffsetX:(i.shadowOffsetX??0)*i.fontSize,shadowOffsetY:(i.shadowOffsetY??0)*i.fontSize,shadowBlur:(i.shadowBlur??0)*i.fontSize,shadowColor:i.shadowColor};$s(A,n),A.font=`${i.fontSize}px ${i.fontFamily}`,this.isVertical?(A.textBaseline="middle",A.fillText(this.content,this.inlineBox.left,this.inlineBox.top+this.inlineBox.height/2)):(A.textBaseline="alphabetic",A.fillText(this.content,this.inlineBox.left,this.inlineBox.top+this.baseline)),A.restore()}}}function Hl(){const r=new Map;async function A(t){if(!r.has(t)){r.set(t,t);try{r.set(t,await fetch(t).then(i=>i.text()))}catch(i){console.warn(i),r.delete(t)}}}function e(t){return t.startsWith("http://")||t.startsWith("https://")||t.startsWith("blob://")}return{loaded:r,needsLoad:e,load:A}}function Jl(r){const A=new Map;function e(t){let i=A.get(t);if(!i){const s=on(r.needsLoad(t)?r.loaded.get(t)??t:t),n=ln(s);i={dom:s,pathSet:n},A.set(t,i)}return i}return{parsed:A,parse:e}}function Ln(r,A){return typeof r=="number"?r:r.endsWith("%")?(r=r.substring(0,r.length-1),Math.ceil(Number(r)/100*A.total)):r.endsWith("rem")?(r=r.substring(0,r.length-3),Number(r)*A.fontSize):r.endsWith("em")?(r=r.substring(0,r.length-2),Number(r)*A.fontSize):Number(r)}function On(r){return he(r)?{}:r}function cI(r,A){const e=Object.keys(r),t=Object.keys(A);return Array.from(new Set([...e,...t])).every(s=>ii(r[s],A[s]))}function ii(r,A){const e=typeof r;return e===typeof A?e==="object"?cI(r,A):r===A:!1}function Hn(r){if(!r)return r;const A={};for(const e in r)r[e]!==""&&r[e]!==void 0&&(A[e]=r[e]);return A}class gI{constructor(A,e={},t){u(this,"inlineBox",new ce);this.content=A,this.style=e,this.parent=t,this.updateComputedStyle().initCharacters()}get computedContent(){const A=this.computedStyle;return A.textTransform==="uppercase"?this.content.toUpperCase():A.textTransform==="lowercase"?this.content.toLowerCase():this.content}updateComputedStyle(){return this.computedStyle={...this.parent.computedStyle,...Hn(this.style)},this}initCharacters(){const A=[];let e=0;for(const t of this.computedContent)A.push(new hI(t,e++,this));return this.characters=A,this}}class er{constructor(A,e){u(this,"lineBox",new ce);u(this,"fragments",[]);this.style=A,this.parentStyle=e,this.updateComputedStyle()}updateComputedStyle(){return this.computedStyle={...Hn(this.parentStyle),...Hn(this.style)},this}addFragment(A,e){const t=new gI(A,e,this);return this.fragments.push(t),t}}function EE(r){return r}const di=class di{_styleToDomStyle(A){const e={};for(const t in A){const i=A[t];di.notZeroStyles.has(t)&&i===0||(typeof i=="number"&&di.pxStyles.has(t)?e[t]=`${i}px`:e[t]=i)}return e}createParagraphDom(A,e){const t=document.createDocumentFragment(),i=document.createElement("section"),s={...e},n=e.writingMode.includes("horizontal");switch(e.textAlign){case"start":case"left":s.justifyContent="flex-start";break;case"center":s.justifyContent="center";break;case"end":case"right":s.justifyContent="flex-end";break}switch(e.verticalAlign){case"top":s.alignItems="flex-start";break;case"middle":s.alignItems="center";break;case"bottom":s.alignItems="flex-end";break}const o=!!(s.justifyContent||s.alignItems);Object.assign(i.style,{...this._styleToDomStyle({...s,boxSizing:s.boxSizing??"border-box",display:s.display??(o?"inline-flex":void 0),width:s.width??"max-content",height:s.height??"max-content"}),whiteSpace:"pre-wrap",wordBreak:"break-all",position:"fixed",visibility:"hidden"});const a=document.createElement("ul");return Object.assign(a.style,{verticalAlign:"inherit",listStyleType:"inherit",padding:"0",margin:"0",width:o&&n?"100%":void 0,height:o&&!n?"100%":void 0}),A.forEach(l=>{const h=document.createElement("li");Object.assign(h.style,{verticalAlign:"inherit",...this._styleToDomStyle(l.style)}),l.fragments.forEach(c=>{const f=document.createElement("span");Object.assign(f.style,{verticalAlign:"inherit",...this._styleToDomStyle(c.style)}),f.appendChild(document.createTextNode(c.content)),h.appendChild(f)}),a.appendChild(h)}),i.appendChild(a),t.appendChild(i),document.body.appendChild(t),{dom:i,destory:()=>{var l;return(l=i.parentNode)==null?void 0:l.removeChild(i)}}}measureDomText(A){const e=document.createRange();e.selectNodeContents(A);const t=A.data??"";let i=0;return Array.from(t).map(s=>{var c;const n=i+=t.substring(i).indexOf(s),o=n+s.length;i+=s.length,e.setStart(A,Math.max(n,0)),e.setEnd(A,o);const a=((c=e.getClientRects)==null?void 0:c.call(e))??[e.getBoundingClientRect()];let l=a[a.length-1];a.length>1&&l.width<2&&(l=a[a.length-2]);const h=e.toString();if(h!==""&&l&&l.width+l.height!==0)return{content:h,top:l.top,left:l.left,height:l.height,width:l.width}}).filter(Boolean)}measureDom(A){const e=[],t=[],i=[];return A.querySelectorAll("li").forEach((s,n)=>{const o=s.getBoundingClientRect();e.push({paragraphIndex:n,left:o.left,top:o.top,width:o.width,height:o.height}),s.querySelectorAll(":scope > *").forEach((a,l)=>{const h=a.getBoundingClientRect();t.push({paragraphIndex:n,fragmentIndex:l,left:h.left,top:h.top,width:h.width,height:h.height});let c=0;!a.children.length&&a.firstChild instanceof window.Text?this.measureDomText(a.firstChild).forEach(f=>{i.push({...f,newParagraphIndex:-1,paragraphIndex:n,fragmentIndex:l,characterIndex:c++,textWidth:-1,textHeight:-1})}):a.querySelectorAll(":scope > *").forEach(f=>{f.firstChild instanceof window.Text&&this.measureDomText(f.firstChild).forEach(I=>{i.push({...I,newParagraphIndex:-1,paragraphIndex:n,fragmentIndex:l,characterIndex:c++,textWidth:-1,textHeight:-1})})})})}),{paragraphs:e,fragments:t,characters:i}}measureParagraphDom(A,e){const t=e.getBoundingClientRect(),i=this.measureDom(e);i.paragraphs.forEach(o=>{const a=A[o.paragraphIndex];a.lineBox.left=o.left-t.left,a.lineBox.top=o.top-t.top,a.lineBox.width=o.width,a.lineBox.height=o.height}),i.fragments.forEach(o=>{const a=A[o.paragraphIndex].fragments[o.fragmentIndex];a.inlineBox.left=o.left-t.left,a.inlineBox.top=o.top-t.top,a.inlineBox.width=o.width,a.inlineBox.height=o.height});const s=[];let n=0;return i.characters.forEach(o=>{const{paragraphIndex:a,fragmentIndex:l,characterIndex:h}=o;s.push({...o,newParagraphIndex:a,left:o.left-t.left,top:o.top-t.top});const c=A[a].fragments[l].characters[h],{fontHeight:f,isVertical:I}=c,d=s[n];c.inlineBox.left=d.left,c.inlineBox.top=d.top,c.inlineBox.width=d.width,c.inlineBox.height=d.height,I?(c.lineBox.left=d.left+(d.width-f)/2,c.lineBox.top=d.top,c.lineBox.width=f,c.lineBox.height=d.height):(c.lineBox.left=d.left,c.lineBox.top=d.top+(d.height-f)/2,c.lineBox.width=d.width,c.lineBox.height=f),n++}),{paragraphs:A,boundingBox:new ce(0,0,t.width,t.height)}}measure(A,e,t){let i;t||({dom:t,destory:i}=this.createParagraphDom(A,e));const s=this.measureParagraphDom(A,t);return i==null||i(),s}};u(di,"notZeroStyles",new Set(["width","height"])),u(di,"pxStyles",new Set(["width","height","fontSize","letterSpacing","textStrokeWidth","textIndent","shadowOffsetX","shadowOffsetY","shadowBlur","margin","marginLeft","marginTop","marginRight","marginBottom","padding","paddingLeft","paddingTop","paddingRight","paddingBottom"]));let Jn=di;class uI{constructor(){u(this,"eventListeners",new Map)}addEventListener(A,e,t){const i={value:e,options:t},s=this.eventListeners.get(A);return s?Array.isArray(s)?s.push(i):this.eventListeners.set(A,[s,i]):this.eventListeners.set(A,i),this}removeEventListener(A,e,t){var s,n;if(!e)return this.eventListeners.delete(A),this;const i=this.eventListeners.get(A);if(!i)return this;if(Array.isArray(i)){const o=[];for(let a=0,l=i.length;a<l;a++){const h=i[a];(h.value!==e||typeof t=="object"&&(t!=null&&t.once)&&(typeof h.options=="boolean"||!((s=h.options)!=null&&s.once)))&&o.push(h)}o.length?this.eventListeners.set(A,o.length===1?o[0]:o):this.eventListeners.delete(A)}else i.value===e&&(typeof t=="boolean"||!(t!=null&&t.once)||typeof i.options=="boolean"||(n=i.options)!=null&&n.once)&&this.eventListeners.delete(A);return this}removeAllListeners(){return this.eventListeners.clear(),this}hasEventListener(A){return this.eventListeners.has(A)}dispatchEvent(A,e){var i,s;const t=this.eventListeners.get(A);if(t){if(Array.isArray(t))for(let n=t.length,o=0;o<n;o++){const a=t[o];typeof a.options=="object"&&((i=a.options)!=null&&i.once)&&this.off(A,a.value,a.options),a.value.apply(this,[e])}else typeof t.options=="object"&&((s=t.options)!=null&&s.once)&&this.off(A,t.value,t.options),t.value.apply(this,[e]);return!0}else return!1}on(A,e,t){return this.addEventListener(A,e,t)}once(A,e){return this.addEventListener(A,e,{once:!0})}off(A,e,t){return this.removeEventListener(A,e,t)}emit(A,e){this.dispatchEvent(A,e)}}function fI(){const r=new oA,A=Hl(),e=Jl(A);return{name:"background",pathSet:r,load:async t=>{const{backgroundImage:i}=t.style;i&&A.needsLoad(i)&&await A.load(i)},update:t=>{r.paths.length=0;const{style:i,lineBox:s,isVertical:n}=t,{backgroundImage:o,backgroundSize:a,backgroundColormap:l}=i;if(he(o))return;const{pathSet:h}=e.parse(o),c=h.getBoundingBox(!0);let f,I,d,C;n?{x:I,y:f,width:C,height:d}=s:{x:f,y:I,width:d,height:C}=s;const p=On(l??"none"),M=h.paths.map(_=>{const m=_.clone();return m.style.fill&&m.style.fill in p&&(m.style.fill=p[m.style.fill]),m.style.stroke&&m.style.stroke in p&&(m.style.stroke=p[m.style.stroke]),m});let P,w;if(a==="rigid"){P=Math.max(t.fontSize*5/c.width),w=P;const _=new G;_.x=c.width-d/P,_.y=c.height-C/w,M.forEach(m=>{m.applyTransform(b=>{const D=b.x>c.left+c.width/2,z=b.y>c.top+c.height/2;D&&(b.x-=_.x),z&&(b.y-=_.y)})})}else P=d/c.width,w=C/c.height;const R=new Ke;R.translate(-c.x,-c.y),R.scale(P,w),n&&(R.translate(-d/2,-C/2),R.rotate(-Math.PI/2),R.translate(C/2,d/2)),R.translate(f,I),M.forEach(_=>{_.applyTransform(m=>{m.applyMatrix3(R)})}),r.paths.push(...M)},renderOrder:-2,render:(t,i)=>{const{boundingBox:s,computedStyle:n}=i;he(n.backgroundColor)||(t.fillStyle=n.backgroundColor,t.fillRect(...s.array)),r.paths.forEach(o=>{if(Ai({ctx:t,path:o,fontSize:n.fontSize}),i.debug){const a=new oA([o]).getBoundingBox();a&&t.strokeRect(a.x,a.y,a.width,a.height)}}),i.paragraphs.forEach(o=>{const{lineBox:a,style:l}=o;he(l.backgroundColor)||(t.fillStyle=l.backgroundColor,t.fillRect(...a.array)),o.fragments.forEach(h=>{const{inlineBox:c,style:f}=h;he(f.backgroundColor)||(t.fillStyle=f.backgroundColor,t.fillRect(...c.array))})})}}}function Kn(r){const{highlight:A,highlightImage:e,highlightReferImage:t,highlightColormap:i,highlightLine:s,highlightSize:n,highlightThickness:o}=r;return{image:(A==null?void 0:A.image)??e??"none",referImage:(A==null?void 0:A.referImage)??t??"none",colormap:(A==null?void 0:A.colormap)??i??"none",line:(A==null?void 0:A.line)??s??"none",size:(A==null?void 0:A.size)??n??"cover",thickness:(A==null?void 0:A.thickness)??o??"100%"}}function dI(){const r=new oA,A=[],e=Hl(),t=Jl(e);return{name:"highlight",pathSet:r,load:async i=>{const s=new Set;i.forEachCharacter(n=>{const{computedStyle:o}=n,{image:a,referImage:l}=Kn(o);a&&e.needsLoad(a)&&s.add(a),l&&e.needsLoad(l)&&s.add(l)}),await Promise.all(Array.from(s).map(n=>e.load(n)))},update:i=>{A.length=0,r.paths.length=0;let s=[],n,o;i.forEachCharacter(a=>{const{computedStyle:l}=a,h=Kn(l),{image:c,colormap:f,line:I,size:d,thickness:C}=h;if(he(c))n!=null&&n.length&&(n=[],s.push(n));else{const{inlineBox:p,isVertical:M}=a,{fontSize:P}=l;(!o||ii(o.image,c)&&ii(o.colormap,f)&&ii(o.line,I)&&ii(o.size,d)&&ii(o.thickness,C))&&(n!=null&&n.length)&&(M?n[0].inlineBox.left===p.left:n[0].inlineBox.top===p.top)&&n[0].fontSize===P?n.push(a):(n=[],n.push(a),s.push(n))}o=h}),s=s.filter(a=>a.length);for(let a=0;a<s.length;a++){const l=s[a],h=l[0],c=ce.from(...l.map(J=>J.compatibleGlyphBox));if(!c.height||!c.width)continue;const{computedStyle:f,isVertical:I,inlineBox:d,compatibleGlyphBox:C,strikeoutPosition:p,underlinePosition:M}=h,{fontSize:P}=f,{image:w,referImage:R,colormap:_,line:m,size:b,thickness:D}=Kn(f),z=Ln(D,{fontSize:P,total:c.width})/c.width,Ae=On(_),{pathSet:V,dom:K}=t.parse(w),te=V.getBoundingBox(!0),W=P/te.width*2,L=new ce().copy(c);I&&(L.width=c.height,L.height=c.width,L.left=c.left+c.width);const se=Math.floor(L.width);let H=se;b!=="cover"&&(H=Ln(b,{fontSize:P,total:c.width})||se,L.width=H);const q=!he(R)&&he(m);if(q)te.copy(t.parse(R).pathSet.getBoundingBox(!0));else{let J;if(he(m))if(te.width/te.height>4){J="underline";const $=K.getAttribute("viewBox");if($){const[N,U,X,ee]=$.split(" ").map(j=>Number(j)),oe=U+ee/2;te.y<oe&&te.y+te.height>oe?J="line-through":te.y+te.height<oe?J="overline":J="underline"}}else J="outline";else J=m;switch(J){case"outline":{const $=L.width*.2,N=L.height*.2;I?(L.x-=N/2,L.y-=$/2,L.x-=L.height):(L.x-=$/2,L.y-=N/2),L.width+=$,L.height+=N;break}case"overline":L.height=te.height*W,I?L.x=d.left+d.width:L.y=d.top;break;case"line-through":L.height=te.height*W,I?L.x=d.left+d.width-p+L.height/2:L.y=d.top+p-L.height/2;break;case"underline":L.height=te.height*W,I?L.x=C.left+C.width-M:L.y=d.top+M;break}}const ie=new Ke;if(ie.translate(-te.x,-te.y),ie.scale(L.width/te.width,L.height/te.height),I){const J=L.width/2,$=L.height/2;q||ie.translate(-J,-$),ie.rotate(-Math.PI/2),q||ie.translate($,J)}ie.translate(L.x,L.y);for(let J=0;J<Math.ceil(se/H);J++){const $=ie.clone();I?$.translate(0,J*L.width):$.translate(J*L.width,0),V.paths.forEach(N=>{const U=N.clone().applyTransform($);U.style.strokeWidth&&(U.style.strokeWidth*=W*z),U.style.strokeMiterlimit&&(U.style.strokeMiterlimit*=W),U.style.strokeDashoffset&&(U.style.strokeDashoffset*=W),U.style.strokeDasharray&&(U.style.strokeDasharray=U.style.strokeDasharray.map(X=>X*W)),U.style.fill&&U.style.fill in Ae&&(U.style.fill=Ae[U.style.fill]),U.style.stroke&&U.style.stroke in Ae&&(U.style.stroke=Ae[U.style.stroke]),r.paths.push(U),se!==H&&(I?A[r.paths.length-1]=new ce(c.left-c.width*2,c.top,c.width*4,c.height):A[r.paths.length-1]=new ce(c.left,c.top-c.height*2,c.width,c.height*4))})}}},renderOrder:-1,getBoundingBox:()=>{const i=[];return r.paths.forEach((s,n)=>{const o=A[n];let a=s.getBoundingBox();if(o){const l=Math.max(a.x,o.x),h=Math.max(a.y,o.y),c=Math.min(a.right,o.right),f=Math.min(a.bottom,o.bottom);a=new ce(l,h,c-l,f-h)}i.push(a)}),ce.from(...i)},render:(i,s)=>{r.paths.forEach((n,o)=>{if(Ai({ctx:i,path:n,fontSize:s.computedStyle.fontSize,clipRect:A[o]}),s.debug){const a=new oA([n]).getBoundingBox();a&&i.strokeRect(a.x,a.y,a.width,a.height)}})}}}function II(r,A){return`<svg width="${r*2}" height="${r*2}" xmlns="http://www.w3.org/2000/svg">
package/dist/index.mjs CHANGED
@@ -9264,7 +9264,7 @@ class BaseElement2DShape extends CoreObject {
9264
9264
  super._updateProperty(key, value, oldValue, declaration);
9265
9265
  switch (key) {
9266
9266
  case "svg":
9267
- case "data":
9267
+ case "paths":
9268
9268
  case "viewBox":
9269
9269
  this._updatePath2DSet();
9270
9270
  this.parent.requestRedraw();
@@ -9279,7 +9279,7 @@ class BaseElement2DShape extends CoreObject {
9279
9279
  viewBox = this._path2DSet.viewBox ?? this.viewBox;
9280
9280
  } else {
9281
9281
  viewBox = this.viewBox;
9282
- this.data?.forEach((path, i) => {
9282
+ this.paths?.forEach((path, i) => {
9283
9283
  const { data, ...style } = path;
9284
9284
  const path2D = new Path2D();
9285
9285
  path2D.style = style;
@@ -9327,7 +9327,7 @@ __decorateClass$p([
9327
9327
  ], BaseElement2DShape.prototype, "viewBox");
9328
9328
  __decorateClass$p([
9329
9329
  property({ default: () => [] })
9330
- ], BaseElement2DShape.prototype, "data");
9330
+ ], BaseElement2DShape.prototype, "paths");
9331
9331
 
9332
9332
  class BaseElement2DStyle extends Resource {
9333
9333
  constructor(properties) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "modern-canvas",
3
3
  "type": "module",
4
- "version": "0.4.47",
4
+ "version": "0.4.48",
5
5
  "packageManager": "pnpm@9.15.1",
6
6
  "description": "A JavaScript WebGL rendering engine.",
7
7
  "author": "wxm",