@xterm/addon-ligatures 0.11.0-beta.26 → 0.11.0-beta.261

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.
@@ -14,6 +14,7 @@
14
14
  * Copyright (c) Microsoft Corporation. All rights reserved.
15
15
  * Licensed under the MIT License. See License.txt in the project root for license information.
16
16
  *--------------------------------------------------------------------------------------------*/
17
- var rl=Object.create;var Fa=Object.defineProperty;var tl=Object.getOwnPropertyDescriptor;var nl=Object.getOwnPropertyNames;var al=Object.getPrototypeOf,sl=Object.prototype.hasOwnProperty;var me=(s=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(s,{get:(o,c)=>(typeof require<"u"?require:o)[c]}):s)(function(s){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+s+'" is not supported')});var q=(s,o)=>()=>(o||s((o={exports:{}}).exports,o),o.exports);var il=(s,o,c,h)=>{if(o&&typeof o=="object"||typeof o=="function")for(let p of nl(o))!sl.call(s,p)&&p!==c&&Fa(s,p,{get:()=>o[p],enumerable:!(h=tl(o,p))||h.enumerable});return s};var ol=(s,o,c)=>(c=s!=null?rl(al(s)):{},il(o||!s||!s.__esModule?Fa(c,"default",{value:s,enumerable:!0}):c,s));var Ua=q((Pr,Ta)=>{(function(s,o){typeof Pr=="object"&&typeof Ta<"u"?o(Pr):typeof define=="function"&&define.amd?define(["exports"],o):o(s.opentype=s.opentype||{})})(Pr,(function(s){"use strict";var o=0,c=-3;function h(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function p(e,r){this.source=e,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=r,this.destLen=0,this.ltree=new h,this.dtree=new h}var m=new h,b=new h,F=new Uint8Array(30),U=new Uint16Array(30),I=new Uint8Array(30),z=new Uint16Array(30),B=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),W=new h,X=new Uint8Array(320);function Z(e,r,t,n){var a,i;for(a=0;a<t;++a)e[a]=0;for(a=0;a<30-t;++a)e[a+t]=a/t|0;for(i=n,a=0;a<30;++a)r[a]=i,i+=1<<e[a]}function xe(e,r){var t;for(t=0;t<7;++t)e.table[t]=0;for(e.table[7]=24,e.table[8]=152,e.table[9]=112,t=0;t<24;++t)e.trans[t]=256+t;for(t=0;t<144;++t)e.trans[24+t]=t;for(t=0;t<8;++t)e.trans[168+t]=280+t;for(t=0;t<112;++t)e.trans[176+t]=144+t;for(t=0;t<5;++t)r.table[t]=0;for(r.table[5]=32,t=0;t<32;++t)r.trans[t]=t}var Ne=new Uint16Array(16);function Ee(e,r,t,n){var a,i;for(a=0;a<16;++a)e.table[a]=0;for(a=0;a<n;++a)e.table[r[t+a]]++;for(e.table[0]=0,i=0,a=0;a<16;++a)Ne[a]=i,i+=e.table[a];for(a=0;a<n;++a)r[t+a]&&(e.trans[Ne[r[t+a]]++]=a)}function yr(e){e.bitcount--||(e.tag=e.source[e.sourceIndex++],e.bitcount=7);var r=e.tag&1;return e.tag>>>=1,r}function ue(e,r,t){if(!r)return t;for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var n=e.tag&65535>>>16-r;return e.tag>>>=r,e.bitcount-=r,n+t}function Qr(e,r){for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var t=0,n=0,a=0,i=e.tag;do n=2*n+(i&1),i>>>=1,++a,t+=r.table[a],n-=r.table[a];while(n>=0);return e.tag=i,e.bitcount-=a,r.trans[t+n]}function ks(e,r,t){var n,a,i,u,f,l;for(n=ue(e,5,257),a=ue(e,5,1),i=ue(e,4,4),u=0;u<19;++u)X[u]=0;for(u=0;u<i;++u){var d=ue(e,3,0);X[B[u]]=d}for(Ee(W,X,0,19),f=0;f<n+a;){var v=Qr(e,W);switch(v){case 16:var x=X[f-1];for(l=ue(e,2,3);l;--l)X[f++]=x;break;case 17:for(l=ue(e,3,3);l;--l)X[f++]=0;break;case 18:for(l=ue(e,7,11);l;--l)X[f++]=0;break;default:X[f++]=v;break}}Ee(r,X,0,n),Ee(t,X,n,a)}function tn(e,r,t){for(;;){var n=Qr(e,r);if(n===256)return o;if(n<256)e.dest[e.destLen++]=n;else{var a,i,u,f;for(n-=257,a=ue(e,F[n],U[n]),i=Qr(e,t),u=e.destLen-ue(e,I[i],z[i]),f=u;f<u+a;++f)e.dest[e.destLen++]=e.dest[f]}}}function Os(e){for(var r,t,n;e.bitcount>8;)e.sourceIndex--,e.bitcount-=8;if(r=e.source[e.sourceIndex+1],r=256*r+e.source[e.sourceIndex],t=e.source[e.sourceIndex+3],t=256*t+e.source[e.sourceIndex+2],r!==(~t&65535))return c;for(e.sourceIndex+=4,n=r;n;--n)e.dest[e.destLen++]=e.source[e.sourceIndex++];return e.bitcount=0,o}function ws(e,r){var t=new p(e,r),n,a,i;do{switch(n=yr(t),a=ue(t,2,0),a){case 0:i=Os(t);break;case 1:i=tn(t,m,b);break;case 2:ks(t,t.ltree,t.dtree),i=tn(t,t.ltree,t.dtree);break;default:i=c}if(i!==o)throw new Error("Data error")}while(!n);return t.destLen<t.dest.length?typeof t.dest.slice=="function"?t.dest.slice(0,t.destLen):t.dest.subarray(0,t.destLen):t.dest}xe(m,b),Z(F,U,4,3),Z(I,z,2,1),F[28]=0,U[28]=258;var Cs=ws;function Ze(e,r,t,n,a){return Math.pow(1-a,3)*e+3*Math.pow(1-a,2)*a*r+3*(1-a)*Math.pow(a,2)*t+Math.pow(a,3)*n}function we(){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN}we.prototype.isEmpty=function(){return isNaN(this.x1)||isNaN(this.y1)||isNaN(this.x2)||isNaN(this.y2)},we.prototype.addPoint=function(e,r){typeof e=="number"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),e<this.x1&&(this.x1=e),e>this.x2&&(this.x2=e)),typeof r=="number"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=r,this.y2=r),r<this.y1&&(this.y1=r),r>this.y2&&(this.y2=r))},we.prototype.addX=function(e){this.addPoint(e,null)},we.prototype.addY=function(e){this.addPoint(null,e)},we.prototype.addBezier=function(e,r,t,n,a,i,u,f){var l=this,d=[e,r],v=[t,n],x=[a,i],g=[u,f];this.addPoint(e,r),this.addPoint(u,f);for(var y=0;y<=1;y++){var T=6*d[y]-12*v[y]+6*x[y],w=-3*d[y]+9*v[y]-9*x[y]+3*g[y],E=3*v[y]-3*d[y];if(w===0){if(T===0)continue;var O=-E/T;0<O&&O<1&&(y===0&&l.addX(Ze(d[y],v[y],x[y],g[y],O)),y===1&&l.addY(Ze(d[y],v[y],x[y],g[y],O)));continue}var G=Math.pow(T,2)-4*E*w;if(!(G<0)){var C=(-T+Math.sqrt(G))/(2*w);0<C&&C<1&&(y===0&&l.addX(Ze(d[y],v[y],x[y],g[y],C)),y===1&&l.addY(Ze(d[y],v[y],x[y],g[y],C)));var _=(-T-Math.sqrt(G))/(2*w);0<_&&_<1&&(y===0&&l.addX(Ze(d[y],v[y],x[y],g[y],_)),y===1&&l.addY(Ze(d[y],v[y],x[y],g[y],_)))}}},we.prototype.addQuad=function(e,r,t,n,a,i){var u=e+.6666666666666666*(t-e),f=r+2/3*(n-r),l=u+1/3*(a-e),d=f+1/3*(i-r);this.addBezier(e,r,u,f,l,d,a,i)};function Q(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}Q.prototype.moveTo=function(e,r){this.commands.push({type:"M",x:e,y:r})},Q.prototype.lineTo=function(e,r){this.commands.push({type:"L",x:e,y:r})},Q.prototype.curveTo=Q.prototype.bezierCurveTo=function(e,r,t,n,a,i){this.commands.push({type:"C",x1:e,y1:r,x2:t,y2:n,x:a,y:i})},Q.prototype.quadTo=Q.prototype.quadraticCurveTo=function(e,r,t,n){this.commands.push({type:"Q",x1:e,y1:r,x:t,y:n})},Q.prototype.close=Q.prototype.closePath=function(){this.commands.push({type:"Z"})},Q.prototype.extend=function(e){if(e.commands)e=e.commands;else if(e instanceof we){var r=e;this.moveTo(r.x1,r.y1),this.lineTo(r.x2,r.y1),this.lineTo(r.x2,r.y2),this.lineTo(r.x1,r.y2),this.close();return}Array.prototype.push.apply(this.commands,e)},Q.prototype.getBoundingBox=function(){for(var e=this,r=new we,t=0,n=0,a=0,i=0,u=0;u<this.commands.length;u++){var f=e.commands[u];switch(f.type){case"M":r.addPoint(f.x,f.y),t=a=f.x,n=i=f.y;break;case"L":r.addPoint(f.x,f.y),a=f.x,i=f.y;break;case"Q":r.addQuad(a,i,f.x1,f.y1,f.x,f.y),a=f.x,i=f.y;break;case"C":r.addBezier(a,i,f.x1,f.y1,f.x2,f.y2,f.x,f.y),a=f.x,i=f.y;break;case"Z":a=t,i=n;break;default:throw new Error("Unexpected path command "+f.type)}}return r.isEmpty()&&r.addPoint(0,0),r},Q.prototype.draw=function(e){var r=this;e.beginPath();for(var t=0;t<this.commands.length;t+=1){var n=r.commands[t];n.type==="M"?e.moveTo(n.x,n.y):n.type==="L"?e.lineTo(n.x,n.y):n.type==="C"?e.bezierCurveTo(n.x1,n.y1,n.x2,n.y2,n.x,n.y):n.type==="Q"?e.quadraticCurveTo(n.x1,n.y1,n.x,n.y):n.type==="Z"&&e.closePath()}this.fill&&(e.fillStyle=this.fill,e.fill()),this.stroke&&(e.strokeStyle=this.stroke,e.lineWidth=this.strokeWidth,e.stroke())},Q.prototype.toPathData=function(e){var r=this;e=e!==void 0?e:2;function t(f){return Math.round(f)===f?""+Math.round(f):f.toFixed(e)}function n(){for(var f=arguments,l="",d=0;d<arguments.length;d+=1){var v=f[d];v>=0&&d>0&&(l+=" "),l+=t(v)}return l}for(var a="",i=0;i<this.commands.length;i+=1){var u=r.commands[i];u.type==="M"?a+="M"+n(u.x,u.y):u.type==="L"?a+="L"+n(u.x,u.y):u.type==="C"?a+="C"+n(u.x1,u.y1,u.x2,u.y2,u.x,u.y):u.type==="Q"?a+="Q"+n(u.x1,u.y1,u.x,u.y):u.type==="Z"&&(a+="Z")}return a},Q.prototype.toSVG=function(e){var r='<path d="';return r+=this.toPathData(e),r+='"',this.fill&&this.fill!=="black"&&(this.fill===null?r+=' fill="none"':r+=' fill="'+this.fill+'"'),this.stroke&&(r+=' stroke="'+this.stroke+'" stroke-width="'+this.strokeWidth+'"'),r+="/>",r},Q.prototype.toDOMElement=function(e){var r=this.toPathData(e),t=document.createElementNS("http://www.w3.org/2000/svg","path");return t.setAttribute("d",r),t};function nn(e){throw new Error(e)}function an(e,r){e||nn(r)}var N={fail:nn,argument:an,assert:an},sn=32768,on=2147483648,Qe={},k={},P={};function be(e){return function(){return e}}k.BYTE=function(e){return N.argument(e>=0&&e<=255,"Byte value should be between 0 and 255."),[e]},P.BYTE=be(1),k.CHAR=function(e){return[e.charCodeAt(0)]},P.CHAR=be(1),k.CHARARRAY=function(e){for(var r=[],t=0;t<e.length;t+=1)r[t]=e.charCodeAt(t);return r},P.CHARARRAY=function(e){return e.length},k.USHORT=function(e){return[e>>8&255,e&255]},P.USHORT=be(2),k.SHORT=function(e){return e>=sn&&(e=-(2*sn-e)),[e>>8&255,e&255]},P.SHORT=be(2),k.UINT24=function(e){return[e>>16&255,e>>8&255,e&255]},P.UINT24=be(3),k.ULONG=function(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]},P.ULONG=be(4),k.LONG=function(e){return e>=on&&(e=-(2*on-e)),[e>>24&255,e>>16&255,e>>8&255,e&255]},P.LONG=be(4),k.FIXED=k.ULONG,P.FIXED=P.ULONG,k.FWORD=k.SHORT,P.FWORD=P.SHORT,k.UFWORD=k.USHORT,P.UFWORD=P.USHORT,k.LONGDATETIME=function(e){return[0,0,0,0,e>>24&255,e>>16&255,e>>8&255,e&255]},P.LONGDATETIME=be(8),k.TAG=function(e){return N.argument(e.length===4,"Tag should be exactly 4 ASCII characters."),[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]},P.TAG=be(4),k.Card8=k.BYTE,P.Card8=P.BYTE,k.Card16=k.USHORT,P.Card16=P.USHORT,k.OffSize=k.BYTE,P.OffSize=P.BYTE,k.SID=k.USHORT,P.SID=P.USHORT,k.NUMBER=function(e){return e>=-107&&e<=107?[e+139]:e>=108&&e<=1131?(e=e-108,[(e>>8)+247,e&255]):e>=-1131&&e<=-108?(e=-e-108,[(e>>8)+251,e&255]):e>=-32768&&e<=32767?k.NUMBER16(e):k.NUMBER32(e)},P.NUMBER=function(e){return k.NUMBER(e).length},k.NUMBER16=function(e){return[28,e>>8&255,e&255]},P.NUMBER16=be(3),k.NUMBER32=function(e){return[29,e>>24&255,e>>16&255,e>>8&255,e&255]},P.NUMBER32=be(5),k.REAL=function(e){var r=e.toString(),t=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(r);if(t){var n=parseFloat("1e"+((t[2]?+t[2]:0)+t[1].length));r=(Math.round(e*n)/n).toString()}for(var a="",i=0,u=r.length;i<u;i+=1){var f=r[i];f==="e"?a+=r[++i]==="-"?"c":"b":f==="."?a+="a":f==="-"?a+="e":a+=f}a+=a.length&1?"f":"ff";for(var l=[30],d=0,v=a.length;d<v;d+=2)l.push(parseInt(a.substr(d,2),16));return l},P.REAL=function(e){return k.REAL(e).length},k.NAME=k.CHARARRAY,P.NAME=P.CHARARRAY,k.STRING=k.CHARARRAY,P.STRING=P.CHARARRAY,Qe.UTF8=function(e,r,t){for(var n=[],a=t,i=0;i<a;i++,r+=1)n[i]=e.getUint8(r);return String.fromCharCode.apply(null,n)},Qe.UTF16=function(e,r,t){for(var n=[],a=t/2,i=0;i<a;i++,r+=2)n[i]=e.getUint16(r);return String.fromCharCode.apply(null,n)},k.UTF16=function(e){for(var r=[],t=0;t<e.length;t+=1){var n=e.charCodeAt(t);r[r.length]=n>>8&255,r[r.length]=n&255}return r},P.UTF16=function(e){return e.length*2};var Jr={"x-mac-croatian":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\u0160\u2122\xB4\xA8\u2260\u017D\xD8\u221E\xB1\u2264\u2265\u2206\xB5\u2202\u2211\u220F\u0161\u222B\xAA\xBA\u03A9\u017E\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u0106\xAB\u010C\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u0110\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\uF8FF\xA9\u2044\u20AC\u2039\u203A\xC6\xBB\u2013\xB7\u201A\u201E\u2030\xC2\u0107\xC1\u010D\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u0111\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u03C0\xCB\u02DA\xB8\xCA\xE6\u02C7","x-mac-cyrillic":"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u2020\xB0\u0490\xA3\xA7\u2022\xB6\u0406\xAE\xA9\u2122\u0402\u0452\u2260\u0403\u0453\u221E\xB1\u2264\u2265\u0456\xB5\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040A\u045A\u0458\u0405\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\u040B\u045B\u040C\u045C\u0455\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u201E\u040E\u045E\u040F\u045F\u2116\u0401\u0451\u044F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E","x-mac-gaelic":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u1E02\xB1\u2264\u2265\u1E03\u010A\u010B\u1E0A\u1E0B\u1E1E\u1E1F\u0120\u0121\u1E40\xE6\xF8\u1E41\u1E56\u1E57\u027C\u0192\u017F\u1E60\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\u1E61\u1E9B\xFF\u0178\u1E6A\u20AC\u2039\u203A\u0176\u0177\u1E6B\xB7\u1EF2\u1EF3\u204A\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u2663\xD2\xDA\xDB\xD9\u0131\xDD\xFD\u0174\u0175\u1E84\u1E85\u1E80\u1E81\u1E82\u1E83","x-mac-greek":"\xC4\xB9\xB2\xC9\xB3\xD6\xDC\u0385\xE0\xE2\xE4\u0384\xA8\xE7\xE9\xE8\xEA\xEB\xA3\u2122\xEE\xEF\u2022\xBD\u2030\xF4\xF6\xA6\u20AC\xF9\xFB\xFC\u2020\u0393\u0394\u0398\u039B\u039E\u03A0\xDF\xAE\xA9\u03A3\u03AA\xA7\u2260\xB0\xB7\u0391\xB1\u2264\u2265\xA5\u0392\u0395\u0396\u0397\u0399\u039A\u039C\u03A6\u03AB\u03A8\u03A9\u03AC\u039D\xAC\u039F\u03A1\u2248\u03A4\xAB\xBB\u2026\xA0\u03A5\u03A7\u0386\u0388\u0153\u2013\u2015\u201C\u201D\u2018\u2019\xF7\u0389\u038A\u038C\u038E\u03AD\u03AE\u03AF\u03CC\u038F\u03CD\u03B1\u03B2\u03C8\u03B4\u03B5\u03C6\u03B3\u03B7\u03B9\u03BE\u03BA\u03BB\u03BC\u03BD\u03BF\u03C0\u03CE\u03C1\u03C3\u03C4\u03B8\u03C9\u03C2\u03C7\u03C5\u03B6\u03CA\u03CB\u0390\u03B0\xAD","x-mac-icelandic":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\xDD\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\xD0\xF0\xDE\xFE\xFD\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-inuit":"\u1403\u1404\u1405\u1406\u140A\u140B\u1431\u1432\u1433\u1434\u1438\u1439\u1449\u144E\u144F\u1450\u1451\u1455\u1456\u1466\u146D\u146E\u146F\u1470\u1472\u1473\u1483\u148B\u148C\u148D\u148E\u1490\u1491\xB0\u14A1\u14A5\u14A6\u2022\xB6\u14A7\xAE\xA9\u2122\u14A8\u14AA\u14AB\u14BB\u14C2\u14C3\u14C4\u14C5\u14C7\u14C8\u14D0\u14EF\u14F0\u14F1\u14F2\u14F4\u14F5\u1505\u14D5\u14D6\u14D7\u14D8\u14DA\u14DB\u14EA\u1528\u1529\u152A\u152B\u152D\u2026\xA0\u152E\u153E\u1555\u1556\u1557\u2013\u2014\u201C\u201D\u2018\u2019\u1558\u1559\u155A\u155D\u1546\u1547\u1548\u1549\u154B\u154C\u1550\u157F\u1580\u1581\u1582\u1583\u1584\u1585\u158F\u1590\u1591\u1592\u1593\u1594\u1595\u1671\u1672\u1673\u1674\u1675\u1676\u1596\u15A0\u15A1\u15A2\u15A3\u15A4\u15A5\u15A6\u157C\u0141\u0142","x-mac-ce":"\xC4\u0100\u0101\xC9\u0104\xD6\xDC\xE1\u0105\u010C\xE4\u010D\u0106\u0107\xE9\u0179\u017A\u010E\xED\u010F\u0112\u0113\u0116\xF3\u0117\xF4\xF6\xF5\xFA\u011A\u011B\xFC\u2020\xB0\u0118\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\u0119\xA8\u2260\u0123\u012E\u012F\u012A\u2264\u2265\u012B\u0136\u2202\u2211\u0142\u013B\u013C\u013D\u013E\u0139\u013A\u0145\u0146\u0143\xAC\u221A\u0144\u0147\u2206\xAB\xBB\u2026\xA0\u0148\u0150\xD5\u0151\u014C\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\u014D\u0154\u0155\u0158\u2039\u203A\u0159\u0156\u0157\u0160\u201A\u201E\u0161\u015A\u015B\xC1\u0164\u0165\xCD\u017D\u017E\u016A\xD3\xD4\u016B\u016E\xDA\u016F\u0170\u0171\u0172\u0173\xDD\xFD\u0137\u017B\u0141\u017C\u0122\u02C7",macintosh:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-romanian":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\u0102\u0218\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\u0103\u0219\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\u2039\u203A\u021A\u021B\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-turkish":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u011E\u011F\u0130\u0131\u015E\u015F\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\uF8A0\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"};Qe.MACSTRING=function(e,r,t,n){var a=Jr[n];if(a!==void 0){for(var i="",u=0;u<t;u++){var f=e.getUint8(r+u);f<=127?i+=String.fromCharCode(f):i+=a[f&127]}return i}};var xr=typeof WeakMap=="function"&&new WeakMap,br,Ls=function(e){if(!br){br={};for(var r in Jr)br[r]=new String(r)}var t=br[e];if(t!==void 0){if(xr){var n=xr.get(t);if(n!==void 0)return n}var a=Jr[e];if(a!==void 0){for(var i={},u=0;u<a.length;u++)i[a.charCodeAt(u)]=u+128;return xr&&xr.set(t,i),i}}};k.MACSTRING=function(e,r){var t=Ls(r);if(t!==void 0){for(var n=[],a=0;a<e.length;a++){var i=e.charCodeAt(a);if(i>=128&&(i=t[i],i===void 0))return;n[a]=i}return n}},P.MACSTRING=function(e,r){var t=k.MACSTRING(e,r);return t!==void 0?t.length:0};function Kr(e){return e>=-128&&e<=127}function Is(e,r,t){for(var n=0,a=e.length;r<a&&n<64&&e[r]===0;)++r,++n;return t.push(128|n-1),r}function As(e,r,t){for(var n=0,a=e.length,i=r;i<a&&n<64;){var u=e[i];if(!Kr(u)||u===0&&i+1<a&&e[i+1]===0)break;++i,++n}t.push(n-1);for(var f=r;f<i;++f)t.push(e[f]+256&255);return i}function Bs(e,r,t){for(var n=0,a=e.length,i=r;i<a&&n<64;){var u=e[i];if(u===0||Kr(u)&&i+1<a&&Kr(e[i+1]))break;++i,++n}t.push(64|n-1);for(var f=r;f<i;++f){var l=e[f];t.push(l+65536>>8&255,l+256&255)}return i}k.VARDELTAS=function(e){for(var r=0,t=[];r<e.length;){var n=e[r];n===0?r=Is(e,r,t):n>=-128&&n<=127?r=As(e,r,t):r=Bs(e,r,t)}return t},k.INDEX=function(e){for(var r=1,t=[r],n=[],a=0;a<e.length;a+=1){var i=k.OBJECT(e[a]);Array.prototype.push.apply(n,i),r+=i.length,t.push(r)}if(n.length===0)return[0,0];for(var u=[],f=1+Math.floor(Math.log(r)/Math.log(2))/8|0,l=[void 0,k.BYTE,k.USHORT,k.UINT24,k.ULONG][f],d=0;d<t.length;d+=1){var v=l(t[d]);Array.prototype.push.apply(u,v)}return Array.prototype.concat(k.Card16(e.length),k.OffSize(f),u,n)},P.INDEX=function(e){return k.INDEX(e).length},k.DICT=function(e){for(var r=[],t=Object.keys(e),n=t.length,a=0;a<n;a+=1){var i=parseInt(t[a],0),u=e[i];r=r.concat(k.OPERAND(u.value,u.type)),r=r.concat(k.OPERATOR(i))}return r},P.DICT=function(e){return k.DICT(e).length},k.OPERATOR=function(e){return e<1200?[e]:[12,e-1200]},k.OPERAND=function(e,r){var t=[];if(Array.isArray(r))for(var n=0;n<r.length;n+=1)N.argument(e.length===r.length,"Not enough arguments given for type"+r),t=t.concat(k.OPERAND(e[n],r[n]));else if(r==="SID")t=t.concat(k.NUMBER(e));else if(r==="offset")t=t.concat(k.NUMBER32(e));else if(r==="number")t=t.concat(k.NUMBER(e));else if(r==="real")t=t.concat(k.REAL(e));else throw new Error("Unknown operand type "+r);return t},k.OP=k.BYTE,P.OP=P.BYTE;var Sr=typeof WeakMap=="function"&&new WeakMap;k.CHARSTRING=function(e){if(Sr){var r=Sr.get(e);if(r!==void 0)return r}for(var t=[],n=e.length,a=0;a<n;a+=1){var i=e[a];t=t.concat(k[i.type](i.value))}return Sr&&Sr.set(e,t),t},P.CHARSTRING=function(e){return k.CHARSTRING(e).length},k.OBJECT=function(e){var r=k[e.type];return N.argument(r!==void 0,"No encoding function for type "+e.type),r(e.value)},P.OBJECT=function(e){var r=P[e.type];return N.argument(r!==void 0,"No sizeOf function for type "+e.type),r(e.value)},k.TABLE=function(e){for(var r=[],t=e.fields.length,n=[],a=[],i=0;i<t;i+=1){var u=e.fields[i],f=k[u.type];N.argument(f!==void 0,"No encoding function for field type "+u.type+" ("+u.name+")");var l=e[u.name];l===void 0&&(l=u.value);var d=f(l);u.type==="TABLE"?(a.push(r.length),r=r.concat([0,0]),n.push(d)):r=r.concat(d)}for(var v=0;v<n.length;v+=1){var x=a[v],g=r.length;N.argument(g<65536,"Table "+e.tableName+" too big."),r[x]=g>>8,r[x+1]=g&255,r=r.concat(n[v])}return r},P.TABLE=function(e){for(var r=0,t=e.fields.length,n=0;n<t;n+=1){var a=e.fields[n],i=P[a.type];N.argument(i!==void 0,"No sizeOf function for field type "+a.type+" ("+a.name+")");var u=e[a.name];u===void 0&&(u=a.value),r+=i(u),a.type==="TABLE"&&(r+=2)}return r},k.RECORD=k.TABLE,P.RECORD=P.TABLE,k.LITERAL=function(e){return e},P.LITERAL=function(e){return e.length};function te(e,r,t){for(var n=this,a=0;a<r.length;a+=1){var i=r[a];n[i.name]=i.value}if(this.tableName=e,this.fields=r,t)for(var u=Object.keys(t),f=0;f<u.length;f+=1){var l=u[f],d=t[l];n[l]!==void 0&&(n[l]=d)}}te.prototype.encode=function(){return k.TABLE(this)},te.prototype.sizeOf=function(){return P.TABLE(this)};function or(e,r,t){t===void 0&&(t=r.length);var n=new Array(r.length+1);n[0]={name:e+"Count",type:"USHORT",value:t};for(var a=0;a<r.length;a++)n[a+1]={name:e+a,type:"USHORT",value:r[a]};return n}function $r(e,r,t){var n=r.length,a=new Array(n+1);a[0]={name:e+"Count",type:"USHORT",value:n};for(var i=0;i<n;i++)a[i+1]={name:e+i,type:"TABLE",value:t(r[i],i)};return a}function Fr(e,r,t){var n=r.length,a=[];a[0]={name:e+"Count",type:"USHORT",value:n};for(var i=0;i<n;i++)a=a.concat(t(r[i],i));return a}function Tr(e){e.format===1?te.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:1}].concat(or("glyph",e.glyphs))):N.assert(!1,"Can't create coverage table format 2 yet.")}Tr.prototype=Object.create(te.prototype),Tr.prototype.constructor=Tr;function Ur(e){te.call(this,"scriptListTable",Fr("scriptRecord",e,function(r,t){var n=r.script,a=n.defaultLangSys;return N.assert(!!a,"Unable to write GSUB: script "+r.tag+" has no default language system."),[{name:"scriptTag"+t,type:"TAG",value:r.tag},{name:"script"+t,type:"TABLE",value:new te("scriptTable",[{name:"defaultLangSys",type:"TABLE",value:new te("defaultLangSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:a.reqFeatureIndex}].concat(or("featureIndex",a.featureIndexes)))}].concat(Fr("langSys",n.langSysRecords,function(i,u){var f=i.langSys;return[{name:"langSysTag"+u,type:"TAG",value:i.tag},{name:"langSys"+u,type:"TABLE",value:new te("langSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:f.reqFeatureIndex}].concat(or("featureIndex",f.featureIndexes)))}]})))}]}))}Ur.prototype=Object.create(te.prototype),Ur.prototype.constructor=Ur;function Er(e){te.call(this,"featureListTable",Fr("featureRecord",e,function(r,t){var n=r.feature;return[{name:"featureTag"+t,type:"TAG",value:r.tag},{name:"feature"+t,type:"TABLE",value:new te("featureTable",[{name:"featureParams",type:"USHORT",value:n.featureParams}].concat(or("lookupListIndex",n.lookupListIndexes)))}]}))}Er.prototype=Object.create(te.prototype),Er.prototype.constructor=Er;function kr(e,r){te.call(this,"lookupListTable",$r("lookup",e,function(t){var n=r[t.lookupType];return N.assert(!!n,"Unable to write GSUB lookup type "+t.lookupType+" tables."),new te("lookupTable",[{name:"lookupType",type:"USHORT",value:t.lookupType},{name:"lookupFlag",type:"USHORT",value:t.lookupFlag}].concat($r("subtable",t.subtables,n)))}))}kr.prototype=Object.create(te.prototype),kr.prototype.constructor=kr;var D={Table:te,Record:te,Coverage:Tr,ScriptList:Ur,FeatureList:Er,LookupList:kr,ushortList:or,tableList:$r,recordList:Fr};function un(e,r){return e.getUint8(r)}function Or(e,r){return e.getUint16(r,!1)}function Rs(e,r){return e.getInt16(r,!1)}function et(e,r){return e.getUint32(r,!1)}function ln(e,r){var t=e.getInt16(r,!1),n=e.getUint16(r+2,!1);return t+n/65535}function Ds(e,r){for(var t="",n=r;n<r+4;n+=1)t+=String.fromCharCode(e.getInt8(n));return t}function Ps(e,r,t){for(var n=0,a=0;a<t;a+=1)n<<=8,n+=e.getUint8(r+a);return n}function Ms(e,r,t){for(var n=[],a=r;a<t;a+=1)n.push(e.getUint8(a));return n}function Gs(e){for(var r="",t=0;t<e.length;t+=1)r+=String.fromCharCode(e[t]);return r}var Ns={byte:1,uShort:2,short:2,uLong:4,fixed:4,longDateTime:8,tag:4};function S(e,r){this.data=e,this.offset=r,this.relativeOffset=0}S.prototype.parseByte=function(){var e=this.data.getUint8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},S.prototype.parseChar=function(){var e=this.data.getInt8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},S.prototype.parseCard8=S.prototype.parseByte,S.prototype.parseUShort=function(){var e=this.data.getUint16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},S.prototype.parseCard16=S.prototype.parseUShort,S.prototype.parseSID=S.prototype.parseUShort,S.prototype.parseOffset16=S.prototype.parseUShort,S.prototype.parseShort=function(){var e=this.data.getInt16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},S.prototype.parseF2Dot14=function(){var e=this.data.getInt16(this.offset+this.relativeOffset)/16384;return this.relativeOffset+=2,e},S.prototype.parseULong=function(){var e=et(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},S.prototype.parseOffset32=S.prototype.parseULong,S.prototype.parseFixed=function(){var e=ln(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},S.prototype.parseString=function(e){var r=this.data,t=this.offset+this.relativeOffset,n="";this.relativeOffset+=e;for(var a=0;a<e;a++)n+=String.fromCharCode(r.getUint8(t+a));return n},S.prototype.parseTag=function(){return this.parseString(4)},S.prototype.parseLongDateTime=function(){var e=et(this.data,this.offset+this.relativeOffset+4);return e-=2082844800,this.relativeOffset+=8,e},S.prototype.parseVersion=function(e){var r=Or(this.data,this.offset+this.relativeOffset),t=Or(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,e===void 0&&(e=4096),r+t/e/10},S.prototype.skip=function(e,r){r===void 0&&(r=1),this.relativeOffset+=Ns[e]*r},S.prototype.parseULongList=function(e){e===void 0&&(e=this.parseULong());for(var r=new Array(e),t=this.data,n=this.offset+this.relativeOffset,a=0;a<e;a++)r[a]=t.getUint32(n),n+=4;return this.relativeOffset+=e*4,r},S.prototype.parseOffset16List=S.prototype.parseUShortList=function(e){e===void 0&&(e=this.parseUShort());for(var r=new Array(e),t=this.data,n=this.offset+this.relativeOffset,a=0;a<e;a++)r[a]=t.getUint16(n),n+=2;return this.relativeOffset+=e*2,r},S.prototype.parseShortList=function(e){for(var r=new Array(e),t=this.data,n=this.offset+this.relativeOffset,a=0;a<e;a++)r[a]=t.getInt16(n),n+=2;return this.relativeOffset+=e*2,r},S.prototype.parseByteList=function(e){for(var r=new Array(e),t=this.data,n=this.offset+this.relativeOffset,a=0;a<e;a++)r[a]=t.getUint8(n++);return this.relativeOffset+=e,r},S.prototype.parseList=function(e,r){var t=this;r||(r=e,e=this.parseUShort());for(var n=new Array(e),a=0;a<e;a++)n[a]=r.call(t);return n},S.prototype.parseList32=function(e,r){var t=this;r||(r=e,e=this.parseULong());for(var n=new Array(e),a=0;a<e;a++)n[a]=r.call(t);return n},S.prototype.parseRecordList=function(e,r){var t=this;r||(r=e,e=this.parseUShort());for(var n=new Array(e),a=Object.keys(r),i=0;i<e;i++){for(var u={},f=0;f<a.length;f++){var l=a[f],d=r[l];u[l]=d.call(t)}n[i]=u}return n},S.prototype.parseRecordList32=function(e,r){var t=this;r||(r=e,e=this.parseULong());for(var n=new Array(e),a=Object.keys(r),i=0;i<e;i++){for(var u={},f=0;f<a.length;f++){var l=a[f],d=r[l];u[l]=d.call(t)}n[i]=u}return n},S.prototype.parseStruct=function(e){var r=this;if(typeof e=="function")return e.call(this);for(var t=Object.keys(e),n={},a=0;a<t.length;a++){var i=t[a],u=e[i];n[i]=u.call(r)}return n},S.prototype.parseValueRecord=function(e){if(e===void 0&&(e=this.parseUShort()),e!==0){var r={};return e&1&&(r.xPlacement=this.parseShort()),e&2&&(r.yPlacement=this.parseShort()),e&4&&(r.xAdvance=this.parseShort()),e&8&&(r.yAdvance=this.parseShort()),e&16&&(r.xPlaDevice=void 0,this.parseShort()),e&32&&(r.yPlaDevice=void 0,this.parseShort()),e&64&&(r.xAdvDevice=void 0,this.parseShort()),e&128&&(r.yAdvDevice=void 0,this.parseShort()),r}},S.prototype.parseValueRecordList=function(){for(var e=this,r=this.parseUShort(),t=this.parseUShort(),n=new Array(t),a=0;a<t;a++)n[a]=e.parseValueRecord(r);return n},S.prototype.parsePointer=function(e){var r=this.parseOffset16();if(r>0)return new S(this.data,this.offset+r).parseStruct(e)},S.prototype.parsePointer32=function(e){var r=this.parseOffset32();if(r>0)return new S(this.data,this.offset+r).parseStruct(e)},S.prototype.parseListOfLists=function(e){for(var r=this,t=this.parseOffset16List(),n=t.length,a=this.relativeOffset,i=new Array(n),u=0;u<n;u++){var f=t[u];if(f===0){i[u]=void 0;continue}if(r.relativeOffset=f,e){for(var l=r.parseOffset16List(),d=new Array(l.length),v=0;v<l.length;v++)r.relativeOffset=f+l[v],d[v]=e.call(r);i[u]=d}else i[u]=r.parseUShortList()}return this.relativeOffset=a,i},S.prototype.parseCoverage=function(){var e=this,r=this.offset+this.relativeOffset,t=this.parseUShort(),n=this.parseUShort();if(t===1)return{format:1,glyphs:this.parseUShortList(n)};if(t===2){for(var a=new Array(n),i=0;i<n;i++)a[i]={start:e.parseUShort(),end:e.parseUShort(),index:e.parseUShort()};return{format:2,ranges:a}}throw new Error("0x"+r.toString(16)+": Coverage format must be 1 or 2.")},S.prototype.parseClassDef=function(){var e=this.offset+this.relativeOffset,r=this.parseUShort();if(r===1)return{format:1,startGlyph:this.parseUShort(),classes:this.parseUShortList()};if(r===2)return{format:2,ranges:this.parseRecordList({start:S.uShort,end:S.uShort,classId:S.uShort})};throw new Error("0x"+e.toString(16)+": ClassDef format must be 1 or 2.")},S.list=function(e,r){return function(){return this.parseList(e,r)}},S.list32=function(e,r){return function(){return this.parseList32(e,r)}},S.recordList=function(e,r){return function(){return this.parseRecordList(e,r)}},S.recordList32=function(e,r){return function(){return this.parseRecordList32(e,r)}},S.pointer=function(e){return function(){return this.parsePointer(e)}},S.pointer32=function(e){return function(){return this.parsePointer32(e)}},S.tag=S.prototype.parseTag,S.byte=S.prototype.parseByte,S.uShort=S.offset16=S.prototype.parseUShort,S.uShortList=S.prototype.parseUShortList,S.uLong=S.offset32=S.prototype.parseULong,S.uLongList=S.prototype.parseULongList,S.struct=S.prototype.parseStruct,S.coverage=S.prototype.parseCoverage,S.classDef=S.prototype.parseClassDef;var fn={reserved:S.uShort,reqFeatureIndex:S.uShort,featureIndexes:S.uShortList};S.prototype.parseScriptList=function(){return this.parsePointer(S.recordList({tag:S.tag,script:S.pointer({defaultLangSys:S.pointer(fn),langSysRecords:S.recordList({tag:S.tag,langSys:S.pointer(fn)})})}))||[]},S.prototype.parseFeatureList=function(){return this.parsePointer(S.recordList({tag:S.tag,feature:S.pointer({featureParams:S.offset16,lookupListIndexes:S.uShortList})}))||[]},S.prototype.parseLookupList=function(e){return this.parsePointer(S.list(S.pointer(function(){var r=this.parseUShort();N.argument(1<=r&&r<=9,"GPOS/GSUB lookup type "+r+" unknown.");var t=this.parseUShort(),n=t&16;return{lookupType:r,lookupFlag:t,subtables:this.parseList(S.pointer(e[r])),markFilteringSet:n?this.parseUShort():void 0}})))||[]},S.prototype.parseFeatureVariationsList=function(){return this.parsePointer32(function(){var e=this.parseUShort(),r=this.parseUShort();N.argument(e===1&&r<1,"GPOS/GSUB feature variations table unknown.");var t=this.parseRecordList32({conditionSetOffset:S.offset32,featureTableSubstitutionOffset:S.offset32});return t})||[]};var A={getByte:un,getCard8:un,getUShort:Or,getCard16:Or,getShort:Rs,getULong:et,getFixed:ln,getTag:Ds,getOffset:Ps,getBytes:Ms,bytesToString:Gs,Parser:S};function _s(e,r){r.parseUShort(),e.length=r.parseULong(),e.language=r.parseULong();var t;e.groupCount=t=r.parseULong(),e.glyphIndexMap={};for(var n=0;n<t;n+=1)for(var a=r.parseULong(),i=r.parseULong(),u=r.parseULong(),f=a;f<=i;f+=1)e.glyphIndexMap[f]=u,u++}function Hs(e,r,t,n,a){e.length=r.parseUShort(),e.language=r.parseUShort();var i;e.segCount=i=r.parseUShort()>>1,r.skip("uShort",3),e.glyphIndexMap={};for(var u=new A.Parser(t,n+a+14),f=new A.Parser(t,n+a+16+i*2),l=new A.Parser(t,n+a+16+i*4),d=new A.Parser(t,n+a+16+i*6),v=n+a+16+i*8,x=0;x<i-1;x+=1)for(var g=void 0,y=u.parseUShort(),T=f.parseUShort(),w=l.parseShort(),E=d.parseUShort(),O=T;O<=y;O+=1)E!==0?(v=d.offset+d.relativeOffset-2,v+=E,v+=(O-T)*2,g=A.getUShort(t,v),g!==0&&(g=g+w&65535)):g=O+w&65535,e.glyphIndexMap[O]=g}function zs(e,r){var t={};t.version=A.getUShort(e,r),N.argument(t.version===0,"cmap table version should be 0."),t.numTables=A.getUShort(e,r+2);for(var n=-1,a=t.numTables-1;a>=0;a-=1){var i=A.getUShort(e,r+4+a*8),u=A.getUShort(e,r+4+a*8+2);if(i===3&&(u===0||u===1||u===10)){n=A.getULong(e,r+4+a*8+4);break}}if(n===-1)throw new Error("No valid cmap sub-tables found.");var f=new A.Parser(e,r+n);if(t.format=f.parseUShort(),t.format===12)_s(t,f);else if(t.format===4)Hs(t,f,e,r,n);else throw new Error("Only format 4 and 12 cmap tables are supported (found format "+t.format+").");return t}function qs(e,r,t){e.segments.push({end:r,start:r,delta:-(r-t),offset:0,glyphIndex:t})}function Ws(e){e.segments.push({end:65535,start:65535,delta:1,offset:0})}function Vs(e){var r=!0,t;for(t=e.length-1;t>0;t-=1){var n=e.get(t);if(n.unicode>65535){console.log("Adding CMAP format 12 (needed!)"),r=!1;break}}var a=[{name:"version",type:"USHORT",value:0},{name:"numTables",type:"USHORT",value:r?1:2},{name:"platformID",type:"USHORT",value:3},{name:"encodingID",type:"USHORT",value:1},{name:"offset",type:"ULONG",value:r?12:20}];r||(a=a.concat([{name:"cmap12PlatformID",type:"USHORT",value:3},{name:"cmap12EncodingID",type:"USHORT",value:10},{name:"cmap12Offset",type:"ULONG",value:0}])),a=a.concat([{name:"format",type:"USHORT",value:4},{name:"cmap4Length",type:"USHORT",value:0},{name:"language",type:"USHORT",value:0},{name:"segCountX2",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);var i=new D.Table("cmap",a);for(i.segments=[],t=0;t<e.length;t+=1){for(var u=e.get(t),f=0;f<u.unicodes.length;f+=1)qs(i,u.unicodes[f],t);i.segments=i.segments.sort(function(G,C){return G.start-C.start})}Ws(i);var l=i.segments.length,d=0,v=[],x=[],g=[],y=[],T=[],w=[];for(t=0;t<l;t+=1){var E=i.segments[t];E.end<=65535&&E.start<=65535?(v=v.concat({name:"end_"+t,type:"USHORT",value:E.end}),x=x.concat({name:"start_"+t,type:"USHORT",value:E.start}),g=g.concat({name:"idDelta_"+t,type:"SHORT",value:E.delta}),y=y.concat({name:"idRangeOffset_"+t,type:"USHORT",value:E.offset}),E.glyphId!==void 0&&(T=T.concat({name:"glyph_"+t,type:"USHORT",value:E.glyphId}))):d+=1,!r&&E.glyphIndex!==void 0&&(w=w.concat({name:"cmap12Start_"+t,type:"ULONG",value:E.start}),w=w.concat({name:"cmap12End_"+t,type:"ULONG",value:E.end}),w=w.concat({name:"cmap12Glyph_"+t,type:"ULONG",value:E.glyphIndex}))}if(i.segCountX2=(l-d)*2,i.searchRange=Math.pow(2,Math.floor(Math.log(l-d)/Math.log(2)))*2,i.entrySelector=Math.log(i.searchRange/2)/Math.log(2),i.rangeShift=i.segCountX2-i.searchRange,i.fields=i.fields.concat(v),i.fields.push({name:"reservedPad",type:"USHORT",value:0}),i.fields=i.fields.concat(x),i.fields=i.fields.concat(g),i.fields=i.fields.concat(y),i.fields=i.fields.concat(T),i.cmap4Length=14+v.length*2+2+x.length*2+g.length*2+y.length*2+T.length*2,!r){var O=16+w.length*4;i.cmap12Offset=20+i.cmap4Length,i.fields=i.fields.concat([{name:"cmap12Format",type:"USHORT",value:12},{name:"cmap12Reserved",type:"USHORT",value:0},{name:"cmap12Length",type:"ULONG",value:O},{name:"cmap12Language",type:"ULONG",value:0},{name:"cmap12nGroups",type:"ULONG",value:w.length/3}]),i.fields=i.fields.concat(w)}return i}var cn={parse:zs,make:Vs},wr=[".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"],Xs=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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"],Ys=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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"],_e=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","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","grave","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","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];function hn(e){this.font=e}hn.prototype.charToGlyphIndex=function(e){var r=e.charCodeAt(0),t=this.font.glyphs;if(t){for(var n=0;n<t.length;n+=1)for(var a=t.get(n),i=0;i<a.unicodes.length;i+=1)if(a.unicodes[i]===r)return n}return null};function pn(e){this.cmap=e}pn.prototype.charToGlyphIndex=function(e){return this.cmap.glyphIndexMap[e.charCodeAt(0)]||0};function Cr(e,r){this.encoding=e,this.charset=r}Cr.prototype.charToGlyphIndex=function(e){var r=e.charCodeAt(0),t=this.encoding[r];return this.charset.indexOf(t)};function rt(e){var r=this;switch(e.version){case 1:this.names=_e.slice();break;case 2:this.names=new Array(e.numberOfGlyphs);for(var t=0;t<e.numberOfGlyphs;t++)e.glyphNameIndex[t]<_e.length?r.names[t]=_e[e.glyphNameIndex[t]]:r.names[t]=e.names[e.glyphNameIndex[t]-_e.length];break;case 2.5:this.names=new Array(e.numberOfGlyphs);for(var n=0;n<e.numberOfGlyphs;n++)r.names[n]=_e[n+e.glyphNameIndex[n]];break;case 3:this.names=[];break;default:this.names=[];break}}rt.prototype.nameToGlyphIndex=function(e){return this.names.indexOf(e)},rt.prototype.glyphIndexToName=function(e){return this.names[e]};function js(e){for(var r,t=e.tables.cmap.glyphIndexMap,n=Object.keys(t),a=0;a<n.length;a+=1){var i=n[a],u=t[i];r=e.glyphs.get(u),r.addUnicode(parseInt(i))}for(var f=0;f<e.glyphs.length;f+=1)r=e.glyphs.get(f),e.cffEncoding?e.isCIDFont?r.name="gid"+f:r.name=e.cffEncoding.charset[f]:e.glyphNames.names&&(r.name=e.glyphNames.glyphIndexToName(f))}function Zs(e,r,t,n,a){e.beginPath(),e.moveTo(r,t),e.lineTo(n,a),e.stroke()}var He={line:Zs};function dn(e,r,t,n,a){var i;return(r&n)>0?(i=e.parseByte(),(r&a)===0&&(i=-i),i=t+i):(r&a)>0?i=t:i=t+e.parseShort(),i}function Qs(e,r,t){var n=new A.Parser(r,t);e.numberOfContours=n.parseShort(),e._xMin=n.parseShort(),e._yMin=n.parseShort(),e._xMax=n.parseShort(),e._yMax=n.parseShort();var a,i;if(e.numberOfContours>0){for(var u=e.endPointIndices=[],f=0;f<e.numberOfContours;f+=1)u.push(n.parseUShort());e.instructionLength=n.parseUShort(),e.instructions=[];for(var l=0;l<e.instructionLength;l+=1)e.instructions.push(n.parseByte());var d=u[u.length-1]+1;a=[];for(var v=0;v<d;v+=1)if(i=n.parseByte(),a.push(i),(i&8)>0)for(var x=n.parseByte(),g=0;g<x;g+=1)a.push(i),v+=1;if(N.argument(a.length===d,"Bad flags."),u.length>0){var y=[],T;if(d>0){for(var w=0;w<d;w+=1)i=a[w],T={},T.onCurve=!!(i&1),T.lastPointOfContour=u.indexOf(w)>=0,y.push(T);for(var E=0,O=0;O<d;O+=1)i=a[O],T=y[O],T.x=dn(n,i,E,2,16),E=T.x;for(var G=0,C=0;C<d;C+=1)i=a[C],T=y[C],T.y=dn(n,i,G,4,32),G=T.y}e.points=y}else e.points=[]}else if(e.numberOfContours===0)e.points=[];else{e.isComposite=!0,e.points=[],e.components=[];for(var _=!0;_;){a=n.parseUShort();var R={glyphIndex:n.parseUShort(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0};(a&1)>0?(a&2)>0?(R.dx=n.parseShort(),R.dy=n.parseShort()):R.matchedPoints=[n.parseUShort(),n.parseUShort()]:(a&2)>0?(R.dx=n.parseChar(),R.dy=n.parseChar()):R.matchedPoints=[n.parseByte(),n.parseByte()],(a&8)>0?R.xScale=R.yScale=n.parseF2Dot14():(a&64)>0?(R.xScale=n.parseF2Dot14(),R.yScale=n.parseF2Dot14()):(a&128)>0&&(R.xScale=n.parseF2Dot14(),R.scale01=n.parseF2Dot14(),R.scale10=n.parseF2Dot14(),R.yScale=n.parseF2Dot14()),e.components.push(R),_=!!(a&32)}if(a&256){e.instructionLength=n.parseUShort(),e.instructions=[];for(var M=0;M<e.instructionLength;M+=1)e.instructions.push(n.parseByte())}}}function tt(e,r){for(var t=[],n=0;n<e.length;n+=1){var a=e[n],i={x:r.xScale*a.x+r.scale01*a.y+r.dx,y:r.scale10*a.x+r.yScale*a.y+r.dy,onCurve:a.onCurve,lastPointOfContour:a.lastPointOfContour};t.push(i)}return t}function Js(e){for(var r=[],t=[],n=0;n<e.length;n+=1){var a=e[n];t.push(a),a.lastPointOfContour&&(r.push(t),t=[])}return N.argument(t.length===0,"There are still points left in the current contour."),r}function vn(e){var r=new Q;if(!e)return r;for(var t=Js(e),n=0;n<t.length;++n){var a=t[n],i=null,u=a[a.length-1],f=a[0];if(u.onCurve)r.moveTo(u.x,u.y);else if(f.onCurve)r.moveTo(f.x,f.y);else{var l={x:(u.x+f.x)*.5,y:(u.y+f.y)*.5};r.moveTo(l.x,l.y)}for(var d=0;d<a.length;++d)if(i=u,u=f,f=a[(d+1)%a.length],u.onCurve)r.lineTo(u.x,u.y);else{var v=i,x=f;i.onCurve||(v={x:(u.x+i.x)*.5,y:(u.y+i.y)*.5},r.lineTo(v.x,v.y)),f.onCurve||(x={x:(u.x+f.x)*.5,y:(u.y+f.y)*.5}),r.lineTo(v.x,v.y),r.quadraticCurveTo(u.x,u.y,x.x,x.y)}r.closePath()}return r}function Ks(e,r){if(r.isComposite)for(var t=0;t<r.components.length;t+=1){var n=r.components[t],a=e.get(n.glyphIndex);if(a.getPath(),a.points){var i=void 0;if(n.matchedPoints===void 0)i=tt(a.points,n);else{if(n.matchedPoints[0]>r.points.length-1||n.matchedPoints[1]>a.points.length-1)throw Error("Matched points out of range in "+r.name);var u=r.points[n.matchedPoints[0]],f=a.points[n.matchedPoints[1]],l={xScale:n.xScale,scale01:n.scale01,scale10:n.scale10,yScale:n.yScale,dx:0,dy:0};f=tt([f],l)[0],l.dx=u.x-f.x,l.dy=u.y-f.y,i=tt(a.points,l)}r.points=r.points.concat(i)}}return vn(r.points)}function $s(e,r,t,n){for(var a=new Je.GlyphSet(n),i=0;i<t.length-1;i+=1){var u=t[i],f=t[i+1];u!==f?a.push(i,Je.ttfGlyphLoader(n,i,Qs,e,r+u,Ks)):a.push(i,Je.glyphLoader(n,i))}return a}var gn={getPath:vn,parse:$s};function ei(e,r){var t=r||new Q;return{configurable:!0,get:function(){return typeof t=="function"&&(t=t()),t},set:function(n){t=n}}}function pe(e){this.bindConstructorValues(e)}pe.prototype.bindConstructorValues=function(e){this.index=e.index||0,this.name=e.name||null,this.unicode=e.unicode||void 0,this.unicodes=e.unicodes||e.unicode!==void 0?[e.unicode]:[],e.xMin&&(this.xMin=e.xMin),e.yMin&&(this.yMin=e.yMin),e.xMax&&(this.xMax=e.xMax),e.yMax&&(this.yMax=e.yMax),e.advanceWidth&&(this.advanceWidth=e.advanceWidth),Object.defineProperty(this,"path",ei(this,e.path))},pe.prototype.addUnicode=function(e){this.unicodes.length===0&&(this.unicode=e),this.unicodes.push(e)},pe.prototype.getBoundingBox=function(){return this.path.getBoundingBox()},pe.prototype.getPath=function(e,r,t,n,a){e=e!==void 0?e:0,r=r!==void 0?r:0,t=t!==void 0?t:72;var i,u;n||(n={});var f=n.xScale,l=n.yScale;if(n.hinting&&a&&a.hinting&&(u=this.path&&a.hinting.exec(this,t)),u)i=gn.getPath(u).commands,e=Math.round(e),r=Math.round(r),f=l=1;else{i=this.path.commands;var d=1/this.path.unitsPerEm*t;f===void 0&&(f=d),l===void 0&&(l=d)}for(var v=new Q,x=0;x<i.length;x+=1){var g=i[x];g.type==="M"?v.moveTo(e+g.x*f,r+-g.y*l):g.type==="L"?v.lineTo(e+g.x*f,r+-g.y*l):g.type==="Q"?v.quadraticCurveTo(e+g.x1*f,r+-g.y1*l,e+g.x*f,r+-g.y*l):g.type==="C"?v.curveTo(e+g.x1*f,r+-g.y1*l,e+g.x2*f,r+-g.y2*l,e+g.x*f,r+-g.y*l):g.type==="Z"&&v.closePath()}return v},pe.prototype.getContours=function(){var e=this;if(this.points===void 0)return[];for(var r=[],t=[],n=0;n<this.points.length;n+=1){var a=e.points[n];t.push(a),a.lastPointOfContour&&(r.push(t),t=[])}return N.argument(t.length===0,"There are still points left in the current contour."),r},pe.prototype.getMetrics=function(){for(var e=this.path.commands,r=[],t=[],n=0;n<e.length;n+=1){var a=e[n];a.type!=="Z"&&(r.push(a.x),t.push(a.y)),(a.type==="Q"||a.type==="C")&&(r.push(a.x1),t.push(a.y1)),a.type==="C"&&(r.push(a.x2),t.push(a.y2))}var i={xMin:Math.min.apply(null,r),yMin:Math.min.apply(null,t),xMax:Math.max.apply(null,r),yMax:Math.max.apply(null,t),leftSideBearing:this.leftSideBearing};return isFinite(i.xMin)||(i.xMin=0),isFinite(i.xMax)||(i.xMax=this.advanceWidth),isFinite(i.yMin)||(i.yMin=0),isFinite(i.yMax)||(i.yMax=0),i.rightSideBearing=this.advanceWidth-i.leftSideBearing-(i.xMax-i.xMin),i},pe.prototype.draw=function(e,r,t,n,a){this.getPath(r,t,n,a).draw(e)},pe.prototype.drawPoints=function(e,r,t,n){function a(x,g,y,T){var w=Math.PI*2;e.beginPath();for(var E=0;E<x.length;E+=1)e.moveTo(g+x[E].x*T,y+x[E].y*T),e.arc(g+x[E].x*T,y+x[E].y*T,2,0,w,!1);e.closePath(),e.fill()}r=r!==void 0?r:0,t=t!==void 0?t:0,n=n!==void 0?n:24;for(var i=1/this.path.unitsPerEm*n,u=[],f=[],l=this.path,d=0;d<l.commands.length;d+=1){var v=l.commands[d];v.x!==void 0&&u.push({x:v.x,y:-v.y}),v.x1!==void 0&&f.push({x:v.x1,y:-v.y1}),v.x2!==void 0&&f.push({x:v.x2,y:-v.y2})}e.fillStyle="blue",a(u,r,t,i),e.fillStyle="red",a(f,r,t,i)},pe.prototype.drawMetrics=function(e,r,t,n){var a;r=r!==void 0?r:0,t=t!==void 0?t:0,n=n!==void 0?n:24,a=1/this.path.unitsPerEm*n,e.lineWidth=1,e.strokeStyle="black",He.line(e,r,-1e4,r,1e4),He.line(e,-1e4,t,1e4,t);var i=this.xMin||0,u=this.yMin||0,f=this.xMax||0,l=this.yMax||0,d=this.advanceWidth||0;e.strokeStyle="blue",He.line(e,r+i*a,-1e4,r+i*a,1e4),He.line(e,r+f*a,-1e4,r+f*a,1e4),He.line(e,-1e4,t+-u*a,1e4,t+-u*a),He.line(e,-1e4,t+-l*a,1e4,t+-l*a),e.strokeStyle="green",He.line(e,r+d*a,-1e4,r+d*a,1e4)};function Lr(e,r,t){Object.defineProperty(e,r,{get:function(){return e.path,e[t]},set:function(n){e[t]=n},enumerable:!0,configurable:!0})}function nt(e,r){var t=this;if(this.font=e,this.glyphs={},Array.isArray(r))for(var n=0;n<r.length;n++)t.glyphs[n]=r[n];this.length=r&&r.length||0}nt.prototype.get=function(e){return typeof this.glyphs[e]=="function"&&(this.glyphs[e]=this.glyphs[e]()),this.glyphs[e]},nt.prototype.push=function(e,r){this.glyphs[e]=r,this.length++};function ri(e,r){return new pe({index:r,font:e})}function ti(e,r,t,n,a,i){return function(){var u=new pe({index:r,font:e});return u.path=function(){t(u,n,a);var f=i(e.glyphs,u);return f.unitsPerEm=e.unitsPerEm,f},Lr(u,"xMin","_xMin"),Lr(u,"xMax","_xMax"),Lr(u,"yMin","_yMin"),Lr(u,"yMax","_yMax"),u}}function ni(e,r,t,n){return function(){var a=new pe({index:r,font:e});return a.path=function(){var i=t(e,a,n);return i.unitsPerEm=e.unitsPerEm,i},a}}var Je={GlyphSet:nt,glyphLoader:ri,ttfGlyphLoader:ti,cffGlyphLoader:ni};function mn(e,r){if(e===r)return!0;if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return!1;for(var t=0;t<e.length;t+=1)if(!mn(e[t],r[t]))return!1;return!0}else return!1}function at(e){var r;return e.length<1240?r=107:e.length<33900?r=1131:r=32768,r}function Re(e,r,t){var n=[],a=[],i=A.getCard16(e,r),u,f;if(i!==0){var l=A.getByte(e,r+2);u=r+(i+1)*l+2;for(var d=r+3,v=0;v<i+1;v+=1)n.push(A.getOffset(e,d,l)),d+=l;f=u+n[i]}else f=r+2;for(var x=0;x<n.length-1;x+=1){var g=A.getBytes(e,u+n[x],u+n[x+1]);t&&(g=t(g)),a.push(g)}return{objects:a,startOffset:r,endOffset:f}}function ai(e){for(var r="",t=15,n=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"];;){var a=e.parseByte(),i=a>>4,u=a&15;if(i===t||(r+=n[i],u===t))break;r+=n[u]}return parseFloat(r)}function si(e,r){var t,n,a,i;if(r===28)return t=e.parseByte(),n=e.parseByte(),t<<8|n;if(r===29)return t=e.parseByte(),n=e.parseByte(),a=e.parseByte(),i=e.parseByte(),t<<24|n<<16|a<<8|i;if(r===30)return ai(e);if(r>=32&&r<=246)return r-139;if(r>=247&&r<=250)return t=e.parseByte(),(r-247)*256+t+108;if(r>=251&&r<=254)return t=e.parseByte(),-(r-251)*256-t-108;throw new Error("Invalid b0 "+r)}function ii(e){for(var r={},t=0;t<e.length;t+=1){var n=e[t][0],a=e[t][1],i=void 0;if(a.length===1?i=a[0]:i=a,r.hasOwnProperty(n)&&!isNaN(r[n]))throw new Error("Object "+r+" already has key "+n);r[n]=i}return r}function yn(e,r,t){r=r!==void 0?r:0;var n=new A.Parser(e,r),a=[],i=[];for(t=t!==void 0?t:e.length;n.relativeOffset<t;){var u=n.parseByte();u<=21?(u===12&&(u=1200+n.parseByte()),a.push([u,i]),i=[]):i.push(si(n,u))}return ii(a)}function ur(e,r){return r<=390?r=wr[r]:r=e[r-391],r}function xn(e,r,t){for(var n={},a,i=0;i<r.length;i+=1){var u=r[i];if(Array.isArray(u.type)){var f=[];f.length=u.type.length;for(var l=0;l<u.type.length;l++)a=e[u.op]!==void 0?e[u.op][l]:void 0,a===void 0&&(a=u.value!==void 0&&u.value[l]!==void 0?u.value[l]:null),u.type[l]==="SID"&&(a=ur(t,a)),f[l]=a;n[u.name]=f}else a=e[u.op],a===void 0&&(a=u.value!==void 0?u.value:null),u.type==="SID"&&(a=ur(t,a)),n[u.name]=a}return n}function oi(e,r){var t={};return t.formatMajor=A.getCard8(e,r),t.formatMinor=A.getCard8(e,r+1),t.size=A.getCard8(e,r+2),t.offsetSize=A.getCard8(e,r+3),t.startOffset=r,t.endOffset=r+4,t}var bn=[{name:"version",op:0,type:"SID"},{name:"notice",op:1,type:"SID"},{name:"copyright",op:1200,type:"SID"},{name:"fullName",op:2,type:"SID"},{name:"familyName",op:3,type:"SID"},{name:"weight",op:4,type:"SID"},{name:"isFixedPitch",op:1201,type:"number",value:0},{name:"italicAngle",op:1202,type:"number",value:0},{name:"underlinePosition",op:1203,type:"number",value:-100},{name:"underlineThickness",op:1204,type:"number",value:50},{name:"paintType",op:1205,type:"number",value:0},{name:"charstringType",op:1206,type:"number",value:2},{name:"fontMatrix",op:1207,type:["real","real","real","real","real","real"],value:[.001,0,0,.001,0,0]},{name:"uniqueId",op:13,type:"number"},{name:"fontBBox",op:5,type:["number","number","number","number"],value:[0,0,0,0]},{name:"strokeWidth",op:1208,type:"number",value:0},{name:"xuid",op:14,type:[],value:null},{name:"charset",op:15,type:"offset",value:0},{name:"encoding",op:16,type:"offset",value:0},{name:"charStrings",op:17,type:"offset",value:0},{name:"private",op:18,type:["number","offset"],value:[0,0]},{name:"ros",op:1230,type:["SID","SID","number"]},{name:"cidFontVersion",op:1231,type:"number",value:0},{name:"cidFontRevision",op:1232,type:"number",value:0},{name:"cidFontType",op:1233,type:"number",value:0},{name:"cidCount",op:1234,type:"number",value:8720},{name:"uidBase",op:1235,type:"number"},{name:"fdArray",op:1236,type:"offset"},{name:"fdSelect",op:1237,type:"offset"},{name:"fontName",op:1238,type:"SID"}],Sn=[{name:"subrs",op:19,type:"offset",value:0},{name:"defaultWidthX",op:20,type:"number",value:0},{name:"nominalWidthX",op:21,type:"number",value:0}];function ui(e,r){var t=yn(e,0,e.byteLength);return xn(t,bn,r)}function Fn(e,r,t,n){var a=yn(e,r,t);return xn(a,Sn,n)}function Tn(e,r,t,n){for(var a=[],i=0;i<t.length;i+=1){var u=new DataView(new Uint8Array(t[i]).buffer),f=ui(u,n);f._subrs=[],f._subrsBias=0;var l=f.private[0],d=f.private[1];if(l!==0&&d!==0){var v=Fn(e,d+r,l,n);if(f._defaultWidthX=v.defaultWidthX,f._nominalWidthX=v.nominalWidthX,v.subrs!==0){var x=d+v.subrs,g=Re(e,x+r);f._subrs=g.objects,f._subrsBias=at(f._subrs)}f._privateDict=v}a.push(f)}return a}function li(e,r,t,n){var a,i,u=new A.Parser(e,r);t-=1;var f=[".notdef"],l=u.parseCard8();if(l===0)for(var d=0;d<t;d+=1)a=u.parseSID(),f.push(ur(n,a));else if(l===1)for(;f.length<=t;){a=u.parseSID(),i=u.parseCard8();for(var v=0;v<=i;v+=1)f.push(ur(n,a)),a+=1}else if(l===2)for(;f.length<=t;){a=u.parseSID(),i=u.parseCard16();for(var x=0;x<=i;x+=1)f.push(ur(n,a)),a+=1}else throw new Error("Unknown charset format "+l);return f}function fi(e,r,t){var n,a={},i=new A.Parser(e,r),u=i.parseCard8();if(u===0)for(var f=i.parseCard8(),l=0;l<f;l+=1)n=i.parseCard8(),a[n]=l;else if(u===1){var d=i.parseCard8();n=1;for(var v=0;v<d;v+=1)for(var x=i.parseCard8(),g=i.parseCard8(),y=x;y<=x+g;y+=1)a[y]=n,n+=1}else throw new Error("Unknown encoding format "+u);return new Cr(a,t)}function ci(e,r,t){var n,a,i,u,f=new Q,l=[],d=0,v=!1,x=!1,g=0,y=0,T,w,E,O;if(e.isCIDFont){var G=e.tables.cff.topDict._fdSelect[r.index],C=e.tables.cff.topDict._fdArray[G];T=C._subrs,w=C._subrsBias,E=C._defaultWidthX,O=C._nominalWidthX}else T=e.tables.cff.topDict._subrs,w=e.tables.cff.topDict._subrsBias,E=e.tables.cff.topDict._defaultWidthX,O=e.tables.cff.topDict._nominalWidthX;var _=E;function R(Y,$){x&&f.closePath(),f.moveTo(Y,$),x=!0}function M(){var Y;Y=l.length%2!==0,Y&&!v&&(_=l.shift()+O),d+=l.length>>1,l.length=0,v=!0}function ce(Y){for(var $,le,he,de,ge,K,ee,ne,ae,se,fe,ve,j=0;j<Y.length;){var ie=Y[j];switch(j+=1,ie){case 1:M();break;case 3:M();break;case 4:l.length>1&&!v&&(_=l.shift()+O,v=!0),y+=l.pop(),R(g,y);break;case 5:for(;l.length>0;)g+=l.shift(),y+=l.shift(),f.lineTo(g,y);break;case 6:for(;l.length>0&&(g+=l.shift(),f.lineTo(g,y),l.length!==0);)y+=l.shift(),f.lineTo(g,y);break;case 7:for(;l.length>0&&(y+=l.shift(),f.lineTo(g,y),l.length!==0);)g+=l.shift(),f.lineTo(g,y);break;case 8:for(;l.length>0;)n=g+l.shift(),a=y+l.shift(),i=n+l.shift(),u=a+l.shift(),g=i+l.shift(),y=u+l.shift(),f.curveTo(n,a,i,u,g,y);break;case 10:ge=l.pop()+w,K=T[ge],K&&ce(K);break;case 11:return;case 12:switch(ie=Y[j],j+=1,ie){case 35:n=g+l.shift(),a=y+l.shift(),i=n+l.shift(),u=a+l.shift(),ee=i+l.shift(),ne=u+l.shift(),ae=ee+l.shift(),se=ne+l.shift(),fe=ae+l.shift(),ve=se+l.shift(),g=fe+l.shift(),y=ve+l.shift(),l.shift(),f.curveTo(n,a,i,u,ee,ne),f.curveTo(ae,se,fe,ve,g,y);break;case 34:n=g+l.shift(),a=y,i=n+l.shift(),u=a+l.shift(),ee=i+l.shift(),ne=u,ae=ee+l.shift(),se=u,fe=ae+l.shift(),ve=y,g=fe+l.shift(),f.curveTo(n,a,i,u,ee,ne),f.curveTo(ae,se,fe,ve,g,y);break;case 36:n=g+l.shift(),a=y+l.shift(),i=n+l.shift(),u=a+l.shift(),ee=i+l.shift(),ne=u,ae=ee+l.shift(),se=u,fe=ae+l.shift(),ve=se+l.shift(),g=fe+l.shift(),f.curveTo(n,a,i,u,ee,ne),f.curveTo(ae,se,fe,ve,g,y);break;case 37:n=g+l.shift(),a=y+l.shift(),i=n+l.shift(),u=a+l.shift(),ee=i+l.shift(),ne=u+l.shift(),ae=ee+l.shift(),se=ne+l.shift(),fe=ae+l.shift(),ve=se+l.shift(),Math.abs(fe-g)>Math.abs(ve-y)?g=fe+l.shift():y=ve+l.shift(),f.curveTo(n,a,i,u,ee,ne),f.curveTo(ae,se,fe,ve,g,y);break;default:console.log("Glyph "+r.index+": unknown operator 1200"+ie),l.length=0}break;case 14:l.length>0&&!v&&(_=l.shift()+O,v=!0),x&&(f.closePath(),x=!1);break;case 18:M();break;case 19:case 20:M(),j+=d+7>>3;break;case 21:l.length>2&&!v&&(_=l.shift()+O,v=!0),y+=l.pop(),g+=l.pop(),R(g,y);break;case 22:l.length>1&&!v&&(_=l.shift()+O,v=!0),g+=l.pop(),R(g,y);break;case 23:M();break;case 24:for(;l.length>2;)n=g+l.shift(),a=y+l.shift(),i=n+l.shift(),u=a+l.shift(),g=i+l.shift(),y=u+l.shift(),f.curveTo(n,a,i,u,g,y);g+=l.shift(),y+=l.shift(),f.lineTo(g,y);break;case 25:for(;l.length>6;)g+=l.shift(),y+=l.shift(),f.lineTo(g,y);n=g+l.shift(),a=y+l.shift(),i=n+l.shift(),u=a+l.shift(),g=i+l.shift(),y=u+l.shift(),f.curveTo(n,a,i,u,g,y);break;case 26:for(l.length%2&&(g+=l.shift());l.length>0;)n=g,a=y+l.shift(),i=n+l.shift(),u=a+l.shift(),g=i,y=u+l.shift(),f.curveTo(n,a,i,u,g,y);break;case 27:for(l.length%2&&(y+=l.shift());l.length>0;)n=g+l.shift(),a=y,i=n+l.shift(),u=a+l.shift(),g=i+l.shift(),y=u,f.curveTo(n,a,i,u,g,y);break;case 28:$=Y[j],le=Y[j+1],l.push(($<<24|le<<16)>>16),j+=2;break;case 29:ge=l.pop()+e.gsubrsBias,K=e.gsubrs[ge],K&&ce(K);break;case 30:for(;l.length>0&&(n=g,a=y+l.shift(),i=n+l.shift(),u=a+l.shift(),g=i+l.shift(),y=u+(l.length===1?l.shift():0),f.curveTo(n,a,i,u,g,y),l.length!==0);)n=g+l.shift(),a=y,i=n+l.shift(),u=a+l.shift(),y=u+l.shift(),g=i+(l.length===1?l.shift():0),f.curveTo(n,a,i,u,g,y);break;case 31:for(;l.length>0&&(n=g+l.shift(),a=y,i=n+l.shift(),u=a+l.shift(),y=u+l.shift(),g=i+(l.length===1?l.shift():0),f.curveTo(n,a,i,u,g,y),l.length!==0);)n=g,a=y+l.shift(),i=n+l.shift(),u=a+l.shift(),g=i+l.shift(),y=u+(l.length===1?l.shift():0),f.curveTo(n,a,i,u,g,y);break;default:ie<32?console.log("Glyph "+r.index+": unknown operator "+ie):ie<247?l.push(ie-139):ie<251?($=Y[j],j+=1,l.push((ie-247)*256+$+108)):ie<255?($=Y[j],j+=1,l.push(-(ie-251)*256-$-108)):($=Y[j],le=Y[j+1],he=Y[j+2],de=Y[j+3],j+=4,l.push(($<<24|le<<16|he<<8|de)/65536))}}}return ce(t),r.advanceWidth=_,f}function hi(e,r,t,n){var a=[],i,u=new A.Parser(e,r),f=u.parseCard8();if(f===0)for(var l=0;l<t;l++){if(i=u.parseCard8(),i>=n)throw new Error("CFF table CID Font FDSelect has bad FD index value "+i+" (FD count "+n+")");a.push(i)}else if(f===3){var d=u.parseCard16(),v=u.parseCard16();if(v!==0)throw new Error("CFF Table CID Font FDSelect format 3 range has bad initial GID "+v);for(var x,g=0;g<d;g++){if(i=u.parseCard8(),x=u.parseCard16(),i>=n)throw new Error("CFF table CID Font FDSelect has bad FD index value "+i+" (FD count "+n+")");if(x>t)throw new Error("CFF Table CID Font FDSelect format 3 range has bad GID "+x);for(;v<x;v++)a.push(i);v=x}if(x!==t)throw new Error("CFF Table CID Font FDSelect format 3 range has bad final GID "+x)}else throw new Error("CFF Table CID Font FDSelect table has unsupported format "+f);return a}function pi(e,r,t){t.tables.cff={};var n=oi(e,r),a=Re(e,n.endOffset,A.bytesToString),i=Re(e,a.endOffset),u=Re(e,i.endOffset,A.bytesToString),f=Re(e,u.endOffset);t.gsubrs=f.objects,t.gsubrsBias=at(t.gsubrs);var l=Tn(e,r,i.objects,u.objects);if(l.length!==1)throw new Error("CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = "+l.length);var d=l[0];if(t.tables.cff.topDict=d,d._privateDict&&(t.defaultWidthX=d._privateDict.defaultWidthX,t.nominalWidthX=d._privateDict.nominalWidthX),d.ros[0]!==void 0&&d.ros[1]!==void 0&&(t.isCIDFont=!0),t.isCIDFont){var v=d.fdArray,x=d.fdSelect;if(v===0||x===0)throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");v+=r;var g=Re(e,v),y=Tn(e,r,g.objects,u.objects);d._fdArray=y,x+=r,d._fdSelect=hi(e,x,t.numGlyphs,y.length)}var T=r+d.private[1],w=Fn(e,T,d.private[0],u.objects);if(t.defaultWidthX=w.defaultWidthX,t.nominalWidthX=w.nominalWidthX,w.subrs!==0){var E=T+w.subrs,O=Re(e,E);t.subrs=O.objects,t.subrsBias=at(t.subrs)}else t.subrs=[],t.subrsBias=0;var G=Re(e,r+d.charStrings);t.nGlyphs=G.objects.length;var C=li(e,r+d.charset,t.nGlyphs,u.objects);d.encoding===0?t.cffEncoding=new Cr(Xs,C):d.encoding===1?t.cffEncoding=new Cr(Ys,C):t.cffEncoding=fi(e,r+d.encoding,C),t.encoding=t.encoding||t.cffEncoding,t.glyphs=new Je.GlyphSet(t);for(var _=0;_<t.nGlyphs;_+=1){var R=G.objects[_];t.glyphs.push(_,Je.cffGlyphLoader(t,_,ci,R))}}function Un(e,r){var t,n=wr.indexOf(e);return n>=0&&(t=n),n=r.indexOf(e),n>=0?t=n+wr.length:(t=wr.length+r.length,r.push(e)),t}function di(){return new D.Record("Header",[{name:"major",type:"Card8",value:1},{name:"minor",type:"Card8",value:0},{name:"hdrSize",type:"Card8",value:4},{name:"major",type:"Card8",value:1}])}function vi(e){var r=new D.Record("Name INDEX",[{name:"names",type:"INDEX",value:[]}]);r.names=[];for(var t=0;t<e.length;t+=1)r.names.push({name:"name_"+t,type:"NAME",value:e[t]});return r}function En(e,r,t){for(var n={},a=0;a<e.length;a+=1){var i=e[a],u=r[i.name];u!==void 0&&!mn(u,i.value)&&(i.type==="SID"&&(u=Un(u,t)),n[i.op]={name:i.name,type:i.type,value:u})}return n}function kn(e,r){var t=new D.Record("Top DICT",[{name:"dict",type:"DICT",value:{}}]);return t.dict=En(bn,e,r),t}function On(e){var r=new D.Record("Top DICT INDEX",[{name:"topDicts",type:"INDEX",value:[]}]);return r.topDicts=[{name:"topDict_0",type:"TABLE",value:e}],r}function gi(e){var r=new D.Record("String INDEX",[{name:"strings",type:"INDEX",value:[]}]);r.strings=[];for(var t=0;t<e.length;t+=1)r.strings.push({name:"string_"+t,type:"STRING",value:e[t]});return r}function mi(){return new D.Record("Global Subr INDEX",[{name:"subrs",type:"INDEX",value:[]}])}function yi(e,r){for(var t=new D.Record("Charsets",[{name:"format",type:"Card8",value:0}]),n=0;n<e.length;n+=1){var a=e[n],i=Un(a,r);t.fields.push({name:"glyph_"+n,type:"SID",value:i})}return t}function xi(e){var r=[],t=e.path;r.push({name:"width",type:"NUMBER",value:e.advanceWidth});for(var n=0,a=0,i=0;i<t.commands.length;i+=1){var u=void 0,f=void 0,l=t.commands[i];if(l.type==="Q"){var d=.3333333333333333,v=2/3;l={type:"C",x:l.x,y:l.y,x1:d*n+v*l.x1,y1:d*a+v*l.y1,x2:d*l.x+v*l.x1,y2:d*l.y+v*l.y1}}if(l.type==="M")u=Math.round(l.x-n),f=Math.round(l.y-a),r.push({name:"dx",type:"NUMBER",value:u}),r.push({name:"dy",type:"NUMBER",value:f}),r.push({name:"rmoveto",type:"OP",value:21}),n=Math.round(l.x),a=Math.round(l.y);else if(l.type==="L")u=Math.round(l.x-n),f=Math.round(l.y-a),r.push({name:"dx",type:"NUMBER",value:u}),r.push({name:"dy",type:"NUMBER",value:f}),r.push({name:"rlineto",type:"OP",value:5}),n=Math.round(l.x),a=Math.round(l.y);else if(l.type==="C"){var x=Math.round(l.x1-n),g=Math.round(l.y1-a),y=Math.round(l.x2-l.x1),T=Math.round(l.y2-l.y1);u=Math.round(l.x-l.x2),f=Math.round(l.y-l.y2),r.push({name:"dx1",type:"NUMBER",value:x}),r.push({name:"dy1",type:"NUMBER",value:g}),r.push({name:"dx2",type:"NUMBER",value:y}),r.push({name:"dy2",type:"NUMBER",value:T}),r.push({name:"dx",type:"NUMBER",value:u}),r.push({name:"dy",type:"NUMBER",value:f}),r.push({name:"rrcurveto",type:"OP",value:8}),n=Math.round(l.x),a=Math.round(l.y)}}return r.push({name:"endchar",type:"OP",value:14}),r}function bi(e){for(var r=new D.Record("CharStrings INDEX",[{name:"charStrings",type:"INDEX",value:[]}]),t=0;t<e.length;t+=1){var n=e.get(t),a=xi(n);r.charStrings.push({name:n.name,type:"CHARSTRING",value:a})}return r}function Si(e,r){var t=new D.Record("Private DICT",[{name:"dict",type:"DICT",value:{}}]);return t.dict=En(Sn,e,r),t}function Fi(e,r){for(var t=new D.Table("CFF ",[{name:"header",type:"RECORD"},{name:"nameIndex",type:"RECORD"},{name:"topDictIndex",type:"RECORD"},{name:"stringIndex",type:"RECORD"},{name:"globalSubrIndex",type:"RECORD"},{name:"charsets",type:"RECORD"},{name:"charStringsIndex",type:"RECORD"},{name:"privateDict",type:"RECORD"}]),n=1/r.unitsPerEm,a={version:r.version,fullName:r.fullName,familyName:r.familyName,weight:r.weightName,fontBBox:r.fontBBox||[0,0,0,0],fontMatrix:[n,0,0,n,0,0],charset:999,encoding:0,charStrings:999,private:[0,999]},i={},u=[],f,l=1;l<e.length;l+=1)f=e.get(l),u.push(f.name);var d=[];t.header=di(),t.nameIndex=vi([r.postScriptName]);var v=kn(a,d);t.topDictIndex=On(v),t.globalSubrIndex=mi(),t.charsets=yi(u,d),t.charStringsIndex=bi(e),t.privateDict=Si(i,d),t.stringIndex=gi(d);var x=t.header.sizeOf()+t.nameIndex.sizeOf()+t.topDictIndex.sizeOf()+t.stringIndex.sizeOf()+t.globalSubrIndex.sizeOf();return a.charset=x,a.encoding=0,a.charStrings=a.charset+t.charsets.sizeOf(),a.private[1]=a.charStrings+t.charStringsIndex.sizeOf(),v=kn(a,d),t.topDictIndex=On(v),t}var wn={parse:pi,make:Fi};function Ti(e,r){var t={},n=new A.Parser(e,r);return t.version=n.parseVersion(),t.fontRevision=Math.round(n.parseFixed()*1e3)/1e3,t.checkSumAdjustment=n.parseULong(),t.magicNumber=n.parseULong(),N.argument(t.magicNumber===1594834165,"Font header has wrong magic number."),t.flags=n.parseUShort(),t.unitsPerEm=n.parseUShort(),t.created=n.parseLongDateTime(),t.modified=n.parseLongDateTime(),t.xMin=n.parseShort(),t.yMin=n.parseShort(),t.xMax=n.parseShort(),t.yMax=n.parseShort(),t.macStyle=n.parseUShort(),t.lowestRecPPEM=n.parseUShort(),t.fontDirectionHint=n.parseShort(),t.indexToLocFormat=n.parseShort(),t.glyphDataFormat=n.parseShort(),t}function Ui(e){var r=Math.round(new Date().getTime()/1e3)+2082844800,t=r;return e.createdTimestamp&&(t=e.createdTimestamp+2082844800),new D.Table("head",[{name:"version",type:"FIXED",value:65536},{name:"fontRevision",type:"FIXED",value:65536},{name:"checkSumAdjustment",type:"ULONG",value:0},{name:"magicNumber",type:"ULONG",value:1594834165},{name:"flags",type:"USHORT",value:0},{name:"unitsPerEm",type:"USHORT",value:1e3},{name:"created",type:"LONGDATETIME",value:t},{name:"modified",type:"LONGDATETIME",value:r},{name:"xMin",type:"SHORT",value:0},{name:"yMin",type:"SHORT",value:0},{name:"xMax",type:"SHORT",value:0},{name:"yMax",type:"SHORT",value:0},{name:"macStyle",type:"USHORT",value:0},{name:"lowestRecPPEM",type:"USHORT",value:0},{name:"fontDirectionHint",type:"SHORT",value:2},{name:"indexToLocFormat",type:"SHORT",value:0},{name:"glyphDataFormat",type:"SHORT",value:0}],e)}var Cn={parse:Ti,make:Ui};function Ei(e,r){var t={},n=new A.Parser(e,r);return t.version=n.parseVersion(),t.ascender=n.parseShort(),t.descender=n.parseShort(),t.lineGap=n.parseShort(),t.advanceWidthMax=n.parseUShort(),t.minLeftSideBearing=n.parseShort(),t.minRightSideBearing=n.parseShort(),t.xMaxExtent=n.parseShort(),t.caretSlopeRise=n.parseShort(),t.caretSlopeRun=n.parseShort(),t.caretOffset=n.parseShort(),n.relativeOffset+=8,t.metricDataFormat=n.parseShort(),t.numberOfHMetrics=n.parseUShort(),t}function ki(e){return new D.Table("hhea",[{name:"version",type:"FIXED",value:65536},{name:"ascender",type:"FWORD",value:0},{name:"descender",type:"FWORD",value:0},{name:"lineGap",type:"FWORD",value:0},{name:"advanceWidthMax",type:"UFWORD",value:0},{name:"minLeftSideBearing",type:"FWORD",value:0},{name:"minRightSideBearing",type:"FWORD",value:0},{name:"xMaxExtent",type:"FWORD",value:0},{name:"caretSlopeRise",type:"SHORT",value:1},{name:"caretSlopeRun",type:"SHORT",value:0},{name:"caretOffset",type:"SHORT",value:0},{name:"reserved1",type:"SHORT",value:0},{name:"reserved2",type:"SHORT",value:0},{name:"reserved3",type:"SHORT",value:0},{name:"reserved4",type:"SHORT",value:0},{name:"metricDataFormat",type:"SHORT",value:0},{name:"numberOfHMetrics",type:"USHORT",value:0}],e)}var Ln={parse:Ei,make:ki};function Oi(e,r,t,n,a){for(var i,u,f=new A.Parser(e,r),l=0;l<n;l+=1){l<t&&(i=f.parseUShort(),u=f.parseShort());var d=a.get(l);d.advanceWidth=i,d.leftSideBearing=u}}function wi(e){for(var r=new D.Table("hmtx",[]),t=0;t<e.length;t+=1){var n=e.get(t),a=n.advanceWidth||0,i=n.leftSideBearing||0;r.fields.push({name:"advanceWidth_"+t,type:"USHORT",value:a}),r.fields.push({name:"leftSideBearing_"+t,type:"SHORT",value:i})}return r}var In={parse:Oi,make:wi};function Ci(e){for(var r=new D.Table("ltag",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"numTags",type:"ULONG",value:e.length}]),t="",n=12+e.length*4,a=0;a<e.length;++a){var i=t.indexOf(e[a]);i<0&&(i=t.length,t+=e[a]),r.fields.push({name:"offset "+a,type:"USHORT",value:n+i}),r.fields.push({name:"length "+a,type:"USHORT",value:e[a].length})}return r.fields.push({name:"stringPool",type:"CHARARRAY",value:t}),r}function Li(e,r){var t=new A.Parser(e,r),n=t.parseULong();N.argument(n===1,"Unsupported ltag table version."),t.skip("uLong",1);for(var a=t.parseULong(),i=[],u=0;u<a;u++){for(var f="",l=r+t.parseUShort(),d=t.parseUShort(),v=l;v<l+d;++v)f+=String.fromCharCode(e.getInt8(v));i.push(f)}return i}var An={make:Ci,parse:Li};function Ii(e,r){var t={},n=new A.Parser(e,r);return t.version=n.parseVersion(),t.numGlyphs=n.parseUShort(),t.version===1&&(t.maxPoints=n.parseUShort(),t.maxContours=n.parseUShort(),t.maxCompositePoints=n.parseUShort(),t.maxCompositeContours=n.parseUShort(),t.maxZones=n.parseUShort(),t.maxTwilightPoints=n.parseUShort(),t.maxStorage=n.parseUShort(),t.maxFunctionDefs=n.parseUShort(),t.maxInstructionDefs=n.parseUShort(),t.maxStackElements=n.parseUShort(),t.maxSizeOfInstructions=n.parseUShort(),t.maxComponentElements=n.parseUShort(),t.maxComponentDepth=n.parseUShort()),t}function Ai(e){return new D.Table("maxp",[{name:"version",type:"FIXED",value:20480},{name:"numGlyphs",type:"USHORT",value:e}])}var Bn={parse:Ii,make:Ai},Rn=["copyright","fontFamily","fontSubfamily","uniqueID","fullName","version","postScriptName","trademark","manufacturer","designer","description","manufacturerURL","designerURL","license","licenseURL","reserved","preferredFamily","preferredSubfamily","compatibleFullName","sampleText","postScriptFindFontName","wwsFamily","wwsSubfamily"],Dn={0:"en",1:"fr",2:"de",3:"it",4:"nl",5:"sv",6:"es",7:"da",8:"pt",9:"no",10:"he",11:"ja",12:"ar",13:"fi",14:"el",15:"is",16:"mt",17:"tr",18:"hr",19:"zh-Hant",20:"ur",21:"hi",22:"th",23:"ko",24:"lt",25:"pl",26:"hu",27:"es",28:"lv",29:"se",30:"fo",31:"fa",32:"ru",33:"zh",34:"nl-BE",35:"ga",36:"sq",37:"ro",38:"cz",39:"sk",40:"si",41:"yi",42:"sr",43:"mk",44:"bg",45:"uk",46:"be",47:"uz",48:"kk",49:"az-Cyrl",50:"az-Arab",51:"hy",52:"ka",53:"mo",54:"ky",55:"tg",56:"tk",57:"mn-CN",58:"mn",59:"ps",60:"ks",61:"ku",62:"sd",63:"bo",64:"ne",65:"sa",66:"mr",67:"bn",68:"as",69:"gu",70:"pa",71:"or",72:"ml",73:"kn",74:"ta",75:"te",76:"si",77:"my",78:"km",79:"lo",80:"vi",81:"id",82:"tl",83:"ms",84:"ms-Arab",85:"am",86:"ti",87:"om",88:"so",89:"sw",90:"rw",91:"rn",92:"ny",93:"mg",94:"eo",128:"cy",129:"eu",130:"ca",131:"la",132:"qu",133:"gn",134:"ay",135:"tt",136:"ug",137:"dz",138:"jv",139:"su",140:"gl",141:"af",142:"br",143:"iu",144:"gd",145:"gv",146:"ga",147:"to",148:"el-polyton",149:"kl",150:"az",151:"nn"},Bi={0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:5,11:1,12:4,13:0,14:6,15:0,16:0,17:0,18:0,19:2,20:4,21:9,22:21,23:3,24:29,25:29,26:29,27:29,28:29,29:0,30:0,31:4,32:7,33:25,34:0,35:0,36:0,37:0,38:29,39:29,40:0,41:5,42:7,43:7,44:7,45:7,46:7,47:7,48:7,49:7,50:4,51:24,52:23,53:7,54:7,55:7,56:7,57:27,58:7,59:4,60:4,61:4,62:4,63:26,64:9,65:9,66:9,67:13,68:13,69:11,70:10,71:12,72:17,73:16,74:14,75:15,76:18,77:19,78:20,79:22,80:30,81:0,82:0,83:0,84:4,85:28,86:28,87:28,88:0,89:0,90:0,91:0,92:0,93:0,94:0,128:0,129:0,130:0,131:0,132:0,133:0,134:0,135:7,136:4,137:26,138:0,139:0,140:0,141:0,142:0,143:28,144:0,145:0,146:0,147:0,148:6,149:0,150:0,151:0},Pn={1078:"af",1052:"sq",1156:"gsw",1118:"am",5121:"ar-DZ",15361:"ar-BH",3073:"ar",2049:"ar-IQ",11265:"ar-JO",13313:"ar-KW",12289:"ar-LB",4097:"ar-LY",6145:"ary",8193:"ar-OM",16385:"ar-QA",1025:"ar-SA",10241:"ar-SY",7169:"aeb",14337:"ar-AE",9217:"ar-YE",1067:"hy",1101:"as",2092:"az-Cyrl",1068:"az",1133:"ba",1069:"eu",1059:"be",2117:"bn",1093:"bn-IN",8218:"bs-Cyrl",5146:"bs",1150:"br",1026:"bg",1027:"ca",3076:"zh-HK",5124:"zh-MO",2052:"zh",4100:"zh-SG",1028:"zh-TW",1155:"co",1050:"hr",4122:"hr-BA",1029:"cs",1030:"da",1164:"prs",1125:"dv",2067:"nl-BE",1043:"nl",3081:"en-AU",10249:"en-BZ",4105:"en-CA",9225:"en-029",16393:"en-IN",6153:"en-IE",8201:"en-JM",17417:"en-MY",5129:"en-NZ",13321:"en-PH",18441:"en-SG",7177:"en-ZA",11273:"en-TT",2057:"en-GB",1033:"en",12297:"en-ZW",1061:"et",1080:"fo",1124:"fil",1035:"fi",2060:"fr-BE",3084:"fr-CA",1036:"fr",5132:"fr-LU",6156:"fr-MC",4108:"fr-CH",1122:"fy",1110:"gl",1079:"ka",3079:"de-AT",1031:"de",5127:"de-LI",4103:"de-LU",2055:"de-CH",1032:"el",1135:"kl",1095:"gu",1128:"ha",1037:"he",1081:"hi",1038:"hu",1039:"is",1136:"ig",1057:"id",1117:"iu",2141:"iu-Latn",2108:"ga",1076:"xh",1077:"zu",1040:"it",2064:"it-CH",1041:"ja",1099:"kn",1087:"kk",1107:"km",1158:"quc",1159:"rw",1089:"sw",1111:"kok",1042:"ko",1088:"ky",1108:"lo",1062:"lv",1063:"lt",2094:"dsb",1134:"lb",1071:"mk",2110:"ms-BN",1086:"ms",1100:"ml",1082:"mt",1153:"mi",1146:"arn",1102:"mr",1148:"moh",1104:"mn",2128:"mn-CN",1121:"ne",1044:"nb",2068:"nn",1154:"oc",1096:"or",1123:"ps",1045:"pl",1046:"pt",2070:"pt-PT",1094:"pa",1131:"qu-BO",2155:"qu-EC",3179:"qu",1048:"ro",1047:"rm",1049:"ru",9275:"smn",4155:"smj-NO",5179:"smj",3131:"se-FI",1083:"se",2107:"se-SE",8251:"sms",6203:"sma-NO",7227:"sms",1103:"sa",7194:"sr-Cyrl-BA",3098:"sr",6170:"sr-Latn-BA",2074:"sr-Latn",1132:"nso",1074:"tn",1115:"si",1051:"sk",1060:"sl",11274:"es-AR",16394:"es-BO",13322:"es-CL",9226:"es-CO",5130:"es-CR",7178:"es-DO",12298:"es-EC",17418:"es-SV",4106:"es-GT",18442:"es-HN",2058:"es-MX",19466:"es-NI",6154:"es-PA",15370:"es-PY",10250:"es-PE",20490:"es-PR",3082:"es",1034:"es",21514:"es-US",14346:"es-UY",8202:"es-VE",2077:"sv-FI",1053:"sv",1114:"syr",1064:"tg",2143:"tzm",1097:"ta",1092:"tt",1098:"te",1054:"th",1105:"bo",1055:"tr",1090:"tk",1152:"ug",1058:"uk",1070:"hsb",1056:"ur",2115:"uz-Cyrl",1091:"uz",1066:"vi",1106:"cy",1160:"wo",1157:"sah",1144:"ii",1130:"yo"};function Ri(e,r,t){switch(e){case 0:if(r===65535)return"und";if(t)return t[r];break;case 1:return Dn[r];case 3:return Pn[r]}}var st="utf-16",Di={0:"macintosh",1:"x-mac-japanese",2:"x-mac-chinesetrad",3:"x-mac-korean",6:"x-mac-greek",7:"x-mac-cyrillic",9:"x-mac-devanagai",10:"x-mac-gurmukhi",11:"x-mac-gujarati",12:"x-mac-oriya",13:"x-mac-bengali",14:"x-mac-tamil",15:"x-mac-telugu",16:"x-mac-kannada",17:"x-mac-malayalam",18:"x-mac-sinhalese",19:"x-mac-burmese",20:"x-mac-khmer",21:"x-mac-thai",22:"x-mac-lao",23:"x-mac-georgian",24:"x-mac-armenian",25:"x-mac-chinesesimp",26:"x-mac-tibetan",27:"x-mac-mongolian",28:"x-mac-ethiopic",29:"x-mac-ce",30:"x-mac-vietnamese",31:"x-mac-extarabic"},Pi={15:"x-mac-icelandic",17:"x-mac-turkish",18:"x-mac-croatian",24:"x-mac-ce",25:"x-mac-ce",26:"x-mac-ce",27:"x-mac-ce",28:"x-mac-ce",30:"x-mac-icelandic",37:"x-mac-romanian",38:"x-mac-ce",39:"x-mac-ce",40:"x-mac-ce",143:"x-mac-inuit",146:"x-mac-gaelic"};function Mn(e,r,t){switch(e){case 0:return st;case 1:return Pi[t]||Di[r];case 3:if(r===1||r===10)return st;break}}function Mi(e,r,t){for(var n={},a=new A.Parser(e,r),i=a.parseUShort(),u=a.parseUShort(),f=a.offset+a.parseUShort(),l=0;l<u;l++){var d=a.parseUShort(),v=a.parseUShort(),x=a.parseUShort(),g=a.parseUShort(),y=Rn[g]||g,T=a.parseUShort(),w=a.parseUShort(),E=Ri(d,x,t),O=Mn(d,v,x);if(O!==void 0&&E!==void 0){var G=void 0;if(O===st?G=Qe.UTF16(e,f+w,T):G=Qe.MACSTRING(e,f+w,T,O),G){var C=n[y];C===void 0&&(C=n[y]={}),C[E]=G}}}var _=0;return i===1&&(_=a.parseUShort()),n}function it(e){var r={};for(var t in e)r[e[t]]=parseInt(t);return r}function Gn(e,r,t,n,a,i){return new D.Record("NameRecord",[{name:"platformID",type:"USHORT",value:e},{name:"encodingID",type:"USHORT",value:r},{name:"languageID",type:"USHORT",value:t},{name:"nameID",type:"USHORT",value:n},{name:"length",type:"USHORT",value:a},{name:"offset",type:"USHORT",value:i}])}function Gi(e,r){var t=e.length,n=r.length-t+1;e:for(var a=0;a<n;a++)for(;a<n;a++){for(var i=0;i<t;i++)if(r[a+i]!==e[i])continue e;return a}return-1}function Nn(e,r){var t=Gi(e,r);if(t<0){t=r.length;for(var n=0,a=e.length;n<a;++n)r.push(e[n])}return t}function Ni(e,r){var t,n=[],a={},i=it(Rn);for(var u in e){var f=i[u];if(f===void 0&&(f=u),t=parseInt(f),isNaN(t))throw new Error('Name table entry "'+u+'" does not exist, see nameTableNames for complete list.');a[t]=e[u],n.push(t)}for(var l=it(Dn),d=it(Pn),v=[],x=[],g=0;g<n.length;g++){t=n[g];var y=a[t];for(var T in y){var w=y[T],E=1,O=l[T],G=Bi[O],C=Mn(E,G,O),_=k.MACSTRING(w,C);_===void 0&&(E=0,O=r.indexOf(T),O<0&&(O=r.length,r.push(T)),G=4,_=k.UTF16(w));var R=Nn(_,x);v.push(Gn(E,G,O,t,_.length,R));var M=d[T];if(M!==void 0){var ce=k.UTF16(w),Y=Nn(ce,x);v.push(Gn(3,1,M,t,ce.length,Y))}}}v.sort(function(he,de){return he.platformID-de.platformID||he.encodingID-de.encodingID||he.languageID-de.languageID||he.nameID-de.nameID});for(var $=new D.Table("name",[{name:"format",type:"USHORT",value:0},{name:"count",type:"USHORT",value:v.length},{name:"stringOffset",type:"USHORT",value:6+v.length*12}]),le=0;le<v.length;le++)$.fields.push({name:"record_"+le,type:"RECORD",value:v[le]});return $.fields.push({name:"strings",type:"LITERAL",value:x}),$}var _n={parse:Mi,make:Ni},ot=[{begin:0,end:127},{begin:128,end:255},{begin:256,end:383},{begin:384,end:591},{begin:592,end:687},{begin:688,end:767},{begin:768,end:879},{begin:880,end:1023},{begin:11392,end:11519},{begin:1024,end:1279},{begin:1328,end:1423},{begin:1424,end:1535},{begin:42240,end:42559},{begin:1536,end:1791},{begin:1984,end:2047},{begin:2304,end:2431},{begin:2432,end:2559},{begin:2560,end:2687},{begin:2688,end:2815},{begin:2816,end:2943},{begin:2944,end:3071},{begin:3072,end:3199},{begin:3200,end:3327},{begin:3328,end:3455},{begin:3584,end:3711},{begin:3712,end:3839},{begin:4256,end:4351},{begin:6912,end:7039},{begin:4352,end:4607},{begin:7680,end:7935},{begin:7936,end:8191},{begin:8192,end:8303},{begin:8304,end:8351},{begin:8352,end:8399},{begin:8400,end:8447},{begin:8448,end:8527},{begin:8528,end:8591},{begin:8592,end:8703},{begin:8704,end:8959},{begin:8960,end:9215},{begin:9216,end:9279},{begin:9280,end:9311},{begin:9312,end:9471},{begin:9472,end:9599},{begin:9600,end:9631},{begin:9632,end:9727},{begin:9728,end:9983},{begin:9984,end:10175},{begin:12288,end:12351},{begin:12352,end:12447},{begin:12448,end:12543},{begin:12544,end:12591},{begin:12592,end:12687},{begin:43072,end:43135},{begin:12800,end:13055},{begin:13056,end:13311},{begin:44032,end:55215},{begin:55296,end:57343},{begin:67840,end:67871},{begin:19968,end:40959},{begin:57344,end:63743},{begin:12736,end:12783},{begin:64256,end:64335},{begin:64336,end:65023},{begin:65056,end:65071},{begin:65040,end:65055},{begin:65104,end:65135},{begin:65136,end:65279},{begin:65280,end:65519},{begin:65520,end:65535},{begin:3840,end:4095},{begin:1792,end:1871},{begin:1920,end:1983},{begin:3456,end:3583},{begin:4096,end:4255},{begin:4608,end:4991},{begin:5024,end:5119},{begin:5120,end:5759},{begin:5760,end:5791},{begin:5792,end:5887},{begin:6016,end:6143},{begin:6144,end:6319},{begin:10240,end:10495},{begin:40960,end:42127},{begin:5888,end:5919},{begin:66304,end:66351},{begin:66352,end:66383},{begin:66560,end:66639},{begin:118784,end:119039},{begin:119808,end:120831},{begin:1044480,end:1048573},{begin:65024,end:65039},{begin:917504,end:917631},{begin:6400,end:6479},{begin:6480,end:6527},{begin:6528,end:6623},{begin:6656,end:6687},{begin:11264,end:11359},{begin:11568,end:11647},{begin:19904,end:19967},{begin:43008,end:43055},{begin:65536,end:65663},{begin:65856,end:65935},{begin:66432,end:66463},{begin:66464,end:66527},{begin:66640,end:66687},{begin:66688,end:66735},{begin:67584,end:67647},{begin:68096,end:68191},{begin:119552,end:119647},{begin:73728,end:74751},{begin:119648,end:119679},{begin:7040,end:7103},{begin:7168,end:7247},{begin:7248,end:7295},{begin:43136,end:43231},{begin:43264,end:43311},{begin:43312,end:43359},{begin:43520,end:43615},{begin:65936,end:65999},{begin:66e3,end:66047},{begin:66208,end:66271},{begin:127024,end:127135}];function _i(e){for(var r=0;r<ot.length;r+=1){var t=ot[r];if(e>=t.begin&&e<t.end)return r}return-1}function Hi(e,r){var t={},n=new A.Parser(e,r);t.version=n.parseUShort(),t.xAvgCharWidth=n.parseShort(),t.usWeightClass=n.parseUShort(),t.usWidthClass=n.parseUShort(),t.fsType=n.parseUShort(),t.ySubscriptXSize=n.parseShort(),t.ySubscriptYSize=n.parseShort(),t.ySubscriptXOffset=n.parseShort(),t.ySubscriptYOffset=n.parseShort(),t.ySuperscriptXSize=n.parseShort(),t.ySuperscriptYSize=n.parseShort(),t.ySuperscriptXOffset=n.parseShort(),t.ySuperscriptYOffset=n.parseShort(),t.yStrikeoutSize=n.parseShort(),t.yStrikeoutPosition=n.parseShort(),t.sFamilyClass=n.parseShort(),t.panose=[];for(var a=0;a<10;a++)t.panose[a]=n.parseByte();return t.ulUnicodeRange1=n.parseULong(),t.ulUnicodeRange2=n.parseULong(),t.ulUnicodeRange3=n.parseULong(),t.ulUnicodeRange4=n.parseULong(),t.achVendID=String.fromCharCode(n.parseByte(),n.parseByte(),n.parseByte(),n.parseByte()),t.fsSelection=n.parseUShort(),t.usFirstCharIndex=n.parseUShort(),t.usLastCharIndex=n.parseUShort(),t.sTypoAscender=n.parseShort(),t.sTypoDescender=n.parseShort(),t.sTypoLineGap=n.parseShort(),t.usWinAscent=n.parseUShort(),t.usWinDescent=n.parseUShort(),t.version>=1&&(t.ulCodePageRange1=n.parseULong(),t.ulCodePageRange2=n.parseULong()),t.version>=2&&(t.sxHeight=n.parseShort(),t.sCapHeight=n.parseShort(),t.usDefaultChar=n.parseUShort(),t.usBreakChar=n.parseUShort(),t.usMaxContent=n.parseUShort()),t}function zi(e){return new D.Table("OS/2",[{name:"version",type:"USHORT",value:3},{name:"xAvgCharWidth",type:"SHORT",value:0},{name:"usWeightClass",type:"USHORT",value:0},{name:"usWidthClass",type:"USHORT",value:0},{name:"fsType",type:"USHORT",value:0},{name:"ySubscriptXSize",type:"SHORT",value:650},{name:"ySubscriptYSize",type:"SHORT",value:699},{name:"ySubscriptXOffset",type:"SHORT",value:0},{name:"ySubscriptYOffset",type:"SHORT",value:140},{name:"ySuperscriptXSize",type:"SHORT",value:650},{name:"ySuperscriptYSize",type:"SHORT",value:699},{name:"ySuperscriptXOffset",type:"SHORT",value:0},{name:"ySuperscriptYOffset",type:"SHORT",value:479},{name:"yStrikeoutSize",type:"SHORT",value:49},{name:"yStrikeoutPosition",type:"SHORT",value:258},{name:"sFamilyClass",type:"SHORT",value:0},{name:"bFamilyType",type:"BYTE",value:0},{name:"bSerifStyle",type:"BYTE",value:0},{name:"bWeight",type:"BYTE",value:0},{name:"bProportion",type:"BYTE",value:0},{name:"bContrast",type:"BYTE",value:0},{name:"bStrokeVariation",type:"BYTE",value:0},{name:"bArmStyle",type:"BYTE",value:0},{name:"bLetterform",type:"BYTE",value:0},{name:"bMidline",type:"BYTE",value:0},{name:"bXHeight",type:"BYTE",value:0},{name:"ulUnicodeRange1",type:"ULONG",value:0},{name:"ulUnicodeRange2",type:"ULONG",value:0},{name:"ulUnicodeRange3",type:"ULONG",value:0},{name:"ulUnicodeRange4",type:"ULONG",value:0},{name:"achVendID",type:"CHARARRAY",value:"XXXX"},{name:"fsSelection",type:"USHORT",value:0},{name:"usFirstCharIndex",type:"USHORT",value:0},{name:"usLastCharIndex",type:"USHORT",value:0},{name:"sTypoAscender",type:"SHORT",value:0},{name:"sTypoDescender",type:"SHORT",value:0},{name:"sTypoLineGap",type:"SHORT",value:0},{name:"usWinAscent",type:"USHORT",value:0},{name:"usWinDescent",type:"USHORT",value:0},{name:"ulCodePageRange1",type:"ULONG",value:0},{name:"ulCodePageRange2",type:"ULONG",value:0},{name:"sxHeight",type:"SHORT",value:0},{name:"sCapHeight",type:"SHORT",value:0},{name:"usDefaultChar",type:"USHORT",value:0},{name:"usBreakChar",type:"USHORT",value:0},{name:"usMaxContext",type:"USHORT",value:0}],e)}var ut={parse:Hi,make:zi,unicodeRanges:ot,getUnicodeRange:_i};function qi(e,r){var t={},n=new A.Parser(e,r);switch(t.version=n.parseVersion(),t.italicAngle=n.parseFixed(),t.underlinePosition=n.parseShort(),t.underlineThickness=n.parseShort(),t.isFixedPitch=n.parseULong(),t.minMemType42=n.parseULong(),t.maxMemType42=n.parseULong(),t.minMemType1=n.parseULong(),t.maxMemType1=n.parseULong(),t.version){case 1:t.names=_e.slice();break;case 2:t.numberOfGlyphs=n.parseUShort(),t.glyphNameIndex=new Array(t.numberOfGlyphs);for(var a=0;a<t.numberOfGlyphs;a++)t.glyphNameIndex[a]=n.parseUShort();t.names=[];for(var i=0;i<t.numberOfGlyphs;i++)if(t.glyphNameIndex[i]>=_e.length){var u=n.parseChar();t.names.push(n.parseString(u))}break;case 2.5:t.numberOfGlyphs=n.parseUShort(),t.offset=new Array(t.numberOfGlyphs);for(var f=0;f<t.numberOfGlyphs;f++)t.offset[f]=n.parseChar();break}return t}function Wi(){return new D.Table("post",[{name:"version",type:"FIXED",value:196608},{name:"italicAngle",type:"FIXED",value:0},{name:"underlinePosition",type:"FWORD",value:0},{name:"underlineThickness",type:"FWORD",value:0},{name:"isFixedPitch",type:"ULONG",value:0},{name:"minMemType42",type:"ULONG",value:0},{name:"maxMemType42",type:"ULONG",value:0},{name:"minMemType1",type:"ULONG",value:0},{name:"maxMemType1",type:"ULONG",value:0}])}var Hn={parse:qi,make:Wi},Se=new Array(9);Se[1]=function(){var r=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{substFormat:1,coverage:this.parsePointer(S.coverage),deltaGlyphId:this.parseUShort()};if(t===2)return{substFormat:2,coverage:this.parsePointer(S.coverage),substitute:this.parseOffset16List()};N.assert(!1,"0x"+r.toString(16)+": lookup type 1 format must be 1 or 2.")},Se[2]=function(){var r=this.parseUShort();return N.argument(r===1,"GSUB Multiple Substitution Subtable identifier-format must be 1"),{substFormat:r,coverage:this.parsePointer(S.coverage),sequences:this.parseListOfLists()}},Se[3]=function(){var r=this.parseUShort();return N.argument(r===1,"GSUB Alternate Substitution Subtable identifier-format must be 1"),{substFormat:r,coverage:this.parsePointer(S.coverage),alternateSets:this.parseListOfLists()}},Se[4]=function(){var r=this.parseUShort();return N.argument(r===1,"GSUB ligature table identifier-format must be 1"),{substFormat:r,coverage:this.parsePointer(S.coverage),ligatureSets:this.parseListOfLists(function(){return{ligGlyph:this.parseUShort(),components:this.parseUShortList(this.parseUShort()-1)}})}};var Ke={sequenceIndex:S.uShort,lookupListIndex:S.uShort};Se[5]=function(){var r=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{substFormat:t,coverage:this.parsePointer(S.coverage),ruleSets:this.parseListOfLists(function(){var i=this.parseUShort(),u=this.parseUShort();return{input:this.parseUShortList(i-1),lookupRecords:this.parseRecordList(u,Ke)}})};if(t===2)return{substFormat:t,coverage:this.parsePointer(S.coverage),classDef:this.parsePointer(S.classDef),classSets:this.parseListOfLists(function(){var i=this.parseUShort(),u=this.parseUShort();return{classes:this.parseUShortList(i-1),lookupRecords:this.parseRecordList(u,Ke)}})};if(t===3){var n=this.parseUShort(),a=this.parseUShort();return{substFormat:t,coverages:this.parseList(n,S.pointer(S.coverage)),lookupRecords:this.parseRecordList(a,Ke)}}N.assert(!1,"0x"+r.toString(16)+": lookup type 5 format must be 1, 2 or 3.")},Se[6]=function(){var r=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{substFormat:1,coverage:this.parsePointer(S.coverage),chainRuleSets:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(Ke)}})};if(t===2)return{substFormat:2,coverage:this.parsePointer(S.coverage),backtrackClassDef:this.parsePointer(S.classDef),inputClassDef:this.parsePointer(S.classDef),lookaheadClassDef:this.parsePointer(S.classDef),chainClassSet:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(Ke)}})};if(t===3)return{substFormat:3,backtrackCoverage:this.parseList(S.pointer(S.coverage)),inputCoverage:this.parseList(S.pointer(S.coverage)),lookaheadCoverage:this.parseList(S.pointer(S.coverage)),lookupRecords:this.parseRecordList(Ke)};N.assert(!1,"0x"+r.toString(16)+": lookup type 6 format must be 1, 2 or 3.")},Se[7]=function(){var r=this.parseUShort();N.argument(r===1,"GSUB Extension Substitution subtable identifier-format must be 1");var t=this.parseUShort(),n=new S(this.data,this.offset+this.parseULong());return{substFormat:1,lookupType:t,extension:Se[t].call(n)}},Se[8]=function(){var r=this.parseUShort();return N.argument(r===1,"GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1"),{substFormat:r,coverage:this.parsePointer(S.coverage),backtrackCoverage:this.parseList(S.pointer(S.coverage)),lookaheadCoverage:this.parseList(S.pointer(S.coverage)),substitutes:this.parseUShortList()}};function Vi(e,r){r=r||0;var t=new S(e,r),n=t.parseVersion(1);return N.argument(n===1||n===1.1,"Unsupported GSUB table version."),n===1?{version:n,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(Se)}:{version:n,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(Se),variations:t.parseFeatureVariationsList()}}var Ir=new Array(9);Ir[1]=function(r){return r.substFormat===1?new D.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new D.Coverage(r.coverage)},{name:"deltaGlyphID",type:"USHORT",value:r.deltaGlyphId}]):new D.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:2},{name:"coverage",type:"TABLE",value:new D.Coverage(r.coverage)}].concat(D.ushortList("substitute",r.substitute)))},Ir[3]=function(r){return N.assert(r.substFormat===1,"Lookup type 3 substFormat must be 1."),new D.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new D.Coverage(r.coverage)}].concat(D.tableList("altSet",r.alternateSets,function(t){return new D.Table("alternateSetTable",D.ushortList("alternate",t))})))},Ir[4]=function(r){return N.assert(r.substFormat===1,"Lookup type 4 substFormat must be 1."),new D.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new D.Coverage(r.coverage)}].concat(D.tableList("ligSet",r.ligatureSets,function(t){return new D.Table("ligatureSetTable",D.tableList("ligature",t,function(n){return new D.Table("ligatureTable",[{name:"ligGlyph",type:"USHORT",value:n.ligGlyph}].concat(D.ushortList("component",n.components,n.components.length+1)))}))})))};function Xi(e){return new D.Table("GSUB",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new D.ScriptList(e.scripts)},{name:"features",type:"TABLE",value:new D.FeatureList(e.features)},{name:"lookups",type:"TABLE",value:new D.LookupList(e.lookups,Ir)}])}var zn={parse:Vi,make:Xi};function Yi(e,r){var t=new A.Parser(e,r),n=t.parseULong();N.argument(n===1,"Unsupported META table version."),t.parseULong(),t.parseULong();for(var a=t.parseULong(),i={},u=0;u<a;u++){var f=t.parseTag(),l=t.parseULong(),d=t.parseULong(),v=Qe.UTF8(e,r+l,d);i[f]=v}return i}function ji(e){var r=Object.keys(e).length,t="",n=16+r*12,a=new D.Table("meta",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"offset",type:"ULONG",value:n},{name:"numTags",type:"ULONG",value:r}]);for(var i in e){var u=t.length;t+=e[i],a.fields.push({name:"tag "+i,type:"TAG",value:i}),a.fields.push({name:"offset "+i,type:"ULONG",value:n+u}),a.fields.push({name:"length "+i,type:"ULONG",value:e[i].length})}return a.fields.push({name:"stringPool",type:"CHARARRAY",value:t}),a}var qn={parse:Yi,make:ji};function Wn(e){return Math.log(e)/Math.log(2)|0}function lt(e){for(;e.length%4!==0;)e.push(0);for(var r=0,t=0;t<e.length;t+=4)r+=(e[t]<<24)+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3];return r%=Math.pow(2,32),r}function Vn(e,r,t,n){return new D.Record("Table Record",[{name:"tag",type:"TAG",value:e!==void 0?e:""},{name:"checkSum",type:"ULONG",value:r!==void 0?r:0},{name:"offset",type:"ULONG",value:t!==void 0?t:0},{name:"length",type:"ULONG",value:n!==void 0?n:0}])}function Xn(e){var r=new D.Table("sfnt",[{name:"version",type:"TAG",value:"OTTO"},{name:"numTables",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);r.tables=e,r.numTables=e.length;var t=Math.pow(2,Wn(r.numTables));r.searchRange=16*t,r.entrySelector=Wn(t),r.rangeShift=r.numTables*16-r.searchRange;for(var n=[],a=[],i=r.sizeOf()+Vn().sizeOf()*r.numTables;i%4!==0;)i+=1,a.push({name:"padding",type:"BYTE",value:0});for(var u=0;u<e.length;u+=1){var f=e[u];N.argument(f.tableName.length===4,"Table name"+f.tableName+" is invalid.");var l=f.sizeOf(),d=Vn(f.tableName,lt(f.encode()),i,l);for(n.push({name:d.tag+" Table Record",type:"RECORD",value:d}),a.push({name:f.tableName+" table",type:"RECORD",value:f}),i+=l,N.argument(!isNaN(i),"Something went wrong calculating the offset.");i%4!==0;)i+=1,a.push({name:"padding",type:"BYTE",value:0})}return n.sort(function(v,x){return v.value.tag>x.value.tag?1:-1}),r.fields=r.fields.concat(n),r.fields=r.fields.concat(a),r}function Yn(e,r,t){for(var n=0;n<r.length;n+=1){var a=e.charToGlyphIndex(r[n]);if(a>0){var i=e.glyphs.get(a);return i.getMetrics()}}return t}function Zi(e){for(var r=0,t=0;t<e.length;t+=1)r+=e[t];return r/e.length}function Qi(e){for(var r=[],t=[],n=[],a=[],i=[],u=[],f=[],l,d=0,v=0,x=0,g=0,y=0,T=0;T<e.glyphs.length;T+=1){var w=e.glyphs.get(T),E=w.unicode|0;if(isNaN(w.advanceWidth))throw new Error("Glyph "+w.name+" ("+T+"): advanceWidth is not a number.");(l>E||l===void 0)&&E>0&&(l=E),d<E&&(d=E);var O=ut.getUnicodeRange(E);if(O<32)v|=1<<O;else if(O<64)x|=1<<O-32;else if(O<96)g|=1<<O-64;else if(O<123)y|=1<<O-96;else throw new Error("Unicode ranges bits > 123 are reserved for internal usage");if(w.name!==".notdef"){var G=w.getMetrics();r.push(G.xMin),t.push(G.yMin),n.push(G.xMax),a.push(G.yMax),u.push(G.leftSideBearing),f.push(G.rightSideBearing),i.push(w.advanceWidth)}}var C={xMin:Math.min.apply(null,r),yMin:Math.min.apply(null,t),xMax:Math.max.apply(null,n),yMax:Math.max.apply(null,a),advanceWidthMax:Math.max.apply(null,i),advanceWidthAvg:Zi(i),minLeftSideBearing:Math.min.apply(null,u),maxLeftSideBearing:Math.max.apply(null,u),minRightSideBearing:Math.min.apply(null,f)};C.ascender=e.ascender,C.descender=e.descender;var _=Cn.make({flags:3,unitsPerEm:e.unitsPerEm,xMin:C.xMin,yMin:C.yMin,xMax:C.xMax,yMax:C.yMax,lowestRecPPEM:3,createdTimestamp:e.createdTimestamp}),R=Ln.make({ascender:C.ascender,descender:C.descender,advanceWidthMax:C.advanceWidthMax,minLeftSideBearing:C.minLeftSideBearing,minRightSideBearing:C.minRightSideBearing,xMaxExtent:C.maxLeftSideBearing+(C.xMax-C.xMin),numberOfHMetrics:e.glyphs.length}),M=Bn.make(e.glyphs.length),ce=ut.make({xAvgCharWidth:Math.round(C.advanceWidthAvg),usWeightClass:e.tables.os2.usWeightClass,usWidthClass:e.tables.os2.usWidthClass,usFirstCharIndex:l,usLastCharIndex:d,ulUnicodeRange1:v,ulUnicodeRange2:x,ulUnicodeRange3:g,ulUnicodeRange4:y,fsSelection:e.tables.os2.fsSelection,sTypoAscender:C.ascender,sTypoDescender:C.descender,sTypoLineGap:0,usWinAscent:C.yMax,usWinDescent:Math.abs(C.yMin),ulCodePageRange1:1,sxHeight:Yn(e,"xyvw",{yMax:Math.round(C.ascender/2)}).yMax,sCapHeight:Yn(e,"HIKLEFJMNTZBDPRAGOQSUVWXY",C).yMax,usDefaultChar:e.hasChar(" ")?32:0,usBreakChar:e.hasChar(" ")?32:0}),Y=In.make(e.glyphs),$=cn.make(e.glyphs),le=e.getEnglishName("fontFamily"),he=e.getEnglishName("fontSubfamily"),de=le+" "+he,ge=e.getEnglishName("postScriptName");ge||(ge=le.replace(/\s/g,"")+"-"+he);var K={};for(var ee in e.names)K[ee]=e.names[ee];K.uniqueID||(K.uniqueID={en:e.getEnglishName("manufacturer")+":"+de}),K.postScriptName||(K.postScriptName={en:ge}),K.preferredFamily||(K.preferredFamily=e.names.fontFamily),K.preferredSubfamily||(K.preferredSubfamily=e.names.fontSubfamily);var ne=[],ae=_n.make(K,ne),se=ne.length>0?An.make(ne):void 0,fe=Hn.make(),ve=wn.make(e.glyphs,{version:e.getEnglishName("version"),fullName:de,familyName:le,weightName:he,postScriptName:ge,unitsPerEm:e.unitsPerEm,fontBBox:[0,C.yMin,C.ascender,C.advanceWidthMax]}),j=e.metas&&Object.keys(e.metas).length>0?qn.make(e.metas):void 0,ie=[_,R,M,ce,ae,$,fe,ve,Y];se&&ie.push(se),e.tables.gsub&&ie.push(zn.make(e.tables.gsub)),j&&ie.push(j);for(var gt=Xn(ie),$u=gt.encode(),el=lt($u),mt=gt.fields,Sa=!1,Dr=0;Dr<mt.length;Dr+=1)if(mt[Dr].name==="head table"){mt[Dr].value.checkSumAdjustment=2981146554-el,Sa=!0;break}if(!Sa)throw new Error("Could not find head table with checkSum to adjust.");return gt}var Ji={make:Xn,fontToTable:Qi,computeCheckSum:lt};function ft(e,r){for(var t=0,n=e.length-1;t<=n;){var a=t+n>>>1,i=e[a].tag;if(i===r)return a;i<r?t=a+1:n=a-1}return-t-1}function jn(e,r){for(var t=0,n=e.length-1;t<=n;){var a=t+n>>>1,i=e[a];if(i===r)return a;i<r?t=a+1:n=a-1}return-t-1}function Zn(e,r){for(var t,n=0,a=e.length-1;n<=a;){var i=n+a>>>1;t=e[i];var u=t.start;if(u===r)return t;u<r?n=i+1:a=i-1}if(n>0)return t=e[n-1],r>t.end?0:t}function lr(e,r){this.font=e,this.tableName=r}lr.prototype={searchTag:ft,binSearch:jn,getTable:function(e){var r=this.font.tables[this.tableName];return!r&&e&&(r=this.font.tables[this.tableName]=this.createDefaultTable()),r},getScriptNames:function(){var e=this.getTable();return e?e.scripts.map(function(r){return r.tag}):[]},getDefaultScriptName:function(){var e=this.getTable();if(e){for(var r=!1,t=0;t<e.scripts.length;t++){var n=e.scripts[t].tag;if(n==="DFLT")return n;n==="latn"&&(r=!0)}if(r)return"latn"}},getScriptTable:function(e,r){var t=this.getTable(r);if(t){e=e||"DFLT";var n=t.scripts,a=ft(t.scripts,e);if(a>=0)return n[a].script;if(r){var i={tag:e,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}};return n.splice(-1-a,0,i),i.script}}},getLangSysTable:function(e,r,t){var n=this.getScriptTable(e,t);if(n){if(!r||r==="dflt"||r==="DFLT")return n.defaultLangSys;var a=ft(n.langSysRecords,r);if(a>=0)return n.langSysRecords[a].langSys;if(t){var i={tag:r,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}};return n.langSysRecords.splice(-1-a,0,i),i.langSys}}},getFeatureTable:function(e,r,t,n){var a=this.getLangSysTable(e,r,n);if(a){for(var i,u=a.featureIndexes,f=this.font.tables[this.tableName].features,l=0;l<u.length;l++)if(i=f[u[l]],i.tag===t)return i.feature;if(n){var d=f.length;return N.assert(d===0||t>=f[d-1].tag,"Features must be added in alphabetical order."),i={tag:t,feature:{params:0,lookupListIndexes:[]}},f.push(i),u.push(d),i.feature}}},getLookupTables:function(e,r,t,n,a){var i=this.getFeatureTable(e,r,t,a),u=[];if(i){for(var f,l=i.lookupListIndexes,d=this.font.tables[this.tableName].lookups,v=0;v<l.length;v++)f=d[l[v]],f.lookupType===n&&u.push(f);if(u.length===0&&a){f={lookupType:n,lookupFlag:0,subtables:[],markFilteringSet:void 0};var x=d.length;return d.push(f),l.push(x),[f]}}return u},getGlyphClass:function(e,r){switch(e.format){case 1:return e.startGlyph<=r&&r<e.startGlyph+e.classes.length?e.classes[r-e.startGlyph]:0;case 2:var t=Zn(e.ranges,r);return t?t.classId:0}},getCoverageIndex:function(e,r){switch(e.format){case 1:var t=jn(e.glyphs,r);return t>=0?t:-1;case 2:var n=Zn(e.ranges,r);return n?n.index+r-n.start:-1}},expandCoverage:function(e){if(e.format===1)return e.glyphs;for(var r=[],t=e.ranges,n=0;n<t.length;n++)for(var a=t[n],i=a.start,u=a.end,f=i;f<=u;f++)r.push(f);return r}};function Ar(e){lr.call(this,e,"gpos")}Ar.prototype=lr.prototype,Ar.prototype.getKerningValue=function(e,r,t){for(var n=this,a=0;a<e.length;a++)for(var i=e[a].subtables,u=0;u<i.length;u++){var f=i[u],l=n.getCoverageIndex(f.coverage,r);if(!(l<0))switch(f.posFormat){case 1:for(var d=f.pairSets[l],v=0;v<d.length;v++){var x=d[v];if(x.secondGlyph===t)return x.value1&&x.value1.xAdvance||0}break;case 2:var g=n.getGlyphClass(f.classDef1,r),y=n.getGlyphClass(f.classDef2,t),T=f.classRecords[g][y];return T.value1&&T.value1.xAdvance||0}}return 0},Ar.prototype.getKerningTables=function(e,r){if(this.font.tables.gpos)return this.getLookupTables(e,r,"kern",2)};function Fe(e){lr.call(this,e,"gsub")}function Ki(e,r){var t=e.length;if(t!==r.length)return!1;for(var n=0;n<t;n++)if(e[n]!==r[n])return!1;return!0}function Qn(e,r,t){for(var n=e.subtables,a=0;a<n.length;a++){var i=n[a];if(i.substFormat===r)return i}if(t)return n.push(t),t}Fe.prototype=lr.prototype,Fe.prototype.createDefaultTable=function(){return{version:1,scripts:[{tag:"DFLT",script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}}],features:[],lookups:[]}},Fe.prototype.getSingle=function(e,r,t){for(var n=this,a=[],i=this.getLookupTables(r,t,e,1),u=0;u<i.length;u++)for(var f=i[u].subtables,l=0;l<f.length;l++){var d=f[l],v=n.expandCoverage(d.coverage),x=void 0;if(d.substFormat===1){var g=d.deltaGlyphId;for(x=0;x<v.length;x++){var y=v[x];a.push({sub:y,by:y+g})}}else{var T=d.substitute;for(x=0;x<v.length;x++)a.push({sub:v[x],by:T[x]})}}return a},Fe.prototype.getAlternates=function(e,r,t){for(var n=this,a=[],i=this.getLookupTables(r,t,e,3),u=0;u<i.length;u++)for(var f=i[u].subtables,l=0;l<f.length;l++)for(var d=f[l],v=n.expandCoverage(d.coverage),x=d.alternateSets,g=0;g<v.length;g++)a.push({sub:v[g],by:x[g]});return a},Fe.prototype.getLigatures=function(e,r,t){for(var n=this,a=[],i=this.getLookupTables(r,t,e,4),u=0;u<i.length;u++)for(var f=i[u].subtables,l=0;l<f.length;l++)for(var d=f[l],v=n.expandCoverage(d.coverage),x=d.ligatureSets,g=0;g<v.length;g++)for(var y=v[g],T=x[g],w=0;w<T.length;w++){var E=T[w];a.push({sub:[y].concat(E.components),by:E.ligGlyph})}return a},Fe.prototype.addSingle=function(e,r,t,n){var a=this.getLookupTables(t,n,e,1,!0)[0],i=Qn(a,2,{substFormat:2,coverage:{format:1,glyphs:[]},substitute:[]});N.assert(i.coverage.format===1,"Ligature: unable to modify coverage table format "+i.coverage.format);var u=r.sub,f=this.binSearch(i.coverage.glyphs,u);f<0&&(f=-1-f,i.coverage.glyphs.splice(f,0,u),i.substitute.splice(f,0,0)),i.substitute[f]=r.by},Fe.prototype.addAlternate=function(e,r,t,n){var a=this.getLookupTables(t,n,e,3,!0)[0],i=Qn(a,1,{substFormat:1,coverage:{format:1,glyphs:[]},alternateSets:[]});N.assert(i.coverage.format===1,"Ligature: unable to modify coverage table format "+i.coverage.format);var u=r.sub,f=this.binSearch(i.coverage.glyphs,u);f<0&&(f=-1-f,i.coverage.glyphs.splice(f,0,u),i.alternateSets.splice(f,0,0)),i.alternateSets[f]=r.by},Fe.prototype.addLigature=function(e,r,t,n){var a=this.getLookupTables(t,n,e,4,!0)[0],i=a.subtables[0];i||(i={substFormat:1,coverage:{format:1,glyphs:[]},ligatureSets:[]},a.subtables[0]=i),N.assert(i.coverage.format===1,"Ligature: unable to modify coverage table format "+i.coverage.format);var u=r.sub[0],f=r.sub.slice(1),l={ligGlyph:r.by,components:f},d=this.binSearch(i.coverage.glyphs,u);if(d>=0){for(var v=i.ligatureSets[d],x=0;x<v.length;x++)if(Ki(v[x].components,f))return;v.push(l)}else d=-1-d,i.coverage.glyphs.splice(d,0,u),i.ligatureSets.splice(d,0,[l])},Fe.prototype.getFeature=function(e,r,t){if(/ss\d\d/.test(e))return this.getSingle(e,r,t);switch(e){case"aalt":case"salt":return this.getSingle(e,r,t).concat(this.getAlternates(e,r,t));case"dlig":case"liga":case"rlig":return this.getLigatures(e,r,t)}},Fe.prototype.add=function(e,r,t,n){if(/ss\d\d/.test(e))return this.addSingle(e,r,t,n);switch(e){case"aalt":case"salt":return typeof r.by=="number"?this.addSingle(e,r,t,n):this.addAlternate(e,r,t,n);case"dlig":case"liga":case"rlig":return this.addLigature(e,r,t,n)}};function $i(){return typeof window<"u"}function Jn(e){for(var r=new ArrayBuffer(e.length),t=new Uint8Array(r),n=0;n<e.length;++n)t[n]=e[n];return r}function eo(e){for(var r=new Buffer(e.byteLength),t=new Uint8Array(e),n=0;n<r.length;++n)r[n]=t[n];return r}function $e(e,r){if(!e)throw r}var Kn,ze,$n,ct;function ea(e){this.font=e,this._fpgmState=this._prepState=void 0,this._errorState=0}function ro(e){return e}function ra(e){return Math.sign(e)*Math.round(Math.abs(e))}function to(e){return Math.sign(e)*Math.round(Math.abs(e*2))/2}function no(e){return Math.sign(e)*(Math.round(Math.abs(e)+.5)-.5)}function ao(e){return Math.sign(e)*Math.ceil(Math.abs(e))}function so(e){return Math.sign(e)*Math.floor(Math.abs(e))}var ta=function(e){var r=this.srPeriod,t=this.srPhase,n=this.srThreshold,a=1;return e<0&&(e=-e,a=-1),e+=n-t,e=Math.trunc(e/r)*r,e+=t,e<0?t*a:e*a},ke={x:1,y:0,axis:"x",distance:function(e,r,t,n){return(t?e.xo:e.x)-(n?r.xo:r.x)},interpolate:function(e,r,t,n){var a,i,u,f,l,d,v;if(!n||n===this){if(a=e.xo-r.xo,i=e.xo-t.xo,l=r.x-r.xo,d=t.x-t.xo,u=Math.abs(a),f=Math.abs(i),v=u+f,v===0){e.x=e.xo+(l+d)/2;return}e.x=e.xo+(l*f+d*u)/v;return}if(a=n.distance(e,r,!0,!0),i=n.distance(e,t,!0,!0),l=n.distance(r,r,!1,!0),d=n.distance(t,t,!1,!0),u=Math.abs(a),f=Math.abs(i),v=u+f,v===0){ke.setRelative(e,e,(l+d)/2,n,!0);return}ke.setRelative(e,e,(l*f+d*u)/v,n,!0)},normalSlope:Number.NEGATIVE_INFINITY,setRelative:function(e,r,t,n,a){if(!n||n===this){e.x=(a?r.xo:r.x)+t;return}var i=a?r.xo:r.x,u=a?r.yo:r.y,f=i+t*n.x,l=u+t*n.y;e.x=f+(e.y-l)/n.normalSlope},slope:0,touch:function(e){e.xTouched=!0},touched:function(e){return e.xTouched},untouch:function(e){e.xTouched=!1}},Ce={x:0,y:1,axis:"y",distance:function(e,r,t,n){return(t?e.yo:e.y)-(n?r.yo:r.y)},interpolate:function(e,r,t,n){var a,i,u,f,l,d,v;if(!n||n===this){if(a=e.yo-r.yo,i=e.yo-t.yo,l=r.y-r.yo,d=t.y-t.yo,u=Math.abs(a),f=Math.abs(i),v=u+f,v===0){e.y=e.yo+(l+d)/2;return}e.y=e.yo+(l*f+d*u)/v;return}if(a=n.distance(e,r,!0,!0),i=n.distance(e,t,!0,!0),l=n.distance(r,r,!1,!0),d=n.distance(t,t,!1,!0),u=Math.abs(a),f=Math.abs(i),v=u+f,v===0){Ce.setRelative(e,e,(l+d)/2,n,!0);return}Ce.setRelative(e,e,(l*f+d*u)/v,n,!0)},normalSlope:0,setRelative:function(e,r,t,n,a){if(!n||n===this){e.y=(a?r.yo:r.y)+t;return}var i=a?r.xo:r.x,u=a?r.yo:r.y,f=i+t*n.x,l=u+t*n.y;e.y=l+n.normalSlope*(e.x-f)},slope:Number.POSITIVE_INFINITY,touch:function(e){e.yTouched=!0},touched:function(e){return e.yTouched},untouch:function(e){e.yTouched=!1}};Object.freeze(ke),Object.freeze(Ce);function fr(e,r){this.x=e,this.y=r,this.axis=void 0,this.slope=r/e,this.normalSlope=-e/r,Object.freeze(this)}fr.prototype.distance=function(e,r,t,n){return this.x*ke.distance(e,r,t,n)+this.y*Ce.distance(e,r,t,n)},fr.prototype.interpolate=function(e,r,t,n){var a,i,u,f,l,d,v;if(u=n.distance(e,r,!0,!0),f=n.distance(e,t,!0,!0),a=n.distance(r,r,!1,!0),i=n.distance(t,t,!1,!0),l=Math.abs(u),d=Math.abs(f),v=l+d,v===0){this.setRelative(e,e,(a+i)/2,n,!0);return}this.setRelative(e,e,(a*d+i*l)/v,n,!0)},fr.prototype.setRelative=function(e,r,t,n,a){n=n||this;var i=a?r.xo:r.x,u=a?r.yo:r.y,f=i+t*n.x,l=u+t*n.y,d=n.normalSlope,v=this.slope,x=e.x,g=e.y;e.x=(v*x-d*f+l-g)/(v-d),e.y=v*(e.x-x)+g},fr.prototype.touch=function(e){e.xTouched=!0,e.yTouched=!0};function cr(e,r){var t=Math.sqrt(e*e+r*r);return e/=t,r/=t,e===1&&r===0?ke:e===0&&r===1?Ce:new fr(e,r)}function Le(e,r,t,n){this.x=this.xo=Math.round(e*64)/64,this.y=this.yo=Math.round(r*64)/64,this.lastPointOfContour=t,this.onCurve=n,this.prevPointOnContour=void 0,this.nextPointOnContour=void 0,this.xTouched=!1,this.yTouched=!1,Object.preventExtensions(this)}Le.prototype.nextTouched=function(e){for(var r=this.nextPointOnContour;!e.touched(r)&&r!==this;)r=r.nextPointOnContour;return r},Le.prototype.prevTouched=function(e){for(var r=this.prevPointOnContour;!e.touched(r)&&r!==this;)r=r.prevPointOnContour;return r};var hr=Object.freeze(new Le(0,0)),io={cvCutIn:17/16,deltaBase:9,deltaShift:.125,loop:1,minDis:1,autoFlip:!0};function De(e,r){switch(this.env=e,this.stack=[],this.prog=r,e){case"glyf":this.zp0=this.zp1=this.zp2=1,this.rp0=this.rp1=this.rp2=0;case"prep":this.fv=this.pv=this.dpv=ke,this.round=ra}}ea.prototype.exec=function(e,r){if(typeof r!="number")throw new Error("Point size is not a number!");if(!(this._errorState>2)){var t=this.font,n=this._prepState;if(!n||n.ppem!==r){var a=this._fpgmState;if(!a){De.prototype=io,a=this._fpgmState=new De("fpgm",t.tables.fpgm),a.funcs=[],a.font=t,s.DEBUG&&(console.log("---EXEC FPGM---"),a.step=-1);try{ze(a)}catch(d){console.log("Hinting error in FPGM:"+d),this._errorState=3;return}}De.prototype=a,n=this._prepState=new De("prep",t.tables.prep),n.ppem=r;var i=t.tables.cvt;if(i)for(var u=n.cvt=new Array(i.length),f=r/t.unitsPerEm,l=0;l<i.length;l++)u[l]=i[l]*f;else n.cvt=[];s.DEBUG&&(console.log("---EXEC PREP---"),n.step=-1);try{ze(n)}catch(d){this._errorState<2&&console.log("Hinting error in PREP:"+d),this._errorState=2}}if(!(this._errorState>1))try{return $n(e,n)}catch(d){this._errorState<1&&(console.log("Hinting error:"+d),console.log("Note: further hinting errors are silenced")),this._errorState=1;return}}},$n=function(e,r){var t=r.ppem/r.font.unitsPerEm,n=t,a=e.components,i,u,f;if(De.prototype=r,!a)f=new De("glyf",e.instructions),s.DEBUG&&(console.log("---EXEC GLYPH---"),f.step=-1),ct(e,f,t,n),u=f.gZone;else{var l=r.font;u=[],i=[];for(var d=0;d<a.length;d++){var v=a[d],x=l.glyphs.get(v.glyphIndex);f=new De("glyf",x.instructions),s.DEBUG&&(console.log("---EXEC COMP "+d+"---"),f.step=-1),ct(x,f,t,n);for(var g=Math.round(v.dx*t),y=Math.round(v.dy*n),T=f.gZone,w=f.contours,E=0;E<T.length;E++){var O=T[E];O.xTouched=O.yTouched=!1,O.xo=O.x=O.x+g,O.yo=O.y=O.y+y}var G=u.length;u.push.apply(u,T);for(var C=0;C<w.length;C++)i.push(w[C]+G)}e.instructions&&!f.inhibitGridFit&&(f=new De("glyf",e.instructions),f.gZone=f.z0=f.z1=f.z2=u,f.contours=i,u.push(new Le(0,0),new Le(Math.round(e.advanceWidth*t),0)),s.DEBUG&&(console.log("---EXEC COMPOSITE---"),f.step=-1),ze(f),u.length-=2)}return u},ct=function(e,r,t,n){for(var a=e.points||[],i=a.length,u=r.gZone=r.z0=r.z1=r.z2=[],f=r.contours=[],l,d=0;d<i;d++)l=a[d],u[d]=new Le(l.x*t,l.y*n,l.lastPointOfContour,l.onCurve);for(var v,x,g=0;g<i;g++)l=u[g],v||(v=l,f.push(g)),l.lastPointOfContour?(l.nextPointOnContour=v,v.prevPointOnContour=l,v=void 0):(x=u[g+1],l.nextPointOnContour=x,x.prevPointOnContour=l);if(!r.inhibitGridFit){if(s.DEBUG){console.log("PROCESSING GLYPH",r.stack);for(var y=0;y<i;y++)console.log(y,u[y].x,u[y].y)}if(u.push(new Le(0,0),new Le(Math.round(e.advanceWidth*t),0)),ze(r),u.length-=2,s.DEBUG){console.log("FINISHED GLYPH",r.stack);for(var T=0;T<i;T++)console.log(T,u[T].x,u[T].y)}}},ze=function(e){var r=e.prog;if(r){var t=r.length,n;for(e.ip=0;e.ip<t;e.ip++){if(s.DEBUG&&e.step++,n=Kn[r[e.ip]],!n)throw new Error("unknown instruction: 0x"+Number(r[e.ip]).toString(16));n(e)}}};function Br(e){for(var r=e.tZone=new Array(e.gZone.length),t=0;t<r.length;t++)r[t]=new Le(0,0)}function na(e,r){var t=e.prog,n=e.ip,a=1,i;do if(i=t[++n],i===88)a++;else if(i===89)a--;else if(i===64)n+=t[n+1]+1;else if(i===65)n+=2*t[n+1]+1;else if(i>=176&&i<=183)n+=i-176+1;else if(i>=184&&i<=191)n+=(i-184+1)*2;else if(r&&a===1&&i===27)break;while(a>0);e.ip=n}function aa(e,r){s.DEBUG&&console.log(r.step,"SVTCA["+e.axis+"]"),r.fv=r.pv=r.dpv=e}function sa(e,r){s.DEBUG&&console.log(r.step,"SPVTCA["+e.axis+"]"),r.pv=r.dpv=e}function ia(e,r){s.DEBUG&&console.log(r.step,"SFVTCA["+e.axis+"]"),r.fv=e}function oa(e,r){var t=r.stack,n=t.pop(),a=t.pop(),i=r.z2[n],u=r.z1[a];s.DEBUG&&console.log("SPVTL["+e+"]",n,a);var f,l;e?(f=i.y-u.y,l=u.x-i.x):(f=u.x-i.x,l=u.y-i.y),r.pv=r.dpv=cr(f,l)}function ua(e,r){var t=r.stack,n=t.pop(),a=t.pop(),i=r.z2[n],u=r.z1[a];s.DEBUG&&console.log("SFVTL["+e+"]",n,a);var f,l;e?(f=i.y-u.y,l=u.x-i.x):(f=u.x-i.x,l=u.y-i.y),r.fv=cr(f,l)}function oo(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"SPVFS[]",t,n),e.pv=e.dpv=cr(n,t)}function uo(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"SPVFS[]",t,n),e.fv=cr(n,t)}function lo(e){var r=e.stack,t=e.pv;s.DEBUG&&console.log(e.step,"GPV[]"),r.push(t.x*16384),r.push(t.y*16384)}function fo(e){var r=e.stack,t=e.fv;s.DEBUG&&console.log(e.step,"GFV[]"),r.push(t.x*16384),r.push(t.y*16384)}function co(e){e.fv=e.pv,s.DEBUG&&console.log(e.step,"SFVTPV[]")}function ho(e){var r=e.stack,t=r.pop(),n=r.pop(),a=r.pop(),i=r.pop(),u=r.pop(),f=e.z0,l=e.z1,d=f[t],v=f[n],x=l[a],g=l[i],y=e.z2[u];s.DEBUG&&console.log("ISECT[], ",t,n,a,i,u);var T=d.x,w=d.y,E=v.x,O=v.y,G=x.x,C=x.y,_=g.x,R=g.y,M=(T-E)*(C-R)-(w-O)*(G-_),ce=T*O-w*E,Y=G*R-C*_;y.x=(ce*(G-_)-Y*(T-E))/M,y.y=(ce*(C-R)-Y*(w-O))/M}function po(e){e.rp0=e.stack.pop(),s.DEBUG&&console.log(e.step,"SRP0[]",e.rp0)}function vo(e){e.rp1=e.stack.pop(),s.DEBUG&&console.log(e.step,"SRP1[]",e.rp1)}function go(e){e.rp2=e.stack.pop(),s.DEBUG&&console.log(e.step,"SRP2[]",e.rp2)}function mo(e){var r=e.stack.pop();switch(s.DEBUG&&console.log(e.step,"SZP0[]",r),e.zp0=r,r){case 0:e.tZone||Br(e),e.z0=e.tZone;break;case 1:e.z0=e.gZone;break;default:throw new Error("Invalid zone pointer")}}function yo(e){var r=e.stack.pop();switch(s.DEBUG&&console.log(e.step,"SZP1[]",r),e.zp1=r,r){case 0:e.tZone||Br(e),e.z1=e.tZone;break;case 1:e.z1=e.gZone;break;default:throw new Error("Invalid zone pointer")}}function xo(e){var r=e.stack.pop();switch(s.DEBUG&&console.log(e.step,"SZP2[]",r),e.zp2=r,r){case 0:e.tZone||Br(e),e.z2=e.tZone;break;case 1:e.z2=e.gZone;break;default:throw new Error("Invalid zone pointer")}}function bo(e){var r=e.stack.pop();switch(s.DEBUG&&console.log(e.step,"SZPS[]",r),e.zp0=e.zp1=e.zp2=r,r){case 0:e.tZone||Br(e),e.z0=e.z1=e.z2=e.tZone;break;case 1:e.z0=e.z1=e.z2=e.gZone;break;default:throw new Error("Invalid zone pointer")}}function So(e){e.loop=e.stack.pop(),s.DEBUG&&console.log(e.step,"SLOOP[]",e.loop)}function Fo(e){s.DEBUG&&console.log(e.step,"RTG[]"),e.round=ra}function To(e){s.DEBUG&&console.log(e.step,"RTHG[]"),e.round=no}function Uo(e){var r=e.stack.pop();s.DEBUG&&console.log(e.step,"SMD[]",r),e.minDis=r/64}function Eo(e){s.DEBUG&&console.log(e.step,"ELSE[]"),na(e,!1)}function ko(e){var r=e.stack.pop();s.DEBUG&&console.log(e.step,"JMPR[]",r),e.ip+=r-1}function Oo(e){var r=e.stack.pop();s.DEBUG&&console.log(e.step,"SCVTCI[]",r),e.cvCutIn=r/64}function wo(e){var r=e.stack;s.DEBUG&&console.log(e.step,"DUP[]"),r.push(r[r.length-1])}function ht(e){s.DEBUG&&console.log(e.step,"POP[]"),e.stack.pop()}function Co(e){s.DEBUG&&console.log(e.step,"CLEAR[]"),e.stack.length=0}function Lo(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"SWAP[]"),r.push(t),r.push(n)}function Io(e){var r=e.stack;s.DEBUG&&console.log(e.step,"DEPTH[]"),r.push(r.length)}function Ao(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"LOOPCALL[]",t,n);var a=e.ip,i=e.prog;e.prog=e.funcs[t];for(var u=0;u<n;u++)ze(e),s.DEBUG&&console.log(++e.step,u+1<n?"next loopcall":"done loopcall",u);e.ip=a,e.prog=i}function Bo(e){var r=e.stack.pop();s.DEBUG&&console.log(e.step,"CALL[]",r);var t=e.ip,n=e.prog;e.prog=e.funcs[r],ze(e),e.ip=t,e.prog=n,s.DEBUG&&console.log(++e.step,"returning from",r)}function Ro(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"CINDEX[]",t),r.push(r[r.length-t])}function Do(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"MINDEX[]",t),r.push(r.splice(r.length-t,1)[0])}function Po(e){if(e.env!=="fpgm")throw new Error("FDEF not allowed here");var r=e.stack,t=e.prog,n=e.ip,a=r.pop(),i=n;for(s.DEBUG&&console.log(e.step,"FDEF[]",a);t[++n]!==45;);e.ip=n,e.funcs[a]=t.slice(i+1,n)}function la(e,r){var t=r.stack.pop(),n=r.z0[t],a=r.fv,i=r.pv;s.DEBUG&&console.log(r.step,"MDAP["+e+"]",t);var u=i.distance(n,hr);e&&(u=r.round(u)),a.setRelative(n,hr,u,i),a.touch(n),r.rp0=r.rp1=t}function fa(e,r){var t=r.z2,n=t.length-2,a,i,u;s.DEBUG&&console.log(r.step,"IUP["+e.axis+"]");for(var f=0;f<n;f++)a=t[f],!e.touched(a)&&(i=a.prevTouched(e),i!==a&&(u=a.nextTouched(e),i===u&&e.setRelative(a,a,e.distance(i,i,!1,!0),e,!0),e.interpolate(a,i,u,e)))}function ca(e,r){for(var t=r.stack,n=e?r.rp1:r.rp2,a=(e?r.z0:r.z1)[n],i=r.fv,u=r.pv,f=r.loop,l=r.z2;f--;){var d=t.pop(),v=l[d],x=u.distance(a,a,!1,!0);i.setRelative(v,v,x,u),i.touch(v),s.DEBUG&&console.log(r.step,(r.loop>1?"loop "+(r.loop-f)+": ":"")+"SHP["+(e?"rp1":"rp2")+"]",d)}r.loop=1}function ha(e,r){var t=r.stack,n=e?r.rp1:r.rp2,a=(e?r.z0:r.z1)[n],i=r.fv,u=r.pv,f=t.pop(),l=r.z2[r.contours[f]],d=l;s.DEBUG&&console.log(r.step,"SHC["+e+"]",f);var v=u.distance(a,a,!1,!0);do d!==a&&i.setRelative(d,d,v,u),d=d.nextPointOnContour;while(d!==l)}function pa(e,r){var t=r.stack,n=e?r.rp1:r.rp2,a=(e?r.z0:r.z1)[n],i=r.fv,u=r.pv,f=t.pop();s.DEBUG&&console.log(r.step,"SHZ["+e+"]",f);var l;switch(f){case 0:l=r.tZone;break;case 1:l=r.gZone;break;default:throw new Error("Invalid zone")}for(var d,v=u.distance(a,a,!1,!0),x=l.length-2,g=0;g<x;g++)d=l[g],i.setRelative(d,d,v,u)}function Mo(e){for(var r=e.stack,t=e.loop,n=e.fv,a=r.pop()/64,i=e.z2;t--;){var u=r.pop(),f=i[u];s.DEBUG&&console.log(e.step,(e.loop>1?"loop "+(e.loop-t)+": ":"")+"SHPIX[]",u,a),n.setRelative(f,f,a),n.touch(f)}e.loop=1}function Go(e){for(var r=e.stack,t=e.rp1,n=e.rp2,a=e.loop,i=e.z0[t],u=e.z1[n],f=e.fv,l=e.dpv,d=e.z2;a--;){var v=r.pop(),x=d[v];s.DEBUG&&console.log(e.step,(e.loop>1?"loop "+(e.loop-a)+": ":"")+"IP[]",v,t,"<->",n),f.interpolate(x,i,u,l),f.touch(x)}e.loop=1}function da(e,r){var t=r.stack,n=t.pop()/64,a=t.pop(),i=r.z1[a],u=r.z0[r.rp0],f=r.fv,l=r.pv;f.setRelative(i,u,n,l),f.touch(i),s.DEBUG&&console.log(r.step,"MSIRP["+e+"]",n,a),r.rp1=r.rp0,r.rp2=a,e&&(r.rp0=a)}function No(e){for(var r=e.stack,t=e.rp0,n=e.z0[t],a=e.loop,i=e.fv,u=e.pv,f=e.z1;a--;){var l=r.pop(),d=f[l];s.DEBUG&&console.log(e.step,(e.loop>1?"loop "+(e.loop-a)+": ":"")+"ALIGNRP[]",l),i.setRelative(d,n,0,u),i.touch(d)}e.loop=1}function _o(e){s.DEBUG&&console.log(e.step,"RTDG[]"),e.round=to}function va(e,r){var t=r.stack,n=t.pop(),a=t.pop(),i=r.z0[a],u=r.fv,f=r.pv,l=r.cvt[n];s.DEBUG&&console.log(r.step,"MIAP["+e+"]",n,"(",l,")",a);var d=f.distance(i,hr);e&&(Math.abs(d-l)<r.cvCutIn&&(d=l),d=r.round(d)),u.setRelative(i,hr,d,f),r.zp0===0&&(i.xo=i.x,i.yo=i.y),u.touch(i),r.rp0=r.rp1=a}function Ho(e){var r=e.prog,t=e.ip,n=e.stack,a=r[++t];s.DEBUG&&console.log(e.step,"NPUSHB[]",a);for(var i=0;i<a;i++)n.push(r[++t]);e.ip=t}function zo(e){var r=e.ip,t=e.prog,n=e.stack,a=t[++r];s.DEBUG&&console.log(e.step,"NPUSHW[]",a);for(var i=0;i<a;i++){var u=t[++r]<<8|t[++r];u&32768&&(u=-((u^65535)+1)),n.push(u)}e.ip=r}function qo(e){var r=e.stack,t=e.store;t||(t=e.store=[]);var n=r.pop(),a=r.pop();s.DEBUG&&console.log(e.step,"WS",n,a),t[a]=n}function Wo(e){var r=e.stack,t=e.store,n=r.pop();s.DEBUG&&console.log(e.step,"RS",n);var a=t&&t[n]||0;r.push(a)}function Vo(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"WCVTP",t,n),e.cvt[n]=t/64}function Xo(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"RCVT",t),r.push(e.cvt[t]*64)}function ga(e,r){var t=r.stack,n=t.pop(),a=r.z2[n];s.DEBUG&&console.log(r.step,"GC["+e+"]",n),t.push(r.dpv.distance(a,hr,e,!1)*64)}function ma(e,r){var t=r.stack,n=t.pop(),a=t.pop(),i=r.z1[n],u=r.z0[a],f=r.dpv.distance(u,i,e,e);s.DEBUG&&console.log(r.step,"MD["+e+"]",n,a,"->",f),r.stack.push(Math.round(f*64))}function Yo(e){s.DEBUG&&console.log(e.step,"MPPEM[]"),e.stack.push(e.ppem)}function jo(e){s.DEBUG&&console.log(e.step,"FLIPON[]"),e.autoFlip=!0}function Zo(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"LT[]",t,n),r.push(n<t?1:0)}function Qo(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"LTEQ[]",t,n),r.push(n<=t?1:0)}function Jo(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"GT[]",t,n),r.push(n>t?1:0)}function Ko(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"GTEQ[]",t,n),r.push(n>=t?1:0)}function $o(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"EQ[]",t,n),r.push(t===n?1:0)}function eu(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"NEQ[]",t,n),r.push(t!==n?1:0)}function ru(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"ODD[]",t),r.push(Math.trunc(t)%2?1:0)}function tu(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"EVEN[]",t),r.push(Math.trunc(t)%2?0:1)}function nu(e){var r=e.stack.pop(),t;s.DEBUG&&console.log(e.step,"IF[]",r),r||(na(e,!0),s.DEBUG&&console.log(e.step,t===27?"ELSE[]":"EIF[]"))}function au(e){s.DEBUG&&console.log(e.step,"EIF[]")}function su(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"AND[]",t,n),r.push(t&&n?1:0)}function iu(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"OR[]",t,n),r.push(t||n?1:0)}function ou(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"NOT[]",t),r.push(t?0:1)}function pt(e,r){var t=r.stack,n=t.pop(),a=r.fv,i=r.pv,u=r.ppem,f=r.deltaBase+(e-1)*16,l=r.deltaShift,d=r.z0;s.DEBUG&&console.log(r.step,"DELTAP["+e+"]",n,t);for(var v=0;v<n;v++){var x=t.pop(),g=t.pop(),y=f+((g&240)>>4);if(y===u){var T=(g&15)-8;T>=0&&T++,s.DEBUG&&console.log(r.step,"DELTAPFIX",x,"by",T*l);var w=d[x];a.setRelative(w,w,T*l,i)}}}function uu(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"SDB[]",t),e.deltaBase=t}function lu(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"SDS[]",t),e.deltaShift=Math.pow(.5,t)}function fu(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"ADD[]",t,n),r.push(n+t)}function cu(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"SUB[]",t,n),r.push(n-t)}function hu(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"DIV[]",t,n),r.push(n*64/t)}function pu(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"MUL[]",t,n),r.push(n*t/64)}function du(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"ABS[]",t),r.push(Math.abs(t))}function vu(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"NEG[]",t),r.push(-t)}function gu(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"FLOOR[]",t),r.push(Math.floor(t/64)*64)}function mu(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"CEILING[]",t),r.push(Math.ceil(t/64)*64)}function Rr(e,r){var t=r.stack,n=t.pop();s.DEBUG&&console.log(r.step,"ROUND[]"),t.push(r.round(n/64)*64)}function yu(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"WCVTF[]",t,n),e.cvt[n]=t*e.ppem/e.font.unitsPerEm}function dt(e,r){var t=r.stack,n=t.pop(),a=r.ppem,i=r.deltaBase+(e-1)*16,u=r.deltaShift;s.DEBUG&&console.log(r.step,"DELTAC["+e+"]",n,t);for(var f=0;f<n;f++){var l=t.pop(),d=t.pop(),v=i+((d&240)>>4);if(v===a){var x=(d&15)-8;x>=0&&x++;var g=x*u;s.DEBUG&&console.log(r.step,"DELTACFIX",l,"by",g),r.cvt[l]+=g}}}function xu(e){var r=e.stack.pop();s.DEBUG&&console.log(e.step,"SROUND[]",r),e.round=ta;var t;switch(r&192){case 0:t=.5;break;case 64:t=1;break;case 128:t=2;break;default:throw new Error("invalid SROUND value")}switch(e.srPeriod=t,r&48){case 0:e.srPhase=0;break;case 16:e.srPhase=.25*t;break;case 32:e.srPhase=.5*t;break;case 48:e.srPhase=.75*t;break;default:throw new Error("invalid SROUND value")}r&=15,r===0?e.srThreshold=0:e.srThreshold=(r/8-.5)*t}function bu(e){var r=e.stack.pop();s.DEBUG&&console.log(e.step,"S45ROUND[]",r),e.round=ta;var t;switch(r&192){case 0:t=Math.sqrt(2)/2;break;case 64:t=Math.sqrt(2);break;case 128:t=2*Math.sqrt(2);break;default:throw new Error("invalid S45ROUND value")}switch(e.srPeriod=t,r&48){case 0:e.srPhase=0;break;case 16:e.srPhase=.25*t;break;case 32:e.srPhase=.5*t;break;case 48:e.srPhase=.75*t;break;default:throw new Error("invalid S45ROUND value")}r&=15,r===0?e.srThreshold=0:e.srThreshold=(r/8-.5)*t}function Su(e){s.DEBUG&&console.log(e.step,"ROFF[]"),e.round=ro}function Fu(e){s.DEBUG&&console.log(e.step,"RUTG[]"),e.round=ao}function Tu(e){s.DEBUG&&console.log(e.step,"RDTG[]"),e.round=so}function Uu(e){var r=e.stack.pop();s.DEBUG&&console.log(e.step,"SCANCTRL[]",r)}function ya(e,r){var t=r.stack,n=t.pop(),a=t.pop(),i=r.z2[n],u=r.z1[a];s.DEBUG&&console.log(r.step,"SDPVTL["+e+"]",n,a);var f,l;e?(f=i.y-u.y,l=u.x-i.x):(f=u.x-i.x,l=u.y-i.y),r.dpv=cr(f,l)}function Eu(e){var r=e.stack,t=r.pop(),n=0;s.DEBUG&&console.log(e.step,"GETINFO[]",t),t&1&&(n=35),t&32&&(n|=4096),r.push(n)}function ku(e){var r=e.stack,t=r.pop(),n=r.pop(),a=r.pop();s.DEBUG&&console.log(e.step,"ROLL[]"),r.push(n),r.push(t),r.push(a)}function Ou(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"MAX[]",t,n),r.push(Math.max(n,t))}function wu(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"MIN[]",t,n),r.push(Math.min(n,t))}function Cu(e){var r=e.stack.pop();s.DEBUG&&console.log(e.step,"SCANTYPE[]",r)}function Lu(e){var r=e.stack.pop(),t=e.stack.pop();switch(s.DEBUG&&console.log(e.step,"INSTCTRL[]",r,t),r){case 1:e.inhibitGridFit=!!t;return;case 2:e.ignoreCvt=!!t;return;default:throw new Error("invalid INSTCTRL[] selector")}}function Pe(e,r){var t=r.stack,n=r.prog,a=r.ip;s.DEBUG&&console.log(r.step,"PUSHB["+e+"]");for(var i=0;i<e;i++)t.push(n[++a]);r.ip=a}function Me(e,r){var t=r.ip,n=r.prog,a=r.stack;s.DEBUG&&console.log(r.ip,"PUSHW["+e+"]");for(var i=0;i<e;i++){var u=n[++t]<<8|n[++t];u&32768&&(u=-((u^65535)+1)),a.push(u)}r.ip=t}function L(e,r,t,n,a,i){var u=i.stack,f=e&&u.pop(),l=u.pop(),d=i.rp0,v=i.z0[d],x=i.z1[l],g=i.minDis,y=i.fv,T=i.dpv,w,E,O,G;E=w=T.distance(x,v,!0,!0),O=E>=0?1:-1,E=Math.abs(E),e&&(G=i.cvt[f],n&&Math.abs(E-G)<i.cvCutIn&&(E=G)),t&&E<g&&(E=g),n&&(E=i.round(E)),y.setRelative(x,v,O*E,T),y.touch(x),s.DEBUG&&console.log(i.step,(e?"MIRP[":"MDRP[")+(r?"M":"m")+(t?">":"_")+(n?"R":"_")+(a===0?"Gr":a===1?"Bl":a===2?"Wh":"")+"]",e?f+"("+i.cvt[f]+","+G+")":"",l,"(d =",w,"->",O*E,")"),i.rp1=i.rp0,i.rp2=l,r&&(i.rp0=l)}Kn=[aa.bind(void 0,Ce),aa.bind(void 0,ke),sa.bind(void 0,Ce),sa.bind(void 0,ke),ia.bind(void 0,Ce),ia.bind(void 0,ke),oa.bind(void 0,0),oa.bind(void 0,1),ua.bind(void 0,0),ua.bind(void 0,1),oo,uo,lo,fo,co,ho,po,vo,go,mo,yo,xo,bo,So,Fo,To,Uo,Eo,ko,Oo,void 0,void 0,wo,ht,Co,Lo,Io,Ro,Do,void 0,void 0,void 0,Ao,Bo,Po,void 0,la.bind(void 0,0),la.bind(void 0,1),fa.bind(void 0,Ce),fa.bind(void 0,ke),ca.bind(void 0,0),ca.bind(void 0,1),ha.bind(void 0,0),ha.bind(void 0,1),pa.bind(void 0,0),pa.bind(void 0,1),Mo,Go,da.bind(void 0,0),da.bind(void 0,1),No,_o,va.bind(void 0,0),va.bind(void 0,1),Ho,zo,qo,Wo,Vo,Xo,ga.bind(void 0,0),ga.bind(void 0,1),void 0,ma.bind(void 0,0),ma.bind(void 0,1),Yo,void 0,jo,void 0,void 0,Zo,Qo,Jo,Ko,$o,eu,ru,tu,nu,au,su,iu,ou,pt.bind(void 0,1),uu,lu,fu,cu,hu,pu,du,vu,gu,mu,Rr.bind(void 0,0),Rr.bind(void 0,1),Rr.bind(void 0,2),Rr.bind(void 0,3),void 0,void 0,void 0,void 0,yu,pt.bind(void 0,2),pt.bind(void 0,3),dt.bind(void 0,1),dt.bind(void 0,2),dt.bind(void 0,3),xu,bu,void 0,void 0,Su,void 0,Fu,Tu,ht,ht,void 0,void 0,void 0,void 0,void 0,Uu,ya.bind(void 0,0),ya.bind(void 0,1),Eu,void 0,ku,Ou,wu,Cu,Lu,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,Pe.bind(void 0,1),Pe.bind(void 0,2),Pe.bind(void 0,3),Pe.bind(void 0,4),Pe.bind(void 0,5),Pe.bind(void 0,6),Pe.bind(void 0,7),Pe.bind(void 0,8),Me.bind(void 0,1),Me.bind(void 0,2),Me.bind(void 0,3),Me.bind(void 0,4),Me.bind(void 0,5),Me.bind(void 0,6),Me.bind(void 0,7),Me.bind(void 0,8),L.bind(void 0,0,0,0,0,0),L.bind(void 0,0,0,0,0,1),L.bind(void 0,0,0,0,0,2),L.bind(void 0,0,0,0,0,3),L.bind(void 0,0,0,0,1,0),L.bind(void 0,0,0,0,1,1),L.bind(void 0,0,0,0,1,2),L.bind(void 0,0,0,0,1,3),L.bind(void 0,0,0,1,0,0),L.bind(void 0,0,0,1,0,1),L.bind(void 0,0,0,1,0,2),L.bind(void 0,0,0,1,0,3),L.bind(void 0,0,0,1,1,0),L.bind(void 0,0,0,1,1,1),L.bind(void 0,0,0,1,1,2),L.bind(void 0,0,0,1,1,3),L.bind(void 0,0,1,0,0,0),L.bind(void 0,0,1,0,0,1),L.bind(void 0,0,1,0,0,2),L.bind(void 0,0,1,0,0,3),L.bind(void 0,0,1,0,1,0),L.bind(void 0,0,1,0,1,1),L.bind(void 0,0,1,0,1,2),L.bind(void 0,0,1,0,1,3),L.bind(void 0,0,1,1,0,0),L.bind(void 0,0,1,1,0,1),L.bind(void 0,0,1,1,0,2),L.bind(void 0,0,1,1,0,3),L.bind(void 0,0,1,1,1,0),L.bind(void 0,0,1,1,1,1),L.bind(void 0,0,1,1,1,2),L.bind(void 0,0,1,1,1,3),L.bind(void 0,1,0,0,0,0),L.bind(void 0,1,0,0,0,1),L.bind(void 0,1,0,0,0,2),L.bind(void 0,1,0,0,0,3),L.bind(void 0,1,0,0,1,0),L.bind(void 0,1,0,0,1,1),L.bind(void 0,1,0,0,1,2),L.bind(void 0,1,0,0,1,3),L.bind(void 0,1,0,1,0,0),L.bind(void 0,1,0,1,0,1),L.bind(void 0,1,0,1,0,2),L.bind(void 0,1,0,1,0,3),L.bind(void 0,1,0,1,1,0),L.bind(void 0,1,0,1,1,1),L.bind(void 0,1,0,1,1,2),L.bind(void 0,1,0,1,1,3),L.bind(void 0,1,1,0,0,0),L.bind(void 0,1,1,0,0,1),L.bind(void 0,1,1,0,0,2),L.bind(void 0,1,1,0,0,3),L.bind(void 0,1,1,0,1,0),L.bind(void 0,1,1,0,1,1),L.bind(void 0,1,1,0,1,2),L.bind(void 0,1,1,0,1,3),L.bind(void 0,1,1,1,0,0),L.bind(void 0,1,1,1,0,1),L.bind(void 0,1,1,1,0,2),L.bind(void 0,1,1,1,0,3),L.bind(void 0,1,1,1,1,0),L.bind(void 0,1,1,1,1,1),L.bind(void 0,1,1,1,1,2),L.bind(void 0,1,1,1,1,3)];function V(e){e=e||{},e.empty||($e(e.familyName,"When creating a new Font object, familyName is required."),$e(e.styleName,"When creating a new Font object, styleName is required."),$e(e.unitsPerEm,"When creating a new Font object, unitsPerEm is required."),$e(e.ascender,"When creating a new Font object, ascender is required."),$e(e.descender,"When creating a new Font object, descender is required."),$e(e.descender<0,"Descender should be negative (e.g. -512)."),this.names={fontFamily:{en:e.familyName||" "},fontSubfamily:{en:e.styleName||" "},fullName:{en:e.fullName||e.familyName+" "+e.styleName},postScriptName:{en:e.postScriptName||e.familyName+e.styleName},designer:{en:e.designer||" "},designerURL:{en:e.designerURL||" "},manufacturer:{en:e.manufacturer||" "},manufacturerURL:{en:e.manufacturerURL||" "},license:{en:e.license||" "},licenseURL:{en:e.licenseURL||" "},version:{en:e.version||"Version 0.1"},description:{en:e.description||" "},copyright:{en:e.copyright||" "},trademark:{en:e.trademark||" "}},this.unitsPerEm=e.unitsPerEm||1e3,this.ascender=e.ascender,this.descender=e.descender,this.createdTimestamp=e.createdTimestamp,this.tables={os2:{usWeightClass:e.weightClass||this.usWeightClasses.MEDIUM,usWidthClass:e.widthClass||this.usWidthClasses.MEDIUM,fsSelection:e.fsSelection||this.fsSelectionValues.REGULAR}}),this.supported=!0,this.glyphs=new Je.GlyphSet(this,e.glyphs||[]),this.encoding=new hn(this),this.position=new Ar(this),this.substitution=new Fe(this),this.tables=this.tables||{},Object.defineProperty(this,"hinting",{get:function(){if(this._hinting)return this._hinting;if(this.outlinesFormat==="truetype")return this._hinting=new ea(this)}})}V.prototype.hasChar=function(e){return this.encoding.charToGlyphIndex(e)!==null},V.prototype.charToGlyphIndex=function(e){return this.encoding.charToGlyphIndex(e)},V.prototype.charToGlyph=function(e){var r=this.charToGlyphIndex(e),t=this.glyphs.get(r);return t||(t=this.glyphs.get(0)),t},V.prototype.stringToGlyphs=function(e,r){var t=this;r=r||this.defaultRenderOptions;for(var n=[],a=0;a<e.length;a+=1){var i=e[a];n.push(t.charToGlyphIndex(i))}var u=n.length;if(r.features){var f=r.script||this.substitution.getDefaultScriptName(),l=[];r.features.liga&&(l=l.concat(this.substitution.getFeature("liga",f,r.language))),r.features.rlig&&(l=l.concat(this.substitution.getFeature("rlig",f,r.language)));for(var d=0;d<u;d+=1)for(var v=0;v<l.length;v++){for(var x=l[v],g=x.sub,y=g.length,T=0;T<y&&g[T]===n[d+T];)T++;T===y&&(n.splice(d,y,x.by),u=u-y+1)}}for(var w=new Array(u),E=this.glyphs.get(0),O=0;O<u;O+=1)w[O]=t.glyphs.get(n[O])||E;return w},V.prototype.nameToGlyphIndex=function(e){return this.glyphNames.nameToGlyphIndex(e)},V.prototype.nameToGlyph=function(e){var r=this.nameToGlyphIndex(e),t=this.glyphs.get(r);return t||(t=this.glyphs.get(0)),t},V.prototype.glyphIndexToName=function(e){return this.glyphNames.glyphIndexToName?this.glyphNames.glyphIndexToName(e):""},V.prototype.getKerningValue=function(e,r){return e=e.index||e,r=r.index||r,this.kerningPairs[e+","+r]||0},V.prototype.defaultRenderOptions={kerning:!0,features:{liga:!0,rlig:!0}},V.prototype.forEachGlyph=function(e,r,t,n,a,i){var u=this;r=r!==void 0?r:0,t=t!==void 0?t:0,n=n!==void 0?n:72,a=a||this.defaultRenderOptions;var f=1/this.unitsPerEm*n,l=this.stringToGlyphs(e,a),d;if(a.kerning){var v=a.script||this.position.getDefaultScriptName();d=this.position.getKerningTables(v,a.language)}for(var x=0;x<l.length;x+=1){var g=l[x];if(i.call(u,g,r,t,n,a),g.advanceWidth&&(r+=g.advanceWidth*f),a.kerning&&x<l.length-1){var y=d?u.position.getKerningValue(d,g.index,l[x+1].index):u.getKerningValue(g,l[x+1]);r+=y*f}a.letterSpacing?r+=a.letterSpacing*n:a.tracking&&(r+=a.tracking/1e3*n)}return r},V.prototype.getPath=function(e,r,t,n,a){var i=new Q;return this.forEachGlyph(e,r,t,n,a,function(u,f,l,d){var v=u.getPath(f,l,d,a,this);i.extend(v)}),i},V.prototype.getPaths=function(e,r,t,n,a){var i=[];return this.forEachGlyph(e,r,t,n,a,function(u,f,l,d){var v=u.getPath(f,l,d,a,this);i.push(v)}),i},V.prototype.getAdvanceWidth=function(e,r,t){return this.forEachGlyph(e,0,0,r,t,function(){})},V.prototype.draw=function(e,r,t,n,a,i){this.getPath(r,t,n,a,i).draw(e)},V.prototype.drawPoints=function(e,r,t,n,a,i){this.forEachGlyph(r,t,n,a,i,function(u,f,l,d){u.drawPoints(e,f,l,d)})},V.prototype.drawMetrics=function(e,r,t,n,a,i){this.forEachGlyph(r,t,n,a,i,function(u,f,l,d){u.drawMetrics(e,f,l,d)})},V.prototype.getEnglishName=function(e){var r=this.names[e];if(r)return r.en},V.prototype.validate=function(){var e=[],r=this;function t(a,i){a||e.push(i)}function n(a){var i=r.getEnglishName(a);t(i&&i.trim().length>0,"No English "+a+" specified.")}n("fontFamily"),n("weightName"),n("manufacturer"),n("copyright"),n("version"),t(this.unitsPerEm>0,"No unitsPerEm specified.")},V.prototype.toTables=function(){return Ji.fontToTable(this)},V.prototype.toBuffer=function(){return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."),this.toArrayBuffer()},V.prototype.toArrayBuffer=function(){for(var e=this.toTables(),r=e.encode(),t=new ArrayBuffer(r.length),n=new Uint8Array(t),a=0;a<r.length;a++)n[a]=r[a];return t},V.prototype.download=function(e){var r=this.getEnglishName("fontFamily"),t=this.getEnglishName("fontSubfamily");e=e||r.replace(/\s/g,"")+"-"+t+".otf";var n=this.toArrayBuffer();if($i())window.requestFileSystem=window.requestFileSystem||window.webkitRequestFileSystem,window.requestFileSystem(window.TEMPORARY,n.byteLength,function(u){u.root.getFile(e,{create:!0},function(f){f.createWriter(function(l){var d=new DataView(n),v=new Blob([d],{type:"font/opentype"});l.write(v),l.addEventListener("writeend",function(){location.href=f.toURL()},!1)})})},function(u){throw new Error(u.name+": "+u.message)});else{var a=me("fs"),i=eo(n);a.writeFileSync(e,i)}},V.prototype.fsSelectionValues={ITALIC:1,UNDERSCORE:2,NEGATIVE:4,OUTLINED:8,STRIKEOUT:16,BOLD:32,REGULAR:64,USER_TYPO_METRICS:128,WWS:256,OBLIQUE:512},V.prototype.usWidthClasses={ULTRA_CONDENSED:1,EXTRA_CONDENSED:2,CONDENSED:3,SEMI_CONDENSED:4,MEDIUM:5,SEMI_EXPANDED:6,EXPANDED:7,EXTRA_EXPANDED:8,ULTRA_EXPANDED:9},V.prototype.usWeightClasses={THIN:100,EXTRA_LIGHT:200,LIGHT:300,NORMAL:400,MEDIUM:500,SEMI_BOLD:600,BOLD:700,EXTRA_BOLD:800,BLACK:900};function xa(e,r){var t=JSON.stringify(e),n=256;for(var a in r){var i=parseInt(a);if(!(!i||i<256)){if(JSON.stringify(r[a])===t)return i;n<=i&&(n=i+1)}}return r[n]=e,n}function Iu(e,r,t){var n=xa(r.name,t);return[{name:"tag_"+e,type:"TAG",value:r.tag},{name:"minValue_"+e,type:"FIXED",value:r.minValue<<16},{name:"defaultValue_"+e,type:"FIXED",value:r.defaultValue<<16},{name:"maxValue_"+e,type:"FIXED",value:r.maxValue<<16},{name:"flags_"+e,type:"USHORT",value:0},{name:"nameID_"+e,type:"USHORT",value:n}]}function Au(e,r,t){var n={},a=new A.Parser(e,r);return n.tag=a.parseTag(),n.minValue=a.parseFixed(),n.defaultValue=a.parseFixed(),n.maxValue=a.parseFixed(),a.skip("uShort",1),n.name=t[a.parseUShort()]||{},n}function Bu(e,r,t,n){for(var a=xa(r.name,n),i=[{name:"nameID_"+e,type:"USHORT",value:a},{name:"flags_"+e,type:"USHORT",value:0}],u=0;u<t.length;++u){var f=t[u].tag;i.push({name:"axis_"+e+" "+f,type:"FIXED",value:r.coordinates[f]<<16})}return i}function Ru(e,r,t,n){var a={},i=new A.Parser(e,r);a.name=n[i.parseUShort()]||{},i.skip("uShort",1),a.coordinates={};for(var u=0;u<t.length;++u)a.coordinates[t[u].tag]=i.parseFixed();return a}function Du(e,r){var t=new D.Table("fvar",[{name:"version",type:"ULONG",value:65536},{name:"offsetToData",type:"USHORT",value:0},{name:"countSizePairs",type:"USHORT",value:2},{name:"axisCount",type:"USHORT",value:e.axes.length},{name:"axisSize",type:"USHORT",value:20},{name:"instanceCount",type:"USHORT",value:e.instances.length},{name:"instanceSize",type:"USHORT",value:4+e.axes.length*4}]);t.offsetToData=t.sizeOf();for(var n=0;n<e.axes.length;n++)t.fields=t.fields.concat(Iu(n,e.axes[n],r));for(var a=0;a<e.instances.length;a++)t.fields=t.fields.concat(Bu(a,e.instances[a],e.axes,r));return t}function Pu(e,r,t){var n=new A.Parser(e,r),a=n.parseULong();N.argument(a===65536,"Unsupported fvar table version.");var i=n.parseOffset16();n.skip("uShort",1);for(var u=n.parseUShort(),f=n.parseUShort(),l=n.parseUShort(),d=n.parseUShort(),v=[],x=0;x<u;x++)v.push(Au(e,r+i+x*f,t));for(var g=[],y=r+i+u*f,T=0;T<l;T++)g.push(Ru(e,y+T*d,v,t));return{axes:v,instances:g}}var Mu={make:Du,parse:Pu},Te=new Array(10);Te[1]=function(){var r=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{posFormat:1,coverage:this.parsePointer(S.coverage),value:this.parseValueRecord()};if(t===2)return{posFormat:2,coverage:this.parsePointer(S.coverage),values:this.parseValueRecordList()};N.assert(!1,"0x"+r.toString(16)+": GPOS lookup type 1 format must be 1 or 2.")},Te[2]=function(){var r=this.offset+this.relativeOffset,t=this.parseUShort(),n=this.parsePointer(S.coverage),a=this.parseUShort(),i=this.parseUShort();if(t===1)return{posFormat:t,coverage:n,valueFormat1:a,valueFormat2:i,pairSets:this.parseList(S.pointer(S.list(function(){return{secondGlyph:this.parseUShort(),value1:this.parseValueRecord(a),value2:this.parseValueRecord(i)}})))};if(t===2){var u=this.parsePointer(S.classDef),f=this.parsePointer(S.classDef),l=this.parseUShort(),d=this.parseUShort();return{posFormat:t,coverage:n,valueFormat1:a,valueFormat2:i,classDef1:u,classDef2:f,class1Count:l,class2Count:d,classRecords:this.parseList(l,S.list(d,function(){return{value1:this.parseValueRecord(a),value2:this.parseValueRecord(i)}}))}}N.assert(!1,"0x"+r.toString(16)+": GPOS lookup type 2 format must be 1 or 2.")},Te[3]=function(){return{error:"GPOS Lookup 3 not supported"}},Te[4]=function(){return{error:"GPOS Lookup 4 not supported"}},Te[5]=function(){return{error:"GPOS Lookup 5 not supported"}},Te[6]=function(){return{error:"GPOS Lookup 6 not supported"}},Te[7]=function(){return{error:"GPOS Lookup 7 not supported"}},Te[8]=function(){return{error:"GPOS Lookup 8 not supported"}},Te[9]=function(){return{error:"GPOS Lookup 9 not supported"}};function Gu(e,r){r=r||0;var t=new S(e,r),n=t.parseVersion(1);return N.argument(n===1||n===1.1,"Unsupported GPOS table version "+n),n===1?{version:n,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(Te)}:{version:n,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(Te),variations:t.parseFeatureVariationsList()}}var Nu=new Array(10);function _u(e){return new D.Table("GPOS",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new D.ScriptList(e.scripts)},{name:"features",type:"TABLE",value:new D.FeatureList(e.features)},{name:"lookups",type:"TABLE",value:new D.LookupList(e.lookups,Nu)}])}var Hu={parse:Gu,make:_u};function zu(e){var r={};e.skip("uShort");var t=e.parseUShort();N.argument(t===0,"Unsupported kern sub-table version."),e.skip("uShort",2);var n=e.parseUShort();e.skip("uShort",3);for(var a=0;a<n;a+=1){var i=e.parseUShort(),u=e.parseUShort(),f=e.parseShort();r[i+","+u]=f}return r}function qu(e){var r={};e.skip("uShort");var t=e.parseULong();t>1&&console.warn("Only the first kern subtable is supported."),e.skip("uLong");var n=e.parseUShort(),a=n&255;if(e.skip("uShort"),a===0){var i=e.parseUShort();e.skip("uShort",3);for(var u=0;u<i;u+=1){var f=e.parseUShort(),l=e.parseUShort(),d=e.parseShort();r[f+","+l]=d}}return r}function Wu(e,r){var t=new A.Parser(e,r),n=t.parseUShort();if(n===0)return zu(t);if(n===1)return qu(t);throw new Error("Unsupported kern table version ("+n+").")}var Vu={parse:Wu};function Xu(e,r,t,n){for(var a=new A.Parser(e,r),i=n?a.parseUShort:a.parseULong,u=[],f=0;f<t+1;f+=1){var l=i.call(a);n&&(l*=2),u.push(l)}return u}var Yu={parse:Xu};function ju(e,r){var t=me("fs");t.readFile(e,function(n,a){if(n)return r(n.message);r(null,Jn(a))})}function Zu(e,r){var t=new XMLHttpRequest;t.open("get",e,!0),t.responseType="arraybuffer",t.onload=function(){return t.response?r(null,t.response):r("Font could not be loaded: "+t.statusText)},t.onerror=function(){r("Font could not be loaded")},t.send()}function ba(e,r){for(var t=[],n=12,a=0;a<r;a+=1){var i=A.getTag(e,n),u=A.getULong(e,n+4),f=A.getULong(e,n+8),l=A.getULong(e,n+12);t.push({tag:i,checksum:u,offset:f,length:l,compression:!1}),n+=16}return t}function Qu(e,r){for(var t=[],n=44,a=0;a<r;a+=1){var i=A.getTag(e,n),u=A.getULong(e,n+4),f=A.getULong(e,n+8),l=A.getULong(e,n+12),d=void 0;f<l?d="WOFF":d=!1,t.push({tag:i,offset:u,compression:d,compressedLength:f,length:l}),n+=20}return t}function J(e,r){if(r.compression==="WOFF"){var t=new Uint8Array(e.buffer,r.offset+2,r.compressedLength-2),n=new Uint8Array(r.length);if(Cs(t,n),n.byteLength!==r.length)throw new Error("Decompression error: "+r.tag+" decompressed length doesn't match recorded length");var a=new DataView(n.buffer,0);return{data:a,offset:0}}else return{data:e,offset:r.offset}}function vt(e){var r,t,n=new V({empty:!0}),a=new DataView(e,0),i,u=[],f=A.getTag(a,0);if(f==="\0\0\0"||f==="true"||f==="typ1")n.outlinesFormat="truetype",i=A.getUShort(a,4),u=ba(a,i);else if(f==="OTTO")n.outlinesFormat="cff",i=A.getUShort(a,4),u=ba(a,i);else if(f==="wOFF"){var l=A.getTag(a,4);if(l==="\0\0\0")n.outlinesFormat="truetype";else if(l==="OTTO")n.outlinesFormat="cff";else throw new Error("Unsupported OpenType flavor "+f);i=A.getUShort(a,12),u=Qu(a,i)}else throw new Error("Unsupported OpenType signature "+f);for(var d,v,x,g,y,T,w,E,O,G,C,_=0;_<i;_+=1){var R=u[_],M=void 0;switch(R.tag){case"cmap":M=J(a,R),n.tables.cmap=cn.parse(M.data,M.offset),n.encoding=new pn(n.tables.cmap);break;case"cvt ":M=J(a,R),C=new A.Parser(M.data,M.offset),n.tables.cvt=C.parseShortList(R.length/2);break;case"fvar":v=R;break;case"fpgm":M=J(a,R),C=new A.Parser(M.data,M.offset),n.tables.fpgm=C.parseByteList(R.length);break;case"head":M=J(a,R),n.tables.head=Cn.parse(M.data,M.offset),n.unitsPerEm=n.tables.head.unitsPerEm,r=n.tables.head.indexToLocFormat;break;case"hhea":M=J(a,R),n.tables.hhea=Ln.parse(M.data,M.offset),n.ascender=n.tables.hhea.ascender,n.descender=n.tables.hhea.descender,n.numberOfHMetrics=n.tables.hhea.numberOfHMetrics;break;case"hmtx":T=R;break;case"ltag":M=J(a,R),t=An.parse(M.data,M.offset);break;case"maxp":M=J(a,R),n.tables.maxp=Bn.parse(M.data,M.offset),n.numGlyphs=n.tables.maxp.numGlyphs;break;case"name":O=R;break;case"OS/2":M=J(a,R),n.tables.os2=ut.parse(M.data,M.offset);break;case"post":M=J(a,R),n.tables.post=Hn.parse(M.data,M.offset),n.glyphNames=new rt(n.tables.post);break;case"prep":M=J(a,R),C=new A.Parser(M.data,M.offset),n.tables.prep=C.parseByteList(R.length);break;case"glyf":x=R;break;case"loca":E=R;break;case"CFF ":d=R;break;case"kern":w=R;break;case"GPOS":g=R;break;case"GSUB":y=R;break;case"meta":G=R;break}}var ce=J(a,O);if(n.tables.name=_n.parse(ce.data,ce.offset,t),n.names=n.tables.name,x&&E){var Y=r===0,$=J(a,E),le=Yu.parse($.data,$.offset,n.numGlyphs,Y),he=J(a,x);n.glyphs=gn.parse(he.data,he.offset,le,n)}else if(d){var de=J(a,d);wn.parse(de.data,de.offset,n)}else throw new Error("Font doesn't contain TrueType or CFF outlines.");var ge=J(a,T);if(In.parse(ge.data,ge.offset,n.numberOfHMetrics,n.numGlyphs,n.glyphs),js(n),w){var K=J(a,w);n.kerningPairs=Vu.parse(K.data,K.offset)}else n.kerningPairs={};if(g){var ee=J(a,g);n.tables.gpos=Hu.parse(ee.data,ee.offset)}if(y){var ne=J(a,y);n.tables.gsub=zn.parse(ne.data,ne.offset)}if(v){var ae=J(a,v);n.tables.fvar=Mu.parse(ae.data,ae.offset,n.names)}if(G){var se=J(a,G);n.tables.meta=qn.parse(se.data,se.offset),n.metas=n.tables.meta}return n}function Ju(e,r){var t=typeof window>"u",n=t?ju:Zu;n(e,function(a,i){if(a)return r(a);var u;try{u=vt(i)}catch(f){return r(f,null)}return r(null,u)})}function Ku(e){var r=me("fs"),t=r.readFileSync(e);return vt(Jn(t))}s.Font=V,s.Glyph=pe,s.Path=Q,s.BoundingBox=we,s._parse=A,s.parse=vt,s.load=Ju,s.loadSync=Ku,Object.defineProperty(s,"__esModule",{value:!0})}))});var ka=q((_f,Ea)=>{"use strict";Ea.exports=function(s){s.prototype[Symbol.iterator]=function*(){for(let o=this.head;o;o=o.next)yield o.value}}});var wa=q((Hf,Oa)=>{"use strict";Oa.exports=H;H.Node=qe;H.create=H;function H(s){var o=this;if(o instanceof H||(o=new H),o.tail=null,o.head=null,o.length=0,s&&typeof s.forEach=="function")s.forEach(function(p){o.push(p)});else if(arguments.length>0)for(var c=0,h=arguments.length;c<h;c++)o.push(arguments[c]);return o}H.prototype.removeNode=function(s){if(s.list!==this)throw new Error("removing node which does not belong to this list");var o=s.next,c=s.prev;return o&&(o.prev=c),c&&(c.next=o),s===this.head&&(this.head=o),s===this.tail&&(this.tail=c),s.list.length--,s.next=null,s.prev=null,s.list=null,o};H.prototype.unshiftNode=function(s){if(s!==this.head){s.list&&s.list.removeNode(s);var o=this.head;s.list=this,s.next=o,o&&(o.prev=s),this.head=s,this.tail||(this.tail=s),this.length++}};H.prototype.pushNode=function(s){if(s!==this.tail){s.list&&s.list.removeNode(s);var o=this.tail;s.list=this,s.prev=o,o&&(o.next=s),this.tail=s,this.head||(this.head=s),this.length++}};H.prototype.push=function(){for(var s=0,o=arguments.length;s<o;s++)ll(this,arguments[s]);return this.length};H.prototype.unshift=function(){for(var s=0,o=arguments.length;s<o;s++)fl(this,arguments[s]);return this.length};H.prototype.pop=function(){if(this.tail){var s=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,s}};H.prototype.shift=function(){if(this.head){var s=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,s}};H.prototype.forEach=function(s,o){o=o||this;for(var c=this.head,h=0;c!==null;h++)s.call(o,c.value,h,this),c=c.next};H.prototype.forEachReverse=function(s,o){o=o||this;for(var c=this.tail,h=this.length-1;c!==null;h--)s.call(o,c.value,h,this),c=c.prev};H.prototype.get=function(s){for(var o=0,c=this.head;c!==null&&o<s;o++)c=c.next;if(o===s&&c!==null)return c.value};H.prototype.getReverse=function(s){for(var o=0,c=this.tail;c!==null&&o<s;o++)c=c.prev;if(o===s&&c!==null)return c.value};H.prototype.map=function(s,o){o=o||this;for(var c=new H,h=this.head;h!==null;)c.push(s.call(o,h.value,this)),h=h.next;return c};H.prototype.mapReverse=function(s,o){o=o||this;for(var c=new H,h=this.tail;h!==null;)c.push(s.call(o,h.value,this)),h=h.prev;return c};H.prototype.reduce=function(s,o){var c,h=this.head;if(arguments.length>1)c=o;else if(this.head)h=this.head.next,c=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var p=0;h!==null;p++)c=s(c,h.value,p),h=h.next;return c};H.prototype.reduceReverse=function(s,o){var c,h=this.tail;if(arguments.length>1)c=o;else if(this.tail)h=this.tail.prev,c=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var p=this.length-1;h!==null;p--)c=s(c,h.value,p),h=h.prev;return c};H.prototype.toArray=function(){for(var s=new Array(this.length),o=0,c=this.head;c!==null;o++)s[o]=c.value,c=c.next;return s};H.prototype.toArrayReverse=function(){for(var s=new Array(this.length),o=0,c=this.tail;c!==null;o++)s[o]=c.value,c=c.prev;return s};H.prototype.slice=function(s,o){o=o||this.length,o<0&&(o+=this.length),s=s||0,s<0&&(s+=this.length);var c=new H;if(o<s||o<0)return c;s<0&&(s=0),o>this.length&&(o=this.length);for(var h=0,p=this.head;p!==null&&h<s;h++)p=p.next;for(;p!==null&&h<o;h++,p=p.next)c.push(p.value);return c};H.prototype.sliceReverse=function(s,o){o=o||this.length,o<0&&(o+=this.length),s=s||0,s<0&&(s+=this.length);var c=new H;if(o<s||o<0)return c;s<0&&(s=0),o>this.length&&(o=this.length);for(var h=this.length,p=this.tail;p!==null&&h>o;h--)p=p.prev;for(;p!==null&&h>s;h--,p=p.prev)c.push(p.value);return c};H.prototype.splice=function(s,o,...c){s>this.length&&(s=this.length-1),s<0&&(s=this.length+s);for(var h=0,p=this.head;p!==null&&h<s;h++)p=p.next;for(var m=[],h=0;p&&h<o;h++)m.push(p.value),p=this.removeNode(p);p===null&&(p=this.tail),p!==this.head&&p!==this.tail&&(p=p.prev);for(var h=0;h<c.length;h++)p=ul(this,p,c[h]);return m};H.prototype.reverse=function(){for(var s=this.head,o=this.tail,c=s;c!==null;c=c.prev){var h=c.prev;c.prev=c.next,c.next=h}return this.head=o,this.tail=s,this};function ul(s,o,c){var h=o===s.head?new qe(c,null,o,s):new qe(c,o,o.next,s);return h.next===null&&(s.tail=h),h.prev===null&&(s.head=h),s.length++,h}function ll(s,o){s.tail=new qe(o,s.tail,null,s),s.head||(s.head=s.tail),s.length++}function fl(s,o){s.head=new qe(o,null,s.head,s),s.tail||(s.tail=s.head),s.length++}function qe(s,o,c,h){if(!(this instanceof qe))return new qe(s,o,c,h);this.list=h,this.value=s,o?(o.next=this,this.prev=o):this.prev=null,c?(c.prev=this,this.next=c):this.next=null}try{ka()(H)}catch{}});var Ba=q((zf,Aa)=>{"use strict";var cl=wa(),We=Symbol("max"),Ae=Symbol("length"),er=Symbol("lengthCalculator"),dr=Symbol("allowStale"),Ve=Symbol("maxAge"),Ie=Symbol("dispose"),Ca=Symbol("noDisposeOnSet"),re=Symbol("lruList"),Ue=Symbol("cache"),Ia=Symbol("updateAgeOnGet"),yt=()=>1,bt=class{constructor(o){if(typeof o=="number"&&(o={max:o}),o||(o={}),o.max&&(typeof o.max!="number"||o.max<0))throw new TypeError("max must be a non-negative number");let c=this[We]=o.max||1/0,h=o.length||yt;if(this[er]=typeof h!="function"?yt:h,this[dr]=o.stale||!1,o.maxAge&&typeof o.maxAge!="number")throw new TypeError("maxAge must be a number");this[Ve]=o.maxAge||0,this[Ie]=o.dispose,this[Ca]=o.noDisposeOnSet||!1,this[Ia]=o.updateAgeOnGet||!1,this.reset()}set max(o){if(typeof o!="number"||o<0)throw new TypeError("max must be a non-negative number");this[We]=o||1/0,pr(this)}get max(){return this[We]}set allowStale(o){this[dr]=!!o}get allowStale(){return this[dr]}set maxAge(o){if(typeof o!="number")throw new TypeError("maxAge must be a non-negative number");this[Ve]=o,pr(this)}get maxAge(){return this[Ve]}set lengthCalculator(o){typeof o!="function"&&(o=yt),o!==this[er]&&(this[er]=o,this[Ae]=0,this[re].forEach(c=>{c.length=this[er](c.value,c.key),this[Ae]+=c.length})),pr(this)}get lengthCalculator(){return this[er]}get length(){return this[Ae]}get itemCount(){return this[re].length}rforEach(o,c){c=c||this;for(let h=this[re].tail;h!==null;){let p=h.prev;La(this,o,h,c),h=p}}forEach(o,c){c=c||this;for(let h=this[re].head;h!==null;){let p=h.next;La(this,o,h,c),h=p}}keys(){return this[re].toArray().map(o=>o.key)}values(){return this[re].toArray().map(o=>o.value)}reset(){this[Ie]&&this[re]&&this[re].length&&this[re].forEach(o=>this[Ie](o.key,o.value)),this[Ue]=new Map,this[re]=new cl,this[Ae]=0}dump(){return this[re].map(o=>Mr(this,o)?!1:{k:o.key,v:o.value,e:o.now+(o.maxAge||0)}).toArray().filter(o=>o)}dumpLru(){return this[re]}set(o,c,h){if(h=h||this[Ve],h&&typeof h!="number")throw new TypeError("maxAge must be a number");let p=h?Date.now():0,m=this[er](c,o);if(this[Ue].has(o)){if(m>this[We])return rr(this,this[Ue].get(o)),!1;let U=this[Ue].get(o).value;return this[Ie]&&(this[Ca]||this[Ie](o,U.value)),U.now=p,U.maxAge=h,U.value=c,this[Ae]+=m-U.length,U.length=m,this.get(o),pr(this),!0}let b=new St(o,c,m,p,h);return b.length>this[We]?(this[Ie]&&this[Ie](o,c),!1):(this[Ae]+=b.length,this[re].unshift(b),this[Ue].set(o,this[re].head),pr(this),!0)}has(o){if(!this[Ue].has(o))return!1;let c=this[Ue].get(o).value;return!Mr(this,c)}get(o){return xt(this,o,!0)}peek(o){return xt(this,o,!1)}pop(){let o=this[re].tail;return o?(rr(this,o),o.value):null}del(o){rr(this,this[Ue].get(o))}load(o){this.reset();let c=Date.now();for(let h=o.length-1;h>=0;h--){let p=o[h],m=p.e||0;if(m===0)this.set(p.k,p.v);else{let b=m-c;b>0&&this.set(p.k,p.v,b)}}}prune(){this[Ue].forEach((o,c)=>xt(this,c,!1))}},xt=(s,o,c)=>{let h=s[Ue].get(o);if(h){let p=h.value;if(Mr(s,p)){if(rr(s,h),!s[dr])return}else c&&(s[Ia]&&(h.value.now=Date.now()),s[re].unshiftNode(h));return p.value}},Mr=(s,o)=>{if(!o||!o.maxAge&&!s[Ve])return!1;let c=Date.now()-o.now;return o.maxAge?c>o.maxAge:s[Ve]&&c>s[Ve]},pr=s=>{if(s[Ae]>s[We])for(let o=s[re].tail;s[Ae]>s[We]&&o!==null;){let c=o.prev;rr(s,o),o=c}},rr=(s,o)=>{if(o){let c=o.value;s[Ie]&&s[Ie](c.key,c.value),s[Ae]-=c.length,s[Ue].delete(c.key),s[re].removeNode(o)}},St=class{constructor(o,c,h,p,m){this.key=o,this.value=c,this.length=h,this.now=p,this.maxAge=m||0}},La=(s,o,c,h)=>{let p=c.value;Mr(s,p)&&(rr(s,c),s[dr]||(p=void 0)),p&&o.call(h,p.value,p.key,s)};Aa.exports=bt});var Et=q(Ut=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});function hl(s){let o={individual:{},range:[]};for(let c of s)Tt(o,c);return o}Ut.default=hl;function Tt(s,o){for(let[c,h]of Object.entries(o.individual))if(s.individual[c])tr(s.individual[c],h);else{let p=!1;for(let[m,{range:b,entry:F}]of s.range.entries()){let U=Ft(Number(c),b);if(U.both!==null){p=!0,s.individual[c]=h,tr(s.individual[c],oe(F)),s.range.splice(m,1);for(let I of U.second)Array.isArray(I)?s.range.push({range:I,entry:oe(F)}):s.individual[I]=oe(F)}}p||(s.individual[c]=h)}for(let{range:c,entry:h}of o.range){let p=[c];for(let m=0;m<s.range.length;m++){let{range:b,entry:F}=s.range[m];for(let[U,I]of p.entries())if(Array.isArray(I)){let z=pl(I,b);if(z.both===null)continue;s.range.splice(m,1),m--;let B=oe(F);Array.isArray(z.both)?s.range.push({range:z.both,entry:B}):s.individual[z.both]=B,tr(B,oe(h));for(let W of z.second)Array.isArray(W)?s.range.push({range:W,entry:oe(F)}):s.individual[W]=oe(F);p=z.first}else{let z=Ft(I,b);if(z.both===null)continue;s.individual[I]=oe(h),tr(s.individual[I],oe(F)),s.range.splice(m,1),m--;for(let B of z.second)Array.isArray(B)?s.range.push({range:B,entry:oe(F)}):s.individual[B]=oe(F);p.splice(U,1,...z.first);break}}for(let m of Object.keys(s.individual))for(let[b,F]of p.entries())if(Array.isArray(F)){let U=Ft(Number(m),F);if(U.both===null)continue;tr(s.individual[m],oe(h)),p.splice(b,1,...U.second);break}else if(Number(m)===F){tr(s.individual[m],oe(h));break}for(let m of p)Array.isArray(m)?s.range.push({range:m,entry:oe(h)}):s.individual[m]=oe(h)}}function tr(s,o){o.lookup&&(!s.lookup||s.lookup.index>o.lookup.index||s.lookup.index===o.lookup.index&&s.lookup.subIndex>o.lookup.subIndex)&&(s.lookup=o.lookup),o.forward&&(s.forward?Tt(s.forward,o.forward):s.forward=o.forward),o.reverse&&(s.reverse?Tt(s.reverse,o.reverse):s.reverse=o.reverse)}function pl(s,o){let c={first:[],second:[],both:null};if(s[0]<o[1]&&o[0]<s[1]){let h=Math.max(s[0],o[0]),p=Math.min(s[1],o[1]);c.both=Xe(h,p)}if(s[0]<o[0]){let h=s[0],p=Math.min(o[0],s[1]);c.first.push(Xe(h,p))}else if(o[0]<s[0]){let h=o[0],p=Math.min(o[1],s[0]);c.second.push(Xe(h,p))}if(s[1]>o[1]){let h=Math.max(s[0],o[1]),p=s[1];c.first.push(Xe(h,p))}else if(o[1]>s[1]){let h=Math.max(s[1],o[0]),p=o[1];c.second.push(Xe(h,p))}return c}function Ft(s,o){if(s<o[0]||s>o[1])return{first:[s],second:[o],both:null};let c={first:[],second:[],both:s};return o[0]<s&&c.second.push(Xe(o[0],s)),o[1]>s&&c.second.push(Xe(s+1,o[1])),c}function Xe(s,o){return o-s===1?s:[s,o]}function oe(s){let o={};return s.forward&&(o.forward=Ra(s.forward)),s.reverse&&(o.reverse=Ra(s.reverse)),s.lookup&&(o.lookup={contextRange:s.lookup.contextRange.slice(),index:s.lookup.index,length:s.lookup.length,subIndex:s.lookup.subIndex,substitutions:s.lookup.substitutions.slice()}),o}function Ra(s){let o={};for(let[c,h]of Object.entries(s.individual))o[c]=oe(h);return{individual:o,range:s.range.map(({range:c,entry:h})=>({range:c.slice(),entry:oe(h)}))}}});var Pa=q(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});function Da(s,o,c,h){let p=o[h],m=s[p];if(!m)return;let b=m.lookup;if(m.reverse){let U=dl(m.reverse,o,c);(!b&&U||U&&b&&(b.index>U.index||b.index===U.index&&b.subIndex>U.subIndex))&&(b=U)}if(++h>=o.length||!m.forward)return b;let F=Da(m.forward,o,c,h);return(!b&&F||F&&b&&(b.index>F.index||b.index===F.index&&b.subIndex>F.subIndex))&&(b=F),b}kt.default=Da;function dl(s,o,c){let h=s[o[--c]],p=h&&h.lookup;for(;h&&((!p&&h.lookup||h.lookup&&p&&p.index>h.lookup.index)&&(p=h.lookup),!(--c<0||!h.reverse));)h=h.reverse[o[c]];return p}});var Ma=q(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});function vl(s,o,c){let h=!1;for(let p=0;p<s.length;p++){let m=s[p];if(h){if(c<=m[0])return s[p-1][1]=c,s;if(c<=m[1])return s[p-1][1]=Math.max(c,m[1]),s.splice(p,1),h=!1,s;s.splice(p,1),p--}else{if(c<=m[0])return s.splice(p,0,[o,c]),s;if(c<=m[1])return m[0]=Math.min(o,m[0]),s;if(o<m[1])m[0]=Math.min(o,m[0]),h=!0;else continue}}return h?s[s.length-1][1]=c:s.push([o,c]),s}Ot.default=vl});var nr=q(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});function gl(s,o){switch(s.format){case 1:let c=s.glyphs.indexOf(o);return c!==-1?c:null;case 2:let h=s.ranges.find(p=>p.start<=o&&p.end>=o);return h?h.index:null}}Gr.default=gl;function ml(s){switch(s.format){case 1:return s.glyphs.map((c,h)=>({glyphId:c,index:h}));case 2:let o=[];for(let[c,h]of s.ranges.entries())h.end===h.start?o.push({glyphId:h.start,index:c}):o.push({glyphId:[h.start,h.end+1],index:c});return o}}Gr.listGlyphsByIndex=ml});var Ga=q(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});var yl=nr();function xl(s,o){let c=o[0],h=wt(s,c),p=o[0]+1,m=new Map;for(;p<o[1];)wt(s,p)!==h&&(p-c<=1?m.set(c,h):m.set([c,p],h)),p++;return p-c<=1?m.set(c,h):m.set([c,p],h),m}Nr.getRangeSubstitutionGlyphs=xl;function wt(s,o){let c=yl.default(s.coverage,o);if(c===null)return null;switch(s.substFormat){case 1:return(o+s.deltaGlyphId)%2**16;case 2:return s.substitute[c]!=null?s.substitute[c]:null}}Nr.getIndividualSubstitutionGlyph=wt});var vr=q(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});var Na=Ga();function bl(s,o,c,h,p){let m=[];for(let b of c){b.entry.forward={individual:{},range:[]};for(let F of s)m.push(..._a(b.entry.forward,h,p,o,F).map(({entry:U,substitution:I})=>({entry:U,substitutions:[...b.substitutions,I]})))}return m}ar.processInputPosition=bl;function Sl(s,o){let c=[];for(let h of o)for(let p of s){let m={};h.entry.forward||(h.entry.forward={individual:{},range:[]}),c.push({entry:m,substitutions:h.substitutions}),Array.isArray(p)?h.entry.forward.range.push({entry:m,range:p}):h.entry.forward.individual[p]=m}return c}ar.processLookaheadPosition=Sl;function Fl(s,o){let c=[];for(let h of o)for(let p of s){let m={};h.entry.reverse||(h.entry.reverse={individual:{},range:[]}),c.push({entry:m,substitutions:h.substitutions}),Array.isArray(p)?h.entry.reverse.range.push({entry:m,range:p}):h.entry.reverse.individual[p]=m}return c}ar.processBacktrackPosition=Fl;function _a(s,o,c,h,p){let m=[];if(!Array.isArray(p))s.individual[p]={},m.push({entry:s.individual[p],substitution:Ul(o,c,h,p)});else{let b=Tl(o,c,h,p);for(let[F,U]of b){let I={};Array.isArray(F)?s.range.push({range:F,entry:I}):s.individual[F]={},m.push({entry:I,substitution:U})}}return m}ar.getInputTree=_a;function Tl(s,o,c,h){for(let p of s.filter(m=>m.sequenceIndex===c))for(let m of o[p.lookupListIndex].subtables){let b=Na.getRangeSubstitutionGlyphs(m,h);if(!Array.from(b.values()).every(F=>F!==null))return b}return new Map([[h,null]])}function Ul(s,o,c,h){for(let p of s.filter(m=>m.sequenceIndex===c))for(let m of o[p.lookupListIndex].subtables){let b=Na.getIndividualSubstitutionGlyph(m,h);if(b!==null)return b}return null}});var Ha=q(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});var El=nr(),_r=vr();function kl(s,o,c){let h={individual:{},range:[]},p=El.listGlyphsByIndex(s.coverage);for(let{glyphId:m,index:b}of p){let F=s.chainRuleSets[b];if(F)for(let[U,I]of F.entries()){let z=_r.getInputTree(h,I.lookupRecords,o,0,m).map(({entry:B,substitution:W})=>({entry:B,substitutions:[W]}));for(let[B,W]of I.input.entries())z=_r.processInputPosition([W],B+1,z,I.lookupRecords,o);for(let B of I.lookahead)z=_r.processLookaheadPosition([B],z);for(let B of I.backtrack)z=_r.processBacktrackPosition([B],z);for(let{entry:B,substitutions:W}of z)B.lookup={substitutions:W,length:I.input.length+1,index:c,subIndex:U,contextRange:[-1*I.backtrack.length,1+I.input.length+I.lookahead.length]}}}return h}Ct.default=kl});var za=q(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});function Ol(s,o){switch(s.format){case 2:return Array.isArray(o)?wl(s,o):new Map([[o,Lt(s,o)]]);default:return new Map([[o,null]])}}Hr.default=Ol;function wl(s,o){let c=o[0],h=Lt(s,c),p=o[0]+1,m=new Map;for(;p<o[1];)Lt(s,p)!==h&&(p-c<=1?m.set(c,h):m.set([c,p],h)),p++;return p-c<=1?m.set(c,h):m.set([c,p],h),m}function Lt(s,o){for(let c of s.ranges)if(c.start<=o&&c.end>=o)return c.classId;return null}function Cl(s,o){switch(s.format){case 2:let c=[];for(let h of s.ranges)h.classId===o&&(h.end===h.start?c.push(h.start):c.push([h.start,h.end+1]));return c;default:return[]}}Hr.listClassGlyphs=Cl});var qa=q(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});var Ll=Et(),Il=nr(),zr=za(),qr=vr();function Al(s,o,c){let h=[],p=Il.listGlyphsByIndex(s.coverage);for(let{glyphId:m}of p){let b=zr.default(s.inputClassDef,m);for(let[F,U]of b.entries()){if(U===null)continue;let I=s.chainClassSet[U];if(I)for(let[z,B]of I.entries()){let W={individual:{},range:[]},X=qr.getInputTree(W,B.lookupRecords,o,0,F).map(({entry:Z,substitution:xe})=>({entry:Z,substitutions:[xe]}));for(let[Z,xe]of B.input.entries())X=qr.processInputPosition(zr.listClassGlyphs(s.inputClassDef,xe),Z+1,X,B.lookupRecords,o);for(let Z of B.lookahead)X=qr.processLookaheadPosition(zr.listClassGlyphs(s.lookaheadClassDef,Z),X);for(let Z of B.backtrack)X=qr.processBacktrackPosition(zr.listClassGlyphs(s.backtrackClassDef,Z),X);for(let{entry:Z,substitutions:xe}of X)Z.lookup={substitutions:xe,index:c,subIndex:z,length:B.input.length+1,contextRange:[-1*B.backtrack.length,1+B.input.length+B.lookahead.length]};h.push(W)}}}return Ll.default(h)}It.default=Al});var Wa=q(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});var Wr=nr(),Vr=vr();function Bl(s,o,c){let h={individual:{},range:[]},p=Wr.listGlyphsByIndex(s.inputCoverage[0]);for(let{glyphId:m}of p){let b=Vr.getInputTree(h,s.lookupRecords,o,0,m).map(({entry:F,substitution:U})=>({entry:F,substitutions:[U]}));for(let[F,U]of s.inputCoverage.slice(1).entries())b=Vr.processInputPosition(Wr.listGlyphsByIndex(U).map(I=>I.glyphId),F+1,b,s.lookupRecords,o);for(let F of s.lookaheadCoverage)b=Vr.processLookaheadPosition(Wr.listGlyphsByIndex(F).map(U=>U.glyphId),b);for(let F of s.backtrackCoverage)b=Vr.processBacktrackPosition(Wr.listGlyphsByIndex(F).map(U=>U.glyphId),b);for(let{entry:F,substitutions:U}of b)F.lookup={substitutions:U,index:c,subIndex:0,length:s.inputCoverage.length,contextRange:[-1*s.backtrackCoverage.length,s.inputCoverage.length+s.lookaheadCoverage.length]}}return h}At.default=Bl});var Xa=q(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});var Bt=nr(),Va=vr();function Rl(s,o){let c={individual:{},range:[]},h=Bt.listGlyphsByIndex(s.coverage);for(let{glyphId:p,index:m}of h){let b={};Array.isArray(p)?c.range.push({entry:b,range:p}):c.individual[p]=b;let F=[{entry:b,substitutions:[s.substitutes[m]]}];for(let U of s.lookaheadCoverage)F=Va.processLookaheadPosition(Bt.listGlyphsByIndex(U).map(I=>I.glyphId),F);for(let U of s.backtrackCoverage)F=Va.processBacktrackPosition(Bt.listGlyphsByIndex(U).map(I=>I.glyphId),F);for(let{entry:U,substitutions:I}of F)U.lookup={substitutions:I,index:o,subIndex:0,length:1,contextRange:[-1*s.backtrackCoverage.length,1+s.lookaheadCoverage.length]}}return c}Rt.default=Rl});var ja=q(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});function Dt(s){let o={};for(let[c,h]of Object.entries(s.individual))o[c]=Ya(h);for(let{range:c,entry:h}of s.range){let p=Ya(h);for(let m=c[0];m<c[1];m++)o[m]=p}return o}Pt.default=Dt;function Ya(s){let o={};return s.forward&&(o.forward=Dt(s.forward)),s.reverse&&(o.reverse=Dt(s.reverse)),s.lookup&&(o.lookup=s.lookup),o}});var $a=q(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});var Za=me("fs"),Qa=me("util"),Ja=me("path"),Dl=Qa.promisify(Za.readdir),Pl=Qa.promisify(Za.stat);async function Ml(s,o){let c=new Set;return await Promise.all(s.map(async h=>{let p=await Ka(Ja.resolve(h),new RegExp(`\\.${o.map(m=>`(?:${m})`).join("|")}$`,"i"));for(let m of p)c.add(m)})),[...c]}Mt.default=Ml;async function Ka(s,o,c=10){if(c<=0)return[];let h;try{h=await Dl(s)}catch{return[]}let p=[];return await Promise.all(h.map(async m=>{let b=Ja.join(s,m),F;try{F=await Pl(b)}catch{return}F.isFile()&&o.test(b)?p.push(b):F.isDirectory()&&p.push(...await Ka(b,o,c-1))})),p}});var rs=q((_t,es)=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});var Ye=me("path"),Gt=me("os"),Gl=$a(),Nl={win32:()=>{let s=Ye.join(process.env.WINDIR||"C:\\Windows","Fonts"),o="Microsoft\\Windows\\Fonts",c;return process.env.LOCALAPPDATA?c=Ye.join(process.env.LOCALAPPDATA,o):process.env.APPDATA?c=Ye.join(process.env.APPDATA,"Local",o):process.env.USERPROFILE&&(c=Ye.join(process.env.USERPROFILE,"AppData","Local",o)),c?[s,c]:[s]},darwin:()=>{let s=Gt.homedir();return[...s?[Ye.join(s,"/Library/Fonts")]:[],"/Library/Fonts","/Network/Library/Fonts","/System/Library/Fonts","/System Folder/Fonts"]},linux:()=>{let s=Gt.homedir();return["/usr/share/fonts","/usr/local/share/fonts",...s?[Ye.join(s,".fonts"),Ye.join(s,".local/share/fonts")]:[]]}};function Nt(s){let o=Object.assign({extensions:["ttf","otf","ttc","woff","woff2"],additionalFolders:[]},s),c=Gt.platform(),h=Nl[c];if(!h)throw new Error(`Unsupported platform: ${c}`);let p=h();return Gl.default([...p,...o.additionalFolders],o.extensions)}es.exports=Object.assign(Nt,{default:Nt});_t.default=Nt});var ns=q((qt,ts)=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});var _l=me("stream"),Ht=class extends _l.Writable{constructor(){super(...arguments),this.offset=0,this._waiters=[],this._closed=!1}_write(o,c,h){let p=0,m=()=>{for(;this._waiters.length>0;){let b=this._waiters[0];if(this._buffer){let F=this._buffer.size-this._buffer.offset;if(F+o.length>=b.size){if(b.skip)this._buffer=void 0,b.resolve();else{let U=Math.min(F,b.size),I=Buffer.alloc(b.size);this._buffer.buf.copy(I,0,this._buffer.offset,this._buffer.offset+U),o.copy(I,U,0,b.size-U),b.resolve(I)}if(this.offset+=b.size,this._waiters.shift(),this._buffer=void 0,F+o.length===b.size){h();break}else p+=b.size-F}else{if(!b.skip){let U=Buffer.alloc(F+o.length);this._buffer.buf.copy(U,0,this._buffer.offset,this._buffer.size),o.copy(U,F,0,o.length),this._buffer.buf=U}this._buffer.offset=0,this._buffer.size=F+o.length,h();break}}else if(o.length-p>=b.size){if(b.skip?b.resolve():b.resolve(o.slice(p,p+b.size)),this.offset+=b.size,this._waiters.shift(),p+=b.size,o.length===p){h();break}}else{this._buffer={buf:b.skip?void 0:o.slice(p),offset:0,size:o.length-p},p=o.length,h();break}}this._processTrigger=o.length-p>0?m:void 0};m()}_destroy(o,c){this._processTrigger=void 0;for(let h of this._waiters)h.reject(o||new Error("stream destroyed"));this._waiters=[],this._closed=!0}_final(o){this._processTrigger=void 0;for(let c of this._waiters)c.reject(new Error("not enough data in stream"));this._waiters=[],this._closed=!0}read(o){return new Promise((c,h)=>{this._closed&&h(new Error("stream is closed")),this._waiters.push({resolve:c,reject:h,size:o,skip:!1}),this._processTrigger&&this._processTrigger()})}skip(o){return new Promise((c,h)=>{this._closed&&h(new Error("stream is closed")),this._waiters.push({resolve:c,reject:h,size:o,skip:!0}),this._processTrigger&&this._processTrigger()})}};function zt(){return new Ht}ts.exports=Object.assign(zt,{default:zt});qt.default=zt});var as=q(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});var Hl=["copyright","fontFamily","fontSubfamily","uniqueID","fullName","version","postScriptName","trademark","manufacturer","designer","description","manufacturerURL","designerURL","license","licenseURL","reserved","preferredFamily","preferredSubfamily","compatibleFullName","sampleText","postScriptFindFontName","wwsFamily","wwsSubfamily"],zl={0:"en",1:"fr",2:"de",3:"it",4:"nl",5:"sv",6:"es",7:"da",8:"pt",9:"no",10:"he",11:"ja",12:"ar",13:"fi",14:"el",15:"is",16:"mt",17:"tr",18:"hr",19:"zh-Hant",20:"ur",21:"hi",22:"th",23:"ko",24:"lt",25:"pl",26:"hu",27:"es",28:"lv",29:"se",30:"fo",31:"fa",32:"ru",33:"zh",34:"nl-BE",35:"ga",36:"sq",37:"ro",38:"cz",39:"sk",40:"si",41:"yi",42:"sr",43:"mk",44:"bg",45:"uk",46:"be",47:"uz",48:"kk",49:"az-Cyrl",50:"az-Arab",51:"hy",52:"ka",53:"mo",54:"ky",55:"tg",56:"tk",57:"mn-CN",58:"mn",59:"ps",60:"ks",61:"ku",62:"sd",63:"bo",64:"ne",65:"sa",66:"mr",67:"bn",68:"as",69:"gu",70:"pa",71:"or",72:"ml",73:"kn",74:"ta",75:"te",76:"si",77:"my",78:"km",79:"lo",80:"vi",81:"id",82:"tl",83:"ms",84:"ms-Arab",85:"am",86:"ti",87:"om",88:"so",89:"sw",90:"rw",91:"rn",92:"ny",93:"mg",94:"eo",128:"cy",129:"eu",130:"ca",131:"la",132:"qu",133:"gn",134:"ay",135:"tt",136:"ug",137:"dz",138:"jv",139:"su",140:"gl",141:"af",142:"br",143:"iu",144:"gd",145:"gv",146:"ga",147:"to",148:"el-polyton",149:"kl",150:"az",151:"nn"},ql={1078:"af",1052:"sq",1156:"gsw",1118:"am",5121:"ar-DZ",15361:"ar-BH",3073:"ar",2049:"ar-IQ",11265:"ar-JO",13313:"ar-KW",12289:"ar-LB",4097:"ar-LY",6145:"ary",8193:"ar-OM",16385:"ar-QA",1025:"ar-SA",10241:"ar-SY",7169:"aeb",14337:"ar-AE",9217:"ar-YE",1067:"hy",1101:"as",2092:"az-Cyrl",1068:"az",1133:"ba",1069:"eu",1059:"be",2117:"bn",1093:"bn-IN",8218:"bs-Cyrl",5146:"bs",1150:"br",1026:"bg",1027:"ca",3076:"zh-HK",5124:"zh-MO",2052:"zh",4100:"zh-SG",1028:"zh-TW",1155:"co",1050:"hr",4122:"hr-BA",1029:"cs",1030:"da",1164:"prs",1125:"dv",2067:"nl-BE",1043:"nl",3081:"en-AU",10249:"en-BZ",4105:"en-CA",9225:"en-029",16393:"en-IN",6153:"en-IE",8201:"en-JM",17417:"en-MY",5129:"en-NZ",13321:"en-PH",18441:"en-SG",7177:"en-ZA",11273:"en-TT",2057:"en-GB",1033:"en",12297:"en-ZW",1061:"et",1080:"fo",1124:"fil",1035:"fi",2060:"fr-BE",3084:"fr-CA",1036:"fr",5132:"fr-LU",6156:"fr-MC",4108:"fr-CH",1122:"fy",1110:"gl",1079:"ka",3079:"de-AT",1031:"de",5127:"de-LI",4103:"de-LU",2055:"de-CH",1032:"el",1135:"kl",1095:"gu",1128:"ha",1037:"he",1081:"hi",1038:"hu",1039:"is",1136:"ig",1057:"id",1117:"iu",2141:"iu-Latn",2108:"ga",1076:"xh",1077:"zu",1040:"it",2064:"it-CH",1041:"ja",1099:"kn",1087:"kk",1107:"km",1158:"quc",1159:"rw",1089:"sw",1111:"kok",1042:"ko",1088:"ky",1108:"lo",1062:"lv",1063:"lt",2094:"dsb",1134:"lb",1071:"mk",2110:"ms-BN",1086:"ms",1100:"ml",1082:"mt",1153:"mi",1146:"arn",1102:"mr",1148:"moh",1104:"mn",2128:"mn-CN",1121:"ne",1044:"nb",2068:"nn",1154:"oc",1096:"or",1123:"ps",1045:"pl",1046:"pt",2070:"pt-PT",1094:"pa",1131:"qu-BO",2155:"qu-EC",3179:"qu",1048:"ro",1047:"rm",1049:"ru",9275:"smn",4155:"smj-NO",5179:"smj",3131:"se-FI",1083:"se",2107:"se-SE",8251:"sms",6203:"sma-NO",7227:"sms",1103:"sa",7194:"sr-Cyrl-BA",3098:"sr",6170:"sr-Latn-BA",2074:"sr-Latn",1132:"nso",1074:"tn",1115:"si",1051:"sk",1060:"sl",11274:"es-AR",16394:"es-BO",13322:"es-CL",9226:"es-CO",5130:"es-CR",7178:"es-DO",12298:"es-EC",17418:"es-SV",4106:"es-GT",18442:"es-HN",2058:"es-MX",19466:"es-NI",6154:"es-PA",15370:"es-PY",10250:"es-PE",20490:"es-PR",3082:"es",1034:"es",21514:"es-US",14346:"es-UY",8202:"es-VE",2077:"sv-FI",1053:"sv",1114:"syr",1064:"tg",2143:"tzm",1097:"ta",1092:"tt",1098:"te",1054:"th",1105:"bo",1055:"tr",1090:"tk",1152:"ug",1058:"uk",1070:"hsb",1056:"ur",2115:"uz-Cyrl",1091:"uz",1066:"vi",1106:"cy",1160:"wo",1157:"sah",1144:"ii",1130:"yo"};function Wl(s,o,c){switch(s){case 0:if(o===65535)return"und";if(c)return c[o];break;case 1:return zl[o];case 3:return ql[o]}}var Wt="utf-16",Vl={0:"macintosh",1:"x-mac-japanese",2:"x-mac-chinesetrad",3:"x-mac-korean",6:"x-mac-greek",7:"x-mac-cyrillic",9:"x-mac-devanagai",10:"x-mac-gurmukhi",11:"x-mac-gujarati",12:"x-mac-oriya",13:"x-mac-bengali",14:"x-mac-tamil",15:"x-mac-telugu",16:"x-mac-kannada",17:"x-mac-malayalam",18:"x-mac-sinhalese",19:"x-mac-burmese",20:"x-mac-khmer",21:"x-mac-thai",22:"x-mac-lao",23:"x-mac-georgian",24:"x-mac-armenian",25:"x-mac-chinesesimp",26:"x-mac-tibetan",27:"x-mac-mongolian",28:"x-mac-ethiopic",29:"x-mac-ce",30:"x-mac-vietnamese",31:"x-mac-extarabic"},Xl={15:"x-mac-icelandic",17:"x-mac-turkish",18:"x-mac-croatian",24:"x-mac-ce",25:"x-mac-ce",26:"x-mac-ce",27:"x-mac-ce",28:"x-mac-ce",30:"x-mac-icelandic",37:"x-mac-romanian",38:"x-mac-ce",39:"x-mac-ce",40:"x-mac-ce",143:"x-mac-inuit",146:"x-mac-gaelic"};function Yl(s,o,c){switch(s){case 0:return Wt;case 1:return Xl[c]||Vl[o];case 3:if(o===1||o===10)return Wt;break}}function jl(s,o){let c={},h=s.readUInt16BE(2),p=s.readUInt16BE(4),m=6;for(let b=0;b<h;b++){let F=s.readUInt16BE(m+0),U=s.readUInt16BE(m+2),I=s.readUInt16BE(m+4),z=s.readUInt16BE(m+6),B=Hl[z]||String(z),W=s.readUInt16BE(m+8),X=s.readUInt16BE(m+10),Z=Wl(F,I,o),xe=Yl(F,U,I);if(m+=12,xe!==void 0&&Z!==void 0){let Ne;if(xe===Wt){let Ee=W/2,yr=Array(Ee);for(let ue=0;ue<Ee;ue++)yr[ue]=s.readUInt16BE(p+X+ue*2);Ne=String.fromCharCode(...yr)}else Ne=Ql(s,p+X,W,xe);if(Ne){let Ee=c[B];Ee===void 0&&(Ee=c[B]={}),Ee[Z]=Ne}}}return c}Vt.default=jl;var Zl={"x-mac-croatian":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\u0160\u2122\xB4\xA8\u2260\u017D\xD8\u221E\xB1\u2264\u2265\u2206\xB5\u2202\u2211\u220F\u0161\u222B\xAA\xBA\u03A9\u017E\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u0106\xAB\u010C\u2026 \xC0\xC3\xD5\u0152\u0153\u0110\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\uF8FF\xA9\u2044\u20AC\u2039\u203A\xC6\xBB\u2013\xB7\u201A\u201E\u2030\xC2\u0107\xC1\u010D\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u0111\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u03C0\xCB\u02DA\xB8\xCA\xE6\u02C7","x-mac-cyrillic":"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u2020\xB0\u0490\xA3\xA7\u2022\xB6\u0406\xAE\xA9\u2122\u0402\u0452\u2260\u0403\u0453\u221E\xB1\u2264\u2265\u0456\xB5\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040A\u045A\u0458\u0405\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026 \u040B\u045B\u040C\u045C\u0455\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u201E\u040E\u045E\u040F\u045F\u2116\u0401\u0451\u044F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E","x-mac-gaelic":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u1E02\xB1\u2264\u2265\u1E03\u010A\u010B\u1E0A\u1E0B\u1E1E\u1E1F\u0120\u0121\u1E40\xE6\xF8\u1E41\u1E56\u1E57\u027C\u0192\u017F\u1E60\xAB\xBB\u2026 \xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\u1E61\u1E9B\xFF\u0178\u1E6A\u20AC\u2039\u203A\u0176\u0177\u1E6B\xB7\u1EF2\u1EF3\u204A\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u2663\xD2\xDA\xDB\xD9\u0131\xDD\xFD\u0174\u0175\u1E84\u1E85\u1E80\u1E81\u1E82\u1E83","x-mac-greek":"\xC4\xB9\xB2\xC9\xB3\xD6\xDC\u0385\xE0\xE2\xE4\u0384\xA8\xE7\xE9\xE8\xEA\xEB\xA3\u2122\xEE\xEF\u2022\xBD\u2030\xF4\xF6\xA6\u20AC\xF9\xFB\xFC\u2020\u0393\u0394\u0398\u039B\u039E\u03A0\xDF\xAE\xA9\u03A3\u03AA\xA7\u2260\xB0\xB7\u0391\xB1\u2264\u2265\xA5\u0392\u0395\u0396\u0397\u0399\u039A\u039C\u03A6\u03AB\u03A8\u03A9\u03AC\u039D\xAC\u039F\u03A1\u2248\u03A4\xAB\xBB\u2026 \u03A5\u03A7\u0386\u0388\u0153\u2013\u2015\u201C\u201D\u2018\u2019\xF7\u0389\u038A\u038C\u038E\u03AD\u03AE\u03AF\u03CC\u038F\u03CD\u03B1\u03B2\u03C8\u03B4\u03B5\u03C6\u03B3\u03B7\u03B9\u03BE\u03BA\u03BB\u03BC\u03BD\u03BF\u03C0\u03CE\u03C1\u03C3\u03C4\u03B8\u03C9\u03C2\u03C7\u03C5\u03B6\u03CA\u03CB\u0390\u03B0\xAD","x-mac-icelandic":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\xDD\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026 \xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\xD0\xF0\xDE\xFE\xFD\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-inuit":"\u1403\u1404\u1405\u1406\u140A\u140B\u1431\u1432\u1433\u1434\u1438\u1439\u1449\u144E\u144F\u1450\u1451\u1455\u1456\u1466\u146D\u146E\u146F\u1470\u1472\u1473\u1483\u148B\u148C\u148D\u148E\u1490\u1491\xB0\u14A1\u14A5\u14A6\u2022\xB6\u14A7\xAE\xA9\u2122\u14A8\u14AA\u14AB\u14BB\u14C2\u14C3\u14C4\u14C5\u14C7\u14C8\u14D0\u14EF\u14F0\u14F1\u14F2\u14F4\u14F5\u1505\u14D5\u14D6\u14D7\u14D8\u14DA\u14DB\u14EA\u1528\u1529\u152A\u152B\u152D\u2026 \u152E\u153E\u1555\u1556\u1557\u2013\u2014\u201C\u201D\u2018\u2019\u1558\u1559\u155A\u155D\u1546\u1547\u1548\u1549\u154B\u154C\u1550\u157F\u1580\u1581\u1582\u1583\u1584\u1585\u158F\u1590\u1591\u1592\u1593\u1594\u1595\u1671\u1672\u1673\u1674\u1675\u1676\u1596\u15A0\u15A1\u15A2\u15A3\u15A4\u15A5\u15A6\u157C\u0141\u0142","x-mac-ce":"\xC4\u0100\u0101\xC9\u0104\xD6\xDC\xE1\u0105\u010C\xE4\u010D\u0106\u0107\xE9\u0179\u017A\u010E\xED\u010F\u0112\u0113\u0116\xF3\u0117\xF4\xF6\xF5\xFA\u011A\u011B\xFC\u2020\xB0\u0118\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\u0119\xA8\u2260\u0123\u012E\u012F\u012A\u2264\u2265\u012B\u0136\u2202\u2211\u0142\u013B\u013C\u013D\u013E\u0139\u013A\u0145\u0146\u0143\xAC\u221A\u0144\u0147\u2206\xAB\xBB\u2026 \u0148\u0150\xD5\u0151\u014C\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\u014D\u0154\u0155\u0158\u2039\u203A\u0159\u0156\u0157\u0160\u201A\u201E\u0161\u015A\u015B\xC1\u0164\u0165\xCD\u017D\u017E\u016A\xD3\xD4\u016B\u016E\xDA\u016F\u0170\u0171\u0172\u0173\xDD\xFD\u0137\u017B\u0141\u017C\u0122\u02C7",macintosh:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026 \xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-romanian":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\u0102\u0218\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\u0103\u0219\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026 \xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\u2039\u203A\u021A\u021B\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-turkish":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026 \xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u011E\u011F\u0130\u0131\u015E\u015F\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\uF8A0\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"};function Ql(s,o,c,h){let p=Zl[h];if(p===void 0)return;let m="";for(let b=0;b<c;b++){let F=s.readUInt8(o+b);F<=127?m+=String.fromCharCode(F):m+=p[F&127]}return m}});var ss=q(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});function Jl(s){if(s.readUInt32BE(0)!==1)throw new Error("Unsupported ltag table version.");let c=s.readUInt32BE(8),h=[];for(let p=0;p<c;p++){let m="",b=s.readUInt16BE(12+p*4),F=s.readUInt16BE(14+p*4);for(let U=b;U<b+F;++U)m+=String.fromCharCode(s.readInt8(U));h.push(m)}return h}Xt.default=Jl});var is=q(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});function Kl(s){if(s.length<78)return;let o={version:s.readUInt16BE(0),xAvgCharWidth:s.readUInt16BE(2),usWeightClass:s.readUInt16BE(4),usWidthClass:s.readUInt16BE(6),fsType:s.readUInt16BE(8),ySubscriptXSize:s.readInt16BE(10),ySubscriptYSize:s.readInt16BE(12),ySubscriptXOffset:s.readInt16BE(14),ySubscriptYOffset:s.readInt16BE(16),ySuperscriptXSize:s.readInt16BE(18),ySuperscriptYSize:s.readInt16BE(20),ySuperscriptXOffset:s.readInt16BE(22),ySuperscriptYOffset:s.readInt16BE(24),yStrikeoutSize:s.readInt16BE(26),yStrikeoutPosition:s.readInt16BE(28),sFamilyClass:s.readInt16BE(30),panose:[s.readUInt8(32),s.readUInt8(33),s.readUInt8(34),s.readUInt8(35),s.readUInt8(36),s.readUInt8(37),s.readUInt8(38),s.readUInt8(39),s.readUInt8(40),s.readUInt8(41)],ulUnicodeRange1:s.readUInt32BE(42),ulUnicodeRange2:s.readUInt32BE(46),ulUnicodeRange3:s.readUInt32BE(50),ulUnicodeRange4:s.readUInt32BE(54),achVendID:String.fromCharCode(s.readUInt8(58),s.readUInt8(59),s.readUInt8(60),s.readUInt8(61)),fsSelection:s.readUInt16BE(62),usFirstCharIndex:s.readUInt16BE(64),usLastCharIndex:s.readUInt16BE(66),sTypoAscender:s.readInt16BE(68),sTypoDescender:s.readInt16BE(70),sTypoLineGap:s.readInt16BE(72),usWinAscent:s.readUInt16BE(74),usWinDescent:s.readUInt16BE(76)};return o.version>=1&&s.length>=86&&(o.ulCodePageRange1=s.readUInt32BE(78),o.ulCodePageRange2=s.readUInt32BE(82)),o.version>=2&&s.length>=96&&(o.sxHeight=s.readInt16BE(86),o.sCapHeight=s.readInt16BE(88),o.usDefaultChar=s.readUInt16BE(90),o.usBreakChar=s.readUInt16BE(92),o.usMaxContent=s.readUInt16BE(94)),o}Yt.default=Kl});var jt=q(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});function $l(s,o){return s+o/2**16}Xr.formatFixed=$l;function ef(s,o){return(s*2**32+o-2082844800)*1e3}Xr.formatLongDateTime=ef});var os=q(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});var Yr=jt();function rf(s){return{version:Yr.formatFixed(s.readUInt16BE(0),s.readUInt16BE(2)),fontRevision:Yr.formatFixed(s.readUInt16BE(4),s.readUInt16BE(6)),checkSumAdjustment:s.readUInt32BE(8),magicNumber:s.readUInt32BE(12),flags:s.readUInt16BE(16),unitsPerEm:s.readUInt16BE(18),created:Yr.formatLongDateTime(s.readUInt32BE(20),s.readUInt32BE(24)),modified:Yr.formatLongDateTime(s.readUInt32BE(28),s.readUInt32BE(32)),xMin:s.readInt16BE(36),yMin:s.readInt16BE(38),xMax:s.readInt16BE(40),yMax:s.readInt16BE(42),macStyle:s.readUInt16BE(44),lowestRecPPEM:s.readUInt16BE(46),fontDirectionHint:s.readInt16BE(48),indexToLocFormat:s.readInt16BE(50),glyphDataFormat:s.readInt16BE(52)}}Zt.default=rf});var ls=q(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});var us=jt();function tf(s){return{version:us.formatFixed(s.readUInt16BE(0),s.readUInt16BE(2)),italicAngle:us.formatFixed(s.readUInt16BE(4),s.readUInt16BE(6)),underlinePosition:s.readInt16BE(8),underlineThickness:s.readInt16BE(10),isFixedPitch:s.readUInt32BE(12),minMemType42:s.readUInt32BE(16),maxMemType42:s.readUInt32BE(20),minMemType1:s.readUInt32BE(24),maxMemType1:s.readUInt32BE(28)}}Qt.default=tf});var fs=q(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});var nf=me("fs"),af=ns(),sf=as(),of=ss(),uf=is(),lf=os(),ff=ls(),Ge;(function(s){s[s.TrueType=0]="TrueType",s[s.CFF=1]="CFF",s[s.Woff=2]="Woff"})(Ge||(Ge={}));var sr={name:{tag:Buffer.from("name"),parse:sf.default},ltag:{tag:Buffer.from("ltag"),parse:of.default},os2:{tag:Buffer.from("OS/2"),parse:uf.default},head:{tag:Buffer.from("head"),parse:lf.default},post:{tag:Buffer.from("post"),parse:ff.default}};async function cf(s){return new Promise((o,c)=>{(async()=>{let h=af.default(),p=nf.createReadStream(s),m=!1,b=()=>{m=!0};p.once("close",b),p.once("end",b),p.once("error",F=>{m=!0,c(F)}),p.pipe(h);try{switch(hf(await h.read(4))){case Ge.TrueType:case Ge.CFF:let U=(await h.read(2)).readUInt16BE(0);await h.skip(6);let I=await pf(h,U),z=Object.entries(I).sort((X,Z)=>X[1].offset-Z[1].offset),B={};for(let[X,Z]of z)await h.skip(Z.offset-h.offset),B[X]=await h.read(Z.length);let W=[];if(B.ltag&&(W=sr.ltag.parse(B.ltag)),!B.name)throw new Error(`missing required OpenType table 'name' in font file: ${s}`);return{names:sr.name.parse(B.name,W),os2:B.os2&&sr.os2.parse(B.os2),head:B.head&&sr.head.parse(B.head),post:B.post&&sr.post.parse(B.post)};case Ge.Woff:default:throw new Error("provided font type is not supported yet")}}finally{p.unpipe(h),m||(p.destroy(),h.destroy())}})().then(o,c)})}Jt.default=cf;var gr={one:Buffer.from([0,1,0,0]),otto:Buffer.from("OTTO"),true:Buffer.from("true"),typ1:Buffer.from("typ1"),woff:Buffer.from("wOFF")};function hf(s){if(s.equals(gr.one)||s.equals(gr.true)||s.equals(gr.typ1))return Ge.TrueType;if(s.equals(gr.otto))return Ge.CFF;if(s.equals(gr.woff))return Ge.Woff;throw new Error(`Unsupported signature type: ${s}`)}async function pf(s,o){let c={};for(let h=0;h<o;h++){let p=await s.read(4),m=await s.read(12);for(let[b,F]of Object.entries(sr))if(p.equals(F.tag)&&(c[b]={offset:m.readUInt32BE(4),length:m.readUInt32BE(8)},c.name&&c.ltag&&c.os2))return c}return c}});var Kt=q(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});var df=me("os"),je;(function(s){s.Serif="serif",s.SansSerif="sansSerif",s.Monospace="monospace",s.Cursive="cursive",s.Unknown="unknown"})(je=Oe.Type||(Oe.Type={}));var ye;(function(s){s.Regular="regular",s.Italic="italic",s.Oblique="oblique",s.Bold="bold",s.BoldItalic="boldItalic",s.BoldOblique="boldOblique",s.Other="other"})(ye=Oe.Style||(Oe.Style={}));var vf=[" Regular"," Bold"," Bold Italic"," Bold Oblique"," Italic"," Oblique"];function gf(s,o){let c=s.names.preferredFamily&&s.names.preferredFamily[o]?s.names.preferredFamily[o]:s.names.fontFamily[o];if(df.platform()==="win32"){let h=s.names.preferredSubfamily&&s.names.preferredSubfamily[o]?s.names.preferredSubfamily[o]:s.names.fontSubfamily[o],p=`${c} ${h}`,m=-1;for(let b of vf){let F=p.lastIndexOf(b);if(F!==-1){m=F;break}}return m!==-1?p.substring(0,m):p}return c}Oe.name=gf;function mf(s){if(s.os2)switch(s.os2.panose[0]){case 2:return s.os2.panose[3]===9?je.Monospace:s.os2.panose[1]>=11&&s.os2.panose[1]<=15||s.os2.panose[1]===0?je.SansSerif:je.Serif;case 3:return je.Cursive}else if(s.post&&s.post.isFixedPitch)return je.Monospace;return je.Unknown}Oe.type=mf;function cs(s){if(!s.os2&&!s.head)return ye.Other;let o=s.os2?s.os2.fsSelection&32:s.head.macStyle&1,c=s.os2?s.os2.fsSelection&1:s.post?s.post.italicAngle<0:s.head.macStyle&2,h=s.os2?s.os2.fsSelection&512:s.post?s.post.italicAngle>0:0,p=s.os2?s.os2.fsSelection&320:1;return o?h?ye.BoldOblique:c?ye.BoldItalic:ye.Bold:h?ye.Oblique:c?ye.Italic:p?ye.Regular:ye.Other}Oe.style=cs;var yf=[ye.Bold,ye.BoldItalic,ye.BoldOblique];function xf(s){return s.os2?s.os2.usWeightClass:yf.includes(cs(s))?700:400}Oe.weight=xf});var gs=q(Be=>{"use strict";var bf=Be&&Be.__rest||function(s,o){var c={};for(var h in s)Object.prototype.hasOwnProperty.call(s,h)&&o.indexOf(h)<0&&(c[h]=s[h]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var p=0,h=Object.getOwnPropertySymbols(s);p<h.length;p++)o.indexOf(h[p])<0&&(c[h[p]]=s[h[p]]);return c};Object.defineProperty(Be,"__esModule",{value:!0});var Sf=rs(),hs=fs(),jr=Kt(),ps=Kt();Be.Type=ps.Type;Be.Style=ps.Style;async function ds(s){let o=Object.assign({concurrency:4,language:"en",onFontError:null},s),c=await Sf.default({extensions:["ttf","otf"]}),h=await Uf(async m=>{try{let b=await hs.default(m);return vs(m,b,o.language)}catch(b){o.onFontError&&o.onFontError(m,b)}},c,o.concurrency),p={};for(let m of h.filter(b=>b)){let{name:b}=m,F=bf(m,["name"]);p[b]||(p[b]=[]),p[b].push(F)}return p}Be.list=ds;async function Ff(s,o){return(await ds(o))[s]||[]}Be.listVariants=Ff;async function Tf(s,o){let c=Object.assign({language:"en"},o),h=await hs.default(s);return vs(s,h,c.language)}Be.get=Tf;function vs(s,o,c){return{name:jr.name(o,c),path:s,type:jr.type(o),weight:jr.weight(o),style:jr.style(o)}}async function Uf(s,o,c){let h=[],p=0,m=async F=>{h.push(await s(o[F])),p<o.length&&await m(p++)},b=[];for(;p<o.length&&p<c;p++)b.push(m(p));return await Promise.all(b),h}});var Ss=q(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});var xs=Ua(),Ef=Ba(),kf=Et(),ms=Pa(),ys=Ma(),Of=Ha(),wf=qa(),Cf=Wa(),Lf=Xa(),If=ja(),Zr=class{constructor(o,c){this._lookupTrees=[],this._glyphLookups={},this._font=o,c.cacheSize>0&&(this._cache=new Ef({max:c.cacheSize,length:((F,U)=>U.length)}));let p=(this._font.tables.gsub&&this._font.tables.gsub.features.filter(F=>F.tag==="calt")||[]).reduce((F,U)=>[...F,...U.feature.lookupListIndexes],[]),m=this._font.tables.gsub&&this._font.tables.gsub.lookups||[],b=m.filter((F,U)=>p.some(I=>I===U));for(let[F,U]of b.entries()){let I=[];switch(U.lookupType){case 6:for(let[B,W]of U.subtables.entries())switch(W.substFormat){case 1:I.push(Of.default(W,m,B));break;case 2:I.push(wf.default(W,m,B));break;case 3:I.push(Cf.default(W,m,B));break}break;case 8:for(let[B,W]of U.subtables.entries())I.push(Lf.default(W,B));break}let z=If.default(kf.default(I));this._lookupTrees.push({tree:z,processForward:U.lookupType!==8});for(let B of Object.keys(z))this._glyphLookups[B]||(this._glyphLookups[B]=[]),this._glyphLookups[B].push(F)}}findLigatures(o){let c=this._cache&&this._cache.get(o);if(c&&!Array.isArray(c))return c;let h=[];for(let b of o)h.push(this._font.charToGlyphIndex(b));if(this._lookupTrees.length===0)return{inputGlyphs:h,outputGlyphs:h,contextRanges:[]};let p=this._findInternal(h.slice()),m={inputGlyphs:h,outputGlyphs:p.sequence,contextRanges:p.ranges};return this._cache&&this._cache.set(o,m),m}findLigatureRanges(o){if(this._lookupTrees.length===0)return[];let c=this._cache&&this._cache.get(o);if(c)return Array.isArray(c)?c:c.contextRanges;let h=[];for(let m of o)h.push(this._font.charToGlyphIndex(m));let p=this._findInternal(h);return this._cache&&this._cache.set(o,p.ranges),p.ranges}_findInternal(o){let c=[],h=this._getNextLookup(o,0);for(;h.index!==null;){let p=this._lookupTrees[h.index];if(p.processForward){let m=h.last;for(let b=h.first;b<m;b++){let F=ms.default(p.tree,o,b,b);if(F){for(let U=0;U<F.substitutions.length;U++){let I=F.substitutions[U];I!==null&&(o[b+U]=I)}ys.default(c,F.contextRange[0]+b,F.contextRange[1]+b),b+F.length>=m&&(m=b+F.length+1),b+=F.length-1}}}else for(let m=h.last-1;m>=h.first;m--){let b=ms.default(p.tree,o,m,m);if(b){for(let F=0;F<b.substitutions.length;F++){let U=b.substitutions[F];U!==null&&(o[m+F]=U)}ys.default(c,b.contextRange[0]+m,b.contextRange[1]+m),m-=b.length-1}}h=this._getNextLookup(o,h.index+1)}return{sequence:o,ranges:c}}_getNextLookup(o,c){let h={index:null,first:1/0,last:-1};for(let p=0;p<o.length;p++){let m=this._glyphLookups[o[p]];if(m)for(let b=0;b<m.length;b++){let F=m[b];if(F>=c){(h.index===null||F<=h.index)&&(h.index=F,h.first>p&&(h.first=p),h.last=p+1);break}}}return h}};async function Af(s,o){let[c]=await Promise.resolve().then(()=>gs()).then(h=>h.listVariants(s));if(!c)throw new Error(`Font ${s} not found`);return bs(c.path,o)}mr.load=Af;async function bs(s,o){let c=await Promise.resolve().then(()=>me("util")).then(h=>h.promisify(xs.load)(s));return new Zr(c,Object.assign({cacheSize:0},o))}mr.loadFile=bs;function Bf(s,o){let c=xs.parse(s);return new Zr(c,Object.assign({cacheSize:0},o))}mr.loadBuffer=Bf});var Ts=ol(Ss());function en(s){if(typeof s!="string")throw new Error("Font family must be a string");let o={input:s,offset:0},c=[],h="";for(;o.offset<o.input.length;){let p=o.input[o.offset++];switch(p){case"'":case'"':h+=Rf(o,p);break;case",":c.push(h),h="";break;default:/\s/.test(p)||(o.offset--,h+=Df(o),c.push(h),h="")}}return c}function Rf(s,o){let c="",h=!1;for(;s.offset<s.input.length;){let p=s.input[s.offset++];if(h)/[\dA-Fa-f]/.test(p)?(s.offset--,c+=Fs(s)):p!==`
18
- `&&(c+=p),h=!1;else switch(p){case o:return c;case"\\":h=!0;break;default:c+=p}}throw new Error("Unterminated string")}function Df(s){let o="",c=!1;for(;s.offset<s.input.length;){let h=s.input[s.offset++];if(c)/[\dA-Fa-f]/.test(h)?(s.offset--,o+=Fs(s)):o+=h,c=!1;else switch(h){case"\\":c=!0;break;case",":return o;default:/\s/.test(h)?o.endsWith(" ")||(o+=" "):o+=h}}return o}function Fs(s){let o="";for(;s.offset<s.input.length;){let c=s.input[s.offset++];if(/\s/.test(c))return $t(o);if(o.length>=6||!/[\dA-Fa-f]/.test(c))return s.offset--,$t(o);o+=c}return $t(o)}function $t(s){return String.fromCodePoint(parseInt(s,16))}var ir;async function rn(s,o){if(!ir){if(typeof navigator<"u"&&"fonts"in navigator){try{let p=await navigator.permissions.request?.({name:"local-fonts"});if(p&&p.state!=="granted")throw new Error("Permission to access local fonts not granted.")}catch(p){if(p.name!=="TypeError")throw p}let h={};try{let p=await navigator.fonts.query();for(let m of p)h.hasOwnProperty(m.family)||(h[m.family]=[]),h[m.family].push(m);ir=Promise.resolve(h)}catch(p){console.error(p.name,p.message)}}else if(typeof window<"u"&&"queryLocalFonts"in window){let h={};try{let p=await window.queryLocalFonts();for(let m of p)h.hasOwnProperty(m.family)||(h[m.family]=[]),h[m.family].push(m);ir=Promise.resolve(h)}catch(p){console.error(p.name,p.message)}}ir||(ir=Promise.resolve({}))}let c=await ir;for(let h of en(s)){if(Pf.includes(h))return;if(c.hasOwnProperty(h)&&c[h].length>0){let p=c[h][0];if("blob"in p){let b=await(await p.blob()).arrayBuffer();return(0,Ts.loadBuffer)(b,{cacheSize:o})}return}}}var Pf=["serif","sans-serif","cursive","fantasy","monospace","system-ui","emoji","math","fangsong"];var Mf=1e5;function Us(s,o=[]){let c,h,p=0,m;return s.registerCharacterJoiner(b=>{let F=s.options.fontFamily;if(F&&(p===0||c!==F)){h=void 0,p=1,c=F;let U=c;rn(U,Mf).then(I=>{U===s.options.fontFamily&&(p=2,h=I,I&&s.refresh(0,s.rows-1))}).catch(I=>{U===s.options.fontFamily&&(p=3,s.options.logLevel==="debug"&&console.debug(m,new Error("Failure while loading font")),h=void 0,m=I)})}return h&&p===2?h.findLigatureRanges(b).map(U=>[U[0],U[1]]):Gf(b,o)})}function Gf(s,o){let c=[];for(let h=0;h<s.length;h++)for(let p=0;p<o.length;p++)if(s.startsWith(o[p],h)){c.push([h,h+o[p].length]),h+=o[p].length-1;break}return c}var Es=class{constructor(o){this._fallbackLigatures=(o?.fallbackLigatures||["<--","<---","<<-","<-","->","->>","-->","--->","<==","<===","<<=","<=","=>","=>>","==>","===>",">=",">>=","<->","<-->","<--->","<---->","<=>","<==>","<===>","<====>","::",":::","<~~","</","</>","/>","~~>","==","!=","/=","~=","<>","===","!==","!===","<:",":=","*=","*+","<*","<*>","*>","<|","<|>","|>","+*","=*","=:",":>","/*","*/","+++","<!--","<!---"]).sort((c,h)=>h.length-c.length),this._fontFeatureSettings=o?.fontFeatureSettings}activate(o){if(!o.element)throw new Error("Cannot activate LigaturesAddon before open is called");this._terminal=o,this._characterJoinerId=Us(o,this._fallbackLigatures),o.element.style.fontFeatureSettings=this._fontFeatureSettings??'"calt" on'}dispose(){this._characterJoinerId!==void 0&&(this._terminal?.deregisterCharacterJoiner(this._characterJoinerId),this._characterJoinerId=void 0),this._terminal?.element&&(this._terminal.element.style.fontFeatureSettings="")}};export{Es as LigaturesAddon};
17
+ var Bp=Object.create;var ir=Object.defineProperty;var _p=Object.getOwnPropertyDescriptor;var Gp=Object.getOwnPropertyNames;var Hp=Object.getPrototypeOf,Vp=Object.prototype.hasOwnProperty;var ki=g=>{throw TypeError(g)};var zp=(g,f,p)=>f in g?ir(g,f,{enumerable:!0,configurable:!0,writable:!0,value:p}):g[f]=p;var jp=(g,f)=>()=>(f||g((f={exports:{}}).exports,f),f.exports);var Wp=(g,f,p,h)=>{if(f&&typeof f=="object"||typeof f=="function")for(let y of Gp(f))!Vp.call(g,y)&&y!==p&&ir(g,y,{get:()=>f[y],enumerable:!(h=_p(f,y))||h.enumerable});return g};var qp=(g,f,p)=>(p=g!=null?Bp(Hp(g)):{},Wp(f||!g||!g.__esModule?ir(p,"default",{value:g,enumerable:!0}):p,g));var ye=(g,f,p)=>zp(g,typeof f!="symbol"?f+"":f,p),ar=(g,f,p)=>f.has(g)||ki("Cannot "+p);var b=(g,f,p)=>(ar(g,f,"read from private field"),p?p.call(g):f.get(g)),K=(g,f,p)=>f.has(g)?ki("Cannot add the same private member more than once"):f instanceof WeakSet?f.add(g):f.set(g,p),V=(g,f,p,h)=>(ar(g,f,"write to private field"),h?h.call(g,p):f.set(g,p),p),R=(g,f,p)=>(ar(g,f,"access private method"),p);var vs=(g,f,p,h)=>({set _(y){V(g,f,y,p)},get _(){return b(g,f,h)}});var Oi=jp((Ci,xs)=>{var Ti=(()=>{var g=Object.defineProperty,f=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,h=Object.prototype.hasOwnProperty,y=(e,t)=>{for(var n in t)g(e,n,{get:t[n],enumerable:!0})},k=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of p(t))!h.call(e,r)&&r!==n&&g(e,r,{get:()=>t[r],enumerable:!(s=f(t,r))||s.enumerable});return e},T=e=>k(g({},"__esModule",{value:!0}),e),O={};y(O,{BoundingBox:()=>ws,Font:()=>yi,Glyph:()=>fn,Path:()=>Wt,_parse:()=>F,load:()=>Mp,loadSync:()=>Pp,parse:()=>Up});var w=0,E=-3;function j(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function H(e,t){this.source=e,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=t,this.destLen=0,this.ltree=new j,this.dtree=new j}var Q=new j,X=new j,fe=new Uint8Array(30),J=new Uint16Array(30),Se=new Uint8Array(30),$=new Uint16Array(30),ee=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ne=new j,se=new Uint8Array(320);function pe(e,t,n,s){var r,o;for(r=0;r<n;++r)e[r]=0;for(r=0;r<30-n;++r)e[r+n]=r/n|0;for(o=s,r=0;r<30;++r)t[r]=o,o+=1<<e[r]}function Vt(e,t){var n;for(n=0;n<7;++n)e.table[n]=0;for(e.table[7]=24,e.table[8]=152,e.table[9]=112,n=0;n<24;++n)e.trans[n]=256+n;for(n=0;n<144;++n)e.trans[24+n]=n;for(n=0;n<8;++n)e.trans[168+n]=280+n;for(n=0;n<112;++n)e.trans[176+n]=144+n;for(n=0;n<5;++n)t.table[n]=0;for(t.table[5]=32,n=0;n<32;++n)t.trans[n]=n}var St=new Uint16Array(16);function It(e,t,n,s){var r,o;for(r=0;r<16;++r)e.table[r]=0;for(r=0;r<s;++r)e.table[t[n+r]]++;for(e.table[0]=0,o=0,r=0;r<16;++r)St[r]=o,o+=e.table[r];for(r=0;r<s;++r)t[n+r]&&(e.trans[St[t[n+r]]++]=r)}function wt(e){e.bitcount--||(e.tag=e.source[e.sourceIndex++],e.bitcount=7);var t=e.tag&1;return e.tag>>>=1,t}function Be(e,t,n){if(!t)return n;for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var s=e.tag&65535>>>16-t;return e.tag>>>=t,e.bitcount-=t,s+n}function zt(e,t){for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var n=0,s=0,r=0,o=e.tag;do s=2*s+(o&1),o>>>=1,++r,n+=t.table[r],s-=t.table[r];while(s>=0);return e.tag=o,e.bitcount-=r,t.trans[n+s]}function Wi(e,t,n){var s,r,o,i,a,l;for(s=Be(e,5,257),r=Be(e,5,1),o=Be(e,4,4),i=0;i<19;++i)se[i]=0;for(i=0;i<o;++i){var c=Be(e,3,0);se[ee[i]]=c}for(It(ne,se,0,19),a=0;a<s+r;){var u=zt(e,ne);switch(u){case 16:var m=se[a-1];for(l=Be(e,2,3);l;--l)se[a++]=m;break;case 17:for(l=Be(e,3,3);l;--l)se[a++]=0;break;case 18:for(l=Be(e,7,11);l;--l)se[a++]=0;break;default:se[a++]=u;break}}It(t,se,0,s),It(n,se,s,r)}function wr(e,t,n){for(;;){var s=zt(e,t);if(s===256)return w;if(s<256)e.dest[e.destLen++]=s;else{var r,o,i,a;for(s-=257,r=Be(e,fe[s],J[s]),o=zt(e,n),i=e.destLen-Be(e,Se[o],$[o]),a=i;a<i+r;++a)e.dest[e.destLen++]=e.dest[a]}}}function qi(e){for(var t,n,s;e.bitcount>8;)e.sourceIndex--,e.bitcount-=8;if(t=e.source[e.sourceIndex+1],t=256*t+e.source[e.sourceIndex],n=e.source[e.sourceIndex+3],n=256*n+e.source[e.sourceIndex+2],t!==(~n&65535))return E;for(e.sourceIndex+=4,s=t;s;--s)e.dest[e.destLen++]=e.source[e.sourceIndex++];return e.bitcount=0,w}function Er(e,t){var n=new H(e,t),s,r,o;do{switch(s=wt(n),r=Be(n,2,0),r){case 0:o=qi(n);break;case 1:o=wr(n,Q,X);break;case 2:Wi(n,n.ltree,n.dtree),o=wr(n,n.ltree,n.dtree);break;default:o=E}if(o!==w)throw new Error("Data error")}while(!s);return n.destLen<n.dest.length?typeof n.dest.slice=="function"?n.dest.slice(0,n.destLen):n.dest.subarray(0,n.destLen):n.dest}Vt(Q,X),pe(fe,J,4,3),pe(Se,$,2,1),fe[28]=0,J[28]=258;function on(e,t,n,s,r){return Math.pow(1-r,3)*e+3*Math.pow(1-r,2)*r*t+3*(1-r)*Math.pow(r,2)*n+Math.pow(r,3)*s}function jt(){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN}jt.prototype.isEmpty=function(){return isNaN(this.x1)||isNaN(this.y1)||isNaN(this.x2)||isNaN(this.y2)},jt.prototype.addPoint=function(e,t){typeof e=="number"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),e<this.x1&&(this.x1=e),e>this.x2&&(this.x2=e)),typeof t=="number"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=t,this.y2=t),t<this.y1&&(this.y1=t),t>this.y2&&(this.y2=t))},jt.prototype.addX=function(e){this.addPoint(e,null)},jt.prototype.addY=function(e){this.addPoint(null,e)},jt.prototype.addBezier=function(e,t,n,s,r,o,i,a){let l=[e,t],c=[n,s],u=[r,o],m=[i,a];this.addPoint(e,t),this.addPoint(i,a);for(let d=0;d<=1;d++){let x=6*l[d]-12*c[d]+6*u[d],v=-3*l[d]+9*c[d]-9*u[d]+3*m[d],S=3*c[d]-3*l[d];if(v===0){if(x===0)continue;let z=-S/x;0<z&&z<1&&(d===0&&this.addX(on(l[d],c[d],u[d],m[d],z)),d===1&&this.addY(on(l[d],c[d],u[d],m[d],z)));continue}let I=Math.pow(x,2)-4*S*v;if(I<0)continue;let _=(-x+Math.sqrt(I))/(2*v);0<_&&_<1&&(d===0&&this.addX(on(l[d],c[d],u[d],m[d],_)),d===1&&this.addY(on(l[d],c[d],u[d],m[d],_)));let P=(-x-Math.sqrt(I))/(2*v);0<P&&P<1&&(d===0&&this.addX(on(l[d],c[d],u[d],m[d],P)),d===1&&this.addY(on(l[d],c[d],u[d],m[d],P)))}},jt.prototype.addQuad=function(e,t,n,s,r,o){let i=e+.6666666666666666*(n-e),a=t+2/3*(s-t),l=i+1/3*(r-e),c=a+1/3*(o-t);this.addBezier(e,t,i,a,l,c,r,o)};var ws=jt;function ve(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}var In={};function Lr(e,t){let n=Math.floor(e),s=e-n;if(In[t]||(In[t]={}),In[t][s]!==void 0){let o=In[t][s];return n+o}let r=+(Math.round(s+"e+"+t)+"e-"+t);return In[t][s]=r,n+r}function Ar(e){let t=[[]],n=0,s=0;for(let r=0;r<e.length;r+=1){let o=t[t.length-1],i=e[r],a=o[0],l=o[1],c=o[o.length-1],u=e[r+1];o.push(i),i.type==="M"?(n=i.x,s=i.y):i.type==="L"&&(!u||u.type==="Z")?Math.abs(i.x-n)>1||Math.abs(i.y-s)>1||o.pop():i.type==="L"&&c&&c.x===i.x&&c.y===i.y?o.pop():i.type==="Z"&&(a&&l&&c&&a.type==="M"&&l.type==="L"&&c.type==="L"&&c.x===a.x&&c.y===a.y&&(o.shift(),o[0].type="M"),r+1<e.length&&t.push([]))}return e=[].concat.apply([],t),e}function $i(e){return Object.assign({},{decimalPlaces:2,optimize:!0,flipY:!0,flipYBase:void 0,scale:1,x:0,y:0},e)}function Xi(e){return parseInt(e)===e&&(e={decimalPlaces:e,flipY:!1}),Object.assign({},{decimalPlaces:2,optimize:!0,flipY:!0,flipYBase:void 0},e)}ve.prototype.fromSVG=function(e,t={}){typeof SVGPathElement<"u"&&e instanceof SVGPathElement&&(e=e.getAttribute("d")),t=$i(t),this.commands=[];let n="0123456789",s="MmLlQqCcZzHhVv",r="SsTtAa",o="-+",i={},a=[""],l=!1;function c(v){return v.filter(S=>S.length).map(S=>{let I=parseFloat(S);return(t.decimalPlaces||t.decimalPlaces===0)&&(I=Lr(I,t.decimalPlaces)),I})}function u(v){if(!this.commands.length)return v;let S=this.commands[this.commands.length-1];for(let I=0;I<v.length;I++)v[I]+=S[I&1?"y":"x"];return v}function m(){if(i.type===void 0)return;let v=i.type.toUpperCase(),S=v!=="Z"&&i.type.toUpperCase()!==i.type,I=c(a);if(a=[""],!I.length&&v!=="Z")return;S&&v!=="H"&&v!=="V"&&(I=u.apply(this,[I]));let _=this.commands.length&&this.commands[this.commands.length-1].x||0,P=this.commands.length&&this.commands[this.commands.length-1].y||0;switch(v){case"M":this.moveTo(...I);break;case"L":this.lineTo(...I);break;case"V":for(let z=0;z<I.length;z++){let Y=0;S&&(Y=this.commands.length&&this.commands[this.commands.length-1].y||0),this.lineTo(_,I[z]+Y)}break;case"H":for(let z=0;z<I.length;z++){let Y=0;S&&(Y=this.commands.length&&this.commands[this.commands.length-1].x||0),this.lineTo(I[z]+Y,P)}break;case"C":this.bezierCurveTo(...I);break;case"Q":this.quadraticCurveTo(...I);break;case"Z":(this.commands.length<1||this.commands[this.commands.length-1].type!=="Z")&&this.close();break}if(this.commands.length)for(let z in this.commands[this.commands.length-1])this.commands[this.commands.length-1][z]===void 0&&(this.commands[this.commands.length-1][z]=0)}for(let v=0;v<e.length;v++){let S=e.charAt(v),I=a[a.length-1];if(n.indexOf(S)>-1)a[a.length-1]+=S;else if(o.indexOf(S)>-1)if(!i.type&&!this.commands.length&&(i.type="L"),S==="-")!i.type||I.indexOf("-")>0?l=!0:I.length?a.push("-"):a[a.length-1]=S;else if(!i.type||I.length>0)l=!0;else continue;else if(s.indexOf(S)>-1)i.type?(m.apply(this),i={type:S}):i.type=S;else{if(r.indexOf(S)>-1)throw new Error("Unsupported path command: "+S+". Currently supported commands are "+s.split("").join(", ")+".");` ,
18
+ \r\f\v`.indexOf(S)>-1?a.push(""):S==="."?!i.type||I.indexOf(S)>-1?l=!0:a[a.length-1]+=S:l=!0}if(l)throw new Error("Unexpected character: "+S+" at offset "+v)}m.apply(this),t.optimize&&(this.commands=Ar(this.commands));let d=t.flipY,x=t.flipYBase;if(d===!0&&t.flipYBase===void 0){let v=this.getBoundingBox();x=v.y1+v.y2}for(let v in this.commands){let S=this.commands[v];for(let I in S)["x","x1","x2"].includes(I)?this.commands[v][I]=t.x+S[I]*t.scale:["y","y1","y2"].includes(I)&&(this.commands[v][I]=t.y+(d?x-S[I]:S[I])*t.scale)}return this},ve.fromSVG=function(e,t){return new ve().fromSVG(e,t)},ve.prototype.moveTo=function(e,t){this.commands.push({type:"M",x:e,y:t})},ve.prototype.lineTo=function(e,t){this.commands.push({type:"L",x:e,y:t})},ve.prototype.curveTo=ve.prototype.bezierCurveTo=function(e,t,n,s,r,o){this.commands.push({type:"C",x1:e,y1:t,x2:n,y2:s,x:r,y:o})},ve.prototype.quadTo=ve.prototype.quadraticCurveTo=function(e,t,n,s){this.commands.push({type:"Q",x1:e,y1:t,x:n,y:s})},ve.prototype.close=ve.prototype.closePath=function(){this.commands.push({type:"Z"})},ve.prototype.extend=function(e){if(e.commands)e=e.commands;else if(e instanceof ws){let t=e;this.moveTo(t.x1,t.y1),this.lineTo(t.x2,t.y1),this.lineTo(t.x2,t.y2),this.lineTo(t.x1,t.y2),this.close();return}Array.prototype.push.apply(this.commands,e)},ve.prototype.getBoundingBox=function(){let e=new ws,t=0,n=0,s=0,r=0;for(let o=0;o<this.commands.length;o++){let i=this.commands[o];switch(i.type){case"M":e.addPoint(i.x,i.y),t=s=i.x,n=r=i.y;break;case"L":e.addPoint(i.x,i.y),s=i.x,r=i.y;break;case"Q":e.addQuad(s,r,i.x1,i.y1,i.x,i.y),s=i.x,r=i.y;break;case"C":e.addBezier(s,r,i.x1,i.y1,i.x2,i.y2,i.x,i.y),s=i.x,r=i.y;break;case"Z":s=t,r=n;break;default:throw new Error("Unexpected path command "+i.type)}}return e.isEmpty()&&e.addPoint(0,0),e},ve.prototype.draw=function(e){let t=this._layers;if(t&&t.length){for(let s=0;s<t.length;s++)this.draw.call(t[s],e);return}let n=this._image;if(n){e.drawImage(n.image,n.x,n.y,n.width,n.height);return}e.beginPath();for(let s=0;s<this.commands.length;s+=1){let r=this.commands[s];r.type==="M"?e.moveTo(r.x,r.y):r.type==="L"?e.lineTo(r.x,r.y):r.type==="C"?e.bezierCurveTo(r.x1,r.y1,r.x2,r.y2,r.x,r.y):r.type==="Q"?e.quadraticCurveTo(r.x1,r.y1,r.x,r.y):r.type==="Z"&&this.stroke&&this.strokeWidth&&e.closePath()}this.fill&&(e.fillStyle=this.fill,e.fill()),this.stroke&&(e.strokeStyle=this.stroke,e.lineWidth=this.strokeWidth,e.stroke())},ve.prototype.toPathData=function(e){e=Xi(e);function t(a){let l=Lr(a,e.decimalPlaces);return Math.round(a)===l?""+l:l.toFixed(e.decimalPlaces)}function n(){let a="";for(let l=0;l<arguments.length;l+=1){let c=arguments[l];c>=0&&l>0&&(a+=" "),a+=t(c)}return a}let s=this.commands;e.optimize&&(s=JSON.parse(JSON.stringify(this.commands)),s=Ar(s));let r=e.flipY,o=e.flipYBase;if(r===!0&&o===void 0){let a=new ve;a.extend(s);let l=a.getBoundingBox();o=l.y1+l.y2}let i="";for(let a=0;a<s.length;a+=1){let l=s[a];l.type==="M"?i+="M"+n(l.x,r?o-l.y:l.y):l.type==="L"?i+="L"+n(l.x,r?o-l.y:l.y):l.type==="C"?i+="C"+n(l.x1,r?o-l.y1:l.y1,l.x2,r?o-l.y2:l.y2,l.x,r?o-l.y:l.y):l.type==="Q"?i+="Q"+n(l.x1,r?o-l.y1:l.y1,l.x,r?o-l.y:l.y):l.type==="Z"&&(i+="Z")}return i},ve.prototype.toSVG=function(e,t){this._layers&&this._layers.length&&console.warn("toSVG() does not support colr font layers yet"),this._image&&console.warn("toSVG() does not support SVG glyphs yet"),t||(t=this.toPathData(e));let n='<path d="';return n+=t,n+='"',this.fill!==void 0&&this.fill!=="black"&&(this.fill===null?n+=' fill="none"':n+=' fill="'+this.fill+'"'),this.stroke&&(n+=' stroke="'+this.stroke+'" stroke-width="'+this.strokeWidth+'"'),n+="/>",n},ve.prototype.toDOMElement=function(e,t){this._layers&&this._layers.length&&console.warn("toDOMElement() does not support colr font layers yet"),t||(t=this.toPathData(e));let n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d",t),this.fill!==void 0&&this.fill!=="black"&&(this.fill===null?n.setAttribute("fill","none"):n.setAttribute("fill",this.fill)),this.stroke&&(n.setAttribute("stroke",this.stroke),n.setAttribute("stroke-width",this.strokeWidth)),n};var Wt=ve;function Rr(e){throw new Error(e)}function Dr(e,t){e||Rr(t)}var B={fail:Rr,argument:Dr,assert:Dr},Fr=32768,Ur=2147483648,Yi=-32768,Zi=32767+1/65536,an={},D={},W={};function tt(e){return function(){return e}}D.BYTE=function(e){return B.argument(e>=0&&e<=255,"Byte value should be between 0 and 255."),[e]},W.BYTE=tt(1),D.CHAR=function(e){return[e.charCodeAt(0)]},W.CHAR=tt(1),D.CHARARRAY=function(e){(e===null||typeof e>"u")&&(e="",console.warn("CHARARRAY with undefined or null value encountered and treated as an empty string. This is probably caused by a missing glyph name."));let t=[];for(let n=0;n<e.length;n+=1)t[n]=e.charCodeAt(n);return t},W.CHARARRAY=function(e){return typeof e>"u"?0:e.length},D.USHORT=function(e){return[e>>8&255,e&255]},W.USHORT=tt(2),D.SHORT=function(e){return e>=Fr&&(e=-(2*Fr-e)),[e>>8&255,e&255]},W.SHORT=tt(2),D.UINT24=function(e){return[e>>16&255,e>>8&255,e&255]},W.UINT24=tt(3),D.ULONG=function(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]},W.ULONG=tt(4),D.LONG=function(e){return e>=Ur&&(e=-(2*Ur-e)),[e>>24&255,e>>16&255,e>>8&255,e&255]},W.LONG=tt(4),D.FLOAT=function(e){if(e>Zi||e<Yi)throw new Error(`Value ${e} is outside the range of representable values in 16.16 format`);let t=Math.round(e*65536)<<0;return D.ULONG(t)},W.FLOAT=W.ULONG,D.FIXED=D.ULONG,W.FIXED=W.ULONG,D.FWORD=D.SHORT,W.FWORD=W.SHORT,D.UFWORD=D.USHORT,W.UFWORD=W.USHORT,D.F2DOT14=function(e){return D.USHORT(e*16384)},W.F2DOT14=W.USHORT,D.LONGDATETIME=function(e){return[0,0,0,0,e>>24&255,e>>16&255,e>>8&255,e&255]},W.LONGDATETIME=tt(8),D.TAG=function(e){return B.argument(e.length===4,"Tag should be exactly 4 ASCII characters."),[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]},W.TAG=tt(4),D.Card8=D.BYTE,W.Card8=W.BYTE,D.Card16=D.USHORT,W.Card16=W.USHORT,D.OffSize=D.BYTE,W.OffSize=W.BYTE,D.SID=D.USHORT,W.SID=W.USHORT,D.NUMBER=function(e){return e>=-107&&e<=107?[e+139]:e>=108&&e<=1131?(e=e-108,[(e>>8)+247,e&255]):e>=-1131&&e<=-108?(e=-e-108,[(e>>8)+251,e&255]):e>=-32768&&e<=32767?D.NUMBER16(e):D.NUMBER32(e)},W.NUMBER=function(e){return D.NUMBER(e).length},D.NUMBER16=function(e){return[28,e>>8&255,e&255]},W.NUMBER16=tt(3),D.NUMBER32=function(e){return[29,e>>24&255,e>>16&255,e>>8&255,e&255]},W.NUMBER32=tt(5),D.REAL=function(e){let t=e.toString(),n=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(t);if(n){let o=parseFloat("1e"+((n[2]?+n[2]:0)+n[1].length));t=(Math.round(e*o)/o).toString()}let s="";for(let o=0,i=t.length;o<i;o+=1){let a=t[o];a==="e"?s+=t[++o]==="-"?"c":"b":a==="."?s+="a":a==="-"?s+="e":s+=a}s+=s.length&1?"f":"ff";let r=[30];for(let o=0,i=s.length;o<i;o+=2)r.push(parseInt(s.substr(o,2),16));return r},W.REAL=function(e){return D.REAL(e).length},D.NAME=D.CHARARRAY,W.NAME=W.CHARARRAY,D.STRING=D.CHARARRAY,W.STRING=W.CHARARRAY,an.UTF8=function(e,t,n){let s=[],r=n;for(let o=0;o<r;o++,t+=1)s[o]=e.getUint8(t);return String.fromCharCode.apply(null,s)},an.UTF16=function(e,t,n){let s=[],r=n/2;for(let o=0;o<r;o++,t+=2)s[o]=e.getUint16(t);return String.fromCharCode.apply(null,s)},D.UTF16=function(e){let t=[];for(let n=0;n<e.length;n+=1){let s=e.charCodeAt(n);t[t.length]=s>>8&255,t[t.length]=s&255}return t},W.UTF16=function(e){return e.length*2};var jn={"x-mac-croatian":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\u0160\u2122\xB4\xA8\u2260\u017D\xD8\u221E\xB1\u2264\u2265\u2206\xB5\u2202\u2211\u220F\u0161\u222B\xAA\xBA\u03A9\u017E\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u0106\xAB\u010C\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u0110\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\uF8FF\xA9\u2044\u20AC\u2039\u203A\xC6\xBB\u2013\xB7\u201A\u201E\u2030\xC2\u0107\xC1\u010D\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u0111\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u03C0\xCB\u02DA\xB8\xCA\xE6\u02C7","x-mac-cyrillic":"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u2020\xB0\u0490\xA3\xA7\u2022\xB6\u0406\xAE\xA9\u2122\u0402\u0452\u2260\u0403\u0453\u221E\xB1\u2264\u2265\u0456\xB5\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040A\u045A\u0458\u0405\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\u040B\u045B\u040C\u045C\u0455\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u201E\u040E\u045E\u040F\u045F\u2116\u0401\u0451\u044F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E","x-mac-gaelic":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u1E02\xB1\u2264\u2265\u1E03\u010A\u010B\u1E0A\u1E0B\u1E1E\u1E1F\u0120\u0121\u1E40\xE6\xF8\u1E41\u1E56\u1E57\u027C\u0192\u017F\u1E60\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\u1E61\u1E9B\xFF\u0178\u1E6A\u20AC\u2039\u203A\u0176\u0177\u1E6B\xB7\u1EF2\u1EF3\u204A\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u2663\xD2\xDA\xDB\xD9\u0131\xDD\xFD\u0174\u0175\u1E84\u1E85\u1E80\u1E81\u1E82\u1E83","x-mac-greek":"\xC4\xB9\xB2\xC9\xB3\xD6\xDC\u0385\xE0\xE2\xE4\u0384\xA8\xE7\xE9\xE8\xEA\xEB\xA3\u2122\xEE\xEF\u2022\xBD\u2030\xF4\xF6\xA6\u20AC\xF9\xFB\xFC\u2020\u0393\u0394\u0398\u039B\u039E\u03A0\xDF\xAE\xA9\u03A3\u03AA\xA7\u2260\xB0\xB7\u0391\xB1\u2264\u2265\xA5\u0392\u0395\u0396\u0397\u0399\u039A\u039C\u03A6\u03AB\u03A8\u03A9\u03AC\u039D\xAC\u039F\u03A1\u2248\u03A4\xAB\xBB\u2026\xA0\u03A5\u03A7\u0386\u0388\u0153\u2013\u2015\u201C\u201D\u2018\u2019\xF7\u0389\u038A\u038C\u038E\u03AD\u03AE\u03AF\u03CC\u038F\u03CD\u03B1\u03B2\u03C8\u03B4\u03B5\u03C6\u03B3\u03B7\u03B9\u03BE\u03BA\u03BB\u03BC\u03BD\u03BF\u03C0\u03CE\u03C1\u03C3\u03C4\u03B8\u03C9\u03C2\u03C7\u03C5\u03B6\u03CA\u03CB\u0390\u03B0\xAD","x-mac-icelandic":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\xDD\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\xD0\xF0\xDE\xFE\xFD\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-inuit":"\u1403\u1404\u1405\u1406\u140A\u140B\u1431\u1432\u1433\u1434\u1438\u1439\u1449\u144E\u144F\u1450\u1451\u1455\u1456\u1466\u146D\u146E\u146F\u1470\u1472\u1473\u1483\u148B\u148C\u148D\u148E\u1490\u1491\xB0\u14A1\u14A5\u14A6\u2022\xB6\u14A7\xAE\xA9\u2122\u14A8\u14AA\u14AB\u14BB\u14C2\u14C3\u14C4\u14C5\u14C7\u14C8\u14D0\u14EF\u14F0\u14F1\u14F2\u14F4\u14F5\u1505\u14D5\u14D6\u14D7\u14D8\u14DA\u14DB\u14EA\u1528\u1529\u152A\u152B\u152D\u2026\xA0\u152E\u153E\u1555\u1556\u1557\u2013\u2014\u201C\u201D\u2018\u2019\u1558\u1559\u155A\u155D\u1546\u1547\u1548\u1549\u154B\u154C\u1550\u157F\u1580\u1581\u1582\u1583\u1584\u1585\u158F\u1590\u1591\u1592\u1593\u1594\u1595\u1671\u1672\u1673\u1674\u1675\u1676\u1596\u15A0\u15A1\u15A2\u15A3\u15A4\u15A5\u15A6\u157C\u0141\u0142","x-mac-ce":"\xC4\u0100\u0101\xC9\u0104\xD6\xDC\xE1\u0105\u010C\xE4\u010D\u0106\u0107\xE9\u0179\u017A\u010E\xED\u010F\u0112\u0113\u0116\xF3\u0117\xF4\xF6\xF5\xFA\u011A\u011B\xFC\u2020\xB0\u0118\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\u0119\xA8\u2260\u0123\u012E\u012F\u012A\u2264\u2265\u012B\u0136\u2202\u2211\u0142\u013B\u013C\u013D\u013E\u0139\u013A\u0145\u0146\u0143\xAC\u221A\u0144\u0147\u2206\xAB\xBB\u2026\xA0\u0148\u0150\xD5\u0151\u014C\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\u014D\u0154\u0155\u0158\u2039\u203A\u0159\u0156\u0157\u0160\u201A\u201E\u0161\u015A\u015B\xC1\u0164\u0165\xCD\u017D\u017E\u016A\xD3\xD4\u016B\u016E\xDA\u016F\u0170\u0171\u0172\u0173\xDD\xFD\u0137\u017B\u0141\u017C\u0122\u02C7",macintosh:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-romanian":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\u0102\u0218\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\u0103\u0219\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\u2039\u203A\u021A\u021B\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-turkish":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u011E\u011F\u0130\u0131\u015E\u015F\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\uF8A0\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"};an.MACSTRING=function(e,t,n,s){let r=jn[s];if(r===void 0)return;let o="";for(let i=0;i<n;i++){let a=e.getUint8(t+i);a<=127?o+=String.fromCharCode(a):o+=r[a&127]}return o};var Wn=typeof WeakMap=="function"&&new WeakMap,qn,Ki=function(e){if(!qn){qn={};for(let r in jn)qn[r]=new String(r)}let t=qn[e];if(t===void 0)return;if(Wn){let r=Wn.get(t);if(r!==void 0)return r}let n=jn[e];if(n===void 0)return;let s={};for(let r=0;r<n.length;r++)s[n.charCodeAt(r)]=r+128;return Wn&&Wn.set(t,s),s};D.MACSTRING=function(e,t){let n=Ki(t);if(n===void 0)return;let s=[];for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);if(o>=128&&(o=n[o],o===void 0))return;s[r]=o}return s},W.MACSTRING=function(e,t){let n=D.MACSTRING(e,t);return n!==void 0?n.length:0};function Es(e){return e>=-128&&e<=127}function Qi(e,t,n){let s=0,r=e.length;for(;t<r&&s<64&&e[t]===0;)++t,++s;return n.push(128|s-1),t}function Ji(e,t,n){let s=0,r=e.length,o=t;for(;o<r&&s<64;){let i=e[o];if(!Es(i)||i===0&&o+1<r&&e[o+1]===0)break;++o,++s}n.push(s-1);for(let i=t;i<o;++i)n.push(e[i]+256&255);return o}function ea(e,t,n){let s=0,r=e.length,o=t;for(;o<r&&s<64;){let i=e[o];if(i===0||Es(i)&&o+1<r&&Es(e[o+1]))break;++o,++s}n.push(64|s-1);for(let i=t;i<o;++i){let a=e[i];n.push(a+65536>>8&255,a+256&255)}return o}D.VARDELTAS=function(e){let t=0,n=[];for(;t<e.length;){let s=e[t];s===0?t=Qi(e,t,n):s>=-128&&s<=127?t=Ji(e,t,n):t=ea(e,t,n)}return n},D.INDEX=function(e){let t=1,n=[t],s=[];for(let a=0;a<e.length;a+=1){let l=D.OBJECT(e[a]);Array.prototype.push.apply(s,l),t+=l.length,n.push(t)}if(s.length===0)return[0,0];let r=[],o=1+Math.floor(Math.log(t)/Math.log(2))/8|0,i=[void 0,D.BYTE,D.USHORT,D.UINT24,D.ULONG][o];for(let a=0;a<n.length;a+=1){let l=i(n[a]);Array.prototype.push.apply(r,l)}return Array.prototype.concat(D.Card16(e.length),D.OffSize(o),r,s)},W.INDEX=function(e){return D.INDEX(e).length},D.DICT=function(e){let t=[],n=Object.keys(e),s=n.length;for(let r=0;r<s;r+=1){let o=parseInt(n[r],0),i=e[o],a=D.OPERAND(i.value,i.type),l=D.OPERATOR(o);for(let c=0;c<a.length;c++)t.push(a[c]);for(let c=0;c<l.length;c++)t.push(l[c])}return t},W.DICT=function(e){return D.DICT(e).length},D.OPERATOR=function(e){return e<1200?[e]:[12,e-1200]},D.OPERAND=function(e,t){let n=[];if(Array.isArray(t))for(let s=0;s<t.length;s+=1){B.argument(e.length===t.length,"Not enough arguments given for type"+t);let r=D.OPERAND(e[s],t[s]);for(let o=0;o<r.length;o++)n.push(r[o])}else if(t==="SID"){let s=D.NUMBER(e);for(let r=0;r<s.length;r++)n.push(s[r])}else if(t==="offset"){let s=D.NUMBER32(e);for(let r=0;r<s.length;r++)n.push(s[r])}else if(t==="number"){let s=D.NUMBER(e);for(let r=0;r<s.length;r++)n.push(s[r])}else if(t==="real"){let s=D.REAL(e);for(let r=0;r<s.length;r++)n.push(s[r])}else throw new Error("Unknown operand type "+t);return n},D.OP=D.BYTE,W.OP=W.BYTE;var $n=typeof WeakMap=="function"&&new WeakMap;D.CHARSTRING=function(e){if($n){let s=$n.get(e);if(s!==void 0)return s}let t=[],n=e.length;for(let s=0;s<n;s+=1){let r=e[s],o=D[r.type](r.value);for(let i=0;i<o.length;i++)t.push(o[i])}return $n&&$n.set(e,t),t},W.CHARSTRING=function(e){return D.CHARSTRING(e).length},D.OBJECT=function(e){let t=D[e.type];return B.argument(t!==void 0,"No encoding function for type "+e.type),t(e.value)},W.OBJECT=function(e){let t=W[e.type];return B.argument(t!==void 0,"No sizeOf function for type "+e.type),t(e.value)},D.TABLE=function(e){let t=[],n=(e.fields||[]).length,s=[],r=[];for(let o=0;o<n;o+=1){let i=e.fields[o],a=D[i.type];B.argument(a!==void 0,"No encoding function for field type "+i.type+" ("+i.name+")");let l=e[i.name];l===void 0&&(l=i.value);let c=a(l);if(i.type==="TABLE")l.fields!==null&&(r.push(t.length),s.push(c)),t.push(0,0);else for(let u=0;u<c.length;u++)t.push(c[u])}for(let o=0;o<s.length;o+=1){let i=r[o],a=t.length;B.argument(a<65536,"Table "+e.tableName+" too big."),t[i]=a>>8,t[i+1]=a&255;for(let l=0;l<s[o].length;l++)t.push(s[o][l])}return t},W.TABLE=function(e){let t=0,n=(e.fields||[]).length;for(let s=0;s<n;s+=1){let r=e.fields[s],o=W[r.type];B.argument(o!==void 0,"No sizeOf function for field type "+r.type+" ("+r.name+")");let i=e[r.name];i===void 0&&(i=r.value),t+=o(i),r.type==="TABLE"&&(t+=2)}return t},D.RECORD=D.TABLE,W.RECORD=W.TABLE,D.LITERAL=function(e){return e},W.LITERAL=function(e){return e.length};function de(e,t,n){if(t&&t.length)for(let s=0;s<t.length;s+=1){let r=t[s];this[r.name]=r.value}if(this.tableName=e,this.fields=t,n){let s=Object.keys(n);for(let r=0;r<s.length;r+=1){let o=s[r],i=n[o];this[o]!==void 0&&(this[o]=i)}}}de.prototype.encode=function(){return D.TABLE(this)},de.prototype.sizeOf=function(){return W.TABLE(this)};function ln(e,t,n){n===void 0&&(n=t.length);let s=new Array(t.length+1);s[0]={name:e+"Count",type:"USHORT",value:n};for(let r=0;r<t.length;r++)s[r+1]={name:e+r,type:"USHORT",value:t[r]};return s}function Ls(e,t,n){let s=t.length,r=new Array(s+1);r[0]={name:e+"Count",type:"USHORT",value:s};for(let o=0;o<s;o++)r[o+1]={name:e+o,type:"TABLE",value:n(t[o],o)};return r}function un(e,t,n){let s=t.length,r=[];r[0]={name:e+"Count",type:"USHORT",value:s};for(let o=0;o<s;o++)r=r.concat(n(t[o],o));return r}function Xn(e){e.format===1?de.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:1}].concat(ln("glyph",e.glyphs))):e.format===2?de.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:2}].concat(un("rangeRecord",e.ranges,function(t,n){return[{name:"startGlyphID"+n,type:"USHORT",value:t.start},{name:"endGlyphID"+n,type:"USHORT",value:t.end},{name:"startCoverageIndex"+n,type:"USHORT",value:t.index}]}))):B.assert(!1,"Coverage format must be 1 or 2.")}Xn.prototype=Object.create(de.prototype),Xn.prototype.constructor=Xn;function Yn(e){de.call(this,"scriptListTable",un("scriptRecord",e,function(t,n){let s=t.script,r=s.defaultLangSys;return B.assert(!!r,"Unable to write GSUB: script "+t.tag+" has no default language system."),[{name:"scriptTag"+n,type:"TAG",value:t.tag},{name:"script"+n,type:"TABLE",value:new de("scriptTable",[{name:"defaultLangSys",type:"TABLE",value:new de("defaultLangSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:r.reqFeatureIndex}].concat(ln("featureIndex",r.featureIndexes)))}].concat(un("langSys",s.langSysRecords,function(o,i){let a=o.langSys;return[{name:"langSysTag"+i,type:"TAG",value:o.tag},{name:"langSys"+i,type:"TABLE",value:new de("langSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:a.reqFeatureIndex}].concat(ln("featureIndex",a.featureIndexes)))}]})))}]}))}Yn.prototype=Object.create(de.prototype),Yn.prototype.constructor=Yn;function Zn(e){de.call(this,"featureListTable",un("featureRecord",e,function(t,n){let s=t.feature;return[{name:"featureTag"+n,type:"TAG",value:t.tag},{name:"feature"+n,type:"TABLE",value:new de("featureTable",[{name:"featureParams",type:"USHORT",value:s.featureParams}].concat(ln("lookupListIndex",s.lookupListIndexes)))}]}))}Zn.prototype=Object.create(de.prototype),Zn.prototype.constructor=Zn;function Kn(e,t){de.call(this,"lookupListTable",Ls("lookup",e,function(n){let s=t[n.lookupType];return B.assert(!!s,"Unable to write GSUB lookup type "+n.lookupType+" tables."),new de("lookupTable",[{name:"lookupType",type:"USHORT",value:n.lookupType},{name:"lookupFlag",type:"USHORT",value:n.lookupFlag}].concat(Ls("subtable",n.subtables,s)))}))}Kn.prototype=Object.create(de.prototype),Kn.prototype.constructor=Kn;function Qn(e){e.format===1?de.call(this,"classDefTable",[{name:"classFormat",type:"USHORT",value:1},{name:"startGlyphID",type:"USHORT",value:e.startGlyph}].concat(ln("glyph",e.classes))):e.format===2?de.call(this,"classDefTable",[{name:"classFormat",type:"USHORT",value:2}].concat(un("rangeRecord",e.ranges,function(t,n){return[{name:"startGlyphID"+n,type:"USHORT",value:t.start},{name:"endGlyphID"+n,type:"USHORT",value:t.end},{name:"class"+n,type:"USHORT",value:t.classId}]}))):B.assert(!1,"Class format must be 1 or 2.")}Qn.prototype=Object.create(de.prototype),Qn.prototype.constructor=Qn;var A={Table:de,Record:de,Coverage:Xn,ClassDef:Qn,ScriptList:Yn,FeatureList:Zn,LookupList:Kn,ushortList:ln,tableList:Ls,recordList:un};function Mr(e,t){return e.getUint8(t)}function Jn(e,t){return e.getUint16(t,!1)}function ta(e,t){return e.getInt16(t,!1)}function Pr(e,t){return(e.getUint16(t)<<8)+e.getUint8(t+2)}function As(e,t){return e.getUint32(t,!1)}function na(e,t){return e.getInt32(t,!1)}function Nr(e,t){let n=e.getInt16(t,!1),s=e.getUint16(t+2,!1);return n+s/65535}function sa(e,t){let n="";for(let s=t;s<t+4;s+=1)n+=String.fromCharCode(e.getInt8(s));return n}function ra(e,t,n){let s=0;for(let r=0;r<n;r+=1)s<<=8,s+=e.getUint8(t+r);return s}function oa(e,t,n){let s=[];for(let r=t;r<n;r+=1)s.push(e.getUint8(r));return s}function ia(e){let t="";for(let n=0;n<e.length;n+=1)t+=String.fromCharCode(e[n]);return t}var aa={byte:1,uShort:2,f2dot14:2,short:2,uInt24:3,uLong:4,fixed:4,longDateTime:8,tag:4},Ie={LONG_WORDS:32768,WORD_DELTA_COUNT_MASK:32767,SHARED_POINT_NUMBERS:32768,COUNT_MASK:4095,EMBEDDED_PEAK_TUPLE:32768,INTERMEDIATE_REGION:16384,PRIVATE_POINT_NUMBERS:8192,TUPLE_INDEX_MASK:4095,POINTS_ARE_WORDS:128,POINT_RUN_COUNT_MASK:127,DELTAS_ARE_ZERO:128,DELTAS_ARE_WORDS:64,DELTA_RUN_COUNT_MASK:63,INNER_INDEX_BIT_COUNT_MASK:15,MAP_ENTRY_SIZE_MASK:48};function C(e,t){this.data=e,this.offset=t,this.relativeOffset=0}C.prototype.parseByte=function(){let e=this.data.getUint8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},C.prototype.parseChar=function(){let e=this.data.getInt8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},C.prototype.parseCard8=C.prototype.parseByte,C.prototype.parseUShort=function(){let e=this.data.getUint16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},C.prototype.parseCard16=C.prototype.parseUShort,C.prototype.parseSID=C.prototype.parseUShort,C.prototype.parseOffset16=C.prototype.parseUShort,C.prototype.parseShort=function(){let e=this.data.getInt16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},C.prototype.parseF2Dot14=function(){let e=this.data.getInt16(this.offset+this.relativeOffset)/16384;return this.relativeOffset+=2,e},C.prototype.parseUInt24=function(){let e=Pr(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=3,e},C.prototype.parseULong=function(){let e=As(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},C.prototype.parseLong=function(){let e=na(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},C.prototype.parseOffset32=C.prototype.parseULong,C.prototype.parseFixed=function(){let e=Nr(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},C.prototype.parseString=function(e){let t=this.data,n=this.offset+this.relativeOffset,s="";this.relativeOffset+=e;for(let r=0;r<e;r++)s+=String.fromCharCode(t.getUint8(n+r));return s},C.prototype.parseTag=function(){return this.parseString(4)},C.prototype.parseLongDateTime=function(){let e=As(this.data,this.offset+this.relativeOffset+4);return e-=2082844800,this.relativeOffset+=8,e},C.prototype.parseVersion=function(e){let t=Jn(this.data,this.offset+this.relativeOffset),n=Jn(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,e===void 0&&(e=4096),t+n/e/10},C.prototype.skip=function(e,t){t===void 0&&(t=1),this.relativeOffset+=aa[e]*t},C.prototype.parseULongList=function(e){e===void 0&&(e=this.parseULong());let t=new Array(e),n=this.data,s=this.offset+this.relativeOffset;for(let r=0;r<e;r++)t[r]=n.getUint32(s),s+=4;return this.relativeOffset+=e*4,t},C.prototype.parseOffset16List=C.prototype.parseUShortList=function(e){e===void 0&&(e=this.parseUShort());let t=new Array(e),n=this.data,s=this.offset+this.relativeOffset;for(let r=0;r<e;r++)t[r]=n.getUint16(s),s+=2;return this.relativeOffset+=e*2,t},C.prototype.parseShortList=function(e){let t=new Array(e),n=this.data,s=this.offset+this.relativeOffset;for(let r=0;r<e;r++)t[r]=n.getInt16(s),s+=2;return this.relativeOffset+=e*2,t},C.prototype.parseByteList=function(e){let t=new Array(e),n=this.data,s=this.offset+this.relativeOffset;for(let r=0;r<e;r++)t[r]=n.getUint8(s++);return this.relativeOffset+=e,t},C.prototype.parseList=function(e,t){t||(t=e,e=this.parseUShort());let n=new Array(e);for(let s=0;s<e;s++)n[s]=t.call(this);return n},C.prototype.parseList32=function(e,t){t||(t=e,e=this.parseULong());let n=new Array(e);for(let s=0;s<e;s++)n[s]=t.call(this);return n},C.prototype.parseRecordList=function(e,t){t||(t=e,e=this.parseUShort());let n=new Array(e),s=Object.keys(t);for(let r=0;r<e;r++){let o={};for(let i=0;i<s.length;i++){let a=s[i],l=t[a];o[a]=l.call(this)}n[r]=o}return n},C.prototype.parseRecordList32=function(e,t){t||(t=e,e=this.parseULong());let n=new Array(e),s=Object.keys(t);for(let r=0;r<e;r++){let o={};for(let i=0;i<s.length;i++){let a=s[i],l=t[a];o[a]=l.call(this)}n[r]=o}return n},C.prototype.parseTupleRecords=function(e,t){let n=[];for(let s=0;s<e;s++){let r=[];for(let o=0;o<t;o++)r.push(this.parseF2Dot14());n.push(r)}return n},C.prototype.parseStruct=function(e){if(typeof e=="function")return e.call(this);{let t=Object.keys(e),n={};for(let s=0;s<t.length;s++){let r=t[s],o=e[r];n[r]=o.call(this)}return n}},C.prototype.parseValueRecord=function(e){if(e===void 0&&(e=this.parseUShort()),e===0)return;let t={};return e&1&&(t.xPlacement=this.parseShort()),e&2&&(t.yPlacement=this.parseShort()),e&4&&(t.xAdvance=this.parseShort()),e&8&&(t.yAdvance=this.parseShort()),e&16&&(t.xPlaDevice=void 0,this.parseShort()),e&32&&(t.yPlaDevice=void 0,this.parseShort()),e&64&&(t.xAdvDevice=void 0,this.parseShort()),e&128&&(t.yAdvDevice=void 0,this.parseShort()),t},C.prototype.parseValueRecordList=function(){let e=this.parseUShort(),t=this.parseUShort(),n=new Array(t);for(let s=0;s<t;s++)n[s]=this.parseValueRecord(e);return n},C.prototype.parsePointer=function(e){let t=this.parseOffset16();if(t>0)return new C(this.data,this.offset+t).parseStruct(e)},C.prototype.parsePointer32=function(e){let t=this.parseOffset32();if(t>0)return new C(this.data,this.offset+t).parseStruct(e)},C.prototype.parseListOfLists=function(e){let t=this.parseOffset16List(),n=t.length,s=this.relativeOffset,r=new Array(n);for(let o=0;o<n;o++){let i=t[o];if(i===0){r[o]=void 0;continue}if(this.relativeOffset=i,e){let a=this.parseOffset16List(),l=new Array(a.length);for(let c=0;c<a.length;c++)this.relativeOffset=i+a[c],l[c]=e.call(this);r[o]=l}else r[o]=this.parseUShortList()}return this.relativeOffset=s,r},C.prototype.parseCoverage=function(){let e=this.offset+this.relativeOffset,t=this.parseUShort(),n=this.parseUShort();if(t===1)return{format:1,glyphs:this.parseUShortList(n)};if(t===2){let s=new Array(n);for(let r=0;r<n;r++)s[r]={start:this.parseUShort(),end:this.parseUShort(),index:this.parseUShort()};return{format:2,ranges:s}}throw new Error("0x"+e.toString(16)+": Coverage format must be 1 or 2.")},C.prototype.parseClassDef=function(){let e=this.offset+this.relativeOffset,t=this.parseUShort();return t===1?{format:1,startGlyph:this.parseUShort(),classes:this.parseUShortList()}:t===2?{format:2,ranges:this.parseRecordList({start:C.uShort,end:C.uShort,classId:C.uShort})}:(console.warn(`0x${e.toString(16)}: This font file uses an invalid ClassDef format of ${t}. It might be corrupted and should be reacquired if it doesn't display as intended.`),{format:t})},C.list=function(e,t){return function(){return this.parseList(e,t)}},C.list32=function(e,t){return function(){return this.parseList32(e,t)}},C.recordList=function(e,t){return function(){return this.parseRecordList(e,t)}},C.recordList32=function(e,t){return function(){return this.parseRecordList32(e,t)}},C.pointer=function(e){return function(){return this.parsePointer(e)}},C.pointer32=function(e){return function(){return this.parsePointer32(e)}},C.tag=C.prototype.parseTag,C.byte=C.prototype.parseByte,C.uShort=C.offset16=C.prototype.parseUShort,C.uShortList=C.prototype.parseUShortList,C.uInt24=C.prototype.parseUInt24,C.uLong=C.offset32=C.prototype.parseULong,C.uLongList=C.prototype.parseULongList,C.fixed=C.prototype.parseFixed,C.f2Dot14=C.prototype.parseF2Dot14,C.struct=C.prototype.parseStruct,C.coverage=C.prototype.parseCoverage,C.classDef=C.prototype.parseClassDef;var Br={reserved:C.uShort,reqFeatureIndex:C.uShort,featureIndexes:C.uShortList};C.prototype.parseScriptList=function(){return this.parsePointer(C.recordList({tag:C.tag,script:C.pointer({defaultLangSys:C.pointer(Br),langSysRecords:C.recordList({tag:C.tag,langSys:C.pointer(Br)})})}))||[]},C.prototype.parseFeatureList=function(){return this.parsePointer(C.recordList({tag:C.tag,feature:C.pointer({featureParams:C.offset16,lookupListIndexes:C.uShortList})}))||[]},C.prototype.parseLookupList=function(e){return this.parsePointer(C.list(C.pointer(function(){let t=this.parseUShort();B.argument(1<=t&&t<=9,"GPOS/GSUB lookup type "+t+" unknown.");let n=this.parseUShort(),s=n&16;return{lookupType:t,lookupFlag:n,subtables:this.parseList(C.pointer(e[t])),markFilteringSet:s?this.parseUShort():void 0}})))||[]},C.prototype.parseFeatureVariationsList=function(){return this.parsePointer32(function(){let e=this.parseUShort(),t=this.parseUShort();return B.argument(e===1&&t<1,"GPOS/GSUB feature variations table unknown."),this.parseRecordList32({conditionSetOffset:C.offset32,featureTableSubstitutionOffset:C.offset32})})||[]},C.prototype.parseVariationStore=function(){let e=this.relativeOffset,t=this.parseUShort(),n={itemVariationStore:this.parseItemVariationStore()};return this.relativeOffset=e+t+2,n},C.prototype.parseItemVariationStore=function(){let e=this.relativeOffset,t={format:this.parseUShort(),variationRegions:[],itemVariationSubtables:[]},n=this.parseOffset32(),s=this.parseUShort(),r=this.parseULongList(s);this.relativeOffset=e+n,t.variationRegions=this.parseVariationRegionList();for(let o=0;o<s;o++){let i=r[o];this.relativeOffset=e+i,t.itemVariationSubtables.push(this.parseItemVariationSubtable())}return t},C.prototype.parseVariationRegionList=function(){let e=this.parseUShort(),t=this.parseUShort();return this.parseRecordList(t,{regionAxes:C.recordList(e,{startCoord:C.f2Dot14,peakCoord:C.f2Dot14,endCoord:C.f2Dot14})})},C.prototype.parseItemVariationSubtable=function(){let e=this.parseUShort(),t=this.parseUShort(),n=this.parseUShortList(),s=n.length;return{regionIndexes:n,deltaSets:e&&s?this.parseDeltaSets(e,t,s):[]}},C.prototype.parseDeltaSetIndexMap=function(){let e=this.parseByte(),t=this.parseByte(),n=[],s=0;switch(e){case 0:s=this.parseUShort();break;case 1:s=this.parseULong();break;default:console.error(`unsupported DeltaSetIndexMap format ${e}`)}if(!s)return{format:e,entryFormat:t};let r=(t&Ie.INNER_INDEX_BIT_COUNT_MASK)+1,o=((t&Ie.MAP_ENTRY_SIZE_MASK)>>4)+1;for(let i=0;i<s;i++){let a;if(o===1)a=this.parseByte();else if(o===2)a=this.parseUShort();else if(o===3)a=this.parseUInt24();else if(o===4)a=this.parseULong();else throw new Error(`Invalid entry size of ${o}`);let l=a>>r,c=a&(1<<r)-1;n.push({outerIndex:l,innerIndex:c})}return{format:e,entryFormat:t,map:n}},C.prototype.parseDeltaSets=function(e,t,n){let s=Array.from({length:e},()=>[]),r=t&Ie.LONG_WORDS,o=t&Ie.WORD_DELTA_COUNT_MASK;if(o>n)throw Error("wordCount must be less than or equal to regionIndexCount");let i=(r?this.parseLong:this.parseShort).bind(this),a=(r?this.parseShort:this.parseChar).bind(this);for(let l=0;l<e;l++)for(let c=0;c<n;c++)c<o?s[l].push(i()):s[l].push(a());return s},C.prototype.parseTupleVariationStoreList=function(e,t,n){let s=this.parseUShort(),o=this.parseUShort()&1,i=this.parseOffset32(),a=(o?this.parseULong:this.parseUShort).bind(this),l={},c=a();o||(c*=2);let u;for(let m=0;m<s;m++){u=a(),o||(u*=2);let d=u-c;l[m]=d?this.parseTupleVariationStore(i+c,e,t,n,m):void 0,c=u}return l},C.prototype.parseTupleVariationStore=function(e,t,n,s,r){let o=this.relativeOffset;this.relativeOffset=e,n==="cvar"&&(this.relativeOffset+=4);let i=this.parseUShort(),a=!!(i&Ie.SHARED_POINT_NUMBERS),l=i&Ie.COUNT_MASK,c=this.parseOffset16(),u=[],m=[];for(let v=0;v<l;v++){let S=this.parseTupleVariationHeader(t,n);u.push(S)}this.relativeOffset!==e+c&&(console.warn(`Unexpected offset after parsing tuple variation headers! Expected ${e+c}, actually ${this.relativeOffset}`),this.relativeOffset=e+c),a&&(m=this.parsePackedPointNumbers());let d=this.relativeOffset;for(let v=0;v<l;v++){let S=u[v];S.privatePoints=[],this.relativeOffset=d,n==="cvar"&&!S.peakTuple&&console.warn("An embedded peak tuple is required in TupleVariationHeaders for the cvar table."),S.flags.privatePointNumbers&&(S.privatePoints=this.parsePackedPointNumbers()),delete S.flags;let I=this.offset,_=this.relativeOffset,P=z=>{let Y,re,ie=()=>{let ae=0;if(n==="gvar"){if(ae=S.privatePoints.length||m.length,!ae){let me=s.get(r);me.path,ae=me.points.length,ae+=4}}else n==="cvar"&&(ae=s.length);this.offset=I,this.relativeOffset=_,Y=this.parsePackedDeltas(ae),n==="gvar"&&(re=this.parsePackedDeltas(ae))};return{configurable:!0,get:function(){return Y===void 0&&ie(),z==="deltasY"?re:Y},set:function(ae){Y===void 0&&ie(),z==="deltasY"?re=ae:Y=ae}}};Object.defineProperty(S,"deltas",P.call(this,"deltas")),n==="gvar"&&Object.defineProperty(S,"deltasY",P.call(this,"deltasY")),d+=S.variationDataSize,delete S.variationDataSize}this.relativeOffset=o;let x={headers:u};return x.sharedPoints=m,x},C.prototype.parseTupleVariationHeader=function(e,t){let n=this.parseUShort(),s=this.parseUShort(),r=!!(s&Ie.EMBEDDED_PEAK_TUPLE),o=!!(s&Ie.INTERMEDIATE_REGION),i=!!(s&Ie.PRIVATE_POINT_NUMBERS),a=r?void 0:s&Ie.TUPLE_INDEX_MASK,l=r?this.parseTupleRecords(1,e)[0]:void 0,c=o?this.parseTupleRecords(1,e)[0]:void 0,u=o?this.parseTupleRecords(1,e)[0]:void 0,m={variationDataSize:n,peakTuple:l,intermediateStartTuple:c,intermediateEndTuple:u,flags:{embeddedPeakTuple:r,intermediateRegion:o,privatePointNumbers:i}};return t==="gvar"&&(m.sharedTupleRecordsIndex=a),m},C.prototype.parsePackedPointNumbers=function(){let e=this.parseByte(),t=[],n=e;if(e>=128){let r=this.parseByte();n=(e&Ie.POINT_RUN_COUNT_MASK)<<8|r}let s=0;for(;t.length<n;){let r=this.parseByte(),o=!!(r&Ie.POINTS_ARE_WORDS),i=(r&Ie.POINT_RUN_COUNT_MASK)+1;for(let a=0;a<i&&t.length<n;a++){let l;o?l=this.parseUShort():l=this.parseByte(),s=s+l,t.push(s)}}return t},C.prototype.parsePackedDeltas=function(e){let t=[];for(;t.length<e;){let n=this.parseByte(),s=!!(n&Ie.DELTAS_ARE_ZERO),r=!!(n&Ie.DELTAS_ARE_WORDS),o=(n&Ie.DELTA_RUN_COUNT_MASK)+1;for(let i=0;i<o&&t.length<e;i++)s?t.push(0):r?t.push(this.parseShort()):t.push(this.parseChar())}return t};var F={getByte:Mr,getCard8:Mr,getUShort:Jn,getCard16:Jn,getShort:ta,getUInt24:Pr,getULong:As,getFixed:Nr,getTag:sa,getOffset:ra,getBytes:oa,bytesToString:ia,Parser:C},es=["copyright","fontFamily","fontSubfamily","uniqueID","fullName","version","postScriptName","trademark","manufacturer","designer","description","manufacturerURL","designerURL","license","licenseURL","reserved","preferredFamily","preferredSubfamily","compatibleFullName","sampleText","postScriptFindFontName","wwsFamily","wwsSubfamily"],_r={0:"en",1:"fr",2:"de",3:"it",4:"nl",5:"sv",6:"es",7:"da",8:"pt",9:"no",10:"he",11:"ja",12:"ar",13:"fi",14:"el",15:"is",16:"mt",17:"tr",18:"hr",19:"zh-Hant",20:"ur",21:"hi",22:"th",23:"ko",24:"lt",25:"pl",26:"hu",27:"es",28:"lv",29:"se",30:"fo",31:"fa",32:"ru",33:"zh",34:"nl-BE",35:"ga",36:"sq",37:"ro",38:"cz",39:"sk",40:"si",41:"yi",42:"sr",43:"mk",44:"bg",45:"uk",46:"be",47:"uz",48:"kk",49:"az-Cyrl",50:"az-Arab",51:"hy",52:"ka",53:"mo",54:"ky",55:"tg",56:"tk",57:"mn-CN",58:"mn",59:"ps",60:"ks",61:"ku",62:"sd",63:"bo",64:"ne",65:"sa",66:"mr",67:"bn",68:"as",69:"gu",70:"pa",71:"or",72:"ml",73:"kn",74:"ta",75:"te",76:"si",77:"my",78:"km",79:"lo",80:"vi",81:"id",82:"tl",83:"ms",84:"ms-Arab",85:"am",86:"ti",87:"om",88:"so",89:"sw",90:"rw",91:"rn",92:"ny",93:"mg",94:"eo",128:"cy",129:"eu",130:"ca",131:"la",132:"qu",133:"gn",134:"ay",135:"tt",136:"ug",137:"dz",138:"jv",139:"su",140:"gl",141:"af",142:"br",143:"iu",144:"gd",145:"gv",146:"ga",147:"to",148:"el-polyton",149:"kl",150:"az",151:"nn"},la={0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:5,11:1,12:4,13:0,14:6,15:0,16:0,17:0,18:0,19:2,20:4,21:9,22:21,23:3,24:29,25:29,26:29,27:29,28:29,29:0,30:0,31:4,32:7,33:25,34:0,35:0,36:0,37:0,38:29,39:29,40:0,41:5,42:7,43:7,44:7,45:7,46:7,47:7,48:7,49:7,50:4,51:24,52:23,53:7,54:7,55:7,56:7,57:27,58:7,59:4,60:4,61:4,62:4,63:26,64:9,65:9,66:9,67:13,68:13,69:11,70:10,71:12,72:17,73:16,74:14,75:15,76:18,77:19,78:20,79:22,80:30,81:0,82:0,83:0,84:4,85:28,86:28,87:28,88:0,89:0,90:0,91:0,92:0,93:0,94:0,128:0,129:0,130:0,131:0,132:0,133:0,134:0,135:7,136:4,137:26,138:0,139:0,140:0,141:0,142:0,143:28,144:0,145:0,146:0,147:0,148:6,149:0,150:0,151:0},Gr={1078:"af",1052:"sq",1156:"gsw",1118:"am",5121:"ar-DZ",15361:"ar-BH",3073:"ar",2049:"ar-IQ",11265:"ar-JO",13313:"ar-KW",12289:"ar-LB",4097:"ar-LY",6145:"ary",8193:"ar-OM",16385:"ar-QA",1025:"ar-SA",10241:"ar-SY",7169:"aeb",14337:"ar-AE",9217:"ar-YE",1067:"hy",1101:"as",2092:"az-Cyrl",1068:"az",1133:"ba",1069:"eu",1059:"be",2117:"bn",1093:"bn-IN",8218:"bs-Cyrl",5146:"bs",1150:"br",1026:"bg",1027:"ca",3076:"zh-HK",5124:"zh-MO",2052:"zh",4100:"zh-SG",1028:"zh-TW",1155:"co",1050:"hr",4122:"hr-BA",1029:"cs",1030:"da",1164:"prs",1125:"dv",2067:"nl-BE",1043:"nl",3081:"en-AU",10249:"en-BZ",4105:"en-CA",9225:"en-029",16393:"en-IN",6153:"en-IE",8201:"en-JM",17417:"en-MY",5129:"en-NZ",13321:"en-PH",18441:"en-SG",7177:"en-ZA",11273:"en-TT",2057:"en-GB",1033:"en",12297:"en-ZW",1061:"et",1080:"fo",1124:"fil",1035:"fi",2060:"fr-BE",3084:"fr-CA",1036:"fr",5132:"fr-LU",6156:"fr-MC",4108:"fr-CH",1122:"fy",1110:"gl",1079:"ka",3079:"de-AT",1031:"de",5127:"de-LI",4103:"de-LU",2055:"de-CH",1032:"el",1135:"kl",1095:"gu",1128:"ha",1037:"he",1081:"hi",1038:"hu",1039:"is",1136:"ig",1057:"id",1117:"iu",2141:"iu-Latn",2108:"ga",1076:"xh",1077:"zu",1040:"it",2064:"it-CH",1041:"ja",1099:"kn",1087:"kk",1107:"km",1158:"quc",1159:"rw",1089:"sw",1111:"kok",1042:"ko",1088:"ky",1108:"lo",1062:"lv",1063:"lt",2094:"dsb",1134:"lb",1071:"mk",2110:"ms-BN",1086:"ms",1100:"ml",1082:"mt",1153:"mi",1146:"arn",1102:"mr",1148:"moh",1104:"mn",2128:"mn-CN",1121:"ne",1044:"nb",2068:"nn",1154:"oc",1096:"or",1123:"ps",1045:"pl",1046:"pt",2070:"pt-PT",1094:"pa",1131:"qu-BO",2155:"qu-EC",3179:"qu",1048:"ro",1047:"rm",1049:"ru",9275:"smn",4155:"smj-NO",5179:"smj",3131:"se-FI",1083:"se",2107:"se-SE",8251:"sms",6203:"sma-NO",7227:"sms",1103:"sa",7194:"sr-Cyrl-BA",3098:"sr",6170:"sr-Latn-BA",2074:"sr-Latn",1132:"nso",1074:"tn",1115:"si",1051:"sk",1060:"sl",11274:"es-AR",16394:"es-BO",13322:"es-CL",9226:"es-CO",5130:"es-CR",7178:"es-DO",12298:"es-EC",17418:"es-SV",4106:"es-GT",18442:"es-HN",2058:"es-MX",19466:"es-NI",6154:"es-PA",15370:"es-PY",10250:"es-PE",20490:"es-PR",3082:"es",1034:"es",21514:"es-US",14346:"es-UY",8202:"es-VE",2077:"sv-FI",1053:"sv",1114:"syr",1064:"tg",2143:"tzm",1097:"ta",1092:"tt",1098:"te",1054:"th",1105:"bo",1055:"tr",1090:"tk",1152:"ug",1058:"uk",1070:"hsb",1056:"ur",2115:"uz-Cyrl",1091:"uz",1066:"vi",1106:"cy",1160:"wo",1157:"sah",1144:"ii",1130:"yo"};function ua(e,t,n){switch(e){case 0:if(t===65535)return"und";if(n)return n[t];break;case 1:return _r[t];case 3:return Gr[t]}}var Rs="utf-16",ca={0:"macintosh",1:"x-mac-japanese",2:"x-mac-chinesetrad",3:"x-mac-korean",6:"x-mac-greek",7:"x-mac-cyrillic",9:"x-mac-devanagai",10:"x-mac-gurmukhi",11:"x-mac-gujarati",12:"x-mac-oriya",13:"x-mac-bengali",14:"x-mac-tamil",15:"x-mac-telugu",16:"x-mac-kannada",17:"x-mac-malayalam",18:"x-mac-sinhalese",19:"x-mac-burmese",20:"x-mac-khmer",21:"x-mac-thai",22:"x-mac-lao",23:"x-mac-georgian",24:"x-mac-armenian",25:"x-mac-chinesesimp",26:"x-mac-tibetan",27:"x-mac-mongolian",28:"x-mac-ethiopic",29:"x-mac-ce",30:"x-mac-vietnamese",31:"x-mac-extarabic"},fa={15:"x-mac-icelandic",17:"x-mac-turkish",18:"x-mac-croatian",24:"x-mac-ce",25:"x-mac-ce",26:"x-mac-ce",27:"x-mac-ce",28:"x-mac-ce",30:"x-mac-icelandic",37:"x-mac-romanian",38:"x-mac-ce",39:"x-mac-ce",40:"x-mac-ce",143:"x-mac-inuit",146:"x-mac-gaelic"};function Ds(e,t,n){switch(e){case 0:return Rs;case 1:return fa[n]||ca[t];case 3:if(t===1||t===10)return Rs;break}}var Hr={0:"unicode",1:"macintosh",2:"reserved",3:"windows"};function pa(e){return Hr[e]}function ha(e,t,n){let s={},r=new F.Parser(e,t),o=r.parseUShort(),i=r.parseUShort(),a=r.offset+r.parseUShort();for(let l=0;l<i;l++){let c=r.parseUShort(),u=r.parseUShort(),m=r.parseUShort(),d=r.parseUShort(),x=es[d]||d,v=r.parseUShort(),S=r.parseUShort(),I=ua(c,m,n),_=Ds(c,u,m),P=pa(c);if(_!==void 0&&I!==void 0&&P!==void 0){let z;if(_===Rs?z=an.UTF16(e,a+S,v):z=an.MACSTRING(e,a+S,v,_),z){let Y=s[P];Y===void 0&&(Y=s[P]={});let re=Y[x];re===void 0&&(re=Y[x]={}),re[I]=z}}}return o===1&&r.parseUShort(),s}function ts(e){let t={};for(let n in e)t[e[n]]=parseInt(n);return t}function Vr(e,t,n,s,r,o){return new A.Record("NameRecord",[{name:"platformID",type:"USHORT",value:e},{name:"encodingID",type:"USHORT",value:t},{name:"languageID",type:"USHORT",value:n},{name:"nameID",type:"USHORT",value:s},{name:"length",type:"USHORT",value:r},{name:"offset",type:"USHORT",value:o}])}function da(e,t){let n=e.length,s=t.length-n+1;e:for(let r=0;r<s;r++)for(;r<s;r++){for(let o=0;o<n;o++)if(t[r+o]!==e[o])continue e;return r}return-1}function zr(e,t){let n=da(e,t);if(n<0){n=t.length;let s=0,r=e.length;for(;s<r;++s)t.push(e[s])}return n}function ga(e,t){let n=ts(Hr),s=ts(_r),r=ts(Gr),o=[],i=[];for(let l in e){let c,u=[],m={},d=ts(es),x=n[l];for(let v in e[l]){let S=d[v];if(S===void 0&&(S=v),c=parseInt(S),isNaN(c))throw new Error('Name table entry "'+v+'" does not exist, see nameTableNames for complete list.');m[c]=e[l][v],u.push(c)}for(let v=0;v<u.length;v++){c=u[v];let S=m[c];for(let I in S){let _=S[I];if(x===1||x===0){let P=s[I],z=la[P],Y=Ds(x,z,P),re=D.MACSTRING(_,Y);if(x===0&&(P=t.indexOf(I),P<0&&(P=t.length,t.push(I)),z=4,re=D.UTF16(_)),re!==void 0){let ie=zr(re,i);o.push(Vr(x,z,P,c,re.length,ie))}}if(x===3){let P=r[I];if(P!==void 0){let z=D.UTF16(_),Y=zr(z,i);o.push(Vr(3,1,P,c,z.length,Y))}}}}}o.sort(function(l,c){return l.platformID-c.platformID||l.encodingID-c.encodingID||l.languageID-c.languageID||l.nameID-c.nameID});let a=new A.Table("name",[{name:"format",type:"USHORT",value:0},{name:"count",type:"USHORT",value:o.length},{name:"stringOffset",type:"USHORT",value:6+o.length*12}]);for(let l=0;l<o.length;l++)a.fields.push({name:"record_"+l,type:"RECORD",value:o[l]});return a.fields.push({name:"strings",type:"LITERAL",value:i}),a}function ns(e,t,n=[]){if(t<256&&t in es){if(n.length&&!n.includes(parseInt(t)))return;t=es[t]}for(let s in e)for(let r in e[s])if(r===t||parseInt(r)===t)return e[s][r]}var jr={parse:ha,make:ga,getNameByID:ns};function ma(e,t,n,s){e.length=t.parseUShort(),e.language=t.parseUShort()-1;let r=t.parseByteList(e.length),o=Object.assign({},r),i=Ds(n,s,e.language),a=jn[i];for(let l=0;l<a.length;l++)o[a.charCodeAt(l)]=r[128+l];e.glyphIndexMap=o}function ya(e,t,n){t.parseUShort(),e.length=t.parseULong(),e.language=t.parseULong();let s;e.groupCount=s=t.parseULong(),e.glyphIndexMap={};for(let r=0;r<s;r+=1){let o=t.parseULong(),i=t.parseULong(),a=t.parseULong();for(let l=o;l<=i;l+=1)e.glyphIndexMap[l]=a,n===12&&a++}}function ba(e,t,n,s,r){e.length=t.parseUShort(),e.language=t.parseUShort();let o;e.segCount=o=t.parseUShort()>>1,t.skip("uShort",3),e.glyphIndexMap={};let i=new F.Parser(n,s+r+14),a=new F.Parser(n,s+r+16+o*2),l=new F.Parser(n,s+r+16+o*4),c=new F.Parser(n,s+r+16+o*6),u=s+r+16+o*8;for(let m=0;m<o-1;m+=1){let d,x=i.parseUShort(),v=a.parseUShort(),S=l.parseShort(),I=c.parseUShort();for(let _=v;_<=x;_+=1)I!==0?(u=c.offset+c.relativeOffset-2,u+=I,u+=(_-v)*2,d=F.getUShort(n,u),d!==0&&(d=d+S&65535)):d=_+S&65535,e.glyphIndexMap[_]=d}}function va(e,t){let n={};t.skip("uLong");let s=t.parseULong();for(let r=0;r<s;r+=1){let o=t.parseUInt24(),i={varSelector:o},a=t.parseOffset32(),l=t.parseOffset32(),c=t.relativeOffset;a&&(t.relativeOffset=a,i.defaultUVS=t.parseStruct({ranges:function(){return t.parseRecordList32({startUnicodeValue:t.parseUInt24,additionalCount:t.parseByte})}})),l&&(t.relativeOffset=l,i.nonDefaultUVS=t.parseStruct({uvsMappings:function(){let u={},m=t.parseRecordList32({unicodeValue:t.parseUInt24,glyphID:t.parseUShort});for(let d=0;d<m.length;d+=1)u[m[d].unicodeValue]=m[d];return u}})),n[o]=i,t.relativeOffset=c}e.varSelectorList=n}function xa(e,t){let n={};n.version=F.getUShort(e,t),B.argument(n.version===0,"cmap table version should be 0."),n.numTables=F.getUShort(e,t+2);let s=null,r=-1,o=-1,i=null,a=null,l=[0,1,2,3,4,6],c=[0,1,10];for(let m=n.numTables-1;m>=0;m-=1)if(i=F.getUShort(e,t+4+m*8),a=F.getUShort(e,t+4+m*8+2),i===3&&c.includes(a)||i===0&&l.includes(a)||i===1&&a===0){if(o>0)continue;if(o=F.getULong(e,t+4+m*8+4),s)break}else if(i===0&&a===5){if(r=F.getULong(e,t+4+m*8+4),s=new F.Parser(e,t+r),s.parseUShort()!==14)r=-1,s=null;else if(o>0)break}if(o===-1)throw new Error("No valid cmap sub-tables found.");let u=new F.Parser(e,t+o);if(n.format=u.parseUShort(),n.format===0)ma(n,u,i,a);else if(n.format===12||n.format===13)ya(n,u,n.format);else if(n.format===4)ba(n,u,e,t,o);else throw new Error("Only format 0 (platformId 1, encodingId 0), 4, 12 and 14 cmap tables are supported (found format "+n.format+", platformId "+i+", encodingId "+a+").");return s&&va(n,s),n}function Sa(e,t,n){e.segments.push({end:t,start:t,delta:-(t-n),offset:0,glyphIndex:n})}function ka(e){e.segments.push({end:65535,start:65535,delta:1,offset:0})}function Ta(e){if(e.length===0)return e;let t=[e[0]];for(let n=1;n<e.length;n++){let s=t[t.length-1],r=e[n];s.end+1===r.start&&s.delta===r.delta&&r.end!==65535?s.end=r.end:t.push(r)}return t}function Ca(e){let t=!0,n;for(n=e.length-1;n>0;n-=1)if(e.get(n).unicode>65535){t=!1;break}let s=[{name:"version",type:"USHORT",value:0},{name:"numTables",type:"USHORT",value:t?1:2},{name:"platformID",type:"USHORT",value:3},{name:"encodingID",type:"USHORT",value:1},{name:"offset",type:"ULONG",value:t?12:20}];t||s.push({name:"cmap12PlatformID",type:"USHORT",value:3},{name:"cmap12EncodingID",type:"USHORT",value:10},{name:"cmap12Offset",type:"ULONG",value:0}),s.push({name:"format",type:"USHORT",value:4},{name:"cmap4Length",type:"USHORT",value:0},{name:"language",type:"USHORT",value:0},{name:"segCountX2",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0});let r=new A.Table("cmap",s);for(r.segments=[],n=0;n<e.length;n+=1){let x=e.get(n);for(let v=0;v<x.unicodes.length;v+=1)Sa(r,x.unicodes[v],n)}r.segments.sort(function(x,v){return x.start-v.start}),r.segments=Ta(r.segments),ka(r);let o=r.segments.length,i=0,a=[],l=[],c=[],u=[],m=[],d=[];for(n=0;n<o;n+=1){let x=r.segments[n];x.end<=65535&&x.start<=65535?(a.push({name:"end_"+n,type:"USHORT",value:x.end}),l.push({name:"start_"+n,type:"USHORT",value:x.start}),c.push({name:"idDelta_"+n,type:"SHORT",value:x.delta}),u.push({name:"idRangeOffset_"+n,type:"USHORT",value:x.offset}),x.glyphId!==void 0&&m.push({name:"glyph_"+n,type:"USHORT",value:x.glyphId})):i+=1,!t&&x.glyphIndex!==void 0&&(d.push({name:"cmap12Start_"+n,type:"ULONG",value:x.start}),d.push({name:"cmap12End_"+n,type:"ULONG",value:x.end}),d.push({name:"cmap12Glyph_"+n,type:"ULONG",value:x.glyphIndex}))}r.segCountX2=(o-i)*2,r.searchRange=Math.pow(2,Math.floor(Math.log(o-i)/Math.log(2)))*2,r.entrySelector=Math.log(r.searchRange/2)/Math.log(2),r.rangeShift=r.segCountX2-r.searchRange;for(let x=0;x<a.length;x++)r.fields.push(a[x]);r.fields.push({name:"reservedPad",type:"USHORT",value:0});for(let x=0;x<l.length;x++)r.fields.push(l[x]);for(let x=0;x<c.length;x++)r.fields.push(c[x]);for(let x=0;x<u.length;x++)r.fields.push(u[x]);for(let x=0;x<m.length;x++)r.fields.push(m[x]);if(r.cmap4Length=14+a.length*2+2+l.length*2+c.length*2+u.length*2+m.length*2,!t){let x=16+d.length*4;r.cmap12Offset=20+r.cmap4Length,r.fields.push({name:"cmap12Format",type:"USHORT",value:12},{name:"cmap12Reserved",type:"USHORT",value:0},{name:"cmap12Length",type:"ULONG",value:x},{name:"cmap12Language",type:"ULONG",value:0},{name:"cmap12nGroups",type:"ULONG",value:d.length/3});for(let v=0;v<d.length;v++)r.fields.push(d[v])}return r}var Wr={parse:xa,make:Ca},ss=[".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"],Oa=[".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"],Ia=[".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"],wa=[".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"],Fs=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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"],Ea=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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"],qt=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","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","grave","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","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];function qr(e){this.font=e}qr.prototype.charToGlyphIndex=function(e){let t=e.codePointAt(0),n=this.font.glyphs;if(n)for(let s=0;s<n.length;s+=1){let r=n.get(s);for(let o=0;o<r.unicodes.length;o+=1)if(r.unicodes[o]===t)return s}return null};function $r(e){this.cmap=e}$r.prototype.charToGlyphIndex=function(e){return this.cmap.glyphIndexMap[e.codePointAt(0)]||0};function Xr(e,t){this.encoding=e,this.charset=t}Xr.prototype.charToGlyphIndex=function(e){let t=e.codePointAt(0),n=this.encoding[t];return this.charset.indexOf(n)};function Us(e){switch(e.version){case 1:this.names=qt.slice();break;case 2:this.names=new Array(e.numberOfGlyphs);for(let t=0;t<e.numberOfGlyphs;t++)e.glyphNameIndex[t]<qt.length?this.names[t]=qt[e.glyphNameIndex[t]]:this.names[t]=e.names[e.glyphNameIndex[t]-qt.length];break;case 2.5:this.names=new Array(e.numberOfGlyphs);for(let t=0;t<e.numberOfGlyphs;t++)this.names[t]=qt[t+e.glyphNameIndex[t]];break;case 3:this.names=[];break;default:this.names=[];break}}Us.prototype.nameToGlyphIndex=function(e){return this.names.indexOf(e)},Us.prototype.glyphIndexToName=function(e){return this.names[e]};function La(e){let t,n=e.tables.cmap.glyphIndexMap,s=Object.keys(n);for(let r=0;r<s.length;r+=1){let o=s[r],i=n[o];t=e.glyphs.get(i),t.addUnicode(parseInt(o))}for(let r=0;r<e.glyphs.length;r+=1)t=e.glyphs.get(r),e.cffEncoding?t.name=e.cffEncoding.charset[r]:e.glyphNames.names&&(t.name=e.glyphNames.glyphIndexToName(r))}function Aa(e){e._IndexToUnicodeMap={};let t=e.tables.cmap.glyphIndexMap,n=Object.keys(t);for(let s=0;s<n.length;s+=1){let r=n[s],o=t[r];e._IndexToUnicodeMap[o]===void 0?e._IndexToUnicodeMap[o]={unicodes:[parseInt(r)]}:e._IndexToUnicodeMap[o].unicodes.push(parseInt(r))}}function Ra(e,t){t.lowMemory?Aa(e):La(e)}function Da(e,t,n,s,r){e.beginPath(),e.moveTo(t,n),e.lineTo(s,r),e.stroke()}var $t={line:Da};function Fa(e,t){let n=new C(e,t),s=n.parseShort();s!==0&&console.warn("Only CPALv0 is currently fully supported.");let r=n.parseShort(),o=n.parseShort(),i=n.parseShort(),a=n.parseOffset32(),l=n.parseUShortList(o);n.relativeOffset=a;let c=n.parseULongList(i);return n.relativeOffset=a,{version:s,numPaletteEntries:r,colorRecords:c,colorRecordIndices:l}}function Ua({version:e=0,numPaletteEntries:t=0,colorRecords:n=[],colorRecordIndices:s=[0]}){return B.argument(e===0,"Only CPALv0 are supported."),B.argument(n.length,"No colorRecords given."),B.argument(s.length,"No colorRecordIndices given."),s.length>1&&B.argument(t,"Can't infer numPaletteEntries on multiple colorRecordIndices"),new A.Table("CPAL",[{name:"version",type:"USHORT",value:e},{name:"numPaletteEntries",type:"USHORT",value:t||n.length},{name:"numPalettes",type:"USHORT",value:s.length},{name:"numColorRecords",type:"USHORT",value:n.length},{name:"colorRecordsArrayOffset",type:"ULONG",value:12+2*s.length},...s.map((r,o)=>({name:"colorRecordIndices_"+o,type:"USHORT",value:r})),...n.map((r,o)=>({name:"colorRecords_"+o,type:"ULONG",value:r}))])}function Yr(e){var t=(e&4278190080)>>24,n=(e&16711680)>>16,s=(e&65280)>>8,r=e&255;return t=t+256&255,n=n+256&255,s=s+256&255,r=(r+256&255)/255,{b:t,g:n,r:s,a:r}}function Ms(e,t,n=0,s="hexa"){if(t==65535)return"currentColor";let r=e&&e.tables&&e.tables.cpal;if(!r)return"currentColor";if(n>r.colorRecordIndices.length-1)throw new Error(`Palette index out of range (colorRecordIndices.length: ${r.colorRecordIndices.length}, index: ${t})`);if(t>r.numPaletteEntries)throw new Error(`Color index out of range (numPaletteEntries: ${r.numPaletteEntries}, index: ${t})`);let o=r.colorRecordIndices[n]+t;if(o>r.colorRecords)throw new Error(`Color index out of range (colorRecords.length: ${r.colorRecords.length}, lookupIndex: ${o})`);let i=Yr(r.colorRecords[o]);return s==="bgra"?i:cn(i,s)}function nt(e){return("0"+parseInt(e).toString(16)).slice(-2)}function Ma(e){let t=e.r/255,n=e.g/255,s=e.b/255,r=Math.max(t,n,s),o=Math.min(t,n,s),i,a,l=(r+o)/2;if(r===o)i=a=0;else{let c=r-o;switch(a=l>.5?c/(2-r-o):c/(r+o),r){case t:i=(n-s)/c+(n<s?6:0);break;case n:i=(s-t)/c+2;break;case s:i=(t-n)/c+4;break}i/=6}return{h:i*360,s:a*100,l:l*100}}function Pa(e){let{h:t,s:n,l:s,a:r}=e;t=t%360,n/=100,s/=100;let o=(1-Math.abs(2*s-1))*n,i=o*(1-Math.abs(t/60%2-1)),a=s-o/2,l=0,c=0,u=0;return 0<=t&&t<60?(l=o,c=i,u=0):60<=t&&t<120?(l=i,c=o,u=0):120<=t&&t<180?(l=0,c=o,u=i):180<=t&&t<240?(l=0,c=i,u=o):240<=t&&t<300?(l=i,c=0,u=o):300<=t&&t<=360&&(l=o,c=0,u=i),{r:Math.round((l+a)*255),g:Math.round((c+a)*255),b:Math.round((u+a)*255),a:r}}function Zr(e){return parseInt(`0x${nt(e.b)}${nt(e.g)}${nt(e.r)}${nt(e.a*255)}`,16)}function rs(e,t="hexa"){let n=t=="raw"||t=="cpal",s=Number.isInteger(e),r=!0;if(s&&n||e==="currentColor")return e;if(typeof e=="object"){if(t=="bgra")return e;if(n)return Zr(e)}else if(!s&&/^#([a-f0-9]{3}|[a-f0-9]{4}|[a-f0-9]{6}|[a-f0-9]{8})$/i.test(e.trim())){switch(e=e.trim().substring(1),e.length){case 3:e={r:parseInt(e[0].repeat(2),16),g:parseInt(e[1].repeat(2),16),b:parseInt(e[2].repeat(2),16),a:1};break;case 4:e={r:parseInt(e[0].repeat(2),16),g:parseInt(e[1].repeat(2),16),b:parseInt(e[2].repeat(2),16),a:parseInt(e[3].repeat(2),16)/255};break;case 6:e={r:parseInt(e[0]+e[1],16),g:parseInt(e[2]+e[3],16),b:parseInt(e[4]+e[5],16),a:1};break;case 8:e={r:parseInt(e[0]+e[1],16),g:parseInt(e[2]+e[3],16),b:parseInt(e[4]+e[5],16),a:parseInt(e[6]+e[7],16)/255};break}if(t=="bgra")return e}else if(typeof document<"u"&&/^[a-z]+$/i.test(e)){let o=document.createElement("canvas").getContext("2d");o.fillStyle=e;let i=cn(o.fillStyle,"hexa");i==="#000000ff"&&e.toLowerCase()!=="black"?r=!1:e=i}else{e=e.trim();let o=/rgba?\(\s*(?:(\d*\.\d+)(%?)|(\d+)(%?))\s*(?:,|\s*)\s*(?:(\d*\.\d+)(%?)|(\d+)(%?))\s*(?:,|\s*)\s*(?:(\d*\.\d+)(%?)|(\d+)(%?))\s*(?:(?:,|\s|\/)\s*(?:(0*(?:\.\d+)?()|0*1(?:\.0+)?())|(?:\.\d+)|(\d+)(%)|(\d*\.\d+)(%)))?\s*\)/;if(o.test(e)){let i=e.match(o).filter(a=>typeof a<"u");e={r:Math.round(parseFloat(i[1])/(i[2]?.39215686274509803:1)),g:Math.round(parseFloat(i[3])/(i[4]?.39215686274509803:1)),b:Math.round(parseFloat(i[5])/(i[6]?.39215686274509803:1)),a:i[7]?parseFloat(i[7])/(i[8]?100:1):1}}else{let i=/hsla?\(\s*(?:(\d*\.\d+|\d+)(deg|turn|))\s*(?:,|\s*)\s*(?:(\d*\.\d+)%?|(\d+)%?)\s*(?:,|\s*)\s*(?:(\d*\.\d+)%?|(\d+)%?)\s*(?:(?:,|\s|\/)\s*(?:(0*(?:\.\d+)?()|0*1(?:\.0+)?())|(?:\.\d+)|(\d+)(%)|(\d*\.\d+)(%)))?\s*\)/;if(i.test(e)){let a=e.match(i).filter(l=>typeof l<"u");e=Pa({h:parseFloat(a[1])*(a[2]==="turn"?360:1),s:parseFloat(a[3]),l:parseFloat(a[4]),a:a[5]?parseFloat(a[5])/(a[6]?100:1):1})}else r=!1}}if(!r)throw new Error(`Invalid color format: ${e}`);return cn(e,t)}function cn(e,t="hexa"){if(e==="currentColor")return e;if(Number.isInteger(e)){if(t=="raw"||t=="cpal")return e;e=Yr(e)}else typeof e!="object"&&(e=rs(e,"bgra"));let n=["hsl","hsla"].includes(t)?Ma(e):null;switch(t){case"rgba":return`rgba(${e.r}, ${e.g}, ${e.b}, ${parseFloat(e.a.toFixed(3))})`;case"rgb":return`rgb(${e.r}, ${e.g}, ${e.b})`;case"hex":case"hex6":case"hex-6":return`#${nt(e.r)}${nt(e.g)}${nt(e.b)}`;case"hexa":case"hex8":case"hex-8":return`#${nt(e.r)}${nt(e.g)}${nt(e.b)}${nt(e.a*255)}`;case"hsl":return`hsl(${n.h.toFixed(2)}, ${n.s.toFixed(2)}%, ${n.l.toFixed(2)}%)`;case"hsla":return`hsla(${n.h.toFixed(2)}, ${n.s.toFixed(2)}%, ${n.l.toFixed(2)}%, ${parseFloat(e.a.toFixed(3))})`;case"bgra":return e;case"raw":case"cpal":return Zr(e);default:throw new Error("Unknown color format: "+t)}}var Kr={parse:Fa,make:Ua,getPaletteColor:Ms,parseColor:rs,formatColor:cn};function Na(e,t){let n=t||new Wt;return{configurable:!0,get:function(){return typeof n=="function"&&(n=n()),n},set:function(s){n=s}}}function we(e){this.bindConstructorValues(e)}we.prototype.bindConstructorValues=function(e){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,this.unicode=e.unicode,this.unicodes=e.unicodes||(e.unicode!==void 0?[e.unicode]:[]),"xMin"in e&&(this.xMin=e.xMin),"yMin"in e&&(this.yMin=e.yMin),"xMax"in e&&(this.xMax=e.xMax),"yMax"in e&&(this.yMax=e.yMax),"advanceWidth"in e&&(this.advanceWidth=e.advanceWidth),"leftSideBearing"in e&&(this.leftSideBearing=e.leftSideBearing),"points"in e&&(this.points=e.points),Object.defineProperty(this,"path",Na(this,e.path))},we.prototype.addUnicode=function(e){this.unicodes.length===0&&(this.unicode=e),this.unicodes.push(e)},we.prototype.getBoundingBox=function(){return this.path.getBoundingBox()},we.prototype.getPath=function(e,t,n,s,r){e=e!==void 0?e:0,t=t!==void 0?t:0,n=n!==void 0?n:72,s=Object.assign({},r&&r.defaultRenderOptions,s);let o,i,a=s.xScale,l=s.yScale,c=1/(this.path.unitsPerEm||1e3)*n,u=this;r&&r.variation&&(u=r.variation.getTransform(this,s.variation),o=u.path.commands),s.hinting&&r&&r.hinting&&(i=u.path&&r.hinting.exec(u,n,s)),i?(o=r.hinting.getCommands(i),e=Math.round(e),t=Math.round(t),a=l=1):(o=u.path.commands,a===void 0&&(a=c),l===void 0&&(l=c));let m=new Wt;if(s.drawSVG){let d=this.getSvgImage(r);if(d){let x=new Wt;return x._image={image:d.image,x:e+d.leftSideBearing*c,y:t-d.baseline*c,width:d.image.width*c,height:d.image.height*c},m._layers=[x],m}}if(s.drawLayers){let d=this.getLayers(r);if(d&&d.length){m._layers=[];for(let x=0;x<d.length;x+=1){let v=d[x],S=Ms(r,v.paletteIndex,s.usePalette);S==="currentColor"?S=s.fill||"black":S=cn(S,s.colorFormat||"rgba"),s=Object.assign({},s,{fill:S}),m._layers.push(this.getPath.call(v.glyph,e,t,n,s,r))}return m}}m.fill=s.fill||this.path.fill,m.stroke=this.path.stroke,m.strokeWidth=this.path.strokeWidth*c;for(let d=0;d<o.length;d+=1){let x=o[d];x.type==="M"?m.moveTo(e+x.x*a,t+-x.y*l):x.type==="L"?m.lineTo(e+x.x*a,t+-x.y*l):x.type==="Q"?m.quadraticCurveTo(e+x.x1*a,t+-x.y1*l,e+x.x*a,t+-x.y*l):x.type==="C"?m.curveTo(e+x.x1*a,t+-x.y1*l,e+x.x2*a,t+-x.y2*l,e+x.x*a,t+-x.y*l):x.type==="Z"&&m.stroke&&m.strokeWidth&&m.closePath()}return m},we.prototype.getLayers=function(e){if(!e)throw new Error("The font object is required to read the colr/cpal tables in order to get the layers.");return e.layers.get(this.index)},we.prototype.getSvgImage=function(e){if(!e)throw new Error("The font object is required to read the svg table in order to get the image.");return e.svgImages.get(this.index)},we.prototype.getContours=function(e=null){if(this.points===void 0&&!e)return[];let t=[],n=[],s=e||this.points;for(let r=0;r<s.length;r+=1){let o=s[r];n.push(o),o.lastPointOfContour&&(t.push(n),n=[])}return B.argument(n.length===0,"There are still points left in the current contour."),t},we.prototype.getMetrics=function(){let e=this.path.commands,t=[],n=[];for(let r=0;r<e.length;r+=1){let o=e[r];o.type!=="Z"&&(t.push(o.x),n.push(o.y)),(o.type==="Q"||o.type==="C")&&(t.push(o.x1),n.push(o.y1)),o.type==="C"&&(t.push(o.x2),n.push(o.y2))}let s={xMin:Math.min.apply(null,t),yMin:Math.min.apply(null,n),xMax:Math.max.apply(null,t),yMax:Math.max.apply(null,n),leftSideBearing:this.leftSideBearing};return isFinite(s.xMin)||(s.xMin=0),isFinite(s.xMax)||(s.xMax=this.advanceWidth),isFinite(s.yMin)||(s.yMin=0),isFinite(s.yMax)||(s.yMax=0),s.rightSideBearing=this.advanceWidth-s.leftSideBearing-(s.xMax-s.xMin),s},we.prototype.draw=function(e,t,n,s,r,o){r=Object.assign({},o&&o.defaultRenderOptions,r),this.getPath(t,n,s,r,o).draw(e)},we.prototype.drawPoints=function(e,t,n,s,r,o){if(r=Object.assign({},o&&o.defaultRenderOptions,r),r.drawLayers){let d=this.getLayers(o);if(d&&d.length){for(let x=0;x<d.length;x+=1)d[x].glyph.index!==this.index&&this.drawPoints.call(d[x].glyph,e,t,n,s);return}}function i(d,x,v,S){e.beginPath();for(let I=0;I<d.length;I+=1)e.moveTo(x+d[I].x*S,v+d[I].y*S),e.arc(x+d[I].x*S,v+d[I].y*S,2,0,Math.PI*2,!1);e.fill()}t=t!==void 0?t:0,n=n!==void 0?n:0,s=s!==void 0?s:24;let a=1/this.path.unitsPerEm*s,l=[],c=[],m=this.path.commands;o&&o.variation&&(m=o.variation.getTransform(this,r.variation).path.commands);for(let d=0;d<m.length;d+=1){let x=m[d];x.x!==void 0&&l.push({x:x.x,y:-x.y}),x.x1!==void 0&&c.push({x:x.x1,y:-x.y1}),x.x2!==void 0&&c.push({x:x.x2,y:-x.y2})}e.fillStyle="blue",i(l,t,n,a),e.fillStyle="red",i(c,t,n,a)},we.prototype.drawMetrics=function(e,t,n,s){let r;t=t!==void 0?t:0,n=n!==void 0?n:0,s=s!==void 0?s:24,r=1/this.path.unitsPerEm*s,e.lineWidth=1,e.strokeStyle="black",$t.line(e,t,-1e4,t,1e4),$t.line(e,-1e4,n,1e4,n);let o=this.xMin||0,i=this.yMin||0,a=this.xMax||0,l=this.yMax||0,c=this.advanceWidth||0;e.strokeStyle="blue",$t.line(e,t+o*r,-1e4,t+o*r,1e4),$t.line(e,t+a*r,-1e4,t+a*r,1e4),$t.line(e,-1e4,n+-i*r,1e4,n+-i*r),$t.line(e,-1e4,n+-l*r,1e4,n+-l*r),e.strokeStyle="green",$t.line(e,t+c*r,-1e4,t+c*r,1e4)},we.prototype.toPathData=function(e,t){e=Object.assign({},{variation:t&&t.defaultRenderOptions.variation},e);let n=this;t&&t.variation&&(n=t.variation.getTransform(this,e.variation));let s=n.points&&e.pointsTransform?e.pointsTransform(n.points):n.path;return e.pathTransform&&(s=e.pathTransform(s)),s.toPathData(e)},we.prototype.fromSVG=function(e,t={}){return this.path.fromSVG(e,t)},we.prototype.toSVG=function(e,t){let n=this.toPathData.apply(this,[e,t]);return this.path.toSVG(e,n)},we.prototype.toDOMElement=function(e,t){e=Object.assign({},{variation:t&&t.defaultRenderOptions.variation},e);let n=this.path;return t&&t.variation&&(n=t.variation.getTransform(this,e.variation).path),n.toDOMElement(e)};var fn=we;function pn(e,t,n){Object.defineProperty(e,t,{get:function(){return typeof e[n]>"u"&&e.path,e[n]},set:function(s){e[n]=s},enumerable:!0,configurable:!0})}function os(e,t){if(this.font=e,this.glyphs={},Array.isArray(t))for(let n=0;n<t.length;n++){let s=t[n];s.path.unitsPerEm=e.unitsPerEm,this.glyphs[n]=s}this.length=t&&t.length||0}typeof Symbol<"u"&&Symbol.iterator&&(os.prototype[Symbol.iterator]=function(){let e=-1;return{next:function(){e++;let t=e>=this.length-1;return{value:this.get(e),done:t}}.bind(this)}}),os.prototype.get=function(e){if(this.font._push&&this.glyphs[e]===void 0){this.font._push(e),typeof this.glyphs[e]=="function"&&(this.glyphs[e]=this.glyphs[e]());let t=this.glyphs[e],n=this.font._IndexToUnicodeMap[e];if(n)for(let s=0;s<n.unicodes.length;s++)t.addUnicode(n.unicodes[s]);this.font.cffEncoding?t.name=this.font.cffEncoding.charset[e]:this.font.glyphNames.names&&(t.name=this.font.glyphNames.glyphIndexToName(e)),this.glyphs[e].advanceWidth=this.font._hmtxTableData[e].advanceWidth,this.glyphs[e].leftSideBearing=this.font._hmtxTableData[e].leftSideBearing}else typeof this.glyphs[e]=="function"&&(this.glyphs[e]=this.glyphs[e]());return this.glyphs[e]},os.prototype.push=function(e,t){this.glyphs[e]=t,this.length++};function Ba(e,t){return new fn({index:t,font:e})}function _a(e,t,n,s,r,o){return function(){let i=new fn({index:t,font:e});return i.path=function(){n(i,s,r);let a=o(e.glyphs,i);return a.unitsPerEm=e.unitsPerEm,a},pn(i,"numberOfContours","_numberOfContours"),pn(i,"xMin","_xMin"),pn(i,"xMax","_xMax"),pn(i,"yMin","_yMin"),pn(i,"yMax","_yMax"),pn(i,"points","_points"),i}}function Ga(e,t,n,s,r){return function(){let o=new fn({index:t,font:e});return o.path=function(){let i=n(e,o,s,r);return i.unitsPerEm=e.unitsPerEm,i},o}}var mt={GlyphSet:os,glyphLoader:Ba,ttfGlyphLoader:_a,cffGlyphLoader:Ga};function Qr(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(!Qr(e[n],t[n]))return!1;return!0}else return!1}var Jr=10;function is(e){let t;return e.length<1240?t=107:e.length<33900?t=1131:t=32768,t}function yt(e,t,n,s){let r=[],o=[],i=s>1?F.getULong(e,t):F.getCard16(e,t),a=s>1?4:2,l,c;if(i!==0){let u=F.getByte(e,t+a);l=t+(i+1)*u+a;let m=t+a+1;for(let d=0;d<i+1;d+=1)r.push(F.getOffset(e,m,u)),m+=u;c=l+r[i]}else c=t+a;for(let u=0;u<r.length-1;u+=1){let m=F.getBytes(e,l+r[u],l+r[u+1]);n&&(m=n(m,e,t,s)),o.push(m)}return{objects:o,startOffset:t,endOffset:c}}function Ha(e,t,n){let s=[],r=n>1?F.getULong(e,t):F.getCard16(e,t),o=n>1?4:2,i,a;if(r!==0){let l=F.getByte(e,t+o);i=t+(r+1)*l+o;let c=t+o+1;for(let u=0;u<r+1;u+=1)s.push(F.getOffset(e,c,l)),c+=l;a=i+s[r]}else a=t+o;return{offsets:s,startOffset:t,endOffset:a}}function Va(e,t,n,s,r,o){let i=o>1?F.getULong(n,s):F.getCard16(n,s),a=o>1?4:2,l=0;if(i!==0){let u=F.getByte(n,s+a);l=s+(i+1)*u+a}let c=F.getBytes(n,l+t[e],l+t[e+1]);return r&&(c=r(c)),c}function za(e){let t="",s=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"];for(;;){let r=e.parseByte(),o=r>>4,i=r&15;if(o===15||(t+=s[o],i===15))break;t+=s[i]}return parseFloat(t)}function ja(e,t){let n,s,r,o;if(t===28)return n=e.parseByte(),s=e.parseByte(),n<<8|s;if(t===29)return n=e.parseByte(),s=e.parseByte(),r=e.parseByte(),o=e.parseByte(),n<<24|s<<16|r<<8|o;if(t===30)return za(e);if(t>=32&&t<=246)return t-139;if(t>=247&&t<=250)return n=e.parseByte(),(t-247)*256+n+108;if(t>=251&&t<=254)return n=e.parseByte(),-(t-251)*256-n-108;throw new Error("Invalid b0 "+t)}function Wa(e){let t={};for(let n=0;n<e.length;n+=1){let s=e[n][0],r=e[n][1],o;if(r.length===1?o=r[0]:o=r,Object.prototype.hasOwnProperty.call(t,s)&&!isNaN(t[s]))throw new Error("Object "+t+" already has key "+s);t[s]=o}return t}function Ps(e,t,n,s){t=t!==void 0?t:0;let r=new F.Parser(e,t),o=[],i=[];n=n!==void 0?n:e.byteLength;let a=s<2?22:28;for(;r.relativeOffset<n;){let l=r.parseByte();if(l<a){if(l===12&&(l=1200+r.parseByte()),s>1&&l===23){Ja(i);continue}o.push([l,i]),i=[]}else i.push(ja(r,l,s))}return Wa(o)}function wn(e,t){return t<=390?t=ss[t]:e?t=e[t-391]:t=void 0,t}function Ns(e,t,n){let s={},r;for(let o=0;o<t.length;o+=1){let i=t[o];if(Array.isArray(i.type)){let a=[];a.length=i.type.length;for(let l=0;l<i.type.length;l++)r=e[i.op]!==void 0?e[i.op][l]:void 0,r===void 0&&(r=i.value!==void 0&&i.value[l]!==void 0?i.value[l]:null),i.type[l]==="SID"&&(r=wn(n,r)),a[l]=r;s[i.name]=a}else r=e[i.op],r===void 0&&(r=i.value!==void 0?i.value:null),i.type==="SID"&&(r=wn(n,r)),s[i.name]=r}return s}function qa(e,t){let n={};if(n.formatMajor=F.getCard8(e,t),n.formatMinor=F.getCard8(e,t+1),n.formatMajor>2)throw new Error(`Unsupported CFF table version ${n.formatMajor}.${n.formatMinor}`);return n.size=F.getCard8(e,t+2),n.formatMajor<2?(n.offsetSize=F.getCard8(e,t+3),n.startOffset=t,n.endOffset=t+4):(n.topDictLength=F.getCard16(e,t+3),n.endOffset=t+8),n}var eo=[{name:"version",op:0,type:"SID"},{name:"notice",op:1,type:"SID"},{name:"copyright",op:1200,type:"SID"},{name:"fullName",op:2,type:"SID"},{name:"familyName",op:3,type:"SID"},{name:"weight",op:4,type:"SID"},{name:"isFixedPitch",op:1201,type:"number",value:0},{name:"italicAngle",op:1202,type:"number",value:0},{name:"underlinePosition",op:1203,type:"number",value:-100},{name:"underlineThickness",op:1204,type:"number",value:50},{name:"paintType",op:1205,type:"number",value:0},{name:"charstringType",op:1206,type:"number",value:2},{name:"fontMatrix",op:1207,type:["real","real","real","real","real","real"],value:[.001,0,0,.001,0,0]},{name:"uniqueId",op:13,type:"number"},{name:"fontBBox",op:5,type:["number","number","number","number"],value:[0,0,0,0]},{name:"strokeWidth",op:1208,type:"number",value:0},{name:"xuid",op:14,type:[],value:null},{name:"charset",op:15,type:"offset",value:0},{name:"encoding",op:16,type:"offset",value:0},{name:"charStrings",op:17,type:"offset",value:0},{name:"private",op:18,type:["number","offset"],value:[0,0]},{name:"ros",op:1230,type:["SID","SID","number"]},{name:"cidFontVersion",op:1231,type:"number",value:0},{name:"cidFontRevision",op:1232,type:"number",value:0},{name:"cidFontType",op:1233,type:"number",value:0},{name:"cidCount",op:1234,type:"number",value:8720},{name:"uidBase",op:1235,type:"number"},{name:"fdArray",op:1236,type:"offset"},{name:"fdSelect",op:1237,type:"offset"},{name:"fontName",op:1238,type:"SID"}],to=[{name:"fontMatrix",op:1207,type:["real","real","real","real","real","real"],value:[.001,0,0,.001,0,0]},{name:"charStrings",op:17,type:"offset"},{name:"fdArray",op:1236,type:"offset"},{name:"fdSelect",op:1237,type:"offset"},{name:"vstore",op:24,type:"offset"}],no=[{name:"subrs",op:19,type:"offset",value:0},{name:"defaultWidthX",op:20,type:"number",value:0},{name:"nominalWidthX",op:21,type:"number",value:0}],so=[{name:"blueValues",op:6,type:"delta"},{name:"otherBlues",op:7,type:"delta"},{name:"familyBlues",op:7,type:"delta"},{name:"familyBlues",op:8,type:"delta"},{name:"familyOtherBlues",op:9,type:"delta"},{name:"blueScale",op:1209,type:"number",value:.039625},{name:"blueShift",op:1210,type:"number",value:7},{name:"blueFuzz",op:1211,type:"number",value:1},{name:"stdHW",op:10,type:"number"},{name:"stdVW",op:11,type:"number"},{name:"stemSnapH",op:1212,type:"number"},{name:"stemSnapV",op:1213,type:"number"},{name:"languageGroup",op:1217,type:"number",value:0},{name:"expansionFactor",op:1218,type:"number",value:.06},{name:"vsindex",op:22,type:"number",value:0},{name:"subrs",op:19,type:"offset"}],$a=[{name:"private",op:18,type:["number","offset"],value:[0,0]}];function Xa(e,t,n,s){let r=Ps(e,t,e.byteLength,s);return Ns(r,s>1?to:eo,n)}function Bs(e,t,n,s,r){let o=Ps(e,t,n,r);return Ns(o,r>1?so:no,s)}function Ya(e,t,n){let s=Ps(e,t,void 0,n);return Ns(s,$a)}function Za(e,t,n){let s=[];for(let r=0;r<n.length;r++){let o=new DataView(new Uint8Array(n[r]).buffer),i=Ya(o,0,2),a=i.private[0],l=i.private[1];if(a!==0&&l!==0){let c=Bs(e,l+t,a,[],2);if(c.subrs){let u=l+c.subrs,m=yt(e,u+t,void 0,2);i._subrs=m.objects,i._subrsBias=is(i._subrs)}i._privateDict=c}s.push(i)}return s}function _s(e,t,n,s,r){let o=[];for(let i=0;i<n.length;i+=1){let a=new DataView(new Uint8Array(n[i]).buffer),l=Xa(a,0,s,r);l._subrs=[],l._subrsBias=0,l._defaultWidthX=0,l._nominalWidthX=0;let c=r<2?l.private[0]:0,u=r<2?l.private[1]:0;if(c!==0&&u!==0){let m=Bs(e,u+t,c,s,r);if(l._defaultWidthX=m.defaultWidthX,l._nominalWidthX=m.nominalWidthX,m.subrs!==0){let d=u+m.subrs,x=yt(e,d+t,void 0,r);l._subrs=x.objects,l._subrsBias=is(l._subrs)}l._privateDict=m}o.push(l)}return o}function Ka(e,t,n,s,r){let o,i,a=new F.Parser(e,t);n-=1;let l=[".notdef"],c=a.parseCard8();if(c===0)for(let u=0;u<n;u+=1)o=a.parseSID(),r?l.push(o):l.push(wn(s,o)||o);else if(c===1)for(;l.length<=n;){o=a.parseSID(),i=a.parseCard8();for(let u=0;u<=i;u+=1)r?l.push("cid"+("00000"+o).slice(-5)):l.push(wn(s,o)||o),o+=1}else if(c===2)for(;l.length<=n;){o=a.parseSID(),i=a.parseCard16();for(let u=0;u<=i;u+=1)r?l.push("cid"+("00000"+o).slice(-5)):l.push(wn(s,o)||o),o+=1}else throw new Error("Unknown charset format "+c);return l}function Qa(e,t){let n,s={},r=new F.Parser(e,t),o=r.parseCard8();if(o===0){let i=r.parseCard8();for(let a=0;a<i;a+=1)n=r.parseCard8(),s[n]=a}else if(o===1){let i=r.parseCard8();n=1;for(let a=0;a<i;a+=1){let l=r.parseCard8(),c=r.parseCard8();for(let u=l;u<=l+c;u+=1)s[u]=n,n+=1}}else throw new Error("Unknown encoding format "+o);return s}function Ja(e){let t=e.pop();for(;e.length>t;)e.pop()}function ro(e,t){let n=e.tables.cff&&e.tables.cff.topDict&&e.tables.cff.topDict.paintType||0;return n===2&&(t.fill=null,t.stroke="black",t.strokeWidth=e.tables.cff.topDict.strokeWidth||0),n}function Gs(e,t,n,s,r){let o,i,a,l,c=new Wt,u=[],m=0,d=!1,x=!1,v=0,S=0,I,_,P,z,Y=0,re=[],ie,ae=0,me=e.tables.cff2||e.tables.cff;if(P=me.topDict._defaultWidthX,z=me.topDict._nominalWidthX,r=r||e.variation&&e.variation.get(),t.getBlendPath||(t.getBlendPath=function(U){return Gs(e,t,n,s,U)}),e.isCIDFont||s>1){let U=me.topDict._fdSelect?me.topDict._fdSelect[t.index]:0,M=me.topDict._fdArray[U];I=M._subrs,_=M._subrsBias,s>1?(re=me.topDict._vstore.itemVariationStore,Y=M._privateDict.vsindex):(P=M._defaultWidthX,z=M._nominalWidthX)}else I=me.topDict._subrs,_=me.topDict._subrsBias;let ot=ro(e,c),Z=P;function Ve(U,M){x&&ot!==2&&c.closePath(),c.moveTo(U,M),x=!0}function De(){let U;U=(u.length&1)!==0,U&&!d&&(Z=u.shift()+z),m+=u.length>>1,u.length=0,d=!0}function G(U){let M,Ee,Mt,ms,Kt,it,Fe,Ke,Le,ze,Ue,Me,ge=0;for(;ge<U.length;){let Je=U[ge];switch(ge+=1,Je){case 1:De();break;case 3:De();break;case 4:u.length>1&&!d&&(Z=u.shift()+z,d=!0),S+=u.pop(),Ve(v,S);break;case 5:for(;u.length>0;)v+=u.shift(),S+=u.shift(),c.lineTo(v,S);break;case 6:for(;u.length>0&&(v+=u.shift(),c.lineTo(v,S),u.length!==0);)S+=u.shift(),c.lineTo(v,S);break;case 7:for(;u.length>0&&(S+=u.shift(),c.lineTo(v,S),u.length!==0);)v+=u.shift(),c.lineTo(v,S);break;case 8:for(;u.length>0;)o=v+u.shift(),i=S+u.shift(),a=o+u.shift(),l=i+u.shift(),v=a+u.shift(),S=l+u.shift(),c.curveTo(o,i,a,l,v,S);break;case 10:if(Kt=u.pop()+_,it=I[Kt],it){if(ae>=Jr){console.warn("CFF charstring subroutine call depth exceeded, skipping callsubr");break}ae++,G(it),ae--}break;case 11:if(s>1){console.error("CFF CharString operator return (11) is not supported in CFF2");break}return;case 12:switch(Je=U[ge],ge+=1,Je){case 35:o=v+u.shift(),i=S+u.shift(),a=o+u.shift(),l=i+u.shift(),Fe=a+u.shift(),Ke=l+u.shift(),Le=Fe+u.shift(),ze=Ke+u.shift(),Ue=Le+u.shift(),Me=ze+u.shift(),v=Ue+u.shift(),S=Me+u.shift(),u.shift(),c.curveTo(o,i,a,l,Fe,Ke),c.curveTo(Le,ze,Ue,Me,v,S);break;case 34:o=v+u.shift(),i=S,a=o+u.shift(),l=i+u.shift(),Fe=a+u.shift(),Ke=l,Le=Fe+u.shift(),ze=l,Ue=Le+u.shift(),Me=S,v=Ue+u.shift(),c.curveTo(o,i,a,l,Fe,Ke),c.curveTo(Le,ze,Ue,Me,v,S);break;case 36:o=v+u.shift(),i=S+u.shift(),a=o+u.shift(),l=i+u.shift(),Fe=a+u.shift(),Ke=l,Le=Fe+u.shift(),ze=l,Ue=Le+u.shift(),Me=ze+u.shift(),v=Ue+u.shift(),c.curveTo(o,i,a,l,Fe,Ke),c.curveTo(Le,ze,Ue,Me,v,S);break;case 37:o=v+u.shift(),i=S+u.shift(),a=o+u.shift(),l=i+u.shift(),Fe=a+u.shift(),Ke=l+u.shift(),Le=Fe+u.shift(),ze=Ke+u.shift(),Ue=Le+u.shift(),Me=ze+u.shift(),Math.abs(Ue-v)>Math.abs(Me-S)?v=Ue+u.shift():S=Me+u.shift(),c.curveTo(o,i,a,l,Fe,Ke),c.curveTo(Le,ze,Ue,Me,v,S);break;default:console.log("Glyph "+t.index+": unknown operator 1200"+Je),u.length=0}break;case 14:if(s>1){console.error("CFF CharString operator endchar (14) is not supported in CFF2");break}if(u.length>=4){let Qt=Fs[u.pop()],mn=Fs[u.pop()],ys=u.pop(),bs=u.pop();if(Qt&&mn){t.isComposite=!0,t.components=[];let xi=e.cffEncoding.charset.indexOf(Qt),Si=e.cffEncoding.charset.indexOf(mn);t.components.push({glyphIndex:Si,dx:0,dy:0}),t.components.push({glyphIndex:xi,dx:bs,dy:ys}),c.extend(e.glyphs.get(Si).path);let Np=e.glyphs.get(xi),rr=JSON.parse(JSON.stringify(Np.path.commands));for(let or=0;or<rr.length;or+=1){let vt=rr[or];vt.type!=="Z"&&(vt.x+=bs,vt.y+=ys),(vt.type==="Q"||vt.type==="C")&&(vt.x1+=bs,vt.y1+=ys),vt.type==="C"&&(vt.x2+=bs,vt.y2+=ys)}c.extend(rr)}}else u.length>0&&!d&&(Z=u.shift()+z,d=!0);x&&ot!==2&&(c.closePath(),x=!1);break;case 15:if(s<2){console.error("CFF2 CharString operator vsindex (15) is not supported in CFF");break}Y=u.pop();break;case 16:if(s<2){console.error("CFF2 CharString operator blend (16) is not supported in CFF");break}ie||(ie=e.variation&&r&&e.variation.process.getBlendVector(re,Y,r));var le=u.pop(),_e=ie?ie.length:re.itemVariationSubtables[Y].regionIndexes.length,Qe=le*_e,at=u.length-Qe,Ct=at-le;if(ie)for(let Qt=0;Qt<le;Qt++){var vi=u[Ct+Qt];for(let mn=0;mn<_e;mn++)vi+=ie[mn]*u[at++];u[Ct+Qt]=vi}for(;Qe--;)u.pop();break;case 18:De();break;case 19:case 20:De(),ge+=m+7>>3;break;case 21:u.length>2&&!d&&(Z=u.shift()+z,d=!0),S+=u.pop(),v+=u.pop(),Ve(v,S);break;case 22:u.length>1&&!d&&(Z=u.shift()+z,d=!0),v+=u.pop(),Ve(v,S);break;case 23:De();break;case 24:for(;u.length>2;)o=v+u.shift(),i=S+u.shift(),a=o+u.shift(),l=i+u.shift(),v=a+u.shift(),S=l+u.shift(),c.curveTo(o,i,a,l,v,S);v+=u.shift(),S+=u.shift(),c.lineTo(v,S);break;case 25:for(;u.length>6;)v+=u.shift(),S+=u.shift(),c.lineTo(v,S);o=v+u.shift(),i=S+u.shift(),a=o+u.shift(),l=i+u.shift(),v=a+u.shift(),S=l+u.shift(),c.curveTo(o,i,a,l,v,S);break;case 26:for(u.length&1&&(v+=u.shift());u.length>0;)o=v,i=S+u.shift(),a=o+u.shift(),l=i+u.shift(),v=a,S=l+u.shift(),c.curveTo(o,i,a,l,v,S);break;case 27:for(u.length&1&&(S+=u.shift());u.length>0;)o=v+u.shift(),i=S,a=o+u.shift(),l=i+u.shift(),v=a+u.shift(),S=l,c.curveTo(o,i,a,l,v,S);break;case 28:M=U[ge],Ee=U[ge+1],u.push((M<<24|Ee<<16)>>16),ge+=2;break;case 29:if(Kt=u.pop()+e.gsubrsBias,it=e.gsubrs[Kt],it){if(ae>=Jr){console.warn("CFF charstring subroutine call depth exceeded, skipping callgsubr");break}ae++,G(it),ae--}break;case 30:for(;u.length>0&&(o=v,i=S+u.shift(),a=o+u.shift(),l=i+u.shift(),v=a+u.shift(),S=l+(u.length===1?u.shift():0),c.curveTo(o,i,a,l,v,S),u.length!==0);)o=v+u.shift(),i=S,a=o+u.shift(),l=i+u.shift(),S=l+u.shift(),v=a+(u.length===1?u.shift():0),c.curveTo(o,i,a,l,v,S);break;case 31:for(;u.length>0&&(o=v+u.shift(),i=S,a=o+u.shift(),l=i+u.shift(),S=l+u.shift(),v=a+(u.length===1?u.shift():0),c.curveTo(o,i,a,l,v,S),u.length!==0);)o=v,i=S+u.shift(),a=o+u.shift(),l=i+u.shift(),v=a+u.shift(),S=l+(u.length===1?u.shift():0),c.curveTo(o,i,a,l,v,S);break;default:Je<32?console.log("Glyph "+t.index+": unknown operator "+Je):Je<247?u.push(Je-139):Je<251?(M=U[ge],ge+=1,u.push((Je-247)*256+M+108)):Je<255?(M=U[ge],ge+=1,u.push(-(Je-251)*256-M-108)):(M=U[ge],Ee=U[ge+1],Mt=U[ge+2],ms=U[ge+3],ge+=4,u.push((M<<24|Ee<<16|Mt<<8|ms)/65536))}}}return G(n),e.variation&&r&&(c.commands=c.commands.map(U=>{let M=Object.keys(U);for(let Ee=0;Ee<M.length;Ee++){let Mt=M[Ee];Mt!=="type"&&(U[Mt]=Math.round(U[Mt]))}return U})),d&&(t.advanceWidth=Z),c}function oo(e,t,n,s,r){let o=[],i,a=new F.Parser(e,t),l=a.parseCard8();if(l===0)for(let c=0;c<n;c++){if(i=a.parseCard8(),i>=s)throw new Error("CFF table CID Font FDSelect has bad FD index value "+i+" (FD count "+s+")");o.push(i)}else if(l===3||r>1&&l===4){let c=l===4?a.parseULong():a.parseCard16(),u=l===4?a.parseULong():a.parseCard16();if(u!==0)throw new Error(`CFF Table CID Font FDSelect format ${l} range has bad initial GID ${u}`);let m;for(let d=0;d<c;d++){if(i=l===4?a.parseUShort():a.parseCard8(),m=l===4?a.parseULong():a.parseCard16(),i>=s)throw new Error("CFF table CID Font FDSelect has bad FD index value "+i+" (FD count "+s+")");if(m>n)throw new Error(`CFF Table CID Font FDSelect format ${r} range has bad GID ${m}`);for(;u<m;u++)o.push(i);u=m}if(m!==n)throw new Error("CFF Table CID Font FDSelect format 3 range has bad final (Sentinal) GID "+m)}else throw new Error("CFF Table CID Font FDSelect table has unsupported format "+l);return o}function el(e,t,n,s){let r,o=qa(e,t);o.formatMajor===2?r=n.tables.cff2={}:r=n.tables.cff={};let i=o.formatMajor>1?null:yt(e,o.endOffset,F.bytesToString),a=o.formatMajor>1?null:yt(e,i.endOffset),l=o.formatMajor>1?null:yt(e,a.endOffset,F.bytesToString),c=yt(e,o.formatMajor>1?t+o.size+o.topDictLength:l.endOffset,void 0,o.formatMajor);n.gsubrs=c.objects,n.gsubrsBias=is(n.gsubrs);let u;if(o.formatMajor>1){let d=t+o.size,x=F.getBytes(e,d,d+o.topDictLength);u=_s(e,0,[x],void 0,o.formatMajor)[0]}else{let d=_s(e,t,a.objects,l.objects,o.formatMajor);if(d.length!==1)throw new Error("CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = "+d.length);u=d[0]}if(r.topDict=u,u._privateDict&&(n.defaultWidthX=u._privateDict.defaultWidthX,n.nominalWidthX=u._privateDict.nominalWidthX),o.formatMajor<2&&u.ros[0]!==void 0&&u.ros[1]!==void 0&&(n.isCIDFont=!0),o.formatMajor>1){let d=u.fdArray,x=u.fdSelect;if(!d)throw new Error("This is a CFF2 font, but FDArray information is missing");let v=yt(e,t+d,null,o.formatMajor),S=Za(e,t,v.objects);u._fdArray=S,x&&(u._fdSelect=oo(e,t+x,n.numGlyphs,S.length,o.formatMajor))}else if(n.isCIDFont){let d=u.fdArray,x=u.fdSelect;if(d===0||x===0)throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");d+=t;let v=yt(e,d),S=_s(e,t,v.objects,l.objects,o.formatMajor);u._fdArray=S,x+=t,u._fdSelect=oo(e,x,n.numGlyphs,S.length,o.formatMajor)}if(o.formatMajor<2){let d=t+u.private[1],x=Bs(e,d,u.private[0],l.objects,o.formatMajor);if(n.defaultWidthX=x.defaultWidthX,n.nominalWidthX=x.nominalWidthX,x.subrs!==0){let v=d+x.subrs,S=yt(e,v);n.subrs=S.objects,n.subrsBias=is(n.subrs)}else n.subrs=[],n.subrsBias=0}let m;if(s.lowMemory?(m=Ha(e,t+u.charStrings,o.formatMajor),n.nGlyphs=m.offsets.length-(o.formatMajor>1?1:0)):(m=yt(e,t+u.charStrings,null,o.formatMajor),n.nGlyphs=m.objects.length),o.formatMajor>1&&n.tables.maxp&&n.nGlyphs!==n.tables.maxp.numGlyphs&&console.error(`Glyph count in the CFF2 table (${n.nGlyphs}) must correspond to the glyph count in the maxp table (${n.tables.maxp.numGlyphs})`),o.formatMajor<2){let d=[],x=[];u.charset===0?d=Oa:u.charset===1?d=Ia:u.charset===2?d=wa:d=Ka(e,t+u.charset,n.nGlyphs,l.objects,n.isCIDFont),u.encoding===0?x=Fs:u.encoding===1?x=Ea:x=Qa(e,t+u.encoding),n.cffEncoding=new Xr(x,d),n.encoding=n.encoding||n.cffEncoding}if(n.glyphs=new mt.GlyphSet(n),s.lowMemory)n._push=function(d){let x=Va(d,m.offsets,e,t+u.charStrings,void 0,o.formatMajor);n.glyphs.push(d,mt.cffGlyphLoader(n,d,Gs,x,o.formatMajor))};else for(let d=0;d<n.nGlyphs;d+=1){let x=m.objects[d];n.glyphs.push(d,mt.cffGlyphLoader(n,d,Gs,x,o.formatMajor))}if(u.vstore){let d=new F.Parser(e,t+u.vstore);u._vstore=d.parseVariationStore()}}function io(e,t){let n,s=ss.indexOf(e);return s>=0&&(n=s),s=t.indexOf(e),s>=0?n=s+ss.length:(n=ss.length+t.length,t.push(e)),n}function tl(){return new A.Record("Header",[{name:"major",type:"Card8",value:1},{name:"minor",type:"Card8",value:0},{name:"hdrSize",type:"Card8",value:4},{name:"major",type:"Card8",value:1}])}function nl(e){let t=new A.Record("Name INDEX",[{name:"names",type:"INDEX",value:[]}]);t.names=[];for(let n=0;n<e.length;n+=1)t.names.push({name:"name_"+n,type:"NAME",value:e[n]});return t}function ao(e,t,n){let s={};for(let r=0;r<e.length;r+=1){let o=e[r],i=t[o.name];i!==void 0&&!Qr(i,o.value)&&(o.type==="SID"&&(i=io(i,n)),s[o.op]={name:o.name,type:o.type,value:i})}return s}function lo(e,t,n){let s=new A.Record("Top DICT",[{name:"dict",type:"DICT",value:{}}]);return s.dict=ao(n>1?to:eo,e,t),s}function uo(e){let t=new A.Record("Top DICT INDEX",[{name:"topDicts",type:"INDEX",value:[]}]);return t.topDicts=[{name:"topDict_0",type:"TABLE",value:e}],t}function sl(e){let t=new A.Record("String INDEX",[{name:"strings",type:"INDEX",value:[]}]);t.strings=[];for(let n=0;n<e.length;n+=1)t.strings.push({name:"string_"+n,type:"STRING",value:e[n]});return t}function rl(){return new A.Record("Global Subr INDEX",[{name:"subrs",type:"INDEX",value:[]}])}function ol(e,t){let n=new A.Record("Charsets",[{name:"format",type:"Card8",value:0}]);for(let s=0;s<e.length;s+=1){let r=e[s],o=io(r,t);n.fields.push({name:"glyph_"+s,type:"SID",value:o})}return n}function il(e,t){let n=[],s=e.path;t<2&&n.push({name:"width",type:"NUMBER",value:e.advanceWidth});let r=0,o=0;for(let i=0;i<s.commands.length;i+=1){let a,l,c=s.commands[i];if(c.type==="Q"){let u=.3333333333333333,m=2/3;c={type:"C",x:c.x,y:c.y,x1:Math.round(u*r+m*c.x1),y1:Math.round(u*o+m*c.y1),x2:Math.round(u*c.x+m*c.x1),y2:Math.round(u*c.y+m*c.y1)}}if(c.type==="M")a=Math.round(c.x-r),l=Math.round(c.y-o),n.push({name:"dx",type:"NUMBER",value:a}),n.push({name:"dy",type:"NUMBER",value:l}),n.push({name:"rmoveto",type:"OP",value:21}),r=Math.round(c.x),o=Math.round(c.y);else if(c.type==="L")a=Math.round(c.x-r),l=Math.round(c.y-o),n.push({name:"dx",type:"NUMBER",value:a}),n.push({name:"dy",type:"NUMBER",value:l}),n.push({name:"rlineto",type:"OP",value:5}),r=Math.round(c.x),o=Math.round(c.y);else if(c.type==="C"){let u=Math.round(c.x1-r),m=Math.round(c.y1-o),d=Math.round(c.x2-c.x1),x=Math.round(c.y2-c.y1);a=Math.round(c.x-c.x2),l=Math.round(c.y-c.y2),n.push({name:"dx1",type:"NUMBER",value:u}),n.push({name:"dy1",type:"NUMBER",value:m}),n.push({name:"dx2",type:"NUMBER",value:d}),n.push({name:"dy2",type:"NUMBER",value:x}),n.push({name:"dx",type:"NUMBER",value:a}),n.push({name:"dy",type:"NUMBER",value:l}),n.push({name:"rrcurveto",type:"OP",value:8}),r=Math.round(c.x),o=Math.round(c.y)}}return t<2&&n.push({name:"endchar",type:"OP",value:14}),n}function al(e,t){let n=new A.Record("CharStrings INDEX",[{name:"charStrings",type:"INDEX",value:[]}]);for(let s=0;s<e.length;s+=1){let r=e.get(s),o=il(r,t);n.charStrings.push({name:r.name,type:"CHARSTRING",value:o})}return n}function ll(e,t,n){let s=new A.Record("Private DICT",[{name:"dict",type:"DICT",value:{}}]);return s.dict=ao(n>1?so:no,e,t),s}function ul(e,t){let s=new A.Table("CFF ",[{name:"header",type:"RECORD"},{name:"nameIndex",type:"RECORD"},{name:"topDictIndex",type:"RECORD"},{name:"stringIndex",type:"RECORD"},{name:"globalSubrIndex",type:"RECORD"},{name:"charsets",type:"RECORD"},{name:"charStringsIndex",type:"RECORD"},{name:"privateDict",type:"RECORD"}]),r=1/t.unitsPerEm,o={version:t.version,fullName:t.fullName,familyName:t.familyName,weight:t.weightName,fontBBox:t.fontBBox||[0,0,0,0],fontMatrix:[r,0,0,r,0,0],charset:999,encoding:0,charStrings:999,private:[0,999]},i=t&&t.topDict||{};i.paintType&&(o.paintType=i.paintType,o.strokeWidth=i.strokeWidth||0);let a={},l=[],c;for(let x=1;x<e.length;x+=1)c=e.get(x),l.push(c.name);let u=[];s.header=tl(),s.nameIndex=nl([t.postScriptName]);let m=lo(o,u);s.topDictIndex=uo(m),s.globalSubrIndex=rl(),s.charsets=ol(l,u),s.charStringsIndex=al(e,1),s.privateDict=ll(a,u),s.stringIndex=sl(u);let d=s.header.sizeOf()+s.nameIndex.sizeOf()+s.topDictIndex.sizeOf()+s.stringIndex.sizeOf()+s.globalSubrIndex.sizeOf();return o.charset=d,o.encoding=0,o.charStrings=o.charset+s.charsets.sizeOf(),o.private[1]=o.charStrings+s.charStringsIndex.sizeOf(),m=lo(o,u),s.topDictIndex=uo(m),s}var Hs={parse:el,make:ul};function cl(e,t){let n={},s=new F.Parser(e,t);return n.version=s.parseVersion(),n.fontRevision=Math.round(s.parseFixed()*1e3)/1e3,n.checkSumAdjustment=s.parseULong(),n.magicNumber=s.parseULong(),B.argument(n.magicNumber===1594834165,"Font header has wrong magic number."),n.flags=s.parseUShort(),n.unitsPerEm=s.parseUShort(),n.created=s.parseLongDateTime(),n.modified=s.parseLongDateTime(),n.xMin=s.parseShort(),n.yMin=s.parseShort(),n.xMax=s.parseShort(),n.yMax=s.parseShort(),n.macStyle=s.parseUShort(),n.lowestRecPPEM=s.parseUShort(),n.fontDirectionHint=s.parseShort(),n.indexToLocFormat=s.parseShort(),n.glyphDataFormat=s.parseShort(),n}function fl(e){let t=Math.round(new Date().getTime()/1e3)+2082844800,n=t,s=e.macStyle||0;return e.createdTimestamp&&(n=e.createdTimestamp+2082844800),new A.Table("head",[{name:"version",type:"FIXED",value:65536},{name:"fontRevision",type:"FIXED",value:65536},{name:"checkSumAdjustment",type:"ULONG",value:0},{name:"magicNumber",type:"ULONG",value:1594834165},{name:"flags",type:"USHORT",value:0},{name:"unitsPerEm",type:"USHORT",value:1e3},{name:"created",type:"LONGDATETIME",value:n},{name:"modified",type:"LONGDATETIME",value:t},{name:"xMin",type:"SHORT",value:0},{name:"yMin",type:"SHORT",value:0},{name:"xMax",type:"SHORT",value:0},{name:"yMax",type:"SHORT",value:0},{name:"macStyle",type:"USHORT",value:s},{name:"lowestRecPPEM",type:"USHORT",value:0},{name:"fontDirectionHint",type:"SHORT",value:2},{name:"indexToLocFormat",type:"SHORT",value:0},{name:"glyphDataFormat",type:"SHORT",value:0}],e)}var co={parse:cl,make:fl};function pl(e,t){let n={},s=new F.Parser(e,t);return n.version=s.parseVersion(),n.ascender=s.parseShort(),n.descender=s.parseShort(),n.lineGap=s.parseShort(),n.advanceWidthMax=s.parseUShort(),n.minLeftSideBearing=s.parseShort(),n.minRightSideBearing=s.parseShort(),n.xMaxExtent=s.parseShort(),n.caretSlopeRise=s.parseShort(),n.caretSlopeRun=s.parseShort(),n.caretOffset=s.parseShort(),s.relativeOffset+=8,n.metricDataFormat=s.parseShort(),n.numberOfHMetrics=s.parseUShort(),n}function hl(e){return new A.Table("hhea",[{name:"version",type:"FIXED",value:65536},{name:"ascender",type:"FWORD",value:0},{name:"descender",type:"FWORD",value:0},{name:"lineGap",type:"FWORD",value:0},{name:"advanceWidthMax",type:"UFWORD",value:0},{name:"minLeftSideBearing",type:"FWORD",value:0},{name:"minRightSideBearing",type:"FWORD",value:0},{name:"xMaxExtent",type:"FWORD",value:0},{name:"caretSlopeRise",type:"SHORT",value:1},{name:"caretSlopeRun",type:"SHORT",value:0},{name:"caretOffset",type:"SHORT",value:0},{name:"reserved1",type:"SHORT",value:0},{name:"reserved2",type:"SHORT",value:0},{name:"reserved3",type:"SHORT",value:0},{name:"reserved4",type:"SHORT",value:0},{name:"metricDataFormat",type:"SHORT",value:0},{name:"numberOfHMetrics",type:"USHORT",value:0}],e)}var fo={parse:pl,make:hl};function dl(e,t,n,s,r){let o,i,a=new F.Parser(e,t);for(let l=0;l<s;l+=1){l<n&&(o=a.parseUShort(),i=a.parseShort());let c=r.get(l);c.advanceWidth=o,c.leftSideBearing=i}}function gl(e,t,n,s,r){e._hmtxTableData={};let o,i,a=new F.Parser(t,n);for(let l=0;l<r;l+=1)l<s&&(o=a.parseUShort(),i=a.parseShort()),e._hmtxTableData[l]={advanceWidth:o,leftSideBearing:i}}function ml(e,t,n,s,r,o,i){i.lowMemory?gl(e,t,n,s,r):dl(t,n,s,r,o)}function yl(e){let t=new A.Table("hmtx",[]);for(let n=0;n<e.length;n+=1){let s=e.get(n),r=s.advanceWidth||0,o=s.leftSideBearing||0;t.fields.push({name:"advanceWidth_"+n,type:"USHORT",value:r}),t.fields.push({name:"leftSideBearing_"+n,type:"SHORT",value:o})}return t}var po={parse:ml,make:yl};function bl(e){let t=new A.Table("ltag",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"numTags",type:"ULONG",value:e.length}]),n="",s=12+e.length*4;for(let r=0;r<e.length;++r){let o=n.indexOf(e[r]);o<0&&(o=n.length,n+=e[r]),t.fields.push({name:"offset "+r,type:"USHORT",value:s+o}),t.fields.push({name:"length "+r,type:"USHORT",value:e[r].length})}return t.fields.push({name:"stringPool",type:"CHARARRAY",value:n}),t}function vl(e,t){let n=new F.Parser(e,t),s=n.parseULong();B.argument(s===1,"Unsupported ltag table version."),n.skip("uLong",1);let r=n.parseULong(),o=[];for(let i=0;i<r;i++){let a="",l=t+n.parseUShort(),c=n.parseUShort();for(let u=l;u<l+c;++u)a+=String.fromCharCode(e.getInt8(u));o.push(a)}return o}var ho={make:bl,parse:vl};function xl(e,t){let n={},s=new F.Parser(e,t);return n.version=s.parseVersion(),n.numGlyphs=s.parseUShort(),n.version===1&&(n.maxPoints=s.parseUShort(),n.maxContours=s.parseUShort(),n.maxCompositePoints=s.parseUShort(),n.maxCompositeContours=s.parseUShort(),n.maxZones=s.parseUShort(),n.maxTwilightPoints=s.parseUShort(),n.maxStorage=s.parseUShort(),n.maxFunctionDefs=s.parseUShort(),n.maxInstructionDefs=s.parseUShort(),n.maxStackElements=s.parseUShort(),n.maxSizeOfInstructions=s.parseUShort(),n.maxComponentElements=s.parseUShort(),n.maxComponentDepth=s.parseUShort()),n}function Sl(e){return new A.Table("maxp",[{name:"version",type:"FIXED",value:20480},{name:"numGlyphs",type:"USHORT",value:e}])}var go={parse:xl,make:Sl},Vs=[{begin:0,end:127},{begin:128,end:255},{begin:256,end:383},{begin:384,end:591},{begin:592,end:687},{begin:688,end:767},{begin:768,end:879},{begin:880,end:1023},{begin:11392,end:11519},{begin:1024,end:1279},{begin:1328,end:1423},{begin:1424,end:1535},{begin:42240,end:42559},{begin:1536,end:1791},{begin:1984,end:2047},{begin:2304,end:2431},{begin:2432,end:2559},{begin:2560,end:2687},{begin:2688,end:2815},{begin:2816,end:2943},{begin:2944,end:3071},{begin:3072,end:3199},{begin:3200,end:3327},{begin:3328,end:3455},{begin:3584,end:3711},{begin:3712,end:3839},{begin:4256,end:4351},{begin:6912,end:7039},{begin:4352,end:4607},{begin:7680,end:7935},{begin:7936,end:8191},{begin:8192,end:8303},{begin:8304,end:8351},{begin:8352,end:8399},{begin:8400,end:8447},{begin:8448,end:8527},{begin:8528,end:8591},{begin:8592,end:8703},{begin:8704,end:8959},{begin:8960,end:9215},{begin:9216,end:9279},{begin:9280,end:9311},{begin:9312,end:9471},{begin:9472,end:9599},{begin:9600,end:9631},{begin:9632,end:9727},{begin:9728,end:9983},{begin:9984,end:10175},{begin:12288,end:12351},{begin:12352,end:12447},{begin:12448,end:12543},{begin:12544,end:12591},{begin:12592,end:12687},{begin:43072,end:43135},{begin:12800,end:13055},{begin:13056,end:13311},{begin:44032,end:55215},{begin:55296,end:57343},{begin:67840,end:67871},{begin:19968,end:40959},{begin:57344,end:63743},{begin:12736,end:12783},{begin:64256,end:64335},{begin:64336,end:65023},{begin:65056,end:65071},{begin:65040,end:65055},{begin:65104,end:65135},{begin:65136,end:65279},{begin:65280,end:65519},{begin:65520,end:65535},{begin:3840,end:4095},{begin:1792,end:1871},{begin:1920,end:1983},{begin:3456,end:3583},{begin:4096,end:4255},{begin:4608,end:4991},{begin:5024,end:5119},{begin:5120,end:5759},{begin:5760,end:5791},{begin:5792,end:5887},{begin:6016,end:6143},{begin:6144,end:6319},{begin:10240,end:10495},{begin:40960,end:42127},{begin:5888,end:5919},{begin:66304,end:66351},{begin:66352,end:66383},{begin:66560,end:66639},{begin:118784,end:119039},{begin:119808,end:120831},{begin:1044480,end:1048573},{begin:65024,end:65039},{begin:917504,end:917631},{begin:6400,end:6479},{begin:6480,end:6527},{begin:6528,end:6623},{begin:6656,end:6687},{begin:11264,end:11359},{begin:11568,end:11647},{begin:19904,end:19967},{begin:43008,end:43055},{begin:65536,end:65663},{begin:65856,end:65935},{begin:66432,end:66463},{begin:66464,end:66527},{begin:66640,end:66687},{begin:66688,end:66735},{begin:67584,end:67647},{begin:68096,end:68191},{begin:119552,end:119647},{begin:73728,end:74751},{begin:119648,end:119679},{begin:7040,end:7103},{begin:7168,end:7247},{begin:7248,end:7295},{begin:43136,end:43231},{begin:43264,end:43311},{begin:43312,end:43359},{begin:43520,end:43615},{begin:65936,end:65999},{begin:66e3,end:66047},{begin:66208,end:66271},{begin:127024,end:127135}];function kl(e){for(let t=0;t<Vs.length;t+=1){let n=Vs[t];if(e>=n.begin&&e<n.end)return t}return-1}function Tl(e,t){let n={},s=new F.Parser(e,t);n.version=s.parseUShort(),n.xAvgCharWidth=s.parseShort(),n.usWeightClass=s.parseUShort(),n.usWidthClass=s.parseUShort(),n.fsType=s.parseUShort(),n.ySubscriptXSize=s.parseShort(),n.ySubscriptYSize=s.parseShort(),n.ySubscriptXOffset=s.parseShort(),n.ySubscriptYOffset=s.parseShort(),n.ySuperscriptXSize=s.parseShort(),n.ySuperscriptYSize=s.parseShort(),n.ySuperscriptXOffset=s.parseShort(),n.ySuperscriptYOffset=s.parseShort(),n.yStrikeoutSize=s.parseShort(),n.yStrikeoutPosition=s.parseShort(),n.sFamilyClass=s.parseShort(),n.panose=[];for(let r=0;r<10;r++)n.panose[r]=s.parseByte();return n.ulUnicodeRange1=s.parseULong(),n.ulUnicodeRange2=s.parseULong(),n.ulUnicodeRange3=s.parseULong(),n.ulUnicodeRange4=s.parseULong(),n.achVendID=String.fromCharCode(s.parseByte(),s.parseByte(),s.parseByte(),s.parseByte()),n.fsSelection=s.parseUShort(),n.usFirstCharIndex=s.parseUShort(),n.usLastCharIndex=s.parseUShort(),n.sTypoAscender=s.parseShort(),n.sTypoDescender=s.parseShort(),n.sTypoLineGap=s.parseShort(),n.usWinAscent=s.parseUShort(),n.usWinDescent=s.parseUShort(),n.version>=1&&(n.ulCodePageRange1=s.parseULong(),n.ulCodePageRange2=s.parseULong()),n.version>=2&&(n.sxHeight=s.parseShort(),n.sCapHeight=s.parseShort(),n.usDefaultChar=s.parseUShort(),n.usBreakChar=s.parseUShort(),n.usMaxContent=s.parseUShort()),n}function Cl(e){return new A.Table("OS/2",[{name:"version",type:"USHORT",value:3},{name:"xAvgCharWidth",type:"SHORT",value:0},{name:"usWeightClass",type:"USHORT",value:0},{name:"usWidthClass",type:"USHORT",value:0},{name:"fsType",type:"USHORT",value:0},{name:"ySubscriptXSize",type:"SHORT",value:650},{name:"ySubscriptYSize",type:"SHORT",value:699},{name:"ySubscriptXOffset",type:"SHORT",value:0},{name:"ySubscriptYOffset",type:"SHORT",value:140},{name:"ySuperscriptXSize",type:"SHORT",value:650},{name:"ySuperscriptYSize",type:"SHORT",value:699},{name:"ySuperscriptXOffset",type:"SHORT",value:0},{name:"ySuperscriptYOffset",type:"SHORT",value:479},{name:"yStrikeoutSize",type:"SHORT",value:49},{name:"yStrikeoutPosition",type:"SHORT",value:258},{name:"sFamilyClass",type:"SHORT",value:0},{name:"bFamilyType",type:"BYTE",value:0},{name:"bSerifStyle",type:"BYTE",value:0},{name:"bWeight",type:"BYTE",value:0},{name:"bProportion",type:"BYTE",value:0},{name:"bContrast",type:"BYTE",value:0},{name:"bStrokeVariation",type:"BYTE",value:0},{name:"bArmStyle",type:"BYTE",value:0},{name:"bLetterform",type:"BYTE",value:0},{name:"bMidline",type:"BYTE",value:0},{name:"bXHeight",type:"BYTE",value:0},{name:"ulUnicodeRange1",type:"ULONG",value:0},{name:"ulUnicodeRange2",type:"ULONG",value:0},{name:"ulUnicodeRange3",type:"ULONG",value:0},{name:"ulUnicodeRange4",type:"ULONG",value:0},{name:"achVendID",type:"CHARARRAY",value:"XXXX"},{name:"fsSelection",type:"USHORT",value:0},{name:"usFirstCharIndex",type:"USHORT",value:0},{name:"usLastCharIndex",type:"USHORT",value:0},{name:"sTypoAscender",type:"SHORT",value:0},{name:"sTypoDescender",type:"SHORT",value:0},{name:"sTypoLineGap",type:"SHORT",value:0},{name:"usWinAscent",type:"USHORT",value:0},{name:"usWinDescent",type:"USHORT",value:0},{name:"ulCodePageRange1",type:"ULONG",value:0},{name:"ulCodePageRange2",type:"ULONG",value:0},{name:"sxHeight",type:"SHORT",value:0},{name:"sCapHeight",type:"SHORT",value:0},{name:"usDefaultChar",type:"USHORT",value:0},{name:"usBreakChar",type:"USHORT",value:0},{name:"usMaxContext",type:"USHORT",value:0}],e)}var zs={parse:Tl,make:Cl,unicodeRanges:Vs,getUnicodeRange:kl};function Ol(e,t){let n={},s=new F.Parser(e,t);switch(n.version=s.parseVersion(),n.italicAngle=s.parseFixed(),n.underlinePosition=s.parseShort(),n.underlineThickness=s.parseShort(),n.isFixedPitch=s.parseULong(),n.minMemType42=s.parseULong(),n.maxMemType42=s.parseULong(),n.minMemType1=s.parseULong(),n.maxMemType1=s.parseULong(),n.version){case 1:n.names=qt.slice();break;case 2:n.numberOfGlyphs=s.parseUShort(),n.glyphNameIndex=new Array(n.numberOfGlyphs);for(let r=0;r<n.numberOfGlyphs;r++)n.glyphNameIndex[r]=s.parseUShort();n.names=[];for(let r=0;r<n.numberOfGlyphs;r++)if(n.glyphNameIndex[r]>=qt.length){let o=s.parseChar();n.names.push(s.parseString(o))}break;case 2.5:n.numberOfGlyphs=s.parseUShort(),n.offset=new Array(n.numberOfGlyphs);for(let r=0;r<n.numberOfGlyphs;r++)n.offset[r]=s.parseChar();break}return n}function Il(e){let{italicAngle:t=Math.round((e.italicAngle||0)*65536),underlinePosition:n=0,underlineThickness:s=0,isFixedPitch:r=0,minMemType42:o=0,maxMemType42:i=0,minMemType1:a=0,maxMemType1:l=0}=e.tables.post||{};return new A.Table("post",[{name:"version",type:"FIXED",value:196608},{name:"italicAngle",type:"FIXED",value:t},{name:"underlinePosition",type:"FWORD",value:n},{name:"underlineThickness",type:"FWORD",value:s},{name:"isFixedPitch",type:"ULONG",value:r},{name:"minMemType42",type:"ULONG",value:o},{name:"maxMemType42",type:"ULONG",value:i},{name:"minMemType1",type:"ULONG",value:a},{name:"maxMemType1",type:"ULONG",value:l}])}var mo={parse:Ol,make:Il},st=new Array(9);st[1]=function(){let t=this.offset+this.relativeOffset,n=this.parseUShort();if(n===1)return{substFormat:1,coverage:this.parsePointer(C.coverage),deltaGlyphId:this.parseShort()};if(n===2)return{substFormat:2,coverage:this.parsePointer(C.coverage),substitute:this.parseOffset16List()};B.assert(!1,"0x"+t.toString(16)+": lookup type 1 format must be 1 or 2.")},st[2]=function(){let t=this.parseUShort();return B.argument(t===1,"GSUB Multiple Substitution Subtable identifier-format must be 1"),{substFormat:t,coverage:this.parsePointer(C.coverage),sequences:this.parseListOfLists()}},st[3]=function(){let t=this.parseUShort();return B.argument(t===1,"GSUB Alternate Substitution Subtable identifier-format must be 1"),{substFormat:t,coverage:this.parsePointer(C.coverage),alternateSets:this.parseListOfLists()}},st[4]=function(){let t=this.parseUShort();return B.argument(t===1,"GSUB ligature table identifier-format must be 1"),{substFormat:t,coverage:this.parsePointer(C.coverage),ligatureSets:this.parseListOfLists(function(){return{ligGlyph:this.parseUShort(),components:this.parseUShortList(this.parseUShort()-1)}})}};var hn={sequenceIndex:C.uShort,lookupListIndex:C.uShort};st[5]=function(){let t=this.offset+this.relativeOffset,n=this.parseUShort();if(n===1)return{substFormat:n,coverage:this.parsePointer(C.coverage),ruleSets:this.parseListOfLists(function(){let s=this.parseUShort(),r=this.parseUShort();return{input:this.parseUShortList(s-1),lookupRecords:this.parseRecordList(r,hn)}})};if(n===2)return{substFormat:n,coverage:this.parsePointer(C.coverage),classDef:this.parsePointer(C.classDef),classSets:this.parseListOfLists(function(){let s=this.parseUShort(),r=this.parseUShort();return{classes:this.parseUShortList(s-1),lookupRecords:this.parseRecordList(r,hn)}})};if(n===3){let s=this.parseUShort(),r=this.parseUShort();return{substFormat:n,coverages:this.parseList(s,C.pointer(C.coverage)),lookupRecords:this.parseRecordList(r,hn)}}B.assert(!1,"0x"+t.toString(16)+": lookup type 5 format must be 1, 2 or 3.")},st[6]=function(){let t=this.offset+this.relativeOffset,n=this.parseUShort();if(n===1)return{substFormat:1,coverage:this.parsePointer(C.coverage),chainRuleSets:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(hn)}})};if(n===2)return{substFormat:2,coverage:this.parsePointer(C.coverage),backtrackClassDef:this.parsePointer(C.classDef),inputClassDef:this.parsePointer(C.classDef),lookaheadClassDef:this.parsePointer(C.classDef),chainClassSet:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(hn)}})};if(n===3)return{substFormat:3,backtrackCoverage:this.parseList(C.pointer(C.coverage)),inputCoverage:this.parseList(C.pointer(C.coverage)),lookaheadCoverage:this.parseList(C.pointer(C.coverage)),lookupRecords:this.parseRecordList(hn)};B.assert(!1,"0x"+t.toString(16)+": lookup type 6 format must be 1, 2 or 3.")},st[7]=function(){let t=this.parseUShort();B.argument(t===1,"GSUB Extension Substitution subtable identifier-format must be 1");let n=this.parseUShort(),s=new C(this.data,this.offset+this.parseULong());return{substFormat:1,lookupType:n,extension:st[n].call(s)}},st[8]=function(){let t=this.parseUShort();return B.argument(t===1,"GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1"),{substFormat:t,coverage:this.parsePointer(C.coverage),backtrackCoverage:this.parseList(C.pointer(C.coverage)),lookaheadCoverage:this.parseList(C.pointer(C.coverage)),substitutes:this.parseUShortList()}};function wl(e,t){t=t||0;let n=new C(e,t),s=n.parseVersion(1);return B.argument(s===1||s===1.1,"Unsupported GSUB table version."),s===1?{version:s,scripts:n.parseScriptList(),features:n.parseFeatureList(),lookups:n.parseLookupList(st)}:{version:s,scripts:n.parseScriptList(),features:n.parseFeatureList(),lookups:n.parseLookupList(st),variations:n.parseFeatureVariationsList()}}var Xt=new Array(9);Xt[1]=function(t){if(t.substFormat===1)return new A.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new A.Coverage(t.coverage)},{name:"deltaGlyphID",type:"SHORT",value:t.deltaGlyphId}]);if(t.substFormat===2)return new A.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:2},{name:"coverage",type:"TABLE",value:new A.Coverage(t.coverage)}].concat(A.ushortList("substitute",t.substitute)));B.fail("Lookup type 1 substFormat must be 1 or 2.")},Xt[2]=function(t){return B.assert(t.substFormat===1,"Lookup type 2 substFormat must be 1."),new A.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new A.Coverage(t.coverage)}].concat(A.tableList("seqSet",t.sequences,function(n){return new A.Table("sequenceSetTable",A.ushortList("sequence",n))})))},Xt[3]=function(t){return B.assert(t.substFormat===1,"Lookup type 3 substFormat must be 1."),new A.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new A.Coverage(t.coverage)}].concat(A.tableList("altSet",t.alternateSets,function(n){return new A.Table("alternateSetTable",A.ushortList("alternate",n))})))},Xt[4]=function(t){return B.assert(t.substFormat===1,"Lookup type 4 substFormat must be 1."),new A.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new A.Coverage(t.coverage)}].concat(A.tableList("ligSet",t.ligatureSets,function(n){return new A.Table("ligatureSetTable",A.tableList("ligature",n,function(s){return new A.Table("ligatureTable",[{name:"ligGlyph",type:"USHORT",value:s.ligGlyph}].concat(A.ushortList("component",s.components,s.components.length+1)))}))})))},Xt[5]=function(t){if(t.substFormat===1)return new A.Table("contextualSubstitutionTable",[{name:"substFormat",type:"USHORT",value:t.substFormat},{name:"coverage",type:"TABLE",value:new A.Coverage(t.coverage)}].concat(A.tableList("sequenceRuleSet",t.ruleSets,function(n){return n?new A.Table("sequenceRuleSetTable",A.tableList("sequenceRule",n,function(s){let r=A.ushortList("seqLookup",[],s.lookupRecords.length).concat(A.ushortList("inputSequence",s.input,s.input.length+1));[r[0],r[1]]=[r[1],r[0]];for(let o=0;o<s.lookupRecords.length;o++){let i=s.lookupRecords[o];r=r.concat({name:"sequenceIndex"+o,type:"USHORT",value:i.sequenceIndex}).concat({name:"lookupListIndex"+o,type:"USHORT",value:i.lookupListIndex})}return new A.Table("sequenceRuleTable",r)})):new A.Table("NULL",null)})));if(t.substFormat===2)return new A.Table("contextualSubstitutionTable",[{name:"substFormat",type:"USHORT",value:t.substFormat},{name:"coverage",type:"TABLE",value:new A.Coverage(t.coverage)},{name:"classDef",type:"TABLE",value:new A.ClassDef(t.classDef)}].concat(A.tableList("classSeqRuleSet",t.classSets,function(n){return n?new A.Table("classSeqRuleSetTable",A.tableList("classSeqRule",n,function(s){let r=A.ushortList("classes",s.classes,s.classes.length+1).concat(A.ushortList("seqLookupCount",[],s.lookupRecords.length));for(let o=0;o<s.lookupRecords.length;o++){let i=s.lookupRecords[o];r=r.concat({name:"sequenceIndex"+o,type:"USHORT",value:i.sequenceIndex}).concat({name:"lookupListIndex"+o,type:"USHORT",value:i.lookupListIndex})}return new A.Table("classSeqRuleTable",r)})):new A.Table("NULL",null)})));if(t.substFormat===3){let n=[{name:"substFormat",type:"USHORT",value:t.substFormat}];n.push({name:"inputGlyphCount",type:"USHORT",value:t.coverages.length}),n.push({name:"substitutionCount",type:"USHORT",value:t.lookupRecords.length});for(let r=0;r<t.coverages.length;r++){let o=t.coverages[r];n.push({name:"inputCoverage"+r,type:"TABLE",value:new A.Coverage(o)})}for(let r=0;r<t.lookupRecords.length;r++){let o=t.lookupRecords[r];n=n.concat({name:"sequenceIndex"+r,type:"USHORT",value:o.sequenceIndex}).concat({name:"lookupListIndex"+r,type:"USHORT",value:o.lookupListIndex})}return new A.Table("contextualSubstitutionTable",n)}B.assert(!1,"lookup type 5 format must be 1, 2 or 3.")},Xt[6]=function(t){if(t.substFormat===1)return new A.Table("chainContextTable",[{name:"substFormat",type:"USHORT",value:t.substFormat},{name:"coverage",type:"TABLE",value:new A.Coverage(t.coverage)}].concat(A.tableList("chainRuleSet",t.chainRuleSets,function(s){return new A.Table("chainRuleSetTable",A.tableList("chainRule",s,function(r){let o=A.ushortList("backtrackGlyph",r.backtrack,r.backtrack.length).concat(A.ushortList("inputGlyph",r.input,r.input.length+1)).concat(A.ushortList("lookaheadGlyph",r.lookahead,r.lookahead.length)).concat(A.ushortList("substitution",[],r.lookupRecords.length));for(let i=0;i<r.lookupRecords.length;i++){let a=r.lookupRecords[i];o=o.concat({name:"sequenceIndex"+i,type:"USHORT",value:a.sequenceIndex}).concat({name:"lookupListIndex"+i,type:"USHORT",value:a.lookupListIndex})}return new A.Table("chainRuleTable",o)}))})));if(t.substFormat===2)B.assert(!1,"lookup type 6 format 2 is not yet supported.");else if(t.substFormat===3){let n=[{name:"substFormat",type:"USHORT",value:t.substFormat}];n.push({name:"backtrackGlyphCount",type:"USHORT",value:t.backtrackCoverage.length});for(let r=0;r<t.backtrackCoverage.length;r++){let o=t.backtrackCoverage[r];n.push({name:"backtrackCoverage"+r,type:"TABLE",value:new A.Coverage(o)})}n.push({name:"inputGlyphCount",type:"USHORT",value:t.inputCoverage.length});for(let r=0;r<t.inputCoverage.length;r++){let o=t.inputCoverage[r];n.push({name:"inputCoverage"+r,type:"TABLE",value:new A.Coverage(o)})}n.push({name:"lookaheadGlyphCount",type:"USHORT",value:t.lookaheadCoverage.length});for(let r=0;r<t.lookaheadCoverage.length;r++){let o=t.lookaheadCoverage[r];n.push({name:"lookaheadCoverage"+r,type:"TABLE",value:new A.Coverage(o)})}n.push({name:"substitutionCount",type:"USHORT",value:t.lookupRecords.length});for(let r=0;r<t.lookupRecords.length;r++){let o=t.lookupRecords[r];n=n.concat({name:"sequenceIndex"+r,type:"USHORT",value:o.sequenceIndex}).concat({name:"lookupListIndex"+r,type:"USHORT",value:o.lookupListIndex})}return new A.Table("chainContextTable",n)}B.assert(!1,"lookup type 6 format must be 1, 2 or 3.")};function El(e){return new A.Table("GSUB",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new A.ScriptList(e.scripts)},{name:"features",type:"TABLE",value:new A.FeatureList(e.features)},{name:"lookups",type:"TABLE",value:new A.LookupList(e.lookups,Xt)}])}var yo={parse:wl,make:El};function Ll(e,t){let n=new F.Parser(e,t),s=n.parseULong();B.argument(s===1,"Unsupported META table version."),n.parseULong(),n.parseULong();let r=n.parseULong(),o={};for(let i=0;i<r;i++){let a=n.parseTag(),l=n.parseULong(),c=n.parseULong();if(a==="appl"||a==="bild")continue;let u=an.UTF8(e,t+l,c);o[a]=u}return o}function Al(e){let t=Object.keys(e).length,n="",s=16+t*12,r=new A.Table("meta",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"offset",type:"ULONG",value:s},{name:"numTags",type:"ULONG",value:t}]);for(let o in e){let i=n.length;n+=e[o],r.fields.push({name:"tag "+o,type:"TAG",value:o}),r.fields.push({name:"offset "+o,type:"ULONG",value:s+i}),r.fields.push({name:"length "+o,type:"ULONG",value:e[o].length})}return r.fields.push({name:"stringPool",type:"CHARARRAY",value:n}),r}var bo={parse:Ll,make:Al};function Rl(e,t){let n=new C(e,t),s=n.parseUShort();s!==0&&console.warn("Only COLRv0 is currently fully supported. A subset of color glyphs might be available in this font if provided in the v0 format.");let r=n.parseUShort(),o=n.parseOffset32(),i=n.parseOffset32(),a=n.parseUShort();n.relativeOffset=o;let l=n.parseRecordList(r,{glyphID:C.uShort,firstLayerIndex:C.uShort,numLayers:C.uShort});n.relativeOffset=i;let c=n.parseRecordList(a,{glyphID:C.uShort,paletteIndex:C.uShort});return{version:s,baseGlyphRecords:l,layerRecords:c}}function Dl({version:e=0,baseGlyphRecords:t=[],layerRecords:n=[]}){B.argument(e===0,"Only COLRv0 supported.");let s=14,r=s+t.length*6;return new A.Table("COLR",[{name:"version",type:"USHORT",value:e},{name:"numBaseGlyphRecords",type:"USHORT",value:t.length},{name:"baseGlyphRecordsOffset",type:"ULONG",value:s},{name:"layerRecordsOffset",type:"ULONG",value:r},{name:"numLayerRecords",type:"USHORT",value:n.length},...t.map((o,i)=>[{name:"glyphID_"+i,type:"USHORT",value:o.glyphID},{name:"firstLayerIndex_"+i,type:"USHORT",value:o.firstLayerIndex},{name:"numLayers_"+i,type:"USHORT",value:o.numLayers}]).flat(),...n.map((o,i)=>[{name:"LayerGlyphID_"+i,type:"USHORT",value:o.glyphID},{name:"paletteIndex_"+i,type:"USHORT",value:o.paletteIndex}]).flat()])}var vo={parse:Rl,make:Dl};function Fl(e,t){return[{name:"tag_"+e,type:"TAG",value:t.tag},{name:"minValue_"+e,type:"FIXED",value:t.minValue<<16},{name:"defaultValue_"+e,type:"FIXED",value:t.defaultValue<<16},{name:"maxValue_"+e,type:"FIXED",value:t.maxValue<<16},{name:"flags_"+e,type:"USHORT",value:0},{name:"nameID_"+e,type:"USHORT",value:t.axisNameID}]}function Ul(e,t,n){let s={},r=new F.Parser(e,t);s.tag=r.parseTag(),s.minValue=r.parseFixed(),s.defaultValue=r.parseFixed(),s.maxValue=r.parseFixed(),r.skip("uShort",1);let o=r.parseUShort();return s.axisNameID=o,s.name=ns(n,o),s}function Ml(e,t,n,s={}){let r=[{name:"nameID_"+e,type:"USHORT",value:t.subfamilyNameID},{name:"flags_"+e,type:"USHORT",value:0}];for(let o=0;o<n.length;++o){let i=n[o].tag;r.push({name:"axis_"+e+" "+i,type:"FIXED",value:t.coordinates[i]<<16})}return s&&s.postScriptNameID&&r.push({name:"postScriptNameID_",type:"USHORT",value:t.postScriptNameID!==void 0?t.postScriptNameID:65535}),r}function Pl(e,t,n,s,r){let o={},i=new F.Parser(e,t),a=i.parseUShort();o.subfamilyNameID=a,o.name=ns(s,a,[2,17]),i.skip("uShort",1),o.coordinates={};for(let c=0;c<n.length;++c)o.coordinates[n[c].tag]=i.parseFixed();if(i.relativeOffset===r)return o.postScriptNameID=void 0,o.postScriptName=void 0,o;let l=i.parseUShort();return o.postScriptNameID=l==65535?void 0:l,o.postScriptName=o.postScriptNameID!==void 0?ns(s,l,[6]):"",o}function Nl(e,t){let n=new A.Table("fvar",[{name:"version",type:"ULONG",value:65536},{name:"offsetToData",type:"USHORT",value:0},{name:"countSizePairs",type:"USHORT",value:2},{name:"axisCount",type:"USHORT",value:e.axes.length},{name:"axisSize",type:"USHORT",value:20},{name:"instanceCount",type:"USHORT",value:e.instances.length},{name:"instanceSize",type:"USHORT",value:4+e.axes.length*4}]);n.offsetToData=n.sizeOf();for(let r=0;r<e.axes.length;r++)n.fields=n.fields.concat(Fl(r,e.axes[r],t));let s={};for(let r=0;r<e.instances.length;r++)if(e.instances[r].postScriptNameID!==void 0){n.instanceSize+=2,s.postScriptNameID=!0;break}for(let r=0;r<e.instances.length;r++)n.fields=n.fields.concat(Ml(r,e.instances[r],e.axes,s));return n}function Bl(e,t,n){let s=new F.Parser(e,t),r=s.parseULong();B.argument(r===65536,"Unsupported fvar table version.");let o=s.parseOffset16();s.skip("uShort",1);let i=s.parseUShort(),a=s.parseUShort(),l=s.parseUShort(),c=s.parseUShort(),u=[];for(let x=0;x<i;x++)u.push(Ul(e,t+o+x*a,n));let m=[],d=t+o+i*a;for(let x=0;x<l;x++)m.push(Pl(e,d+x*c,u,n,c));return{axes:u,instances:m}}var xo={make:Nl,parse:Bl},_l={tag:C.tag,nameID:C.uShort,ordering:C.uShort},En=new Array(5);En[1]=function(){return{axisIndex:this.parseUShort(),flags:this.parseUShort(),valueNameID:this.parseUShort(),value:this.parseFixed()}},En[2]=function(){return{axisIndex:this.parseUShort(),flags:this.parseUShort(),valueNameID:this.parseUShort(),nominalValue:this.parseFixed(),rangeMinValue:this.parseFixed(),rangeMaxValue:this.parseFixed()}},En[3]=function(){return{axisIndex:this.parseUShort(),flags:this.parseUShort(),valueNameID:this.parseUShort(),value:this.parseFixed(),linkedValue:this.parseFixed()}},En[4]=function(){let t=this.parseUShort();return{flags:this.parseUShort(),valueNameID:this.parseUShort(),axisValues:this.parseList(t,function(){return{axisIndex:this.parseUShort(),value:this.parseFixed()}})}};function Gl(){let e=this.parseUShort(),t=En[e],n={format:e};return t===void 0?(console.warn(`Unknown axis value table format ${e}`),n):Object.assign(n,this.parseStruct(t.bind(this)))}function Hl(e,t,n){t||(t=0);let s=new F.Parser(e,t),r=s.parseUShort(),o=s.parseUShort();r!==1&&console.warn(`Unsupported STAT table version ${r}.${o}`);let i=[r,o],a=s.parseUShort(),l=s.parseUShort(),c=s.parseOffset32(),u=s.parseUShort(),m=s.parseOffset32(),d=r>1||o>0?s.parseUShort():void 0;n!==void 0&&B.argument(l>=n.axes.length,"STAT axis count must be greater than or equal to fvar axis count"),u>0&&B.argument(l>=0,"STAT axis count must be greater than 0 if STAT axis value count is greater than 0");let x=[];for(let I=0;I<l;I++)s.offset=t+c,s.relativeOffset=I*a,x.push(s.parseStruct(_l));s.offset=t,s.relativeOffset=m;let v=s.parseUShortList(u),S=[];for(let I=0;I<u;I++)s.offset=t+m,s.relativeOffset=v[I],S.push(Gl.apply(s));return{version:i,axes:x,values:S,elidedFallbackNameID:d}}var Ln=new Array(5);Ln[1]=function(t,n){return[{name:`format${t}`,type:"USHORT",value:1},{name:`axisIndex${t}`,type:"USHORT",value:n.axisIndex},{name:`flags${t}`,type:"USHORT",value:n.flags},{name:`valueNameID${t}`,type:"USHORT",value:n.valueNameID},{name:`value${t}`,type:"FLOAT",value:n.value}]},Ln[2]=function(t,n){return[{name:`format${t}`,type:"USHORT",value:2},{name:`axisIndex${t}`,type:"USHORT",value:n.axisIndex},{name:`flags${t}`,type:"USHORT",value:n.flags},{name:`valueNameID${t}`,type:"USHORT",value:n.valueNameID},{name:`nominalValue${t}`,type:"FLOAT",value:n.nominalValue},{name:`rangeMinValue${t}`,type:"FLOAT",value:n.rangeMinValue},{name:`rangeMaxValue${t}`,type:"FLOAT",value:n.rangeMaxValue}]},Ln[3]=function(t,n){return[{name:`format${t}`,type:"USHORT",value:3},{name:`axisIndex${t}`,type:"USHORT",value:n.axisIndex},{name:`flags${t}`,type:"USHORT",value:n.flags},{name:`valueNameID${t}`,type:"USHORT",value:n.valueNameID},{name:`value${t}`,type:"FLOAT",value:n.value},{name:`linkedValue${t}`,type:"FLOAT",value:n.linkedValue}]},Ln[4]=function(t,n){let s=[{name:`format${t}`,type:"USHORT",value:4},{name:`axisCount${t}`,type:"USHORT",value:n.axisValues.length},{name:`flags${t}`,type:"USHORT",value:n.flags},{name:`valueNameID${t}`,type:"USHORT",value:n.valueNameID}];for(let r=0;r<n.axisValues.length;r++)s=s.concat([{name:`format${t}axisIndex${r}`,type:"USHORT",value:n.axisValues[r].axisIndex},{name:`format${t}value${r}`,type:"FLOAT",value:n.axisValues[r].value}]);return s};function Vl(e,t){return new A.Record("axisRecord_"+e,[{name:"axisTag_"+e,type:"TAG",value:t.tag},{name:"axisNameID_"+e,type:"USHORT",value:t.nameID},{name:"axisOrdering_"+e,type:"USHORT",value:t.ordering}])}function zl(e,t){let n=t.format,s=Ln[n];B.argument(s!==void 0,`Unknown axis value table format ${n}`);let r=s(e,t);return new A.Table("axisValueTable_"+e,r)}function jl(e){let t=new A.Table("STAT",[{name:"majorVersion",type:"USHORT",value:1},{name:"minorVersion",type:"USHORT",value:2},{name:"designAxisSize",type:"USHORT",value:8},{name:"designAxisCount",type:"USHORT",value:e.axes.length},{name:"designAxesOffset",type:"ULONG",value:0},{name:"axisValueCount",type:"USHORT",value:e.values.length},{name:"offsetToAxisValueOffsets",type:"ULONG",value:0},{name:"elidedFallbackNameID",type:"USHORT",value:e.elidedFallbackNameID}]);t.designAxesOffset=t.offsetToAxisValueOffsets=t.sizeOf();for(let o=0;o<e.axes.length;o++){let i=Vl(o,e.axes[o]);t.offsetToAxisValueOffsets+=i.sizeOf(),t.fields=t.fields.concat(i.fields)}let n=[],s=[],r=e.values.length*2;for(let o=0;o<e.values.length;o++){let i=zl(o,e.values[o]);n.push({name:"offset_"+o,type:"USHORT",value:r}),r+=i.sizeOf(),s=s.concat(i.fields)}return t.fields=t.fields.concat(n),t.fields=t.fields.concat(s),t}var So={make:jl,parse:Hl};function Wl(e,t){return new A.Record("axisValueMap_"+e,[{name:"fromCoordinate_"+e,type:"F2DOT14",value:t.fromCoordinate},{name:"toCoordinate_"+e,type:"F2DOT14",value:t.toCoordinate}])}function ql(e,t){let n=new A.Record("segmentMap_"+e,[{name:"positionMapCount_"+e,type:"USHORT",value:t.axisValueMaps.length}]),s=[];for(let r=0;r<t.axisValueMaps.length;r++){let o=Wl(`${e}_${r}`,t.axisValueMaps[r]);s=s.concat(o.fields)}return n.fields=n.fields.concat(s),n}function $l(e,t){B.argument(e.axisSegmentMaps.length===t.axes.length,"avar axis count must correspond to fvar axis count");let n=new A.Table("avar",[{name:"majorVersion",type:"USHORT",value:1},{name:"minorVersion",type:"USHORT",value:0},{name:"reserved",type:"USHORT",value:0},{name:"axisCount",type:"USHORT",value:e.axisSegmentMaps.length}]);for(let s=0;s<e.axisSegmentMaps.length;s++){let r=ql(s,e.axisSegmentMaps[s]);n.fields=n.fields.concat(r.fields)}return n}function Xl(e,t,n){t||(t=0);let s=new C(e,t),r=s.parseUShort(),o=s.parseUShort();r!==1&&console.warn(`Unsupported avar table version ${r}.${o}`),s.skip("uShort",1);let i=s.parseUShort();B.argument(i===n.axes.length,"avar axis count must correspond to fvar axis count");let a=[];for(let l=0;l<i;l++){let c=[],u=s.parseUShort();for(let m=0;m<u;m++){let d=s.parseF2Dot14(),x=s.parseF2Dot14();c.push({fromCoordinate:d,toCoordinate:x})}a.push({axisValueMaps:c})}return{version:[r,o],axisSegmentMaps:a}}var ko={make:$l,parse:Xl};function Yl(e,t,n,s){let r=new F.Parser(e,t),o=r.parseTupleVariationStore(r.relativeOffset,n.axes.length,"cvar",s),i=r.parseUShort(),a=r.parseUShort();return i!==1&&console.warn(`Unsupported cvar table version ${i}.${a}`),{version:[i,a],...o}}function Zl(){console.warn("Writing of cvar tables is not yet supported.")}var To={make:Zl,parse:Yl};function Kl(e,t,n,s){let r=new F.Parser(e,t),o=r.parseUShort(),i=r.parseUShort();o!==1&&console.warn(`Unsupported gvar table version ${o}.${i}`);let a=r.parseUShort();a!==n.axes.length&&console.warn(`axisCount ${a} in gvar table does not match the number of axes ${n.axes.length} in the fvar table!`);let l=r.parseUShort(),c=r.parsePointer32(function(){return this.parseTupleRecords(l,a)}),u=r.parseTupleVariationStoreList(a,"gvar",s);return{version:[o,i],sharedTuples:c,glyphVariations:u}}function Ql(){console.warn("Writing of gvar tables is not yet supported.")}var Co={make:Ql,parse:Kl};function Jl(e,t){let n={},s=new F.Parser(e,t);n.version=s.parseUShort(),B.argument(n.version<=1,"Unsupported gasp table version."),n.numRanges=s.parseUShort(),n.gaspRanges=[];for(let r=0;r<n.numRanges;r++)n.gaspRanges[r]={rangeMaxPPEM:s.parseUShort(),rangeGaspBehavior:s.parseUShort()};return n}function eu(e){let t=new A.Table("gasp",[{name:"version",type:"USHORT",value:1},{name:"numRanges",type:"USHORT",value:e.numRanges}]);for(let n in e.gaspRanges)t.fields.push({name:"rangeMaxPPEM",type:"USHORT",value:e.gaspRanges[n].rangeMaxPPEM}),t.fields.push({name:"rangeGaspBehavior",type:"USHORT",value:e.gaspRanges[n].rangeGaspBehavior});return t}var Oo={parse:Jl,make:eu};function tu(e,t){let n=new Map,s=e.buffer,r=new C(e,t);if(r.parseUShort()!==0)return n;r.relativeOffset=r.parseOffset32();let i=e.byteOffset+t+r.relativeOffset,a=r.parseUShort(),l=new Map;for(let c=0;c<a;c++){let u=r.parseUShort(),m=r.parseUShort(),d=i+r.parseOffset32(),x=r.parseULong(),v=l.get(d);v===void 0&&(v=new Uint8Array(s,d,x),l.set(d,v));for(let S=u;S<=m;S++)n.set(S,v)}return n}function nu(e){let t=Array.from(e.keys()).sort(),n=[],s=[],r=new Map,o=0,i={endGlyphID:null};for(let d=0,x=t.length;d<x;d++){let v=t[d],S=e.get(v),I=r.get(S);I===void 0&&(I=o,s.push(S),r.set(S,I),o+=S.byteLength),v-1===i.endGlyphID&&I===i.svgDocOffset?i.endGlyphID=v:(i={startGlyphID:v,endGlyphID:v,svgDocOffset:I,svgDocLength:S.byteLength},n.push(i))}let a=n.length,l=s.length,c=2+a*12,u=new Array(4+a*4+l),m=0;u[m++]={name:"version",type:"USHORT",value:0},u[m++]={name:"svgDocumentListOffset",type:"ULONG",value:10},u[m++]={name:"reserved",type:"ULONG",value:0},u[m++]={name:"numEntries",type:"USHORT",value:a};for(let d=0;d<a;d++){let x="documentRecord_"+d,{startGlyphID:v,endGlyphID:S,svgDocOffset:I,svgDocLength:_}=n[d];u[m++]={name:x+"_startGlyphID",type:"USHORT",value:v},u[m++]={name:x+"_endGlyphID",type:"USHORT",value:S},u[m++]={name:x+"_svgDocOffset",type:"ULONG",value:c+I},u[m++]={name:x+"_svgDocLength",type:"ULONG",value:_}}for(let d=0;d<l;d++)u[m++]={name:"svgDoc_"+d,type:"LITERAL",value:s[d]};return new A.Table("SVG ",u)}var Io={make:nu,parse:tu};function wo(e){return Math.log(e)/Math.log(2)|0}function js(e){for(;e.length%4!==0;)e.push(0);let t=0;for(let n=0;n<e.length;n+=4)t+=(e[n]<<24)+(e[n+1]<<16)+(e[n+2]<<8)+e[n+3];return t%=Math.pow(2,32),t}function Eo(e,t,n,s){return new A.Record("Table Record",[{name:"tag",type:"TAG",value:e!==void 0?e:""},{name:"checkSum",type:"ULONG",value:t!==void 0?t:0},{name:"offset",type:"ULONG",value:n!==void 0?n:0},{name:"length",type:"ULONG",value:s!==void 0?s:0}])}function Lo(e){let t=new A.Table("sfnt",[{name:"version",type:"TAG",value:"OTTO"},{name:"numTables",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);t.tables=e,t.numTables=e.length;let n=Math.pow(2,wo(t.numTables));t.searchRange=16*n,t.entrySelector=wo(n),t.rangeShift=t.numTables*16-t.searchRange;let s=[],r=[],o=t.sizeOf()+Eo().sizeOf()*t.numTables;for(;o%4!==0;)o+=1,r.push({name:"padding",type:"BYTE",value:0});for(let i=0;i<e.length;i+=1){let a=e[i];B.argument(a.tableName.length===4,"Table name"+a.tableName+" is invalid.");let l=a.sizeOf(),c=Eo(a.tableName,js(a.encode()),o,l);for(s.push({name:c.tag+" Table Record",type:"RECORD",value:c}),r.push({name:a.tableName+" table",type:"RECORD",value:a}),o+=l,B.argument(!isNaN(o),"Something went wrong calculating the offset.");o%4!==0;)o+=1,r.push({name:"padding",type:"BYTE",value:0})}return s.sort(function(i,a){return i.value.tag>a.value.tag?1:-1}),t.fields=t.fields.concat(s),t.fields=t.fields.concat(r),t}function Ao(e,t,n){for(let s=0;s<t.length;s+=1){let r=e.charToGlyphIndex(t[s]);if(r>0)return e.glyphs.get(r).getMetrics()}return n}function su(e){let t=0;for(let n=0;n<e.length;n+=1)t+=e[n];return t/e.length}function ru(e){let t=[],n=[],s=[],r=[],o=[],i=[],a=[],l,c=0,u=0,m=0,d=0,x=0;for(let le=0;le<e.glyphs.length;le+=1){let _e=e.glyphs.get(le),Qe=_e.unicode|0;if(isNaN(_e.advanceWidth))throw new Error("Glyph "+_e.name+" ("+le+"): advanceWidth is not a number.");(l>Qe||l===void 0)&&Qe>0&&(l=Qe),c<Qe&&(c=Qe);let at=zs.getUnicodeRange(Qe);if(at<32)u|=1<<at;else if(at<64)m|=1<<at-32;else if(at<96)d|=1<<at-64;else if(at<123)x|=1<<at-96;else throw new Error("Unicode ranges bits > 123 are reserved for internal usage");if(_e.name===".notdef")continue;let Ct=_e.getMetrics();t.push(Ct.xMin),n.push(Ct.yMin),s.push(Ct.xMax),r.push(Ct.yMax),i.push(Ct.leftSideBearing),a.push(Ct.rightSideBearing),o.push(_e.advanceWidth)}let v={xMin:Math.min.apply(null,t),yMin:Math.min.apply(null,n),xMax:Math.max.apply(null,s),yMax:Math.max.apply(null,r),advanceWidthMax:Math.max.apply(null,o),advanceWidthAvg:su(o),minLeftSideBearing:Math.min.apply(null,i),maxLeftSideBearing:Math.max.apply(null,i),minRightSideBearing:Math.min.apply(null,a)};v.ascender=e.ascender,v.descender=e.descender;let S=0;e.weightClass>=600&&(S|=e.macStyleValues.BOLD),e.italicAngle<0&&(S|=e.macStyleValues.ITALIC);let I=co.make({flags:3,unitsPerEm:e.unitsPerEm,xMin:v.xMin,yMin:v.yMin,xMax:v.xMax,yMax:v.yMax,lowestRecPPEM:3,macStyle:S,createdTimestamp:e.createdTimestamp}),_=fo.make({ascender:v.ascender,descender:v.descender,advanceWidthMax:v.advanceWidthMax,minLeftSideBearing:v.minLeftSideBearing,minRightSideBearing:v.minRightSideBearing,xMaxExtent:v.maxLeftSideBearing+(v.xMax-v.xMin),numberOfHMetrics:e.glyphs.length}),P=go.make(e.glyphs.length),z=zs.make(Object.assign({xAvgCharWidth:Math.round(v.advanceWidthAvg),usFirstCharIndex:l,usLastCharIndex:c,ulUnicodeRange1:u,ulUnicodeRange2:m,ulUnicodeRange3:d,ulUnicodeRange4:x,sTypoAscender:v.ascender,sTypoDescender:v.descender,sTypoLineGap:0,usWinAscent:v.yMax,usWinDescent:Math.abs(v.yMin),ulCodePageRange1:1,sxHeight:Ao(e,"xyvw",{yMax:Math.round(v.ascender/2)}).yMax,sCapHeight:Ao(e,"HIKLEFJMNTZBDPRAGOQSUVWXY",v).yMax,usDefaultChar:e.hasChar(" ")?32:0,usBreakChar:e.hasChar(" ")?32:0},e.tables.os2)),Y=po.make(e.glyphs),re=Wr.make(e.glyphs),ie=e.getEnglishName("fontFamily"),ae=e.getEnglishName("fontSubfamily"),me=ie+" "+ae,ot=e.getEnglishName("postScriptName");ot||(ot=ie.replace(/\s/g,"")+"-"+ae);let Z={};for(let le in e.names)Z[le]=e.names[le];Z.unicode=Z.unicode||{},Z.macintosh=Z.macintosh||{},Z.windows=Z.windows||{};let Ve=e.names.unicode||{},De=e.names.macintosh||{},G=e.names.windows||{};for(let le in Z){if(Z[le]=Z[le]||{},!Z[le].uniqueID){let _e=e.getEnglishName("manufacturer")||"";Z[le].uniqueID={en:`${_e}: ${me}`}}Z[le].postScriptName||(Z[le].postScriptName={en:ot})}Z.unicode.preferredFamily||(Z.unicode.preferredFamily=Ve.fontFamily||De.fontFamily||G.fontFamily),Z.macintosh.preferredFamily||(Z.macintosh.preferredFamily=De.fontFamily||Ve.fontFamily||G.fontFamily),Z.windows.preferredFamily||(Z.windows.preferredFamily=G.fontFamily||Ve.fontFamily||De.fontFamily),Z.unicode.preferredSubfamily||(Z.unicode.preferredSubfamily=Ve.fontSubfamily||De.fontSubfamily||G.fontSubfamily),Z.macintosh.preferredSubfamily||(Z.macintosh.preferredSubfamily=De.fontSubfamily||Ve.fontSubfamily||G.fontSubfamily),Z.windows.preferredSubfamily||(Z.windows.preferredSubfamily=G.fontSubfamily||Ve.fontSubfamily||De.fontSubfamily);let U=[],M=jr.make(Z,U),Ee=U.length>0?ho.make(U):void 0,Mt=mo.make(e),ms=Hs.make(e.glyphs,{version:e.getEnglishName("version"),fullName:me,familyName:ie,weightName:ae,postScriptName:ot,unitsPerEm:e.unitsPerEm,fontBBox:[0,v.yMin,v.ascender,v.advanceWidthMax],topDict:e.tables.cff&&e.tables.cff.topDict||{}}),Kt=e.metas&&Object.keys(e.metas).length>0?bo.make(e.metas):void 0,it=[I,_,P,z,M,re,Mt,ms,Y];Ee&&it.push(Ee);let Fe={gsub:yo,cpal:Kr,colr:vo,stat:So,avar:ko,cvar:To,fvar:xo,gvar:Co,gasp:Oo,svg:Io},Ke={avar:[e.tables.fvar],fvar:[e.names]};for(let le in Fe){let _e=e.tables[le];if(_e){let Qe=Fe[le].make.call(e,_e,...Ke[le]||[]);Qe&&it.push(Qe)}}Kt&&it.push(Kt);let Le=Lo(it),ze=Le.encode(),Ue=js(ze),Me=Le.fields,ge=!1;for(let le=0;le<Me.length;le+=1)if(Me[le].name==="head table"){Me[le].value.checkSumAdjustment=2981146554-Ue,ge=!0;break}if(!ge)throw new Error("Could not find head table with checkSum to adjust.");return Le}var ou={make:Lo,fontToTable:ru,computeCheckSum:js};function Ws(e,t){let n=0,s=e.length-1;for(;n<=s;){let r=n+s>>>1,o=e[r].tag;if(o===t)return r;o<t?n=r+1:s=r-1}return-n-1}function Ro(e,t){let n=0,s=e.length-1;for(;n<=s;){let r=n+s>>>1,o=e[r];if(o===t)return r;o<t?n=r+1:s=r-1}return-n-1}function Do(e,t){let n,s=0,r=e.length-1;for(;s<=r;){let o=s+r>>>1;n=e[o];let i=n.start;if(i===t)return n;i<t?s=o+1:r=o-1}if(s>0)return n=e[s-1],t>n.end?0:n}function Fo(e,t){this.font=e,this.tableName=t}Fo.prototype={searchTag:Ws,binSearch:Ro,getTable:function(e){let t=this.font.tables[this.tableName];return!t&&e&&(t=this.font.tables[this.tableName]=this.createDefaultTable()),t},getScriptNames:function(){let e=this.getTable();return e?e.scripts.map(function(t){return t.tag}):[]},getDefaultScriptName:function(){let e=this.getTable();if(!e)return;let t=!1;for(let n=0;n<e.scripts.length;n++){let s=e.scripts[n].tag;if(s==="DFLT")return s;s==="latn"&&(t=!0)}if(t)return"latn"},getScriptTable:function(e,t){let n=this.getTable(t);if(n){e=e||"DFLT";let s=n.scripts,r=Ws(n.scripts,e);if(r>=0)return s[r].script;if(t){let o={tag:e,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}};return s.splice(-1-r,0,o),o.script}}},getLangSysTable:function(e,t,n){let s=this.getScriptTable(e,n);if(s){if(!t||t==="dflt"||t==="DFLT")return s.defaultLangSys;let r=Ws(s.langSysRecords,t);if(r>=0)return s.langSysRecords[r].langSys;if(n){let o={tag:t,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}};return s.langSysRecords.splice(-1-r,0,o),o.langSys}}},getFeatureTable:function(e,t,n,s){let r=this.getLangSysTable(e,t,s);if(r){let o,i=r.featureIndexes,a=this.font.tables[this.tableName].features;for(let l=0;l<i.length;l++)if(o=a[i[l]],o.tag===n)return o.feature;if(s){let l=a.length;return B.assert(l===0||n>=a[l-1].tag,"Features must be added in alphabetical order."),o={tag:n,feature:{params:0,lookupListIndexes:[]}},a.push(o),i.push(l),o.feature}}},getLookupTables:function(e,t,n,s,r){let o=this.getFeatureTable(e,t,n,r),i=[];if(o){let a,l=o.lookupListIndexes,c=this.font.tables[this.tableName].lookups;for(let u=0;u<l.length;u++)a=c[l[u]],a.lookupType===s&&i.push(a);if(i.length===0&&r){a={lookupType:s,lookupFlag:0,subtables:[],markFilteringSet:void 0};let u=c.length;return c.push(a),l.push(u),[a]}}return i},getGlyphClass:function(e,t){switch(e.format){case 1:return e.startGlyph<=t&&t<e.startGlyph+e.classes.length?e.classes[t-e.startGlyph]:0;case 2:{let n=Do(e.ranges,t);return n?n.classId:0}}},getCoverageIndex:function(e,t){switch(e.format){case 1:{let n=Ro(e.glyphs,t);return n>=0?n:-1}case 2:{let n=Do(e.ranges,t);return n?n.index+t-n.start:-1}}},expandCoverage:function(e){if(e.format===1)return e.glyphs;{let t=[],n=e.ranges;for(let s=0;s<n.length;s++){let r=n[s],o=r.start,i=r.end;for(let a=o;a<=i;a++)t.push(a)}return t}}};var as=Fo;function An(e){as.call(this,e,"gpos")}An.prototype=as.prototype,An.prototype.init=function(){let e=this.getDefaultScriptName();this.defaultKerningTables=this.getKerningTables(e)},An.prototype.getKerningValue=function(e,t,n){for(let s=0;s<e.length;s++){let r=e[s].subtables;for(let o=0;o<r.length;o++){let i=r[o],a=this.getCoverageIndex(i.coverage,t);if(!(a<0))switch(i.posFormat){case 1:{let l=i.pairSets[a];for(let c=0;c<l.length;c++){let u=l[c];if(u.secondGlyph===n)return u.value1&&u.value1.xAdvance||0}break}case 2:{let l=this.getGlyphClass(i.classDef1,t),c=this.getGlyphClass(i.classDef2,n),u=i.classRecords[l][c];return u.value1&&u.value1.xAdvance||0}}}}return 0},An.prototype.getKerningTables=function(e,t){if(this.font.tables.gpos)return this.getLookupTables(e,t,"kern",2)};var iu=An;function au(e,t){let n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function lu(e,t,n){let s=0,r=e.length-1,o=null;for(;s<=r;){let i=Math.floor((s+r)/2),a=e[i],l=a[t];if(l<n)s=i+1;else if(l>n)r=i-1;else{o=a;break}}return o}function uu(e,t,n){let s=0,r=e.length-1;for(;s<=r;){let o=Math.floor((s+r)/2),i=e[o];if(i[t]<n)s=o+1;else if(i[t]>n)r=o-1;else return o}return-1}function cu(e,t,n){let s=0,r=e.length,o=(i,a)=>i[t]-a[t];for(;s<r;){let i=s+r>>>1;o(e[i],n)<0?s=i+1:r=i}return e.splice(s,0,n),s}function Uo(e){return e[0]===31&&e[1]===139&&e[2]===8}function fu(e){let t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=10,s=e.byteLength-8,r=t.getInt8(3);if(r&4&&(n+=2+t.getUint16(n,!0)),r&8)for(;n<s&&e[n++]!==0;);if(r&16)for(;n<s&&e[n++]!==0;);if(r&2&&(n+=2),n>=s)throw new Error("Can't find compressed blocks");let o=t.getUint32(t.byteLength-4,!0);return Er(e.subarray(n,s),new Uint8Array(o))}function Mo(e){return{x:e.x,y:e.y,onCurve:e.onCurve,lastPointOfContour:e.lastPointOfContour}}function pu(e){return{glyphIndex:e.glyphIndex,xScale:e.xScale,scale01:e.scale01,scale10:e.scale10,yScale:e.yScale,dx:e.dx,dy:e.dy}}function Ge(e){as.call(this,e,"gsub")}function qs(e,t,n){let s=e.subtables;for(let r=0;r<s.length;r++){let o=s[r];if(o.substFormat===t)return o}if(n)return s.push(n),n}Ge.prototype=as.prototype,Ge.prototype.createDefaultTable=function(){return{version:1,scripts:[{tag:"DFLT",script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}}],features:[],lookups:[]}},Ge.prototype.getSingle=function(e,t,n){let s=[],r=this.getLookupTables(t,n,e,1);for(let o=0;o<r.length;o++){let i=r[o].subtables;for(let a=0;a<i.length;a++){let l=i[a],c=this.expandCoverage(l.coverage),u;if(l.substFormat===1){let m=l.deltaGlyphId;for(u=0;u<c.length;u++){let d=c[u];s.push({sub:d,by:d+m})}}else{let m=l.substitute;for(u=0;u<c.length;u++)s.push({sub:c[u],by:m[u]})}}}return s},Ge.prototype.getMultiple=function(e,t,n){let s=[],r=this.getLookupTables(t,n,e,2);for(let o=0;o<r.length;o++){let i=r[o].subtables;for(let a=0;a<i.length;a++){let l=i[a],c=this.expandCoverage(l.coverage),u;for(u=0;u<c.length;u++){let m=c[u],d=l.sequences[u];s.push({sub:m,by:d})}}}return s},Ge.prototype.getAlternates=function(e,t,n){let s=[],r=this.getLookupTables(t,n,e,3);for(let o=0;o<r.length;o++){let i=r[o].subtables;for(let a=0;a<i.length;a++){let l=i[a],c=this.expandCoverage(l.coverage),u=l.alternateSets;for(let m=0;m<c.length;m++)s.push({sub:c[m],by:u[m]})}}return s},Ge.prototype.getLigatures=function(e,t,n){let s=[],r=this.getLookupTables(t,n,e,4);for(let o=0;o<r.length;o++){let i=r[o].subtables;for(let a=0;a<i.length;a++){let l=i[a],c=this.expandCoverage(l.coverage),u=l.ligatureSets;for(let m=0;m<c.length;m++){let d=c[m],x=u[m];for(let v=0;v<x.length;v++){let S=x[v];s.push({sub:[d].concat(S.components),by:S.ligGlyph})}}}}return s},Ge.prototype.addSingle=function(e,t,n,s){let r=this.getLookupTables(n,s,e,1,!0)[0],o=qs(r,2,{substFormat:2,coverage:{format:1,glyphs:[]},substitute:[]});B.assert(o.coverage.format===1,"Single: unable to modify coverage table format "+o.coverage.format);let i=t.sub,a=this.binSearch(o.coverage.glyphs,i);a<0&&(a=-1-a,o.coverage.glyphs.splice(a,0,i),o.substitute.splice(a,0,0)),o.substitute[a]=t.by},Ge.prototype.addMultiple=function(e,t,n,s){B.assert(t.by instanceof Array&&t.by.length>1,'Multiple: "by" must be an array of two or more ids');let r=this.getLookupTables(n,s,e,2,!0)[0],o=qs(r,1,{substFormat:1,coverage:{format:1,glyphs:[]},sequences:[]});B.assert(o.coverage.format===1,"Multiple: unable to modify coverage table format "+o.coverage.format);let i=t.sub,a=this.binSearch(o.coverage.glyphs,i);a<0&&(a=-1-a,o.coverage.glyphs.splice(a,0,i),o.sequences.splice(a,0,0)),o.sequences[a]=t.by},Ge.prototype.addAlternate=function(e,t,n,s){let r=this.getLookupTables(n,s,e,3,!0)[0],o=qs(r,1,{substFormat:1,coverage:{format:1,glyphs:[]},alternateSets:[]});B.assert(o.coverage.format===1,"Alternate: unable to modify coverage table format "+o.coverage.format);let i=t.sub,a=this.binSearch(o.coverage.glyphs,i);a<0&&(a=-1-a,o.coverage.glyphs.splice(a,0,i),o.alternateSets.splice(a,0,0)),o.alternateSets[a]=t.by},Ge.prototype.addLigature=function(e,t,n,s){let r=this.getLookupTables(n,s,e,4,!0)[0],o=r.subtables[0];o||(o={substFormat:1,coverage:{format:1,glyphs:[]},ligatureSets:[]},r.subtables[0]=o),B.assert(o.coverage.format===1,"Ligature: unable to modify coverage table format "+o.coverage.format);let i=t.sub[0],a=t.sub.slice(1),l={ligGlyph:t.by,components:a},c=this.binSearch(o.coverage.glyphs,i);if(c>=0){let u=o.ligatureSets[c];for(let m=0;m<u.length;m++)if(au(u[m].components,a))return;u.push(l)}else c=-1-c,o.coverage.glyphs.splice(c,0,i),o.ligatureSets.splice(c,0,[l])},Ge.prototype.getFeature=function(e,t,n){if(/ss\d\d/.test(e))return this.getSingle(e,t,n);switch(e){case"aalt":case"salt":return this.getSingle(e,t,n).concat(this.getAlternates(e,t,n));case"dlig":case"liga":case"rlig":return this.getLigatures(e,t,n);case"ccmp":return this.getMultiple(e,t,n).concat(this.getLigatures(e,t,n));case"stch":return this.getMultiple(e,t,n)}},Ge.prototype.add=function(e,t,n,s){if(/ss\d\d/.test(e))return this.addSingle(e,t,n,s);switch(e){case"aalt":case"salt":return typeof t.by=="number"?this.addSingle(e,t,n,s):this.addAlternate(e,t,n,s);case"dlig":case"liga":case"rlig":return this.addLigature(e,t,n,s);case"ccmp":return t.by instanceof Array?this.addMultiple(e,t,n,s):this.addLigature(e,t,n,s)}};var hu=Ge,Po=class{constructor(e){this.defaultValue=255,this.font=e}cpal(){return this.font.tables&&this.font.tables.cpal?this.font.tables.cpal:!1}getAll(e){let t=[],n=this.cpal();if(!n)return t;for(let s=0;s<n.colorRecordIndices.length;s++){let r=n.colorRecordIndices[s],o=[];for(let i=r;i<r+n.numPaletteEntries;i++)o.push(cn(n.colorRecords[i],e||"hexa"));t.push(o)}return t}toCPALcolor(e){return Array.isArray(e)?e.map(t=>rs(t,"raw")):rs(e,"raw")}fillPalette(e,t=[],n=this.cpal().numPaletteEntries){return e=Number.isInteger(e)?this.get(e,"raw"):e,Object.assign(Array(n).fill(this.defaultValue),this.toCPALcolor(e).concat(this.toCPALcolor(t)))}extend(e){if(this.ensureCPAL(Array(e).fill(this.defaultValue)))return;let t=this.cpal(),n=t.numPaletteEntries+e,s=this.getAll().map(r=>this.fillPalette(r,[],n));t.numPaletteEntries=n,t.colorRecords=this.toCPALcolor(s.flat()),this.updateIndices()}get(e,t="hexa"){return this.getAll(t)[e]||null}getColor(e,t=0,n="hexa"){return Ms(this.font,e,t,n)}setColor(e,t,n=0){e=parseInt(e),n=parseInt(n);let s=this.getAll("raw"),r=s[n];if(!r)throw Error(`paletteIndex ${n} out of range`);let o=this.cpal(),i=o.numPaletteEntries;Array.isArray(t)||(t=[t]),t.length+e>i&&(this.extend(t.length+e-i),s=this.getAll("raw"),r=s[n]);for(let a=0;a<t.length;a++)r[a+e]=this.toCPALcolor(t[a]);o.colorRecords=s.flat(),this.updateIndices()}add(e){if(this.ensureCPAL(e))return;let t=this.cpal(),n=t.numPaletteEntries;e&&e.length?(e=this.toCPALcolor(e),e.length>n?this.extend(e.length-n):e.length<n&&(e=this.fillPalette(e)),t.colorRecordIndices.push(t.colorRecords.length),t.colorRecords.push(...e)):(t.colorRecordIndices.push(t.colorRecords.length),t.colorRecords.push(...Array(n).fill(this.defaultValue)))}delete(e){let t=this.getAll("raw");delete t[e];let n=this.cpal();n.colorRecordIndices.pop(),n.colorRecords=t.flat()}deleteColor(e,t){if(e===t)throw Error("replacementIndex cannot be the same as colorIndex");let n=this.cpal(),s=this.getAll("raw"),r=[];if(t>n.numPaletteEntries-1)throw Error(`Replacement index out of range: numPaletteEntries after deletion: ${n.numPaletteEntries-1}, replacementIndex: ${t})`);for(let a=0;a<s.length;a++){let c=s[a].filter((u,m)=>m!==e);r.push(c)}let o=this.font.tables.colr;if(o){let a=o.layerRecords;for(let l=0;l<a.length;l++){let c=a[l].paletteIndex;if(c>e)a[l].paletteIndex-=1;else if(c===e){let u=0;for(let m=0;m<s.length;m++)if(t>e&&t<=e+s[m].length){u++;break}a[l].paletteIndex=t-u}}this.font.tables.colr={...o,layerRecords:a}}let i=r.flat();for(let a=0;a<s.length;a++)n.colorRecordIndices[a]-=a;n.numPaletteEntries=Math.max(0,n.numPaletteEntries-1),n.colorRecords=this.toCPALcolor(i)}ensureCPAL(e){return this.cpal()?!1:(!e||!e.length?e=[this.defaultValue]:e=this.toCPALcolor(e),this.font.tables.cpal={version:0,numPaletteEntries:e.length,colorRecords:e,colorRecordIndices:[0]},!0)}updateIndices(){let e=this.cpal(),t=Math.ceil(e.colorRecords.length/e.numPaletteEntries);e.colorRecordIndices=[];for(let n=0;n<t;n++)e.colorRecordIndices.push(n*e.numPaletteEntries)}},du=class{constructor(e){this.font=e}ensureCOLR(){return this.font.tables.colr||(this.font.tables.colr={version:0,baseGlyphRecords:[],layerRecords:[]}),this.font}get(e){let t=this.font,n=[],s=t.tables.colr,r=t.tables.cpal;if(!s||!r)return n;let o=lu(s.baseGlyphRecords,"glyphID",e);if(!o)return n;let i=o.firstLayerIndex,a=o.numLayers;for(let l=0;l<a;l++){let c=s.layerRecords[i+l];n.push({glyph:t.glyphs.get(c.glyphID),paletteIndex:c.paletteIndex})}return n}add(e,t,n){let s=this.get(e);t=Array.isArray(t)?t:[t],n===void 0||n===1/0||n>s.length?n=s.length:n<0&&(n=s.length+1+n%(s.length+1),n>=s.length+1&&(n-=s.length+1));let r=[];for(let o=0;o<n;o++){let i=Number.isInteger(s[o].glyph)?s[o].glyph:s[o].glyph.index;r.push({glyphID:i,paletteIndex:s[o].paletteIndex})}for(let o of t){let i=Number.isInteger(o.glyph)?o.glyph:o.glyph.index;r.push({glyphID:i,paletteIndex:o.paletteIndex})}for(let o=n;o<s.length;o++){let i=Number.isInteger(s[o].glyph)?s[o].glyph:s[o].glyph.index;r.push({glyphID:i,paletteIndex:s[o].paletteIndex})}this.updateColrTable(e,r)}setPaletteIndex(e,t,n){let s=this.get(e);s[t]?(s=s.map((r,o)=>({glyphID:r.glyph.index,paletteIndex:o===t?n:r.paletteIndex})),this.updateColrTable(e,s)):console.error("Invalid layer index")}remove(e,t,n=t){let s=this.get(e);s=s.map(r=>({glyphID:r.glyph.index,paletteIndex:r.paletteIndex})),s.splice(t,n-t+1),this.updateColrTable(e,s)}updateColrTable(e,t){this.ensureCOLR();let s=this.font.tables.colr,r=uu(s.baseGlyphRecords,"glyphID",e);if(r===-1){let u={glyphID:e,firstLayerIndex:s.layerRecords.length,numLayers:0};r=cu(s.baseGlyphRecords,"glyphID",u)}let i=s.baseGlyphRecords[r],a=i.numLayers,l=t.length,c=l-a;if(c>0){let u=t.slice(a).map(m=>({glyphID:m.glyphID,paletteIndex:m.paletteIndex}));s.layerRecords.splice(i.firstLayerIndex+a,0,...u)}else c<0&&s.layerRecords.splice(i.firstLayerIndex+l,-c);for(let u=0;u<Math.min(a,l);u++)s.layerRecords[i.firstLayerIndex+u]={glyphID:t[u].glyphID,paletteIndex:t[u].paletteIndex};if(i.numLayers=l,c!==0)for(let u=0;u<s.baseGlyphRecords.length;u++){let m=s.baseGlyphRecords[u];u===r||m.firstLayerIndex<i.firstLayerIndex||(s.baseGlyphRecords[u].firstLayerIndex+=c)}}},gu=class{constructor(e){this.font=e,this.cache=new WeakMap}get(e){let t=this.getOrCreateSvgImageCacheEntry(e);return t&&t.image}getAsync(e){let t=this.getOrCreateSvgImageCacheEntry(e);return t&&t.promise}getOrCreateSvgImageCacheEntry(e){let t=this.font.tables.svg;if(t===void 0)return;let n=t.get(e);if(n===void 0)return;let s=this.cache.get(n);s===void 0&&(s=mu(n),this.cache.set(n,s));let r=s.images.get(e);return r===void 0&&(r=yu(this.font,s.template,e),r.promise.then(o=>{if(r.image=o,typeof this.font.onGlyphUpdated=="function")try{this.font.onGlyphUpdated(e)}catch(i){console.error("font.onGlyphUpdated",e,i)}}),s.images.set(e,r)),r}};function mu(e){return{template:bu(e).then(Su),images:new Map}}function yu(e,t,n){return{promise:t.then(s=>{let r;typeof s=="string"?r=s:(s[4]=n,r=s.join(""));let o=ku(r,e.unitsPerEm);return o.image.decode().then(()=>o)}),image:void 0}}var bu=typeof DecompressionStream=="function"?xu:vu;function vu(e){try{return Promise.resolve(new TextDecoder().decode(Uo(e)?fu(e):e))}catch(t){return Promise.reject(t)}}function xu(e){if(Uo(e))return new Response(new Response(e).body.pipeThrough(new DecompressionStream("gzip"))).text();try{return Promise.resolve(new TextDecoder().decode(e))}catch(t){return Promise.reject(t)}}function Su(e){let t=e.indexOf("<svg"),n=e.indexOf(">",t+4)+1;if(/ id=['"]glyph\d+['"]/.test(e.substring(t,n)))return e;let s=e.lastIndexOf("</svg>");return[e.substring(0,n),"<defs>",e.substring(n,s),'</defs><use href="#glyph',"",'"/>',e.substring(s)]}function ku(e,t){let s=new DOMParser().parseFromString(e,"image/svg+xml").documentElement,r=s.viewBox.baseVal,o=s.width.baseVal,i=s.height.baseVal,a=1,l=1;r.width>0&&r.height>0&&(o.unitType===1?(a=o.valueInSpecifiedUnits/r.width,l=i.unitType===1?i.valueInSpecifiedUnits/r.height:a):i.unitType===1?(l=i.valueInSpecifiedUnits/r.height,a=l):t&&(a=t/r.width,l=t/r.height));let c=document.createElement("div");c.style.position="fixed",c.style.visibility="hidden",c.appendChild(s),document.body.appendChild(c);let u=s.getBBox();document.body.removeChild(c);let m=(u.x-r.x)*a,d=(r.y-u.y)*l,x=u.width*a,v=u.height*l;s.setAttribute("viewBox",[u.x,u.y,u.width,u.height].join(" ")),a!==1&&s.setAttribute("width",x),l!==1&&s.setAttribute("height",v);let S=new Image(x,v);return S.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(s.outerHTML),{leftSideBearing:m,baseline:d,image:S}}var $s=new WeakMap;function No(e,t,n,s,r){let o;return(t&s)>0?(o=e.parseByte(),(t&r)===0&&(o=-o),o=n+o):(t&r)>0?o=n:o=n+e.parseShort(),o}function Bo(e,t,n){let s=new F.Parser(t,n);e._numberOfContours=s.parseShort(),e._xMin=s.parseShort(),e._yMin=s.parseShort(),e._xMax=s.parseShort(),e._yMax=s.parseShort();let r,o;if(e._numberOfContours>0){let i=e.endPointIndices=[];for(let l=0;l<e._numberOfContours;l+=1)i.push(s.parseUShort());e.instructionLength=s.parseUShort(),e.instructions=[];for(let l=0;l<e.instructionLength;l+=1)e.instructions.push(s.parseByte());let a=i[i.length-1]+1;r=[];for(let l=0;l<a;l+=1)if(o=s.parseByte(),r.push(o),(o&8)>0){let c=s.parseByte();for(let u=0;u<c;u+=1)r.push(o),l+=1}if(B.argument(r.length===a,"Bad flags."),i.length>0){let l=[],c;if(a>0){for(let d=0;d<a;d+=1)o=r[d],c={},c.onCurve=!!(o&1),c.lastPointOfContour=i.indexOf(d)>=0,l.push(c);let u=0;for(let d=0;d<a;d+=1)o=r[d],c=l[d],c.x=No(s,o,u,2,16),u=c.x;let m=0;for(let d=0;d<a;d+=1)o=r[d],c=l[d],c.y=No(s,o,m,4,32),m=c.y}e.points=l}else e.points=[]}else if(e._numberOfContours===0)e.points=[];else{e.isComposite=!0,e.points=[],e.components=[];let i=!0;for(;i;){r=s.parseUShort();let a={glyphIndex:s.parseUShort(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0};(r&1)>0?(r&2)>0?(a.dx=s.parseShort(),a.dy=s.parseShort()):a.matchedPoints=[s.parseUShort(),s.parseUShort()]:(r&2)>0?(a.dx=s.parseChar(),a.dy=s.parseChar()):a.matchedPoints=[s.parseByte(),s.parseByte()],(r&8)>0?a.xScale=a.yScale=s.parseF2Dot14():(r&64)>0?(a.xScale=s.parseF2Dot14(),a.yScale=s.parseF2Dot14()):(r&128)>0&&(a.xScale=s.parseF2Dot14(),a.scale01=s.parseF2Dot14(),a.scale10=s.parseF2Dot14(),a.yScale=s.parseF2Dot14()),e.components.push(a),i=!!(r&32)}if(r&256){e.instructionLength=s.parseUShort(),e.instructions=[];for(let a=0;a<e.instructionLength;a+=1)e.instructions.push(s.parseByte())}}}function ls(e,t){let n=[];for(let s=0;s<e.length;s+=1){let r=e[s],o={x:t.xScale*r.x+t.scale10*r.y+t.dx,y:t.scale01*r.x+t.yScale*r.y+t.dy,onCurve:r.onCurve,lastPointOfContour:r.lastPointOfContour};n.push(o)}return n}function Tu(e){let t=[],n=[];for(let s=0;s<e.length;s+=1){let r=e[s];n.push(r),r.lastPointOfContour&&(t.push(n),n=[])}return B.argument(n.length===0,"There are still points left in the current contour."),t}function Xs(e){let t=new Wt;if(!e)return t;let n=Tu(e);for(let s=0;s<n.length;++s){let r=n[s],o=r[r.length-1],i=r[0];if(o.onCurve)t.moveTo(o.x,o.y);else if(i.onCurve)t.moveTo(i.x,i.y);else{let a={x:(o.x+i.x)*.5,y:(o.y+i.y)*.5};t.moveTo(a.x,a.y)}for(let a=0;a<r.length;++a)if(o=i,i=r[(a+1)%r.length],o.onCurve)t.lineTo(o.x,o.y);else{let l=i;i.onCurve||(l={x:(o.x+i.x)*.5,y:(o.y+i.y)*.5}),t.quadraticCurveTo(o.x,o.y,l.x,l.y)}t.closePath()}return t}function _o(e,t){if(t.isComposite){$s.has(e)||$s.set(e,new Set);let n=$s.get(e);n.add(t.index);try{for(let s=0;s<t.components.length;s+=1){let r=t.components[s];if(n.has(r.glyphIndex))continue;let o=e.get(r.glyphIndex);if(o.getPath(),o.points){let i;if(r.matchedPoints===void 0)i=ls(o.points,r);else{if(r.matchedPoints[0]>t.points.length-1||r.matchedPoints[1]>o.points.length-1)throw Error("Matched points out of range in "+t.name);let a=t.points[r.matchedPoints[0]],l=o.points[r.matchedPoints[1]],c={xScale:r.xScale,scale01:r.scale01,scale10:r.scale10,yScale:r.yScale,dx:0,dy:0};l=ls([l],c)[0],c.dx=a.x-l.x,c.dy=a.y-l.y,i=ls(o.points,c)}t.points=t.points.concat(i)}}}finally{n.delete(t.index)}}return Xs(t.points)}function Cu(e,t,n,s){let r=new mt.GlyphSet(s);for(let o=0;o<n.length-1;o+=1){let i=n[o],a=n[o+1];i!==a?r.push(o,mt.ttfGlyphLoader(s,o,Bo,e,t+i,_o)):r.push(o,mt.glyphLoader(s,o))}return r}function Ou(e,t,n,s){let r=new mt.GlyphSet(s);return s._push=function(o){let i=n[o],a=n[o+1];i!==a?r.push(o,mt.ttfGlyphLoader(s,o,Bo,e,t+i,_o)):r.push(o,mt.glyphLoader(s,o))},r}function Iu(e,t,n,s,r){return r.lowMemory?Ou(e,t,n,s):Cu(e,t,n,s)}var Go={getPath:Xs,parse:Iu},wu=class{constructor(e){this.font=e}normalizeCoordTags(e){for(let t in e)if(t.length<4){let n=t.padEnd(4," ");e[n]===void 0&&(e[n]=e[t]),delete e[t]}}getNormalizedCoords(e){e||(e=this.font.variation.get());let t=[];this.normalizeCoordTags(e);for(let n=0;n<this.fvar().axes.length;n++){let s=this.fvar().axes[n],r=e[s.tag];r===void 0&&(r=s.defaultValue),r<s.defaultValue?t.push((r-s.defaultValue+Number.EPSILON)/(s.defaultValue-s.minValue+Number.EPSILON)):t.push((r-s.defaultValue+Number.EPSILON)/(s.maxValue-s.defaultValue+Number.EPSILON))}if(this.avar())for(let n=0;n<this.avar().axisSegmentMaps.length;n++){let s=this.avar().axisSegmentMaps[n];for(let r=0;r<s.axisValueMaps.length;r++){let o=s.axisValueMaps[r];if(r>=1&&t[n]<o.fromCoordinate){let i=s.axisValueMaps[r-1];t[n]=((t[n]-i.fromCoordinate)*(o.toCoordinate-i.toCoordinate)+Number.EPSILON)/(o.fromCoordinate-i.fromCoordinate+Number.EPSILON)+i.toCoordinate;break}}}return t}interpolatePoints(e,t,n){if(e.length===0)return;let s=0;for(;s<e.length;){let r=s,o=s,i=e[o];for(;!i.lastPointOfContour;)i=e[++o];for(;s<=o&&!n[s];)s++;if(s>o)continue;let a=s,l=s;for(s++;s<=o;)n[s]&&(this.deltaInterpolate(l+1,s-1,l,s,t,e),l=s),s++;l===a?this.deltaShift(r,o,l,t,e):(this.deltaInterpolate(l+1,o,l,a,t,e),a>0&&this.deltaInterpolate(r,a-1,l,a,t,e)),s=o+1}}deltaInterpolate(e,t,n,s,r,o){if(e>t)return;let i=["x","y"];for(let l=0;l<i.length;l++){let c=i[l];if(r[n][c]>r[s][c]){var a=n;n=s,s=a}let u=r[n][c],m=r[s][c],d=o[n][c],x=o[s][c];if(u!==m||d===x){let v=u===m?0:(x-d)/(m-u);for(let S=e;S<=t;S++){let I=r[S][c];I<=u?I+=d-u:I>=m?I+=x-m:I=d+(I-u)*v,o[S][c]=I}}}}deltaShift(e,t,n,s,r){let o=r[n].x-s[n].x,i=r[n].y-s[n].y;if(!(o===0&&i===0))for(let a=e;a<=t;a++)a!==n&&(r[a].x+=o,r[a].y+=i)}transformComponents(e,t,n,s,r,o){let i=0;for(let a=0;a<e.components.length;a++){let l=e.components[a],c=this.font.glyphs.get(l.glyphIndex),u=pu(l),m=s.indexOf(a);m>-1&&(u.dx+=Math.round(r.deltas[m]*o),u.dy+=Math.round(r.deltasY[m]*o));let d=ls(this.getTransform(c,n).points,u);t.splice(i,d.length,...d),i+=c.points.length}}applyTupleVariationStore(e,t,n,s="gvar",r={}){n||(n=this.font.variation.get());let o=this.getNormalizedCoords(n),{headers:i,sharedPoints:a}=e,l=this.fvar().axes.length,c;s==="gvar"?c=t.map(Mo):s==="cvar"&&(c=[...t]);for(let u=0;u<i.length;u++){let m=i[u],d=1;for(let v=0;v<l;v++){let S=[0];switch(s){case"gvar":S=m.peakTuple?m.peakTuple:this.gvar().sharedTuples[m.sharedTupleRecordsIndex];break;case"cvar":S=m.peakTuple;break}if(S[v]!==0){if(o[v]===0){d=0;break}if(m.intermediateStartTuple)if(o[v]<m.intermediateStartTuple[v]||o[v]>m.intermediateEndTuple[v]){d=0;break}else o[v]<S[v]?d=d*(o[v]-m.intermediateStartTuple[v]+Number.EPSILON)/(S[v]-m.intermediateStartTuple[v]+Number.EPSILON):d=d*(m.intermediateEndTuple[v]-o[v]+Number.EPSILON)/(m.intermediateEndTuple[v]-S[v]+Number.EPSILON);else{if(o[v]<Math.min(0,S[v])||o[v]>Math.max(0,S[v])){d=0;break}d=(d*o[v]+Number.EPSILON)/(S[v]+Number.EPSILON)}}}if(d===0)continue;let x=m.privatePoints.length?m.privatePoints:a;if(s==="gvar"&&r.glyph&&r.glyph.isComposite)this.transformComponents(r.glyph,c,n,x,m,d);else if(x.length===0)for(let v=0;v<c.length;v++){let S=c[v];s==="gvar"?c[v]={x:Math.round(S.x+m.deltas[v]*d),y:Math.round(S.y+m.deltasY[v]*d),onCurve:S.onCurve,lastPointOfContour:S.lastPointOfContour}:s==="cvar"&&(c[v]=Math.round(S+m.deltas[v]*d))}else{let v;s==="gvar"?v=c.map(Mo):s==="cvar"&&(v=c);let S=Array(t.length).fill(!1);for(let I=0;I<x.length;I++){let _=x[I];if(_<t.length){let P=v[_];s==="gvar"?(S[_]=!0,P.x+=m.deltas[I]*d,P.y+=m.deltasY[I]*d):s==="cvar"&&(c[_]=Math.round(P+m.deltas[I]*d))}}if(s==="gvar"){this.interpolatePoints(v,c,S);for(let I=0;I<t.length;I++){let _=v[I].x-c[I].x,P=v[I].y-c[I].y;c[I].x=Math.round(c[I].x+_),c[I].y=Math.round(c[I].y+P)}}}}return c}getTransform(e,t){Number.isInteger(e)&&(e=this.font.glyphs.get(e));let n=e.getBlendPath,s=!!(e.points&&e.points.length),r=e;if(n||s){if(t||(t=this.font.variation.get()),s){let o=this.gvar()&&this.gvar().glyphVariations[e.index];if(o){let i=e.points,a=this.applyTupleVariationStore(o,i,t,"gvar",{glyph:e});r=new fn(Object.assign({},e,{points:a,path:Xs(a)}))}}else if(n){let o=e.getBlendPath(t);r=new fn(Object.assign({},e,{path:o}))}}return this.font.tables.hvar&&(e._advanceWidth=typeof e._advanceWidth<"u"?e._advanceWidth:e.advanceWidth,e.advanceWidth=r.advanceWidth=Math.round(e._advanceWidth+this.getVariableAdjustment(r.index,"hvar","advanceWidth",t)),e._leftSideBearing=typeof e._leftSideBearing<"u"?e._leftSideBearing:e.leftSideBearing,e.leftSideBearing=r.leftSideBearing=Math.round(e._leftSideBearing+this.getVariableAdjustment(r.index,"hvar","lsb",t))),r}getCvarTransform(e){let t=this.font.tables.cvt,n=this.cvar();return!t||!t.length||!n||!n.headers.length?t:this.applyTupleVariationStore(n,t,e,"cvar")}getVariableAdjustment(e,t,n,s){s=s||this.font.variation.get();let r,o,i=this.font.tables[t];if(!i)throw Error(`trying to get variation adjustment from non-existent table "${i}"`);if(!i.itemVariationStore)throw Error(`trying to get variation adjustment from table "${i}" which does not have an itemVariationStore`);let a=i[n]&&i[n].map.length;if(a){let l=e;l>=a&&(l=a-1),{outerIndex:r,innerIndex:o}=i[n].map[l]}else r=0,o=e;return this.getDelta(i.itemVariationStore,r,o,s)}getDelta(e,t,n,s){if(t>=e.itemVariationSubtables.length)return 0;let r=e.itemVariationSubtables[t];if(n>=r.deltaSets.length)return 0;let o=r.deltaSets[n],i=this.getBlendVector(e,t,s),a=0;for(let l=0;l<r.regionIndexes.length;l++)a+=o[l]*i[l];return a}getBlendVector(e,t,n){n||(n=this.font.variation.get());let s=e.itemVariationSubtables[t],r=this.getNormalizedCoords(n),o=[];for(let i=0;i<s.regionIndexes.length;i++){let a=1,l=s.regionIndexes[i],c=e.variationRegions[l].regionAxes;for(let u=0;u<c.length;u++){let m=c[u],d;m.startCoord>m.peakCoord||m.peakCoord>m.endCoord||m.startCoord<0&&m.endCoord>0&&m.peakCoord!==0||m.peakCoord===0?d=1:r[u]<m.startCoord||r[u]>m.endCoord?d=0:r[u]===m.peakCoord?d=1:r[u]<m.peakCoord?d=(r[u]-m.startCoord+Number.EPSILON)/(m.peakCoord-m.startCoord+Number.EPSILON):d=(m.endCoord-r[u]+Number.EPSILON)/(m.endCoord-m.peakCoord+Number.EPSILON),a*=d}o[i]=a}return o}avar(){return this.font.tables.avar}cvar(){return this.font.tables.cvar}fvar(){return this.font.tables.fvar}gvar(){return this.font.tables.gvar}hvar(){return this.font.tables.hvar}},Eu=class{constructor(e){this.font=e,this.process=new wu(this.font),this.activateDefaultVariation(),this.getTransform=this.process.getTransform.bind(this.process)}activateDefaultVariation(){let e=this.getDefaultInstanceIndex();e>-1?this.set(e):this.set(this.getDefaultCoordinates())}getDefaultCoordinates(){return this.fvar().axes.reduce((e,t)=>(e[t.tag]=t.defaultValue,e),{})}getDefaultInstanceIndex(){let e=this.getDefaultCoordinates(),t=this.getInstanceIndex(e);return t<0&&(t=this.fvar().instances.findIndex(n=>n.name&&n.name.en==="Regular")),t}getInstanceIndex(e){return this.fvar().instances.findIndex(t=>Object.keys(e).every(n=>t.coordinates[n]===e[n]))}getInstance(e){return this.fvar().instances&&this.fvar().instances[e]}set(e){let t;if(Number.isInteger(e)){let n=this.getInstance(e);if(!n)throw Error(`Invalid instance index ${e}`);t={...n.coordinates}}else t=e,this.process.normalizeCoordTags(t);t=Object.assign({},this.font.defaultRenderOptions.variation,t),this.font.defaultRenderOptions=Object.assign({},this.font.defaultRenderOptions,{variation:t})}get(){return Object.assign({},this.font.defaultRenderOptions.variation)}avar(){return this.font.tables.avar}cvar(){return this.font.tables.cvar}fvar(){return this.font.tables.fvar}gvar(){return this.font.tables.gvar}hvar(){return this.font.tables.hvar}},Ho=1e6,us=64,cs=1e4,Vo,Yt,zo,Ys;function jo(e){this.font=e,this.getCommands=function(t){return Go.getPath(t).commands},this._fpgmState=this._prepState=void 0,this._errorState=0}function Lu(e){return e}function Wo(e){return Math.sign(e)*Math.round(Math.abs(e))}function Au(e){return Math.sign(e)*Math.round(Math.abs(e*2))/2}function Ru(e){return Math.sign(e)*(Math.round(Math.abs(e)+.5)-.5)}function Du(e){return Math.sign(e)*Math.ceil(Math.abs(e))}function Fu(e){return Math.sign(e)*Math.floor(Math.abs(e))}var qo=function(e){let t=this.srPeriod,n=this.srPhase,s=this.srThreshold,r=1;return e<0&&(e=-e,r=-1),e+=s-n,e=Math.trunc(e/t)*t,e+=n,e<0?n*r:e*r},bt={x:1,y:0,axis:"x",distance:function(e,t,n,s){return(n?e.xo:e.x)-(s?t.xo:t.x)},interpolate:function(e,t,n,s){let r,o,i,a,l,c,u;if(!s||s===this){if(r=e.xo-t.xo,o=e.xo-n.xo,l=t.x-t.xo,c=n.x-n.xo,i=Math.abs(r),a=Math.abs(o),u=i+a,u===0){e.x=e.xo+(l+c)/2;return}e.x=e.xo+(l*a+c*i)/u;return}if(r=s.distance(e,t,!0,!0),o=s.distance(e,n,!0,!0),l=s.distance(t,t,!1,!0),c=s.distance(n,n,!1,!0),i=Math.abs(r),a=Math.abs(o),u=i+a,u===0){bt.setRelative(e,e,(l+c)/2,s,!0);return}bt.setRelative(e,e,(l*a+c*i)/u,s,!0)},normalSlope:Number.NEGATIVE_INFINITY,setRelative:function(e,t,n,s,r){if(!s||s===this){e.x=(r?t.xo:t.x)+n;return}let o=r?t.xo:t.x,i=r?t.yo:t.y,a=o+n*s.x,l=i+n*s.y;e.x=a+(e.y-l)/s.normalSlope},slope:0,touch:function(e){e.xTouched=!0},touched:function(e){return e.xTouched},untouch:function(e){e.xTouched=!1}},kt={x:0,y:1,axis:"y",distance:function(e,t,n,s){return(n?e.yo:e.y)-(s?t.yo:t.y)},interpolate:function(e,t,n,s){let r,o,i,a,l,c,u;if(!s||s===this){if(r=e.yo-t.yo,o=e.yo-n.yo,l=t.y-t.yo,c=n.y-n.yo,i=Math.abs(r),a=Math.abs(o),u=i+a,u===0){e.y=e.yo+(l+c)/2;return}e.y=e.yo+(l*a+c*i)/u;return}if(r=s.distance(e,t,!0,!0),o=s.distance(e,n,!0,!0),l=s.distance(t,t,!1,!0),c=s.distance(n,n,!1,!0),i=Math.abs(r),a=Math.abs(o),u=i+a,u===0){kt.setRelative(e,e,(l+c)/2,s,!0);return}kt.setRelative(e,e,(l*a+c*i)/u,s,!0)},normalSlope:0,setRelative:function(e,t,n,s,r){if(!s||s===this){e.y=(r?t.yo:t.y)+n;return}let o=r?t.xo:t.x,i=r?t.yo:t.y,a=o+n*s.x,l=i+n*s.y;e.y=l+s.normalSlope*(e.x-a)},slope:Number.POSITIVE_INFINITY,touch:function(e){e.yTouched=!0},touched:function(e){return e.yTouched},untouch:function(e){e.yTouched=!1}};Object.freeze(bt),Object.freeze(kt);function Rn(e,t){this.x=e,this.y=t,this.axis=void 0,this.slope=t/e,this.normalSlope=-e/t,Object.freeze(this)}Rn.prototype.distance=function(e,t,n,s){return this.x*bt.distance(e,t,n,s)+this.y*kt.distance(e,t,n,s)},Rn.prototype.interpolate=function(e,t,n,s){let r,o,i,a,l,c,u;if(i=s.distance(e,t,!0,!0),a=s.distance(e,n,!0,!0),r=s.distance(t,t,!1,!0),o=s.distance(n,n,!1,!0),l=Math.abs(i),c=Math.abs(a),u=l+c,u===0){this.setRelative(e,e,(r+o)/2,s,!0);return}this.setRelative(e,e,(r*c+o*l)/u,s,!0)},Rn.prototype.setRelative=function(e,t,n,s,r){s=s||this;let o=r?t.xo:t.x,i=r?t.yo:t.y,a=o+n*s.x,l=i+n*s.y,c=s.normalSlope,u=this.slope,m=e.x,d=e.y;e.x=(u*m-c*a+l-d)/(u-c),e.y=u*(e.x-m)+d},Rn.prototype.touch=function(e){e.xTouched=!0,e.yTouched=!0};function Dn(e,t){let n=Math.sqrt(e*e+t*t);return e/=n,t/=n,e===1&&t===0?bt:e===0&&t===1?kt:new Rn(e,t)}function Tt(e,t,n,s){this.x=this.xo=Math.round(e*64)/64,this.y=this.yo=Math.round(t*64)/64,this.lastPointOfContour=n,this.onCurve=s,this.prevPointOnContour=void 0,this.nextPointOnContour=void 0,this.xTouched=!1,this.yTouched=!1,Object.preventExtensions(this)}Tt.prototype.nextTouched=function(e){let t=this.nextPointOnContour;for(;!e.touched(t)&&t!==this;)t=t.nextPointOnContour;return t},Tt.prototype.prevTouched=function(e){let t=this.prevPointOnContour;for(;!e.touched(t)&&t!==this;)t=t.prevPointOnContour;return t};var Fn=Object.freeze(new Tt(0,0)),Uu={cvCutIn:17/16,deltaBase:9,deltaShift:.125,loop:1,minDis:1,autoFlip:!0};function Et(e,t){switch(this.env=e,this.stack=[],this.prog=t,e){case"glyf":this.zp0=this.zp1=this.zp2=1,this.rp0=this.rp1=this.rp2=0;case"prep":this.fv=this.pv=this.dpv=bt,this.round=Wo}}jo.prototype.exec=function(e,t){if(typeof t!="number")throw new Error("Point size is not a number!");if(this._errorState>2)return;let n=this.font,s=this._prepState;if(!s||s.ppem!==t){let r=this._fpgmState;if(!r){Et.prototype=Uu,r=this._fpgmState=new Et("fpgm",n.tables.fpgm),r.funcs=[],r.font=n,r.instructionCount=0,r.callDepth=0;try{Yt(r)}catch(i){console.log("Hinting error in FPGM:"+i),this._errorState=3;return}}Et.prototype=r,s=this._prepState=new Et("prep",n.tables.prep),s.ppem=t,s.instructionCount=0,s.callDepth=0;let o=n.variation&&n.variation.process.getCvarTransform()||n.tables.cvt;if(o){let i=s.cvt=new Array(o.length),a=t/n.unitsPerEm;for(let l=0;l<o.length;l++)i[l]=o[l]*a}else s.cvt=[];try{Yt(s)}catch(i){this._errorState<2&&console.log("Hinting error in PREP:"+i),this._errorState=2}}if(!(this._errorState>1))try{return zo(e,s)}catch(r){this._errorState<1&&(console.log("Hinting error:"+r),console.log("Note: further hinting errors are silenced")),this._errorState=1;return}},zo=function(e,t){let n=t.ppem/t.font.unitsPerEm,s=n,r=e.components,o,i,a;if(Et.prototype=t,!r)a=new Et("glyf",e.instructions),a.instructionCount=0,a.callDepth=0,Ys(e,a,n,s),i=a.gZone;else{let l=t.font;i=[],o=[];for(let c=0;c<r.length;c++){let u=r[c],m=l.glyphs.get(u.glyphIndex);a=new Et("glyf",m.instructions),a.instructionCount=0,a.callDepth=0,Ys(m,a,n,s);let d=Math.round(u.dx*n),x=Math.round(u.dy*s),v=a.gZone,S=a.contours;for(let _=0;_<v.length;_++){let P=v[_];P.xTouched=P.yTouched=!1,P.xo=P.x=P.x+d,P.yo=P.y=P.y+x}let I=i.length;i.push.apply(i,v);for(let _=0;_<S.length;_++)o.push(S[_]+I)}e.instructions&&!a.inhibitGridFit&&(a=new Et("glyf",e.instructions),a.gZone=a.z0=a.z1=a.z2=i,a.contours=o,i.push(new Tt(0,0),new Tt(Math.round(e.advanceWidth*n),0)),Yt(a),i.length-=2)}return i},Ys=function(e,t,n,s){let r=e.points||[],o=r.length,i=t.gZone=t.z0=t.z1=t.z2=[],a=t.contours=[],l;for(let m=0;m<o;m++)l=r[m],i[m]=new Tt(l.x*n,l.y*s,l.lastPointOfContour,l.onCurve);let c,u;for(let m=0;m<o;m++)l=i[m],c||(c=l,a.push(m)),l.lastPointOfContour?(l.nextPointOnContour=c,c.prevPointOnContour=l,c=void 0):(u=i[m+1],l.nextPointOnContour=u,u.prevPointOnContour=l);t.inhibitGridFit||(i.push(new Tt(0,0),new Tt(Math.round(e.advanceWidth*n),0)),Yt(t),i.length-=2)},Yt=function(e){let t=e.prog;if(!t)return;let n=t.length,s;for(e.ip=0;e.ip<n;e.ip++){if(++e.instructionCount>Ho)throw new Error("Hinting instructions exceeded maximum of "+Ho);if(s=Vo[t[e.ip]],!s)throw new Error("unknown instruction: 0x"+Number(t[e.ip]).toString(16));s(e)}};function fs(e){let t=e.tZone=new Array(e.gZone.length);for(let n=0;n<t.length;n++)t[n]=new Tt(0,0)}function $o(e,t){let n=e.prog,s=e.ip,r=1,o;do if(o=n[++s],o===88)r++;else if(o===89)r--;else if(o===64)s+=n[s+1]+1;else if(o===65)s+=2*n[s+1]+1;else if(o>=176&&o<=183)s+=o-176+1;else if(o>=184&&o<=191)s+=(o-184+1)*2;else if(t&&r===1&&o===27)break;while(r>0);e.ip=s}function Xo(e,t){t.fv=t.pv=t.dpv=e}function Yo(e,t){t.pv=t.dpv=e}function Zo(e,t){t.fv=e}function Ko(e,t){let n=t.stack,s=n.pop(),r=n.pop(),o=t.z2[s],i=t.z1[r],a,l;e?(a=o.y-i.y,l=i.x-o.x):(a=i.x-o.x,l=i.y-o.y),t.pv=t.dpv=Dn(a,l)}function Qo(e,t){let n=t.stack,s=n.pop(),r=n.pop(),o=t.z2[s],i=t.z1[r],a,l;e?(a=o.y-i.y,l=i.x-o.x):(a=i.x-o.x,l=i.y-o.y),t.fv=Dn(a,l)}function Mu(e){let t=e.stack,n=t.pop(),s=t.pop();e.pv=e.dpv=Dn(s,n)}function Pu(e){let t=e.stack,n=t.pop(),s=t.pop();e.fv=Dn(s,n)}function Nu(e){let t=e.stack,n=e.pv;t.push(n.x*16384),t.push(n.y*16384)}function Bu(e){let t=e.stack,n=e.fv;t.push(n.x*16384),t.push(n.y*16384)}function _u(e){e.fv=e.pv}function Gu(e){let t=e.stack,n=t.pop(),s=t.pop(),r=t.pop(),o=t.pop(),i=t.pop(),a=e.z0,l=e.z1,c=a[n],u=a[s],m=l[r],d=l[o],x=e.z2[i],v=c.x,S=c.y,I=u.x,_=u.y,P=m.x,z=m.y,Y=d.x,re=d.y,ie=(v-I)*(z-re)-(S-_)*(P-Y),ae=v*_-S*I,me=P*re-z*Y;x.x=(ae*(P-Y)-me*(v-I))/ie,x.y=(ae*(z-re)-me*(S-_))/ie}function Hu(e){e.rp0=e.stack.pop()}function Vu(e){e.rp1=e.stack.pop()}function zu(e){e.rp2=e.stack.pop()}function ju(e){let t=e.stack.pop();switch(e.zp0=t,t){case 0:e.tZone||fs(e),e.z0=e.tZone;break;case 1:e.z0=e.gZone;break;default:throw new Error("Invalid zone pointer")}}function Wu(e){let t=e.stack.pop();switch(e.zp1=t,t){case 0:e.tZone||fs(e),e.z1=e.tZone;break;case 1:e.z1=e.gZone;break;default:throw new Error("Invalid zone pointer")}}function qu(e){let t=e.stack.pop();switch(e.zp2=t,t){case 0:e.tZone||fs(e),e.z2=e.tZone;break;case 1:e.z2=e.gZone;break;default:throw new Error("Invalid zone pointer")}}function $u(e){let t=e.stack.pop();switch(e.zp0=e.zp1=e.zp2=t,t){case 0:e.tZone||fs(e),e.z0=e.z1=e.z2=e.tZone;break;case 1:e.z0=e.z1=e.z2=e.gZone;break;default:throw new Error("Invalid zone pointer")}}function Xu(e){e.loop=e.stack.pop(),e.loop>cs&&(e.loop=cs)}function Yu(e){e.round=Wo}function Zu(e){e.round=Ru}function Ku(e){let t=e.stack.pop();e.minDis=t/64}function Qu(e){$o(e,!1)}function Ju(e){let t=e.stack.pop();e.ip+=t-1}function ec(e){let t=e.stack.pop();e.cvCutIn=t/64}function tc(e){let t=e.stack;t.push(t[t.length-1])}function Zs(e){e.stack.pop()}function nc(e){e.stack.length=0}function sc(e){let t=e.stack,n=t.pop(),s=t.pop();t.push(n),t.push(s)}function rc(e){let t=e.stack;t.push(t.length)}function oc(e){let t=e.stack,n=t.pop(),s=t.pop();if(s>cs&&(s=cs),++e.callDepth>us)throw new Error("Hinting call depth exceeded maximum of "+us);let r=e.ip,o=e.prog;e.prog=e.funcs[n];for(let i=0;i<s;i++)Yt(e);e.ip=r,e.prog=o,e.callDepth--}function ic(e){let t=e.stack.pop();if(++e.callDepth>us)throw new Error("Hinting call depth exceeded maximum of "+us);let n=e.ip,s=e.prog;e.prog=e.funcs[t],Yt(e),e.ip=n,e.prog=s,e.callDepth--}function ac(e){let t=e.stack,n=t.pop();t.push(t[t.length-n])}function lc(e){let t=e.stack,n=t.pop();t.push(t.splice(t.length-n,1)[0])}function uc(e){if(e.env!=="fpgm")throw new Error("FDEF not allowed here");let t=e.stack,n=e.prog,s=e.ip,r=t.pop(),o=s;for(;n[++s]!==45;);e.ip=s,e.funcs[r]=n.slice(o+1,s)}function Jo(e,t){let n=t.stack.pop(),s=t.z0[n],r=t.fv,o=t.pv,i=o.distance(s,Fn);e&&(i=t.round(i)),r.setRelative(s,Fn,i,o),r.touch(s),t.rp0=t.rp1=n}function ei(e,t){let n=t.z2,s=n.length-2,r,o,i;for(let a=0;a<s;a++)r=n[a],!e.touched(r)&&(o=r.prevTouched(e),o!==r&&(i=r.nextTouched(e),o===i&&e.setRelative(r,r,e.distance(o,o,!1,!0),e,!0),e.interpolate(r,o,i,e)))}function ti(e,t){let n=t.stack,s=e?t.rp1:t.rp2,r=(e?t.z0:t.z1)[s],o=t.fv,i=t.pv,a=t.loop,l=t.z2;for(;a--;){let c=n.pop(),u=l[c],m=i.distance(r,r,!1,!0);o.setRelative(u,u,m,i),o.touch(u)}t.loop=1}function ni(e,t){let n=t.stack,s=e?t.rp1:t.rp2,r=(e?t.z0:t.z1)[s],o=t.fv,i=t.pv,a=n.pop(),l=t.z2[t.contours[a]],c=l,u=i.distance(r,r,!1,!0);do c!==r&&o.setRelative(c,c,u,i),c=c.nextPointOnContour;while(c!==l)}function si(e,t){let n=t.stack,s=e?t.rp1:t.rp2,r=(e?t.z0:t.z1)[s],o=t.fv,i=t.pv,a=n.pop(),l;switch(a){case 0:l=t.tZone;break;case 1:l=t.gZone;break;default:throw new Error("Invalid zone")}let c,u=i.distance(r,r,!1,!0),m=l.length-2;for(let d=0;d<m;d++)c=l[d],o.setRelative(c,c,u,i)}function cc(e){let t=e.stack,n=e.loop,s=e.fv,r=t.pop()/64,o=e.z2;for(;n--;){let i=t.pop(),a=o[i];s.setRelative(a,a,r),s.touch(a)}e.loop=1}function fc(e){let t=e.stack,n=e.rp1,s=e.rp2,r=e.loop,o=e.z0[n],i=e.z1[s],a=e.fv,l=e.dpv,c=e.z2;for(;r--;){let u=t.pop(),m=c[u];a.interpolate(m,o,i,l),a.touch(m)}e.loop=1}function ri(e,t){let n=t.stack,s=n.pop()/64,r=n.pop(),o=t.z1[r],i=t.z0[t.rp0],a=t.fv,l=t.pv;a.setRelative(o,i,s,l),a.touch(o),t.rp1=t.rp0,t.rp2=r,e&&(t.rp0=r)}function pc(e){let t=e.stack,n=e.rp0,s=e.z0[n],r=e.loop,o=e.fv,i=e.pv,a=e.z1;for(;r--;){let l=t.pop(),c=a[l];o.setRelative(c,s,0,i),o.touch(c)}e.loop=1}function hc(e){e.round=Au}function oi(e,t){let n=t.stack,s=n.pop(),r=n.pop(),o=t.z0[r],i=t.fv,a=t.pv,l=t.cvt[s],c=a.distance(o,Fn);e&&(Math.abs(c-l)<t.cvCutIn&&(c=l),c=t.round(c)),i.setRelative(o,Fn,c,a),t.zp0===0&&(o.xo=o.x,o.yo=o.y),i.touch(o),t.rp0=t.rp1=r}function dc(e){let t=e.prog,n=e.ip,s=e.stack,r=t[++n];for(let o=0;o<r;o++)s.push(t[++n]);e.ip=n}function gc(e){let t=e.ip,n=e.prog,s=e.stack,r=n[++t];for(let o=0;o<r;o++){let i=n[++t]<<8|n[++t];i&32768&&(i=-((i^65535)+1)),s.push(i)}e.ip=t}function mc(e){let t=e.stack,n=e.store;n||(n=e.store=[]);let s=t.pop(),r=t.pop();n[r]=s}function yc(e){let t=e.stack,n=e.store,s=t.pop(),r=n&&n[s]||0;t.push(r)}function bc(e){let t=e.stack,n=t.pop(),s=t.pop();e.cvt[s]=n/64}function vc(e){let t=e.stack,n=t.pop();t.push(e.cvt[n]*64)}function ii(e,t){let n=t.stack,s=n.pop(),r=t.z2[s];n.push(t.dpv.distance(r,Fn,e,!1)*64)}function ai(e,t){let n=t.stack,s=n.pop(),r=n.pop(),o=t.z1[s],i=t.z0[r],a=t.dpv.distance(i,o,e,e);t.stack.push(Math.round(a*64))}function xc(e){e.stack.push(e.ppem)}function Sc(e){e.autoFlip=!0}function kc(e){let t=e.stack,n=t.pop(),s=t.pop();t.push(s<n?1:0)}function Tc(e){let t=e.stack,n=t.pop(),s=t.pop();t.push(s<=n?1:0)}function Cc(e){let t=e.stack,n=t.pop(),s=t.pop();t.push(s>n?1:0)}function Oc(e){let t=e.stack,n=t.pop(),s=t.pop();t.push(s>=n?1:0)}function Ic(e){let t=e.stack,n=t.pop(),s=t.pop();t.push(n===s?1:0)}function wc(e){let t=e.stack,n=t.pop(),s=t.pop();t.push(n!==s?1:0)}function Ec(e){let t=e.stack,n=t.pop();t.push(Math.trunc(n)&1?1:0)}function Lc(e){let t=e.stack,n=t.pop();t.push(Math.trunc(n)&1?0:1)}function Ac(e){let t=e.stack.pop(),n;t||$o(e,!0)}function Rc(e){}function Dc(e){let t=e.stack,n=t.pop(),s=t.pop();t.push(n&&s?1:0)}function Fc(e){let t=e.stack,n=t.pop(),s=t.pop();t.push(n||s?1:0)}function Uc(e){let t=e.stack,n=t.pop();t.push(n?0:1)}function Ks(e,t){let n=t.stack,s=n.pop(),r=t.fv,o=t.pv,i=t.ppem,a=t.deltaBase+(e-1)*16,l=t.deltaShift,c=t.z0;for(let u=0;u<s;u++){let m=n.pop(),d=n.pop();if(a+((d&240)>>4)!==i)continue;let v=(d&15)-8;v>=0&&v++;let S=c[m];r.setRelative(S,S,v*l,o)}}function Mc(e){let n=e.stack.pop();e.deltaBase=n}function Pc(e){let n=e.stack.pop();e.deltaShift=Math.pow(.5,n)}function Nc(e){let t=e.stack,n=t.pop(),s=t.pop();t.push(s+n)}function Bc(e){let t=e.stack,n=t.pop(),s=t.pop();t.push(s-n)}function _c(e){let t=e.stack,n=t.pop(),s=t.pop();t.push(s*64/n)}function Gc(e){let t=e.stack,n=t.pop(),s=t.pop();t.push(s*n/64)}function Hc(e){let t=e.stack,n=t.pop();t.push(Math.abs(n))}function Vc(e){let t=e.stack,n=t.pop();t.push(-n)}function zc(e){let t=e.stack,n=t.pop();t.push(Math.floor(n/64)*64)}function jc(e){let t=e.stack,n=t.pop();t.push(Math.ceil(n/64)*64)}function ps(e,t){let n=t.stack,s=n.pop();n.push(t.round(s/64)*64)}function Wc(e){let t=e.stack,n=t.pop(),s=t.pop();e.cvt[s]=n*e.ppem/e.font.unitsPerEm}function Qs(e,t){let n=t.stack,s=n.pop(),r=t.ppem,o=t.deltaBase+(e-1)*16,i=t.deltaShift;for(let a=0;a<s;a++){let l=n.pop(),c=n.pop();if(o+((c&240)>>4)!==r)continue;let m=(c&15)-8;m>=0&&m++;let d=m*i;t.cvt[l]+=d}}function qc(e){let t=e.stack.pop();e.round=qo;let n;switch(t&192){case 0:n=.5;break;case 64:n=1;break;case 128:n=2;break;default:throw new Error("invalid SROUND value")}switch(e.srPeriod=n,t&48){case 0:e.srPhase=0;break;case 16:e.srPhase=.25*n;break;case 32:e.srPhase=.5*n;break;case 48:e.srPhase=.75*n;break;default:throw new Error("invalid SROUND value")}t&=15,t===0?e.srThreshold=0:e.srThreshold=(t/8-.5)*n}function $c(e){let t=e.stack.pop();e.round=qo;let n;switch(t&192){case 0:n=Math.sqrt(2)/2;break;case 64:n=Math.sqrt(2);break;case 128:n=2*Math.sqrt(2);break;default:throw new Error("invalid S45ROUND value")}switch(e.srPeriod=n,t&48){case 0:e.srPhase=0;break;case 16:e.srPhase=.25*n;break;case 32:e.srPhase=.5*n;break;case 48:e.srPhase=.75*n;break;default:throw new Error("invalid S45ROUND value")}t&=15,t===0?e.srThreshold=0:e.srThreshold=(t/8-.5)*n}function Xc(e){e.round=Lu}function Yc(e){e.round=Du}function Zc(e){e.round=Fu}function Kc(e){let t=e.stack.pop()}function li(e,t){let n=t.stack,s=n.pop(),r=n.pop(),o=t.z2[s],i=t.z1[r],a,l;e?(a=o.y-i.y,l=i.x-o.x):(a=i.x-o.x,l=i.y-o.y),t.dpv=Dn(a,l)}function Qc(e){let t=e.stack,n=t.pop(),s=0;n&1&&(s=35),n&32&&(s|=4096),t.push(s)}function Jc(e){let t=e.stack,n=t.pop(),s=t.pop(),r=t.pop();t.push(s),t.push(n),t.push(r)}function ef(e){let t=e.stack,n=t.pop(),s=t.pop();t.push(Math.max(s,n))}function tf(e){let t=e.stack,n=t.pop(),s=t.pop();t.push(Math.min(s,n))}function nf(e){let t=e.stack.pop()}function sf(e){let t=e.stack.pop(),n=e.stack.pop();switch(t){case 1:e.inhibitGridFit=!!n;return;case 2:e.ignoreCvt=!!n;return;default:throw new Error("invalid INSTCTRL[] selector")}}function Lt(e,t){let n=t.stack,s=t.prog,r=t.ip;for(let o=0;o<e;o++)n.push(s[++r]);t.ip=r}function At(e,t){let n=t.ip,s=t.prog,r=t.stack;for(let o=0;o<e;o++){let i=s[++n]<<8|s[++n];i&32768&&(i=-((i^65535)+1)),r.push(i)}t.ip=n}function N(e,t,n,s,r,o){let i=o.stack,a=e&&i.pop(),l=i.pop(),c=o.rp0,u=o.z0[c],m=o.z1[l],d=o.minDis,x=o.fv,v=o.dpv,S,I,_,P;I=S=v.distance(m,u,!0,!0),_=I>=0?1:-1,I=Math.abs(I),e&&(P=o.cvt[a],s&&Math.abs(I-P)<o.cvCutIn&&(I=P)),n&&I<d&&(I=d),s&&(I=o.round(I)),x.setRelative(m,u,_*I,v),x.touch(m),o.rp1=o.rp0,o.rp2=l,t&&(o.rp0=l)}Vo=[Xo.bind(void 0,kt),Xo.bind(void 0,bt),Yo.bind(void 0,kt),Yo.bind(void 0,bt),Zo.bind(void 0,kt),Zo.bind(void 0,bt),Ko.bind(void 0,0),Ko.bind(void 0,1),Qo.bind(void 0,0),Qo.bind(void 0,1),Mu,Pu,Nu,Bu,_u,Gu,Hu,Vu,zu,ju,Wu,qu,$u,Xu,Yu,Zu,Ku,Qu,Ju,ec,void 0,void 0,tc,Zs,nc,sc,rc,ac,lc,void 0,void 0,void 0,oc,ic,uc,void 0,Jo.bind(void 0,0),Jo.bind(void 0,1),ei.bind(void 0,kt),ei.bind(void 0,bt),ti.bind(void 0,0),ti.bind(void 0,1),ni.bind(void 0,0),ni.bind(void 0,1),si.bind(void 0,0),si.bind(void 0,1),cc,fc,ri.bind(void 0,0),ri.bind(void 0,1),pc,hc,oi.bind(void 0,0),oi.bind(void 0,1),dc,gc,mc,yc,bc,vc,ii.bind(void 0,0),ii.bind(void 0,1),void 0,ai.bind(void 0,0),ai.bind(void 0,1),xc,void 0,Sc,void 0,void 0,kc,Tc,Cc,Oc,Ic,wc,Ec,Lc,Ac,Rc,Dc,Fc,Uc,Ks.bind(void 0,1),Mc,Pc,Nc,Bc,_c,Gc,Hc,Vc,zc,jc,ps.bind(void 0,0),ps.bind(void 0,1),ps.bind(void 0,2),ps.bind(void 0,3),void 0,void 0,void 0,void 0,Wc,Ks.bind(void 0,2),Ks.bind(void 0,3),Qs.bind(void 0,1),Qs.bind(void 0,2),Qs.bind(void 0,3),qc,$c,void 0,void 0,Xc,void 0,Yc,Zc,Zs,Zs,void 0,void 0,void 0,void 0,void 0,Kc,li.bind(void 0,0),li.bind(void 0,1),Qc,void 0,Jc,ef,tf,nf,sf,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,Lt.bind(void 0,1),Lt.bind(void 0,2),Lt.bind(void 0,3),Lt.bind(void 0,4),Lt.bind(void 0,5),Lt.bind(void 0,6),Lt.bind(void 0,7),Lt.bind(void 0,8),At.bind(void 0,1),At.bind(void 0,2),At.bind(void 0,3),At.bind(void 0,4),At.bind(void 0,5),At.bind(void 0,6),At.bind(void 0,7),At.bind(void 0,8),N.bind(void 0,0,0,0,0,0),N.bind(void 0,0,0,0,0,1),N.bind(void 0,0,0,0,0,2),N.bind(void 0,0,0,0,0,3),N.bind(void 0,0,0,0,1,0),N.bind(void 0,0,0,0,1,1),N.bind(void 0,0,0,0,1,2),N.bind(void 0,0,0,0,1,3),N.bind(void 0,0,0,1,0,0),N.bind(void 0,0,0,1,0,1),N.bind(void 0,0,0,1,0,2),N.bind(void 0,0,0,1,0,3),N.bind(void 0,0,0,1,1,0),N.bind(void 0,0,0,1,1,1),N.bind(void 0,0,0,1,1,2),N.bind(void 0,0,0,1,1,3),N.bind(void 0,0,1,0,0,0),N.bind(void 0,0,1,0,0,1),N.bind(void 0,0,1,0,0,2),N.bind(void 0,0,1,0,0,3),N.bind(void 0,0,1,0,1,0),N.bind(void 0,0,1,0,1,1),N.bind(void 0,0,1,0,1,2),N.bind(void 0,0,1,0,1,3),N.bind(void 0,0,1,1,0,0),N.bind(void 0,0,1,1,0,1),N.bind(void 0,0,1,1,0,2),N.bind(void 0,0,1,1,0,3),N.bind(void 0,0,1,1,1,0),N.bind(void 0,0,1,1,1,1),N.bind(void 0,0,1,1,1,2),N.bind(void 0,0,1,1,1,3),N.bind(void 0,1,0,0,0,0),N.bind(void 0,1,0,0,0,1),N.bind(void 0,1,0,0,0,2),N.bind(void 0,1,0,0,0,3),N.bind(void 0,1,0,0,1,0),N.bind(void 0,1,0,0,1,1),N.bind(void 0,1,0,0,1,2),N.bind(void 0,1,0,0,1,3),N.bind(void 0,1,0,1,0,0),N.bind(void 0,1,0,1,0,1),N.bind(void 0,1,0,1,0,2),N.bind(void 0,1,0,1,0,3),N.bind(void 0,1,0,1,1,0),N.bind(void 0,1,0,1,1,1),N.bind(void 0,1,0,1,1,2),N.bind(void 0,1,0,1,1,3),N.bind(void 0,1,1,0,0,0),N.bind(void 0,1,1,0,0,1),N.bind(void 0,1,1,0,0,2),N.bind(void 0,1,1,0,0,3),N.bind(void 0,1,1,0,1,0),N.bind(void 0,1,1,0,1,1),N.bind(void 0,1,1,0,1,2),N.bind(void 0,1,1,0,1,3),N.bind(void 0,1,1,1,0,0),N.bind(void 0,1,1,1,0,1),N.bind(void 0,1,1,1,0,2),N.bind(void 0,1,1,1,0,3),N.bind(void 0,1,1,1,1,0),N.bind(void 0,1,1,1,1,1),N.bind(void 0,1,1,1,1,2),N.bind(void 0,1,1,1,1,3)];var rf=jo;function dn(e){this.char=e,this.state={},this.activeState=null}function Js(e,t,n){this.contextName=n,this.startIndex=e,this.endOffset=t}function of(e,t,n){this.contextName=e,this.openRange=null,this.ranges=[],this.checkStart=t,this.checkEnd=n}function Re(e,t){this.context=e,this.index=t,this.length=e.length,this.current=e[t],this.backtrack=e.slice(0,t),this.lookahead=e.slice(t+1)}function hs(e){this.eventId=e,this.subscribers=[]}function af(e){let t=["start","end","next","newToken","contextStart","contextEnd","insertToken","removeToken","removeRange","replaceToken","replaceRange","composeRUD","updateContextsRanges"];for(let s=0;s<t.length;s++){let r=t[s];Object.defineProperty(this.events,r,{value:new hs(r)})}if(e)for(let s=0;s<t.length;s++){let r=t[s],o=e[r];typeof o=="function"&&this.events[r].subscribe(o)}let n=["insertToken","removeToken","removeRange","replaceToken","replaceRange","composeRUD"];for(let s=0;s<n.length;s++){let r=n[s];this.events[r].subscribe(this.updateContextsRanges)}}function he(e){this.tokens=[],this.registeredContexts={},this.contextCheckers=[],this.events={},this.registeredModifiers=[],af.call(this,e)}dn.prototype.setState=function(e,t){return this.state[e]=t,this.activeState={key:e,value:this.state[e]},this.activeState},dn.prototype.getState=function(e){return this.state[e]||null},he.prototype.inboundIndex=function(e){return e>=0&&e<this.tokens.length},he.prototype.composeRUD=function(e){let n=e.map(r=>this[r[0]].apply(this,r.slice(1).concat(!0))),s=r=>typeof r=="object"&&Object.prototype.hasOwnProperty.call(r,"FAIL");if(n.every(s))return{FAIL:"composeRUD: one or more operations hasn't completed successfully",report:n.filter(s)};this.dispatch("composeRUD",[n.filter(r=>!s(r))])},he.prototype.replaceRange=function(e,t,n,s){t=t!==null?t:this.tokens.length;let r=n.every(o=>o instanceof dn);if(!isNaN(e)&&this.inboundIndex(e)&&r){let o=this.tokens.splice.apply(this.tokens,[e,t].concat(n));return s||this.dispatch("replaceToken",[e,t,n]),[o,n]}else return{FAIL:"replaceRange: invalid tokens or startIndex."}},he.prototype.replaceToken=function(e,t,n){if(!isNaN(e)&&this.inboundIndex(e)&&t instanceof dn){let s=this.tokens.splice(e,1,t);return n||this.dispatch("replaceToken",[e,t]),[s[0],t]}else return{FAIL:"replaceToken: invalid token or index."}},he.prototype.removeRange=function(e,t,n){t=isNaN(t)?this.tokens.length:t;let s=this.tokens.splice(e,t);return n||this.dispatch("removeRange",[s,e,t]),s},he.prototype.removeToken=function(e,t){if(!isNaN(e)&&this.inboundIndex(e)){let n=this.tokens.splice(e,1);return t||this.dispatch("removeToken",[n,e]),n}else return{FAIL:"removeToken: invalid token index."}},he.prototype.insertToken=function(e,t,n){return e.every(r=>r instanceof dn)?(this.tokens.splice.apply(this.tokens,[t,0].concat(e)),n||this.dispatch("insertToken",[e,t]),e):{FAIL:"insertToken: invalid token(s)."}},he.prototype.registerModifier=function(e,t,n){this.events.newToken.subscribe(function(s,r){let o=[s,r],i=t===null||t.apply(this,o)===!0,a=[s,r];if(i){let l=n.apply(this,a);s.setState(e,l)}}),this.registeredModifiers.push(e)},hs.prototype.subscribe=function(e){return typeof e=="function"?this.subscribers.push(e)-1:{FAIL:`invalid '${this.eventId}' event handler`}},hs.prototype.unsubscribe=function(e){this.subscribers.splice(e,1)},Re.prototype.setCurrentIndex=function(e){this.index=e,this.current=this.context[e],this.backtrack=this.context.slice(0,e),this.lookahead=this.context.slice(e+1)},Re.prototype.get=function(e){switch(!0){case e===0:return this.current;case(e<0&&Math.abs(e)<=this.backtrack.length):return this.backtrack.slice(e)[0];case(e>0&&e<=this.lookahead.length):return this.lookahead[e-1];default:return null}},he.prototype.rangeToText=function(e){if(e instanceof Js)return this.getRangeTokens(e).map(t=>t.char).join("")},he.prototype.getText=function(){return this.tokens.map(e=>e.char).join("")},he.prototype.getContext=function(e){let t=this.registeredContexts[e];return t||null},he.prototype.on=function(e,t){let n=this.events[e];return n?n.subscribe(t):null},he.prototype.dispatch=function(e,t){let n=this.events[e];if(n instanceof hs)for(let s=0;s<n.subscribers.length;s++)n.subscribers[s].apply(this,t||[])},he.prototype.registerContextChecker=function(e,t,n){if(this.getContext(e))return{FAIL:`context name '${e}' is already registered.`};if(typeof t!="function")return{FAIL:"missing context start check."};if(typeof n!="function")return{FAIL:"missing context end check."};let s=new of(e,t,n);return this.registeredContexts[e]=s,this.contextCheckers.push(s),s},he.prototype.getRangeTokens=function(e){let t=e.startIndex+e.endOffset;return[].concat(this.tokens.slice(e.startIndex,t))},he.prototype.getContextRanges=function(e){let t=this.getContext(e);return t?t.ranges:{FAIL:`context checker '${e}' is not registered.`}},he.prototype.resetContextsRanges=function(){let e=this.registeredContexts;for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];n.ranges=[]}},he.prototype.updateContextsRanges=function(){this.resetContextsRanges();let e=this.tokens.map(t=>t.char);for(let t=0;t<e.length;t++){let n=new Re(e,t);this.runContextCheck(n)}this.dispatch("updateContextsRanges",[this.registeredContexts])},he.prototype.setEndOffset=function(e,t){let n=this.getContext(t).openRange.startIndex,s=new Js(n,e,t),r=this.getContext(t).ranges;return s.rangeId=`${t}.${r.length}`,r.push(s),this.getContext(t).openRange=null,s},he.prototype.runContextCheck=function(e){let t=e.index;for(let n=0;n<this.contextCheckers.length;n++){let s=this.contextCheckers[n],r=s.contextName,o=this.getContext(r).openRange;if(!o&&s.checkStart(e)&&(o=new Js(t,null,r),this.getContext(r).openRange=o,this.dispatch("contextStart",[r,t])),o&&s.checkEnd(e)){let i=t-o.startIndex+1,a=this.setEndOffset(i,r);this.dispatch("contextEnd",[r,a])}}},he.prototype.tokenize=function(e){this.tokens=[],this.resetContextsRanges();let t=Array.from(e);this.dispatch("start");for(let n=0;n<t.length;n++){let s=t[n],r=new Re(t,n);this.dispatch("next",[r]),this.runContextCheck(r);let o=new dn(s);this.tokens.push(o),this.dispatch("newToken",[o,r])}return this.dispatch("end",[this.tokens]),this.tokens};var lf=he;function Rt(e){return/[\u0600-\u065F\u066A-\u06D2\u06FA-\u06FF]/.test(e)}function ui(e){return/[\u0630\u0690\u0621\u0631\u0661\u0671\u0622\u0632\u0672\u0692\u06C2\u0623\u0673\u0693\u06C3\u0624\u0694\u06C4\u0625\u0675\u0695\u06C5\u06E5\u0676\u0696\u06C6\u0627\u0677\u0697\u06C7\u0648\u0688\u0698\u06C8\u0689\u0699\u06C9\u068A\u06CA\u066B\u068B\u06CB\u068C\u068D\u06CD\u06FD\u068E\u06EE\u06FE\u062F\u068F\u06CF\u06EF]/.test(e)}function Dt(e){return/[\u0600-\u0605\u060C-\u060E\u0610-\u061B\u061E\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED]/.test(e)}function ds(e){return/[\u0E00-\u0E7F]/.test(e)}function gs(e){return/[A-z]/.test(e)}function uf(e){return/\s/.test(e)}function He(e){this.font=e,this.features={}}function Ft(e){this.id=e.id,this.tag=e.tag,this.substitution=e.substitution}function Ut(e,t){if(!e)return-1;switch(t.format){case 1:return t.glyphs.indexOf(e);case 2:{let n=t.ranges;for(let s=0;s<n.length;s++){let r=n[s];if(e>=r.start&&e<=r.end){let o=e-r.start;return r.index+o}}break}default:return-1}return-1}function cf(e,t){return Ut(e,t.coverage)===-1?null:e+t.deltaGlyphId}function ff(e,t){let n=Ut(e,t.coverage);return n===-1?null:t.substitute[n]}function er(e,t){let n=[];for(let s=0;s<e.length;s++){let r=e[s],o=t.current;o=Array.isArray(o)?o[0]:o;let i=Ut(o,r);i!==-1&&n.push(i)}return n.length!==e.length?-1:n}function pf(e,t){let n=t.inputCoverage.length+t.lookaheadCoverage.length+t.backtrackCoverage.length;if(e.context.length<n)return[];let s=er(t.inputCoverage,e);if(s===-1)return[];let r=t.inputCoverage.length-1;if(e.lookahead.length<t.lookaheadCoverage.length)return[];let o=e.lookahead.slice(r);for(;o.length&&Dt(o[0].char);)o.shift();let i=new Re(o,0),a=er(t.lookaheadCoverage,i),l=[].concat(e.backtrack);for(l.reverse();l.length&&Dt(l[0].char);)l.shift();if(l.length<t.backtrackCoverage.length)return[];let c=new Re(l,0),u=er(t.backtrackCoverage,c),m=s.length===t.inputCoverage.length&&a.length===t.lookaheadCoverage.length&&u.length===t.backtrackCoverage.length,d=[];if(m)for(let x=0;x<t.lookupRecords.length;x++){let v=t.lookupRecords[x],S=v.lookupListIndex,I=this.getLookupByIndex(S);for(let _=0;_<I.subtables.length;_++){let P=I.subtables[_],z,Y=this.getSubstitutionType(I,P);if(Y==="71"?(Y=this.getSubstitutionType(P,P.extension),z=this.getLookupMethod(P,P.extension),P=P.extension):z=this.getLookupMethod(I,P),Y==="12"){let re=e.get(v.sequenceIndex),ie=z(re);ie&&d.push(ie)}else if(Y==="21"){let re=e.get(v.sequenceIndex),ie=z(re);ie&&d.push(ie)}else throw new Error(`Substitution type ${Y} is not supported in chaining substitution`)}}return d}function hf(e,t){let n=e.current,s=Ut(n,t.coverage);if(s===-1)return null;let r,o=t.ligatureSets[s];for(let i=0;i<o.length;i++){r=o[i];for(let a=0;a<r.components.length;a++){let l=e.lookahead[a],c=r.components[a];if(l!==c)break;if(a===r.components.length-1)return r}}return null}function df(e,t){let n=e.current;if(Ut(n,t.coverage)===-1)return null;for(let r of t.ruleSets)for(let o of r){let i=!0;for(let a=0;a<o.input.length;a++)if(e.lookahead[a]!==o.input[a]){i=!1;break}if(i){let a=[];a.push(n);for(let c=0;c<o.input.length;c++)a.push(o.input[c]);let l=(c,u)=>{let{lookupListIndex:m,sequenceIndex:d}=u,{subtables:x}=this.getLookupByIndex(m);for(let v of x)Ut(c[d],v.coverage)!==-1&&(c[d]=v.deltaGlyphId)};for(let c=0;c<o.lookupRecords.length;c++){let u=o.lookupRecords[c];l(a,u)}return a}}return null}function gf(e,t){if(e.context.length<t.coverages.length)return[];for(let s=0;s<t.coverages.length;s++){let r=e.get(s);if(r=Array.isArray(r)?r[0]:r,Ut(r,t.coverages[s])===-1)return[]}let n=[];for(let s=0;s<t.lookupRecords.length;s++){let r=t.lookupRecords[s],o=r.lookupListIndex,i=this.getLookupByIndex(o);for(let a=0;a<i.subtables.length;a++){let l=i.subtables[a],c,u=this.getSubstitutionType(i,l);if(u==="71"?(u=this.getSubstitutionType(l,l.extension),c=this.getLookupMethod(l,l.extension),l=l.extension):c=this.getLookupMethod(i,l),u==="12"){let m=e.get(r.sequenceIndex),d=c(m);d&&n.push(d)}else if(u==="21"){let m=e.get(r.sequenceIndex),d=c(m);d&&n.push(d)}}}return n}function mf(e,t){let n=Ut(e,t.coverage);return n===-1?null:t.sequences[n]}He.prototype.getDefaultScriptFeaturesIndexes=function(){let e=this.font.tables.gsub.scripts;for(let t=0;t<e.length;t++){let n=e[t];if(n.tag==="DFLT")return n.script.defaultLangSys.featureIndexes}return[]},He.prototype.getScriptFeaturesIndexes=function(e){if(!this.font.tables.gsub)return[];if(!e)return this.getDefaultScriptFeaturesIndexes();let n=this.font.tables.gsub.scripts;for(let s=0;s<n.length;s++){let r=n[s];if(r.tag===e&&r.script.defaultLangSys)return r.script.defaultLangSys.featureIndexes;{let o=r.langSysRecords;if(o)for(let i=0;i<o.length;i++){let a=o[i];if(a.tag===e)return a.langSys.featureIndexes}}}return this.getDefaultScriptFeaturesIndexes()},He.prototype.mapTagsToFeatures=function(e,t){let n={};for(let s=0;s<e.length;s++){let r=e[s].tag,o=e[s].feature;n[r]=o}this.features[t].tags=n},He.prototype.getScriptFeatures=function(e){let t=this.features[e];if(Object.prototype.hasOwnProperty.call(this.features,e))return t;let n=this.getScriptFeaturesIndexes(e);if(!n)return null;let s=this.font.tables.gsub;return t=n.map(r=>s.features[r]),this.features[e]=t,this.mapTagsToFeatures(t,e),t},He.prototype.getSubstitutionType=function(e,t){let n=e.lookupType.toString(),s=t.substFormat.toString();return n+s},He.prototype.getLookupMethod=function(e,t){let n=this.getSubstitutionType(e,t);switch(n){case"11":return s=>cf.apply(this,[s,t]);case"12":return s=>ff.apply(this,[s,t]);case"63":return s=>pf.apply(this,[s,t]);case"41":return s=>hf.apply(this,[s,t]);case"21":return s=>mf.apply(this,[s,t]);case"51":return s=>df.apply(this,[s,t]);case"53":return s=>gf.apply(this,[s,t]);default:throw new Error(`substitutionType : ${n} lookupType: ${e.lookupType} - substFormat: ${t.substFormat} is not yet supported`)}},He.prototype.lookupFeature=function(e){let t=e.contextParams,n=t.index,s=this.getFeature({tag:e.tag,script:e.script});if(!s)return new Error(`font '${(this.font.names.unicode||this.font.names.windows||this.font.names.macintosh).fullName.en}' doesn't support feature '${e.tag}' for script '${e.script}'.`);let r=this.getFeatureLookups(s),o=[].concat(t.context);for(let i=0;i<r.length;i++){let a=r[i],l=this.getLookupSubtables(a);for(let c=0;c<l.length;c++){let u=l[c],m=this.getSubstitutionType(a,u),d;m==="71"?(m=this.getSubstitutionType(u,u.extension),d=this.getLookupMethod(u,u.extension),u=u.extension):d=this.getLookupMethod(a,u);let x;switch(m){case"11":x=d(t.current),x&&o.splice(n,1,new Ft({id:11,tag:e.tag,substitution:x}));break;case"12":x=d(t.current),x&&o.splice(n,1,new Ft({id:12,tag:e.tag,substitution:x}));break;case"63":x=d(t),Array.isArray(x)&&x.length&&o.splice(n,1,new Ft({id:63,tag:e.tag,substitution:x}));break;case"41":x=d(t),x&&o.splice(n,1,new Ft({id:41,tag:e.tag,substitution:x}));break;case"21":x=d(t.current),x&&o.splice(n,1,new Ft({id:21,tag:e.tag,substitution:x}));break;case"51":case"53":x=d(t),Array.isArray(x)&&x.length&&o.splice(n,1,new Ft({id:parseInt(m),tag:e.tag,substitution:x}));break}t=new Re(o,n),!(Array.isArray(x)&&!x.length)&&(x=null)}}return o.length?o:null},He.prototype.supports=function(e){if(!e.script)return!1;this.getScriptFeatures(e.script);let t=Object.prototype.hasOwnProperty.call(this.features,e.script);if(!e.tag)return t;let n=this.features[e.script].some(s=>s.tag===e.tag);return t&&n},He.prototype.getLookupSubtables=function(e){return e.subtables||null},He.prototype.getLookupByIndex=function(e){return this.font.tables.gsub.lookups[e]||null},He.prototype.getFeatureLookups=function(e){return e.lookupListIndexes.map(this.getLookupByIndex.bind(this))},He.prototype.getFeature=function(t){if(!this.font)return{FAIL:"No font was found"};Object.prototype.hasOwnProperty.call(this.features,t.script)||this.getScriptFeatures(t.script);let n=this.features[t.script];return n?n.tags[t.tag]?this.features[t.script].tags[t.tag]:null:{FAIL:`No feature for script ${t.script}`}};var yf=He;function bf(e){let t=e.current,n=e.get(-1);return n===null&&Rt(t)||!Rt(n)&&Rt(t)}function vf(e){let t=e.get(1);return t===null||!Rt(t)}var xf={startCheck:bf,endCheck:vf};function Sf(e){let t=e.current,n=e.get(-1);return(Rt(t)||Dt(t))&&!Rt(n)}function kf(e){let t=e.get(1);switch(!0){case t===null:return!0;case(!Rt(t)&&!Dt(t)):{let n=uf(t);if(!n)return!0;if(n){let s=!1;if(s=e.lookahead.some(r=>Rt(r)||Dt(r)),!s)return!0}break}default:return!1}}var Tf={startCheck:Sf,endCheck:kf};function Cf(e,t,n){t[n].setState(e.tag,e.substitution)}function Of(e,t,n){t[n].setState(e.tag,e.substitution)}function tr(e,t,n){for(let s=0;s<e.substitution.length;s++){let r=e.substitution[s],o=t[n+s];if(Array.isArray(r)){r.length?o.setState(e.tag,r[0]):o.setState("deleted",!0);continue}o.setState(e.tag,r)}}function If(e,t,n){let s=t[n];s.setState(e.tag,e.substitution.ligGlyph);let r=e.substitution.components.length;for(let o=0;o<r;o++)s=t[n+o+1],s.setState("deleted",!0)}var ci={11:Cf,12:Of,63:tr,41:If,51:tr,53:tr};function wf(e,t,n){e instanceof Ft&&ci[e.id]&&ci[e.id](e,t,n)}var Zt=wf;function Ef(e){let t=[].concat(e.backtrack);for(let n=t.length-1;n>=0;n--){let s=t[n],r=ui(s),o=Dt(s);if(!r&&!o)return!0;if(r)return!1}return!1}function Lf(e){if(ui(e.current))return!1;for(let t=0;t<e.lookahead.length;t++){let n=e.lookahead[t];if(!Dt(n))return!0}return!1}function Af(e){let t="arab",n=this.featuresTags[t],s=this.tokenizer.getRangeTokens(e);if(s.length===1)return;let r=new Re(s.map(i=>i.getState("glyphIndex")),0),o=new Re(s.map(i=>i.char),0);for(let i=0;i<s.length;i++){let a=s[i];if(Dt(a.char))continue;r.setCurrentIndex(i),o.setCurrentIndex(i);let l=0;Ef(o)&&(l|=1),Lf(o)&&(l|=2);let c;switch(l){case 1:c="fina";break;case 2:c="init";break;case 3:c="medi";break}if(n.indexOf(c)===-1)continue;let u=this.query.lookupFeature({tag:c,script:t,contextParams:r});if(u instanceof Error){console.info(u.message);continue}for(let m=0;m<u.length;m++){let d=u[m];d instanceof Ft&&(Zt(d,s,m),r.context[m]=d.substitution)}}}var Rf=Af;function fi(e,t){let n=e.map(s=>s.activeState.value);return new Re(n,t||0)}function Df(e){let t="arab",n=this.tokenizer.getRangeTokens(e),s=fi(n);for(let r=0;r<s.context.length;r++){s.setCurrentIndex(r);let o=this.query.lookupFeature({tag:"rlig",script:t,contextParams:s});if(o.length){for(let i=0;i<o.length;i++){let a=o[i];Zt(a,n,r)}s=fi(n)}}}var Ff=Df;function Uf(e){return e.index===0&&e.context.length>1}function Mf(e){return e.index===e.context.length-1}var Pf={startCheck:Uf,endCheck:Mf};function pi(e,t){let n=e.map(s=>s.activeState.value);return new Re(n,t||0)}function Nf(e){let t="delf",n="ccmp",s=this.tokenizer.getRangeTokens(e),r=pi(s);for(let o=0;o<r.context.length;o++){if(!this.query.getFeature({tag:n,script:t,contextParams:r}))continue;r.setCurrentIndex(o);let i=this.query.lookupFeature({tag:n,script:t,contextParams:r});if(i.length){for(let a=0;a<i.length;a++){let l=i[a];Zt(l,s,o)}r=pi(s)}}}var Bf=Nf;function _f(e){let t=e.current,n=e.get(-1);return n===null&&gs(t)||!gs(n)&&gs(t)}function Gf(e){let t=e.get(1);return t===null||!gs(t)}var Hf={startCheck:_f,endCheck:Gf};function hi(e,t){let n=e.map(s=>s.activeState.value);return new Re(n,t||0)}function Vf(e){let t="latn",n=this.tokenizer.getRangeTokens(e),s=hi(n);for(let r=0;r<s.context.length;r++){s.setCurrentIndex(r);let o=this.query.lookupFeature({tag:"liga",script:t,contextParams:s});if(o.length){for(let i=0;i<o.length;i++){let a=o[i];Zt(a,n,r)}s=hi(n)}}}var zf=Vf;function jf(e){let t=e.current,n=e.get(-1);return n===null&&ds(t)||!ds(n)&&ds(t)}function Wf(e){let t=e.get(1);return t===null||!ds(t)}var qf={startCheck:jf,endCheck:Wf};function di(e,t){let n=e.map(s=>s.activeState.value);return new Re(n,t||0)}function $f(e){let t="thai",n=this.tokenizer.getRangeTokens(e),s=di(n,0);for(let r=0;r<s.context.length;r++){s.setCurrentIndex(r);let o=this.query.lookupFeature({tag:"ccmp",script:t,contextParams:s});if(o.length){for(let i=0;i<o.length;i++){let a=o[i];Zt(a,n,r)}s=di(n,r)}}}var Xf=$f;function gi(e,t){let n=e.map(s=>s.activeState.value);return new Re(n,t||0)}function Yf(e){let t="thai",n=this.tokenizer.getRangeTokens(e),s=gi(n,0);for(let r=0;r<s.context.length;r++){s.setCurrentIndex(r);let o=this.query.lookupFeature({tag:"liga",script:t,contextParams:s});if(o.length){for(let i=0;i<o.length;i++){let a=o[i];Zt(a,n,r)}s=gi(n,r)}}}var Zf=Yf;function mi(e,t){let n=e.map(s=>s.activeState.value);return new Re(n,t||0)}function Kf(e){let t="thai",n=this.tokenizer.getRangeTokens(e),s=mi(n,0);for(let r=0;r<s.context.length;r++){s.setCurrentIndex(r);let o=this.query.lookupFeature({tag:"rlig",script:t,contextParams:s});if(o.length){for(let i=0;i<o.length;i++){let a=o[i];Zt(a,n,r)}s=mi(n,r)}}}var Qf=Kf;function nr(e){if(e===null)return!1;let t=e.codePointAt(0);return t>=6155&&t<=6157||t>=65024&&t<=65039||t>=917760&&t<=917999}function Jf(e){let t=e.current,n=e.get(1);return n===null&&nr(t)||nr(n)}function ep(e){let t=e.get(1);return t===null||!nr(t)}var tp={startCheck:Jf,endCheck:ep};function np(e){let t=this.query.font,n=this.tokenizer.getRangeTokens(e);if(n[1].setState("deleted",!0),t.tables.cmap&&t.tables.cmap.varSelectorList){let s=n[0].char.codePointAt(0),r=n[1].char.codePointAt(0),o=t.tables.cmap.varSelectorList[r];if(o!==void 0&&o.nonDefaultUVS){let i=o.nonDefaultUVS.uvsMappings;if(i[s]){let a=i[s].glyphID;t.glyphs.glyphs[a]!==void 0&&n[0].setState("glyphIndex",a)}}}}var sp=np;function Ze(e){this.baseDir=e||"ltr",this.tokenizer=new lf,this.featuresTags={}}Ze.prototype.setText=function(e){this.text=e},Ze.prototype.contextChecks={ccmpReplacementCheck:Pf,latinWordCheck:Hf,arabicWordCheck:xf,arabicSentenceCheck:Tf,thaiWordCheck:qf,unicodeVariationSequenceCheck:tp};function gn(e){let t=this.contextChecks[`${e}Check`];return this.tokenizer.registerContextChecker(e,t.startCheck,t.endCheck)}function rp(){return gn.call(this,"ccmpReplacement"),gn.call(this,"latinWord"),gn.call(this,"arabicWord"),gn.call(this,"arabicSentence"),gn.call(this,"thaiWord"),gn.call(this,"unicodeVariationSequence"),this.tokenizer.tokenize(this.text)}function op(){let e=this.tokenizer.getContextRanges("arabicSentence");for(let t=0;t<e.length;t++){let n=e[t],s=this.tokenizer.getRangeTokens(n);this.tokenizer.replaceRange(n.startIndex,n.endOffset,s.reverse())}}Ze.prototype.registerFeatures=function(e,t){let n=t.filter(s=>this.query.supports({script:e,tag:s}));Object.prototype.hasOwnProperty.call(this.featuresTags,e)?this.featuresTags[e]=this.featuresTags[e].concat(n):this.featuresTags[e]=n},Ze.prototype.applyFeatures=function(e,t){if(!e)throw new Error("No valid font was provided to apply features");this.query||(this.query=new yf(e));for(let n=0;n<t.length;n++){let s=t[n];this.query.supports({script:s.script})&&this.registerFeatures(s.script,s.tags)}},Ze.prototype.registerModifier=function(e,t,n){this.tokenizer.registerModifier(e,t,n)};function Un(){if(this.tokenizer.registeredModifiers.indexOf("glyphIndex")===-1)throw new Error("glyphIndex modifier is required to apply arabic presentation features.")}function ip(){if(!Object.prototype.hasOwnProperty.call(this.featuresTags,"arab"))return;Un.call(this);let t=this.tokenizer.getContextRanges("arabicWord");for(let n=0;n<t.length;n++){let s=t[n];Rf.call(this,s)}}function ap(){Un.call(this);let e=this.tokenizer.getContextRanges("ccmpReplacement");for(let t=0;t<e.length;t++){let n=e[t];Bf.call(this,n)}}function lp(){if(!this.hasFeatureEnabled("arab","rlig"))return;Un.call(this);let e=this.tokenizer.getContextRanges("arabicWord");for(let t=0;t<e.length;t++){let n=e[t];Ff.call(this,n)}}function up(){if(!this.hasFeatureEnabled("latn","liga"))return;Un.call(this);let e=this.tokenizer.getContextRanges("latinWord");for(let t=0;t<e.length;t++){let n=e[t];zf.call(this,n)}}function cp(){let e=this.tokenizer.getContextRanges("unicodeVariationSequence");for(let t=0;t<e.length;t++){let n=e[t];sp.call(this,n)}}function fp(){Un.call(this);let e=this.tokenizer.getContextRanges("thaiWord");for(let t=0;t<e.length;t++){let n=e[t];this.hasFeatureEnabled("thai","liga")&&Zf.call(this,n),this.hasFeatureEnabled("thai","rlig")&&Qf.call(this,n),this.hasFeatureEnabled("thai","ccmp")&&Xf.call(this,n)}}Ze.prototype.checkContextReady=function(e){return!!this.tokenizer.getContext(e)},Ze.prototype.applyFeaturesToContexts=function(){this.checkContextReady("ccmpReplacement")&&ap.call(this),this.checkContextReady("arabicWord")&&(ip.call(this),lp.call(this)),this.checkContextReady("latinWord")&&up.call(this),this.checkContextReady("arabicSentence")&&op.call(this),this.checkContextReady("thaiWord")&&fp.call(this),this.checkContextReady("unicodeVariationSequence")&&cp.call(this)},Ze.prototype.hasFeatureEnabled=function(e,t){return(this.featuresTags[e]||[]).indexOf(t)!==-1},Ze.prototype.processText=function(e){(!this.text||this.text!==e)&&(this.setText(e),rp.call(this),this.applyFeaturesToContexts())},Ze.prototype.getBidiText=function(e){return this.processText(e),this.tokenizer.getText()},Ze.prototype.getTextGlyphs=function(e){this.processText(e);let t=[];for(let n=0;n<this.tokenizer.tokens.length;n++){let s=this.tokenizer.tokens[n];if(s.state.deleted)continue;let r=s.activeState.value;t.push(Array.isArray(r)?r[0]:r)}return t};var pp=Ze;function sr(e){return{fontFamily:{en:e.familyName||" "},fontSubfamily:{en:e.styleName||" "},fullName:{en:e.fullName||e.familyName+" "+e.styleName},postScriptName:{en:e.postScriptName||(e.familyName+e.styleName).replace(/\s/g,"")},designer:{en:e.designer||" "},designerURL:{en:e.designerURL||" "},manufacturer:{en:e.manufacturer||" "},manufacturerURL:{en:e.manufacturerURL||" "},license:{en:e.license||" "},licenseURL:{en:e.licenseURL||" "},version:{en:e.version||"Version 0.1"},description:{en:e.description||" "},copyright:{en:e.copyright||" "},trademark:{en:e.trademark||" "}}}function oe(e){if(e=e||{},e.tables=e.tables||{},!e.empty){if(!e.familyName)throw new Error("When creating a new Font object, familyName is required.");if(!e.styleName)throw new Error("When creating a new Font object, styleName is required.");if(!e.unitsPerEm)throw new Error("When creating a new Font object, unitsPerEm is required.");if(!e.ascender)throw new Error("When creating a new Font object, ascender is required.");if(e.descender>0)throw new Error("When creating a new Font object, negative descender value is required.");this.names={},this.names.unicode=sr(e),this.names.macintosh=sr(e),this.names.windows=sr(e),this.unitsPerEm=e.unitsPerEm||1e3,this.ascender=e.ascender,this.descender=e.descender,this.createdTimestamp=e.createdTimestamp,this.italicAngle=e.italicAngle||0,this.weightClass=e.weightClass||0;let t=0;e.fsSelection?t=e.fsSelection:(this.italicAngle<0?t|=this.fsSelectionValues.ITALIC:this.italicAngle>0&&(t|=this.fsSelectionValues.OBLIQUE),this.weightClass>=600&&(t|=this.fsSelectionValues.BOLD),t===0&&(t=this.fsSelectionValues.REGULAR)),(!e.panose||!Array.isArray(e.panose))&&(e.panose=[0,0,0,0,0,0,0,0,0]),this.tables=Object.assign(e.tables,{os2:Object.assign({usWeightClass:e.weightClass||this.usWeightClasses.MEDIUM,usWidthClass:e.widthClass||this.usWidthClasses.MEDIUM,bFamilyType:e.panose[0]||0,bSerifStyle:e.panose[1]||0,bWeight:e.panose[2]||0,bProportion:e.panose[3]||0,bContrast:e.panose[4]||0,bStrokeVariation:e.panose[5]||0,bArmStyle:e.panose[6]||0,bLetterform:e.panose[7]||0,bMidline:e.panose[8]||0,bXHeight:e.panose[9]||0,fsSelection:t},e.tables.os2)})}this.supported=!0,this.glyphs=new mt.GlyphSet(this,e.glyphs||[]),this.encoding=new qr(this),this.position=new iu(this),this.substitution=new hu(this),this.tables=this.tables||{},this.tables=new Proxy(this.tables,{set:(t,n,s)=>(t[n]=s,t.fvar&&(t.gvar||t.cff2)&&!this.variation&&(this.variation=new Eu(this)),!0)}),this.palettes=new Po(this),this.layers=new du(this),this.svgImages=new gu(this),this._push=null,this._hmtxTableData={},Object.defineProperty(this,"hinting",{get:function(){return this._hinting?this._hinting:this.outlinesFormat==="truetype"?this._hinting=new rf(this):null}})}oe.prototype.hasChar=function(e){return this.encoding.charToGlyphIndex(e)>0},oe.prototype.charToGlyphIndex=function(e){return this.encoding.charToGlyphIndex(e)},oe.prototype.charToGlyph=function(e){let t=this.charToGlyphIndex(e),n=this.glyphs.get(t);return n||(n=this.glyphs.get(0)),n},oe.prototype.updateFeatures=function(e){return this.defaultRenderOptions.features.map(t=>t.script==="latn"?{script:"latn",tags:t.tags.filter(n=>e[n])}:t)},oe.prototype.stringToGlyphIndexes=function(e,t){let n=new pp,s=o=>this.charToGlyphIndex(o.char);n.registerModifier("glyphIndex",null,s);let r=t?this.updateFeatures(t.features):this.defaultRenderOptions.features;return n.applyFeatures(this,r),n.getTextGlyphs(e)},oe.prototype.stringToGlyphs=function(e,t){let n=this.stringToGlyphIndexes(e,t),s=n.length,r=new Array(s),o=this.glyphs.get(0);for(let i=0;i<s;i+=1)r[i]=this.glyphs.get(n[i])||o;return r},oe.prototype.nameToGlyphIndex=function(e){return this.glyphNames.nameToGlyphIndex(e)},oe.prototype.nameToGlyph=function(e){let t=this.nameToGlyphIndex(e),n=this.glyphs.get(t);return n||(n=this.glyphs.get(0)),n},oe.prototype.glyphIndexToName=function(e){return this.glyphNames.glyphIndexToName?this.glyphNames.glyphIndexToName(e):""},oe.prototype.getKerningValue=function(e,t){e=e.index||e,t=t.index||t;let n=this.position.defaultKerningTables;return n?this.position.getKerningValue(n,e,t):this.kerningPairs[e+","+t]||0},oe.prototype.defaultRenderOptions={kerning:!0,features:[{script:"arab",tags:["init","medi","fina","rlig"]},{script:"latn",tags:["liga","rlig"]},{script:"thai",tags:["liga","rlig","ccmp"]}],hinting:!1,usePalette:0,drawLayers:!0,drawSVG:!0},oe.prototype.forEachGlyph=function(e,t,n,s,r,o){t=t!==void 0?t:0,n=n!==void 0?n:0,s=s!==void 0?s:72,r=Object.assign({},this.defaultRenderOptions,r);let i=1/this.unitsPerEm*s,a=this.stringToGlyphs(e,r),l;if(r.kerning){let c=r.script||this.position.getDefaultScriptName();l=this.position.getKerningTables(c,r.language)}for(let c=0;c<a.length;c+=1){let u=a[c];if(o.call(this,u,t,n,s,r),u.advanceWidth&&(t+=u.advanceWidth*i),r.kerning&&c<a.length-1){let m=l?this.position.getKerningValue(l,u.index,a[c+1].index):this.getKerningValue(u,a[c+1]);t+=m*i}r.letterSpacing?t+=r.letterSpacing*s:r.tracking&&(t+=r.tracking/1e3*s)}return t},oe.prototype.getPath=function(e,t,n,s,r){r=Object.assign({},this.defaultRenderOptions,r);let o=new Wt;if(o._layers=[],ro(this,o,s),o.stroke){let i=1/(o.unitsPerEm||1e3)*s;o.strokeWidth*=i}return this.forEachGlyph(e,t,n,s,r,(i,a,l,c)=>{let u=i.getPath(a,l,c,r,this);if(r.drawSVG||r.drawLayers){let m=u._layers;if(m&&m.length){for(let d=0;d<m.length;d++){let x=m[d];o._layers.push(x)}return}}o.extend(u)}),o},oe.prototype.getPaths=function(e,t,n,s,r){r=Object.assign({},this.defaultRenderOptions,r);let o=[];return this.forEachGlyph(e,t,n,s,r,function(i,a,l,c){let u=i.getPath(a,l,c,r,this);o.push(u)}),o},oe.prototype.getAdvanceWidth=function(e,t,n){return n=Object.assign({},this.defaultRenderOptions,n),this.forEachGlyph(e,0,0,t,n,function(){})},oe.prototype.draw=function(e,t,n,s,r,o){this.getPath(t,n,s,r,o).draw(e)},oe.prototype.drawPoints=function(e,t,n,s,r,o){o=Object.assign({},this.defaultRenderOptions,o),this.forEachGlyph(t,n,s,r,o,function(i,a,l,c){i.drawPoints(e,a,l,c,o,this)})},oe.prototype.drawMetrics=function(e,t,n,s,r,o){o=Object.assign({},this.defaultRenderOptions,o),this.forEachGlyph(t,n,s,r,o,function(i,a,l,c){i.drawMetrics(e,a,l,c)})},oe.prototype.getEnglishName=function(e){let t=(this.names.unicode||this.names.macintosh||this.names.windows)[e];if(t)return t.en},oe.prototype.validate=function(){let e=[],t=this;function n(r,o){r||(console.warn(`[opentype.js] ${o}`),e.push(o))}function s(r){let o=t.getEnglishName(r);n(o&&o.trim().length>0,"No English "+r+" specified.")}if(s("fontFamily"),s("weightName"),s("manufacturer"),s("copyright"),s("version"),n(this.unitsPerEm>0,"No unitsPerEm specified."),this.tables.colr){let r=this.tables.colr.baseGlyphRecords,o=-1;for(let i=0;i<r.length;i++){let a=r[i].glyphID;if(n(o<r[i].glyphID,`baseGlyphs must be sorted by GlyphID in ascending order, but glyphID ${a} comes after ${o}`),o>r[i].glyphID)break;o=a}}return e},oe.prototype.toTables=function(){return ou.fontToTable(this)},oe.prototype.toBuffer=function(){return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."),this.toArrayBuffer()},oe.prototype.toArrayBuffer=function(){let t=this.toTables().encode(),n=new ArrayBuffer(t.length),s=new Uint8Array(n);for(let r=0;r<t.length;r++)s[r]=t[r];return n},oe.prototype.download=function(){console.error("DEPRECATED: platform-specific actions are to be implemented on user-side")},oe.prototype.fsSelectionValues={ITALIC:1,UNDERSCORE:2,NEGATIVE:4,OUTLINED:8,STRIKEOUT:16,BOLD:32,REGULAR:64,USER_TYPO_METRICS:128,WWS:256,OBLIQUE:512},oe.prototype.macStyleValues={BOLD:1,ITALIC:2,UNDERLINE:4,OUTLINED:8,SHADOW:16,CONDENSED:32,EXTENDED:64},oe.prototype.usWidthClasses={ULTRA_CONDENSED:1,EXTRA_CONDENSED:2,CONDENSED:3,SEMI_CONDENSED:4,MEDIUM:5,SEMI_EXPANDED:6,EXPANDED:7,EXTRA_EXPANDED:8,ULTRA_EXPANDED:9},oe.prototype.usWeightClasses={THIN:100,EXTRA_LIGHT:200,LIGHT:300,NORMAL:400,MEDIUM:500,SEMI_BOLD:600,BOLD:700,EXTRA_BOLD:800,BLACK:900};var yi=oe;function hp(e,t){let n=new F.Parser(e,t),s=n.parseUShort(),r=n.parseUShort();s!==1&&console.warn(`Unsupported hvar table version ${s}.${r}`);let o=[s,r],i=n.parsePointer32(function(){return this.parseItemVariationStore()}),a=n.parsePointer32(function(){return this.parseDeltaSetIndexMap()}),l=n.parsePointer32(function(){return this.parseDeltaSetIndexMap()}),c=n.parsePointer32(function(){return this.parseDeltaSetIndexMap()});return{version:o,itemVariationStore:i,advanceWidth:a,lsb:l,rsb:c}}function dp(){console.warn("Writing of hvar tables is not yet supported.")}var gp={make:dp,parse:hp},mp=function(){return{coverage:this.parsePointer(C.coverage),attachPoints:this.parseList(C.pointer(C.uShortList))}},yp=function(){var e=this.parseUShort();if(B.argument(e===1||e===2||e===3,"Unsupported CaretValue table version."),e===1)return{coordinate:this.parseShort()};if(e===2)return{pointindex:this.parseShort()};if(e===3)return{coordinate:this.parseShort()}},bp=function(){return this.parseList(C.pointer(yp))},vp=function(){return{coverage:this.parsePointer(C.coverage),ligGlyphs:this.parseList(C.pointer(bp))}},xp=function(){return this.parseUShort(),this.parseList(C.pointer(C.coverage))};function Sp(e,t){t=t||0;let n=new C(e,t),s=n.parseVersion(1);B.argument(s===1||s===1.2||s===1.3,"Unsupported GDEF table version.");var r={version:s,classDef:n.parsePointer(C.classDef),attachList:n.parsePointer(mp),ligCaretList:n.parsePointer(vp),markAttachClassDef:n.parsePointer(C.classDef)};return s>=1.2&&(r.markGlyphSets=n.parsePointer(xp)),r}var kp={parse:Sp},rt=new Array(10);rt[1]=function(){let t=this.offset+this.relativeOffset,n=this.parseUShort();if(n===1)return{posFormat:1,coverage:this.parsePointer(C.coverage),value:this.parseValueRecord()};if(n===2)return{posFormat:2,coverage:this.parsePointer(C.coverage),values:this.parseValueRecordList()};B.assert(!1,"0x"+t.toString(16)+": GPOS lookup type 1 format must be 1 or 2.")},rt[2]=function(){let t=this.offset+this.relativeOffset,n=this.parseUShort();B.assert(n===1||n===2,"0x"+t.toString(16)+": GPOS lookup type 2 format must be 1 or 2.");let s=this.parsePointer(C.coverage),r=this.parseUShort(),o=this.parseUShort();if(n===1)return{posFormat:n,coverage:s,valueFormat1:r,valueFormat2:o,pairSets:this.parseList(C.pointer(C.list(function(){return{secondGlyph:this.parseUShort(),value1:this.parseValueRecord(r),value2:this.parseValueRecord(o)}})))};if(n===2){let i=this.parsePointer(C.classDef),a=this.parsePointer(C.classDef),l=this.parseUShort(),c=this.parseUShort();return{posFormat:n,coverage:s,valueFormat1:r,valueFormat2:o,classDef1:i,classDef2:a,class1Count:l,class2Count:c,classRecords:this.parseList(l,C.list(c,function(){return{value1:this.parseValueRecord(r),value2:this.parseValueRecord(o)}}))}}},rt[3]=function(){return{error:"GPOS Lookup 3 not supported"}},rt[4]=function(){return{error:"GPOS Lookup 4 not supported"}},rt[5]=function(){return{error:"GPOS Lookup 5 not supported"}},rt[6]=function(){return{error:"GPOS Lookup 6 not supported"}},rt[7]=function(){return{error:"GPOS Lookup 7 not supported"}},rt[8]=function(){return{error:"GPOS Lookup 8 not supported"}},rt[9]=function(){return{error:"GPOS Lookup 9 not supported"}};function Tp(e,t){t=t||0;let n=new C(e,t),s=n.parseVersion(1);return B.argument(s===1||s===1.1,"Unsupported GPOS table version "+s),s===1?{version:s,scripts:n.parseScriptList(),features:n.parseFeatureList(),lookups:n.parseLookupList(rt)}:{version:s,scripts:n.parseScriptList(),features:n.parseFeatureList(),lookups:n.parseLookupList(rt),variations:n.parseFeatureVariationsList()}}var Cp=new Array(10);function Op(e){return new A.Table("GPOS",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new A.ScriptList(e.scripts)},{name:"features",type:"TABLE",value:new A.FeatureList(e.features)},{name:"lookups",type:"TABLE",value:new A.LookupList(e.lookups,Cp)}])}var Ip={parse:Tp,make:Op};function wp(e){let t={};e.skip("uShort");let n=e.parseUShort();B.argument(n===0,"Unsupported kern sub-table version."),e.skip("uShort",2);let s=e.parseUShort();e.skip("uShort",3);for(let r=0;r<s;r+=1){let o=e.parseUShort(),i=e.parseUShort(),a=e.parseShort();t[o+","+i]=a}return t}function Ep(e){let t={};e.skip("uShort"),e.parseULong()>1&&console.warn("Only the first kern subtable is supported."),e.skip("uLong");let r=e.parseUShort()&255;if(e.skip("uShort"),r===0){let o=e.parseUShort();e.skip("uShort",3);for(let i=0;i<o;i+=1){let a=e.parseUShort(),l=e.parseUShort(),c=e.parseShort();t[a+","+l]=c}}return t}function Lp(e,t){let n=new F.Parser(e,t),s=n.parseUShort();if(s===0)return wp(n);if(s===1)return Ep(n);throw new Error("Unsupported kern table version ("+s+").")}var Ap={parse:Lp};function Rp(e,t,n,s){let r=new F.Parser(e,t),o=s?r.parseUShort:r.parseULong,i=[];for(let a=0;a<n+1;a+=1){let l=o.call(r);s&&(l*=2),i.push(l)}return i}var Dp={parse:Rp};function bi(e,t){let n=[],s=12;for(let r=0;r<t;r+=1){let o=F.getTag(e,s),i=F.getULong(e,s+4),a=F.getULong(e,s+8),l=F.getULong(e,s+12);n.push({tag:o,checksum:i,offset:a,length:l,compression:!1}),s+=16}return n}function Fp(e,t){let n=[],s=44;for(let r=0;r<t;r+=1){let o=F.getTag(e,s),i=F.getULong(e,s+4),a=F.getULong(e,s+8),l=F.getULong(e,s+12),c;a<l?c="WOFF":c=!1,n.push({tag:o,offset:i,compression:c,compressedLength:a,length:l}),s+=20}return n}function te(e,t){if(t.compression==="WOFF"){let n=new Uint8Array(e.buffer,t.offset+2,t.compressedLength-2),s=new Uint8Array(t.length);if(Er(n,s),s.byteLength!==t.length)throw new Error("Decompression error: "+t.tag+" decompressed length doesn't match recorded length");return{data:new DataView(s.buffer,0),offset:0}}else return{data:e,offset:t.offset}}function Up(e,t={}){let n,s,r=new yi({empty:!0});e.constructor!==ArrayBuffer&&(e=new Uint8Array(e).buffer);let o=new DataView(e,0),i,a=[],l=F.getTag(o,0);if(l==="\0\0\0"||l==="true"||l==="typ1")r.outlinesFormat="truetype",i=F.getUShort(o,4),a=bi(o,i);else if(l==="OTTO")r.outlinesFormat="cff",i=F.getUShort(o,4),a=bi(o,i);else if(l==="wOFF"){let G=F.getTag(o,4);if(G==="\0\0\0")r.outlinesFormat="truetype";else if(G==="OTTO")r.outlinesFormat="cff";else throw new Error("Unsupported OpenType flavor "+l);i=F.getUShort(o,12),a=Fp(o,i)}else if(l==="wOF2"){let G="https://github.com/opentypejs/opentype.js/issues/183#issuecomment-1147228025";throw new Error("WOFF2 require an external decompressor library, see examples at: "+G)}else throw new Error("Unsupported OpenType signature "+l);let c,u,m,d,x,v,S,I,_,P,z,Y,re,ie,ae,me,ot,Z;for(let G=0;G<i;G+=1){let U=a[G],M;switch(U.tag){case"avar":S=U;break;case"cmap":M=te(o,U),r.tables.cmap=Wr.parse(M.data,M.offset),r.encoding=new $r(r.tables.cmap);break;case"cvt ":M=te(o,U),Z=new F.Parser(M.data,M.offset),r.tables.cvt=Z.parseShortList(U.length/2);break;case"fvar":m=U;break;case"STAT":d=U;break;case"gvar":x=U;break;case"cvar":v=U;break;case"fpgm":M=te(o,U),Z=new F.Parser(M.data,M.offset),r.tables.fpgm=Z.parseByteList(U.length);break;case"head":M=te(o,U),r.tables.head=co.parse(M.data,M.offset),r.unitsPerEm=r.tables.head.unitsPerEm,n=r.tables.head.indexToLocFormat;break;case"hhea":M=te(o,U),r.tables.hhea=fo.parse(M.data,M.offset),r.ascender=r.tables.hhea.ascender,r.descender=r.tables.hhea.descender,r.numberOfHMetrics=r.tables.hhea.numberOfHMetrics;break;case"HVAR":re=U;break;case"hmtx":Y=U;break;case"ltag":M=te(o,U),s=ho.parse(M.data,M.offset);break;case"COLR":M=te(o,U),r.tables.colr=vo.parse(M.data,M.offset);break;case"CPAL":M=te(o,U),r.tables.cpal=Kr.parse(M.data,M.offset);break;case"maxp":M=te(o,U),r.tables.maxp=go.parse(M.data,M.offset),r.numGlyphs=r.tables.maxp.numGlyphs;break;case"name":me=U;break;case"OS/2":M=te(o,U),r.tables.os2=zs.parse(M.data,M.offset);break;case"post":M=te(o,U),r.tables.post=mo.parse(M.data,M.offset),r.glyphNames=new Us(r.tables.post);break;case"prep":M=te(o,U),Z=new F.Parser(M.data,M.offset),r.tables.prep=Z.parseByteList(U.length);break;case"glyf":I=U;break;case"loca":ae=U;break;case"CFF ":c=U;break;case"CFF2":u=U;break;case"kern":ie=U;break;case"GDEF":_=U;break;case"GPOS":P=U;break;case"GSUB":z=U;break;case"meta":ot=U;break;case"gasp":try{M=te(o,U),r.tables.gasp=Oo.parse(M.data,M.offset)}catch(Ee){console.warn("Failed to parse gasp table, skipping."),console.warn(Ee)}break;case"SVG ":M=te(o,U),r.tables.svg=Io.parse(M.data,M.offset);break;default:break}}let Ve=te(o,me);if(r.tables.name=jr.parse(Ve.data,Ve.offset,s),r.names=r.tables.name,I&&ae){let G=n===0,U=te(o,ae),M=Dp.parse(U.data,U.offset,r.numGlyphs,G),Ee=te(o,I);r.glyphs=Go.parse(Ee.data,Ee.offset,M,r,t)}else if(c){let G=te(o,c);Hs.parse(G.data,G.offset,r,t)}else if(u){let G=te(o,u);Hs.parse(G.data,G.offset,r,t)}else throw new Error("Font doesn't contain TrueType, CFF or CFF2 outlines.");let De=te(o,Y);if(po.parse(r,De.data,De.offset,r.numberOfHMetrics,r.numGlyphs,r.glyphs,t),Ra(r,t),ie){let G=te(o,ie);r.kerningPairs=Ap.parse(G.data,G.offset)}else r.kerningPairs={};if(_){let G=te(o,_);r.tables.gdef=kp.parse(G.data,G.offset)}if(P){let G=te(o,P);r.tables.gpos=Ip.parse(G.data,G.offset),r.position.init()}if(z){let G=te(o,z);r.tables.gsub=yo.parse(G.data,G.offset)}if(m){let G=te(o,m);r.tables.fvar=xo.parse(G.data,G.offset,r.names)}if(d){let G=te(o,d);r.tables.stat=So.parse(G.data,G.offset,r.tables.fvar)}if(x){m||console.warn("This font provides a gvar table, but no fvar table, which is required for variable fonts."),I||console.warn("This font provides a gvar table, but no glyf table. Glyph variation only works with TrueType outlines.");let G=te(o,x);r.tables.gvar=Co.parse(G.data,G.offset,r.tables.fvar,r.glyphs)}if(v){m||console.warn("This font provides a cvar table, but no fvar table, which is required for variable fonts."),r.tables.cvt||console.warn("This font provides a cvar table, but no cvt table which could be made variable."),I||console.warn("This font provides a gvar table, but no glyf table. Glyph variation only works with TrueType outlines.");let G=te(o,v);r.tables.cvar=To.parse(G.data,G.offset,r.tables.fvar,r.tables.cvt||[])}if(S){m||console.warn("This font provides an avar table, but no fvar table, which is required for variable fonts.");let G=te(o,S);r.tables.avar=ko.parse(G.data,G.offset,r.tables.fvar)}if(re){m||console.warn("This font provides an HVAR table, but no fvar table, which is required for variable fonts."),Y||console.warn("This font provides an HVAR table, but no hmtx table to vary.");let G=te(o,re);r.tables.hvar=gp.parse(G.data,G.offset,r.tables.fvar)}if(ot){let G=te(o,ot);r.tables.meta=bo.parse(G.data,G.offset),r.metas=r.tables.meta}return r.palettes=new Po(r),r}function Mp(){console.error("DEPRECATED! migrate to: opentype.parse(buffer, opt) See: https://github.com/opentypejs/opentype.js/issues/675")}function Pp(){console.error('DEPRECATED! migrate to: opentype.parse(require("fs").readFileSync(url), opt)')}return T(O)})();(function(g,f){typeof define=="function"&&define.amd?define(f):typeof xs=="object"&&xs.exports?xs.exports=f():g.opentype=f()})(typeof self<"u"?self:Ci,()=>({...Ti,default:Ti}))});var Gi=qp(Oi());import{tracingChannel as $p,channel as Xp}from"node:diagnostics_channel";var Ce=Xp("lru-cache:metrics"),Mn=$p("lru-cache"),Yp=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,lr=()=>Ce.hasSubscribers||Mn.hasSubscribers,Li=new Set,Ii=typeof process=="object"&&process?process:{},Zp=(g,f,p,h)=>{typeof Ii.emitWarning=="function"?Ii.emitWarning(g,f,p,h):console.error(`[${p}] ${f}: ${g}`)},Kp=g=>!Li.has(g),Pt=g=>!!g&&g===Math.floor(g)&&g>0&&isFinite(g),Ai=g=>Pt(g)?g<=Math.pow(2,8)?Uint8Array:g<=Math.pow(2,16)?Uint16Array:g<=Math.pow(2,32)?Uint32Array:g<=Number.MAX_SAFE_INTEGER?Ss:null:null,Ss=class extends Array{constructor(g){super(g),this.fill(0)}},xt,bn,Qp=(xt=class{constructor(f,p){ye(this,"heap");ye(this,"length");if(!b(xt,bn))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new p(f),this.length=0}static create(f){let p=Ai(f);if(!p)return[];V(xt,bn,!0);let h=new xt(f,p);return V(xt,bn,!1),h}push(f){this.heap[this.length++]=f}pop(){return this.heap[--this.length]}},bn=new WeakMap,K(xt,bn,!1),xt),wi,Ei,et,je,lt,Jt,ut,vn,xn,ct,xe,ft,be,ce,q,Pe,We,Ae,ke,pt,Te,ht,dt,qe,$e,gt,Sn,Ne,en,L,ur,tn,Ot,Bn,Xe,Di,nn,kn,_n,Nt,Bt,cr,yn,ks,Fi,Ui,Ts,ue,fr,Mi,Pi,Pn,pr,Nn,_t,hr,Tn,Ri=(Tn=class{constructor(f){K(this,L);K(this,et);K(this,je);K(this,lt);K(this,Jt);K(this,ut);K(this,vn);K(this,xn);K(this,ct);ye(this,"ttl");ye(this,"ttlResolution");ye(this,"ttlAutopurge");ye(this,"updateAgeOnGet");ye(this,"updateAgeOnHas");ye(this,"allowStale");ye(this,"noDisposeOnSet");ye(this,"noUpdateTTL");ye(this,"maxEntrySize");ye(this,"sizeCalculation");ye(this,"noDeleteOnFetchRejection");ye(this,"noDeleteOnStaleGet");ye(this,"allowStaleOnFetchAbort");ye(this,"allowStaleOnFetchRejection");ye(this,"ignoreFetchAbort");ye(this,"backgroundFetchSize");K(this,xe);K(this,ft);K(this,be);K(this,ce);K(this,q);K(this,Pe);K(this,We);K(this,Ae);K(this,ke);K(this,pt);K(this,Te);K(this,ht);K(this,dt);K(this,qe);K(this,$e);K(this,gt);K(this,Sn);K(this,Ne);K(this,en);K(this,tn,()=>{});K(this,Ot,()=>{});K(this,Bn,()=>{});K(this,Xe,()=>!1);K(this,nn,f=>{});K(this,kn,(f,p,h)=>{});K(this,_n,(f,p,h,y)=>{if(h||y)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});ye(this,wi,"LRUCache");let{max:p=0,ttl:h,ttlResolution:y=1,ttlAutopurge:k,updateAgeOnGet:T,updateAgeOnHas:O,allowStale:w,dispose:E,onInsert:j,disposeAfter:H,noDisposeOnSet:Q,noUpdateTTL:X,maxSize:fe=0,maxEntrySize:J=0,sizeCalculation:Se,fetchMethod:$,memoMethod:ee,noDeleteOnFetchRejection:ne,noDeleteOnStaleGet:se,allowStaleOnFetchRejection:pe,allowStaleOnFetchAbort:Vt,ignoreFetchAbort:St,backgroundFetchSize:It=1,perf:wt}=f;if(this.backgroundFetchSize=It,wt!==void 0&&typeof wt?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(V(this,ct,wt??Yp),p!==0&&!Pt(p))throw new TypeError("max option must be a nonnegative integer");let Be=p?Ai(p):Array;if(!Be)throw new Error("invalid max value: "+p);if(V(this,et,p),V(this,je,fe),this.maxEntrySize=J||b(this,je),this.sizeCalculation=Se,this.sizeCalculation){if(!b(this,je)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(ee!==void 0&&typeof ee!="function")throw new TypeError("memoMethod must be a function if defined");if(V(this,xn,ee),$!==void 0&&typeof $!="function")throw new TypeError("fetchMethod must be a function if specified");if(V(this,vn,$),V(this,Sn,!!$),V(this,be,new Map),V(this,ce,Array.from({length:p}).fill(void 0)),V(this,q,Array.from({length:p}).fill(void 0)),V(this,Pe,new Be(p)),V(this,We,new Be(p)),V(this,Ae,0),V(this,ke,0),V(this,pt,Qp.create(p)),V(this,xe,0),V(this,ft,0),typeof E=="function"&&V(this,lt,E),typeof j=="function"&&V(this,Jt,j),typeof H=="function"?(V(this,ut,H),V(this,Te,[])):(V(this,ut,void 0),V(this,Te,void 0)),V(this,gt,!!b(this,lt)),V(this,en,!!b(this,Jt)),V(this,Ne,!!b(this,ut)),this.noDisposeOnSet=!!Q,this.noUpdateTTL=!!X,this.noDeleteOnFetchRejection=!!ne,this.allowStaleOnFetchRejection=!!pe,this.allowStaleOnFetchAbort=!!Vt,this.ignoreFetchAbort=!!St,this.maxEntrySize!==0){if(b(this,je)!==0&&!Pt(b(this,je)))throw new TypeError("maxSize must be a positive integer if specified");if(!Pt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");R(this,L,Di).call(this)}if(this.allowStale=!!w,this.noDeleteOnStaleGet=!!se,this.updateAgeOnGet=!!T,this.updateAgeOnHas=!!O,this.ttlResolution=Pt(y)||y===0?y:1,this.ttlAutopurge=!!k,this.ttl=h||0,this.ttl){if(!Pt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");R(this,L,ur).call(this)}if(b(this,et)===0&&this.ttl===0&&b(this,je)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!b(this,et)&&!b(this,je)){let zt="LRU_CACHE_UNBOUNDED";Kp(zt)&&(Li.add(zt),Zp("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",zt,Tn))}}get perf(){return b(this,ct)}static unsafeExposeInternals(f){return{starts:b(f,dt),ttls:b(f,qe),autopurgeTimers:b(f,$e),sizes:b(f,ht),keyMap:b(f,be),keyList:b(f,ce),valList:b(f,q),next:b(f,Pe),prev:b(f,We),get head(){return b(f,Ae)},get tail(){return b(f,ke)},free:b(f,pt),isBackgroundFetch:p=>{var h;return R(h=f,L,ue).call(h,p)},backgroundFetch:(p,h,y,k)=>{var T;return R(T=f,L,Ts).call(T,p,h,y,k)},moveToTail:p=>{var h;return R(h=f,L,Nn).call(h,p)},indexes:p=>{var h;return R(h=f,L,Nt).call(h,p)},rindexes:p=>{var h;return R(h=f,L,Bt).call(h,p)},isStale:p=>{var h;return b(h=f,Xe).call(h,p)}}}get max(){return b(this,et)}get maxSize(){return b(this,je)}get calculatedSize(){return b(this,ft)}get size(){return b(this,xe)}get fetchMethod(){return b(this,vn)}get memoMethod(){return b(this,xn)}get dispose(){return b(this,lt)}get onInsert(){return b(this,Jt)}get disposeAfter(){return b(this,ut)}getRemainingTTL(f){return b(this,be).has(f)?1/0:0}*entries(){for(let f of R(this,L,Nt).call(this))b(this,q)[f]!==void 0&&b(this,ce)[f]!==void 0&&!R(this,L,ue).call(this,b(this,q)[f])&&(yield[b(this,ce)[f],b(this,q)[f]])}*rentries(){for(let f of R(this,L,Bt).call(this))b(this,q)[f]!==void 0&&b(this,ce)[f]!==void 0&&!R(this,L,ue).call(this,b(this,q)[f])&&(yield[b(this,ce)[f],b(this,q)[f]])}*keys(){for(let f of R(this,L,Nt).call(this)){let p=b(this,ce)[f];p!==void 0&&!R(this,L,ue).call(this,b(this,q)[f])&&(yield p)}}*rkeys(){for(let f of R(this,L,Bt).call(this)){let p=b(this,ce)[f];p!==void 0&&!R(this,L,ue).call(this,b(this,q)[f])&&(yield p)}}*values(){for(let f of R(this,L,Nt).call(this))b(this,q)[f]!==void 0&&!R(this,L,ue).call(this,b(this,q)[f])&&(yield b(this,q)[f])}*rvalues(){for(let f of R(this,L,Bt).call(this))b(this,q)[f]!==void 0&&!R(this,L,ue).call(this,b(this,q)[f])&&(yield b(this,q)[f])}[(Ei=Symbol.iterator,wi=Symbol.toStringTag,Ei)](){return this.entries()}find(f,p={}){for(let h of R(this,L,Nt).call(this)){let y=b(this,q)[h],k=R(this,L,ue).call(this,y)?y.__staleWhileFetching:y;if(k!==void 0&&f(k,b(this,ce)[h],this))return R(this,L,Pn).call(this,b(this,ce)[h],p)}}forEach(f,p=this){for(let h of R(this,L,Nt).call(this)){let y=b(this,q)[h],k=R(this,L,ue).call(this,y)?y.__staleWhileFetching:y;k!==void 0&&f.call(p,k,b(this,ce)[h],this)}}rforEach(f,p=this){for(let h of R(this,L,Bt).call(this)){let y=b(this,q)[h],k=R(this,L,ue).call(this,y)?y.__staleWhileFetching:y;k!==void 0&&f.call(p,k,b(this,ce)[h],this)}}purgeStale(){let f=!1;for(let p of R(this,L,Bt).call(this,{allowStale:!0}))b(this,Xe).call(this,p)&&(R(this,L,_t).call(this,b(this,ce)[p],"expire"),f=!0);return f}info(f){let p=b(this,be).get(f);if(p===void 0)return;let h=b(this,q)[p],y=R(this,L,ue).call(this,h)?h.__staleWhileFetching:h;if(y===void 0)return;let k={value:y};if(b(this,qe)&&b(this,dt)){let T=b(this,qe)[p],O=b(this,dt)[p];if(T&&O){let w=T-(b(this,ct).now()-O);k.ttl=w,k.start=Date.now()}}return b(this,ht)&&(k.size=b(this,ht)[p]),k}dump(){let f=[];for(let p of R(this,L,Nt).call(this,{allowStale:!0})){let h=b(this,ce)[p],y=b(this,q)[p],k=R(this,L,ue).call(this,y)?y.__staleWhileFetching:y;if(k===void 0||h===void 0)continue;let T={value:k};if(b(this,qe)&&b(this,dt)){T.ttl=b(this,qe)[p];let O=b(this,ct).now()-b(this,dt)[p];T.start=Math.floor(Date.now()-O)}b(this,ht)&&(T.size=b(this,ht)[p]),f.unshift([h,T])}return f}load(f){this.clear();for(let[p,h]of f){if(h.start){let y=Date.now()-h.start;h.start=b(this,ct).now()-y}R(this,L,yn).call(this,p,h.value,h)}}set(f,p,h={}){let{status:y=Ce.hasSubscribers?{}:void 0}=h;h.status=y,y&&(y.op="set",y.key=f,p!==void 0&&(y.value=p),y.cache=this);let k=R(this,L,yn).call(this,f,p,h);return y&&Ce.hasSubscribers&&Ce.publish(y),k}pop(){var f;try{for(;b(this,xe);){let p=b(this,q)[b(this,Ae)];if(R(this,L,ks).call(this,!0),R(this,L,ue).call(this,p)){if(p.__staleWhileFetching)return p.__staleWhileFetching}else if(p!==void 0)return p}}finally{if(b(this,Ne)&&b(this,Te)){let p=b(this,Te),h;for(;h=p?.shift();)(f=b(this,ut))==null||f.call(this,...h)}}}has(f,p={}){let{status:h=Ce.hasSubscribers?{}:void 0}=p;p.status=h,h&&(h.op="has",h.key=f,h.cache=this);let y=R(this,L,Fi).call(this,f,p);return Ce.hasSubscribers&&Ce.publish(h),y}peek(f,p={}){let{status:h=lr()?{}:void 0}=p;h&&(h.op="peek",h.key=f,h.cache=this),p.status=h;let y=R(this,L,Ui).call(this,f,p);return Ce.hasSubscribers&&Ce.publish(h),y}fetch(f,p={}){let h=Mn.hasSubscribers,{status:y=lr()?{}:void 0}=p;p.status=y,y&&p.context&&(y.context=p.context);let k=R(this,L,fr).call(this,f,p);return y&&h&&(y.trace=!0,Mn.tracePromise(()=>k,y).catch(()=>{})),k}forceFetch(f,p={}){let h=Mn.hasSubscribers,{status:y=lr()?{}:void 0}=p;p.status=y,y&&p.context&&(y.context=p.context);let k=R(this,L,Mi).call(this,f,p);return y&&h&&(y.trace=!0,Mn.tracePromise(()=>k,y).catch(()=>{})),k}memo(f,p={}){let{status:h=Ce.hasSubscribers?{}:void 0}=p;p.status=h,h&&(h.op="memo",h.key=f,p.context&&(h.context=p.context),h.cache=this);let y=R(this,L,Pi).call(this,f,p);return h&&(h.value=y),Ce.hasSubscribers&&Ce.publish(h),y}get(f,p={}){let{status:h=Ce.hasSubscribers?{}:void 0}=p;p.status=h,h&&(h.op="get",h.key=f,h.cache=this);let y=R(this,L,Pn).call(this,f,p);return h&&(y!==void 0&&(h.value=y),Ce.hasSubscribers&&Ce.publish(h)),y}delete(f){return R(this,L,_t).call(this,f,"delete")}clear(){return R(this,L,hr).call(this,"delete")}},et=new WeakMap,je=new WeakMap,lt=new WeakMap,Jt=new WeakMap,ut=new WeakMap,vn=new WeakMap,xn=new WeakMap,ct=new WeakMap,xe=new WeakMap,ft=new WeakMap,be=new WeakMap,ce=new WeakMap,q=new WeakMap,Pe=new WeakMap,We=new WeakMap,Ae=new WeakMap,ke=new WeakMap,pt=new WeakMap,Te=new WeakMap,ht=new WeakMap,dt=new WeakMap,qe=new WeakMap,$e=new WeakMap,gt=new WeakMap,Sn=new WeakMap,Ne=new WeakMap,en=new WeakMap,L=new WeakSet,ur=function(){let f=new Ss(b(this,et)),p=new Ss(b(this,et));V(this,qe,f),V(this,dt,p);let h=this.ttlAutopurge?Array.from({length:b(this,et)}):void 0;V(this,$e,h),V(this,Bn,(O,w,E=b(this,ct).now())=>{p[O]=w!==0?E:0,f[O]=w,y(O,w)}),V(this,tn,O=>{p[O]=f[O]!==0?b(this,ct).now():0,y(O,f[O])});let y=this.ttlAutopurge?(O,w)=>{if(h?.[O]&&(clearTimeout(h[O]),h[O]=void 0),w&&w!==0&&h){let E=setTimeout(()=>{b(this,Xe).call(this,O)&&R(this,L,_t).call(this,b(this,ce)[O],"expire")},w+1);E.unref&&E.unref(),h[O]=E}}:()=>{};V(this,Ot,(O,w)=>{if(f[w]){let E=f[w],j=p[w];if(!E||!j)return;O.ttl=E,O.start=j,O.now=k||T();let H=O.now-j;O.remainingTTL=E-H}});let k=0,T=()=>{let O=b(this,ct).now();if(this.ttlResolution>0){k=O;let w=setTimeout(()=>k=0,this.ttlResolution);w.unref&&w.unref()}return O};this.getRemainingTTL=O=>{let w=b(this,be).get(O);if(w===void 0)return 0;let E=f[w],j=p[w];if(!E||!j)return 1/0;let H=(k||T())-j;return E-H},V(this,Xe,O=>{let w=p[O],E=f[O];return!!E&&!!w&&(k||T())-w>E})},tn=new WeakMap,Ot=new WeakMap,Bn=new WeakMap,Xe=new WeakMap,Di=function(){let f=new Ss(b(this,et));V(this,ft,0),V(this,ht,f),V(this,nn,p=>{V(this,ft,b(this,ft)-f[p]),f[p]=0}),V(this,_n,(p,h,y,k)=>{if(!Pt(y)){if(R(this,L,ue).call(this,h))return this.backgroundFetchSize;if(k){if(typeof k!="function")throw new TypeError("sizeCalculation must be a function");if(y=k(h,p),!Pt(y))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return y}),V(this,kn,(p,h,y)=>{if(f[p]=h,b(this,je)){let k=b(this,je)-f[p];for(;b(this,ft)>k;)R(this,L,ks).call(this,!0)}V(this,ft,b(this,ft)+f[p]),y&&(y.entrySize=h,y.totalCalculatedSize=b(this,ft))})},nn=new WeakMap,kn=new WeakMap,_n=new WeakMap,Nt=function*({allowStale:f=this.allowStale}={}){if(b(this,xe))for(let p=b(this,ke);R(this,L,cr).call(this,p)&&((f||!b(this,Xe).call(this,p))&&(yield p),p!==b(this,Ae));)p=b(this,We)[p]},Bt=function*({allowStale:f=this.allowStale}={}){if(b(this,xe))for(let p=b(this,Ae);R(this,L,cr).call(this,p)&&((f||!b(this,Xe).call(this,p))&&(yield p),p!==b(this,ke));)p=b(this,Pe)[p]},cr=function(f){return f!==void 0&&b(this,be).get(b(this,ce)[f])===f},yn=function(f,p,h,y){var fe,J,Se,$;let{ttl:k=this.ttl,start:T,noDisposeOnSet:O=this.noDisposeOnSet,sizeCalculation:w=this.sizeCalculation,status:E}=h,j=R(this,L,ue).call(this,p);if(p===void 0)return E&&(E.set="deleted"),this.delete(f),this;let{noUpdateTTL:H=this.noUpdateTTL}=h;E&&!j&&(E.value=p);let Q=b(this,_n).call(this,f,p,h.size||0,w,E);if(this.maxEntrySize&&Q>this.maxEntrySize)return R(this,L,_t).call(this,f,"set"),E&&(E.set="miss",E.maxEntrySizeExceeded=!0),this;let X=b(this,xe)===0?void 0:b(this,be).get(f);if(X===void 0)X=b(this,xe)===0?b(this,ke):b(this,pt).length!==0?b(this,pt).pop():b(this,xe)===b(this,et)?R(this,L,ks).call(this,!1):b(this,xe),b(this,ce)[X]=f,b(this,q)[X]=p,b(this,be).set(f,X),b(this,Pe)[b(this,ke)]=X,b(this,We)[X]=b(this,ke),V(this,ke,X),vs(this,xe)._++,b(this,kn).call(this,X,Q,E),E&&(E.set="add"),H=!1,b(this,en)&&!j&&((fe=b(this,Jt))==null||fe.call(this,p,f,"add"));else{R(this,L,Nn).call(this,X);let ee=b(this,q)[X];if(p!==ee){if(!O)if(R(this,L,ue).call(this,ee)){ee!==y&&ee.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:ne}=ee;ne!==void 0&&ne!==p&&(b(this,gt)&&((J=b(this,lt))==null||J.call(this,ne,f,"set")),b(this,Ne)&&b(this,Te)?.push([ne,f,"set"]))}else b(this,gt)&&((Se=b(this,lt))==null||Se.call(this,ee,f,"set")),b(this,Ne)&&b(this,Te)?.push([ee,f,"set"]);if(b(this,nn).call(this,X),b(this,kn).call(this,X,Q,E),b(this,q)[X]=p,!j){let ne=ee&&R(this,L,ue).call(this,ee)?ee.__staleWhileFetching:ee,se=ne===void 0?"add":p!==ne?"replace":"update";E&&(E.set=se,ne!==void 0&&(E.oldValue=ne)),b(this,en)&&this.onInsert?.(p,f,se)}}else j||(E&&(E.set="update"),b(this,en)&&this.onInsert?.(p,f,"update"))}if(k!==0&&!b(this,qe)&&R(this,L,ur).call(this),b(this,qe)&&(H||b(this,Bn).call(this,X,k,T),E&&b(this,Ot).call(this,E,X)),!O&&b(this,Ne)&&b(this,Te)){let ee=b(this,Te),ne;for(;ne=ee?.shift();)($=b(this,ut))==null||$.call(this,...ne)}return this},ks=function(f){var O;let p=b(this,Ae),h=b(this,ce)[p],y=b(this,q)[p],k=R(this,L,ue).call(this,y);k&&y.__abortController.abort(new Error("evicted"));let T=k?y.__staleWhileFetching:y;return(b(this,gt)||b(this,Ne))&&T!==void 0&&(b(this,gt)&&((O=b(this,lt))==null||O.call(this,T,h,"evict")),b(this,Ne)&&b(this,Te)?.push([T,h,"evict"])),b(this,nn).call(this,p),b(this,$e)?.[p]&&(clearTimeout(b(this,$e)[p]),b(this,$e)[p]=void 0),f&&(b(this,ce)[p]=void 0,b(this,q)[p]=void 0,b(this,pt).push(p)),b(this,xe)===1?(V(this,Ae,V(this,ke,0)),b(this,pt).length=0):V(this,Ae,b(this,Pe)[p]),b(this,be).delete(h),vs(this,xe)._--,p},Fi=function(f,p={}){let{updateAgeOnHas:h=this.updateAgeOnHas,status:y}=p,k=b(this,be).get(f);if(k!==void 0){let T=b(this,q)[k];if(R(this,L,ue).call(this,T)&&T.__staleWhileFetching===void 0)return!1;if(b(this,Xe).call(this,k))y&&(y.has="stale",b(this,Ot).call(this,y,k));else return h&&b(this,tn).call(this,k),y&&(y.has="hit",b(this,Ot).call(this,y,k)),!0}else y&&(y.has="miss");return!1},Ui=function(f,p){let{status:h,allowStale:y=this.allowStale}=p,k=b(this,be).get(f);if(k===void 0||!y&&b(this,Xe).call(this,k)){h&&(h.peek=k===void 0?"miss":"stale");return}let T=b(this,q)[k],O=R(this,L,ue).call(this,T)?T.__staleWhileFetching:T;return h&&(O!==void 0?(h.peek="hit",h.value=O):h.peek="miss"),O},Ts=function(f,p,h,y){let k=p===void 0?void 0:b(this,q)[p];if(R(this,L,ue).call(this,k))return k;let T=new AbortController,{signal:O}=h;O?.addEventListener("abort",()=>T.abort(O.reason),{signal:T.signal});let w={signal:T.signal,options:h,context:y},E=(J,Se=!1)=>{let{aborted:$}=T.signal,ee=h.ignoreFetchAbort&&J!==void 0,ne=h.ignoreFetchAbort||!!(h.allowStaleOnFetchAbort&&J!==void 0);if(h.status&&($&&!Se?(h.status.fetchAborted=!0,h.status.fetchError=T.signal.reason,ee&&(h.status.fetchAbortIgnored=!0)):h.status.fetchResolved=!0),$&&!ee&&!Se)return H(T.signal.reason,ne);let se=X,pe=b(this,q)[p];return(pe===X||pe===void 0&&ee&&Se)&&(J===void 0?se.__staleWhileFetching!==void 0?b(this,q)[p]=se.__staleWhileFetching:R(this,L,_t).call(this,f,"fetch"):(h.status&&(h.status.fetchUpdated=!0),R(this,L,yn).call(this,f,J,w.options,se))),J},j=J=>(h.status&&(h.status.fetchRejected=!0,h.status.fetchError=J),H(J,!1)),H=(J,Se)=>{let{aborted:$}=T.signal,ee=$&&h.allowStaleOnFetchAbort,ne=ee||h.allowStaleOnFetchRejection,se=ne||h.noDeleteOnFetchRejection,pe=X;if(b(this,q)[p]===X&&(!se||!Se&&pe.__staleWhileFetching===void 0?R(this,L,_t).call(this,f,"fetch"):ee||(b(this,q)[p]=pe.__staleWhileFetching)),ne)return h.status&&pe.__staleWhileFetching!==void 0&&(h.status.returnedStale=!0),pe.__staleWhileFetching;if(pe.__returned===pe)throw J},Q=(J,Se)=>{var ee;let $=(ee=b(this,vn))==null?void 0:ee.call(this,f,k,w);T.signal.addEventListener("abort",()=>{(!h.ignoreFetchAbort||h.allowStaleOnFetchAbort)&&(J(void 0),h.allowStaleOnFetchAbort&&(J=ne=>E(ne,!0)))}),$&&$ instanceof Promise?$.then(ne=>J(ne===void 0?void 0:ne),Se):$!==void 0&&J($)};h.status&&(h.status.fetchDispatched=!0);let X=new Promise(Q).then(E,j),fe=Object.assign(X,{__abortController:T,__staleWhileFetching:k,__returned:void 0});return p===void 0?(R(this,L,yn).call(this,f,fe,{...w.options,status:void 0}),p=b(this,be).get(f)):b(this,q)[p]=fe,fe},ue=function(f){if(!b(this,Sn))return!1;let p=f;return!!p&&p instanceof Promise&&p.hasOwnProperty("__staleWhileFetching")&&p.__abortController instanceof AbortController},fr=async function(f,p={}){let{allowStale:h=this.allowStale,updateAgeOnGet:y=this.updateAgeOnGet,noDeleteOnStaleGet:k=this.noDeleteOnStaleGet,ttl:T=this.ttl,noDisposeOnSet:O=this.noDisposeOnSet,size:w=0,sizeCalculation:E=this.sizeCalculation,noUpdateTTL:j=this.noUpdateTTL,noDeleteOnFetchRejection:H=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:Q=this.allowStaleOnFetchRejection,ignoreFetchAbort:X=this.ignoreFetchAbort,allowStaleOnFetchAbort:fe=this.allowStaleOnFetchAbort,context:J,forceRefresh:Se=!1,status:$,signal:ee}=p;if($&&($.op="fetch",$.key=f,Se&&($.forceRefresh=!0),$.cache=this),!b(this,Sn))return $&&($.fetch="get"),R(this,L,Pn).call(this,f,{allowStale:h,updateAgeOnGet:y,noDeleteOnStaleGet:k,status:$});let ne={allowStale:h,updateAgeOnGet:y,noDeleteOnStaleGet:k,ttl:T,noDisposeOnSet:O,size:w,sizeCalculation:E,noUpdateTTL:j,noDeleteOnFetchRejection:H,allowStaleOnFetchRejection:Q,allowStaleOnFetchAbort:fe,ignoreFetchAbort:X,status:$,signal:ee},se=b(this,be).get(f);if(se===void 0){$&&($.fetch="miss");let pe=R(this,L,Ts).call(this,f,se,ne,J);return pe.__returned=pe}else{let pe=b(this,q)[se];if(R(this,L,ue).call(this,pe)){let wt=h&&pe.__staleWhileFetching!==void 0;return $&&($.fetch="inflight",wt&&($.returnedStale=!0)),wt?pe.__staleWhileFetching:pe.__returned=pe}let Vt=b(this,Xe).call(this,se);if(!Se&&!Vt)return $&&($.fetch="hit"),R(this,L,Nn).call(this,se),y&&b(this,tn).call(this,se),$&&b(this,Ot).call(this,$,se),pe;let St=R(this,L,Ts).call(this,f,se,ne,J),It=St.__staleWhileFetching!==void 0&&h;return $&&($.fetch=Vt?"stale":"refresh",It&&Vt&&($.returnedStale=!0)),It?St.__staleWhileFetching:St.__returned=St}},Mi=async function(f,p={}){let h=await R(this,L,fr).call(this,f,p);if(h===void 0)throw new Error("fetch() returned undefined");return h},Pi=function(f,p={}){let h=b(this,xn);if(!h)throw new Error("no memoMethod provided to constructor");let{context:y,status:k,forceRefresh:T,...O}=p;k&&T&&(k.forceRefresh=!0);let w=R(this,L,Pn).call(this,f,O),E=T||w===void 0;if(k&&(k.memo=E?"miss":"hit",E||(k.value=w)),!E)return w;let j=h(f,w,{options:O,context:y});return k&&(k.value=j),R(this,L,yn).call(this,f,j,O),j},Pn=function(f,p={}){let{allowStale:h=this.allowStale,updateAgeOnGet:y=this.updateAgeOnGet,noDeleteOnStaleGet:k=this.noDeleteOnStaleGet,status:T}=p,O=b(this,be).get(f);if(O===void 0){T&&(T.get="miss");return}let w=b(this,q)[O],E=R(this,L,ue).call(this,w);return T&&b(this,Ot).call(this,T,O),b(this,Xe).call(this,O)?E?(T&&(T.get="stale-fetching"),h&&w.__staleWhileFetching!==void 0?(T&&(T.returnedStale=!0),w.__staleWhileFetching):void 0):(k||R(this,L,_t).call(this,f,"expire"),T&&(T.get="stale"),h?(T&&(T.returnedStale=!0),w):void 0):(T&&(T.get=E?"fetching":"hit"),R(this,L,Nn).call(this,O),y&&b(this,tn).call(this,O),E?w.__staleWhileFetching:w)},pr=function(f,p){b(this,We)[p]=f,b(this,Pe)[f]=p},Nn=function(f){f!==b(this,ke)&&(f===b(this,Ae)?V(this,Ae,b(this,Pe)[f]):R(this,L,pr).call(this,b(this,We)[f],b(this,Pe)[f]),R(this,L,pr).call(this,b(this,ke),f),V(this,ke,f))},_t=function(f,p){var y,k;Ce.hasSubscribers&&Ce.publish({op:"delete",delete:p,key:f,cache:this});let h=!1;if(b(this,xe)!==0){let T=b(this,be).get(f);if(T!==void 0)if(b(this,$e)?.[T]&&(clearTimeout(b(this,$e)?.[T]),b(this,$e)[T]=void 0),h=!0,b(this,xe)===1)R(this,L,hr).call(this,p);else{b(this,nn).call(this,T);let O=b(this,q)[T];if(R(this,L,ue).call(this,O)?O.__abortController.abort(new Error("deleted")):(b(this,gt)||b(this,Ne))&&(b(this,gt)&&((y=b(this,lt))==null||y.call(this,O,f,p)),b(this,Ne)&&b(this,Te)?.push([O,f,p])),b(this,be).delete(f),b(this,ce)[T]=void 0,b(this,q)[T]=void 0,T===b(this,ke))V(this,ke,b(this,We)[T]);else if(T===b(this,Ae))V(this,Ae,b(this,Pe)[T]);else{let w=b(this,We)[T];b(this,Pe)[w]=b(this,Pe)[T];let E=b(this,Pe)[T];b(this,We)[E]=b(this,We)[T]}vs(this,xe)._--,b(this,pt).push(T)}}if(b(this,Ne)&&b(this,Te)?.length){let T=b(this,Te),O;for(;O=T?.shift();)(k=b(this,ut))==null||k.call(this,...O)}return h},hr=function(f){var p,h;for(let y of R(this,L,Bt).call(this,{allowStale:!0})){let k=b(this,q)[y];if(R(this,L,ue).call(this,k))k.__abortController.abort(new Error("deleted"));else{let T=b(this,ce)[y];b(this,gt)&&((p=b(this,lt))==null||p.call(this,k,T,f)),b(this,Ne)&&b(this,Te)?.push([k,T,f])}}if(b(this,be).clear(),b(this,q).fill(void 0),b(this,ce).fill(void 0),b(this,qe)&&b(this,dt)){b(this,qe).fill(0),b(this,dt).fill(0);for(let y of b(this,$e)??[])y!==void 0&&clearTimeout(y);b(this,$e)?.fill(void 0)}if(b(this,ht)&&b(this,ht).fill(0),V(this,Ae,0),V(this,ke,0),b(this,pt).length=0,V(this,ft,0),V(this,xe,0),b(this,Ne)&&b(this,Te)){let y=b(this,Te),k;for(;k=y?.shift();)(h=b(this,ut))==null||h.call(this,...k)}},Tn);function Gn(g){let f={individual:{},range:[]},p=new WeakMap;for(let h of g)gr(f,h,p);return f}function gr(g,f,p){for(let[h,y]of Object.entries(f.individual))if(g.individual[h])Cn(g.individual[h],y,p);else{let k=!1;for(let[T,{range:O,entry:w}]of g.range.entries()){let E=dr(Number(h),O);if(E.both!==null){k=!0,g.individual[h]=y,Cn(g.individual[h],Oe(w),p),g.range.splice(T,1);for(let j of E.second)Array.isArray(j)?g.range.push({range:j,entry:Oe(w)}):g.individual[j]=Oe(w)}}k||(g.individual[h]=y)}for(let{range:h,entry:y}of f.range){let k=[h];for(let T=0;T<g.range.length;T++){let{range:O,entry:w}=g.range[T];for(let[E,j]of k.entries())if(Array.isArray(j)){let H=Jp(j,O);if(H.both===null)continue;g.range.splice(T,1),T--;let Q=Oe(w);Array.isArray(H.both)?g.range.push({range:H.both,entry:Q}):g.individual[H.both]=Q,Cn(Q,Oe(y),p);for(let X of H.second)Array.isArray(X)?g.range.push({range:X,entry:Oe(w)}):g.individual[X]=Oe(w);k=H.first}else{let H=dr(j,O);if(H.both===null)continue;g.individual[j]=Oe(y),Cn(g.individual[j],Oe(w),p),g.range.splice(T,1),T--;for(let Q of H.second)Array.isArray(Q)?g.range.push({range:Q,entry:Oe(w)}):g.individual[Q]=Oe(w);k.splice(E,1,...H.first);break}}for(let T of Object.keys(g.individual))for(let[O,w]of k.entries())if(Array.isArray(w)){let E=dr(Number(T),w);if(E.both===null)continue;Cn(g.individual[T],Oe(y),p),k.splice(O,1,...E.second);break}else if(Number(T)===w){Cn(g.individual[T],Oe(y),p);break}for(let T of k)Array.isArray(T)?g.range.push({range:T,entry:Oe(y)}):g.individual[T]=Oe(y)}}function Cn(g,f,p){let h=p.get(g);h?.has(f)||(h||(h=new Set,p.set(g,h)),h.add(f),f.lookup&&(!g.lookup||g.lookup.index>f.lookup.index||g.lookup.index===f.lookup.index&&g.lookup.subIndex>f.lookup.subIndex)&&(g.lookup=f.lookup),f.forward&&(g.forward?gr(g.forward,f.forward,p):g.forward=f.forward),f.reverse&&(g.reverse?gr(g.reverse,f.reverse,p):g.reverse=f.reverse))}function Jp(g,f){let p={first:[],second:[],both:null};if(g[0]<f[1]&&f[0]<g[1]){let h=Math.max(g[0],f[0]),y=Math.min(g[1],f[1]);p.both=sn(h,y)}if(g[0]<f[0]){let h=g[0],y=Math.min(f[0],g[1]);p.first.push(sn(h,y))}else if(f[0]<g[0]){let h=f[0],y=Math.min(f[1],g[0]);p.second.push(sn(h,y))}if(g[1]>f[1]){let h=Math.max(g[0],f[1]),y=g[1];p.first.push(sn(h,y))}else if(f[1]>g[1]){let h=Math.max(g[1],f[0]),y=f[1];p.second.push(sn(h,y))}return p}function dr(g,f){if(g<f[0]||g>f[1])return{first:[g],second:[f],both:null};let p={first:[],second:[],both:g};return f[0]<g&&p.second.push(sn(f[0],g)),f[1]>g&&p.second.push(sn(g+1,f[1])),p}function sn(g,f){return f-g===1?g:[g,f]}function Oe(g,f=new Map){if(f.has(g))return f.get(g);let p={};return f.set(g,p),g.forward&&(p.forward=Ni(g.forward,f)),g.reverse&&(p.reverse=Ni(g.reverse,f)),g.lookup&&(p.lookup={contextRange:g.lookup.contextRange.slice(),index:g.lookup.index,length:g.lookup.length,subIndex:g.lookup.subIndex,substitutions:g.lookup.substitutions.slice()}),p}function Ni(g,f=new Map){let p={};for(let[h,y]of Object.entries(g.individual))p[h]=Oe(y,f);return{individual:p,range:g.range.map(({range:h,entry:y})=>({range:h.slice(),entry:Oe(y,f)}))}}function Hn(g,f,p,h){let y=f[h],k=g[y];if(!k)return;let T=k.lookup;if(k.reverse){let w=eh(k.reverse,f,p);(!T&&w||w&&T&&(T.index>w.index||T.index===w.index&&T.subIndex>w.subIndex))&&(T=w)}if(++h>=f.length||!k.forward)return T;let O=Hn(k.forward,f,p,h);return(!T&&O||O&&T&&(T.index>O.index||T.index===O.index&&T.subIndex>O.subIndex))&&(T=O),T}function eh(g,f,p){let h=g[f[--p]],y=h&&h.lookup;for(;h&&((!y&&h.lookup||h.lookup&&y&&y.index>h.lookup.index)&&(y=h.lookup),!(--p<0||!h.reverse));)h=h.reverse[f[p]];return y}function Cs(g,f,p){let h=!1;for(let y=0;y<g.length;y++){let k=g[y];if(h){if(p<=k[0])return g[y-1][1]=p,g;if(p<=k[1])return g[y-1][1]=Math.max(p,k[1]),g.splice(y,1),g;g.splice(y,1),y--}else{if(p<=k[0])return g.splice(y,0,[f,p]),g;if(p<=k[1])return k[0]=Math.min(f,k[0]),g;if(f<k[1])k[0]=Math.min(f,k[0]),h=!0;else continue}}return h?g[g.length-1][1]=p:g.push([f,p]),g}function mr(g,f){switch(g.format){case 1:let p=g.glyphs.indexOf(f);return p!==-1?p:null;case 2:let h=g.ranges.find(y=>y.start<=f&&y.end>=f);return h?h.index:null}}function Ye(g){switch(g.format){case 1:return g.glyphs.map((p,h)=>({glyphId:p,index:h}));case 2:let f=[];for(let[p,h]of g.ranges.entries())h.end===h.start?f.push({glyphId:h.start,index:p}):f.push({glyphId:[h.start,h.end+1],index:p});return f}}function Bi(g,f){let p=f[0],h=Os(g,p),y=f[0]+1,k=new Map;for(;y<f[1];)Os(g,y)!==h&&(y-p<=1?k.set(p,h):k.set([p,y],h)),y++;return y-p<=1?k.set(p,h):k.set([p,y],h),k}function Os(g,f){let p=mr(g.coverage,f);if(p===null)return null;switch(g.substFormat){case 1:return(f+g.deltaGlyphId)%2**16;case 2:return g.substitute[p]??null}}function On(g,f,p,h,y){let k=[];for(let T of p){T.entry.forward={individual:{},range:[]};for(let O of g)k.push(...rn(T.entry.forward,h,y,f,O).map(({entry:w,substitution:E})=>({entry:w,substitutions:[...T.substitutions,E]})))}return k}function Gt(g,f){let p=[],h=new Set;for(let y of f){if(h.has(y.entry))continue;h.add(y.entry),y.entry.forward??={individual:{},range:[]};let k={};for(let T of g)Array.isArray(T)?y.entry.forward.range.push({entry:k,range:T}):y.entry.forward.individual[T]=k;p.push({entry:k,substitutions:y.substitutions})}return p}function Ht(g,f){let p=[],h=new Set;for(let y of f){if(h.has(y.entry))continue;h.add(y.entry),y.entry.reverse??={individual:{},range:[]};let k={};for(let T of g)Array.isArray(T)?y.entry.reverse.range.push({entry:k,range:T}):y.entry.reverse.individual[T]=k;p.push({entry:k,substitutions:y.substitutions})}return p}function rn(g,f,p,h,y){let k=[];if(!Array.isArray(y))g.individual[y]={},k.push({entry:g.individual[y],substitution:nh(f,p,h,y)});else{let T=th(f,p,h,y);for(let[O,w]of T){let E={};Array.isArray(O)?g.range.push({range:O,entry:E}):g.individual[O]={},k.push({entry:E,substitution:w})}}return k}function th(g,f,p,h){for(let y of g.filter(k=>k.sequenceIndex===p))for(let k of f[y.lookupListIndex].subtables){let T=Bi(k,h);if(!Array.from(T.values()).every(O=>O!==null))return T}return new Map([[h,null]])}function nh(g,f,p,h){for(let y of g.filter(k=>k.sequenceIndex===p))for(let k of f[y.lookupListIndex].subtables){let T=Os(k,h);if(T!==null)return T}return null}function yr(g,f,p){let h={individual:{},range:[]},y=Ye(g.coverage);for(let{glyphId:k,index:T}of y){let O=g.chainRuleSets[T];if(O)for(let[w,E]of O.entries()){let j=rn(h,E.lookupRecords,f,0,k).map(({entry:H,substitution:Q})=>({entry:H,substitutions:[Q]}));for(let[H,Q]of E.input.entries())j=On([Q],H+1,j,E.lookupRecords,f);for(let H of E.lookahead)j=Gt([H],j);for(let H of E.backtrack)j=Ht([H],j);for(let{entry:H,substitutions:Q}of j)H.lookup={substitutions:Q,length:E.input.length+1,index:p,subIndex:w,contextRange:[-1*E.backtrack.length,1+E.input.length+E.lookahead.length]}}}return h}function vr(g,f){return g.format===2?Array.isArray(f)?sh(g,f):new Map([[f,br(g,f)]]):new Map([[f,null]])}function sh(g,f){let p=f[0],h=br(g,p),y=f[0]+1,k=new Map;for(;y<f[1];)br(g,y)!==h&&(y-p<=1?k.set(p,h):k.set([p,y],h)),y++;return y-p<=1?k.set(p,h):k.set([p,y],h),k}function br(g,f){for(let p of g.ranges)if(p.start<=f&&p.end>=f)return p.classId;return null}function Is(g,f){switch(g.format){case 2:let p=[];for(let h of g.ranges)h.classId===f&&(h.end===h.start?p.push(h.start):p.push([h.start,h.end+1]));return p;default:return[]}}function xr(g,f,p){let h=[],y=Ye(g.coverage);for(let{glyphId:k}of y){let T=vr(g.inputClassDef,k);for(let[O,w]of T.entries()){if(w===null)continue;let E=g.chainClassSet[w];if(E)for(let[j,H]of E.entries()){let Q={individual:{},range:[]},X=rn(Q,H.lookupRecords,f,0,O).map(({entry:fe,substitution:J})=>({entry:fe,substitutions:[J]}));for(let[fe,J]of H.input.entries())X=On(Is(g.inputClassDef,J),fe+1,X,H.lookupRecords,f);for(let fe of H.lookahead)X=Gt(Is(g.lookaheadClassDef,fe),X);for(let fe of H.backtrack)X=Ht(Is(g.backtrackClassDef,fe),X);for(let{entry:fe,substitutions:J}of X)fe.lookup={substitutions:J,index:p,subIndex:j,length:H.input.length+1,contextRange:[-1*H.backtrack.length,1+H.input.length+H.lookahead.length]};h.push(Q)}}}return Gn(h)}function Sr(g,f,p){let h={individual:{},range:[]},y=Ye(g.inputCoverage[0]);for(let{glyphId:k}of y){let T=rn(h,g.lookupRecords,f,0,k).map(({entry:O,substitution:w})=>({entry:O,substitutions:[w]}));for(let[O,w]of g.inputCoverage.slice(1).entries())T=On(Ye(w).map(E=>E.glyphId),O+1,T,g.lookupRecords,f);for(let O of g.lookaheadCoverage)T=Gt(Ye(O).map(w=>w.glyphId),T);for(let O of g.backtrackCoverage)T=Ht(Ye(O).map(w=>w.glyphId),T);for(let{entry:O,substitutions:w}of T)O.lookup={substitutions:w,index:p,subIndex:0,length:g.inputCoverage.length,contextRange:[-1*g.backtrackCoverage.length,g.inputCoverage.length+g.lookaheadCoverage.length]}}return h}function kr(g,f){let p={individual:{},range:[]},h=Ye(g.coverage);for(let{glyphId:y,index:k}of h){let T={};Array.isArray(y)?p.range.push({entry:T,range:y}):p.individual[y]=T;let O=[{entry:T,substitutions:[g.substitutes[k]]}];for(let w of g.lookaheadCoverage)O=Gt(Ye(w).map(E=>E.glyphId),O);for(let w of g.backtrackCoverage)O=Ht(Ye(w).map(E=>E.glyphId),O);for(let{entry:w,substitutions:E}of O)w.lookup={substitutions:E,index:f,subIndex:0,length:1,contextRange:[-1*g.backtrackCoverage.length,1+g.lookaheadCoverage.length]}}return p}function Vn(g,f=new Map){let p={};for(let[h,y]of Object.entries(g.individual))p[h]=_i(y,f);for(let{range:h,entry:y}of g.range){let k=_i(y,f);for(let T=h[0];T<h[1];T++)p[T]=k}return p}function _i(g,f){if(f.has(g))return f.get(g);let p={};return f.set(g,p),g.forward&&(p.forward=Vn(g.forward,f)),g.reverse&&(p.reverse=Vn(g.reverse,f)),g.lookup&&(p.lookup=g.lookup),p}var Tr=class{constructor(f,p){this._lookupTrees=[];this._glyphLookups={};this._font=f,p.cacheSize>0&&(this._cache=new Ri({maxSize:p.cacheSize,sizeCalculation:((O,w)=>w.length)}));let y=(this._font.tables.gsub&&this._font.tables.gsub.features.filter(O=>O.tag==="calt")||[]).reduce((O,w)=>[...O,...w.feature.lookupListIndexes],[]),k=this._font.tables.gsub&&this._font.tables.gsub.lookups||[],T=k.filter((O,w)=>y.some(E=>E===w));for(let[O,w]of T.entries()){let E=[];switch(w.lookupType){case 6:for(let[H,Q]of w.subtables.entries())switch(Q.substFormat){case 1:E.push(yr(Q,k,H));break;case 2:E.push(xr(Q,k,H));break;case 3:E.push(Sr(Q,k,H));break}break;case 8:for(let[H,Q]of w.subtables.entries())E.push(kr(Q,H));break}let j=Vn(Gn(E));this._lookupTrees.push({tree:j,processForward:w.lookupType!==8});for(let H of Object.keys(j))this._glyphLookups[H]||(this._glyphLookups[H]=[]),this._glyphLookups[H].push(O)}}findLigatures(f){let p=this._cache&&this._cache.get(f);if(p&&!Array.isArray(p))return p;let h=[];for(let T of f)h.push(this._font.charToGlyphIndex(T));if(this._lookupTrees.length===0)return{inputGlyphs:h,outputGlyphs:h,contextRanges:[]};let y=this._findInternal(h.slice()),k={inputGlyphs:h,outputGlyphs:y.sequence,contextRanges:y.ranges};return this._cache&&this._cache.set(f,k),k}findLigatureRanges(f){if(this._lookupTrees.length===0)return[];let p=this._cache&&this._cache.get(f);if(p)return Array.isArray(p)?p:p.contextRanges;let h=[];for(let k of f)h.push(this._font.charToGlyphIndex(k));let y=this._findInternal(h);return this._cache&&this._cache.set(f,y.ranges),y.ranges}_findInternal(f){let p=[],h=this._getNextLookup(f,0);for(;h.index!==null;){let y=this._lookupTrees[h.index];if(y.processForward){let k=h.last;for(let T=h.first;T<k;T++){let O=Hn(y.tree,f,T,T);if(O){for(let w=0;w<O.substitutions.length;w++){let E=O.substitutions[w];E!==null&&(f[T+w]=E)}Cs(p,O.contextRange[0]+T,O.contextRange[1]+T),T+O.length>=k&&(k=T+O.length+1),T+=O.length-1}}}else for(let k=h.last-1;k>=h.first;k--){let T=Hn(y.tree,f,k,k);if(T){for(let O=0;O<T.substitutions.length;O++){let w=T.substitutions[O];w!==null&&(f[k+O]=w)}Cs(p,T.contextRange[0]+k,T.contextRange[1]+k),k-=T.length-1}}h=this._getNextLookup(f,h.index+1)}return{sequence:f,ranges:p}}_getNextLookup(f,p){let h={index:null,first:1/0,last:-1};for(let y=0;y<f.length;y++){let k=this._glyphLookups[f[y]];if(k)for(let T=0;T<k.length;T++){let O=k[T];if(O>=p){(h.index===null||O<=h.index)&&(h.index=O,h.first>y&&(h.first=y),h.last=y+1);break}}}return h}};function Hi(g,f){let p=Gi.parse(g);return new Tr(p,{cacheSize:0,...f})}function Or(g){if(typeof g!="string")throw new Error("Font family must be a string");let f={input:g,offset:0},p=[],h="";for(;f.offset<f.input.length;){let y=f.input[f.offset++];switch(y){case"'":case'"':h+=rh(f,y);break;case",":p.push(h),h="";break;default:/\s/.test(y)||(f.offset--,h+=oh(f),p.push(h),h="")}}return p}function rh(g,f){let p="",h=!1;for(;g.offset<g.input.length;){let y=g.input[g.offset++];if(h)/[\dA-Fa-f]/.test(y)?(g.offset--,p+=Vi(g)):y!==`
19
+ `&&(p+=y),h=!1;else switch(y){case f:return p;case"\\":h=!0;break;default:p+=y}}throw new Error("Unterminated string")}function oh(g){let f="",p=!1;for(;g.offset<g.input.length;){let h=g.input[g.offset++];if(p)/[\dA-Fa-f]/.test(h)?(g.offset--,f+=Vi(g)):f+=h,p=!1;else switch(h){case"\\":p=!0;break;case",":return f;default:/\s/.test(h)?f.endsWith(" ")||(f+=" "):f+=h}}return f}function Vi(g){let f="";for(;g.offset<g.input.length;){let p=g.input[g.offset++];if(/\s/.test(p))return Cr(f);if(f.length>=6||!/[\dA-Fa-f]/.test(p))return g.offset--,Cr(f);f+=p}return Cr(f)}function Cr(g){return String.fromCodePoint(parseInt(g,16))}var zn;async function Ir(g,f){if(!zn){if(typeof navigator<"u"&&"fonts"in navigator){try{let y=await navigator.permissions.request?.({name:"local-fonts"});if(y&&y.state!=="granted")throw new Error("Permission to access local fonts not granted.")}catch(y){if(y instanceof Error&&y.name!=="TypeError")throw y}let h={};try{let y=await navigator.fonts.query();for(let k of y)h.hasOwnProperty(k.family)||(h[k.family]=[]),h[k.family].push(k);zn=Promise.resolve(h)}catch(y){y instanceof Error&&console.error(y.name,y.message)}}else if(typeof window<"u"&&"queryLocalFonts"in window){let h={};try{let y=await window.queryLocalFonts();for(let k of y)h.hasOwnProperty(k.family)||(h[k.family]=[]),h[k.family].push(k);zn=Promise.resolve(h)}catch(y){y instanceof Error&&console.error(y.name,y.message)}}zn??=Promise.resolve({})}let p=await zn;for(let h of Or(g)){if(ih.includes(h))return;if(p.hasOwnProperty(h)&&p[h].length>0){let y=p[h][0];if("blob"in y){let T=await(await y.blob()).arrayBuffer();return Hi(T,{cacheSize:f})}return}}}var ih=["serif","sans-serif","cursive","fantasy","monospace","system-ui","emoji","math","fangsong"];var ah=1e5;function zi(g,f=[]){let p,h,y=0,k;return g.registerCharacterJoiner(T=>{let O=g.options.fontFamily;if(O&&(y===0||p!==O)){h=void 0,y=1,p=O;let w=p;Ir(w,ah).then(E=>{w===g.options.fontFamily&&(y=2,h=E,E&&g.refresh(0,g.rows-1))}).catch(E=>{w===g.options.fontFamily&&(y=3,g.options.logLevel==="debug"&&console.debug(k,new Error("Failure while loading font")),h=void 0,k=E)})}return h&&y===2?h.findLigatureRanges(T).map(w=>[w[0],w[1]]):lh(T,f)})}function lh(g,f){let p=[];for(let h=0;h<g.length;h++)for(let y=0;y<f.length;y++)if(g.startsWith(f[y],h)){p.push([h,h+f[y].length]),h+=f[y].length-1;break}return p}var ji=class{constructor(f){this._fallbackLigatures=(f?.fallbackLigatures??["<--","<---","<<-","<-","->","->>","-->","--->","<==","<===","<<=","<=","=>","=>>","==>","===>",">=",">>=","<->","<-->","<--->","<---->","<=>","<==>","<===>","<====>","::",":::","<~~","</","</>","/>","~~>","==","!=","/=","~=","<>","===","!==","!===","<:",":=","*=","*+","<*","<*>","*>","<|","<|>","|>","+*","=*","=:",":>","/*","*/","+++","<!--","<!---"]).sort((p,h)=>h.length-p.length),this._fontFeatureSettings=f?.fontFeatureSettings}activate(f){if(!f.element)throw new Error("Cannot activate LigaturesAddon before open is called");this._terminal=f,this._characterJoinerId=zi(f,this._fallbackLigatures),f.element.style.fontFeatureSettings=this._fontFeatureSettings??'"calt" on'}dispose(){this._characterJoinerId!==void 0&&(this._terminal?.deregisterCharacterJoiner(this._characterJoinerId),this._characterJoinerId=void 0),this._terminal?.element&&(this._terminal.element.style.fontFeatureSettings="")}};export{ji as LigaturesAddon};
19
20
  //# sourceMappingURL=addon-ligatures.mjs.map