@spiffcommerce/core 16.0.0-beta.5 → 16.0.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -18272,7 +18272,7 @@ const cc = (e) => e.every((t) => t !== "undefined"), Qc = (e) => cc([typeof docu
|
|
|
18272
18272
|
const t = await DI(e);
|
|
18273
18273
|
return await MI(t);
|
|
18274
18274
|
}, nw = async (e) => {
|
|
18275
|
-
const t = await n0(e), n = new Uint8Array(e), r = String.fromCharCode
|
|
18275
|
+
const t = await n0(e), n = new Uint8Array(e), r = String.fromCharCode(...n), i = btoa(r);
|
|
18276
18276
|
return `data:${t};base64,${i}`;
|
|
18277
18277
|
}, QI = (e) => {
|
|
18278
18278
|
const t = e.replace(/\r?\n/g, ""), n = t.indexOf(",");
|
package/dist/index.umd.cjs
CHANGED
|
@@ -65,7 +65,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
|
|
|
65
65
|
matrix(${u}, ${-A}, ${A}, ${u}, 0, 0)
|
|
66
66
|
matrix(1, 0, 0, 1, ${-e.width/2}, ${-e.height/2})
|
|
67
67
|
matrix(${e.scaleX}, 0, 0, ${e.scaleY}, 0, 0)
|
|
68
|
-
`,children:[ut("path",{filter:o?`url(#${n})`:void 0,mask:o?`url(#${r})`:void 0,d:e.path,style:{fill:`url(#${t})`,opacity:e.opacity}}),o?ut("path",{mask:`url(#${i})`,d:e.path,style:{fill:`url(#${t})`,opacity:e.opacity}}):void 0]})})]})},Fb=e=>{const{path:t,width:n,height:r,focalBlurStrength:i,focalBlurRadius:a,blurFilterId:s,focalMaskId:o,blurEdgeClipId:c}=e;return ut(ze,{children:[ut("filter",{id:s,children:ut("feGaussianBlur",{stdDeviation:i||0})}),ut("mask",{id:o,children:ut("circle",{cx:n/2,cy:r/2,r:a||0,fill:"white",filter:`url(#${s})`})}),ut("mask",{id:c,children:ut("path",{d:t,style:{fill:"white",opacity:1}})})]})};/*! https://mths.be/codepointat v0.2.0 by @mathias */String.prototype.codePointAt||function(){var e=function(){try{var n={},r=Object.defineProperty,i=r(n,n,n)&&r}catch{}return i}(),t=function(n){if(this==null)throw TypeError();var r=String(this),i=r.length,a=n?Number(n):0;if(a!=a&&(a=0),!(a<0||a>=i)){var s=r.charCodeAt(a),o;return s>=55296&&s<=56319&&i>a+1&&(o=r.charCodeAt(a+1),o>=56320&&o<=57343)?(s-55296)*1024+o-56320+65536:s}};e?e(String.prototype,"codePointAt",{value:t,configurable:!0,writable:!0}):String.prototype.codePointAt=t}();var sh=0,Up=-3;function Us(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function Qb(e,t){this.source=e,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=t,this.destLen=0,this.ltree=new Us,this.dtree=new Us}var Lp=new Us,Yp=new Us,oh=new Uint8Array(30),ch=new Uint16Array(30),Hp=new Uint8Array(30),Gp=new Uint16Array(30),Mb=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Vp=new Us,ir=new Uint8Array(288+32);function zp(e,t,n,r){var i,a;for(i=0;i<n;++i)e[i]=0;for(i=0;i<30-n;++i)e[i+n]=i/n|0;for(a=r,i=0;i<30;++i)t[i]=a,a+=1<<e[i]}function Tb(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[24+144+n]=280+n;for(n=0;n<112;++n)e.trans[24+144+8+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 Jp=new Uint16Array(16);function lh(e,t,n,r){var i,a;for(i=0;i<16;++i)e.table[i]=0;for(i=0;i<r;++i)e.table[t[n+i]]++;for(e.table[0]=0,a=0,i=0;i<16;++i)Jp[i]=a,a+=e.table[i];for(i=0;i<r;++i)t[n+i]&&(e.trans[Jp[t[n+i]]++]=i)}function Nb(e){e.bitcount--||(e.tag=e.source[e.sourceIndex++],e.bitcount=7);var t=e.tag&1;return e.tag>>>=1,t}function ar(e,t,n){if(!t)return n;for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var r=e.tag&65535>>>16-t;return e.tag>>>=t,e.bitcount-=t,r+n}function uh(e,t){for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var n=0,r=0,i=0,a=e.tag;do r=2*r+(a&1),a>>>=1,++i,n+=t.table[i],r-=t.table[i];while(r>=0);return e.tag=a,e.bitcount-=i,t.trans[n+r]}function Pb(e,t,n){var r,i,a,s,o,c;for(r=ar(e,5,257),i=ar(e,5,1),a=ar(e,4,4),s=0;s<19;++s)ir[s]=0;for(s=0;s<a;++s){var l=ar(e,3,0);ir[Mb[s]]=l}for(lh(Vp,ir,0,19),o=0;o<r+i;){var u=uh(e,Vp);switch(u){case 16:var A=ir[o-1];for(c=ar(e,2,3);c;--c)ir[o++]=A;break;case 17:for(c=ar(e,3,3);c;--c)ir[o++]=0;break;case 18:for(c=ar(e,7,11);c;--c)ir[o++]=0;break;default:ir[o++]=u;break}}lh(t,ir,0,r),lh(n,ir,r,i)}function jp(e,t,n){for(;;){var r=uh(e,t);if(r===256)return sh;if(r<256)e.dest[e.destLen++]=r;else{var i,a,s,o;for(r-=257,i=ar(e,oh[r],ch[r]),a=uh(e,n),s=e.destLen-ar(e,Hp[a],Gp[a]),o=s;o<s+i;++o)e.dest[e.destLen++]=e.dest[o]}}}function kb(e){for(var t,n,r;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 Up;for(e.sourceIndex+=4,r=t;r;--r)e.dest[e.destLen++]=e.source[e.sourceIndex++];return e.bitcount=0,sh}function Rb(e,t){var n=new Qb(e,t),r,i,a;do{switch(r=Nb(n),i=ar(n,2,0),i){case 0:a=kb(n);break;case 1:a=jp(n,Lp,Yp);break;case 2:Pb(n,n.ltree,n.dtree),a=jp(n,n.ltree,n.dtree);break;default:a=Up}if(a!==sh)throw new Error("Data error")}while(!r);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}Tb(Lp,Yp),zp(oh,ch,4,3),zp(Hp,Gp,2,1),oh[28]=0,ch[28]=258;var Ob=Rb;function ba(e,t,n,r,i){return Math.pow(1-i,3)*e+3*Math.pow(1-i,2)*i*t+3*(1-i)*Math.pow(i,2)*n+Math.pow(i,3)*r}function mr(){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN}mr.prototype.isEmpty=function(){return isNaN(this.x1)||isNaN(this.y1)||isNaN(this.x2)||isNaN(this.y2)},mr.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))},mr.prototype.addX=function(e){this.addPoint(e,null)},mr.prototype.addY=function(e){this.addPoint(null,e)},mr.prototype.addBezier=function(e,t,n,r,i,a,s,o){var c=[e,t],l=[n,r],u=[i,a],A=[s,o];this.addPoint(e,t),this.addPoint(s,o);for(var h=0;h<=1;h++){var f=6*c[h]-12*l[h]+6*u[h],d=-3*c[h]+9*l[h]-9*u[h]+3*A[h],p=3*l[h]-3*c[h];if(d===0){if(f===0)continue;var m=-p/f;0<m&&m<1&&(h===0&&this.addX(ba(c[h],l[h],u[h],A[h],m)),h===1&&this.addY(ba(c[h],l[h],u[h],A[h],m)));continue}var y=Math.pow(f,2)-4*p*d;if(!(y<0)){var v=(-f+Math.sqrt(y))/(2*d);0<v&&v<1&&(h===0&&this.addX(ba(c[h],l[h],u[h],A[h],v)),h===1&&this.addY(ba(c[h],l[h],u[h],A[h],v)));var w=(-f-Math.sqrt(y))/(2*d);0<w&&w<1&&(h===0&&this.addX(ba(c[h],l[h],u[h],A[h],w)),h===1&&this.addY(ba(c[h],l[h],u[h],A[h],w)))}}},mr.prototype.addQuad=function(e,t,n,r,i,a){var s=e+.6666666666666666*(n-e),o=t+2/3*(r-t),c=s+1/3*(i-e),l=o+1/3*(a-t);this.addBezier(e,t,s,o,c,l,i,a)};function ye(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}ye.prototype.moveTo=function(e,t){this.commands.push({type:"M",x:e,y:t})},ye.prototype.lineTo=function(e,t){this.commands.push({type:"L",x:e,y:t})},ye.prototype.curveTo=ye.prototype.bezierCurveTo=function(e,t,n,r,i,a){this.commands.push({type:"C",x1:e,y1:t,x2:n,y2:r,x:i,y:a})},ye.prototype.quadTo=ye.prototype.quadraticCurveTo=function(e,t,n,r){this.commands.push({type:"Q",x1:e,y1:t,x:n,y:r})},ye.prototype.close=ye.prototype.closePath=function(){this.commands.push({type:"Z"})},ye.prototype.extend=function(e){if(e.commands)e=e.commands;else if(e instanceof mr){var 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)},ye.prototype.getBoundingBox=function(){for(var e=new mr,t=0,n=0,r=0,i=0,a=0;a<this.commands.length;a++){var s=this.commands[a];switch(s.type){case"M":e.addPoint(s.x,s.y),t=r=s.x,n=i=s.y;break;case"L":e.addPoint(s.x,s.y),r=s.x,i=s.y;break;case"Q":e.addQuad(r,i,s.x1,s.y1,s.x,s.y),r=s.x,i=s.y;break;case"C":e.addBezier(r,i,s.x1,s.y1,s.x2,s.y2,s.x,s.y),r=s.x,i=s.y;break;case"Z":r=t,i=n;break;default:throw new Error("Unexpected path command "+s.type)}}return e.isEmpty()&&e.addPoint(0,0),e},ye.prototype.draw=function(e){e.beginPath();for(var t=0;t<this.commands.length;t+=1){var n=this.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())},ye.prototype.toPathData=function(e){e=e!==void 0?e:2;function t(s){return Math.round(s)===s?""+Math.round(s):s.toFixed(e)}function n(){for(var s=arguments,o="",c=0;c<arguments.length;c+=1){var l=s[c];l>=0&&c>0&&(o+=" "),o+=t(l)}return o}for(var r="",i=0;i<this.commands.length;i+=1){var a=this.commands[i];a.type==="M"?r+="M"+n(a.x,a.y):a.type==="L"?r+="L"+n(a.x,a.y):a.type==="C"?r+="C"+n(a.x1,a.y1,a.x2,a.y2,a.x,a.y):a.type==="Q"?r+="Q"+n(a.x1,a.y1,a.x,a.y):a.type==="Z"&&(r+="Z")}return r},ye.prototype.toSVG=function(e){var t='<path d="';return t+=this.toPathData(e),t+='"',this.fill&&this.fill!=="black"&&(this.fill===null?t+=' fill="none"':t+=' fill="'+this.fill+'"'),this.stroke&&(t+=' stroke="'+this.stroke+'" stroke-width="'+this.strokeWidth+'"'),t+="/>",t},ye.prototype.toDOMElement=function(e){var t=this.toPathData(e),n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d",t),n};function Wp(e){throw new Error(e)}function Kp(e,t){e||Wp(t)}var ht={fail:Wp,argument:Kp,assert:Kp},Xp=32768,_p=2147483648,Sa={},K={},mt={};function Pn(e){return function(){return e}}K.BYTE=function(e){return ht.argument(e>=0&&e<=255,"Byte value should be between 0 and 255."),[e]},mt.BYTE=Pn(1),K.CHAR=function(e){return[e.charCodeAt(0)]},mt.CHAR=Pn(1),K.CHARARRAY=function(e){typeof e>"u"&&(e="",console.warn("Undefined CHARARRAY encountered and treated as an empty string. This is probably caused by a missing glyph name."));for(var t=[],n=0;n<e.length;n+=1)t[n]=e.charCodeAt(n);return t},mt.CHARARRAY=function(e){return typeof e>"u"?0:e.length},K.USHORT=function(e){return[e>>8&255,e&255]},mt.USHORT=Pn(2),K.SHORT=function(e){return e>=Xp&&(e=-(2*Xp-e)),[e>>8&255,e&255]},mt.SHORT=Pn(2),K.UINT24=function(e){return[e>>16&255,e>>8&255,e&255]},mt.UINT24=Pn(3),K.ULONG=function(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]},mt.ULONG=Pn(4),K.LONG=function(e){return e>=_p&&(e=-(2*_p-e)),[e>>24&255,e>>16&255,e>>8&255,e&255]},mt.LONG=Pn(4),K.FIXED=K.ULONG,mt.FIXED=mt.ULONG,K.FWORD=K.SHORT,mt.FWORD=mt.SHORT,K.UFWORD=K.USHORT,mt.UFWORD=mt.USHORT,K.LONGDATETIME=function(e){return[0,0,0,0,e>>24&255,e>>16&255,e>>8&255,e&255]},mt.LONGDATETIME=Pn(8),K.TAG=function(e){return ht.argument(e.length===4,"Tag should be exactly 4 ASCII characters."),[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]},mt.TAG=Pn(4),K.Card8=K.BYTE,mt.Card8=mt.BYTE,K.Card16=K.USHORT,mt.Card16=mt.USHORT,K.OffSize=K.BYTE,mt.OffSize=mt.BYTE,K.SID=K.USHORT,mt.SID=mt.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)},mt.NUMBER=function(e){return K.NUMBER(e).length},K.NUMBER16=function(e){return[28,e>>8&255,e&255]},mt.NUMBER16=Pn(3),K.NUMBER32=function(e){return[29,e>>24&255,e>>16&255,e>>8&255,e&255]},mt.NUMBER32=Pn(5),K.REAL=function(e){var t=e.toString(),n=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(t);if(n){var r=parseFloat("1e"+((n[2]?+n[2]:0)+n[1].length));t=(Math.round(e*r)/r).toString()}for(var i="",a=0,s=t.length;a<s;a+=1){var o=t[a];o==="e"?i+=t[++a]==="-"?"c":"b":o==="."?i+="a":o==="-"?i+="e":i+=o}i+=i.length&1?"f":"ff";for(var c=[30],l=0,u=i.length;l<u;l+=2)c.push(parseInt(i.substr(l,2),16));return c},mt.REAL=function(e){return K.REAL(e).length},K.NAME=K.CHARARRAY,mt.NAME=mt.CHARARRAY,K.STRING=K.CHARARRAY,mt.STRING=mt.CHARARRAY,Sa.UTF8=function(e,t,n){for(var r=[],i=n,a=0;a<i;a++,t+=1)r[a]=e.getUint8(t);return String.fromCharCode.apply(null,r)},Sa.UTF16=function(e,t,n){for(var r=[],i=n/2,a=0;a<i;a++,t+=2)r[a]=e.getUint16(t);return String.fromCharCode.apply(null,r)},K.UTF16=function(e){for(var t=[],n=0;n<e.length;n+=1){var r=e.charCodeAt(n);t[t.length]=r>>8&255,t[t.length]=r&255}return t},mt.UTF16=function(e){return e.length*2};var Ah={"x-mac-croatian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈ƫȅ ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ","x-mac-cyrillic":"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю","x-mac-gaelic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ","x-mac-greek":"Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ","x-mac-icelandic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüݰ¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-inuit":"ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł","x-mac-ce":"ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ",macintosh:"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-romanian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-turkish":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"};Sa.MACSTRING=function(e,t,n,r){var i=Ah[r];if(i!==void 0){for(var a="",s=0;s<n;s++){var o=e.getUint8(t+s);o<=127?a+=String.fromCharCode(o):a+=i[o&127]}return a}};var fl=typeof WeakMap=="function"&&new WeakMap,gl,Ub=function(e){if(!gl){gl={};for(var t in Ah)gl[t]=new String(t)}var n=gl[e];if(n!==void 0){if(fl){var r=fl.get(n);if(r!==void 0)return r}var i=Ah[e];if(i!==void 0){for(var a={},s=0;s<i.length;s++)a[i.charCodeAt(s)]=s+128;return fl&&fl.set(n,a),a}}};K.MACSTRING=function(e,t){var n=Ub(t);if(n!==void 0){for(var r=[],i=0;i<e.length;i++){var a=e.charCodeAt(i);if(a>=128&&(a=n[a],a===void 0))return;r[i]=a}return r}},mt.MACSTRING=function(e,t){var n=K.MACSTRING(e,t);return n!==void 0?n.length:0};function hh(e){return e>=-128&&e<=127}function Lb(e,t,n){for(var r=0,i=e.length;t<i&&r<64&&e[t]===0;)++t,++r;return n.push(128|r-1),t}function Yb(e,t,n){for(var r=0,i=e.length,a=t;a<i&&r<64;){var s=e[a];if(!hh(s)||s===0&&a+1<i&&e[a+1]===0)break;++a,++r}n.push(r-1);for(var o=t;o<a;++o)n.push(e[o]+256&255);return a}function Hb(e,t,n){for(var r=0,i=e.length,a=t;a<i&&r<64;){var s=e[a];if(s===0||hh(s)&&a+1<i&&hh(e[a+1]))break;++a,++r}n.push(64|r-1);for(var o=t;o<a;++o){var c=e[o];n.push(c+65536>>8&255,c+256&255)}return a}K.VARDELTAS=function(e){for(var t=0,n=[];t<e.length;){var r=e[t];r===0?t=Lb(e,t,n):r>=-128&&r<=127?t=Yb(e,t,n):t=Hb(e,t,n)}return n},K.INDEX=function(e){for(var t=1,n=[t],r=[],i=0;i<e.length;i+=1){var a=K.OBJECT(e[i]);Array.prototype.push.apply(r,a),t+=a.length,n.push(t)}if(r.length===0)return[0,0];for(var s=[],o=1+Math.floor(Math.log(t)/Math.log(2))/8|0,c=[void 0,K.BYTE,K.USHORT,K.UINT24,K.ULONG][o],l=0;l<n.length;l+=1){var u=c(n[l]);Array.prototype.push.apply(s,u)}return Array.prototype.concat(K.Card16(e.length),K.OffSize(o),s,r)},mt.INDEX=function(e){return K.INDEX(e).length},K.DICT=function(e){for(var t=[],n=Object.keys(e),r=n.length,i=0;i<r;i+=1){var a=parseInt(n[i],0),s=e[a];t=t.concat(K.OPERAND(s.value,s.type)),t=t.concat(K.OPERATOR(a))}return t},mt.DICT=function(e){return K.DICT(e).length},K.OPERATOR=function(e){return e<1200?[e]:[12,e-1200]},K.OPERAND=function(e,t){var n=[];if(Array.isArray(t))for(var r=0;r<t.length;r+=1)ht.argument(e.length===t.length,"Not enough arguments given for type"+t),n=n.concat(K.OPERAND(e[r],t[r]));else if(t==="SID")n=n.concat(K.NUMBER(e));else if(t==="offset")n=n.concat(K.NUMBER32(e));else if(t==="number")n=n.concat(K.NUMBER(e));else if(t==="real")n=n.concat(K.REAL(e));else throw new Error("Unknown operand type "+t);return n},K.OP=K.BYTE,mt.OP=mt.BYTE;var dl=typeof WeakMap=="function"&&new WeakMap;K.CHARSTRING=function(e){if(dl){var t=dl.get(e);if(t!==void 0)return t}for(var n=[],r=e.length,i=0;i<r;i+=1){var a=e[i];n=n.concat(K[a.type](a.value))}return dl&&dl.set(e,n),n},mt.CHARSTRING=function(e){return K.CHARSTRING(e).length},K.OBJECT=function(e){var t=K[e.type];return ht.argument(t!==void 0,"No encoding function for type "+e.type),t(e.value)},mt.OBJECT=function(e){var t=mt[e.type];return ht.argument(t!==void 0,"No sizeOf function for type "+e.type),t(e.value)},K.TABLE=function(e){for(var t=[],n=e.fields.length,r=[],i=[],a=0;a<n;a+=1){var s=e.fields[a],o=K[s.type];ht.argument(o!==void 0,"No encoding function for field type "+s.type+" ("+s.name+")");var c=e[s.name];c===void 0&&(c=s.value);var l=o(c);s.type==="TABLE"?(i.push(t.length),t=t.concat([0,0]),r.push(l)):t=t.concat(l)}for(var u=0;u<r.length;u+=1){var A=i[u],h=t.length;ht.argument(h<65536,"Table "+e.tableName+" too big."),t[A]=h>>8,t[A+1]=h&255,t=t.concat(r[u])}return t},mt.TABLE=function(e){for(var t=0,n=e.fields.length,r=0;r<n;r+=1){var i=e.fields[r],a=mt[i.type];ht.argument(a!==void 0,"No sizeOf function for field type "+i.type+" ("+i.name+")");var s=e[i.name];s===void 0&&(s=i.value),t+=a(s),i.type==="TABLE"&&(t+=2)}return t},K.RECORD=K.TABLE,mt.RECORD=mt.TABLE,K.LITERAL=function(e){return e},mt.LITERAL=function(e){return e.length};function Ne(e,t,n){if(t.length&&(t[0].name!=="coverageFormat"||t[0].value===1))for(var r=0;r<t.length;r+=1){var i=t[r];this[i.name]=i.value}if(this.tableName=e,this.fields=t,n)for(var a=Object.keys(n),s=0;s<a.length;s+=1){var o=a[s],c=n[o];this[o]!==void 0&&(this[o]=c)}}Ne.prototype.encode=function(){return K.TABLE(this)},Ne.prototype.sizeOf=function(){return mt.TABLE(this)};function Ls(e,t,n){n===void 0&&(n=t.length);var r=new Array(t.length+1);r[0]={name:e+"Count",type:"USHORT",value:n};for(var i=0;i<t.length;i++)r[i+1]={name:e+i,type:"USHORT",value:t[i]};return r}function fh(e,t,n){var r=t.length,i=new Array(r+1);i[0]={name:e+"Count",type:"USHORT",value:r};for(var a=0;a<r;a++)i[a+1]={name:e+a,type:"TABLE",value:n(t[a],a)};return i}function Ys(e,t,n){var r=t.length,i=[];i[0]={name:e+"Count",type:"USHORT",value:r};for(var a=0;a<r;a++)i=i.concat(n(t[a],a));return i}function pl(e){e.format===1?Ne.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:1}].concat(Ls("glyph",e.glyphs))):e.format===2?Ne.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:2}].concat(Ys("rangeRecord",e.ranges,function(t){return[{name:"startGlyphID",type:"USHORT",value:t.start},{name:"endGlyphID",type:"USHORT",value:t.end},{name:"startCoverageIndex",type:"USHORT",value:t.index}]}))):ht.assert(!1,"Coverage format must be 1 or 2.")}pl.prototype=Object.create(Ne.prototype),pl.prototype.constructor=pl;function ml(e){Ne.call(this,"scriptListTable",Ys("scriptRecord",e,function(t,n){var r=t.script,i=r.defaultLangSys;return ht.assert(!!i,"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 Ne("scriptTable",[{name:"defaultLangSys",type:"TABLE",value:new Ne("defaultLangSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:i.reqFeatureIndex}].concat(Ls("featureIndex",i.featureIndexes)))}].concat(Ys("langSys",r.langSysRecords,function(a,s){var o=a.langSys;return[{name:"langSysTag"+s,type:"TAG",value:a.tag},{name:"langSys"+s,type:"TABLE",value:new Ne("langSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:o.reqFeatureIndex}].concat(Ls("featureIndex",o.featureIndexes)))}]})))}]}))}ml.prototype=Object.create(Ne.prototype),ml.prototype.constructor=ml;function yl(e){Ne.call(this,"featureListTable",Ys("featureRecord",e,function(t,n){var r=t.feature;return[{name:"featureTag"+n,type:"TAG",value:t.tag},{name:"feature"+n,type:"TABLE",value:new Ne("featureTable",[{name:"featureParams",type:"USHORT",value:r.featureParams}].concat(Ls("lookupListIndex",r.lookupListIndexes)))}]}))}yl.prototype=Object.create(Ne.prototype),yl.prototype.constructor=yl;function wl(e,t){Ne.call(this,"lookupListTable",fh("lookup",e,function(n){var r=t[n.lookupType];return ht.assert(!!r,"Unable to write GSUB lookup type "+n.lookupType+" tables."),new Ne("lookupTable",[{name:"lookupType",type:"USHORT",value:n.lookupType},{name:"lookupFlag",type:"USHORT",value:n.lookupFlag}].concat(fh("subtable",n.subtables,r)))}))}wl.prototype=Object.create(Ne.prototype),wl.prototype.constructor=wl;var tt={Table:Ne,Record:Ne,Coverage:pl,ScriptList:ml,FeatureList:yl,LookupList:wl,ushortList:Ls,tableList:fh,recordList:Ys};function qp(e,t){return e.getUint8(t)}function vl(e,t){return e.getUint16(t,!1)}function Gb(e,t){return e.getInt16(t,!1)}function gh(e,t){return e.getUint32(t,!1)}function Zp(e,t){var n=e.getInt16(t,!1),r=e.getUint16(t+2,!1);return n+r/65535}function Vb(e,t){for(var n="",r=t;r<t+4;r+=1)n+=String.fromCharCode(e.getInt8(r));return n}function zb(e,t,n){for(var r=0,i=0;i<n;i+=1)r<<=8,r+=e.getUint8(t+i);return r}function Jb(e,t,n){for(var r=[],i=t;i<n;i+=1)r.push(e.getUint8(i));return r}function jb(e){for(var t="",n=0;n<e.length;n+=1)t+=String.fromCharCode(e[n]);return t}var Wb={byte:1,uShort:2,short:2,uLong:4,fixed:4,longDateTime:8,tag:4};function R(e,t){this.data=e,this.offset=t,this.relativeOffset=0}R.prototype.parseByte=function(){var e=this.data.getUint8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},R.prototype.parseChar=function(){var e=this.data.getInt8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},R.prototype.parseCard8=R.prototype.parseByte,R.prototype.parseUShort=function(){var e=this.data.getUint16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},R.prototype.parseCard16=R.prototype.parseUShort,R.prototype.parseSID=R.prototype.parseUShort,R.prototype.parseOffset16=R.prototype.parseUShort,R.prototype.parseShort=function(){var e=this.data.getInt16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},R.prototype.parseF2Dot14=function(){var e=this.data.getInt16(this.offset+this.relativeOffset)/16384;return this.relativeOffset+=2,e},R.prototype.parseULong=function(){var e=gh(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},R.prototype.parseOffset32=R.prototype.parseULong,R.prototype.parseFixed=function(){var e=Zp(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},R.prototype.parseString=function(e){var t=this.data,n=this.offset+this.relativeOffset,r="";this.relativeOffset+=e;for(var i=0;i<e;i++)r+=String.fromCharCode(t.getUint8(n+i));return r},R.prototype.parseTag=function(){return this.parseString(4)},R.prototype.parseLongDateTime=function(){var e=gh(this.data,this.offset+this.relativeOffset+4);return e-=2082844800,this.relativeOffset+=8,e},R.prototype.parseVersion=function(e){var t=vl(this.data,this.offset+this.relativeOffset),n=vl(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,e===void 0&&(e=4096),t+n/e/10},R.prototype.skip=function(e,t){t===void 0&&(t=1),this.relativeOffset+=Wb[e]*t},R.prototype.parseULongList=function(e){e===void 0&&(e=this.parseULong());for(var t=new Array(e),n=this.data,r=this.offset+this.relativeOffset,i=0;i<e;i++)t[i]=n.getUint32(r),r+=4;return this.relativeOffset+=e*4,t},R.prototype.parseOffset16List=R.prototype.parseUShortList=function(e){e===void 0&&(e=this.parseUShort());for(var t=new Array(e),n=this.data,r=this.offset+this.relativeOffset,i=0;i<e;i++)t[i]=n.getUint16(r),r+=2;return this.relativeOffset+=e*2,t},R.prototype.parseShortList=function(e){for(var t=new Array(e),n=this.data,r=this.offset+this.relativeOffset,i=0;i<e;i++)t[i]=n.getInt16(r),r+=2;return this.relativeOffset+=e*2,t},R.prototype.parseByteList=function(e){for(var t=new Array(e),n=this.data,r=this.offset+this.relativeOffset,i=0;i<e;i++)t[i]=n.getUint8(r++);return this.relativeOffset+=e,t},R.prototype.parseList=function(e,t){t||(t=e,e=this.parseUShort());for(var n=new Array(e),r=0;r<e;r++)n[r]=t.call(this);return n},R.prototype.parseList32=function(e,t){t||(t=e,e=this.parseULong());for(var n=new Array(e),r=0;r<e;r++)n[r]=t.call(this);return n},R.prototype.parseRecordList=function(e,t){t||(t=e,e=this.parseUShort());for(var n=new Array(e),r=Object.keys(t),i=0;i<e;i++){for(var a={},s=0;s<r.length;s++){var o=r[s],c=t[o];a[o]=c.call(this)}n[i]=a}return n},R.prototype.parseRecordList32=function(e,t){t||(t=e,e=this.parseULong());for(var n=new Array(e),r=Object.keys(t),i=0;i<e;i++){for(var a={},s=0;s<r.length;s++){var o=r[s],c=t[o];a[o]=c.call(this)}n[i]=a}return n},R.prototype.parseStruct=function(e){if(typeof e=="function")return e.call(this);for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r],a=e[i];n[i]=a.call(this)}return n},R.prototype.parseValueRecord=function(e){if(e===void 0&&(e=this.parseUShort()),e!==0){var 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}},R.prototype.parseValueRecordList=function(){for(var e=this.parseUShort(),t=this.parseUShort(),n=new Array(t),r=0;r<t;r++)n[r]=this.parseValueRecord(e);return n},R.prototype.parsePointer=function(e){var t=this.parseOffset16();if(t>0)return new R(this.data,this.offset+t).parseStruct(e)},R.prototype.parsePointer32=function(e){var t=this.parseOffset32();if(t>0)return new R(this.data,this.offset+t).parseStruct(e)},R.prototype.parseListOfLists=function(e){for(var t=this.parseOffset16List(),n=t.length,r=this.relativeOffset,i=new Array(n),a=0;a<n;a++){var s=t[a];if(s===0){i[a]=void 0;continue}if(this.relativeOffset=s,e){for(var o=this.parseOffset16List(),c=new Array(o.length),l=0;l<o.length;l++)this.relativeOffset=s+o[l],c[l]=e.call(this);i[a]=c}else i[a]=this.parseUShortList()}return this.relativeOffset=r,i},R.prototype.parseCoverage=function(){var e=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 r=new Array(n),i=0;i<n;i++)r[i]={start:this.parseUShort(),end:this.parseUShort(),index:this.parseUShort()};return{format:2,ranges:r}}throw new Error("0x"+e.toString(16)+": Coverage format must be 1 or 2.")},R.prototype.parseClassDef=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{format:1,startGlyph:this.parseUShort(),classes:this.parseUShortList()};if(t===2)return{format:2,ranges:this.parseRecordList({start:R.uShort,end:R.uShort,classId:R.uShort})};throw new Error("0x"+e.toString(16)+": ClassDef format must be 1 or 2.")},R.list=function(e,t){return function(){return this.parseList(e,t)}},R.list32=function(e,t){return function(){return this.parseList32(e,t)}},R.recordList=function(e,t){return function(){return this.parseRecordList(e,t)}},R.recordList32=function(e,t){return function(){return this.parseRecordList32(e,t)}},R.pointer=function(e){return function(){return this.parsePointer(e)}},R.pointer32=function(e){return function(){return this.parsePointer32(e)}},R.tag=R.prototype.parseTag,R.byte=R.prototype.parseByte,R.uShort=R.offset16=R.prototype.parseUShort,R.uShortList=R.prototype.parseUShortList,R.uLong=R.offset32=R.prototype.parseULong,R.uLongList=R.prototype.parseULongList,R.struct=R.prototype.parseStruct,R.coverage=R.prototype.parseCoverage,R.classDef=R.prototype.parseClassDef;var $p={reserved:R.uShort,reqFeatureIndex:R.uShort,featureIndexes:R.uShortList};R.prototype.parseScriptList=function(){return this.parsePointer(R.recordList({tag:R.tag,script:R.pointer({defaultLangSys:R.pointer($p),langSysRecords:R.recordList({tag:R.tag,langSys:R.pointer($p)})})}))||[]},R.prototype.parseFeatureList=function(){return this.parsePointer(R.recordList({tag:R.tag,feature:R.pointer({featureParams:R.offset16,lookupListIndexes:R.uShortList})}))||[]},R.prototype.parseLookupList=function(e){return this.parsePointer(R.list(R.pointer(function(){var t=this.parseUShort();ht.argument(1<=t&&t<=9,"GPOS/GSUB lookup type "+t+" unknown.");var n=this.parseUShort(),r=n&16;return{lookupType:t,lookupFlag:n,subtables:this.parseList(R.pointer(e[t])),markFilteringSet:r?this.parseUShort():void 0}})))||[]},R.prototype.parseFeatureVariationsList=function(){return this.parsePointer32(function(){var e=this.parseUShort(),t=this.parseUShort();ht.argument(e===1&&t<1,"GPOS/GSUB feature variations table unknown.");var n=this.parseRecordList32({conditionSetOffset:R.offset32,featureTableSubstitutionOffset:R.offset32});return n})||[]};var rt={getByte:qp,getCard8:qp,getUShort:vl,getCard16:vl,getShort:Gb,getULong:gh,getFixed:Zp,getTag:Vb,getOffset:zb,getBytes:Jb,bytesToString:jb,Parser:R};function Kb(e,t){t.parseUShort(),e.length=t.parseULong(),e.language=t.parseULong();var n;e.groupCount=n=t.parseULong(),e.glyphIndexMap={};for(var r=0;r<n;r+=1)for(var i=t.parseULong(),a=t.parseULong(),s=t.parseULong(),o=i;o<=a;o+=1)e.glyphIndexMap[o]=s,s++}function Xb(e,t,n,r,i){e.length=t.parseUShort(),e.language=t.parseUShort();var a;e.segCount=a=t.parseUShort()>>1,t.skip("uShort",3),e.glyphIndexMap={};for(var s=new rt.Parser(n,r+i+14),o=new rt.Parser(n,r+i+16+a*2),c=new rt.Parser(n,r+i+16+a*4),l=new rt.Parser(n,r+i+16+a*6),u=r+i+16+a*8,A=0;A<a-1;A+=1)for(var h=void 0,f=s.parseUShort(),d=o.parseUShort(),p=c.parseShort(),m=l.parseUShort(),y=d;y<=f;y+=1)m!==0?(u=l.offset+l.relativeOffset-2,u+=m,u+=(y-d)*2,h=rt.getUShort(n,u),h!==0&&(h=h+p&65535)):h=y+p&65535,e.glyphIndexMap[y]=h}function _b(e,t){var n={};n.version=rt.getUShort(e,t),ht.argument(n.version===0,"cmap table version should be 0."),n.numTables=rt.getUShort(e,t+2);for(var r=-1,i=n.numTables-1;i>=0;i-=1){var a=rt.getUShort(e,t+4+i*8),s=rt.getUShort(e,t+4+i*8+2);if(a===3&&(s===0||s===1||s===10)||a===0&&(s===0||s===1||s===2||s===3||s===4)){r=rt.getULong(e,t+4+i*8+4);break}}if(r===-1)throw new Error("No valid cmap sub-tables found.");var o=new rt.Parser(e,t+r);if(n.format=o.parseUShort(),n.format===12)Kb(n,o);else if(n.format===4)Xb(n,o,e,t,r);else throw new Error("Only format 4 and 12 cmap tables are supported (found format "+n.format+").");return n}function qb(e,t,n){e.segments.push({end:t,start:t,delta:-(t-n),offset:0,glyphIndex:n})}function Zb(e){e.segments.push({end:65535,start:65535,delta:1,offset:0})}function $b(e){var t=!0,n;for(n=e.length-1;n>0;n-=1){var r=e.get(n);if(r.unicode>65535){console.log("Adding CMAP format 12 (needed!)"),t=!1;break}}var i=[{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:12+8}];t||(i=i.concat([{name:"cmap12PlatformID",type:"USHORT",value:3},{name:"cmap12EncodingID",type:"USHORT",value:10},{name:"cmap12Offset",type:"ULONG",value:0}])),i=i.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 a=new tt.Table("cmap",i);for(a.segments=[],n=0;n<e.length;n+=1){for(var s=e.get(n),o=0;o<s.unicodes.length;o+=1)qb(a,s.unicodes[o],n);a.segments=a.segments.sort(function(v,w){return v.start-w.start})}Zb(a);var c=a.segments.length,l=0,u=[],A=[],h=[],f=[],d=[],p=[];for(n=0;n<c;n+=1){var m=a.segments[n];m.end<=65535&&m.start<=65535?(u=u.concat({name:"end_"+n,type:"USHORT",value:m.end}),A=A.concat({name:"start_"+n,type:"USHORT",value:m.start}),h=h.concat({name:"idDelta_"+n,type:"SHORT",value:m.delta}),f=f.concat({name:"idRangeOffset_"+n,type:"USHORT",value:m.offset}),m.glyphId!==void 0&&(d=d.concat({name:"glyph_"+n,type:"USHORT",value:m.glyphId}))):l+=1,!t&&m.glyphIndex!==void 0&&(p=p.concat({name:"cmap12Start_"+n,type:"ULONG",value:m.start}),p=p.concat({name:"cmap12End_"+n,type:"ULONG",value:m.end}),p=p.concat({name:"cmap12Glyph_"+n,type:"ULONG",value:m.glyphIndex}))}if(a.segCountX2=(c-l)*2,a.searchRange=Math.pow(2,Math.floor(Math.log(c-l)/Math.log(2)))*2,a.entrySelector=Math.log(a.searchRange/2)/Math.log(2),a.rangeShift=a.segCountX2-a.searchRange,a.fields=a.fields.concat(u),a.fields.push({name:"reservedPad",type:"USHORT",value:0}),a.fields=a.fields.concat(A),a.fields=a.fields.concat(h),a.fields=a.fields.concat(f),a.fields=a.fields.concat(d),a.cmap4Length=14+u.length*2+2+A.length*2+h.length*2+f.length*2+d.length*2,!t){var y=16+p.length*4;a.cmap12Offset=12+2*2+4+a.cmap4Length,a.fields=a.fields.concat([{name:"cmap12Format",type:"USHORT",value:12},{name:"cmap12Reserved",type:"USHORT",value:0},{name:"cmap12Length",type:"ULONG",value:y},{name:"cmap12Language",type:"ULONG",value:0},{name:"cmap12nGroups",type:"ULONG",value:p.length/3}]),a.fields=a.fields.concat(p)}return a}var t1={parse:_b,make:$b},El=[".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"],tS=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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"],eS=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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"],Di=[".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 e1(e){this.font=e}e1.prototype.charToGlyphIndex=function(e){var t=e.codePointAt(0),n=this.font.glyphs;if(n){for(var r=0;r<n.length;r+=1)for(var i=n.get(r),a=0;a<i.unicodes.length;a+=1)if(i.unicodes[a]===t)return r}return null};function n1(e){this.cmap=e}n1.prototype.charToGlyphIndex=function(e){return this.cmap.glyphIndexMap[e.codePointAt(0)]||0};function Bl(e,t){this.encoding=e,this.charset=t}Bl.prototype.charToGlyphIndex=function(e){var t=e.codePointAt(0),n=this.encoding[t];return this.charset.indexOf(n)};function dh(e){switch(e.version){case 1:this.names=Di.slice();break;case 2:this.names=new Array(e.numberOfGlyphs);for(var t=0;t<e.numberOfGlyphs;t++)e.glyphNameIndex[t]<Di.length?this.names[t]=Di[e.glyphNameIndex[t]]:this.names[t]=e.names[e.glyphNameIndex[t]-Di.length];break;case 2.5:this.names=new Array(e.numberOfGlyphs);for(var n=0;n<e.numberOfGlyphs;n++)this.names[n]=Di[n+e.glyphNameIndex[n]];break;case 3:this.names=[];break;default:this.names=[];break}}dh.prototype.nameToGlyphIndex=function(e){return this.names.indexOf(e)},dh.prototype.glyphIndexToName=function(e){return this.names[e]};function nS(e){for(var t,n=e.tables.cmap.glyphIndexMap,r=Object.keys(n),i=0;i<r.length;i+=1){var a=r[i],s=n[a];t=e.glyphs.get(s),t.addUnicode(parseInt(a))}for(var o=0;o<e.glyphs.length;o+=1)t=e.glyphs.get(o),e.cffEncoding?e.isCIDFont?t.name="gid"+o:t.name=e.cffEncoding.charset[o]:e.glyphNames.names&&(t.name=e.glyphNames.glyphIndexToName(o))}function rS(e){e._IndexToUnicodeMap={};for(var t=e.tables.cmap.glyphIndexMap,n=Object.keys(t),r=0;r<n.length;r+=1){var i=n[r],a=t[i];e._IndexToUnicodeMap[a]===void 0?e._IndexToUnicodeMap[a]={unicodes:[parseInt(i)]}:e._IndexToUnicodeMap[a].unicodes.push(parseInt(i))}}function iS(e,t){t.lowMemory?rS(e):nS(e)}function aS(e,t,n,r,i){e.beginPath(),e.moveTo(t,n),e.lineTo(r,i),e.stroke()}var Ii={line:aS};function sS(e,t){var n=t||new ye;return{configurable:!0,get:function(){return typeof n=="function"&&(n=n()),n},set:function(r){n=r}}}function pn(e){this.bindConstructorValues(e)}pn.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]:[],"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),Object.defineProperty(this,"path",sS(this,e.path))},pn.prototype.addUnicode=function(e){this.unicodes.length===0&&(this.unicode=e),this.unicodes.push(e)},pn.prototype.getBoundingBox=function(){return this.path.getBoundingBox()},pn.prototype.getPath=function(e,t,n,r,i){e=e!==void 0?e:0,t=t!==void 0?t:0,n=n!==void 0?n:72;var a,s;r||(r={});var o=r.xScale,c=r.yScale;if(r.hinting&&i&&i.hinting&&(s=this.path&&i.hinting.exec(this,n)),s)a=i.hinting.getCommands(s),e=Math.round(e),t=Math.round(t),o=c=1;else{a=this.path.commands;var l=1/(this.path.unitsPerEm||1e3)*n;o===void 0&&(o=l),c===void 0&&(c=l)}for(var u=new ye,A=0;A<a.length;A+=1){var h=a[A];h.type==="M"?u.moveTo(e+h.x*o,t+-h.y*c):h.type==="L"?u.lineTo(e+h.x*o,t+-h.y*c):h.type==="Q"?u.quadraticCurveTo(e+h.x1*o,t+-h.y1*c,e+h.x*o,t+-h.y*c):h.type==="C"?u.curveTo(e+h.x1*o,t+-h.y1*c,e+h.x2*o,t+-h.y2*c,e+h.x*o,t+-h.y*c):h.type==="Z"&&u.closePath()}return u},pn.prototype.getContours=function(){if(this.points===void 0)return[];for(var e=[],t=[],n=0;n<this.points.length;n+=1){var r=this.points[n];t.push(r),r.lastPointOfContour&&(e.push(t),t=[])}return ht.argument(t.length===0,"There are still points left in the current contour."),e},pn.prototype.getMetrics=function(){for(var e=this.path.commands,t=[],n=[],r=0;r<e.length;r+=1){var i=e[r];i.type!=="Z"&&(t.push(i.x),n.push(i.y)),(i.type==="Q"||i.type==="C")&&(t.push(i.x1),n.push(i.y1)),i.type==="C"&&(t.push(i.x2),n.push(i.y2))}var a={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(a.xMin)||(a.xMin=0),isFinite(a.xMax)||(a.xMax=this.advanceWidth),isFinite(a.yMin)||(a.yMin=0),isFinite(a.yMax)||(a.yMax=0),a.rightSideBearing=this.advanceWidth-a.leftSideBearing-(a.xMax-a.xMin),a},pn.prototype.draw=function(e,t,n,r,i){this.getPath(t,n,r,i).draw(e)},pn.prototype.drawPoints=function(e,t,n,r){function i(A,h,f,d){e.beginPath();for(var p=0;p<A.length;p+=1)e.moveTo(h+A[p].x*d,f+A[p].y*d),e.arc(h+A[p].x*d,f+A[p].y*d,2,0,Math.PI*2,!1);e.closePath(),e.fill()}t=t!==void 0?t:0,n=n!==void 0?n:0,r=r!==void 0?r:24;for(var a=1/this.path.unitsPerEm*r,s=[],o=[],c=this.path,l=0;l<c.commands.length;l+=1){var u=c.commands[l];u.x!==void 0&&s.push({x:u.x,y:-u.y}),u.x1!==void 0&&o.push({x:u.x1,y:-u.y1}),u.x2!==void 0&&o.push({x:u.x2,y:-u.y2})}e.fillStyle="blue",i(s,t,n,a),e.fillStyle="red",i(o,t,n,a)},pn.prototype.drawMetrics=function(e,t,n,r){var i;t=t!==void 0?t:0,n=n!==void 0?n:0,r=r!==void 0?r:24,i=1/this.path.unitsPerEm*r,e.lineWidth=1,e.strokeStyle="black",Ii.line(e,t,-1e4,t,1e4),Ii.line(e,-1e4,n,1e4,n);var a=this.xMin||0,s=this.yMin||0,o=this.xMax||0,c=this.yMax||0,l=this.advanceWidth||0;e.strokeStyle="blue",Ii.line(e,t+a*i,-1e4,t+a*i,1e4),Ii.line(e,t+o*i,-1e4,t+o*i,1e4),Ii.line(e,-1e4,n+-s*i,1e4,n+-s*i),Ii.line(e,-1e4,n+-c*i,1e4,n+-c*i),e.strokeStyle="green",Ii.line(e,t+l*i,-1e4,t+l*i,1e4)};function Cl(e,t,n){Object.defineProperty(e,t,{get:function(){return e.path,e[n]},set:function(r){e[n]=r},enumerable:!0,configurable:!0})}function ph(e,t){if(this.font=e,this.glyphs={},Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];r.path.unitsPerEm=e.unitsPerEm,this.glyphs[n]=r}this.length=t&&t.length||0}ph.prototype.get=function(e){if(this.glyphs[e]===void 0){this.font._push(e),typeof this.glyphs[e]=="function"&&(this.glyphs[e]=this.glyphs[e]());var t=this.glyphs[e],n=this.font._IndexToUnicodeMap[e];if(n)for(var r=0;r<n.unicodes.length;r++)t.addUnicode(n.unicodes[r]);this.font.cffEncoding?this.font.isCIDFont?t.name="gid"+e: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]},ph.prototype.push=function(e,t){this.glyphs[e]=t,this.length++};function oS(e,t){return new pn({index:t,font:e})}function cS(e,t,n,r,i,a){return function(){var s=new pn({index:t,font:e});return s.path=function(){n(s,r,i);var o=a(e.glyphs,s);return o.unitsPerEm=e.unitsPerEm,o},Cl(s,"xMin","_xMin"),Cl(s,"xMax","_xMax"),Cl(s,"yMin","_yMin"),Cl(s,"yMax","_yMax"),s}}function lS(e,t,n,r){return function(){var i=new pn({index:t,font:e});return i.path=function(){var a=n(e,i,r);return a.unitsPerEm=e.unitsPerEm,a},i}}var sr={GlyphSet:ph,glyphLoader:oS,ttfGlyphLoader:cS,cffGlyphLoader:lS};function r1(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n+=1)if(!r1(e[n],t[n]))return!1;return!0}else return!1}function mh(e){var t;return e.length<1240?t=107:e.length<33900?t=1131:t=32768,t}function Wr(e,t,n){var r=[],i=[],a=rt.getCard16(e,t),s,o;if(a!==0){var c=rt.getByte(e,t+2);s=t+(a+1)*c+2;for(var l=t+3,u=0;u<a+1;u+=1)r.push(rt.getOffset(e,l,c)),l+=c;o=s+r[a]}else o=t+2;for(var A=0;A<r.length-1;A+=1){var h=rt.getBytes(e,s+r[A],s+r[A+1]);n&&(h=n(h)),i.push(h)}return{objects:i,startOffset:t,endOffset:o}}function uS(e,t){var n=[],r=rt.getCard16(e,t),i,a;if(r!==0){var s=rt.getByte(e,t+2);i=t+(r+1)*s+2;for(var o=t+3,c=0;c<r+1;c+=1)n.push(rt.getOffset(e,o,s)),o+=s;a=i+n[r]}else a=t+2;return{offsets:n,startOffset:t,endOffset:a}}function AS(e,t,n,r,i){var a=rt.getCard16(n,r),s=0;if(a!==0){var o=rt.getByte(n,r+2);s=r+(a+1)*o+2}var c=rt.getBytes(n,s+t[e],s+t[e+1]);return i&&(c=i(c)),c}function hS(e){for(var t="",n=15,r=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"];;){var i=e.parseByte(),a=i>>4,s=i&15;if(a===n||(t+=r[a],s===n))break;t+=r[s]}return parseFloat(t)}function fS(e,t){var n,r,i,a;if(t===28)return n=e.parseByte(),r=e.parseByte(),n<<8|r;if(t===29)return n=e.parseByte(),r=e.parseByte(),i=e.parseByte(),a=e.parseByte(),n<<24|r<<16|i<<8|a;if(t===30)return hS(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 gS(e){for(var t={},n=0;n<e.length;n+=1){var r=e[n][0],i=e[n][1],a=void 0;if(i.length===1?a=i[0]:a=i,t.hasOwnProperty(r)&&!isNaN(t[r]))throw new Error("Object "+t+" already has key "+r);t[r]=a}return t}function i1(e,t,n){t=t!==void 0?t:0;var r=new rt.Parser(e,t),i=[],a=[];for(n=n!==void 0?n:e.length;r.relativeOffset<n;){var s=r.parseByte();s<=21?(s===12&&(s=1200+r.parseByte()),i.push([s,a]),a=[]):a.push(fS(r,s))}return gS(i)}function Hs(e,t){return t<=390?t=El[t]:t=e[t-391],t}function a1(e,t,n){for(var r={},i,a=0;a<t.length;a+=1){var s=t[a];if(Array.isArray(s.type)){var o=[];o.length=s.type.length;for(var c=0;c<s.type.length;c++)i=e[s.op]!==void 0?e[s.op][c]:void 0,i===void 0&&(i=s.value!==void 0&&s.value[c]!==void 0?s.value[c]:null),s.type[c]==="SID"&&(i=Hs(n,i)),o[c]=i;r[s.name]=o}else i=e[s.op],i===void 0&&(i=s.value!==void 0?s.value:null),s.type==="SID"&&(i=Hs(n,i)),r[s.name]=i}return r}function dS(e,t){var n={};return n.formatMajor=rt.getCard8(e,t),n.formatMinor=rt.getCard8(e,t+1),n.size=rt.getCard8(e,t+2),n.offsetSize=rt.getCard8(e,t+3),n.startOffset=t,n.endOffset=t+4,n}var s1=[{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"}],o1=[{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 pS(e,t){var n=i1(e,0,e.byteLength);return a1(n,s1,t)}function c1(e,t,n,r){var i=i1(e,t,n);return a1(i,o1,r)}function l1(e,t,n,r){for(var i=[],a=0;a<n.length;a+=1){var s=new DataView(new Uint8Array(n[a]).buffer),o=pS(s,r);o._subrs=[],o._subrsBias=0,o._defaultWidthX=0,o._nominalWidthX=0;var c=o.private[0],l=o.private[1];if(c!==0&&l!==0){var u=c1(e,l+t,c,r);if(o._defaultWidthX=u.defaultWidthX,o._nominalWidthX=u.nominalWidthX,u.subrs!==0){var A=l+u.subrs,h=Wr(e,A+t);o._subrs=h.objects,o._subrsBias=mh(o._subrs)}o._privateDict=u}i.push(o)}return i}function mS(e,t,n,r){var i,a,s=new rt.Parser(e,t);n-=1;var o=[".notdef"],c=s.parseCard8();if(c===0)for(var l=0;l<n;l+=1)i=s.parseSID(),o.push(Hs(r,i));else if(c===1)for(;o.length<=n;){i=s.parseSID(),a=s.parseCard8();for(var u=0;u<=a;u+=1)o.push(Hs(r,i)),i+=1}else if(c===2)for(;o.length<=n;){i=s.parseSID(),a=s.parseCard16();for(var A=0;A<=a;A+=1)o.push(Hs(r,i)),i+=1}else throw new Error("Unknown charset format "+c);return o}function yS(e,t,n){var r,i={},a=new rt.Parser(e,t),s=a.parseCard8();if(s===0)for(var o=a.parseCard8(),c=0;c<o;c+=1)r=a.parseCard8(),i[r]=c;else if(s===1){var l=a.parseCard8();r=1;for(var u=0;u<l;u+=1)for(var A=a.parseCard8(),h=a.parseCard8(),f=A;f<=A+h;f+=1)i[f]=r,r+=1}else throw new Error("Unknown encoding format "+s);return new Bl(i,n)}function u1(e,t,n){var r,i,a,s,o=new ye,c=[],l=0,u=!1,A=!1,h=0,f=0,d,p,m,y;if(e.isCIDFont){var v=e.tables.cff.topDict._fdSelect[t.index],w=e.tables.cff.topDict._fdArray[v];d=w._subrs,p=w._subrsBias,m=w._defaultWidthX,y=w._nominalWidthX}else d=e.tables.cff.topDict._subrs,p=e.tables.cff.topDict._subrsBias,m=e.tables.cff.topDict._defaultWidthX,y=e.tables.cff.topDict._nominalWidthX;var B=m;function C(D,N){A&&o.closePath(),o.moveTo(D,N),A=!0}function x(){var D;D=c.length%2!==0,D&&!u&&(B=c.shift()+y),l+=c.length>>1,c.length=0,u=!0}function b(D){for(var N,P,U,L,V,W,J,Z,et,ct,O,M,z=0;z<D.length;){var X=D[z];switch(z+=1,X){case 1:x();break;case 3:x();break;case 4:c.length>1&&!u&&(B=c.shift()+y,u=!0),f+=c.pop(),C(h,f);break;case 5:for(;c.length>0;)h+=c.shift(),f+=c.shift(),o.lineTo(h,f);break;case 6:for(;c.length>0&&(h+=c.shift(),o.lineTo(h,f),c.length!==0);)f+=c.shift(),o.lineTo(h,f);break;case 7:for(;c.length>0&&(f+=c.shift(),o.lineTo(h,f),c.length!==0);)h+=c.shift(),o.lineTo(h,f);break;case 8:for(;c.length>0;)r=h+c.shift(),i=f+c.shift(),a=r+c.shift(),s=i+c.shift(),h=a+c.shift(),f=s+c.shift(),o.curveTo(r,i,a,s,h,f);break;case 10:V=c.pop()+p,W=d[V],W&&b(W);break;case 11:return;case 12:switch(X=D[z],z+=1,X){case 35:r=h+c.shift(),i=f+c.shift(),a=r+c.shift(),s=i+c.shift(),J=a+c.shift(),Z=s+c.shift(),et=J+c.shift(),ct=Z+c.shift(),O=et+c.shift(),M=ct+c.shift(),h=O+c.shift(),f=M+c.shift(),c.shift(),o.curveTo(r,i,a,s,J,Z),o.curveTo(et,ct,O,M,h,f);break;case 34:r=h+c.shift(),i=f,a=r+c.shift(),s=i+c.shift(),J=a+c.shift(),Z=s,et=J+c.shift(),ct=s,O=et+c.shift(),M=f,h=O+c.shift(),o.curveTo(r,i,a,s,J,Z),o.curveTo(et,ct,O,M,h,f);break;case 36:r=h+c.shift(),i=f+c.shift(),a=r+c.shift(),s=i+c.shift(),J=a+c.shift(),Z=s,et=J+c.shift(),ct=s,O=et+c.shift(),M=ct+c.shift(),h=O+c.shift(),o.curveTo(r,i,a,s,J,Z),o.curveTo(et,ct,O,M,h,f);break;case 37:r=h+c.shift(),i=f+c.shift(),a=r+c.shift(),s=i+c.shift(),J=a+c.shift(),Z=s+c.shift(),et=J+c.shift(),ct=Z+c.shift(),O=et+c.shift(),M=ct+c.shift(),Math.abs(O-h)>Math.abs(M-f)?h=O+c.shift():f=M+c.shift(),o.curveTo(r,i,a,s,J,Z),o.curveTo(et,ct,O,M,h,f);break;default:console.log("Glyph "+t.index+": unknown operator 1200"+X),c.length=0}break;case 14:c.length>0&&!u&&(B=c.shift()+y,u=!0),A&&(o.closePath(),A=!1);break;case 18:x();break;case 19:case 20:x(),z+=l+7>>3;break;case 21:c.length>2&&!u&&(B=c.shift()+y,u=!0),f+=c.pop(),h+=c.pop(),C(h,f);break;case 22:c.length>1&&!u&&(B=c.shift()+y,u=!0),h+=c.pop(),C(h,f);break;case 23:x();break;case 24:for(;c.length>2;)r=h+c.shift(),i=f+c.shift(),a=r+c.shift(),s=i+c.shift(),h=a+c.shift(),f=s+c.shift(),o.curveTo(r,i,a,s,h,f);h+=c.shift(),f+=c.shift(),o.lineTo(h,f);break;case 25:for(;c.length>6;)h+=c.shift(),f+=c.shift(),o.lineTo(h,f);r=h+c.shift(),i=f+c.shift(),a=r+c.shift(),s=i+c.shift(),h=a+c.shift(),f=s+c.shift(),o.curveTo(r,i,a,s,h,f);break;case 26:for(c.length%2&&(h+=c.shift());c.length>0;)r=h,i=f+c.shift(),a=r+c.shift(),s=i+c.shift(),h=a,f=s+c.shift(),o.curveTo(r,i,a,s,h,f);break;case 27:for(c.length%2&&(f+=c.shift());c.length>0;)r=h+c.shift(),i=f,a=r+c.shift(),s=i+c.shift(),h=a+c.shift(),f=s,o.curveTo(r,i,a,s,h,f);break;case 28:N=D[z],P=D[z+1],c.push((N<<24|P<<16)>>16),z+=2;break;case 29:V=c.pop()+e.gsubrsBias,W=e.gsubrs[V],W&&b(W);break;case 30:for(;c.length>0&&(r=h,i=f+c.shift(),a=r+c.shift(),s=i+c.shift(),h=a+c.shift(),f=s+(c.length===1?c.shift():0),o.curveTo(r,i,a,s,h,f),c.length!==0);)r=h+c.shift(),i=f,a=r+c.shift(),s=i+c.shift(),f=s+c.shift(),h=a+(c.length===1?c.shift():0),o.curveTo(r,i,a,s,h,f);break;case 31:for(;c.length>0&&(r=h+c.shift(),i=f,a=r+c.shift(),s=i+c.shift(),f=s+c.shift(),h=a+(c.length===1?c.shift():0),o.curveTo(r,i,a,s,h,f),c.length!==0);)r=h,i=f+c.shift(),a=r+c.shift(),s=i+c.shift(),h=a+c.shift(),f=s+(c.length===1?c.shift():0),o.curveTo(r,i,a,s,h,f);break;default:X<32?console.log("Glyph "+t.index+": unknown operator "+X):X<247?c.push(X-139):X<251?(N=D[z],z+=1,c.push((X-247)*256+N+108)):X<255?(N=D[z],z+=1,c.push(-(X-251)*256-N-108)):(N=D[z],P=D[z+1],U=D[z+2],L=D[z+3],z+=4,c.push((N<<24|P<<16|U<<8|L)/65536))}}}return b(n),t.advanceWidth=B,o}function wS(e,t,n,r){var i=[],a,s=new rt.Parser(e,t),o=s.parseCard8();if(o===0)for(var c=0;c<n;c++){if(a=s.parseCard8(),a>=r)throw new Error("CFF table CID Font FDSelect has bad FD index value "+a+" (FD count "+r+")");i.push(a)}else if(o===3){var l=s.parseCard16(),u=s.parseCard16();if(u!==0)throw new Error("CFF Table CID Font FDSelect format 3 range has bad initial GID "+u);for(var A,h=0;h<l;h++){if(a=s.parseCard8(),A=s.parseCard16(),a>=r)throw new Error("CFF table CID Font FDSelect has bad FD index value "+a+" (FD count "+r+")");if(A>n)throw new Error("CFF Table CID Font FDSelect format 3 range has bad GID "+A);for(;u<A;u++)i.push(a);u=A}if(A!==n)throw new Error("CFF Table CID Font FDSelect format 3 range has bad final GID "+A)}else throw new Error("CFF Table CID Font FDSelect table has unsupported format "+o);return i}function vS(e,t,n,r){n.tables.cff={};var i=dS(e,t),a=Wr(e,i.endOffset,rt.bytesToString),s=Wr(e,a.endOffset),o=Wr(e,s.endOffset,rt.bytesToString),c=Wr(e,o.endOffset);n.gsubrs=c.objects,n.gsubrsBias=mh(n.gsubrs);var l=l1(e,t,s.objects,o.objects);if(l.length!==1)throw new Error("CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = "+l.length);var u=l[0];if(n.tables.cff.topDict=u,u._privateDict&&(n.defaultWidthX=u._privateDict.defaultWidthX,n.nominalWidthX=u._privateDict.nominalWidthX),u.ros[0]!==void 0&&u.ros[1]!==void 0&&(n.isCIDFont=!0),n.isCIDFont){var A=u.fdArray,h=u.fdSelect;if(A===0||h===0)throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");A+=t;var f=Wr(e,A),d=l1(e,t,f.objects,o.objects);u._fdArray=d,h+=t,u._fdSelect=wS(e,h,n.numGlyphs,d.length)}var p=t+u.private[1],m=c1(e,p,u.private[0],o.objects);if(n.defaultWidthX=m.defaultWidthX,n.nominalWidthX=m.nominalWidthX,m.subrs!==0){var y=p+m.subrs,v=Wr(e,y);n.subrs=v.objects,n.subrsBias=mh(n.subrs)}else n.subrs=[],n.subrsBias=0;var w;r.lowMemory?(w=uS(e,t+u.charStrings),n.nGlyphs=w.offsets.length):(w=Wr(e,t+u.charStrings),n.nGlyphs=w.objects.length);var B=mS(e,t+u.charset,n.nGlyphs,o.objects);if(u.encoding===0?n.cffEncoding=new Bl(tS,B):u.encoding===1?n.cffEncoding=new Bl(eS,B):n.cffEncoding=yS(e,t+u.encoding,B),n.encoding=n.encoding||n.cffEncoding,n.glyphs=new sr.GlyphSet(n),r.lowMemory)n._push=function(b){var D=AS(b,w.offsets,e,t+u.charStrings);n.glyphs.push(b,sr.cffGlyphLoader(n,b,u1,D))};else for(var C=0;C<n.nGlyphs;C+=1){var x=w.objects[C];n.glyphs.push(C,sr.cffGlyphLoader(n,C,u1,x))}}function A1(e,t){var n,r=El.indexOf(e);return r>=0&&(n=r),r=t.indexOf(e),r>=0?n=r+El.length:(n=El.length+t.length,t.push(e)),n}function ES(){return new tt.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 BS(e){var t=new tt.Record("Name INDEX",[{name:"names",type:"INDEX",value:[]}]);t.names=[];for(var n=0;n<e.length;n+=1)t.names.push({name:"name_"+n,type:"NAME",value:e[n]});return t}function h1(e,t,n){for(var r={},i=0;i<e.length;i+=1){var a=e[i],s=t[a.name];s!==void 0&&!r1(s,a.value)&&(a.type==="SID"&&(s=A1(s,n)),r[a.op]={name:a.name,type:a.type,value:s})}return r}function f1(e,t){var n=new tt.Record("Top DICT",[{name:"dict",type:"DICT",value:{}}]);return n.dict=h1(s1,e,t),n}function g1(e){var t=new tt.Record("Top DICT INDEX",[{name:"topDicts",type:"INDEX",value:[]}]);return t.topDicts=[{name:"topDict_0",type:"TABLE",value:e}],t}function CS(e){var t=new tt.Record("String INDEX",[{name:"strings",type:"INDEX",value:[]}]);t.strings=[];for(var n=0;n<e.length;n+=1)t.strings.push({name:"string_"+n,type:"STRING",value:e[n]});return t}function xS(){return new tt.Record("Global Subr INDEX",[{name:"subrs",type:"INDEX",value:[]}])}function bS(e,t){for(var n=new tt.Record("Charsets",[{name:"format",type:"Card8",value:0}]),r=0;r<e.length;r+=1){var i=e[r],a=A1(i,t);n.fields.push({name:"glyph_"+r,type:"SID",value:a})}return n}function SS(e){var t=[],n=e.path;t.push({name:"width",type:"NUMBER",value:e.advanceWidth});for(var r=0,i=0,a=0;a<n.commands.length;a+=1){var s=void 0,o=void 0,c=n.commands[a];if(c.type==="Q"){var l=.3333333333333333,u=2/3;c={type:"C",x:c.x,y:c.y,x1:Math.round(l*r+u*c.x1),y1:Math.round(l*i+u*c.y1),x2:Math.round(l*c.x+u*c.x1),y2:Math.round(l*c.y+u*c.y1)}}if(c.type==="M")s=Math.round(c.x-r),o=Math.round(c.y-i),t.push({name:"dx",type:"NUMBER",value:s}),t.push({name:"dy",type:"NUMBER",value:o}),t.push({name:"rmoveto",type:"OP",value:21}),r=Math.round(c.x),i=Math.round(c.y);else if(c.type==="L")s=Math.round(c.x-r),o=Math.round(c.y-i),t.push({name:"dx",type:"NUMBER",value:s}),t.push({name:"dy",type:"NUMBER",value:o}),t.push({name:"rlineto",type:"OP",value:5}),r=Math.round(c.x),i=Math.round(c.y);else if(c.type==="C"){var A=Math.round(c.x1-r),h=Math.round(c.y1-i),f=Math.round(c.x2-c.x1),d=Math.round(c.y2-c.y1);s=Math.round(c.x-c.x2),o=Math.round(c.y-c.y2),t.push({name:"dx1",type:"NUMBER",value:A}),t.push({name:"dy1",type:"NUMBER",value:h}),t.push({name:"dx2",type:"NUMBER",value:f}),t.push({name:"dy2",type:"NUMBER",value:d}),t.push({name:"dx",type:"NUMBER",value:s}),t.push({name:"dy",type:"NUMBER",value:o}),t.push({name:"rrcurveto",type:"OP",value:8}),r=Math.round(c.x),i=Math.round(c.y)}}return t.push({name:"endchar",type:"OP",value:14}),t}function DS(e){for(var t=new tt.Record("CharStrings INDEX",[{name:"charStrings",type:"INDEX",value:[]}]),n=0;n<e.length;n+=1){var r=e.get(n),i=SS(r);t.charStrings.push({name:r.name,type:"CHARSTRING",value:i})}return t}function IS(e,t){var n=new tt.Record("Private DICT",[{name:"dict",type:"DICT",value:{}}]);return n.dict=h1(o1,e,t),n}function FS(e,t){for(var n=new tt.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,i={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]},a={},s=[],o,c=1;c<e.length;c+=1)o=e.get(c),s.push(o.name);var l=[];n.header=ES(),n.nameIndex=BS([t.postScriptName]);var u=f1(i,l);n.topDictIndex=g1(u),n.globalSubrIndex=xS(),n.charsets=bS(s,l),n.charStringsIndex=DS(e),n.privateDict=IS(a,l),n.stringIndex=CS(l);var A=n.header.sizeOf()+n.nameIndex.sizeOf()+n.topDictIndex.sizeOf()+n.stringIndex.sizeOf()+n.globalSubrIndex.sizeOf();return i.charset=A,i.encoding=0,i.charStrings=i.charset+n.charsets.sizeOf(),i.private[1]=i.charStrings+n.charStringsIndex.sizeOf(),u=f1(i,l),n.topDictIndex=g1(u),n}var d1={parse:vS,make:FS};function QS(e,t){var n={},r=new rt.Parser(e,t);return n.version=r.parseVersion(),n.fontRevision=Math.round(r.parseFixed()*1e3)/1e3,n.checkSumAdjustment=r.parseULong(),n.magicNumber=r.parseULong(),ht.argument(n.magicNumber===1594834165,"Font header has wrong magic number."),n.flags=r.parseUShort(),n.unitsPerEm=r.parseUShort(),n.created=r.parseLongDateTime(),n.modified=r.parseLongDateTime(),n.xMin=r.parseShort(),n.yMin=r.parseShort(),n.xMax=r.parseShort(),n.yMax=r.parseShort(),n.macStyle=r.parseUShort(),n.lowestRecPPEM=r.parseUShort(),n.fontDirectionHint=r.parseShort(),n.indexToLocFormat=r.parseShort(),n.glyphDataFormat=r.parseShort(),n}function MS(e){var t=Math.round(new Date().getTime()/1e3)+2082844800,n=t;return e.createdTimestamp&&(n=e.createdTimestamp+2082844800),new tt.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: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 p1={parse:QS,make:MS};function TS(e,t){var n={},r=new rt.Parser(e,t);return n.version=r.parseVersion(),n.ascender=r.parseShort(),n.descender=r.parseShort(),n.lineGap=r.parseShort(),n.advanceWidthMax=r.parseUShort(),n.minLeftSideBearing=r.parseShort(),n.minRightSideBearing=r.parseShort(),n.xMaxExtent=r.parseShort(),n.caretSlopeRise=r.parseShort(),n.caretSlopeRun=r.parseShort(),n.caretOffset=r.parseShort(),r.relativeOffset+=8,n.metricDataFormat=r.parseShort(),n.numberOfHMetrics=r.parseUShort(),n}function NS(e){return new tt.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 m1={parse:TS,make:NS};function PS(e,t,n,r,i){for(var a,s,o=new rt.Parser(e,t),c=0;c<r;c+=1){c<n&&(a=o.parseUShort(),s=o.parseShort());var l=i.get(c);l.advanceWidth=a,l.leftSideBearing=s}}function kS(e,t,n,r,i){e._hmtxTableData={};for(var a,s,o=new rt.Parser(t,n),c=0;c<i;c+=1)c<r&&(a=o.parseUShort(),s=o.parseShort()),e._hmtxTableData[c]={advanceWidth:a,leftSideBearing:s}}function RS(e,t,n,r,i,a,s){s.lowMemory?kS(e,t,n,r,i):PS(t,n,r,i,a)}function OS(e){for(var t=new tt.Table("hmtx",[]),n=0;n<e.length;n+=1){var r=e.get(n),i=r.advanceWidth||0,a=r.leftSideBearing||0;t.fields.push({name:"advanceWidth_"+n,type:"USHORT",value:i}),t.fields.push({name:"leftSideBearing_"+n,type:"SHORT",value:a})}return t}var y1={parse:RS,make:OS};function US(e){for(var t=new tt.Table("ltag",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"numTags",type:"ULONG",value:e.length}]),n="",r=12+e.length*4,i=0;i<e.length;++i){var a=n.indexOf(e[i]);a<0&&(a=n.length,n+=e[i]),t.fields.push({name:"offset "+i,type:"USHORT",value:r+a}),t.fields.push({name:"length "+i,type:"USHORT",value:e[i].length})}return t.fields.push({name:"stringPool",type:"CHARARRAY",value:n}),t}function LS(e,t){var n=new rt.Parser(e,t),r=n.parseULong();ht.argument(r===1,"Unsupported ltag table version."),n.skip("uLong",1);for(var i=n.parseULong(),a=[],s=0;s<i;s++){for(var o="",c=t+n.parseUShort(),l=n.parseUShort(),u=c;u<c+l;++u)o+=String.fromCharCode(e.getInt8(u));a.push(o)}return a}var w1={make:US,parse:LS};function YS(e,t){var n={},r=new rt.Parser(e,t);return n.version=r.parseVersion(),n.numGlyphs=r.parseUShort(),n.version===1&&(n.maxPoints=r.parseUShort(),n.maxContours=r.parseUShort(),n.maxCompositePoints=r.parseUShort(),n.maxCompositeContours=r.parseUShort(),n.maxZones=r.parseUShort(),n.maxTwilightPoints=r.parseUShort(),n.maxStorage=r.parseUShort(),n.maxFunctionDefs=r.parseUShort(),n.maxInstructionDefs=r.parseUShort(),n.maxStackElements=r.parseUShort(),n.maxSizeOfInstructions=r.parseUShort(),n.maxComponentElements=r.parseUShort(),n.maxComponentDepth=r.parseUShort()),n}function HS(e){return new tt.Table("maxp",[{name:"version",type:"FIXED",value:20480},{name:"numGlyphs",type:"USHORT",value:e}])}var v1={parse:YS,make:HS},E1=["copyright","fontFamily","fontSubfamily","uniqueID","fullName","version","postScriptName","trademark","manufacturer","designer","description","manufacturerURL","designerURL","license","licenseURL","reserved","preferredFamily","preferredSubfamily","compatibleFullName","sampleText","postScriptFindFontName","wwsFamily","wwsSubfamily"],B1={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"},GS={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},C1={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 VS(e,t,n){switch(e){case 0:if(t===65535)return"und";if(n)return n[t];break;case 1:return B1[t];case 3:return C1[t]}}var yh="utf-16",zS={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"},JS={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 x1(e,t,n){switch(e){case 0:return yh;case 1:return JS[n]||zS[t];case 3:if(t===1||t===10)return yh;break}}function jS(e,t,n){for(var r={},i=new rt.Parser(e,t),a=i.parseUShort(),s=i.parseUShort(),o=i.offset+i.parseUShort(),c=0;c<s;c++){var l=i.parseUShort(),u=i.parseUShort(),A=i.parseUShort(),h=i.parseUShort(),f=E1[h]||h,d=i.parseUShort(),p=i.parseUShort(),m=VS(l,A,n),y=x1(l,u,A);if(y!==void 0&&m!==void 0){var v=void 0;if(y===yh?v=Sa.UTF16(e,o+p,d):v=Sa.MACSTRING(e,o+p,d,y),v){var w=r[f];w===void 0&&(w=r[f]={}),w[m]=v}}}return a===1&&i.parseUShort(),r}function wh(e){var t={};for(var n in e)t[e[n]]=parseInt(n);return t}function b1(e,t,n,r,i,a){return new tt.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:r},{name:"length",type:"USHORT",value:i},{name:"offset",type:"USHORT",value:a}])}function WS(e,t){var n=e.length,r=t.length-n+1;t:for(var i=0;i<r;i++)for(;i<r;i++){for(var a=0;a<n;a++)if(t[i+a]!==e[a])continue t;return i}return-1}function S1(e,t){var n=WS(e,t);if(n<0){n=t.length;for(var r=0,i=e.length;r<i;++r)t.push(e[r])}return n}function KS(e,t){var n,r=[],i={},a=wh(E1);for(var s in e){var o=a[s];if(o===void 0&&(o=s),n=parseInt(o),isNaN(n))throw new Error('Name table entry "'+s+'" does not exist, see nameTableNames for complete list.');i[n]=e[s],r.push(n)}for(var c=wh(B1),l=wh(C1),u=[],A=[],h=0;h<r.length;h++){n=r[h];var f=i[n];for(var d in f){var p=f[d],m=1,y=c[d],v=GS[y],w=x1(m,v,y),B=K.MACSTRING(p,w);B===void 0&&(m=0,y=t.indexOf(d),y<0&&(y=t.length,t.push(d)),v=4,B=K.UTF16(p));var C=S1(B,A);u.push(b1(m,v,y,n,B.length,C));var x=l[d];if(x!==void 0){var b=K.UTF16(p),D=S1(b,A);u.push(b1(3,1,x,n,b.length,D))}}}u.sort(function(U,L){return U.platformID-L.platformID||U.encodingID-L.encodingID||U.languageID-L.languageID||U.nameID-L.nameID});for(var N=new tt.Table("name",[{name:"format",type:"USHORT",value:0},{name:"count",type:"USHORT",value:u.length},{name:"stringOffset",type:"USHORT",value:6+u.length*12}]),P=0;P<u.length;P++)N.fields.push({name:"record_"+P,type:"RECORD",value:u[P]});return N.fields.push({name:"strings",type:"LITERAL",value:A}),N}var D1={parse:jS,make:KS},vh=[{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 XS(e){for(var t=0;t<vh.length;t+=1){var n=vh[t];if(e>=n.begin&&e<n.end)return t}return-1}function _S(e,t){var n={},r=new rt.Parser(e,t);n.version=r.parseUShort(),n.xAvgCharWidth=r.parseShort(),n.usWeightClass=r.parseUShort(),n.usWidthClass=r.parseUShort(),n.fsType=r.parseUShort(),n.ySubscriptXSize=r.parseShort(),n.ySubscriptYSize=r.parseShort(),n.ySubscriptXOffset=r.parseShort(),n.ySubscriptYOffset=r.parseShort(),n.ySuperscriptXSize=r.parseShort(),n.ySuperscriptYSize=r.parseShort(),n.ySuperscriptXOffset=r.parseShort(),n.ySuperscriptYOffset=r.parseShort(),n.yStrikeoutSize=r.parseShort(),n.yStrikeoutPosition=r.parseShort(),n.sFamilyClass=r.parseShort(),n.panose=[];for(var i=0;i<10;i++)n.panose[i]=r.parseByte();return n.ulUnicodeRange1=r.parseULong(),n.ulUnicodeRange2=r.parseULong(),n.ulUnicodeRange3=r.parseULong(),n.ulUnicodeRange4=r.parseULong(),n.achVendID=String.fromCharCode(r.parseByte(),r.parseByte(),r.parseByte(),r.parseByte()),n.fsSelection=r.parseUShort(),n.usFirstCharIndex=r.parseUShort(),n.usLastCharIndex=r.parseUShort(),n.sTypoAscender=r.parseShort(),n.sTypoDescender=r.parseShort(),n.sTypoLineGap=r.parseShort(),n.usWinAscent=r.parseUShort(),n.usWinDescent=r.parseUShort(),n.version>=1&&(n.ulCodePageRange1=r.parseULong(),n.ulCodePageRange2=r.parseULong()),n.version>=2&&(n.sxHeight=r.parseShort(),n.sCapHeight=r.parseShort(),n.usDefaultChar=r.parseUShort(),n.usBreakChar=r.parseUShort(),n.usMaxContent=r.parseUShort()),n}function qS(e){return new tt.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 Eh={parse:_S,make:qS,unicodeRanges:vh,getUnicodeRange:XS};function ZS(e,t){var n={},r=new rt.Parser(e,t);switch(n.version=r.parseVersion(),n.italicAngle=r.parseFixed(),n.underlinePosition=r.parseShort(),n.underlineThickness=r.parseShort(),n.isFixedPitch=r.parseULong(),n.minMemType42=r.parseULong(),n.maxMemType42=r.parseULong(),n.minMemType1=r.parseULong(),n.maxMemType1=r.parseULong(),n.version){case 1:n.names=Di.slice();break;case 2:n.numberOfGlyphs=r.parseUShort(),n.glyphNameIndex=new Array(n.numberOfGlyphs);for(var i=0;i<n.numberOfGlyphs;i++)n.glyphNameIndex[i]=r.parseUShort();n.names=[];for(var a=0;a<n.numberOfGlyphs;a++)if(n.glyphNameIndex[a]>=Di.length){var s=r.parseChar();n.names.push(r.parseString(s))}break;case 2.5:n.numberOfGlyphs=r.parseUShort(),n.offset=new Array(n.numberOfGlyphs);for(var o=0;o<n.numberOfGlyphs;o++)n.offset[o]=r.parseChar();break}return n}function $S(){return new tt.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 I1={parse:ZS,make:$S},kn=new Array(9);kn[1]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{substFormat:1,coverage:this.parsePointer(R.coverage),deltaGlyphId:this.parseUShort()};if(t===2)return{substFormat:2,coverage:this.parsePointer(R.coverage),substitute:this.parseOffset16List()};ht.assert(!1,"0x"+e.toString(16)+": lookup type 1 format must be 1 or 2.")},kn[2]=function(){var e=this.parseUShort();return ht.argument(e===1,"GSUB Multiple Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(R.coverage),sequences:this.parseListOfLists()}},kn[3]=function(){var e=this.parseUShort();return ht.argument(e===1,"GSUB Alternate Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(R.coverage),alternateSets:this.parseListOfLists()}},kn[4]=function(){var e=this.parseUShort();return ht.argument(e===1,"GSUB ligature table identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(R.coverage),ligatureSets:this.parseListOfLists(function(){return{ligGlyph:this.parseUShort(),components:this.parseUShortList(this.parseUShort()-1)}})}};var Da={sequenceIndex:R.uShort,lookupListIndex:R.uShort};kn[5]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{substFormat:t,coverage:this.parsePointer(R.coverage),ruleSets:this.parseListOfLists(function(){var i=this.parseUShort(),a=this.parseUShort();return{input:this.parseUShortList(i-1),lookupRecords:this.parseRecordList(a,Da)}})};if(t===2)return{substFormat:t,coverage:this.parsePointer(R.coverage),classDef:this.parsePointer(R.classDef),classSets:this.parseListOfLists(function(){var i=this.parseUShort(),a=this.parseUShort();return{classes:this.parseUShortList(i-1),lookupRecords:this.parseRecordList(a,Da)}})};if(t===3){var n=this.parseUShort(),r=this.parseUShort();return{substFormat:t,coverages:this.parseList(n,R.pointer(R.coverage)),lookupRecords:this.parseRecordList(r,Da)}}ht.assert(!1,"0x"+e.toString(16)+": lookup type 5 format must be 1, 2 or 3.")},kn[6]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{substFormat:1,coverage:this.parsePointer(R.coverage),chainRuleSets:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(Da)}})};if(t===2)return{substFormat:2,coverage:this.parsePointer(R.coverage),backtrackClassDef:this.parsePointer(R.classDef),inputClassDef:this.parsePointer(R.classDef),lookaheadClassDef:this.parsePointer(R.classDef),chainClassSet:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(Da)}})};if(t===3)return{substFormat:3,backtrackCoverage:this.parseList(R.pointer(R.coverage)),inputCoverage:this.parseList(R.pointer(R.coverage)),lookaheadCoverage:this.parseList(R.pointer(R.coverage)),lookupRecords:this.parseRecordList(Da)};ht.assert(!1,"0x"+e.toString(16)+": lookup type 6 format must be 1, 2 or 3.")},kn[7]=function(){var e=this.parseUShort();ht.argument(e===1,"GSUB Extension Substitution subtable identifier-format must be 1");var t=this.parseUShort(),n=new R(this.data,this.offset+this.parseULong());return{substFormat:1,lookupType:t,extension:kn[t].call(n)}},kn[8]=function(){var e=this.parseUShort();return ht.argument(e===1,"GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(R.coverage),backtrackCoverage:this.parseList(R.pointer(R.coverage)),lookaheadCoverage:this.parseList(R.pointer(R.coverage)),substitutes:this.parseUShortList()}};function tD(e,t){t=t||0;var n=new R(e,t),r=n.parseVersion(1);return ht.argument(r===1||r===1.1,"Unsupported GSUB table version."),r===1?{version:r,scripts:n.parseScriptList(),features:n.parseFeatureList(),lookups:n.parseLookupList(kn)}:{version:r,scripts:n.parseScriptList(),features:n.parseFeatureList(),lookups:n.parseLookupList(kn),variations:n.parseFeatureVariationsList()}}var Ia=new Array(9);Ia[1]=function(e){return e.substFormat===1?new tt.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new tt.Coverage(e.coverage)},{name:"deltaGlyphID",type:"USHORT",value:e.deltaGlyphId}]):new tt.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:2},{name:"coverage",type:"TABLE",value:new tt.Coverage(e.coverage)}].concat(tt.ushortList("substitute",e.substitute)))},Ia[2]=function(e){return ht.assert(e.substFormat===1,"Lookup type 2 substFormat must be 1."),new tt.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new tt.Coverage(e.coverage)}].concat(tt.tableList("seqSet",e.sequences,function(t){return new tt.Table("sequenceSetTable",tt.ushortList("sequence",t))})))},Ia[3]=function(e){return ht.assert(e.substFormat===1,"Lookup type 3 substFormat must be 1."),new tt.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new tt.Coverage(e.coverage)}].concat(tt.tableList("altSet",e.alternateSets,function(t){return new tt.Table("alternateSetTable",tt.ushortList("alternate",t))})))},Ia[4]=function(e){return ht.assert(e.substFormat===1,"Lookup type 4 substFormat must be 1."),new tt.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new tt.Coverage(e.coverage)}].concat(tt.tableList("ligSet",e.ligatureSets,function(t){return new tt.Table("ligatureSetTable",tt.tableList("ligature",t,function(n){return new tt.Table("ligatureTable",[{name:"ligGlyph",type:"USHORT",value:n.ligGlyph}].concat(tt.ushortList("component",n.components,n.components.length+1)))}))})))},Ia[6]=function(e){if(e.substFormat===1){var t=new tt.Table("chainContextTable",[{name:"substFormat",type:"USHORT",value:e.substFormat},{name:"coverage",type:"TABLE",value:new tt.Coverage(e.coverage)}].concat(tt.tableList("chainRuleSet",e.chainRuleSets,function(i){return new tt.Table("chainRuleSetTable",tt.tableList("chainRule",i,function(a){var s=tt.ushortList("backtrackGlyph",a.backtrack,a.backtrack.length).concat(tt.ushortList("inputGlyph",a.input,a.input.length+1)).concat(tt.ushortList("lookaheadGlyph",a.lookahead,a.lookahead.length)).concat(tt.ushortList("substitution",[],a.lookupRecords.length));return a.lookupRecords.forEach(function(o,c){s=s.concat({name:"sequenceIndex"+c,type:"USHORT",value:o.sequenceIndex}).concat({name:"lookupListIndex"+c,type:"USHORT",value:o.lookupListIndex})}),new tt.Table("chainRuleTable",s)}))})));return t}else if(e.substFormat===2)ht.assert(!1,"lookup type 6 format 2 is not yet supported.");else if(e.substFormat===3){var n=[{name:"substFormat",type:"USHORT",value:e.substFormat}];n.push({name:"backtrackGlyphCount",type:"USHORT",value:e.backtrackCoverage.length}),e.backtrackCoverage.forEach(function(i,a){n.push({name:"backtrackCoverage"+a,type:"TABLE",value:new tt.Coverage(i)})}),n.push({name:"inputGlyphCount",type:"USHORT",value:e.inputCoverage.length}),e.inputCoverage.forEach(function(i,a){n.push({name:"inputCoverage"+a,type:"TABLE",value:new tt.Coverage(i)})}),n.push({name:"lookaheadGlyphCount",type:"USHORT",value:e.lookaheadCoverage.length}),e.lookaheadCoverage.forEach(function(i,a){n.push({name:"lookaheadCoverage"+a,type:"TABLE",value:new tt.Coverage(i)})}),n.push({name:"substitutionCount",type:"USHORT",value:e.lookupRecords.length}),e.lookupRecords.forEach(function(i,a){n=n.concat({name:"sequenceIndex"+a,type:"USHORT",value:i.sequenceIndex}).concat({name:"lookupListIndex"+a,type:"USHORT",value:i.lookupListIndex})});var r=new tt.Table("chainContextTable",n);return r}ht.assert(!1,"lookup type 6 format must be 1, 2 or 3.")};function eD(e){return new tt.Table("GSUB",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new tt.ScriptList(e.scripts)},{name:"features",type:"TABLE",value:new tt.FeatureList(e.features)},{name:"lookups",type:"TABLE",value:new tt.LookupList(e.lookups,Ia)}])}var F1={parse:tD,make:eD};function nD(e,t){var n=new rt.Parser(e,t),r=n.parseULong();ht.argument(r===1,"Unsupported META table version."),n.parseULong(),n.parseULong();for(var i=n.parseULong(),a={},s=0;s<i;s++){var o=n.parseTag(),c=n.parseULong(),l=n.parseULong(),u=Sa.UTF8(e,t+c,l);a[o]=u}return a}function rD(e){var t=Object.keys(e).length,n="",r=16+t*12,i=new tt.Table("meta",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"offset",type:"ULONG",value:r},{name:"numTags",type:"ULONG",value:t}]);for(var a in e){var s=n.length;n+=e[a],i.fields.push({name:"tag "+a,type:"TAG",value:a}),i.fields.push({name:"offset "+a,type:"ULONG",value:r+s}),i.fields.push({name:"length "+a,type:"ULONG",value:e[a].length})}return i.fields.push({name:"stringPool",type:"CHARARRAY",value:n}),i}var Q1={parse:nD,make:rD};function M1(e){return Math.log(e)/Math.log(2)|0}function Bh(e){for(;e.length%4!==0;)e.push(0);for(var t=0,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 T1(e,t,n,r){return new tt.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:r!==void 0?r:0}])}function N1(e){var t=new tt.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;var n=Math.pow(2,M1(t.numTables));t.searchRange=16*n,t.entrySelector=M1(n),t.rangeShift=t.numTables*16-t.searchRange;for(var r=[],i=[],a=t.sizeOf()+T1().sizeOf()*t.numTables;a%4!==0;)a+=1,i.push({name:"padding",type:"BYTE",value:0});for(var s=0;s<e.length;s+=1){var o=e[s];ht.argument(o.tableName.length===4,"Table name"+o.tableName+" is invalid.");var c=o.sizeOf(),l=T1(o.tableName,Bh(o.encode()),a,c);for(r.push({name:l.tag+" Table Record",type:"RECORD",value:l}),i.push({name:o.tableName+" table",type:"RECORD",value:o}),a+=c,ht.argument(!isNaN(a),"Something went wrong calculating the offset.");a%4!==0;)a+=1,i.push({name:"padding",type:"BYTE",value:0})}return r.sort(function(u,A){return u.value.tag>A.value.tag?1:-1}),t.fields=t.fields.concat(r),t.fields=t.fields.concat(i),t}function P1(e,t,n){for(var r=0;r<t.length;r+=1){var i=e.charToGlyphIndex(t[r]);if(i>0){var a=e.glyphs.get(i);return a.getMetrics()}}return n}function iD(e){for(var t=0,n=0;n<e.length;n+=1)t+=e[n];return t/e.length}function aD(e){for(var t=[],n=[],r=[],i=[],a=[],s=[],o=[],c,l=0,u=0,A=0,h=0,f=0,d=0;d<e.glyphs.length;d+=1){var p=e.glyphs.get(d),m=p.unicode|0;if(isNaN(p.advanceWidth))throw new Error("Glyph "+p.name+" ("+d+"): advanceWidth is not a number.");(c>m||c===void 0)&&m>0&&(c=m),l<m&&(l=m);var y=Eh.getUnicodeRange(m);if(y<32)u|=1<<y;else if(y<64)A|=1<<y-32;else if(y<96)h|=1<<y-64;else if(y<123)f|=1<<y-96;else throw new Error("Unicode ranges bits > 123 are reserved for internal usage");if(p.name!==".notdef"){var v=p.getMetrics();t.push(v.xMin),n.push(v.yMin),r.push(v.xMax),i.push(v.yMax),s.push(v.leftSideBearing),o.push(v.rightSideBearing),a.push(p.advanceWidth)}}var w={xMin:Math.min.apply(null,t),yMin:Math.min.apply(null,n),xMax:Math.max.apply(null,r),yMax:Math.max.apply(null,i),advanceWidthMax:Math.max.apply(null,a),advanceWidthAvg:iD(a),minLeftSideBearing:Math.min.apply(null,s),maxLeftSideBearing:Math.max.apply(null,s),minRightSideBearing:Math.min.apply(null,o)};w.ascender=e.ascender,w.descender=e.descender;var B=p1.make({flags:3,unitsPerEm:e.unitsPerEm,xMin:w.xMin,yMin:w.yMin,xMax:w.xMax,yMax:w.yMax,lowestRecPPEM:3,createdTimestamp:e.createdTimestamp}),C=m1.make({ascender:w.ascender,descender:w.descender,advanceWidthMax:w.advanceWidthMax,minLeftSideBearing:w.minLeftSideBearing,minRightSideBearing:w.minRightSideBearing,xMaxExtent:w.maxLeftSideBearing+(w.xMax-w.xMin),numberOfHMetrics:e.glyphs.length}),x=v1.make(e.glyphs.length),b=Eh.make(Object.assign({xAvgCharWidth:Math.round(w.advanceWidthAvg),usFirstCharIndex:c,usLastCharIndex:l,ulUnicodeRange1:u,ulUnicodeRange2:A,ulUnicodeRange3:h,ulUnicodeRange4:f,sTypoAscender:w.ascender,sTypoDescender:w.descender,sTypoLineGap:0,usWinAscent:w.yMax,usWinDescent:Math.abs(w.yMin),ulCodePageRange1:1,sxHeight:P1(e,"xyvw",{yMax:Math.round(w.ascender/2)}).yMax,sCapHeight:P1(e,"HIKLEFJMNTZBDPRAGOQSUVWXY",w).yMax,usDefaultChar:e.hasChar(" ")?32:0,usBreakChar:e.hasChar(" ")?32:0},e.tables.os2)),D=y1.make(e.glyphs),N=t1.make(e.glyphs),P=e.getEnglishName("fontFamily"),U=e.getEnglishName("fontSubfamily"),L=P+" "+U,V=e.getEnglishName("postScriptName");V||(V=P.replace(/\s/g,"")+"-"+U);var W={};for(var J in e.names)W[J]=e.names[J];W.uniqueID||(W.uniqueID={en:e.getEnglishName("manufacturer")+":"+L}),W.postScriptName||(W.postScriptName={en:V}),W.preferredFamily||(W.preferredFamily=e.names.fontFamily),W.preferredSubfamily||(W.preferredSubfamily=e.names.fontSubfamily);var Z=[],et=D1.make(W,Z),ct=Z.length>0?w1.make(Z):void 0,O=I1.make(),M=d1.make(e.glyphs,{version:e.getEnglishName("version"),fullName:L,familyName:P,weightName:U,postScriptName:V,unitsPerEm:e.unitsPerEm,fontBBox:[0,w.yMin,w.ascender,w.advanceWidthMax]}),z=e.metas&&Object.keys(e.metas).length>0?Q1.make(e.metas):void 0,X=[B,C,x,b,et,N,O,M,D];ct&&X.push(ct),e.tables.gsub&&X.push(F1.make(e.tables.gsub)),z&&X.push(z);for(var ot=N1(X),Mt=ot.encode(),yt=Bh(Mt),Se=ot.fields,hn=!1,Xt=0;Xt<Se.length;Xt+=1)if(Se[Xt].name==="head table"){Se[Xt].value.checkSumAdjustment=2981146554-yt,hn=!0;break}if(!hn)throw new Error("Could not find head table with checkSum to adjust.");return ot}var sD={make:N1,fontToTable:aD,computeCheckSum:Bh};function Ch(e,t){for(var n=0,r=e.length-1;n<=r;){var i=n+r>>>1,a=e[i].tag;if(a===t)return i;a<t?n=i+1:r=i-1}return-n-1}function k1(e,t){for(var n=0,r=e.length-1;n<=r;){var i=n+r>>>1,a=e[i];if(a===t)return i;a<t?n=i+1:r=i-1}return-n-1}function R1(e,t){for(var n,r=0,i=e.length-1;r<=i;){var a=r+i>>>1;n=e[a];var s=n.start;if(s===t)return n;s<t?r=a+1:i=a-1}if(r>0)return n=e[r-1],t>n.end?0:n}function Gs(e,t){this.font=e,this.tableName=t}Gs.prototype={searchTag:Ch,binSearch:k1,getTable:function(e){var t=this.font.tables[this.tableName];return!t&&e&&(t=this.font.tables[this.tableName]=this.createDefaultTable()),t},getScriptNames:function(){var e=this.getTable();return e?e.scripts.map(function(t){return t.tag}):[]},getDefaultScriptName:function(){var e=this.getTable();if(e){for(var t=!1,n=0;n<e.scripts.length;n++){var r=e.scripts[n].tag;if(r==="DFLT")return r;r==="latn"&&(t=!0)}if(t)return"latn"}},getScriptTable:function(e,t){var n=this.getTable(t);if(n){e=e||"DFLT";var r=n.scripts,i=Ch(n.scripts,e);if(i>=0)return r[i].script;if(t){var a={tag:e,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}};return r.splice(-1-i,0,a),a.script}}},getLangSysTable:function(e,t,n){var r=this.getScriptTable(e,n);if(r){if(!t||t==="dflt"||t==="DFLT")return r.defaultLangSys;var i=Ch(r.langSysRecords,t);if(i>=0)return r.langSysRecords[i].langSys;if(n){var a={tag:t,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}};return r.langSysRecords.splice(-1-i,0,a),a.langSys}}},getFeatureTable:function(e,t,n,r){var i=this.getLangSysTable(e,t,r);if(i){for(var a,s=i.featureIndexes,o=this.font.tables[this.tableName].features,c=0;c<s.length;c++)if(a=o[s[c]],a.tag===n)return a.feature;if(r){var l=o.length;return ht.assert(l===0||n>=o[l-1].tag,"Features must be added in alphabetical order."),a={tag:n,feature:{params:0,lookupListIndexes:[]}},o.push(a),s.push(l),a.feature}}},getLookupTables:function(e,t,n,r,i){var a=this.getFeatureTable(e,t,n,i),s=[];if(a){for(var o,c=a.lookupListIndexes,l=this.font.tables[this.tableName].lookups,u=0;u<c.length;u++)o=l[c[u]],o.lookupType===r&&s.push(o);if(s.length===0&&i){o={lookupType:r,lookupFlag:0,subtables:[],markFilteringSet:void 0};var A=l.length;return l.push(o),c.push(A),[o]}}return s},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:var n=R1(e.ranges,t);return n?n.classId:0}},getCoverageIndex:function(e,t){switch(e.format){case 1:var n=k1(e.glyphs,t);return n>=0?n:-1;case 2:var r=R1(e.ranges,t);return r?r.index+t-r.start:-1}},expandCoverage:function(e){if(e.format===1)return e.glyphs;for(var t=[],n=e.ranges,r=0;r<n.length;r++)for(var i=n[r],a=i.start,s=i.end,o=a;o<=s;o++)t.push(o);return t}};function Vs(e){Gs.call(this,e,"gpos")}Vs.prototype=Gs.prototype,Vs.prototype.init=function(){var e=this.getDefaultScriptName();this.defaultKerningTables=this.getKerningTables(e)},Vs.prototype.getKerningValue=function(e,t,n){for(var r=0;r<e.length;r++)for(var i=e[r].subtables,a=0;a<i.length;a++){var s=i[a],o=this.getCoverageIndex(s.coverage,t);if(!(o<0))switch(s.posFormat){case 1:for(var c=s.pairSets[o],l=0;l<c.length;l++){var u=c[l];if(u.secondGlyph===n)return u.value1&&u.value1.xAdvance||0}break;case 2:var A=this.getGlyphClass(s.classDef1,t),h=this.getGlyphClass(s.classDef2,n),f=s.classRecords[A][h];return f.value1&&f.value1.xAdvance||0}}return 0},Vs.prototype.getKerningTables=function(e,t){if(this.font.tables.gpos)return this.getLookupTables(e,t,"kern",2)};function mn(e){Gs.call(this,e,"gsub")}function oD(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function xh(e,t,n){for(var r=e.subtables,i=0;i<r.length;i++){var a=r[i];if(a.substFormat===t)return a}if(n)return r.push(n),n}mn.prototype=Gs.prototype,mn.prototype.createDefaultTable=function(){return{version:1,scripts:[{tag:"DFLT",script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}}],features:[],lookups:[]}},mn.prototype.getSingle=function(e,t,n){for(var r=[],i=this.getLookupTables(t,n,e,1),a=0;a<i.length;a++)for(var s=i[a].subtables,o=0;o<s.length;o++){var c=s[o],l=this.expandCoverage(c.coverage),u=void 0;if(c.substFormat===1){var A=c.deltaGlyphId;for(u=0;u<l.length;u++){var h=l[u];r.push({sub:h,by:h+A})}}else{var f=c.substitute;for(u=0;u<l.length;u++)r.push({sub:l[u],by:f[u]})}}return r},mn.prototype.getMultiple=function(e,t,n){for(var r=[],i=this.getLookupTables(t,n,e,2),a=0;a<i.length;a++)for(var s=i[a].subtables,o=0;o<s.length;o++){var c=s[o],l=this.expandCoverage(c.coverage),u=void 0;for(u=0;u<l.length;u++){var A=l[u],h=c.sequences[u];r.push({sub:A,by:h})}}return r},mn.prototype.getAlternates=function(e,t,n){for(var r=[],i=this.getLookupTables(t,n,e,3),a=0;a<i.length;a++)for(var s=i[a].subtables,o=0;o<s.length;o++)for(var c=s[o],l=this.expandCoverage(c.coverage),u=c.alternateSets,A=0;A<l.length;A++)r.push({sub:l[A],by:u[A]});return r},mn.prototype.getLigatures=function(e,t,n){for(var r=[],i=this.getLookupTables(t,n,e,4),a=0;a<i.length;a++)for(var s=i[a].subtables,o=0;o<s.length;o++)for(var c=s[o],l=this.expandCoverage(c.coverage),u=c.ligatureSets,A=0;A<l.length;A++)for(var h=l[A],f=u[A],d=0;d<f.length;d++){var p=f[d];r.push({sub:[h].concat(p.components),by:p.ligGlyph})}return r},mn.prototype.addSingle=function(e,t,n,r){var i=this.getLookupTables(n,r,e,1,!0)[0],a=xh(i,2,{substFormat:2,coverage:{format:1,glyphs:[]},substitute:[]});ht.assert(a.coverage.format===1,"Single: unable to modify coverage table format "+a.coverage.format);var s=t.sub,o=this.binSearch(a.coverage.glyphs,s);o<0&&(o=-1-o,a.coverage.glyphs.splice(o,0,s),a.substitute.splice(o,0,0)),a.substitute[o]=t.by},mn.prototype.addMultiple=function(e,t,n,r){ht.assert(t.by instanceof Array&&t.by.length>1,'Multiple: "by" must be an array of two or more ids');var i=this.getLookupTables(n,r,e,2,!0)[0],a=xh(i,1,{substFormat:1,coverage:{format:1,glyphs:[]},sequences:[]});ht.assert(a.coverage.format===1,"Multiple: unable to modify coverage table format "+a.coverage.format);var s=t.sub,o=this.binSearch(a.coverage.glyphs,s);o<0&&(o=-1-o,a.coverage.glyphs.splice(o,0,s),a.sequences.splice(o,0,0)),a.sequences[o]=t.by},mn.prototype.addAlternate=function(e,t,n,r){var i=this.getLookupTables(n,r,e,3,!0)[0],a=xh(i,1,{substFormat:1,coverage:{format:1,glyphs:[]},alternateSets:[]});ht.assert(a.coverage.format===1,"Alternate: unable to modify coverage table format "+a.coverage.format);var s=t.sub,o=this.binSearch(a.coverage.glyphs,s);o<0&&(o=-1-o,a.coverage.glyphs.splice(o,0,s),a.alternateSets.splice(o,0,0)),a.alternateSets[o]=t.by},mn.prototype.addLigature=function(e,t,n,r){var i=this.getLookupTables(n,r,e,4,!0)[0],a=i.subtables[0];a||(a={substFormat:1,coverage:{format:1,glyphs:[]},ligatureSets:[]},i.subtables[0]=a),ht.assert(a.coverage.format===1,"Ligature: unable to modify coverage table format "+a.coverage.format);var s=t.sub[0],o=t.sub.slice(1),c={ligGlyph:t.by,components:o},l=this.binSearch(a.coverage.glyphs,s);if(l>=0){for(var u=a.ligatureSets[l],A=0;A<u.length;A++)if(oD(u[A].components,o))return;u.push(c)}else l=-1-l,a.coverage.glyphs.splice(l,0,s),a.ligatureSets.splice(l,0,[c])},mn.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)}},mn.prototype.add=function(e,t,n,r){if(/ss\d\d/.test(e))return this.addSingle(e,t,n,r);switch(e){case"aalt":case"salt":return typeof t.by=="number"?this.addSingle(e,t,n,r):this.addAlternate(e,t,n,r);case"dlig":case"liga":case"rlig":return this.addLigature(e,t,n,r);case"ccmp":return t.by instanceof Array?this.addMultiple(e,t,n,r):this.addLigature(e,t,n,r)}};function cD(){return typeof window<"u"}function O1(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0;r<e.length;++r)n[r]=e[r];return t}function lD(e){for(var t=new Buffer(e.byteLength),n=new Uint8Array(e),r=0;r<t.length;++r)t[r]=n[r];return t}function zs(e,t){if(!e)throw t}function U1(e,t,n,r,i){var a;return(t&r)>0?(a=e.parseByte(),t&i||(a=-a),a=n+a):(t&i)>0?a=n:a=n+e.parseShort(),a}function L1(e,t,n){var r=new rt.Parser(t,n);e.numberOfContours=r.parseShort(),e._xMin=r.parseShort(),e._yMin=r.parseShort(),e._xMax=r.parseShort(),e._yMax=r.parseShort();var i,a;if(e.numberOfContours>0){for(var s=e.endPointIndices=[],o=0;o<e.numberOfContours;o+=1)s.push(r.parseUShort());e.instructionLength=r.parseUShort(),e.instructions=[];for(var c=0;c<e.instructionLength;c+=1)e.instructions.push(r.parseByte());var l=s[s.length-1]+1;i=[];for(var u=0;u<l;u+=1)if(a=r.parseByte(),i.push(a),(a&8)>0)for(var A=r.parseByte(),h=0;h<A;h+=1)i.push(a),u+=1;if(ht.argument(i.length===l,"Bad flags."),s.length>0){var f=[],d;if(l>0){for(var p=0;p<l;p+=1)a=i[p],d={},d.onCurve=!!(a&1),d.lastPointOfContour=s.indexOf(p)>=0,f.push(d);for(var m=0,y=0;y<l;y+=1)a=i[y],d=f[y],d.x=U1(r,a,m,2,16),m=d.x;for(var v=0,w=0;w<l;w+=1)a=i[w],d=f[w],d.y=U1(r,a,v,4,32),v=d.y}e.points=f}else e.points=[]}else if(e.numberOfContours===0)e.points=[];else{e.isComposite=!0,e.points=[],e.components=[];for(var B=!0;B;){i=r.parseUShort();var C={glyphIndex:r.parseUShort(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0};(i&1)>0?(i&2)>0?(C.dx=r.parseShort(),C.dy=r.parseShort()):C.matchedPoints=[r.parseUShort(),r.parseUShort()]:(i&2)>0?(C.dx=r.parseChar(),C.dy=r.parseChar()):C.matchedPoints=[r.parseByte(),r.parseByte()],(i&8)>0?C.xScale=C.yScale=r.parseF2Dot14():(i&64)>0?(C.xScale=r.parseF2Dot14(),C.yScale=r.parseF2Dot14()):(i&128)>0&&(C.xScale=r.parseF2Dot14(),C.scale01=r.parseF2Dot14(),C.scale10=r.parseF2Dot14(),C.yScale=r.parseF2Dot14()),e.components.push(C),B=!!(i&32)}if(i&256){e.instructionLength=r.parseUShort(),e.instructions=[];for(var x=0;x<e.instructionLength;x+=1)e.instructions.push(r.parseByte())}}}function bh(e,t){for(var n=[],r=0;r<e.length;r+=1){var i=e[r],a={x:t.xScale*i.x+t.scale01*i.y+t.dx,y:t.scale10*i.x+t.yScale*i.y+t.dy,onCurve:i.onCurve,lastPointOfContour:i.lastPointOfContour};n.push(a)}return n}function uD(e){for(var t=[],n=[],r=0;r<e.length;r+=1){var i=e[r];n.push(i),i.lastPointOfContour&&(t.push(n),n=[])}return ht.argument(n.length===0,"There are still points left in the current contour."),t}function Y1(e){var t=new ye;if(!e)return t;for(var n=uD(e),r=0;r<n.length;++r){var i=n[r],a=null,s=i[i.length-1],o=i[0];if(s.onCurve)t.moveTo(s.x,s.y);else if(o.onCurve)t.moveTo(o.x,o.y);else{var c={x:(s.x+o.x)*.5,y:(s.y+o.y)*.5};t.moveTo(c.x,c.y)}for(var l=0;l<i.length;++l)if(a=s,s=o,o=i[(l+1)%i.length],s.onCurve)t.lineTo(s.x,s.y);else{var u=o;a.onCurve||((s.x+a.x)*.5,(s.y+a.y)*.5),o.onCurve||(u={x:(s.x+o.x)*.5,y:(s.y+o.y)*.5}),t.quadraticCurveTo(s.x,s.y,u.x,u.y)}t.closePath()}return t}function H1(e,t){if(t.isComposite)for(var n=0;n<t.components.length;n+=1){var r=t.components[n],i=e.get(r.glyphIndex);if(i.getPath(),i.points){var a=void 0;if(r.matchedPoints===void 0)a=bh(i.points,r);else{if(r.matchedPoints[0]>t.points.length-1||r.matchedPoints[1]>i.points.length-1)throw Error("Matched points out of range in "+t.name);var s=t.points[r.matchedPoints[0]],o=i.points[r.matchedPoints[1]],c={xScale:r.xScale,scale01:r.scale01,scale10:r.scale10,yScale:r.yScale,dx:0,dy:0};o=bh([o],c)[0],c.dx=s.x-o.x,c.dy=s.y-o.y,a=bh(i.points,c)}t.points=t.points.concat(a)}}return Y1(t.points)}function AD(e,t,n,r){for(var i=new sr.GlyphSet(r),a=0;a<n.length-1;a+=1){var s=n[a],o=n[a+1];s!==o?i.push(a,sr.ttfGlyphLoader(r,a,L1,e,t+s,H1)):i.push(a,sr.glyphLoader(r,a))}return i}function hD(e,t,n,r){var i=new sr.GlyphSet(r);return r._push=function(a){var s=n[a],o=n[a+1];s!==o?i.push(a,sr.ttfGlyphLoader(r,a,L1,e,t+s,H1)):i.push(a,sr.glyphLoader(r,a))},i}function fD(e,t,n,r,i){return i.lowMemory?hD(e,t,n,r):AD(e,t,n,r)}var G1={getPath:Y1,parse:fD},V1,Fi,z1,Sh;function J1(e){this.font=e,this.getCommands=function(t){return G1.getPath(t).commands},this._fpgmState=this._prepState=void 0,this._errorState=0}function gD(e){return e}function j1(e){return Math.sign(e)*Math.round(Math.abs(e))}function dD(e){return Math.sign(e)*Math.round(Math.abs(e*2))/2}function pD(e){return Math.sign(e)*(Math.round(Math.abs(e)+.5)-.5)}function mD(e){return Math.sign(e)*Math.ceil(Math.abs(e))}function yD(e){return Math.sign(e)*Math.floor(Math.abs(e))}var W1=function(e){var t=this.srPeriod,n=this.srPhase,r=this.srThreshold,i=1;return e<0&&(e=-e,i=-1),e+=r-n,e=Math.trunc(e/t)*t,e+=n,e<0?n*i:e*i},or={x:1,y:0,axis:"x",distance:function(e,t,n,r){return(n?e.xo:e.x)-(r?t.xo:t.x)},interpolate:function(e,t,n,r){var i,a,s,o,c,l,u;if(!r||r===this){if(i=e.xo-t.xo,a=e.xo-n.xo,c=t.x-t.xo,l=n.x-n.xo,s=Math.abs(i),o=Math.abs(a),u=s+o,u===0){e.x=e.xo+(c+l)/2;return}e.x=e.xo+(c*o+l*s)/u;return}if(i=r.distance(e,t,!0,!0),a=r.distance(e,n,!0,!0),c=r.distance(t,t,!1,!0),l=r.distance(n,n,!1,!0),s=Math.abs(i),o=Math.abs(a),u=s+o,u===0){or.setRelative(e,e,(c+l)/2,r,!0);return}or.setRelative(e,e,(c*o+l*s)/u,r,!0)},normalSlope:Number.NEGATIVE_INFINITY,setRelative:function(e,t,n,r,i){if(!r||r===this){e.x=(i?t.xo:t.x)+n;return}var a=i?t.xo:t.x,s=i?t.yo:t.y,o=a+n*r.x,c=s+n*r.y;e.x=o+(e.y-c)/r.normalSlope},slope:0,touch:function(e){e.xTouched=!0},touched:function(e){return e.xTouched},untouch:function(e){e.xTouched=!1}},yr={x:0,y:1,axis:"y",distance:function(e,t,n,r){return(n?e.yo:e.y)-(r?t.yo:t.y)},interpolate:function(e,t,n,r){var i,a,s,o,c,l,u;if(!r||r===this){if(i=e.yo-t.yo,a=e.yo-n.yo,c=t.y-t.yo,l=n.y-n.yo,s=Math.abs(i),o=Math.abs(a),u=s+o,u===0){e.y=e.yo+(c+l)/2;return}e.y=e.yo+(c*o+l*s)/u;return}if(i=r.distance(e,t,!0,!0),a=r.distance(e,n,!0,!0),c=r.distance(t,t,!1,!0),l=r.distance(n,n,!1,!0),s=Math.abs(i),o=Math.abs(a),u=s+o,u===0){yr.setRelative(e,e,(c+l)/2,r,!0);return}yr.setRelative(e,e,(c*o+l*s)/u,r,!0)},normalSlope:0,setRelative:function(e,t,n,r,i){if(!r||r===this){e.y=(i?t.yo:t.y)+n;return}var a=i?t.xo:t.x,s=i?t.yo:t.y,o=a+n*r.x,c=s+n*r.y;e.y=c+r.normalSlope*(e.x-o)},slope:Number.POSITIVE_INFINITY,touch:function(e){e.yTouched=!0},touched:function(e){return e.yTouched},untouch:function(e){e.yTouched=!1}};Object.freeze(or),Object.freeze(yr);function Js(e,t){this.x=e,this.y=t,this.axis=void 0,this.slope=t/e,this.normalSlope=-e/t,Object.freeze(this)}Js.prototype.distance=function(e,t,n,r){return this.x*or.distance(e,t,n,r)+this.y*yr.distance(e,t,n,r)},Js.prototype.interpolate=function(e,t,n,r){var i,a,s,o,c,l,u;if(s=r.distance(e,t,!0,!0),o=r.distance(e,n,!0,!0),i=r.distance(t,t,!1,!0),a=r.distance(n,n,!1,!0),c=Math.abs(s),l=Math.abs(o),u=c+l,u===0){this.setRelative(e,e,(i+a)/2,r,!0);return}this.setRelative(e,e,(i*l+a*c)/u,r,!0)},Js.prototype.setRelative=function(e,t,n,r,i){r=r||this;var a=i?t.xo:t.x,s=i?t.yo:t.y,o=a+n*r.x,c=s+n*r.y,l=r.normalSlope,u=this.slope,A=e.x,h=e.y;e.x=(u*A-l*o+c-h)/(u-l),e.y=u*(e.x-A)+h},Js.prototype.touch=function(e){e.xTouched=!0,e.yTouched=!0};function js(e,t){var n=Math.sqrt(e*e+t*t);return e/=n,t/=n,e===1&&t===0?or:e===0&&t===1?yr:new Js(e,t)}function wr(e,t,n,r){this.x=this.xo=Math.round(e*64)/64,this.y=this.yo=Math.round(t*64)/64,this.lastPointOfContour=n,this.onCurve=r,this.prevPointOnContour=void 0,this.nextPointOnContour=void 0,this.xTouched=!1,this.yTouched=!1,Object.preventExtensions(this)}wr.prototype.nextTouched=function(e){for(var t=this.nextPointOnContour;!e.touched(t)&&t!==this;)t=t.nextPointOnContour;return t},wr.prototype.prevTouched=function(e){for(var t=this.prevPointOnContour;!e.touched(t)&&t!==this;)t=t.prevPointOnContour;return t};var Ws=Object.freeze(new wr(0,0)),wD={cvCutIn:17/16,deltaBase:9,deltaShift:.125,loop:1,minDis:1,autoFlip:!0};function Kr(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=or,this.round=j1}}J1.prototype.exec=function(e,t){if(typeof t!="number")throw new Error("Point size is not a number!");if(!(this._errorState>2)){var n=this.font,r=this._prepState;if(!r||r.ppem!==t){var i=this._fpgmState;if(!i){Kr.prototype=wD,i=this._fpgmState=new Kr("fpgm",n.tables.fpgm),i.funcs=[],i.font=n,I.DEBUG&&(console.log("---EXEC FPGM---"),i.step=-1);try{Fi(i)}catch(l){console.log("Hinting error in FPGM:"+l),this._errorState=3;return}}Kr.prototype=i,r=this._prepState=new Kr("prep",n.tables.prep),r.ppem=t;var a=n.tables.cvt;if(a)for(var s=r.cvt=new Array(a.length),o=t/n.unitsPerEm,c=0;c<a.length;c++)s[c]=a[c]*o;else r.cvt=[];I.DEBUG&&(console.log("---EXEC PREP---"),r.step=-1);try{Fi(r)}catch(l){this._errorState<2&&console.log("Hinting error in PREP:"+l),this._errorState=2}}if(!(this._errorState>1))try{return z1(e,r)}catch(l){this._errorState<1&&(console.log("Hinting error:"+l),console.log("Note: further hinting errors are silenced")),this._errorState=1;return}}},z1=function(e,t){var n=t.ppem/t.font.unitsPerEm,r=n,i=e.components,a,s,o;if(Kr.prototype=t,!i)o=new Kr("glyf",e.instructions),I.DEBUG&&(console.log("---EXEC GLYPH---"),o.step=-1),Sh(e,o,n,r),s=o.gZone;else{var c=t.font;s=[],a=[];for(var l=0;l<i.length;l++){var u=i[l],A=c.glyphs.get(u.glyphIndex);o=new Kr("glyf",A.instructions),I.DEBUG&&(console.log("---EXEC COMP "+l+"---"),o.step=-1),Sh(A,o,n,r);for(var h=Math.round(u.dx*n),f=Math.round(u.dy*r),d=o.gZone,p=o.contours,m=0;m<d.length;m++){var y=d[m];y.xTouched=y.yTouched=!1,y.xo=y.x=y.x+h,y.yo=y.y=y.y+f}var v=s.length;s.push.apply(s,d);for(var w=0;w<p.length;w++)a.push(p[w]+v)}e.instructions&&!o.inhibitGridFit&&(o=new Kr("glyf",e.instructions),o.gZone=o.z0=o.z1=o.z2=s,o.contours=a,s.push(new wr(0,0),new wr(Math.round(e.advanceWidth*n),0)),I.DEBUG&&(console.log("---EXEC COMPOSITE---"),o.step=-1),Fi(o),s.length-=2)}return s},Sh=function(e,t,n,r){for(var i=e.points||[],a=i.length,s=t.gZone=t.z0=t.z1=t.z2=[],o=t.contours=[],c,l=0;l<a;l++)c=i[l],s[l]=new wr(c.x*n,c.y*r,c.lastPointOfContour,c.onCurve);for(var u,A,h=0;h<a;h++)c=s[h],u||(u=c,o.push(h)),c.lastPointOfContour?(c.nextPointOnContour=u,u.prevPointOnContour=c,u=void 0):(A=s[h+1],c.nextPointOnContour=A,A.prevPointOnContour=c);if(!t.inhibitGridFit){if(I.DEBUG){console.log("PROCESSING GLYPH",t.stack);for(var f=0;f<a;f++)console.log(f,s[f].x,s[f].y)}if(s.push(new wr(0,0),new wr(Math.round(e.advanceWidth*n),0)),Fi(t),s.length-=2,I.DEBUG){console.log("FINISHED GLYPH",t.stack);for(var d=0;d<a;d++)console.log(d,s[d].x,s[d].y)}}},Fi=function(e){var t=e.prog;if(t){var n=t.length,r;for(e.ip=0;e.ip<n;e.ip++){if(I.DEBUG&&e.step++,r=V1[t[e.ip]],!r)throw new Error("unknown instruction: 0x"+Number(t[e.ip]).toString(16));r(e)}}};function xl(e){for(var t=e.tZone=new Array(e.gZone.length),n=0;n<t.length;n++)t[n]=new wr(0,0)}function K1(e,t){var n=e.prog,r=e.ip,i=1,a;do if(a=n[++r],a===88)i++;else if(a===89)i--;else if(a===64)r+=n[r+1]+1;else if(a===65)r+=2*n[r+1]+1;else if(a>=176&&a<=183)r+=a-176+1;else if(a>=184&&a<=191)r+=(a-184+1)*2;else if(t&&i===1&&a===27)break;while(i>0);e.ip=r}function X1(e,t){I.DEBUG&&console.log(t.step,"SVTCA["+e.axis+"]"),t.fv=t.pv=t.dpv=e}function _1(e,t){I.DEBUG&&console.log(t.step,"SPVTCA["+e.axis+"]"),t.pv=t.dpv=e}function q1(e,t){I.DEBUG&&console.log(t.step,"SFVTCA["+e.axis+"]"),t.fv=e}function Z1(e,t){var n=t.stack,r=n.pop(),i=n.pop(),a=t.z2[r],s=t.z1[i];I.DEBUG&&console.log("SPVTL["+e+"]",r,i);var o,c;e?(o=a.y-s.y,c=s.x-a.x):(o=s.x-a.x,c=s.y-a.y),t.pv=t.dpv=js(o,c)}function $1(e,t){var n=t.stack,r=n.pop(),i=n.pop(),a=t.z2[r],s=t.z1[i];I.DEBUG&&console.log("SFVTL["+e+"]",r,i);var o,c;e?(o=a.y-s.y,c=s.x-a.x):(o=s.x-a.x,c=s.y-a.y),t.fv=js(o,c)}function vD(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"SPVFS[]",n,r),e.pv=e.dpv=js(r,n)}function ED(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"SPVFS[]",n,r),e.fv=js(r,n)}function BD(e){var t=e.stack,n=e.pv;I.DEBUG&&console.log(e.step,"GPV[]"),t.push(n.x*16384),t.push(n.y*16384)}function CD(e){var t=e.stack,n=e.fv;I.DEBUG&&console.log(e.step,"GFV[]"),t.push(n.x*16384),t.push(n.y*16384)}function xD(e){e.fv=e.pv,I.DEBUG&&console.log(e.step,"SFVTPV[]")}function bD(e){var t=e.stack,n=t.pop(),r=t.pop(),i=t.pop(),a=t.pop(),s=t.pop(),o=e.z0,c=e.z1,l=o[n],u=o[r],A=c[i],h=c[a],f=e.z2[s];I.DEBUG&&console.log("ISECT[], ",n,r,i,a,s);var d=l.x,p=l.y,m=u.x,y=u.y,v=A.x,w=A.y,B=h.x,C=h.y,x=(d-m)*(w-C)-(p-y)*(v-B),b=d*y-p*m,D=v*C-w*B;f.x=(b*(v-B)-D*(d-m))/x,f.y=(b*(w-C)-D*(p-y))/x}function SD(e){e.rp0=e.stack.pop(),I.DEBUG&&console.log(e.step,"SRP0[]",e.rp0)}function DD(e){e.rp1=e.stack.pop(),I.DEBUG&&console.log(e.step,"SRP1[]",e.rp1)}function ID(e){e.rp2=e.stack.pop(),I.DEBUG&&console.log(e.step,"SRP2[]",e.rp2)}function FD(e){var t=e.stack.pop();switch(I.DEBUG&&console.log(e.step,"SZP0[]",t),e.zp0=t,t){case 0:e.tZone||xl(e),e.z0=e.tZone;break;case 1:e.z0=e.gZone;break;default:throw new Error("Invalid zone pointer")}}function QD(e){var t=e.stack.pop();switch(I.DEBUG&&console.log(e.step,"SZP1[]",t),e.zp1=t,t){case 0:e.tZone||xl(e),e.z1=e.tZone;break;case 1:e.z1=e.gZone;break;default:throw new Error("Invalid zone pointer")}}function MD(e){var t=e.stack.pop();switch(I.DEBUG&&console.log(e.step,"SZP2[]",t),e.zp2=t,t){case 0:e.tZone||xl(e),e.z2=e.tZone;break;case 1:e.z2=e.gZone;break;default:throw new Error("Invalid zone pointer")}}function TD(e){var t=e.stack.pop();switch(I.DEBUG&&console.log(e.step,"SZPS[]",t),e.zp0=e.zp1=e.zp2=t,t){case 0:e.tZone||xl(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 ND(e){e.loop=e.stack.pop(),I.DEBUG&&console.log(e.step,"SLOOP[]",e.loop)}function PD(e){I.DEBUG&&console.log(e.step,"RTG[]"),e.round=j1}function kD(e){I.DEBUG&&console.log(e.step,"RTHG[]"),e.round=pD}function RD(e){var t=e.stack.pop();I.DEBUG&&console.log(e.step,"SMD[]",t),e.minDis=t/64}function OD(e){I.DEBUG&&console.log(e.step,"ELSE[]"),K1(e,!1)}function UD(e){var t=e.stack.pop();I.DEBUG&&console.log(e.step,"JMPR[]",t),e.ip+=t-1}function LD(e){var t=e.stack.pop();I.DEBUG&&console.log(e.step,"SCVTCI[]",t),e.cvCutIn=t/64}function YD(e){var t=e.stack;I.DEBUG&&console.log(e.step,"DUP[]"),t.push(t[t.length-1])}function Dh(e){I.DEBUG&&console.log(e.step,"POP[]"),e.stack.pop()}function HD(e){I.DEBUG&&console.log(e.step,"CLEAR[]"),e.stack.length=0}function GD(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"SWAP[]"),t.push(n),t.push(r)}function VD(e){var t=e.stack;I.DEBUG&&console.log(e.step,"DEPTH[]"),t.push(t.length)}function zD(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"LOOPCALL[]",n,r);var i=e.ip,a=e.prog;e.prog=e.funcs[n];for(var s=0;s<r;s++)Fi(e),I.DEBUG&&console.log(++e.step,s+1<r?"next loopcall":"done loopcall",s);e.ip=i,e.prog=a}function JD(e){var t=e.stack.pop();I.DEBUG&&console.log(e.step,"CALL[]",t);var n=e.ip,r=e.prog;e.prog=e.funcs[t],Fi(e),e.ip=n,e.prog=r,I.DEBUG&&console.log(++e.step,"returning from",t)}function jD(e){var t=e.stack,n=t.pop();I.DEBUG&&console.log(e.step,"CINDEX[]",n),t.push(t[t.length-n])}function WD(e){var t=e.stack,n=t.pop();I.DEBUG&&console.log(e.step,"MINDEX[]",n),t.push(t.splice(t.length-n,1)[0])}function KD(e){if(e.env!=="fpgm")throw new Error("FDEF not allowed here");var t=e.stack,n=e.prog,r=e.ip,i=t.pop(),a=r;for(I.DEBUG&&console.log(e.step,"FDEF[]",i);n[++r]!==45;);e.ip=r,e.funcs[i]=n.slice(a+1,r)}function tm(e,t){var n=t.stack.pop(),r=t.z0[n],i=t.fv,a=t.pv;I.DEBUG&&console.log(t.step,"MDAP["+e+"]",n);var s=a.distance(r,Ws);e&&(s=t.round(s)),i.setRelative(r,Ws,s,a),i.touch(r),t.rp0=t.rp1=n}function em(e,t){var n=t.z2,r=n.length-2,i,a,s;I.DEBUG&&console.log(t.step,"IUP["+e.axis+"]");for(var o=0;o<r;o++)i=n[o],!e.touched(i)&&(a=i.prevTouched(e),a!==i&&(s=i.nextTouched(e),a===s&&e.setRelative(i,i,e.distance(a,a,!1,!0),e,!0),e.interpolate(i,a,s,e)))}function nm(e,t){for(var n=t.stack,r=e?t.rp1:t.rp2,i=(e?t.z0:t.z1)[r],a=t.fv,s=t.pv,o=t.loop,c=t.z2;o--;){var l=n.pop(),u=c[l],A=s.distance(i,i,!1,!0);a.setRelative(u,u,A,s),a.touch(u),I.DEBUG&&console.log(t.step,(t.loop>1?"loop "+(t.loop-o)+": ":"")+"SHP["+(e?"rp1":"rp2")+"]",l)}t.loop=1}function rm(e,t){var n=t.stack,r=e?t.rp1:t.rp2,i=(e?t.z0:t.z1)[r],a=t.fv,s=t.pv,o=n.pop(),c=t.z2[t.contours[o]],l=c;I.DEBUG&&console.log(t.step,"SHC["+e+"]",o);var u=s.distance(i,i,!1,!0);do l!==i&&a.setRelative(l,l,u,s),l=l.nextPointOnContour;while(l!==c)}function im(e,t){var n=t.stack,r=e?t.rp1:t.rp2,i=(e?t.z0:t.z1)[r],a=t.fv,s=t.pv,o=n.pop();I.DEBUG&&console.log(t.step,"SHZ["+e+"]",o);var c;switch(o){case 0:c=t.tZone;break;case 1:c=t.gZone;break;default:throw new Error("Invalid zone")}for(var l,u=s.distance(i,i,!1,!0),A=c.length-2,h=0;h<A;h++)l=c[h],a.setRelative(l,l,u,s)}function XD(e){for(var t=e.stack,n=e.loop,r=e.fv,i=t.pop()/64,a=e.z2;n--;){var s=t.pop(),o=a[s];I.DEBUG&&console.log(e.step,(e.loop>1?"loop "+(e.loop-n)+": ":"")+"SHPIX[]",s,i),r.setRelative(o,o,i),r.touch(o)}e.loop=1}function _D(e){for(var t=e.stack,n=e.rp1,r=e.rp2,i=e.loop,a=e.z0[n],s=e.z1[r],o=e.fv,c=e.dpv,l=e.z2;i--;){var u=t.pop(),A=l[u];I.DEBUG&&console.log(e.step,(e.loop>1?"loop "+(e.loop-i)+": ":"")+"IP[]",u,n,"<->",r),o.interpolate(A,a,s,c),o.touch(A)}e.loop=1}function am(e,t){var n=t.stack,r=n.pop()/64,i=n.pop(),a=t.z1[i],s=t.z0[t.rp0],o=t.fv,c=t.pv;o.setRelative(a,s,r,c),o.touch(a),I.DEBUG&&console.log(t.step,"MSIRP["+e+"]",r,i),t.rp1=t.rp0,t.rp2=i,e&&(t.rp0=i)}function qD(e){for(var t=e.stack,n=e.rp0,r=e.z0[n],i=e.loop,a=e.fv,s=e.pv,o=e.z1;i--;){var c=t.pop(),l=o[c];I.DEBUG&&console.log(e.step,(e.loop>1?"loop "+(e.loop-i)+": ":"")+"ALIGNRP[]",c),a.setRelative(l,r,0,s),a.touch(l)}e.loop=1}function ZD(e){I.DEBUG&&console.log(e.step,"RTDG[]"),e.round=dD}function sm(e,t){var n=t.stack,r=n.pop(),i=n.pop(),a=t.z0[i],s=t.fv,o=t.pv,c=t.cvt[r];I.DEBUG&&console.log(t.step,"MIAP["+e+"]",r,"(",c,")",i);var l=o.distance(a,Ws);e&&(Math.abs(l-c)<t.cvCutIn&&(l=c),l=t.round(l)),s.setRelative(a,Ws,l,o),t.zp0===0&&(a.xo=a.x,a.yo=a.y),s.touch(a),t.rp0=t.rp1=i}function $D(e){var t=e.prog,n=e.ip,r=e.stack,i=t[++n];I.DEBUG&&console.log(e.step,"NPUSHB[]",i);for(var a=0;a<i;a++)r.push(t[++n]);e.ip=n}function t4(e){var t=e.ip,n=e.prog,r=e.stack,i=n[++t];I.DEBUG&&console.log(e.step,"NPUSHW[]",i);for(var a=0;a<i;a++){var s=n[++t]<<8|n[++t];s&32768&&(s=-((s^65535)+1)),r.push(s)}e.ip=t}function e4(e){var t=e.stack,n=e.store;n||(n=e.store=[]);var r=t.pop(),i=t.pop();I.DEBUG&&console.log(e.step,"WS",r,i),n[i]=r}function n4(e){var t=e.stack,n=e.store,r=t.pop();I.DEBUG&&console.log(e.step,"RS",r);var i=n&&n[r]||0;t.push(i)}function r4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"WCVTP",n,r),e.cvt[r]=n/64}function i4(e){var t=e.stack,n=t.pop();I.DEBUG&&console.log(e.step,"RCVT",n),t.push(e.cvt[n]*64)}function om(e,t){var n=t.stack,r=n.pop(),i=t.z2[r];I.DEBUG&&console.log(t.step,"GC["+e+"]",r),n.push(t.dpv.distance(i,Ws,e,!1)*64)}function cm(e,t){var n=t.stack,r=n.pop(),i=n.pop(),a=t.z1[r],s=t.z0[i],o=t.dpv.distance(s,a,e,e);I.DEBUG&&console.log(t.step,"MD["+e+"]",r,i,"->",o),t.stack.push(Math.round(o*64))}function a4(e){I.DEBUG&&console.log(e.step,"MPPEM[]"),e.stack.push(e.ppem)}function s4(e){I.DEBUG&&console.log(e.step,"FLIPON[]"),e.autoFlip=!0}function o4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"LT[]",n,r),t.push(r<n?1:0)}function c4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"LTEQ[]",n,r),t.push(r<=n?1:0)}function l4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"GT[]",n,r),t.push(r>n?1:0)}function u4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"GTEQ[]",n,r),t.push(r>=n?1:0)}function A4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"EQ[]",n,r),t.push(n===r?1:0)}function h4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"NEQ[]",n,r),t.push(n!==r?1:0)}function f4(e){var t=e.stack,n=t.pop();I.DEBUG&&console.log(e.step,"ODD[]",n),t.push(Math.trunc(n)%2?1:0)}function g4(e){var t=e.stack,n=t.pop();I.DEBUG&&console.log(e.step,"EVEN[]",n),t.push(Math.trunc(n)%2?0:1)}function d4(e){var t=e.stack.pop();I.DEBUG&&console.log(e.step,"IF[]",t),t||(K1(e,!0),I.DEBUG&&console.log(e.step,"EIF[]"))}function p4(e){I.DEBUG&&console.log(e.step,"EIF[]")}function m4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"AND[]",n,r),t.push(n&&r?1:0)}function y4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"OR[]",n,r),t.push(n||r?1:0)}function w4(e){var t=e.stack,n=t.pop();I.DEBUG&&console.log(e.step,"NOT[]",n),t.push(n?0:1)}function Ih(e,t){var n=t.stack,r=n.pop(),i=t.fv,a=t.pv,s=t.ppem,o=t.deltaBase+(e-1)*16,c=t.deltaShift,l=t.z0;I.DEBUG&&console.log(t.step,"DELTAP["+e+"]",r,n);for(var u=0;u<r;u++){var A=n.pop(),h=n.pop(),f=o+((h&240)>>4);if(f===s){var d=(h&15)-8;d>=0&&d++,I.DEBUG&&console.log(t.step,"DELTAPFIX",A,"by",d*c);var p=l[A];i.setRelative(p,p,d*c,a)}}}function v4(e){var t=e.stack,n=t.pop();I.DEBUG&&console.log(e.step,"SDB[]",n),e.deltaBase=n}function E4(e){var t=e.stack,n=t.pop();I.DEBUG&&console.log(e.step,"SDS[]",n),e.deltaShift=Math.pow(.5,n)}function B4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"ADD[]",n,r),t.push(r+n)}function C4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"SUB[]",n,r),t.push(r-n)}function x4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"DIV[]",n,r),t.push(r*64/n)}function b4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"MUL[]",n,r),t.push(r*n/64)}function S4(e){var t=e.stack,n=t.pop();I.DEBUG&&console.log(e.step,"ABS[]",n),t.push(Math.abs(n))}function D4(e){var t=e.stack,n=t.pop();I.DEBUG&&console.log(e.step,"NEG[]",n),t.push(-n)}function I4(e){var t=e.stack,n=t.pop();I.DEBUG&&console.log(e.step,"FLOOR[]",n),t.push(Math.floor(n/64)*64)}function F4(e){var t=e.stack,n=t.pop();I.DEBUG&&console.log(e.step,"CEILING[]",n),t.push(Math.ceil(n/64)*64)}function bl(e,t){var n=t.stack,r=n.pop();I.DEBUG&&console.log(t.step,"ROUND[]"),n.push(t.round(r/64)*64)}function Q4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"WCVTF[]",n,r),e.cvt[r]=n*e.ppem/e.font.unitsPerEm}function Fh(e,t){var n=t.stack,r=n.pop(),i=t.ppem,a=t.deltaBase+(e-1)*16,s=t.deltaShift;I.DEBUG&&console.log(t.step,"DELTAC["+e+"]",r,n);for(var o=0;o<r;o++){var c=n.pop(),l=n.pop(),u=a+((l&240)>>4);if(u===i){var A=(l&15)-8;A>=0&&A++;var h=A*s;I.DEBUG&&console.log(t.step,"DELTACFIX",c,"by",h),t.cvt[c]+=h}}}function M4(e){var t=e.stack.pop();I.DEBUG&&console.log(e.step,"SROUND[]",t),e.round=W1;var 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 T4(e){var t=e.stack.pop();I.DEBUG&&console.log(e.step,"S45ROUND[]",t),e.round=W1;var 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 N4(e){I.DEBUG&&console.log(e.step,"ROFF[]"),e.round=gD}function P4(e){I.DEBUG&&console.log(e.step,"RUTG[]"),e.round=mD}function k4(e){I.DEBUG&&console.log(e.step,"RDTG[]"),e.round=yD}function R4(e){var t=e.stack.pop();I.DEBUG&&console.log(e.step,"SCANCTRL[]",t)}function lm(e,t){var n=t.stack,r=n.pop(),i=n.pop(),a=t.z2[r],s=t.z1[i];I.DEBUG&&console.log(t.step,"SDPVTL["+e+"]",r,i);var o,c;e?(o=a.y-s.y,c=s.x-a.x):(o=s.x-a.x,c=s.y-a.y),t.dpv=js(o,c)}function O4(e){var t=e.stack,n=t.pop(),r=0;I.DEBUG&&console.log(e.step,"GETINFO[]",n),n&1&&(r=35),n&32&&(r|=4096),t.push(r)}function U4(e){var t=e.stack,n=t.pop(),r=t.pop(),i=t.pop();I.DEBUG&&console.log(e.step,"ROLL[]"),t.push(r),t.push(n),t.push(i)}function L4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"MAX[]",n,r),t.push(Math.max(r,n))}function Y4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"MIN[]",n,r),t.push(Math.min(r,n))}function H4(e){var t=e.stack.pop();I.DEBUG&&console.log(e.step,"SCANTYPE[]",t)}function G4(e){var t=e.stack.pop(),n=e.stack.pop();switch(I.DEBUG&&console.log(e.step,"INSTCTRL[]",t,n),t){case 1:e.inhibitGridFit=!!n;return;case 2:e.ignoreCvt=!!n;return;default:throw new Error("invalid INSTCTRL[] selector")}}function Xr(e,t){var n=t.stack,r=t.prog,i=t.ip;I.DEBUG&&console.log(t.step,"PUSHB["+e+"]");for(var a=0;a<e;a++)n.push(r[++i]);t.ip=i}function _r(e,t){var n=t.ip,r=t.prog,i=t.stack;I.DEBUG&&console.log(t.ip,"PUSHW["+e+"]");for(var a=0;a<e;a++){var s=r[++n]<<8|r[++n];s&32768&&(s=-((s^65535)+1)),i.push(s)}t.ip=n}function it(e,t,n,r,i,a){var s=a.stack,o=e&&s.pop(),c=s.pop(),l=a.rp0,u=a.z0[l],A=a.z1[c],h=a.minDis,f=a.fv,d=a.dpv,p,m,y,v;m=p=d.distance(A,u,!0,!0),y=m>=0?1:-1,m=Math.abs(m),e&&(v=a.cvt[o],r&&Math.abs(m-v)<a.cvCutIn&&(m=v)),n&&m<h&&(m=h),r&&(m=a.round(m)),f.setRelative(A,u,y*m,d),f.touch(A),I.DEBUG&&console.log(a.step,(e?"MIRP[":"MDRP[")+(t?"M":"m")+(n?">":"_")+(r?"R":"_")+(i===0?"Gr":i===1?"Bl":i===2?"Wh":"")+"]",e?o+"("+a.cvt[o]+","+v+")":"",c,"(d =",p,"->",y*m,")"),a.rp1=a.rp0,a.rp2=c,t&&(a.rp0=c)}V1=[X1.bind(void 0,yr),X1.bind(void 0,or),_1.bind(void 0,yr),_1.bind(void 0,or),q1.bind(void 0,yr),q1.bind(void 0,or),Z1.bind(void 0,0),Z1.bind(void 0,1),$1.bind(void 0,0),$1.bind(void 0,1),vD,ED,BD,CD,xD,bD,SD,DD,ID,FD,QD,MD,TD,ND,PD,kD,RD,OD,UD,LD,void 0,void 0,YD,Dh,HD,GD,VD,jD,WD,void 0,void 0,void 0,zD,JD,KD,void 0,tm.bind(void 0,0),tm.bind(void 0,1),em.bind(void 0,yr),em.bind(void 0,or),nm.bind(void 0,0),nm.bind(void 0,1),rm.bind(void 0,0),rm.bind(void 0,1),im.bind(void 0,0),im.bind(void 0,1),XD,_D,am.bind(void 0,0),am.bind(void 0,1),qD,ZD,sm.bind(void 0,0),sm.bind(void 0,1),$D,t4,e4,n4,r4,i4,om.bind(void 0,0),om.bind(void 0,1),void 0,cm.bind(void 0,0),cm.bind(void 0,1),a4,void 0,s4,void 0,void 0,o4,c4,l4,u4,A4,h4,f4,g4,d4,p4,m4,y4,w4,Ih.bind(void 0,1),v4,E4,B4,C4,x4,b4,S4,D4,I4,F4,bl.bind(void 0,0),bl.bind(void 0,1),bl.bind(void 0,2),bl.bind(void 0,3),void 0,void 0,void 0,void 0,Q4,Ih.bind(void 0,2),Ih.bind(void 0,3),Fh.bind(void 0,1),Fh.bind(void 0,2),Fh.bind(void 0,3),M4,T4,void 0,void 0,N4,void 0,P4,k4,Dh,Dh,void 0,void 0,void 0,void 0,void 0,R4,lm.bind(void 0,0),lm.bind(void 0,1),O4,void 0,U4,L4,Y4,H4,G4,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,Xr.bind(void 0,1),Xr.bind(void 0,2),Xr.bind(void 0,3),Xr.bind(void 0,4),Xr.bind(void 0,5),Xr.bind(void 0,6),Xr.bind(void 0,7),Xr.bind(void 0,8),_r.bind(void 0,1),_r.bind(void 0,2),_r.bind(void 0,3),_r.bind(void 0,4),_r.bind(void 0,5),_r.bind(void 0,6),_r.bind(void 0,7),_r.bind(void 0,8),it.bind(void 0,0,0,0,0,0),it.bind(void 0,0,0,0,0,1),it.bind(void 0,0,0,0,0,2),it.bind(void 0,0,0,0,0,3),it.bind(void 0,0,0,0,1,0),it.bind(void 0,0,0,0,1,1),it.bind(void 0,0,0,0,1,2),it.bind(void 0,0,0,0,1,3),it.bind(void 0,0,0,1,0,0),it.bind(void 0,0,0,1,0,1),it.bind(void 0,0,0,1,0,2),it.bind(void 0,0,0,1,0,3),it.bind(void 0,0,0,1,1,0),it.bind(void 0,0,0,1,1,1),it.bind(void 0,0,0,1,1,2),it.bind(void 0,0,0,1,1,3),it.bind(void 0,0,1,0,0,0),it.bind(void 0,0,1,0,0,1),it.bind(void 0,0,1,0,0,2),it.bind(void 0,0,1,0,0,3),it.bind(void 0,0,1,0,1,0),it.bind(void 0,0,1,0,1,1),it.bind(void 0,0,1,0,1,2),it.bind(void 0,0,1,0,1,3),it.bind(void 0,0,1,1,0,0),it.bind(void 0,0,1,1,0,1),it.bind(void 0,0,1,1,0,2),it.bind(void 0,0,1,1,0,3),it.bind(void 0,0,1,1,1,0),it.bind(void 0,0,1,1,1,1),it.bind(void 0,0,1,1,1,2),it.bind(void 0,0,1,1,1,3),it.bind(void 0,1,0,0,0,0),it.bind(void 0,1,0,0,0,1),it.bind(void 0,1,0,0,0,2),it.bind(void 0,1,0,0,0,3),it.bind(void 0,1,0,0,1,0),it.bind(void 0,1,0,0,1,1),it.bind(void 0,1,0,0,1,2),it.bind(void 0,1,0,0,1,3),it.bind(void 0,1,0,1,0,0),it.bind(void 0,1,0,1,0,1),it.bind(void 0,1,0,1,0,2),it.bind(void 0,1,0,1,0,3),it.bind(void 0,1,0,1,1,0),it.bind(void 0,1,0,1,1,1),it.bind(void 0,1,0,1,1,2),it.bind(void 0,1,0,1,1,3),it.bind(void 0,1,1,0,0,0),it.bind(void 0,1,1,0,0,1),it.bind(void 0,1,1,0,0,2),it.bind(void 0,1,1,0,0,3),it.bind(void 0,1,1,0,1,0),it.bind(void 0,1,1,0,1,1),it.bind(void 0,1,1,0,1,2),it.bind(void 0,1,1,0,1,3),it.bind(void 0,1,1,1,0,0),it.bind(void 0,1,1,1,0,1),it.bind(void 0,1,1,1,0,2),it.bind(void 0,1,1,1,0,3),it.bind(void 0,1,1,1,1,0),it.bind(void 0,1,1,1,1,1),it.bind(void 0,1,1,1,1,2),it.bind(void 0,1,1,1,1,3)];function Fa(e){this.char=e,this.state={},this.activeState=null}function Qh(e,t,n){this.contextName=n,this.startIndex=e,this.endOffset=t}function V4(e,t,n){this.contextName=e,this.openRange=null,this.ranges=[],this.checkStart=t,this.checkEnd=n}function Rn(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 Sl(e){this.eventId=e,this.subscribers=[]}function z4(e){var t=this,n=["start","end","next","newToken","contextStart","contextEnd","insertToken","removeToken","removeRange","replaceToken","replaceRange","composeRUD","updateContextsRanges"];n.forEach(function(i){Object.defineProperty(t.events,i,{value:new Sl(i)})}),e&&n.forEach(function(i){var a=e[i];typeof a=="function"&&t.events[i].subscribe(a)});var r=["insertToken","removeToken","removeRange","replaceToken","replaceRange","composeRUD"];r.forEach(function(i){t.events[i].subscribe(t.updateContextsRanges)})}function ce(e){this.tokens=[],this.registeredContexts={},this.contextCheckers=[],this.events={},this.registeredModifiers=[],z4.call(this,e)}Fa.prototype.setState=function(e,t){return this.state[e]=t,this.activeState={key:e,value:this.state[e]},this.activeState},Fa.prototype.getState=function(e){return this.state[e]||null},ce.prototype.inboundIndex=function(e){return e>=0&&e<this.tokens.length},ce.prototype.composeRUD=function(e){var t=this,n=!0,r=e.map(function(a){return t[a[0]].apply(t,a.slice(1).concat(n))}),i=function(a){return typeof a=="object"&&a.hasOwnProperty("FAIL")};if(r.every(i))return{FAIL:"composeRUD: one or more operations hasn't completed successfully",report:r.filter(i)};this.dispatch("composeRUD",[r.filter(function(a){return!i(a)})])},ce.prototype.replaceRange=function(e,t,n,r){t=t!==null?t:this.tokens.length;var i=n.every(function(s){return s instanceof Fa});if(!isNaN(e)&&this.inboundIndex(e)&&i){var a=this.tokens.splice.apply(this.tokens,[e,t].concat(n));return r||this.dispatch("replaceToken",[e,t,n]),[a,n]}else return{FAIL:"replaceRange: invalid tokens or startIndex."}},ce.prototype.replaceToken=function(e,t,n){if(!isNaN(e)&&this.inboundIndex(e)&&t instanceof Fa){var r=this.tokens.splice(e,1,t);return n||this.dispatch("replaceToken",[e,t]),[r[0],t]}else return{FAIL:"replaceToken: invalid token or index."}},ce.prototype.removeRange=function(e,t,n){t=isNaN(t)?this.tokens.length:t;var r=this.tokens.splice(e,t);return n||this.dispatch("removeRange",[r,e,t]),r},ce.prototype.removeToken=function(e,t){if(!isNaN(e)&&this.inboundIndex(e)){var n=this.tokens.splice(e,1);return t||this.dispatch("removeToken",[n,e]),n}else return{FAIL:"removeToken: invalid token index."}},ce.prototype.insertToken=function(e,t,n){var r=e.every(function(i){return i instanceof Fa});return r?(this.tokens.splice.apply(this.tokens,[t,0].concat(e)),n||this.dispatch("insertToken",[e,t]),e):{FAIL:"insertToken: invalid token(s)."}},ce.prototype.registerModifier=function(e,t,n){this.events.newToken.subscribe(function(r,i){var a=[r,i],s=t===null||t.apply(this,a)===!0,o=[r,i];if(s){var c=n.apply(this,o);r.setState(e,c)}}),this.registeredModifiers.push(e)},Sl.prototype.subscribe=function(e){return typeof e=="function"?this.subscribers.push(e)-1:{FAIL:"invalid '"+this.eventId+"' event handler"}},Sl.prototype.unsubscribe=function(e){this.subscribers.splice(e,1)},Rn.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)},Rn.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}},ce.prototype.rangeToText=function(e){if(e instanceof Qh)return this.getRangeTokens(e).map(function(t){return t.char}).join("")},ce.prototype.getText=function(){return this.tokens.map(function(e){return e.char}).join("")},ce.prototype.getContext=function(e){var t=this.registeredContexts[e];return t||null},ce.prototype.on=function(e,t){var n=this.events[e];return n?n.subscribe(t):null},ce.prototype.dispatch=function(e,t){var n=this,r=this.events[e];r instanceof Sl&&r.subscribers.forEach(function(i){i.apply(n,t||[])})},ce.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."};var r=new V4(e,t,n);return this.registeredContexts[e]=r,this.contextCheckers.push(r),r},ce.prototype.getRangeTokens=function(e){var t=e.startIndex+e.endOffset;return[].concat(this.tokens.slice(e.startIndex,t))},ce.prototype.getContextRanges=function(e){var t=this.getContext(e);return t?t.ranges:{FAIL:"context checker '"+e+"' is not registered."}},ce.prototype.resetContextsRanges=function(){var e=this.registeredContexts;for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];n.ranges=[]}},ce.prototype.updateContextsRanges=function(){this.resetContextsRanges();for(var e=this.tokens.map(function(r){return r.char}),t=0;t<e.length;t++){var n=new Rn(e,t);this.runContextCheck(n)}this.dispatch("updateContextsRanges",[this.registeredContexts])},ce.prototype.setEndOffset=function(e,t){var n=this.getContext(t).openRange.startIndex,r=new Qh(n,e,t),i=this.getContext(t).ranges;return r.rangeId=t+"."+i.length,i.push(r),this.getContext(t).openRange=null,r},ce.prototype.runContextCheck=function(e){var t=this,n=e.index;this.contextCheckers.forEach(function(r){var i=r.contextName,a=t.getContext(i).openRange;if(!a&&r.checkStart(e)&&(a=new Qh(n,null,i),t.getContext(i).openRange=a,t.dispatch("contextStart",[i,n])),a&&r.checkEnd(e)){var s=n-a.startIndex+1,o=t.setEndOffset(s,i);t.dispatch("contextEnd",[i,o])}})},ce.prototype.tokenize=function(e){this.tokens=[],this.resetContextsRanges();var t=Array.from(e);this.dispatch("start");for(var n=0;n<t.length;n++){var r=t[n],i=new Rn(t,n);this.dispatch("next",[i]),this.runContextCheck(i);var a=new Fa(r);this.tokens.push(a),this.dispatch("newToken",[a,i])}return this.dispatch("end",[this.tokens]),this.tokens};function qr(e){return/[\u0600-\u065F\u066A-\u06D2\u06FA-\u06FF]/.test(e)}function um(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 Zr(e){return/[\u0600-\u0605\u060C-\u060E\u0610-\u061B\u061E\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED]/.test(e)}function Dl(e){return/[A-z]/.test(e)}function J4(e){return/\s/.test(e)}function yn(e){this.font=e,this.features={}}function Qi(e){this.id=e.id,this.tag=e.tag,this.substitution=e.substitution}function Ks(e,t){if(!e)return-1;switch(t.format){case 1:return t.glyphs.indexOf(e);case 2:for(var n=t.ranges,r=0;r<n.length;r++){var i=n[r];if(e>=i.start&&e<=i.end){var a=e-i.start;return i.index+a}}break;default:return-1}return-1}function j4(e,t){var n=Ks(e,t.coverage);return n===-1?null:e+t.deltaGlyphId}function W4(e,t){var n=Ks(e,t.coverage);return n===-1?null:t.substitute[n]}function Mh(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r],a=t.current;a=Array.isArray(a)?a[0]:a;var s=Ks(a,i);s!==-1&&n.push(s)}return n.length!==e.length?-1:n}function K4(e,t){var n=t.inputCoverage.length+t.lookaheadCoverage.length+t.backtrackCoverage.length;if(e.context.length<n)return[];var r=Mh(t.inputCoverage,e);if(r===-1)return[];var i=t.inputCoverage.length-1;if(e.lookahead.length<t.lookaheadCoverage.length)return[];for(var a=e.lookahead.slice(i);a.length&&Zr(a[0].char);)a.shift();var s=new Rn(a,0),o=Mh(t.lookaheadCoverage,s),c=[].concat(e.backtrack);for(c.reverse();c.length&&Zr(c[0].char);)c.shift();if(c.length<t.backtrackCoverage.length)return[];var l=new Rn(c,0),u=Mh(t.backtrackCoverage,l),A=r.length===t.inputCoverage.length&&o.length===t.lookaheadCoverage.length&&u.length===t.backtrackCoverage.length,h=[];if(A)for(var f=0;f<t.lookupRecords.length;f++)for(var d=t.lookupRecords[f],p=d.lookupListIndex,m=this.getLookupByIndex(p),y=0;y<m.subtables.length;y++){var v=m.subtables[y],w=this.getLookupMethod(m,v),B=this.getSubstitutionType(m,v);if(B==="12")for(var C=0;C<r.length;C++){var x=e.get(C),b=w(x);b&&h.push(b)}}return h}function X4(e,t){var n=e.current,r=Ks(n,t.coverage);if(r===-1)return null;for(var i,a=t.ligatureSets[r],s=0;s<a.length;s++){i=a[s];for(var o=0;o<i.components.length;o++){var c=e.lookahead[o],l=i.components[o];if(c!==l)break;if(o===i.components.length-1)return i}}return null}function _4(e,t){var n=Ks(e,t.coverage);return n===-1?null:t.sequences[n]}yn.prototype.getDefaultScriptFeaturesIndexes=function(){for(var e=this.font.tables.gsub.scripts,t=0;t<e.length;t++){var n=e[t];if(n.tag==="DFLT")return n.script.defaultLangSys.featureIndexes}return[]},yn.prototype.getScriptFeaturesIndexes=function(e){var t=this.font.tables;if(!t.gsub)return[];if(!e)return this.getDefaultScriptFeaturesIndexes();for(var n=this.font.tables.gsub.scripts,r=0;r<n.length;r++){var i=n[r];if(i.tag===e&&i.script.defaultLangSys)return i.script.defaultLangSys.featureIndexes;var a=i.langSysRecords;if(a)for(var s=0;s<a.length;s++){var o=a[s];if(o.tag===e){var c=o.langSys;return c.featureIndexes}}}return this.getDefaultScriptFeaturesIndexes()},yn.prototype.mapTagsToFeatures=function(e,t){for(var n={},r=0;r<e.length;r++){var i=e[r].tag,a=e[r].feature;n[i]=a}this.features[t].tags=n},yn.prototype.getScriptFeatures=function(e){var t=this.features[e];if(this.features.hasOwnProperty(e))return t;var n=this.getScriptFeaturesIndexes(e);if(!n)return null;var r=this.font.tables.gsub;return t=n.map(function(i){return r.features[i]}),this.features[e]=t,this.mapTagsToFeatures(t,e),t},yn.prototype.getSubstitutionType=function(e,t){var n=e.lookupType.toString(),r=t.substFormat.toString();return n+r},yn.prototype.getLookupMethod=function(e,t){var n=this,r=this.getSubstitutionType(e,t);switch(r){case"11":return function(i){return j4.apply(n,[i,t])};case"12":return function(i){return W4.apply(n,[i,t])};case"63":return function(i){return K4.apply(n,[i,t])};case"41":return function(i){return X4.apply(n,[i,t])};case"21":return function(i){return _4.apply(n,[i,t])};default:throw new Error("lookupType: "+e.lookupType+" - substFormat: "+t.substFormat+" is not yet supported")}},yn.prototype.lookupFeature=function(e){var t=e.contextParams,n=t.index,r=this.getFeature({tag:e.tag,script:e.script});if(!r)return new Error("font '"+this.font.names.fullName.en+"' doesn't support feature '"+e.tag+"' for script '"+e.script+"'.");for(var i=this.getFeatureLookups(r),a=[].concat(t.context),s=0;s<i.length;s++)for(var o=i[s],c=this.getLookupSubtables(o),l=0;l<c.length;l++){var u=c[l],A=this.getSubstitutionType(o,u),h=this.getLookupMethod(o,u),f=void 0;switch(A){case"11":f=h(t.current),f&&a.splice(n,1,new Qi({id:11,tag:e.tag,substitution:f}));break;case"12":f=h(t.current),f&&a.splice(n,1,new Qi({id:12,tag:e.tag,substitution:f}));break;case"63":f=h(t),Array.isArray(f)&&f.length&&a.splice(n,1,new Qi({id:63,tag:e.tag,substitution:f}));break;case"41":f=h(t),f&&a.splice(n,1,new Qi({id:41,tag:e.tag,substitution:f}));break;case"21":f=h(t.current),f&&a.splice(n,1,new Qi({id:21,tag:e.tag,substitution:f}));break}t=new Rn(a,n),!(Array.isArray(f)&&!f.length)&&(f=null)}return a.length?a:null},yn.prototype.supports=function(e){if(!e.script)return!1;this.getScriptFeatures(e.script);var t=this.features.hasOwnProperty(e.script);if(!e.tag)return t;var n=this.features[e.script].some(function(r){return r.tag===e.tag});return t&&n},yn.prototype.getLookupSubtables=function(e){return e.subtables||null},yn.prototype.getLookupByIndex=function(e){var t=this.font.tables.gsub.lookups;return t[e]||null},yn.prototype.getFeatureLookups=function(e){return e.lookupListIndexes.map(this.getLookupByIndex.bind(this))},yn.prototype.getFeature=function(e){if(!this.font)return{FAIL:"No font was found"};this.features.hasOwnProperty(e.script)||this.getScriptFeatures(e.script);var t=this.features[e.script];return t?t.tags[e.tag]?this.features[e.script].tags[e.tag]:null:{FAIL:"No feature for script "+e.script}};function q4(e){var t=e.current,n=e.get(-1);return n===null&&qr(t)||!qr(n)&&qr(t)}function Z4(e){var t=e.get(1);return t===null||!qr(t)}var $4={startCheck:q4,endCheck:Z4};function tI(e){var t=e.current,n=e.get(-1);return(qr(t)||Zr(t))&&!qr(n)}function eI(e){var t=e.get(1);switch(!0){case t===null:return!0;case(!qr(t)&&!Zr(t)):var n=J4(t);if(!n)return!0;if(n){var r=!1;if(r=e.lookahead.some(function(i){return qr(i)||Zr(i)}),!r)return!0}break;default:return!1}}var nI={startCheck:tI,endCheck:eI};function rI(e,t,n){t[n].setState(e.tag,e.substitution)}function iI(e,t,n){t[n].setState(e.tag,e.substitution)}function aI(e,t,n){e.substitution.forEach(function(r,i){var a=t[n+i];a.setState(e.tag,r)})}function sI(e,t,n){var r=t[n];r.setState(e.tag,e.substitution.ligGlyph);for(var i=e.substitution.components.length,a=0;a<i;a++)r=t[n+a+1],r.setState("deleted",!0)}var Am={11:rI,12:iI,63:aI,41:sI};function Th(e,t,n){e instanceof Qi&&Am[e.id]&&Am[e.id](e,t,n)}function oI(e){for(var t=[].concat(e.backtrack),n=t.length-1;n>=0;n--){var r=t[n],i=um(r),a=Zr(r);if(!i&&!a)return!0;if(i)return!1}return!1}function cI(e){if(um(e.current))return!1;for(var t=0;t<e.lookahead.length;t++){var n=e.lookahead[t],r=Zr(n);if(!r)return!0}return!1}function lI(e){var t=this,n="arab",r=this.featuresTags[n],i=this.tokenizer.getRangeTokens(e);if(i.length!==1){var a=new Rn(i.map(function(o){return o.getState("glyphIndex")}),0),s=new Rn(i.map(function(o){return o.char}),0);i.forEach(function(o,c){if(!Zr(o.char)){a.setCurrentIndex(c),s.setCurrentIndex(c);var l=0;oI(s)&&(l|=1),cI(s)&&(l|=2);var u;switch(l){case 1:u="fina";break;case 2:u="init";break;case 3:u="medi";break}if(r.indexOf(u)!==-1){var A=t.query.lookupFeature({tag:u,script:n,contextParams:a});if(A instanceof Error)return console.info(A.message);A.forEach(function(h,f){h instanceof Qi&&(Th(h,i,f),a.context[f]=h.substitution)})}}})}}function hm(e,t){var n=e.map(function(r){return r.activeState.value});return new Rn(n,t||0)}function uI(e){var t=this,n="arab",r=this.tokenizer.getRangeTokens(e),i=hm(r);i.context.forEach(function(a,s){i.setCurrentIndex(s);var o=t.query.lookupFeature({tag:"rlig",script:n,contextParams:i});o.length&&(o.forEach(function(c){return Th(c,r,s)}),i=hm(r))})}function AI(e){var t=e.current,n=e.get(-1);return n===null&&Dl(t)||!Dl(n)&&Dl(t)}function hI(e){var t=e.get(1);return t===null||!Dl(t)}var fI={startCheck:AI,endCheck:hI};function fm(e,t){var n=e.map(function(r){return r.activeState.value});return new Rn(n,t||0)}function gI(e){var t=this,n="latn",r=this.tokenizer.getRangeTokens(e),i=fm(r);i.context.forEach(function(a,s){i.setCurrentIndex(s);var o=t.query.lookupFeature({tag:"liga",script:n,contextParams:i});o.length&&(o.forEach(function(c){return Th(c,r,s)}),i=fm(r))})}function On(e){this.baseDir=e||"ltr",this.tokenizer=new ce,this.featuresTags={}}On.prototype.setText=function(e){this.text=e},On.prototype.contextChecks={latinWordCheck:fI,arabicWordCheck:$4,arabicSentenceCheck:nI};function Nh(e){var t=this.contextChecks[e+"Check"];return this.tokenizer.registerContextChecker(e,t.startCheck,t.endCheck)}function dI(){return Nh.call(this,"latinWord"),Nh.call(this,"arabicWord"),Nh.call(this,"arabicSentence"),this.tokenizer.tokenize(this.text)}function pI(){var e=this,t=this.tokenizer.getContextRanges("arabicSentence");t.forEach(function(n){var r=e.tokenizer.getRangeTokens(n);e.tokenizer.replaceRange(n.startIndex,n.endOffset,r.reverse())})}On.prototype.registerFeatures=function(e,t){var n=this,r=t.filter(function(i){return n.query.supports({script:e,tag:i})});this.featuresTags.hasOwnProperty(e)?this.featuresTags[e]=this.featuresTags[e].concat(r):this.featuresTags[e]=r},On.prototype.applyFeatures=function(e,t){if(!e)throw new Error("No valid font was provided to apply features");this.query||(this.query=new yn(e));for(var n=0;n<t.length;n++){var r=t[n];this.query.supports({script:r.script})&&this.registerFeatures(r.script,r.tags)}},On.prototype.registerModifier=function(e,t,n){this.tokenizer.registerModifier(e,t,n)};function Ph(){if(this.tokenizer.registeredModifiers.indexOf("glyphIndex")===-1)throw new Error("glyphIndex modifier is required to apply arabic presentation features.")}function mI(){var e=this,t="arab";if(this.featuresTags.hasOwnProperty(t)){Ph.call(this);var n=this.tokenizer.getContextRanges("arabicWord");n.forEach(function(r){lI.call(e,r)})}}function yI(){var e=this,t="arab";if(this.featuresTags.hasOwnProperty(t)){var n=this.featuresTags[t];if(n.indexOf("rlig")!==-1){Ph.call(this);var r=this.tokenizer.getContextRanges("arabicWord");r.forEach(function(i){uI.call(e,i)})}}}function wI(){var e=this,t="latn";if(this.featuresTags.hasOwnProperty(t)){var n=this.featuresTags[t];if(n.indexOf("liga")!==-1){Ph.call(this);var r=this.tokenizer.getContextRanges("latinWord");r.forEach(function(i){gI.call(e,i)})}}}On.prototype.checkContextReady=function(e){return!!this.tokenizer.getContext(e)},On.prototype.applyFeaturesToContexts=function(){this.checkContextReady("arabicWord")&&(mI.call(this),yI.call(this)),this.checkContextReady("latinWord")&&wI.call(this),this.checkContextReady("arabicSentence")&&pI.call(this)},On.prototype.processText=function(e){(!this.text||this.text!==e)&&(this.setText(e),dI.call(this),this.applyFeaturesToContexts())},On.prototype.getBidiText=function(e){return this.processText(e),this.tokenizer.getText()},On.prototype.getTextGlyphs=function(e){this.processText(e);for(var t=[],n=0;n<this.tokenizer.tokens.length;n++){var r=this.tokenizer.tokens[n];if(!r.state.deleted){var i=r.activeState.value;t.push(Array.isArray(i)?i[0]:i)}}return t};function Ot(e){e=e||{},e.tables=e.tables||{},e.empty||(zs(e.familyName,"When creating a new Font object, familyName is required."),zs(e.styleName,"When creating a new Font object, styleName is required."),zs(e.unitsPerEm,"When creating a new Font object, unitsPerEm is required."),zs(e.ascender,"When creating a new Font object, ascender is required."),zs(e.descender<=0,"When creating a new Font object, negative descender value is required."),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).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||" "}},this.unitsPerEm=e.unitsPerEm||1e3,this.ascender=e.ascender,this.descender=e.descender,this.createdTimestamp=e.createdTimestamp,this.tables=Object.assign(e.tables,{os2:Object.assign({usWeightClass:e.weightClass||this.usWeightClasses.MEDIUM,usWidthClass:e.widthClass||this.usWidthClasses.MEDIUM,fsSelection:e.fsSelection||this.fsSelectionValues.REGULAR},e.tables.os2)})),this.supported=!0,this.glyphs=new sr.GlyphSet(this,e.glyphs||[]),this.encoding=new e1(this),this.position=new Vs(this),this.substitution=new mn(this),this.tables=this.tables||{},this._push=null,this._hmtxTableData={},Object.defineProperty(this,"hinting",{get:function(){if(this._hinting)return this._hinting;if(this.outlinesFormat==="truetype")return this._hinting=new J1(this)}})}Ot.prototype.hasChar=function(e){return this.encoding.charToGlyphIndex(e)!==null},Ot.prototype.charToGlyphIndex=function(e){return this.encoding.charToGlyphIndex(e)},Ot.prototype.charToGlyph=function(e){var t=this.charToGlyphIndex(e),n=this.glyphs.get(t);return n||(n=this.glyphs.get(0)),n},Ot.prototype.updateFeatures=function(e){return this.defaultRenderOptions.features.map(function(t){return t.script==="latn"?{script:"latn",tags:t.tags.filter(function(n){return e[n]})}:t})},Ot.prototype.stringToGlyphs=function(e,t){var n=this,r=new On,i=function(A){return n.charToGlyphIndex(A.char)};r.registerModifier("glyphIndex",null,i);var a=t?this.updateFeatures(t.features):this.defaultRenderOptions.features;r.applyFeatures(this,a);for(var s=r.getTextGlyphs(e),o=s.length,c=new Array(o),l=this.glyphs.get(0),u=0;u<o;u+=1)c[u]=this.glyphs.get(s[u])||l;return c},Ot.prototype.nameToGlyphIndex=function(e){return this.glyphNames.nameToGlyphIndex(e)},Ot.prototype.nameToGlyph=function(e){var t=this.nameToGlyphIndex(e),n=this.glyphs.get(t);return n||(n=this.glyphs.get(0)),n},Ot.prototype.glyphIndexToName=function(e){return this.glyphNames.glyphIndexToName?this.glyphNames.glyphIndexToName(e):""},Ot.prototype.getKerningValue=function(e,t){e=e.index||e,t=t.index||t;var n=this.position.defaultKerningTables;return n?this.position.getKerningValue(n,e,t):this.kerningPairs[e+","+t]||0},Ot.prototype.defaultRenderOptions={kerning:!0,features:[{script:"arab",tags:["init","medi","fina","rlig"]},{script:"latn",tags:["liga","rlig"]}]},Ot.prototype.forEachGlyph=function(e,t,n,r,i,a){t=t!==void 0?t:0,n=n!==void 0?n:0,r=r!==void 0?r:72,i=Object.assign({},this.defaultRenderOptions,i);var s=1/this.unitsPerEm*r,o=this.stringToGlyphs(e,i),c;if(i.kerning){var l=i.script||this.position.getDefaultScriptName();c=this.position.getKerningTables(l,i.language)}for(var u=0;u<o.length;u+=1){var A=o[u];if(a.call(this,A,t,n,r,i),A.advanceWidth&&(t+=A.advanceWidth*s),i.kerning&&u<o.length-1){var h=c?this.position.getKerningValue(c,A.index,o[u+1].index):this.getKerningValue(A,o[u+1]);t+=h*s}i.letterSpacing?t+=i.letterSpacing*r:i.tracking&&(t+=i.tracking/1e3*r)}return t},Ot.prototype.getPath=function(e,t,n,r,i){var a=new ye;return this.forEachGlyph(e,t,n,r,i,function(s,o,c,l){var u=s.getPath(o,c,l,i,this);a.extend(u)}),a},Ot.prototype.getPaths=function(e,t,n,r,i){var a=[];return this.forEachGlyph(e,t,n,r,i,function(s,o,c,l){var u=s.getPath(o,c,l,i,this);a.push(u)}),a},Ot.prototype.getAdvanceWidth=function(e,t,n){return this.forEachGlyph(e,0,0,t,n,function(){})},Ot.prototype.draw=function(e,t,n,r,i,a){this.getPath(t,n,r,i,a).draw(e)},Ot.prototype.drawPoints=function(e,t,n,r,i,a){this.forEachGlyph(t,n,r,i,a,function(s,o,c,l){s.drawPoints(e,o,c,l)})},Ot.prototype.drawMetrics=function(e,t,n,r,i,a){this.forEachGlyph(t,n,r,i,a,function(s,o,c,l){s.drawMetrics(e,o,c,l)})},Ot.prototype.getEnglishName=function(e){var t=this.names[e];if(t)return t.en},Ot.prototype.validate=function(){var e=this;function t(n){var r=e.getEnglishName(n);r&&r.trim().length>0}t("fontFamily"),t("weightName"),t("manufacturer"),t("copyright"),t("version"),this.unitsPerEm>0},Ot.prototype.toTables=function(){return sD.fontToTable(this)},Ot.prototype.toBuffer=function(){return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."),this.toArrayBuffer()},Ot.prototype.toArrayBuffer=function(){for(var e=this.toTables(),t=e.encode(),n=new ArrayBuffer(t.length),r=new Uint8Array(n),i=0;i<t.length;i++)r[i]=t[i];return n},Ot.prototype.download=function(e){var t=this.getEnglishName("fontFamily"),n=this.getEnglishName("fontSubfamily");e=e||t.replace(/\s/g,"")+"-"+n+".otf";var r=this.toArrayBuffer();if(cD())if(window.URL=window.URL||window.webkitURL,window.URL){var i=new DataView(r),a=new Blob([i],{type:"font/opentype"}),s=document.createElement("a");s.href=window.URL.createObjectURL(a),s.download=e;var o=document.createEvent("MouseEvents");o.initEvent("click",!0,!1),s.dispatchEvent(o)}else console.warn("Font file could not be downloaded. Try using a different browser.");else{var c=require("fs"),l=lD(r);c.writeFileSync(e,l)}},Ot.prototype.fsSelectionValues={ITALIC:1,UNDERSCORE:2,NEGATIVE:4,OUTLINED:8,STRIKEOUT:16,BOLD:32,REGULAR:64,USER_TYPO_METRICS:128,WWS:256,OBLIQUE:512},Ot.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},Ot.prototype.usWeightClasses={THIN:100,EXTRA_LIGHT:200,LIGHT:300,NORMAL:400,MEDIUM:500,SEMI_BOLD:600,BOLD:700,EXTRA_BOLD:800,BLACK:900};function gm(e,t){var n=JSON.stringify(e),r=256;for(var i in t){var a=parseInt(i);if(!(!a||a<256)){if(JSON.stringify(t[i])===n)return a;r<=a&&(r=a+1)}}return t[r]=e,r}function vI(e,t,n){var r=gm(t.name,n);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:r}]}function EI(e,t,n){var r={},i=new rt.Parser(e,t);return r.tag=i.parseTag(),r.minValue=i.parseFixed(),r.defaultValue=i.parseFixed(),r.maxValue=i.parseFixed(),i.skip("uShort",1),r.name=n[i.parseUShort()]||{},r}function BI(e,t,n,r){for(var i=gm(t.name,r),a=[{name:"nameID_"+e,type:"USHORT",value:i},{name:"flags_"+e,type:"USHORT",value:0}],s=0;s<n.length;++s){var o=n[s].tag;a.push({name:"axis_"+e+" "+o,type:"FIXED",value:t.coordinates[o]<<16})}return a}function CI(e,t,n,r){var i={},a=new rt.Parser(e,t);i.name=r[a.parseUShort()]||{},a.skip("uShort",1),i.coordinates={};for(var s=0;s<n.length;++s)i.coordinates[n[s].tag]=a.parseFixed();return i}function xI(e,t){var n=new tt.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(var r=0;r<e.axes.length;r++)n.fields=n.fields.concat(vI(r,e.axes[r],t));for(var i=0;i<e.instances.length;i++)n.fields=n.fields.concat(BI(i,e.instances[i],e.axes,t));return n}function bI(e,t,n){var r=new rt.Parser(e,t),i=r.parseULong();ht.argument(i===65536,"Unsupported fvar table version.");var a=r.parseOffset16();r.skip("uShort",1);for(var s=r.parseUShort(),o=r.parseUShort(),c=r.parseUShort(),l=r.parseUShort(),u=[],A=0;A<s;A++)u.push(EI(e,t+a+A*o,n));for(var h=[],f=t+a+s*o,d=0;d<c;d++)h.push(CI(e,f+d*l,u,n));return{axes:u,instances:h}}var SI={make:xI,parse:bI},DI=function(){return{coverage:this.parsePointer(R.coverage),attachPoints:this.parseList(R.pointer(R.uShortList))}},II=function(){var e=this.parseUShort();if(ht.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()}},FI=function(){return this.parseList(R.pointer(II))},QI=function(){return{coverage:this.parsePointer(R.coverage),ligGlyphs:this.parseList(R.pointer(FI))}},MI=function(){return this.parseUShort(),this.parseList(R.pointer(R.coverage))};function TI(e,t){t=t||0;var n=new R(e,t),r=n.parseVersion(1);ht.argument(r===1||r===1.2||r===1.3,"Unsupported GDEF table version.");var i={version:r,classDef:n.parsePointer(R.classDef),attachList:n.parsePointer(DI),ligCaretList:n.parsePointer(QI),markAttachClassDef:n.parsePointer(R.classDef)};return r>=1.2&&(i.markGlyphSets=n.parsePointer(MI)),i}var NI={parse:TI},Un=new Array(10);Un[1]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{posFormat:1,coverage:this.parsePointer(R.coverage),value:this.parseValueRecord()};if(t===2)return{posFormat:2,coverage:this.parsePointer(R.coverage),values:this.parseValueRecordList()};ht.assert(!1,"0x"+e.toString(16)+": GPOS lookup type 1 format must be 1 or 2.")},Un[2]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();ht.assert(t===1||t===2,"0x"+e.toString(16)+": GPOS lookup type 2 format must be 1 or 2.");var n=this.parsePointer(R.coverage),r=this.parseUShort(),i=this.parseUShort();if(t===1)return{posFormat:t,coverage:n,valueFormat1:r,valueFormat2:i,pairSets:this.parseList(R.pointer(R.list(function(){return{secondGlyph:this.parseUShort(),value1:this.parseValueRecord(r),value2:this.parseValueRecord(i)}})))};if(t===2){var a=this.parsePointer(R.classDef),s=this.parsePointer(R.classDef),o=this.parseUShort(),c=this.parseUShort();return{posFormat:t,coverage:n,valueFormat1:r,valueFormat2:i,classDef1:a,classDef2:s,class1Count:o,class2Count:c,classRecords:this.parseList(o,R.list(c,function(){return{value1:this.parseValueRecord(r),value2:this.parseValueRecord(i)}}))}}},Un[3]=function(){return{error:"GPOS Lookup 3 not supported"}},Un[4]=function(){return{error:"GPOS Lookup 4 not supported"}},Un[5]=function(){return{error:"GPOS Lookup 5 not supported"}},Un[6]=function(){return{error:"GPOS Lookup 6 not supported"}},Un[7]=function(){return{error:"GPOS Lookup 7 not supported"}},Un[8]=function(){return{error:"GPOS Lookup 8 not supported"}},Un[9]=function(){return{error:"GPOS Lookup 9 not supported"}};function PI(e,t){t=t||0;var n=new R(e,t),r=n.parseVersion(1);return ht.argument(r===1||r===1.1,"Unsupported GPOS table version "+r),r===1?{version:r,scripts:n.parseScriptList(),features:n.parseFeatureList(),lookups:n.parseLookupList(Un)}:{version:r,scripts:n.parseScriptList(),features:n.parseFeatureList(),lookups:n.parseLookupList(Un),variations:n.parseFeatureVariationsList()}}var kI=new Array(10);function RI(e){return new tt.Table("GPOS",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new tt.ScriptList(e.scripts)},{name:"features",type:"TABLE",value:new tt.FeatureList(e.features)},{name:"lookups",type:"TABLE",value:new tt.LookupList(e.lookups,kI)}])}var OI={parse:PI,make:RI};function UI(e){var t={};e.skip("uShort");var n=e.parseUShort();ht.argument(n===0,"Unsupported kern sub-table version."),e.skip("uShort",2);var r=e.parseUShort();e.skip("uShort",3);for(var i=0;i<r;i+=1){var a=e.parseUShort(),s=e.parseUShort(),o=e.parseShort();t[a+","+s]=o}return t}function LI(e){var t={};e.skip("uShort");var n=e.parseULong();n>1&&console.warn("Only the first kern subtable is supported."),e.skip("uLong");var r=e.parseUShort(),i=r&255;if(e.skip("uShort"),i===0){var a=e.parseUShort();e.skip("uShort",3);for(var s=0;s<a;s+=1){var o=e.parseUShort(),c=e.parseUShort(),l=e.parseShort();t[o+","+c]=l}}return t}function YI(e,t){var n=new rt.Parser(e,t),r=n.parseUShort();if(r===0)return UI(n);if(r===1)return LI(n);throw new Error("Unsupported kern table version ("+r+").")}var HI={parse:YI};function GI(e,t,n,r){for(var i=new rt.Parser(e,t),a=r?i.parseUShort:i.parseULong,s=[],o=0;o<n+1;o+=1){var c=a.call(i);r&&(c*=2),s.push(c)}return s}var VI={parse:GI};function zI(e,t){var n=require("fs");n.readFile(e,function(r,i){if(r)return t(r.message);t(null,O1(i))})}function JI(e,t){var n=new XMLHttpRequest;n.open("get",e,!0),n.responseType="arraybuffer",n.onload=function(){return n.response?t(null,n.response):t("Font could not be loaded: "+n.statusText)},n.onerror=function(){t("Font could not be loaded")},n.send()}function dm(e,t){for(var n=[],r=12,i=0;i<t;i+=1){var a=rt.getTag(e,r),s=rt.getULong(e,r+4),o=rt.getULong(e,r+8),c=rt.getULong(e,r+12);n.push({tag:a,checksum:s,offset:o,length:c,compression:!1}),r+=16}return n}function jI(e,t){for(var n=[],r=44,i=0;i<t;i+=1){var a=rt.getTag(e,r),s=rt.getULong(e,r+4),o=rt.getULong(e,r+8),c=rt.getULong(e,r+12),l=void 0;o<c?l="WOFF":l=!1,n.push({tag:a,offset:s,compression:l,compressedLength:o,length:c}),r+=20}return n}function he(e,t){if(t.compression==="WOFF"){var n=new Uint8Array(e.buffer,t.offset+2,t.compressedLength-2),r=new Uint8Array(t.length);if(Ob(n,r),r.byteLength!==t.length)throw new Error("Decompression error: "+t.tag+" decompressed length doesn't match recorded length");var i=new DataView(r.buffer,0);return{data:i,offset:0}}else return{data:e,offset:t.offset}}function kh(e,t){t=t??{};var n,r,i=new Ot({empty:!0}),a=new DataView(e,0),s,o=[],c=rt.getTag(a,0);if(c===String.fromCharCode(0,1,0,0)||c==="true"||c==="typ1")i.outlinesFormat="truetype",s=rt.getUShort(a,4),o=dm(a,s);else if(c==="OTTO")i.outlinesFormat="cff",s=rt.getUShort(a,4),o=dm(a,s);else if(c==="wOFF"){var l=rt.getTag(a,4);if(l===String.fromCharCode(0,1,0,0))i.outlinesFormat="truetype";else if(l==="OTTO")i.outlinesFormat="cff";else throw new Error("Unsupported OpenType flavor "+c);s=rt.getUShort(a,12),o=jI(a,s)}else throw new Error("Unsupported OpenType signature "+c);for(var u,A,h,f,d,p,m,y,v,w,B,C,x=0;x<s;x+=1){var b=o[x],D=void 0;switch(b.tag){case"cmap":D=he(a,b),i.tables.cmap=t1.parse(D.data,D.offset),i.encoding=new n1(i.tables.cmap);break;case"cvt ":D=he(a,b),C=new rt.Parser(D.data,D.offset),i.tables.cvt=C.parseShortList(b.length/2);break;case"fvar":A=b;break;case"fpgm":D=he(a,b),C=new rt.Parser(D.data,D.offset),i.tables.fpgm=C.parseByteList(b.length);break;case"head":D=he(a,b),i.tables.head=p1.parse(D.data,D.offset),i.unitsPerEm=i.tables.head.unitsPerEm,n=i.tables.head.indexToLocFormat;break;case"hhea":D=he(a,b),i.tables.hhea=m1.parse(D.data,D.offset),i.ascender=i.tables.hhea.ascender,i.descender=i.tables.hhea.descender,i.numberOfHMetrics=i.tables.hhea.numberOfHMetrics;break;case"hmtx":m=b;break;case"ltag":D=he(a,b),r=w1.parse(D.data,D.offset);break;case"maxp":D=he(a,b),i.tables.maxp=v1.parse(D.data,D.offset),i.numGlyphs=i.tables.maxp.numGlyphs;break;case"name":w=b;break;case"OS/2":D=he(a,b),i.tables.os2=Eh.parse(D.data,D.offset);break;case"post":D=he(a,b),i.tables.post=I1.parse(D.data,D.offset),i.glyphNames=new dh(i.tables.post);break;case"prep":D=he(a,b),C=new rt.Parser(D.data,D.offset),i.tables.prep=C.parseByteList(b.length);break;case"glyf":h=b;break;case"loca":v=b;break;case"CFF ":u=b;break;case"kern":y=b;break;case"GDEF":f=b;break;case"GPOS":d=b;break;case"GSUB":p=b;break;case"meta":B=b;break}}var N=he(a,w);if(i.tables.name=D1.parse(N.data,N.offset,r),i.names=i.tables.name,h&&v){var P=n===0,U=he(a,v),L=VI.parse(U.data,U.offset,i.numGlyphs,P),V=he(a,h);i.glyphs=G1.parse(V.data,V.offset,L,i,t)}else if(u){var W=he(a,u);d1.parse(W.data,W.offset,i,t)}else throw new Error("Font doesn't contain TrueType or CFF outlines.");var J=he(a,m);if(y1.parse(i,J.data,J.offset,i.numberOfHMetrics,i.numGlyphs,i.glyphs,t),iS(i,t),y){var Z=he(a,y);i.kerningPairs=HI.parse(Z.data,Z.offset)}else i.kerningPairs={};if(f){var et=he(a,f);i.tables.gdef=NI.parse(et.data,et.offset)}if(d){var ct=he(a,d);i.tables.gpos=OI.parse(ct.data,ct.offset),i.position.init()}if(p){var O=he(a,p);i.tables.gsub=F1.parse(O.data,O.offset)}if(A){var M=he(a,A);i.tables.fvar=SI.parse(M.data,M.offset,i.names)}if(B){var z=he(a,B);i.tables.meta=Q1.parse(z.data,z.offset),i.metas=i.tables.meta}return i}function WI(e,t,n){n=n??{};var r=typeof window>"u",i=r&&!n.isUrl?zI:JI;return new Promise(function(a,s){i(e,function(o,c){if(o){if(t)return t(o);s(o)}var l;try{l=kh(c,n)}catch(u){if(t)return t(u,null);s(u)}if(t)return t(null,l);a(l)})})}function KI(e,t){var n=require("fs"),r=n.readFileSync(e);return kh(O1(r),t)}var XI=Object.freeze({__proto__:null,Font:Ot,Glyph:pn,Path:ye,BoundingBox:mr,_parse:rt,parse:kh,load:WI,loadSync:KI}),pm=/[\s\n\\/='"\0<>]/,mm=/^(xlink|xmlns|xml)(:|[A-Z])/,_I=/^accessK|^auto[A-Z]|^ch|^col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|readO|rowS|spellC|src[A-Z]|tabI|item[A-Z]/,qI=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,ZI=/["&<]/;function Il(e){if(e.length===0||ZI.test(e)===!1)return e;for(var t=0,n=0,r="",i="";n<e.length;n++){switch(e.charCodeAt(n)){case 34:i=""";break;case 38:i="&";break;case 60:i="<";break;default:continue}n!==t&&(r+=e.slice(t,n)),r+=i,t=n+1}return n!==t&&(r+=e.slice(t,n)),r}var ym={},$I=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),tF=/[A-Z]/g;function eF(e){var t="";for(var n in e){var r=e[n];if(r!=null&&r!==""){var i=n[0]=="-"?n:ym[n]||(ym[n]=n.replace(tF,"-$&").toLowerCase()),a=";";typeof r!="number"||i.startsWith("--")||$I.has(i)||(a="px;"),t=t+i+":"+r+a}}return t||void 0}var Rh,Mi,Xs,Ti,wm=[],nF=Array.isArray,Oh=Object.assign;function rF(e,t){var n=$.__s;$.__s=!0,Rh=$.__b,Mi=$.diffed,Xs=$.__r,Ti=$.unmount;var r=nr(ze,null);r.__k=[e];try{return Qa(e,t||Em,!1,void 0,r)}finally{$.__c&&$.__c(e,wm),$.__s=n,wm.length=0}}function vm(){this.__d=!0}var Em={};function Bm(e,t){var n,r=e.type,i=!0;return e.__c?(i=!1,(n=e.__c).state=n.__s):n=new r(e.props,t),e.__c=n,n.__v=e,n.props=e.props,n.context=t,n.__d=!0,n.state==null&&(n.state=Em),n.__s==null&&(n.__s=n.state),r.getDerivedStateFromProps?n.state=Oh({},n.state,r.getDerivedStateFromProps(n.props,n.state)):i&&n.componentWillMount?(n.componentWillMount(),n.state=n.__s!==n.state?n.__s:n.state):!i&&n.componentWillUpdate&&n.componentWillUpdate(),Xs&&Xs(e),n.render(n.props,n.state,t)}function Qa(e,t,n,r,i){if(e==null||e===!0||e===!1||e==="")return"";if(typeof e!="object")return typeof e=="function"?"":Il(e+"");if(nF(e)){var a="";i.__k=e;for(var s=0;s<e.length;s++){var o=e[s];o!=null&&typeof o!="boolean"&&(a+=Qa(o,t,n,r,i))}return a}if(e.constructor!==void 0)return"";e.__=i,Rh&&Rh(e);var c,l,u,A=e.type,h=e.props,f=t;if(typeof A=="function"){if(A===ze){if(h.UNSTABLE_comment)return"<!--"+Il(h.UNSTABLE_comment||"")+"-->";l=h.children}else{if((c=A.contextType)!=null){var d=t[c.__c];f=d?d.props.value:c.__}if(A.prototype&&typeof A.prototype.render=="function")l=Bm(e,f),u=e.__c;else{e.__c=u={__v:e,props:h,context:f,setState:vm,forceUpdate:vm,__d:!0,__h:[]};for(var p=0;u.__d&&p++<25;)u.__d=!1,Xs&&Xs(e),l=A.call(u,h,f);u.__d=!0}if(u.getChildContext!=null&&(t=Oh({},t,u.getChildContext())),(A.getDerivedStateFromError||u.componentDidCatch)&&$.errorBoundaries){var m="";l=l!=null&&l.type===ze&&l.key==null?l.props.children:l;try{return m=Qa(l,t,n,r,e)}catch(b){return A.getDerivedStateFromError&&(u.__s=A.getDerivedStateFromError(b)),u.componentDidCatch&&u.componentDidCatch(b,{}),u.__d&&(l=Bm(e,t),(u=e.__c).getChildContext!=null&&(t=Oh({},t,u.getChildContext())),m=Qa(l=l!=null&&l.type===ze&&l.key==null?l.props.children:l,t,n,r,e)),m}finally{Mi&&Mi(e),e.__=void 0,Ti&&Ti(e)}}}var y=Qa(l=l!=null&&l.type===ze&&l.key==null?l.props.children:l,t,n,r,e);return Mi&&Mi(e),e.__=void 0,Ti&&Ti(e),y}var v,w="<"+A,B="";for(var C in h){var x=h[C];switch(C){case"children":v=x;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in h)continue;C="for";break;case"className":if("class"in h)continue;C="class";break;case"defaultChecked":C="checked";break;case"defaultSelected":C="selected";break;case"defaultValue":case"value":switch(C="value",A){case"textarea":v=x;continue;case"select":r=x;continue;case"option":r!=x||"selected"in h||(w+=" selected")}break;case"dangerouslySetInnerHTML":B=x&&x.__html;continue;case"style":typeof x=="object"&&(x=eF(x));break;case"acceptCharset":C="accept-charset";break;case"httpEquiv":C="http-equiv";break;default:if(mm.test(C))C=C.replace(mm,"$1:$2").toLowerCase();else{if(pm.test(C))continue;C[4]!=="-"&&C!=="draggable"||x==null?n?qI.test(C)&&(C=C==="panose1"?"panose-1":C.replace(/([A-Z])/g,"-$1").toLowerCase()):_I.test(C)&&(C=C.toLowerCase()):x+=""}}x!=null&&x!==!1&&typeof x!="function"&&(w=x===!0||x===""?w+" "+C:w+" "+C+'="'+Il(x+"")+'"')}if(pm.test(A))throw new Error(A+" is not a valid HTML tag name in "+w+">");return B||(typeof v=="string"?B=Il(v):v!=null&&v!==!1&&v!==!0&&(B=Qa(v,t,A==="svg"||A!=="foreignObject"&&n,r,e))),Mi&&Mi(e),e.__=void 0,Ti&&Ti(e),!B&&iF.has(A)?w+"/>":w+">"+B+"</"+A+">"}var iF=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),aF=rF;let Uh,Lh;const Cm=new Map,sF=async e=>{const t=Cm.get(e);if(t)return t;const n=(await Ma(e)).blob();return Cm.set(e,n),n};function oF(e){Uh=e}function cF(e){Lh=e}function Fl(){if(!Uh)throw new Error("DOM constructor is not registered. Please register it before calling this function.");return new Uh}function Ma(e,t){if(!Lh){if(typeof window<"u"&&window.fetch)return window.fetch(e,t);if(typeof global<"u"&&global.fetch)return global.fetch(e,t);throw new Error("Fetch implementation is not registered. Please register it before calling this function.")}return Lh(e,t)}const _s=e=>e.every(t=>t!=="undefined"),Ql=e=>_s([typeof document])?document.createElement(e):Fl().window.document.createElement(e),lF=(e,t)=>{if(_s([typeof document]))return document.createElementNS(e,t);const n=Fl().window.document.createElement(t);return n.setAttribute("xmlns",e),n},$r=()=>{if(_s([typeof DOMParser]))return new DOMParser;const e=Fl();return new e.window.DOMParser},Ml=e=>new Promise((t,n)=>{Ma(e).then(r=>{t(r.arrayBuffer())}).catch(r=>{n(r)})}),Ln=e=>new Promise((t,n)=>{Ma(e).then(r=>{t(r.text())}).catch(n)}),xm=e=>aF(e),bm=async(e,t)=>{if(_s([typeof FontFace])){const n=e.names.fullName.en,r=new FontFace(n,`url(${t})`);return document.fonts.add(r),r.load()}},Tl=()=>{if(_s([typeof XMLSerializer]))return new XMLSerializer;const e=Fl();return new e.window.XMLSerializer},Sm=e=>btoa(e),Yh=e=>{function t(){const r=new Uint8Array(e),i=4;if(r.length>=i){let a=new Array(i);for(let s=0;s<i;s++)a[s]=new Uint8Array(e)[s].toString(16);switch(a.join("").toUpperCase()){case"89504E47":return"image/png";case"47494638":return"image/gif";case"25504446":return"application/pdf";case"FFD8FFDB":case"FFD8FFE0":return"image/jpeg";case"504B0304":return"application/zip";default:return null}}return null}return t()||"image/svg+xml"},Dm=async e=>{const t=await sF(e);return await AF(t)},Im=async e=>{const t=await Yh(e),n=new Uint8Array(e),r=String.fromCharCode.apply(null,Array.from(n)),i=btoa(r);return`data:${t};base64,${i}`},uF=e=>{const t=e.replace(/\r?\n/g,""),n=t.indexOf(",");if(n===-1||n<=4)throw new TypeError("malformed data: URI");const r=t.substring(5,n).split(";");let i=!1;for(let s=1;s<r.length;s++)r[s]==="base64"&&(i=!0);const a=decodeURI(t.substring(n+1));return i?new Uint8Array(atob(a).split("").map(s=>s.charCodeAt(0))).buffer:new Uint8Array(a.split("").map(s=>s.charCodeAt(0))).buffer},AF=e=>new Promise((t,n)=>{const r=new FileReader;r.onload=function(i){const a=i.target;!a||!a.result?n():t(a.result.toString())},r.readAsDataURL(e)}),Fm=new Map;class hF{constructor(t){this.font=t,this.glyphsFromText=new Map,this.kerningValues=new Map,this.height=this.calculateApproximateHeight()}getFont(){return this.font}getGlyphs(t){const n=this.glyphsFromText.get(t);if(n)return n;const r=this.font.stringToGlyphs(t);return this.glyphsFromText.set(t,r),r}getApproximateHeight(){return this.height}getExactHeight(t){const n=this.font.stringToGlyphs(t);let r=0,i=0;return n.forEach(a=>{const s=a.getMetrics();r=Math.max(r,s.yMax),i=Math.min(i,s.yMin)}),r-i}getKerningValue(t,n){if(!t.name||!n.name)return;let r=this.kerningValues.get(t.name);r||(r=new Map,this.kerningValues.set(t.name,r));let i=r.get(n.name);return i||(i=this.font.getKerningValue(t,n),r.set(n.name,i)),i}calculateApproximateHeight(){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=this.font.stringToGlyphs(t);let r=0,i=0;return n.forEach(a=>{const s=a.getMetrics();r=Math.max(r,s.yMax),i=Math.min(i,s.yMin)}),r-i}}const fF=e=>e.substring(0,5).toLowerCase().trim()==="data:",Ni=async e=>{try{return ti(e).getFont()}catch{const t=fF(e)?Pi(e):Pi(await Dm(e));return Qm(e,t),await bm(t,e),t}},Pi=e=>{try{return ti(e).getFont()}catch{const t=uF(e),n=XI.parse(t);return Qm(e,n),n}},ti=e=>{const t=Fm.get(e);if(t)return t;throw new Error("Font metrics unavailable for font")},Qm=(e,t)=>{const n=new hF(t);return Fm.set(e,n),n},Nl=(e,t,n,r)=>Math.max(mF(e.join(`
|
|
68
|
+
`,children:[ut("path",{filter:o?`url(#${n})`:void 0,mask:o?`url(#${r})`:void 0,d:e.path,style:{fill:`url(#${t})`,opacity:e.opacity}}),o?ut("path",{mask:`url(#${i})`,d:e.path,style:{fill:`url(#${t})`,opacity:e.opacity}}):void 0]})})]})},Fb=e=>{const{path:t,width:n,height:r,focalBlurStrength:i,focalBlurRadius:a,blurFilterId:s,focalMaskId:o,blurEdgeClipId:c}=e;return ut(ze,{children:[ut("filter",{id:s,children:ut("feGaussianBlur",{stdDeviation:i||0})}),ut("mask",{id:o,children:ut("circle",{cx:n/2,cy:r/2,r:a||0,fill:"white",filter:`url(#${s})`})}),ut("mask",{id:c,children:ut("path",{d:t,style:{fill:"white",opacity:1}})})]})};/*! https://mths.be/codepointat v0.2.0 by @mathias */String.prototype.codePointAt||function(){var e=function(){try{var n={},r=Object.defineProperty,i=r(n,n,n)&&r}catch{}return i}(),t=function(n){if(this==null)throw TypeError();var r=String(this),i=r.length,a=n?Number(n):0;if(a!=a&&(a=0),!(a<0||a>=i)){var s=r.charCodeAt(a),o;return s>=55296&&s<=56319&&i>a+1&&(o=r.charCodeAt(a+1),o>=56320&&o<=57343)?(s-55296)*1024+o-56320+65536:s}};e?e(String.prototype,"codePointAt",{value:t,configurable:!0,writable:!0}):String.prototype.codePointAt=t}();var sh=0,Up=-3;function Us(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function Qb(e,t){this.source=e,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=t,this.destLen=0,this.ltree=new Us,this.dtree=new Us}var Lp=new Us,Yp=new Us,oh=new Uint8Array(30),ch=new Uint16Array(30),Hp=new Uint8Array(30),Gp=new Uint16Array(30),Mb=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Vp=new Us,ir=new Uint8Array(288+32);function zp(e,t,n,r){var i,a;for(i=0;i<n;++i)e[i]=0;for(i=0;i<30-n;++i)e[i+n]=i/n|0;for(a=r,i=0;i<30;++i)t[i]=a,a+=1<<e[i]}function Tb(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[24+144+n]=280+n;for(n=0;n<112;++n)e.trans[24+144+8+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 Jp=new Uint16Array(16);function lh(e,t,n,r){var i,a;for(i=0;i<16;++i)e.table[i]=0;for(i=0;i<r;++i)e.table[t[n+i]]++;for(e.table[0]=0,a=0,i=0;i<16;++i)Jp[i]=a,a+=e.table[i];for(i=0;i<r;++i)t[n+i]&&(e.trans[Jp[t[n+i]]++]=i)}function Nb(e){e.bitcount--||(e.tag=e.source[e.sourceIndex++],e.bitcount=7);var t=e.tag&1;return e.tag>>>=1,t}function ar(e,t,n){if(!t)return n;for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var r=e.tag&65535>>>16-t;return e.tag>>>=t,e.bitcount-=t,r+n}function uh(e,t){for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var n=0,r=0,i=0,a=e.tag;do r=2*r+(a&1),a>>>=1,++i,n+=t.table[i],r-=t.table[i];while(r>=0);return e.tag=a,e.bitcount-=i,t.trans[n+r]}function Pb(e,t,n){var r,i,a,s,o,c;for(r=ar(e,5,257),i=ar(e,5,1),a=ar(e,4,4),s=0;s<19;++s)ir[s]=0;for(s=0;s<a;++s){var l=ar(e,3,0);ir[Mb[s]]=l}for(lh(Vp,ir,0,19),o=0;o<r+i;){var u=uh(e,Vp);switch(u){case 16:var A=ir[o-1];for(c=ar(e,2,3);c;--c)ir[o++]=A;break;case 17:for(c=ar(e,3,3);c;--c)ir[o++]=0;break;case 18:for(c=ar(e,7,11);c;--c)ir[o++]=0;break;default:ir[o++]=u;break}}lh(t,ir,0,r),lh(n,ir,r,i)}function jp(e,t,n){for(;;){var r=uh(e,t);if(r===256)return sh;if(r<256)e.dest[e.destLen++]=r;else{var i,a,s,o;for(r-=257,i=ar(e,oh[r],ch[r]),a=uh(e,n),s=e.destLen-ar(e,Hp[a],Gp[a]),o=s;o<s+i;++o)e.dest[e.destLen++]=e.dest[o]}}}function kb(e){for(var t,n,r;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 Up;for(e.sourceIndex+=4,r=t;r;--r)e.dest[e.destLen++]=e.source[e.sourceIndex++];return e.bitcount=0,sh}function Rb(e,t){var n=new Qb(e,t),r,i,a;do{switch(r=Nb(n),i=ar(n,2,0),i){case 0:a=kb(n);break;case 1:a=jp(n,Lp,Yp);break;case 2:Pb(n,n.ltree,n.dtree),a=jp(n,n.ltree,n.dtree);break;default:a=Up}if(a!==sh)throw new Error("Data error")}while(!r);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}Tb(Lp,Yp),zp(oh,ch,4,3),zp(Hp,Gp,2,1),oh[28]=0,ch[28]=258;var Ob=Rb;function ba(e,t,n,r,i){return Math.pow(1-i,3)*e+3*Math.pow(1-i,2)*i*t+3*(1-i)*Math.pow(i,2)*n+Math.pow(i,3)*r}function mr(){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN}mr.prototype.isEmpty=function(){return isNaN(this.x1)||isNaN(this.y1)||isNaN(this.x2)||isNaN(this.y2)},mr.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))},mr.prototype.addX=function(e){this.addPoint(e,null)},mr.prototype.addY=function(e){this.addPoint(null,e)},mr.prototype.addBezier=function(e,t,n,r,i,a,s,o){var c=[e,t],l=[n,r],u=[i,a],A=[s,o];this.addPoint(e,t),this.addPoint(s,o);for(var h=0;h<=1;h++){var f=6*c[h]-12*l[h]+6*u[h],d=-3*c[h]+9*l[h]-9*u[h]+3*A[h],p=3*l[h]-3*c[h];if(d===0){if(f===0)continue;var m=-p/f;0<m&&m<1&&(h===0&&this.addX(ba(c[h],l[h],u[h],A[h],m)),h===1&&this.addY(ba(c[h],l[h],u[h],A[h],m)));continue}var y=Math.pow(f,2)-4*p*d;if(!(y<0)){var v=(-f+Math.sqrt(y))/(2*d);0<v&&v<1&&(h===0&&this.addX(ba(c[h],l[h],u[h],A[h],v)),h===1&&this.addY(ba(c[h],l[h],u[h],A[h],v)));var w=(-f-Math.sqrt(y))/(2*d);0<w&&w<1&&(h===0&&this.addX(ba(c[h],l[h],u[h],A[h],w)),h===1&&this.addY(ba(c[h],l[h],u[h],A[h],w)))}}},mr.prototype.addQuad=function(e,t,n,r,i,a){var s=e+.6666666666666666*(n-e),o=t+2/3*(r-t),c=s+1/3*(i-e),l=o+1/3*(a-t);this.addBezier(e,t,s,o,c,l,i,a)};function ye(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}ye.prototype.moveTo=function(e,t){this.commands.push({type:"M",x:e,y:t})},ye.prototype.lineTo=function(e,t){this.commands.push({type:"L",x:e,y:t})},ye.prototype.curveTo=ye.prototype.bezierCurveTo=function(e,t,n,r,i,a){this.commands.push({type:"C",x1:e,y1:t,x2:n,y2:r,x:i,y:a})},ye.prototype.quadTo=ye.prototype.quadraticCurveTo=function(e,t,n,r){this.commands.push({type:"Q",x1:e,y1:t,x:n,y:r})},ye.prototype.close=ye.prototype.closePath=function(){this.commands.push({type:"Z"})},ye.prototype.extend=function(e){if(e.commands)e=e.commands;else if(e instanceof mr){var 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)},ye.prototype.getBoundingBox=function(){for(var e=new mr,t=0,n=0,r=0,i=0,a=0;a<this.commands.length;a++){var s=this.commands[a];switch(s.type){case"M":e.addPoint(s.x,s.y),t=r=s.x,n=i=s.y;break;case"L":e.addPoint(s.x,s.y),r=s.x,i=s.y;break;case"Q":e.addQuad(r,i,s.x1,s.y1,s.x,s.y),r=s.x,i=s.y;break;case"C":e.addBezier(r,i,s.x1,s.y1,s.x2,s.y2,s.x,s.y),r=s.x,i=s.y;break;case"Z":r=t,i=n;break;default:throw new Error("Unexpected path command "+s.type)}}return e.isEmpty()&&e.addPoint(0,0),e},ye.prototype.draw=function(e){e.beginPath();for(var t=0;t<this.commands.length;t+=1){var n=this.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())},ye.prototype.toPathData=function(e){e=e!==void 0?e:2;function t(s){return Math.round(s)===s?""+Math.round(s):s.toFixed(e)}function n(){for(var s=arguments,o="",c=0;c<arguments.length;c+=1){var l=s[c];l>=0&&c>0&&(o+=" "),o+=t(l)}return o}for(var r="",i=0;i<this.commands.length;i+=1){var a=this.commands[i];a.type==="M"?r+="M"+n(a.x,a.y):a.type==="L"?r+="L"+n(a.x,a.y):a.type==="C"?r+="C"+n(a.x1,a.y1,a.x2,a.y2,a.x,a.y):a.type==="Q"?r+="Q"+n(a.x1,a.y1,a.x,a.y):a.type==="Z"&&(r+="Z")}return r},ye.prototype.toSVG=function(e){var t='<path d="';return t+=this.toPathData(e),t+='"',this.fill&&this.fill!=="black"&&(this.fill===null?t+=' fill="none"':t+=' fill="'+this.fill+'"'),this.stroke&&(t+=' stroke="'+this.stroke+'" stroke-width="'+this.strokeWidth+'"'),t+="/>",t},ye.prototype.toDOMElement=function(e){var t=this.toPathData(e),n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d",t),n};function Wp(e){throw new Error(e)}function Kp(e,t){e||Wp(t)}var ht={fail:Wp,argument:Kp,assert:Kp},Xp=32768,_p=2147483648,Sa={},K={},mt={};function Pn(e){return function(){return e}}K.BYTE=function(e){return ht.argument(e>=0&&e<=255,"Byte value should be between 0 and 255."),[e]},mt.BYTE=Pn(1),K.CHAR=function(e){return[e.charCodeAt(0)]},mt.CHAR=Pn(1),K.CHARARRAY=function(e){typeof e>"u"&&(e="",console.warn("Undefined CHARARRAY encountered and treated as an empty string. This is probably caused by a missing glyph name."));for(var t=[],n=0;n<e.length;n+=1)t[n]=e.charCodeAt(n);return t},mt.CHARARRAY=function(e){return typeof e>"u"?0:e.length},K.USHORT=function(e){return[e>>8&255,e&255]},mt.USHORT=Pn(2),K.SHORT=function(e){return e>=Xp&&(e=-(2*Xp-e)),[e>>8&255,e&255]},mt.SHORT=Pn(2),K.UINT24=function(e){return[e>>16&255,e>>8&255,e&255]},mt.UINT24=Pn(3),K.ULONG=function(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]},mt.ULONG=Pn(4),K.LONG=function(e){return e>=_p&&(e=-(2*_p-e)),[e>>24&255,e>>16&255,e>>8&255,e&255]},mt.LONG=Pn(4),K.FIXED=K.ULONG,mt.FIXED=mt.ULONG,K.FWORD=K.SHORT,mt.FWORD=mt.SHORT,K.UFWORD=K.USHORT,mt.UFWORD=mt.USHORT,K.LONGDATETIME=function(e){return[0,0,0,0,e>>24&255,e>>16&255,e>>8&255,e&255]},mt.LONGDATETIME=Pn(8),K.TAG=function(e){return ht.argument(e.length===4,"Tag should be exactly 4 ASCII characters."),[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]},mt.TAG=Pn(4),K.Card8=K.BYTE,mt.Card8=mt.BYTE,K.Card16=K.USHORT,mt.Card16=mt.USHORT,K.OffSize=K.BYTE,mt.OffSize=mt.BYTE,K.SID=K.USHORT,mt.SID=mt.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)},mt.NUMBER=function(e){return K.NUMBER(e).length},K.NUMBER16=function(e){return[28,e>>8&255,e&255]},mt.NUMBER16=Pn(3),K.NUMBER32=function(e){return[29,e>>24&255,e>>16&255,e>>8&255,e&255]},mt.NUMBER32=Pn(5),K.REAL=function(e){var t=e.toString(),n=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(t);if(n){var r=parseFloat("1e"+((n[2]?+n[2]:0)+n[1].length));t=(Math.round(e*r)/r).toString()}for(var i="",a=0,s=t.length;a<s;a+=1){var o=t[a];o==="e"?i+=t[++a]==="-"?"c":"b":o==="."?i+="a":o==="-"?i+="e":i+=o}i+=i.length&1?"f":"ff";for(var c=[30],l=0,u=i.length;l<u;l+=2)c.push(parseInt(i.substr(l,2),16));return c},mt.REAL=function(e){return K.REAL(e).length},K.NAME=K.CHARARRAY,mt.NAME=mt.CHARARRAY,K.STRING=K.CHARARRAY,mt.STRING=mt.CHARARRAY,Sa.UTF8=function(e,t,n){for(var r=[],i=n,a=0;a<i;a++,t+=1)r[a]=e.getUint8(t);return String.fromCharCode.apply(null,r)},Sa.UTF16=function(e,t,n){for(var r=[],i=n/2,a=0;a<i;a++,t+=2)r[a]=e.getUint16(t);return String.fromCharCode.apply(null,r)},K.UTF16=function(e){for(var t=[],n=0;n<e.length;n+=1){var r=e.charCodeAt(n);t[t.length]=r>>8&255,t[t.length]=r&255}return t},mt.UTF16=function(e){return e.length*2};var Ah={"x-mac-croatian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈ƫȅ ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ","x-mac-cyrillic":"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю","x-mac-gaelic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ","x-mac-greek":"Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ","x-mac-icelandic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüݰ¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-inuit":"ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł","x-mac-ce":"ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ",macintosh:"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-romanian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-turkish":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"};Sa.MACSTRING=function(e,t,n,r){var i=Ah[r];if(i!==void 0){for(var a="",s=0;s<n;s++){var o=e.getUint8(t+s);o<=127?a+=String.fromCharCode(o):a+=i[o&127]}return a}};var fl=typeof WeakMap=="function"&&new WeakMap,gl,Ub=function(e){if(!gl){gl={};for(var t in Ah)gl[t]=new String(t)}var n=gl[e];if(n!==void 0){if(fl){var r=fl.get(n);if(r!==void 0)return r}var i=Ah[e];if(i!==void 0){for(var a={},s=0;s<i.length;s++)a[i.charCodeAt(s)]=s+128;return fl&&fl.set(n,a),a}}};K.MACSTRING=function(e,t){var n=Ub(t);if(n!==void 0){for(var r=[],i=0;i<e.length;i++){var a=e.charCodeAt(i);if(a>=128&&(a=n[a],a===void 0))return;r[i]=a}return r}},mt.MACSTRING=function(e,t){var n=K.MACSTRING(e,t);return n!==void 0?n.length:0};function hh(e){return e>=-128&&e<=127}function Lb(e,t,n){for(var r=0,i=e.length;t<i&&r<64&&e[t]===0;)++t,++r;return n.push(128|r-1),t}function Yb(e,t,n){for(var r=0,i=e.length,a=t;a<i&&r<64;){var s=e[a];if(!hh(s)||s===0&&a+1<i&&e[a+1]===0)break;++a,++r}n.push(r-1);for(var o=t;o<a;++o)n.push(e[o]+256&255);return a}function Hb(e,t,n){for(var r=0,i=e.length,a=t;a<i&&r<64;){var s=e[a];if(s===0||hh(s)&&a+1<i&&hh(e[a+1]))break;++a,++r}n.push(64|r-1);for(var o=t;o<a;++o){var c=e[o];n.push(c+65536>>8&255,c+256&255)}return a}K.VARDELTAS=function(e){for(var t=0,n=[];t<e.length;){var r=e[t];r===0?t=Lb(e,t,n):r>=-128&&r<=127?t=Yb(e,t,n):t=Hb(e,t,n)}return n},K.INDEX=function(e){for(var t=1,n=[t],r=[],i=0;i<e.length;i+=1){var a=K.OBJECT(e[i]);Array.prototype.push.apply(r,a),t+=a.length,n.push(t)}if(r.length===0)return[0,0];for(var s=[],o=1+Math.floor(Math.log(t)/Math.log(2))/8|0,c=[void 0,K.BYTE,K.USHORT,K.UINT24,K.ULONG][o],l=0;l<n.length;l+=1){var u=c(n[l]);Array.prototype.push.apply(s,u)}return Array.prototype.concat(K.Card16(e.length),K.OffSize(o),s,r)},mt.INDEX=function(e){return K.INDEX(e).length},K.DICT=function(e){for(var t=[],n=Object.keys(e),r=n.length,i=0;i<r;i+=1){var a=parseInt(n[i],0),s=e[a];t=t.concat(K.OPERAND(s.value,s.type)),t=t.concat(K.OPERATOR(a))}return t},mt.DICT=function(e){return K.DICT(e).length},K.OPERATOR=function(e){return e<1200?[e]:[12,e-1200]},K.OPERAND=function(e,t){var n=[];if(Array.isArray(t))for(var r=0;r<t.length;r+=1)ht.argument(e.length===t.length,"Not enough arguments given for type"+t),n=n.concat(K.OPERAND(e[r],t[r]));else if(t==="SID")n=n.concat(K.NUMBER(e));else if(t==="offset")n=n.concat(K.NUMBER32(e));else if(t==="number")n=n.concat(K.NUMBER(e));else if(t==="real")n=n.concat(K.REAL(e));else throw new Error("Unknown operand type "+t);return n},K.OP=K.BYTE,mt.OP=mt.BYTE;var dl=typeof WeakMap=="function"&&new WeakMap;K.CHARSTRING=function(e){if(dl){var t=dl.get(e);if(t!==void 0)return t}for(var n=[],r=e.length,i=0;i<r;i+=1){var a=e[i];n=n.concat(K[a.type](a.value))}return dl&&dl.set(e,n),n},mt.CHARSTRING=function(e){return K.CHARSTRING(e).length},K.OBJECT=function(e){var t=K[e.type];return ht.argument(t!==void 0,"No encoding function for type "+e.type),t(e.value)},mt.OBJECT=function(e){var t=mt[e.type];return ht.argument(t!==void 0,"No sizeOf function for type "+e.type),t(e.value)},K.TABLE=function(e){for(var t=[],n=e.fields.length,r=[],i=[],a=0;a<n;a+=1){var s=e.fields[a],o=K[s.type];ht.argument(o!==void 0,"No encoding function for field type "+s.type+" ("+s.name+")");var c=e[s.name];c===void 0&&(c=s.value);var l=o(c);s.type==="TABLE"?(i.push(t.length),t=t.concat([0,0]),r.push(l)):t=t.concat(l)}for(var u=0;u<r.length;u+=1){var A=i[u],h=t.length;ht.argument(h<65536,"Table "+e.tableName+" too big."),t[A]=h>>8,t[A+1]=h&255,t=t.concat(r[u])}return t},mt.TABLE=function(e){for(var t=0,n=e.fields.length,r=0;r<n;r+=1){var i=e.fields[r],a=mt[i.type];ht.argument(a!==void 0,"No sizeOf function for field type "+i.type+" ("+i.name+")");var s=e[i.name];s===void 0&&(s=i.value),t+=a(s),i.type==="TABLE"&&(t+=2)}return t},K.RECORD=K.TABLE,mt.RECORD=mt.TABLE,K.LITERAL=function(e){return e},mt.LITERAL=function(e){return e.length};function Ne(e,t,n){if(t.length&&(t[0].name!=="coverageFormat"||t[0].value===1))for(var r=0;r<t.length;r+=1){var i=t[r];this[i.name]=i.value}if(this.tableName=e,this.fields=t,n)for(var a=Object.keys(n),s=0;s<a.length;s+=1){var o=a[s],c=n[o];this[o]!==void 0&&(this[o]=c)}}Ne.prototype.encode=function(){return K.TABLE(this)},Ne.prototype.sizeOf=function(){return mt.TABLE(this)};function Ls(e,t,n){n===void 0&&(n=t.length);var r=new Array(t.length+1);r[0]={name:e+"Count",type:"USHORT",value:n};for(var i=0;i<t.length;i++)r[i+1]={name:e+i,type:"USHORT",value:t[i]};return r}function fh(e,t,n){var r=t.length,i=new Array(r+1);i[0]={name:e+"Count",type:"USHORT",value:r};for(var a=0;a<r;a++)i[a+1]={name:e+a,type:"TABLE",value:n(t[a],a)};return i}function Ys(e,t,n){var r=t.length,i=[];i[0]={name:e+"Count",type:"USHORT",value:r};for(var a=0;a<r;a++)i=i.concat(n(t[a],a));return i}function pl(e){e.format===1?Ne.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:1}].concat(Ls("glyph",e.glyphs))):e.format===2?Ne.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:2}].concat(Ys("rangeRecord",e.ranges,function(t){return[{name:"startGlyphID",type:"USHORT",value:t.start},{name:"endGlyphID",type:"USHORT",value:t.end},{name:"startCoverageIndex",type:"USHORT",value:t.index}]}))):ht.assert(!1,"Coverage format must be 1 or 2.")}pl.prototype=Object.create(Ne.prototype),pl.prototype.constructor=pl;function ml(e){Ne.call(this,"scriptListTable",Ys("scriptRecord",e,function(t,n){var r=t.script,i=r.defaultLangSys;return ht.assert(!!i,"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 Ne("scriptTable",[{name:"defaultLangSys",type:"TABLE",value:new Ne("defaultLangSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:i.reqFeatureIndex}].concat(Ls("featureIndex",i.featureIndexes)))}].concat(Ys("langSys",r.langSysRecords,function(a,s){var o=a.langSys;return[{name:"langSysTag"+s,type:"TAG",value:a.tag},{name:"langSys"+s,type:"TABLE",value:new Ne("langSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:o.reqFeatureIndex}].concat(Ls("featureIndex",o.featureIndexes)))}]})))}]}))}ml.prototype=Object.create(Ne.prototype),ml.prototype.constructor=ml;function yl(e){Ne.call(this,"featureListTable",Ys("featureRecord",e,function(t,n){var r=t.feature;return[{name:"featureTag"+n,type:"TAG",value:t.tag},{name:"feature"+n,type:"TABLE",value:new Ne("featureTable",[{name:"featureParams",type:"USHORT",value:r.featureParams}].concat(Ls("lookupListIndex",r.lookupListIndexes)))}]}))}yl.prototype=Object.create(Ne.prototype),yl.prototype.constructor=yl;function wl(e,t){Ne.call(this,"lookupListTable",fh("lookup",e,function(n){var r=t[n.lookupType];return ht.assert(!!r,"Unable to write GSUB lookup type "+n.lookupType+" tables."),new Ne("lookupTable",[{name:"lookupType",type:"USHORT",value:n.lookupType},{name:"lookupFlag",type:"USHORT",value:n.lookupFlag}].concat(fh("subtable",n.subtables,r)))}))}wl.prototype=Object.create(Ne.prototype),wl.prototype.constructor=wl;var tt={Table:Ne,Record:Ne,Coverage:pl,ScriptList:ml,FeatureList:yl,LookupList:wl,ushortList:Ls,tableList:fh,recordList:Ys};function qp(e,t){return e.getUint8(t)}function vl(e,t){return e.getUint16(t,!1)}function Gb(e,t){return e.getInt16(t,!1)}function gh(e,t){return e.getUint32(t,!1)}function Zp(e,t){var n=e.getInt16(t,!1),r=e.getUint16(t+2,!1);return n+r/65535}function Vb(e,t){for(var n="",r=t;r<t+4;r+=1)n+=String.fromCharCode(e.getInt8(r));return n}function zb(e,t,n){for(var r=0,i=0;i<n;i+=1)r<<=8,r+=e.getUint8(t+i);return r}function Jb(e,t,n){for(var r=[],i=t;i<n;i+=1)r.push(e.getUint8(i));return r}function jb(e){for(var t="",n=0;n<e.length;n+=1)t+=String.fromCharCode(e[n]);return t}var Wb={byte:1,uShort:2,short:2,uLong:4,fixed:4,longDateTime:8,tag:4};function R(e,t){this.data=e,this.offset=t,this.relativeOffset=0}R.prototype.parseByte=function(){var e=this.data.getUint8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},R.prototype.parseChar=function(){var e=this.data.getInt8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},R.prototype.parseCard8=R.prototype.parseByte,R.prototype.parseUShort=function(){var e=this.data.getUint16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},R.prototype.parseCard16=R.prototype.parseUShort,R.prototype.parseSID=R.prototype.parseUShort,R.prototype.parseOffset16=R.prototype.parseUShort,R.prototype.parseShort=function(){var e=this.data.getInt16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},R.prototype.parseF2Dot14=function(){var e=this.data.getInt16(this.offset+this.relativeOffset)/16384;return this.relativeOffset+=2,e},R.prototype.parseULong=function(){var e=gh(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},R.prototype.parseOffset32=R.prototype.parseULong,R.prototype.parseFixed=function(){var e=Zp(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},R.prototype.parseString=function(e){var t=this.data,n=this.offset+this.relativeOffset,r="";this.relativeOffset+=e;for(var i=0;i<e;i++)r+=String.fromCharCode(t.getUint8(n+i));return r},R.prototype.parseTag=function(){return this.parseString(4)},R.prototype.parseLongDateTime=function(){var e=gh(this.data,this.offset+this.relativeOffset+4);return e-=2082844800,this.relativeOffset+=8,e},R.prototype.parseVersion=function(e){var t=vl(this.data,this.offset+this.relativeOffset),n=vl(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,e===void 0&&(e=4096),t+n/e/10},R.prototype.skip=function(e,t){t===void 0&&(t=1),this.relativeOffset+=Wb[e]*t},R.prototype.parseULongList=function(e){e===void 0&&(e=this.parseULong());for(var t=new Array(e),n=this.data,r=this.offset+this.relativeOffset,i=0;i<e;i++)t[i]=n.getUint32(r),r+=4;return this.relativeOffset+=e*4,t},R.prototype.parseOffset16List=R.prototype.parseUShortList=function(e){e===void 0&&(e=this.parseUShort());for(var t=new Array(e),n=this.data,r=this.offset+this.relativeOffset,i=0;i<e;i++)t[i]=n.getUint16(r),r+=2;return this.relativeOffset+=e*2,t},R.prototype.parseShortList=function(e){for(var t=new Array(e),n=this.data,r=this.offset+this.relativeOffset,i=0;i<e;i++)t[i]=n.getInt16(r),r+=2;return this.relativeOffset+=e*2,t},R.prototype.parseByteList=function(e){for(var t=new Array(e),n=this.data,r=this.offset+this.relativeOffset,i=0;i<e;i++)t[i]=n.getUint8(r++);return this.relativeOffset+=e,t},R.prototype.parseList=function(e,t){t||(t=e,e=this.parseUShort());for(var n=new Array(e),r=0;r<e;r++)n[r]=t.call(this);return n},R.prototype.parseList32=function(e,t){t||(t=e,e=this.parseULong());for(var n=new Array(e),r=0;r<e;r++)n[r]=t.call(this);return n},R.prototype.parseRecordList=function(e,t){t||(t=e,e=this.parseUShort());for(var n=new Array(e),r=Object.keys(t),i=0;i<e;i++){for(var a={},s=0;s<r.length;s++){var o=r[s],c=t[o];a[o]=c.call(this)}n[i]=a}return n},R.prototype.parseRecordList32=function(e,t){t||(t=e,e=this.parseULong());for(var n=new Array(e),r=Object.keys(t),i=0;i<e;i++){for(var a={},s=0;s<r.length;s++){var o=r[s],c=t[o];a[o]=c.call(this)}n[i]=a}return n},R.prototype.parseStruct=function(e){if(typeof e=="function")return e.call(this);for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r],a=e[i];n[i]=a.call(this)}return n},R.prototype.parseValueRecord=function(e){if(e===void 0&&(e=this.parseUShort()),e!==0){var 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}},R.prototype.parseValueRecordList=function(){for(var e=this.parseUShort(),t=this.parseUShort(),n=new Array(t),r=0;r<t;r++)n[r]=this.parseValueRecord(e);return n},R.prototype.parsePointer=function(e){var t=this.parseOffset16();if(t>0)return new R(this.data,this.offset+t).parseStruct(e)},R.prototype.parsePointer32=function(e){var t=this.parseOffset32();if(t>0)return new R(this.data,this.offset+t).parseStruct(e)},R.prototype.parseListOfLists=function(e){for(var t=this.parseOffset16List(),n=t.length,r=this.relativeOffset,i=new Array(n),a=0;a<n;a++){var s=t[a];if(s===0){i[a]=void 0;continue}if(this.relativeOffset=s,e){for(var o=this.parseOffset16List(),c=new Array(o.length),l=0;l<o.length;l++)this.relativeOffset=s+o[l],c[l]=e.call(this);i[a]=c}else i[a]=this.parseUShortList()}return this.relativeOffset=r,i},R.prototype.parseCoverage=function(){var e=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 r=new Array(n),i=0;i<n;i++)r[i]={start:this.parseUShort(),end:this.parseUShort(),index:this.parseUShort()};return{format:2,ranges:r}}throw new Error("0x"+e.toString(16)+": Coverage format must be 1 or 2.")},R.prototype.parseClassDef=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{format:1,startGlyph:this.parseUShort(),classes:this.parseUShortList()};if(t===2)return{format:2,ranges:this.parseRecordList({start:R.uShort,end:R.uShort,classId:R.uShort})};throw new Error("0x"+e.toString(16)+": ClassDef format must be 1 or 2.")},R.list=function(e,t){return function(){return this.parseList(e,t)}},R.list32=function(e,t){return function(){return this.parseList32(e,t)}},R.recordList=function(e,t){return function(){return this.parseRecordList(e,t)}},R.recordList32=function(e,t){return function(){return this.parseRecordList32(e,t)}},R.pointer=function(e){return function(){return this.parsePointer(e)}},R.pointer32=function(e){return function(){return this.parsePointer32(e)}},R.tag=R.prototype.parseTag,R.byte=R.prototype.parseByte,R.uShort=R.offset16=R.prototype.parseUShort,R.uShortList=R.prototype.parseUShortList,R.uLong=R.offset32=R.prototype.parseULong,R.uLongList=R.prototype.parseULongList,R.struct=R.prototype.parseStruct,R.coverage=R.prototype.parseCoverage,R.classDef=R.prototype.parseClassDef;var $p={reserved:R.uShort,reqFeatureIndex:R.uShort,featureIndexes:R.uShortList};R.prototype.parseScriptList=function(){return this.parsePointer(R.recordList({tag:R.tag,script:R.pointer({defaultLangSys:R.pointer($p),langSysRecords:R.recordList({tag:R.tag,langSys:R.pointer($p)})})}))||[]},R.prototype.parseFeatureList=function(){return this.parsePointer(R.recordList({tag:R.tag,feature:R.pointer({featureParams:R.offset16,lookupListIndexes:R.uShortList})}))||[]},R.prototype.parseLookupList=function(e){return this.parsePointer(R.list(R.pointer(function(){var t=this.parseUShort();ht.argument(1<=t&&t<=9,"GPOS/GSUB lookup type "+t+" unknown.");var n=this.parseUShort(),r=n&16;return{lookupType:t,lookupFlag:n,subtables:this.parseList(R.pointer(e[t])),markFilteringSet:r?this.parseUShort():void 0}})))||[]},R.prototype.parseFeatureVariationsList=function(){return this.parsePointer32(function(){var e=this.parseUShort(),t=this.parseUShort();ht.argument(e===1&&t<1,"GPOS/GSUB feature variations table unknown.");var n=this.parseRecordList32({conditionSetOffset:R.offset32,featureTableSubstitutionOffset:R.offset32});return n})||[]};var rt={getByte:qp,getCard8:qp,getUShort:vl,getCard16:vl,getShort:Gb,getULong:gh,getFixed:Zp,getTag:Vb,getOffset:zb,getBytes:Jb,bytesToString:jb,Parser:R};function Kb(e,t){t.parseUShort(),e.length=t.parseULong(),e.language=t.parseULong();var n;e.groupCount=n=t.parseULong(),e.glyphIndexMap={};for(var r=0;r<n;r+=1)for(var i=t.parseULong(),a=t.parseULong(),s=t.parseULong(),o=i;o<=a;o+=1)e.glyphIndexMap[o]=s,s++}function Xb(e,t,n,r,i){e.length=t.parseUShort(),e.language=t.parseUShort();var a;e.segCount=a=t.parseUShort()>>1,t.skip("uShort",3),e.glyphIndexMap={};for(var s=new rt.Parser(n,r+i+14),o=new rt.Parser(n,r+i+16+a*2),c=new rt.Parser(n,r+i+16+a*4),l=new rt.Parser(n,r+i+16+a*6),u=r+i+16+a*8,A=0;A<a-1;A+=1)for(var h=void 0,f=s.parseUShort(),d=o.parseUShort(),p=c.parseShort(),m=l.parseUShort(),y=d;y<=f;y+=1)m!==0?(u=l.offset+l.relativeOffset-2,u+=m,u+=(y-d)*2,h=rt.getUShort(n,u),h!==0&&(h=h+p&65535)):h=y+p&65535,e.glyphIndexMap[y]=h}function _b(e,t){var n={};n.version=rt.getUShort(e,t),ht.argument(n.version===0,"cmap table version should be 0."),n.numTables=rt.getUShort(e,t+2);for(var r=-1,i=n.numTables-1;i>=0;i-=1){var a=rt.getUShort(e,t+4+i*8),s=rt.getUShort(e,t+4+i*8+2);if(a===3&&(s===0||s===1||s===10)||a===0&&(s===0||s===1||s===2||s===3||s===4)){r=rt.getULong(e,t+4+i*8+4);break}}if(r===-1)throw new Error("No valid cmap sub-tables found.");var o=new rt.Parser(e,t+r);if(n.format=o.parseUShort(),n.format===12)Kb(n,o);else if(n.format===4)Xb(n,o,e,t,r);else throw new Error("Only format 4 and 12 cmap tables are supported (found format "+n.format+").");return n}function qb(e,t,n){e.segments.push({end:t,start:t,delta:-(t-n),offset:0,glyphIndex:n})}function Zb(e){e.segments.push({end:65535,start:65535,delta:1,offset:0})}function $b(e){var t=!0,n;for(n=e.length-1;n>0;n-=1){var r=e.get(n);if(r.unicode>65535){console.log("Adding CMAP format 12 (needed!)"),t=!1;break}}var i=[{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:12+8}];t||(i=i.concat([{name:"cmap12PlatformID",type:"USHORT",value:3},{name:"cmap12EncodingID",type:"USHORT",value:10},{name:"cmap12Offset",type:"ULONG",value:0}])),i=i.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 a=new tt.Table("cmap",i);for(a.segments=[],n=0;n<e.length;n+=1){for(var s=e.get(n),o=0;o<s.unicodes.length;o+=1)qb(a,s.unicodes[o],n);a.segments=a.segments.sort(function(v,w){return v.start-w.start})}Zb(a);var c=a.segments.length,l=0,u=[],A=[],h=[],f=[],d=[],p=[];for(n=0;n<c;n+=1){var m=a.segments[n];m.end<=65535&&m.start<=65535?(u=u.concat({name:"end_"+n,type:"USHORT",value:m.end}),A=A.concat({name:"start_"+n,type:"USHORT",value:m.start}),h=h.concat({name:"idDelta_"+n,type:"SHORT",value:m.delta}),f=f.concat({name:"idRangeOffset_"+n,type:"USHORT",value:m.offset}),m.glyphId!==void 0&&(d=d.concat({name:"glyph_"+n,type:"USHORT",value:m.glyphId}))):l+=1,!t&&m.glyphIndex!==void 0&&(p=p.concat({name:"cmap12Start_"+n,type:"ULONG",value:m.start}),p=p.concat({name:"cmap12End_"+n,type:"ULONG",value:m.end}),p=p.concat({name:"cmap12Glyph_"+n,type:"ULONG",value:m.glyphIndex}))}if(a.segCountX2=(c-l)*2,a.searchRange=Math.pow(2,Math.floor(Math.log(c-l)/Math.log(2)))*2,a.entrySelector=Math.log(a.searchRange/2)/Math.log(2),a.rangeShift=a.segCountX2-a.searchRange,a.fields=a.fields.concat(u),a.fields.push({name:"reservedPad",type:"USHORT",value:0}),a.fields=a.fields.concat(A),a.fields=a.fields.concat(h),a.fields=a.fields.concat(f),a.fields=a.fields.concat(d),a.cmap4Length=14+u.length*2+2+A.length*2+h.length*2+f.length*2+d.length*2,!t){var y=16+p.length*4;a.cmap12Offset=12+2*2+4+a.cmap4Length,a.fields=a.fields.concat([{name:"cmap12Format",type:"USHORT",value:12},{name:"cmap12Reserved",type:"USHORT",value:0},{name:"cmap12Length",type:"ULONG",value:y},{name:"cmap12Language",type:"ULONG",value:0},{name:"cmap12nGroups",type:"ULONG",value:p.length/3}]),a.fields=a.fields.concat(p)}return a}var t1={parse:_b,make:$b},El=[".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"],tS=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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"],eS=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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"],Di=[".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 e1(e){this.font=e}e1.prototype.charToGlyphIndex=function(e){var t=e.codePointAt(0),n=this.font.glyphs;if(n){for(var r=0;r<n.length;r+=1)for(var i=n.get(r),a=0;a<i.unicodes.length;a+=1)if(i.unicodes[a]===t)return r}return null};function n1(e){this.cmap=e}n1.prototype.charToGlyphIndex=function(e){return this.cmap.glyphIndexMap[e.codePointAt(0)]||0};function Bl(e,t){this.encoding=e,this.charset=t}Bl.prototype.charToGlyphIndex=function(e){var t=e.codePointAt(0),n=this.encoding[t];return this.charset.indexOf(n)};function dh(e){switch(e.version){case 1:this.names=Di.slice();break;case 2:this.names=new Array(e.numberOfGlyphs);for(var t=0;t<e.numberOfGlyphs;t++)e.glyphNameIndex[t]<Di.length?this.names[t]=Di[e.glyphNameIndex[t]]:this.names[t]=e.names[e.glyphNameIndex[t]-Di.length];break;case 2.5:this.names=new Array(e.numberOfGlyphs);for(var n=0;n<e.numberOfGlyphs;n++)this.names[n]=Di[n+e.glyphNameIndex[n]];break;case 3:this.names=[];break;default:this.names=[];break}}dh.prototype.nameToGlyphIndex=function(e){return this.names.indexOf(e)},dh.prototype.glyphIndexToName=function(e){return this.names[e]};function nS(e){for(var t,n=e.tables.cmap.glyphIndexMap,r=Object.keys(n),i=0;i<r.length;i+=1){var a=r[i],s=n[a];t=e.glyphs.get(s),t.addUnicode(parseInt(a))}for(var o=0;o<e.glyphs.length;o+=1)t=e.glyphs.get(o),e.cffEncoding?e.isCIDFont?t.name="gid"+o:t.name=e.cffEncoding.charset[o]:e.glyphNames.names&&(t.name=e.glyphNames.glyphIndexToName(o))}function rS(e){e._IndexToUnicodeMap={};for(var t=e.tables.cmap.glyphIndexMap,n=Object.keys(t),r=0;r<n.length;r+=1){var i=n[r],a=t[i];e._IndexToUnicodeMap[a]===void 0?e._IndexToUnicodeMap[a]={unicodes:[parseInt(i)]}:e._IndexToUnicodeMap[a].unicodes.push(parseInt(i))}}function iS(e,t){t.lowMemory?rS(e):nS(e)}function aS(e,t,n,r,i){e.beginPath(),e.moveTo(t,n),e.lineTo(r,i),e.stroke()}var Ii={line:aS};function sS(e,t){var n=t||new ye;return{configurable:!0,get:function(){return typeof n=="function"&&(n=n()),n},set:function(r){n=r}}}function pn(e){this.bindConstructorValues(e)}pn.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]:[],"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),Object.defineProperty(this,"path",sS(this,e.path))},pn.prototype.addUnicode=function(e){this.unicodes.length===0&&(this.unicode=e),this.unicodes.push(e)},pn.prototype.getBoundingBox=function(){return this.path.getBoundingBox()},pn.prototype.getPath=function(e,t,n,r,i){e=e!==void 0?e:0,t=t!==void 0?t:0,n=n!==void 0?n:72;var a,s;r||(r={});var o=r.xScale,c=r.yScale;if(r.hinting&&i&&i.hinting&&(s=this.path&&i.hinting.exec(this,n)),s)a=i.hinting.getCommands(s),e=Math.round(e),t=Math.round(t),o=c=1;else{a=this.path.commands;var l=1/(this.path.unitsPerEm||1e3)*n;o===void 0&&(o=l),c===void 0&&(c=l)}for(var u=new ye,A=0;A<a.length;A+=1){var h=a[A];h.type==="M"?u.moveTo(e+h.x*o,t+-h.y*c):h.type==="L"?u.lineTo(e+h.x*o,t+-h.y*c):h.type==="Q"?u.quadraticCurveTo(e+h.x1*o,t+-h.y1*c,e+h.x*o,t+-h.y*c):h.type==="C"?u.curveTo(e+h.x1*o,t+-h.y1*c,e+h.x2*o,t+-h.y2*c,e+h.x*o,t+-h.y*c):h.type==="Z"&&u.closePath()}return u},pn.prototype.getContours=function(){if(this.points===void 0)return[];for(var e=[],t=[],n=0;n<this.points.length;n+=1){var r=this.points[n];t.push(r),r.lastPointOfContour&&(e.push(t),t=[])}return ht.argument(t.length===0,"There are still points left in the current contour."),e},pn.prototype.getMetrics=function(){for(var e=this.path.commands,t=[],n=[],r=0;r<e.length;r+=1){var i=e[r];i.type!=="Z"&&(t.push(i.x),n.push(i.y)),(i.type==="Q"||i.type==="C")&&(t.push(i.x1),n.push(i.y1)),i.type==="C"&&(t.push(i.x2),n.push(i.y2))}var a={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(a.xMin)||(a.xMin=0),isFinite(a.xMax)||(a.xMax=this.advanceWidth),isFinite(a.yMin)||(a.yMin=0),isFinite(a.yMax)||(a.yMax=0),a.rightSideBearing=this.advanceWidth-a.leftSideBearing-(a.xMax-a.xMin),a},pn.prototype.draw=function(e,t,n,r,i){this.getPath(t,n,r,i).draw(e)},pn.prototype.drawPoints=function(e,t,n,r){function i(A,h,f,d){e.beginPath();for(var p=0;p<A.length;p+=1)e.moveTo(h+A[p].x*d,f+A[p].y*d),e.arc(h+A[p].x*d,f+A[p].y*d,2,0,Math.PI*2,!1);e.closePath(),e.fill()}t=t!==void 0?t:0,n=n!==void 0?n:0,r=r!==void 0?r:24;for(var a=1/this.path.unitsPerEm*r,s=[],o=[],c=this.path,l=0;l<c.commands.length;l+=1){var u=c.commands[l];u.x!==void 0&&s.push({x:u.x,y:-u.y}),u.x1!==void 0&&o.push({x:u.x1,y:-u.y1}),u.x2!==void 0&&o.push({x:u.x2,y:-u.y2})}e.fillStyle="blue",i(s,t,n,a),e.fillStyle="red",i(o,t,n,a)},pn.prototype.drawMetrics=function(e,t,n,r){var i;t=t!==void 0?t:0,n=n!==void 0?n:0,r=r!==void 0?r:24,i=1/this.path.unitsPerEm*r,e.lineWidth=1,e.strokeStyle="black",Ii.line(e,t,-1e4,t,1e4),Ii.line(e,-1e4,n,1e4,n);var a=this.xMin||0,s=this.yMin||0,o=this.xMax||0,c=this.yMax||0,l=this.advanceWidth||0;e.strokeStyle="blue",Ii.line(e,t+a*i,-1e4,t+a*i,1e4),Ii.line(e,t+o*i,-1e4,t+o*i,1e4),Ii.line(e,-1e4,n+-s*i,1e4,n+-s*i),Ii.line(e,-1e4,n+-c*i,1e4,n+-c*i),e.strokeStyle="green",Ii.line(e,t+l*i,-1e4,t+l*i,1e4)};function Cl(e,t,n){Object.defineProperty(e,t,{get:function(){return e.path,e[n]},set:function(r){e[n]=r},enumerable:!0,configurable:!0})}function ph(e,t){if(this.font=e,this.glyphs={},Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];r.path.unitsPerEm=e.unitsPerEm,this.glyphs[n]=r}this.length=t&&t.length||0}ph.prototype.get=function(e){if(this.glyphs[e]===void 0){this.font._push(e),typeof this.glyphs[e]=="function"&&(this.glyphs[e]=this.glyphs[e]());var t=this.glyphs[e],n=this.font._IndexToUnicodeMap[e];if(n)for(var r=0;r<n.unicodes.length;r++)t.addUnicode(n.unicodes[r]);this.font.cffEncoding?this.font.isCIDFont?t.name="gid"+e: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]},ph.prototype.push=function(e,t){this.glyphs[e]=t,this.length++};function oS(e,t){return new pn({index:t,font:e})}function cS(e,t,n,r,i,a){return function(){var s=new pn({index:t,font:e});return s.path=function(){n(s,r,i);var o=a(e.glyphs,s);return o.unitsPerEm=e.unitsPerEm,o},Cl(s,"xMin","_xMin"),Cl(s,"xMax","_xMax"),Cl(s,"yMin","_yMin"),Cl(s,"yMax","_yMax"),s}}function lS(e,t,n,r){return function(){var i=new pn({index:t,font:e});return i.path=function(){var a=n(e,i,r);return a.unitsPerEm=e.unitsPerEm,a},i}}var sr={GlyphSet:ph,glyphLoader:oS,ttfGlyphLoader:cS,cffGlyphLoader:lS};function r1(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n+=1)if(!r1(e[n],t[n]))return!1;return!0}else return!1}function mh(e){var t;return e.length<1240?t=107:e.length<33900?t=1131:t=32768,t}function Wr(e,t,n){var r=[],i=[],a=rt.getCard16(e,t),s,o;if(a!==0){var c=rt.getByte(e,t+2);s=t+(a+1)*c+2;for(var l=t+3,u=0;u<a+1;u+=1)r.push(rt.getOffset(e,l,c)),l+=c;o=s+r[a]}else o=t+2;for(var A=0;A<r.length-1;A+=1){var h=rt.getBytes(e,s+r[A],s+r[A+1]);n&&(h=n(h)),i.push(h)}return{objects:i,startOffset:t,endOffset:o}}function uS(e,t){var n=[],r=rt.getCard16(e,t),i,a;if(r!==0){var s=rt.getByte(e,t+2);i=t+(r+1)*s+2;for(var o=t+3,c=0;c<r+1;c+=1)n.push(rt.getOffset(e,o,s)),o+=s;a=i+n[r]}else a=t+2;return{offsets:n,startOffset:t,endOffset:a}}function AS(e,t,n,r,i){var a=rt.getCard16(n,r),s=0;if(a!==0){var o=rt.getByte(n,r+2);s=r+(a+1)*o+2}var c=rt.getBytes(n,s+t[e],s+t[e+1]);return i&&(c=i(c)),c}function hS(e){for(var t="",n=15,r=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"];;){var i=e.parseByte(),a=i>>4,s=i&15;if(a===n||(t+=r[a],s===n))break;t+=r[s]}return parseFloat(t)}function fS(e,t){var n,r,i,a;if(t===28)return n=e.parseByte(),r=e.parseByte(),n<<8|r;if(t===29)return n=e.parseByte(),r=e.parseByte(),i=e.parseByte(),a=e.parseByte(),n<<24|r<<16|i<<8|a;if(t===30)return hS(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 gS(e){for(var t={},n=0;n<e.length;n+=1){var r=e[n][0],i=e[n][1],a=void 0;if(i.length===1?a=i[0]:a=i,t.hasOwnProperty(r)&&!isNaN(t[r]))throw new Error("Object "+t+" already has key "+r);t[r]=a}return t}function i1(e,t,n){t=t!==void 0?t:0;var r=new rt.Parser(e,t),i=[],a=[];for(n=n!==void 0?n:e.length;r.relativeOffset<n;){var s=r.parseByte();s<=21?(s===12&&(s=1200+r.parseByte()),i.push([s,a]),a=[]):a.push(fS(r,s))}return gS(i)}function Hs(e,t){return t<=390?t=El[t]:t=e[t-391],t}function a1(e,t,n){for(var r={},i,a=0;a<t.length;a+=1){var s=t[a];if(Array.isArray(s.type)){var o=[];o.length=s.type.length;for(var c=0;c<s.type.length;c++)i=e[s.op]!==void 0?e[s.op][c]:void 0,i===void 0&&(i=s.value!==void 0&&s.value[c]!==void 0?s.value[c]:null),s.type[c]==="SID"&&(i=Hs(n,i)),o[c]=i;r[s.name]=o}else i=e[s.op],i===void 0&&(i=s.value!==void 0?s.value:null),s.type==="SID"&&(i=Hs(n,i)),r[s.name]=i}return r}function dS(e,t){var n={};return n.formatMajor=rt.getCard8(e,t),n.formatMinor=rt.getCard8(e,t+1),n.size=rt.getCard8(e,t+2),n.offsetSize=rt.getCard8(e,t+3),n.startOffset=t,n.endOffset=t+4,n}var s1=[{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"}],o1=[{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 pS(e,t){var n=i1(e,0,e.byteLength);return a1(n,s1,t)}function c1(e,t,n,r){var i=i1(e,t,n);return a1(i,o1,r)}function l1(e,t,n,r){for(var i=[],a=0;a<n.length;a+=1){var s=new DataView(new Uint8Array(n[a]).buffer),o=pS(s,r);o._subrs=[],o._subrsBias=0,o._defaultWidthX=0,o._nominalWidthX=0;var c=o.private[0],l=o.private[1];if(c!==0&&l!==0){var u=c1(e,l+t,c,r);if(o._defaultWidthX=u.defaultWidthX,o._nominalWidthX=u.nominalWidthX,u.subrs!==0){var A=l+u.subrs,h=Wr(e,A+t);o._subrs=h.objects,o._subrsBias=mh(o._subrs)}o._privateDict=u}i.push(o)}return i}function mS(e,t,n,r){var i,a,s=new rt.Parser(e,t);n-=1;var o=[".notdef"],c=s.parseCard8();if(c===0)for(var l=0;l<n;l+=1)i=s.parseSID(),o.push(Hs(r,i));else if(c===1)for(;o.length<=n;){i=s.parseSID(),a=s.parseCard8();for(var u=0;u<=a;u+=1)o.push(Hs(r,i)),i+=1}else if(c===2)for(;o.length<=n;){i=s.parseSID(),a=s.parseCard16();for(var A=0;A<=a;A+=1)o.push(Hs(r,i)),i+=1}else throw new Error("Unknown charset format "+c);return o}function yS(e,t,n){var r,i={},a=new rt.Parser(e,t),s=a.parseCard8();if(s===0)for(var o=a.parseCard8(),c=0;c<o;c+=1)r=a.parseCard8(),i[r]=c;else if(s===1){var l=a.parseCard8();r=1;for(var u=0;u<l;u+=1)for(var A=a.parseCard8(),h=a.parseCard8(),f=A;f<=A+h;f+=1)i[f]=r,r+=1}else throw new Error("Unknown encoding format "+s);return new Bl(i,n)}function u1(e,t,n){var r,i,a,s,o=new ye,c=[],l=0,u=!1,A=!1,h=0,f=0,d,p,m,y;if(e.isCIDFont){var v=e.tables.cff.topDict._fdSelect[t.index],w=e.tables.cff.topDict._fdArray[v];d=w._subrs,p=w._subrsBias,m=w._defaultWidthX,y=w._nominalWidthX}else d=e.tables.cff.topDict._subrs,p=e.tables.cff.topDict._subrsBias,m=e.tables.cff.topDict._defaultWidthX,y=e.tables.cff.topDict._nominalWidthX;var B=m;function C(D,N){A&&o.closePath(),o.moveTo(D,N),A=!0}function x(){var D;D=c.length%2!==0,D&&!u&&(B=c.shift()+y),l+=c.length>>1,c.length=0,u=!0}function b(D){for(var N,P,U,L,V,W,J,Z,et,ct,O,M,z=0;z<D.length;){var X=D[z];switch(z+=1,X){case 1:x();break;case 3:x();break;case 4:c.length>1&&!u&&(B=c.shift()+y,u=!0),f+=c.pop(),C(h,f);break;case 5:for(;c.length>0;)h+=c.shift(),f+=c.shift(),o.lineTo(h,f);break;case 6:for(;c.length>0&&(h+=c.shift(),o.lineTo(h,f),c.length!==0);)f+=c.shift(),o.lineTo(h,f);break;case 7:for(;c.length>0&&(f+=c.shift(),o.lineTo(h,f),c.length!==0);)h+=c.shift(),o.lineTo(h,f);break;case 8:for(;c.length>0;)r=h+c.shift(),i=f+c.shift(),a=r+c.shift(),s=i+c.shift(),h=a+c.shift(),f=s+c.shift(),o.curveTo(r,i,a,s,h,f);break;case 10:V=c.pop()+p,W=d[V],W&&b(W);break;case 11:return;case 12:switch(X=D[z],z+=1,X){case 35:r=h+c.shift(),i=f+c.shift(),a=r+c.shift(),s=i+c.shift(),J=a+c.shift(),Z=s+c.shift(),et=J+c.shift(),ct=Z+c.shift(),O=et+c.shift(),M=ct+c.shift(),h=O+c.shift(),f=M+c.shift(),c.shift(),o.curveTo(r,i,a,s,J,Z),o.curveTo(et,ct,O,M,h,f);break;case 34:r=h+c.shift(),i=f,a=r+c.shift(),s=i+c.shift(),J=a+c.shift(),Z=s,et=J+c.shift(),ct=s,O=et+c.shift(),M=f,h=O+c.shift(),o.curveTo(r,i,a,s,J,Z),o.curveTo(et,ct,O,M,h,f);break;case 36:r=h+c.shift(),i=f+c.shift(),a=r+c.shift(),s=i+c.shift(),J=a+c.shift(),Z=s,et=J+c.shift(),ct=s,O=et+c.shift(),M=ct+c.shift(),h=O+c.shift(),o.curveTo(r,i,a,s,J,Z),o.curveTo(et,ct,O,M,h,f);break;case 37:r=h+c.shift(),i=f+c.shift(),a=r+c.shift(),s=i+c.shift(),J=a+c.shift(),Z=s+c.shift(),et=J+c.shift(),ct=Z+c.shift(),O=et+c.shift(),M=ct+c.shift(),Math.abs(O-h)>Math.abs(M-f)?h=O+c.shift():f=M+c.shift(),o.curveTo(r,i,a,s,J,Z),o.curveTo(et,ct,O,M,h,f);break;default:console.log("Glyph "+t.index+": unknown operator 1200"+X),c.length=0}break;case 14:c.length>0&&!u&&(B=c.shift()+y,u=!0),A&&(o.closePath(),A=!1);break;case 18:x();break;case 19:case 20:x(),z+=l+7>>3;break;case 21:c.length>2&&!u&&(B=c.shift()+y,u=!0),f+=c.pop(),h+=c.pop(),C(h,f);break;case 22:c.length>1&&!u&&(B=c.shift()+y,u=!0),h+=c.pop(),C(h,f);break;case 23:x();break;case 24:for(;c.length>2;)r=h+c.shift(),i=f+c.shift(),a=r+c.shift(),s=i+c.shift(),h=a+c.shift(),f=s+c.shift(),o.curveTo(r,i,a,s,h,f);h+=c.shift(),f+=c.shift(),o.lineTo(h,f);break;case 25:for(;c.length>6;)h+=c.shift(),f+=c.shift(),o.lineTo(h,f);r=h+c.shift(),i=f+c.shift(),a=r+c.shift(),s=i+c.shift(),h=a+c.shift(),f=s+c.shift(),o.curveTo(r,i,a,s,h,f);break;case 26:for(c.length%2&&(h+=c.shift());c.length>0;)r=h,i=f+c.shift(),a=r+c.shift(),s=i+c.shift(),h=a,f=s+c.shift(),o.curveTo(r,i,a,s,h,f);break;case 27:for(c.length%2&&(f+=c.shift());c.length>0;)r=h+c.shift(),i=f,a=r+c.shift(),s=i+c.shift(),h=a+c.shift(),f=s,o.curveTo(r,i,a,s,h,f);break;case 28:N=D[z],P=D[z+1],c.push((N<<24|P<<16)>>16),z+=2;break;case 29:V=c.pop()+e.gsubrsBias,W=e.gsubrs[V],W&&b(W);break;case 30:for(;c.length>0&&(r=h,i=f+c.shift(),a=r+c.shift(),s=i+c.shift(),h=a+c.shift(),f=s+(c.length===1?c.shift():0),o.curveTo(r,i,a,s,h,f),c.length!==0);)r=h+c.shift(),i=f,a=r+c.shift(),s=i+c.shift(),f=s+c.shift(),h=a+(c.length===1?c.shift():0),o.curveTo(r,i,a,s,h,f);break;case 31:for(;c.length>0&&(r=h+c.shift(),i=f,a=r+c.shift(),s=i+c.shift(),f=s+c.shift(),h=a+(c.length===1?c.shift():0),o.curveTo(r,i,a,s,h,f),c.length!==0);)r=h,i=f+c.shift(),a=r+c.shift(),s=i+c.shift(),h=a+c.shift(),f=s+(c.length===1?c.shift():0),o.curveTo(r,i,a,s,h,f);break;default:X<32?console.log("Glyph "+t.index+": unknown operator "+X):X<247?c.push(X-139):X<251?(N=D[z],z+=1,c.push((X-247)*256+N+108)):X<255?(N=D[z],z+=1,c.push(-(X-251)*256-N-108)):(N=D[z],P=D[z+1],U=D[z+2],L=D[z+3],z+=4,c.push((N<<24|P<<16|U<<8|L)/65536))}}}return b(n),t.advanceWidth=B,o}function wS(e,t,n,r){var i=[],a,s=new rt.Parser(e,t),o=s.parseCard8();if(o===0)for(var c=0;c<n;c++){if(a=s.parseCard8(),a>=r)throw new Error("CFF table CID Font FDSelect has bad FD index value "+a+" (FD count "+r+")");i.push(a)}else if(o===3){var l=s.parseCard16(),u=s.parseCard16();if(u!==0)throw new Error("CFF Table CID Font FDSelect format 3 range has bad initial GID "+u);for(var A,h=0;h<l;h++){if(a=s.parseCard8(),A=s.parseCard16(),a>=r)throw new Error("CFF table CID Font FDSelect has bad FD index value "+a+" (FD count "+r+")");if(A>n)throw new Error("CFF Table CID Font FDSelect format 3 range has bad GID "+A);for(;u<A;u++)i.push(a);u=A}if(A!==n)throw new Error("CFF Table CID Font FDSelect format 3 range has bad final GID "+A)}else throw new Error("CFF Table CID Font FDSelect table has unsupported format "+o);return i}function vS(e,t,n,r){n.tables.cff={};var i=dS(e,t),a=Wr(e,i.endOffset,rt.bytesToString),s=Wr(e,a.endOffset),o=Wr(e,s.endOffset,rt.bytesToString),c=Wr(e,o.endOffset);n.gsubrs=c.objects,n.gsubrsBias=mh(n.gsubrs);var l=l1(e,t,s.objects,o.objects);if(l.length!==1)throw new Error("CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = "+l.length);var u=l[0];if(n.tables.cff.topDict=u,u._privateDict&&(n.defaultWidthX=u._privateDict.defaultWidthX,n.nominalWidthX=u._privateDict.nominalWidthX),u.ros[0]!==void 0&&u.ros[1]!==void 0&&(n.isCIDFont=!0),n.isCIDFont){var A=u.fdArray,h=u.fdSelect;if(A===0||h===0)throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");A+=t;var f=Wr(e,A),d=l1(e,t,f.objects,o.objects);u._fdArray=d,h+=t,u._fdSelect=wS(e,h,n.numGlyphs,d.length)}var p=t+u.private[1],m=c1(e,p,u.private[0],o.objects);if(n.defaultWidthX=m.defaultWidthX,n.nominalWidthX=m.nominalWidthX,m.subrs!==0){var y=p+m.subrs,v=Wr(e,y);n.subrs=v.objects,n.subrsBias=mh(n.subrs)}else n.subrs=[],n.subrsBias=0;var w;r.lowMemory?(w=uS(e,t+u.charStrings),n.nGlyphs=w.offsets.length):(w=Wr(e,t+u.charStrings),n.nGlyphs=w.objects.length);var B=mS(e,t+u.charset,n.nGlyphs,o.objects);if(u.encoding===0?n.cffEncoding=new Bl(tS,B):u.encoding===1?n.cffEncoding=new Bl(eS,B):n.cffEncoding=yS(e,t+u.encoding,B),n.encoding=n.encoding||n.cffEncoding,n.glyphs=new sr.GlyphSet(n),r.lowMemory)n._push=function(b){var D=AS(b,w.offsets,e,t+u.charStrings);n.glyphs.push(b,sr.cffGlyphLoader(n,b,u1,D))};else for(var C=0;C<n.nGlyphs;C+=1){var x=w.objects[C];n.glyphs.push(C,sr.cffGlyphLoader(n,C,u1,x))}}function A1(e,t){var n,r=El.indexOf(e);return r>=0&&(n=r),r=t.indexOf(e),r>=0?n=r+El.length:(n=El.length+t.length,t.push(e)),n}function ES(){return new tt.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 BS(e){var t=new tt.Record("Name INDEX",[{name:"names",type:"INDEX",value:[]}]);t.names=[];for(var n=0;n<e.length;n+=1)t.names.push({name:"name_"+n,type:"NAME",value:e[n]});return t}function h1(e,t,n){for(var r={},i=0;i<e.length;i+=1){var a=e[i],s=t[a.name];s!==void 0&&!r1(s,a.value)&&(a.type==="SID"&&(s=A1(s,n)),r[a.op]={name:a.name,type:a.type,value:s})}return r}function f1(e,t){var n=new tt.Record("Top DICT",[{name:"dict",type:"DICT",value:{}}]);return n.dict=h1(s1,e,t),n}function g1(e){var t=new tt.Record("Top DICT INDEX",[{name:"topDicts",type:"INDEX",value:[]}]);return t.topDicts=[{name:"topDict_0",type:"TABLE",value:e}],t}function CS(e){var t=new tt.Record("String INDEX",[{name:"strings",type:"INDEX",value:[]}]);t.strings=[];for(var n=0;n<e.length;n+=1)t.strings.push({name:"string_"+n,type:"STRING",value:e[n]});return t}function xS(){return new tt.Record("Global Subr INDEX",[{name:"subrs",type:"INDEX",value:[]}])}function bS(e,t){for(var n=new tt.Record("Charsets",[{name:"format",type:"Card8",value:0}]),r=0;r<e.length;r+=1){var i=e[r],a=A1(i,t);n.fields.push({name:"glyph_"+r,type:"SID",value:a})}return n}function SS(e){var t=[],n=e.path;t.push({name:"width",type:"NUMBER",value:e.advanceWidth});for(var r=0,i=0,a=0;a<n.commands.length;a+=1){var s=void 0,o=void 0,c=n.commands[a];if(c.type==="Q"){var l=.3333333333333333,u=2/3;c={type:"C",x:c.x,y:c.y,x1:Math.round(l*r+u*c.x1),y1:Math.round(l*i+u*c.y1),x2:Math.round(l*c.x+u*c.x1),y2:Math.round(l*c.y+u*c.y1)}}if(c.type==="M")s=Math.round(c.x-r),o=Math.round(c.y-i),t.push({name:"dx",type:"NUMBER",value:s}),t.push({name:"dy",type:"NUMBER",value:o}),t.push({name:"rmoveto",type:"OP",value:21}),r=Math.round(c.x),i=Math.round(c.y);else if(c.type==="L")s=Math.round(c.x-r),o=Math.round(c.y-i),t.push({name:"dx",type:"NUMBER",value:s}),t.push({name:"dy",type:"NUMBER",value:o}),t.push({name:"rlineto",type:"OP",value:5}),r=Math.round(c.x),i=Math.round(c.y);else if(c.type==="C"){var A=Math.round(c.x1-r),h=Math.round(c.y1-i),f=Math.round(c.x2-c.x1),d=Math.round(c.y2-c.y1);s=Math.round(c.x-c.x2),o=Math.round(c.y-c.y2),t.push({name:"dx1",type:"NUMBER",value:A}),t.push({name:"dy1",type:"NUMBER",value:h}),t.push({name:"dx2",type:"NUMBER",value:f}),t.push({name:"dy2",type:"NUMBER",value:d}),t.push({name:"dx",type:"NUMBER",value:s}),t.push({name:"dy",type:"NUMBER",value:o}),t.push({name:"rrcurveto",type:"OP",value:8}),r=Math.round(c.x),i=Math.round(c.y)}}return t.push({name:"endchar",type:"OP",value:14}),t}function DS(e){for(var t=new tt.Record("CharStrings INDEX",[{name:"charStrings",type:"INDEX",value:[]}]),n=0;n<e.length;n+=1){var r=e.get(n),i=SS(r);t.charStrings.push({name:r.name,type:"CHARSTRING",value:i})}return t}function IS(e,t){var n=new tt.Record("Private DICT",[{name:"dict",type:"DICT",value:{}}]);return n.dict=h1(o1,e,t),n}function FS(e,t){for(var n=new tt.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,i={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]},a={},s=[],o,c=1;c<e.length;c+=1)o=e.get(c),s.push(o.name);var l=[];n.header=ES(),n.nameIndex=BS([t.postScriptName]);var u=f1(i,l);n.topDictIndex=g1(u),n.globalSubrIndex=xS(),n.charsets=bS(s,l),n.charStringsIndex=DS(e),n.privateDict=IS(a,l),n.stringIndex=CS(l);var A=n.header.sizeOf()+n.nameIndex.sizeOf()+n.topDictIndex.sizeOf()+n.stringIndex.sizeOf()+n.globalSubrIndex.sizeOf();return i.charset=A,i.encoding=0,i.charStrings=i.charset+n.charsets.sizeOf(),i.private[1]=i.charStrings+n.charStringsIndex.sizeOf(),u=f1(i,l),n.topDictIndex=g1(u),n}var d1={parse:vS,make:FS};function QS(e,t){var n={},r=new rt.Parser(e,t);return n.version=r.parseVersion(),n.fontRevision=Math.round(r.parseFixed()*1e3)/1e3,n.checkSumAdjustment=r.parseULong(),n.magicNumber=r.parseULong(),ht.argument(n.magicNumber===1594834165,"Font header has wrong magic number."),n.flags=r.parseUShort(),n.unitsPerEm=r.parseUShort(),n.created=r.parseLongDateTime(),n.modified=r.parseLongDateTime(),n.xMin=r.parseShort(),n.yMin=r.parseShort(),n.xMax=r.parseShort(),n.yMax=r.parseShort(),n.macStyle=r.parseUShort(),n.lowestRecPPEM=r.parseUShort(),n.fontDirectionHint=r.parseShort(),n.indexToLocFormat=r.parseShort(),n.glyphDataFormat=r.parseShort(),n}function MS(e){var t=Math.round(new Date().getTime()/1e3)+2082844800,n=t;return e.createdTimestamp&&(n=e.createdTimestamp+2082844800),new tt.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: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 p1={parse:QS,make:MS};function TS(e,t){var n={},r=new rt.Parser(e,t);return n.version=r.parseVersion(),n.ascender=r.parseShort(),n.descender=r.parseShort(),n.lineGap=r.parseShort(),n.advanceWidthMax=r.parseUShort(),n.minLeftSideBearing=r.parseShort(),n.minRightSideBearing=r.parseShort(),n.xMaxExtent=r.parseShort(),n.caretSlopeRise=r.parseShort(),n.caretSlopeRun=r.parseShort(),n.caretOffset=r.parseShort(),r.relativeOffset+=8,n.metricDataFormat=r.parseShort(),n.numberOfHMetrics=r.parseUShort(),n}function NS(e){return new tt.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 m1={parse:TS,make:NS};function PS(e,t,n,r,i){for(var a,s,o=new rt.Parser(e,t),c=0;c<r;c+=1){c<n&&(a=o.parseUShort(),s=o.parseShort());var l=i.get(c);l.advanceWidth=a,l.leftSideBearing=s}}function kS(e,t,n,r,i){e._hmtxTableData={};for(var a,s,o=new rt.Parser(t,n),c=0;c<i;c+=1)c<r&&(a=o.parseUShort(),s=o.parseShort()),e._hmtxTableData[c]={advanceWidth:a,leftSideBearing:s}}function RS(e,t,n,r,i,a,s){s.lowMemory?kS(e,t,n,r,i):PS(t,n,r,i,a)}function OS(e){for(var t=new tt.Table("hmtx",[]),n=0;n<e.length;n+=1){var r=e.get(n),i=r.advanceWidth||0,a=r.leftSideBearing||0;t.fields.push({name:"advanceWidth_"+n,type:"USHORT",value:i}),t.fields.push({name:"leftSideBearing_"+n,type:"SHORT",value:a})}return t}var y1={parse:RS,make:OS};function US(e){for(var t=new tt.Table("ltag",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"numTags",type:"ULONG",value:e.length}]),n="",r=12+e.length*4,i=0;i<e.length;++i){var a=n.indexOf(e[i]);a<0&&(a=n.length,n+=e[i]),t.fields.push({name:"offset "+i,type:"USHORT",value:r+a}),t.fields.push({name:"length "+i,type:"USHORT",value:e[i].length})}return t.fields.push({name:"stringPool",type:"CHARARRAY",value:n}),t}function LS(e,t){var n=new rt.Parser(e,t),r=n.parseULong();ht.argument(r===1,"Unsupported ltag table version."),n.skip("uLong",1);for(var i=n.parseULong(),a=[],s=0;s<i;s++){for(var o="",c=t+n.parseUShort(),l=n.parseUShort(),u=c;u<c+l;++u)o+=String.fromCharCode(e.getInt8(u));a.push(o)}return a}var w1={make:US,parse:LS};function YS(e,t){var n={},r=new rt.Parser(e,t);return n.version=r.parseVersion(),n.numGlyphs=r.parseUShort(),n.version===1&&(n.maxPoints=r.parseUShort(),n.maxContours=r.parseUShort(),n.maxCompositePoints=r.parseUShort(),n.maxCompositeContours=r.parseUShort(),n.maxZones=r.parseUShort(),n.maxTwilightPoints=r.parseUShort(),n.maxStorage=r.parseUShort(),n.maxFunctionDefs=r.parseUShort(),n.maxInstructionDefs=r.parseUShort(),n.maxStackElements=r.parseUShort(),n.maxSizeOfInstructions=r.parseUShort(),n.maxComponentElements=r.parseUShort(),n.maxComponentDepth=r.parseUShort()),n}function HS(e){return new tt.Table("maxp",[{name:"version",type:"FIXED",value:20480},{name:"numGlyphs",type:"USHORT",value:e}])}var v1={parse:YS,make:HS},E1=["copyright","fontFamily","fontSubfamily","uniqueID","fullName","version","postScriptName","trademark","manufacturer","designer","description","manufacturerURL","designerURL","license","licenseURL","reserved","preferredFamily","preferredSubfamily","compatibleFullName","sampleText","postScriptFindFontName","wwsFamily","wwsSubfamily"],B1={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"},GS={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},C1={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 VS(e,t,n){switch(e){case 0:if(t===65535)return"und";if(n)return n[t];break;case 1:return B1[t];case 3:return C1[t]}}var yh="utf-16",zS={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"},JS={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 x1(e,t,n){switch(e){case 0:return yh;case 1:return JS[n]||zS[t];case 3:if(t===1||t===10)return yh;break}}function jS(e,t,n){for(var r={},i=new rt.Parser(e,t),a=i.parseUShort(),s=i.parseUShort(),o=i.offset+i.parseUShort(),c=0;c<s;c++){var l=i.parseUShort(),u=i.parseUShort(),A=i.parseUShort(),h=i.parseUShort(),f=E1[h]||h,d=i.parseUShort(),p=i.parseUShort(),m=VS(l,A,n),y=x1(l,u,A);if(y!==void 0&&m!==void 0){var v=void 0;if(y===yh?v=Sa.UTF16(e,o+p,d):v=Sa.MACSTRING(e,o+p,d,y),v){var w=r[f];w===void 0&&(w=r[f]={}),w[m]=v}}}return a===1&&i.parseUShort(),r}function wh(e){var t={};for(var n in e)t[e[n]]=parseInt(n);return t}function b1(e,t,n,r,i,a){return new tt.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:r},{name:"length",type:"USHORT",value:i},{name:"offset",type:"USHORT",value:a}])}function WS(e,t){var n=e.length,r=t.length-n+1;t:for(var i=0;i<r;i++)for(;i<r;i++){for(var a=0;a<n;a++)if(t[i+a]!==e[a])continue t;return i}return-1}function S1(e,t){var n=WS(e,t);if(n<0){n=t.length;for(var r=0,i=e.length;r<i;++r)t.push(e[r])}return n}function KS(e,t){var n,r=[],i={},a=wh(E1);for(var s in e){var o=a[s];if(o===void 0&&(o=s),n=parseInt(o),isNaN(n))throw new Error('Name table entry "'+s+'" does not exist, see nameTableNames for complete list.');i[n]=e[s],r.push(n)}for(var c=wh(B1),l=wh(C1),u=[],A=[],h=0;h<r.length;h++){n=r[h];var f=i[n];for(var d in f){var p=f[d],m=1,y=c[d],v=GS[y],w=x1(m,v,y),B=K.MACSTRING(p,w);B===void 0&&(m=0,y=t.indexOf(d),y<0&&(y=t.length,t.push(d)),v=4,B=K.UTF16(p));var C=S1(B,A);u.push(b1(m,v,y,n,B.length,C));var x=l[d];if(x!==void 0){var b=K.UTF16(p),D=S1(b,A);u.push(b1(3,1,x,n,b.length,D))}}}u.sort(function(U,L){return U.platformID-L.platformID||U.encodingID-L.encodingID||U.languageID-L.languageID||U.nameID-L.nameID});for(var N=new tt.Table("name",[{name:"format",type:"USHORT",value:0},{name:"count",type:"USHORT",value:u.length},{name:"stringOffset",type:"USHORT",value:6+u.length*12}]),P=0;P<u.length;P++)N.fields.push({name:"record_"+P,type:"RECORD",value:u[P]});return N.fields.push({name:"strings",type:"LITERAL",value:A}),N}var D1={parse:jS,make:KS},vh=[{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 XS(e){for(var t=0;t<vh.length;t+=1){var n=vh[t];if(e>=n.begin&&e<n.end)return t}return-1}function _S(e,t){var n={},r=new rt.Parser(e,t);n.version=r.parseUShort(),n.xAvgCharWidth=r.parseShort(),n.usWeightClass=r.parseUShort(),n.usWidthClass=r.parseUShort(),n.fsType=r.parseUShort(),n.ySubscriptXSize=r.parseShort(),n.ySubscriptYSize=r.parseShort(),n.ySubscriptXOffset=r.parseShort(),n.ySubscriptYOffset=r.parseShort(),n.ySuperscriptXSize=r.parseShort(),n.ySuperscriptYSize=r.parseShort(),n.ySuperscriptXOffset=r.parseShort(),n.ySuperscriptYOffset=r.parseShort(),n.yStrikeoutSize=r.parseShort(),n.yStrikeoutPosition=r.parseShort(),n.sFamilyClass=r.parseShort(),n.panose=[];for(var i=0;i<10;i++)n.panose[i]=r.parseByte();return n.ulUnicodeRange1=r.parseULong(),n.ulUnicodeRange2=r.parseULong(),n.ulUnicodeRange3=r.parseULong(),n.ulUnicodeRange4=r.parseULong(),n.achVendID=String.fromCharCode(r.parseByte(),r.parseByte(),r.parseByte(),r.parseByte()),n.fsSelection=r.parseUShort(),n.usFirstCharIndex=r.parseUShort(),n.usLastCharIndex=r.parseUShort(),n.sTypoAscender=r.parseShort(),n.sTypoDescender=r.parseShort(),n.sTypoLineGap=r.parseShort(),n.usWinAscent=r.parseUShort(),n.usWinDescent=r.parseUShort(),n.version>=1&&(n.ulCodePageRange1=r.parseULong(),n.ulCodePageRange2=r.parseULong()),n.version>=2&&(n.sxHeight=r.parseShort(),n.sCapHeight=r.parseShort(),n.usDefaultChar=r.parseUShort(),n.usBreakChar=r.parseUShort(),n.usMaxContent=r.parseUShort()),n}function qS(e){return new tt.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 Eh={parse:_S,make:qS,unicodeRanges:vh,getUnicodeRange:XS};function ZS(e,t){var n={},r=new rt.Parser(e,t);switch(n.version=r.parseVersion(),n.italicAngle=r.parseFixed(),n.underlinePosition=r.parseShort(),n.underlineThickness=r.parseShort(),n.isFixedPitch=r.parseULong(),n.minMemType42=r.parseULong(),n.maxMemType42=r.parseULong(),n.minMemType1=r.parseULong(),n.maxMemType1=r.parseULong(),n.version){case 1:n.names=Di.slice();break;case 2:n.numberOfGlyphs=r.parseUShort(),n.glyphNameIndex=new Array(n.numberOfGlyphs);for(var i=0;i<n.numberOfGlyphs;i++)n.glyphNameIndex[i]=r.parseUShort();n.names=[];for(var a=0;a<n.numberOfGlyphs;a++)if(n.glyphNameIndex[a]>=Di.length){var s=r.parseChar();n.names.push(r.parseString(s))}break;case 2.5:n.numberOfGlyphs=r.parseUShort(),n.offset=new Array(n.numberOfGlyphs);for(var o=0;o<n.numberOfGlyphs;o++)n.offset[o]=r.parseChar();break}return n}function $S(){return new tt.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 I1={parse:ZS,make:$S},kn=new Array(9);kn[1]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{substFormat:1,coverage:this.parsePointer(R.coverage),deltaGlyphId:this.parseUShort()};if(t===2)return{substFormat:2,coverage:this.parsePointer(R.coverage),substitute:this.parseOffset16List()};ht.assert(!1,"0x"+e.toString(16)+": lookup type 1 format must be 1 or 2.")},kn[2]=function(){var e=this.parseUShort();return ht.argument(e===1,"GSUB Multiple Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(R.coverage),sequences:this.parseListOfLists()}},kn[3]=function(){var e=this.parseUShort();return ht.argument(e===1,"GSUB Alternate Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(R.coverage),alternateSets:this.parseListOfLists()}},kn[4]=function(){var e=this.parseUShort();return ht.argument(e===1,"GSUB ligature table identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(R.coverage),ligatureSets:this.parseListOfLists(function(){return{ligGlyph:this.parseUShort(),components:this.parseUShortList(this.parseUShort()-1)}})}};var Da={sequenceIndex:R.uShort,lookupListIndex:R.uShort};kn[5]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{substFormat:t,coverage:this.parsePointer(R.coverage),ruleSets:this.parseListOfLists(function(){var i=this.parseUShort(),a=this.parseUShort();return{input:this.parseUShortList(i-1),lookupRecords:this.parseRecordList(a,Da)}})};if(t===2)return{substFormat:t,coverage:this.parsePointer(R.coverage),classDef:this.parsePointer(R.classDef),classSets:this.parseListOfLists(function(){var i=this.parseUShort(),a=this.parseUShort();return{classes:this.parseUShortList(i-1),lookupRecords:this.parseRecordList(a,Da)}})};if(t===3){var n=this.parseUShort(),r=this.parseUShort();return{substFormat:t,coverages:this.parseList(n,R.pointer(R.coverage)),lookupRecords:this.parseRecordList(r,Da)}}ht.assert(!1,"0x"+e.toString(16)+": lookup type 5 format must be 1, 2 or 3.")},kn[6]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{substFormat:1,coverage:this.parsePointer(R.coverage),chainRuleSets:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(Da)}})};if(t===2)return{substFormat:2,coverage:this.parsePointer(R.coverage),backtrackClassDef:this.parsePointer(R.classDef),inputClassDef:this.parsePointer(R.classDef),lookaheadClassDef:this.parsePointer(R.classDef),chainClassSet:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(Da)}})};if(t===3)return{substFormat:3,backtrackCoverage:this.parseList(R.pointer(R.coverage)),inputCoverage:this.parseList(R.pointer(R.coverage)),lookaheadCoverage:this.parseList(R.pointer(R.coverage)),lookupRecords:this.parseRecordList(Da)};ht.assert(!1,"0x"+e.toString(16)+": lookup type 6 format must be 1, 2 or 3.")},kn[7]=function(){var e=this.parseUShort();ht.argument(e===1,"GSUB Extension Substitution subtable identifier-format must be 1");var t=this.parseUShort(),n=new R(this.data,this.offset+this.parseULong());return{substFormat:1,lookupType:t,extension:kn[t].call(n)}},kn[8]=function(){var e=this.parseUShort();return ht.argument(e===1,"GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(R.coverage),backtrackCoverage:this.parseList(R.pointer(R.coverage)),lookaheadCoverage:this.parseList(R.pointer(R.coverage)),substitutes:this.parseUShortList()}};function tD(e,t){t=t||0;var n=new R(e,t),r=n.parseVersion(1);return ht.argument(r===1||r===1.1,"Unsupported GSUB table version."),r===1?{version:r,scripts:n.parseScriptList(),features:n.parseFeatureList(),lookups:n.parseLookupList(kn)}:{version:r,scripts:n.parseScriptList(),features:n.parseFeatureList(),lookups:n.parseLookupList(kn),variations:n.parseFeatureVariationsList()}}var Ia=new Array(9);Ia[1]=function(e){return e.substFormat===1?new tt.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new tt.Coverage(e.coverage)},{name:"deltaGlyphID",type:"USHORT",value:e.deltaGlyphId}]):new tt.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:2},{name:"coverage",type:"TABLE",value:new tt.Coverage(e.coverage)}].concat(tt.ushortList("substitute",e.substitute)))},Ia[2]=function(e){return ht.assert(e.substFormat===1,"Lookup type 2 substFormat must be 1."),new tt.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new tt.Coverage(e.coverage)}].concat(tt.tableList("seqSet",e.sequences,function(t){return new tt.Table("sequenceSetTable",tt.ushortList("sequence",t))})))},Ia[3]=function(e){return ht.assert(e.substFormat===1,"Lookup type 3 substFormat must be 1."),new tt.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new tt.Coverage(e.coverage)}].concat(tt.tableList("altSet",e.alternateSets,function(t){return new tt.Table("alternateSetTable",tt.ushortList("alternate",t))})))},Ia[4]=function(e){return ht.assert(e.substFormat===1,"Lookup type 4 substFormat must be 1."),new tt.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new tt.Coverage(e.coverage)}].concat(tt.tableList("ligSet",e.ligatureSets,function(t){return new tt.Table("ligatureSetTable",tt.tableList("ligature",t,function(n){return new tt.Table("ligatureTable",[{name:"ligGlyph",type:"USHORT",value:n.ligGlyph}].concat(tt.ushortList("component",n.components,n.components.length+1)))}))})))},Ia[6]=function(e){if(e.substFormat===1){var t=new tt.Table("chainContextTable",[{name:"substFormat",type:"USHORT",value:e.substFormat},{name:"coverage",type:"TABLE",value:new tt.Coverage(e.coverage)}].concat(tt.tableList("chainRuleSet",e.chainRuleSets,function(i){return new tt.Table("chainRuleSetTable",tt.tableList("chainRule",i,function(a){var s=tt.ushortList("backtrackGlyph",a.backtrack,a.backtrack.length).concat(tt.ushortList("inputGlyph",a.input,a.input.length+1)).concat(tt.ushortList("lookaheadGlyph",a.lookahead,a.lookahead.length)).concat(tt.ushortList("substitution",[],a.lookupRecords.length));return a.lookupRecords.forEach(function(o,c){s=s.concat({name:"sequenceIndex"+c,type:"USHORT",value:o.sequenceIndex}).concat({name:"lookupListIndex"+c,type:"USHORT",value:o.lookupListIndex})}),new tt.Table("chainRuleTable",s)}))})));return t}else if(e.substFormat===2)ht.assert(!1,"lookup type 6 format 2 is not yet supported.");else if(e.substFormat===3){var n=[{name:"substFormat",type:"USHORT",value:e.substFormat}];n.push({name:"backtrackGlyphCount",type:"USHORT",value:e.backtrackCoverage.length}),e.backtrackCoverage.forEach(function(i,a){n.push({name:"backtrackCoverage"+a,type:"TABLE",value:new tt.Coverage(i)})}),n.push({name:"inputGlyphCount",type:"USHORT",value:e.inputCoverage.length}),e.inputCoverage.forEach(function(i,a){n.push({name:"inputCoverage"+a,type:"TABLE",value:new tt.Coverage(i)})}),n.push({name:"lookaheadGlyphCount",type:"USHORT",value:e.lookaheadCoverage.length}),e.lookaheadCoverage.forEach(function(i,a){n.push({name:"lookaheadCoverage"+a,type:"TABLE",value:new tt.Coverage(i)})}),n.push({name:"substitutionCount",type:"USHORT",value:e.lookupRecords.length}),e.lookupRecords.forEach(function(i,a){n=n.concat({name:"sequenceIndex"+a,type:"USHORT",value:i.sequenceIndex}).concat({name:"lookupListIndex"+a,type:"USHORT",value:i.lookupListIndex})});var r=new tt.Table("chainContextTable",n);return r}ht.assert(!1,"lookup type 6 format must be 1, 2 or 3.")};function eD(e){return new tt.Table("GSUB",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new tt.ScriptList(e.scripts)},{name:"features",type:"TABLE",value:new tt.FeatureList(e.features)},{name:"lookups",type:"TABLE",value:new tt.LookupList(e.lookups,Ia)}])}var F1={parse:tD,make:eD};function nD(e,t){var n=new rt.Parser(e,t),r=n.parseULong();ht.argument(r===1,"Unsupported META table version."),n.parseULong(),n.parseULong();for(var i=n.parseULong(),a={},s=0;s<i;s++){var o=n.parseTag(),c=n.parseULong(),l=n.parseULong(),u=Sa.UTF8(e,t+c,l);a[o]=u}return a}function rD(e){var t=Object.keys(e).length,n="",r=16+t*12,i=new tt.Table("meta",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"offset",type:"ULONG",value:r},{name:"numTags",type:"ULONG",value:t}]);for(var a in e){var s=n.length;n+=e[a],i.fields.push({name:"tag "+a,type:"TAG",value:a}),i.fields.push({name:"offset "+a,type:"ULONG",value:r+s}),i.fields.push({name:"length "+a,type:"ULONG",value:e[a].length})}return i.fields.push({name:"stringPool",type:"CHARARRAY",value:n}),i}var Q1={parse:nD,make:rD};function M1(e){return Math.log(e)/Math.log(2)|0}function Bh(e){for(;e.length%4!==0;)e.push(0);for(var t=0,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 T1(e,t,n,r){return new tt.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:r!==void 0?r:0}])}function N1(e){var t=new tt.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;var n=Math.pow(2,M1(t.numTables));t.searchRange=16*n,t.entrySelector=M1(n),t.rangeShift=t.numTables*16-t.searchRange;for(var r=[],i=[],a=t.sizeOf()+T1().sizeOf()*t.numTables;a%4!==0;)a+=1,i.push({name:"padding",type:"BYTE",value:0});for(var s=0;s<e.length;s+=1){var o=e[s];ht.argument(o.tableName.length===4,"Table name"+o.tableName+" is invalid.");var c=o.sizeOf(),l=T1(o.tableName,Bh(o.encode()),a,c);for(r.push({name:l.tag+" Table Record",type:"RECORD",value:l}),i.push({name:o.tableName+" table",type:"RECORD",value:o}),a+=c,ht.argument(!isNaN(a),"Something went wrong calculating the offset.");a%4!==0;)a+=1,i.push({name:"padding",type:"BYTE",value:0})}return r.sort(function(u,A){return u.value.tag>A.value.tag?1:-1}),t.fields=t.fields.concat(r),t.fields=t.fields.concat(i),t}function P1(e,t,n){for(var r=0;r<t.length;r+=1){var i=e.charToGlyphIndex(t[r]);if(i>0){var a=e.glyphs.get(i);return a.getMetrics()}}return n}function iD(e){for(var t=0,n=0;n<e.length;n+=1)t+=e[n];return t/e.length}function aD(e){for(var t=[],n=[],r=[],i=[],a=[],s=[],o=[],c,l=0,u=0,A=0,h=0,f=0,d=0;d<e.glyphs.length;d+=1){var p=e.glyphs.get(d),m=p.unicode|0;if(isNaN(p.advanceWidth))throw new Error("Glyph "+p.name+" ("+d+"): advanceWidth is not a number.");(c>m||c===void 0)&&m>0&&(c=m),l<m&&(l=m);var y=Eh.getUnicodeRange(m);if(y<32)u|=1<<y;else if(y<64)A|=1<<y-32;else if(y<96)h|=1<<y-64;else if(y<123)f|=1<<y-96;else throw new Error("Unicode ranges bits > 123 are reserved for internal usage");if(p.name!==".notdef"){var v=p.getMetrics();t.push(v.xMin),n.push(v.yMin),r.push(v.xMax),i.push(v.yMax),s.push(v.leftSideBearing),o.push(v.rightSideBearing),a.push(p.advanceWidth)}}var w={xMin:Math.min.apply(null,t),yMin:Math.min.apply(null,n),xMax:Math.max.apply(null,r),yMax:Math.max.apply(null,i),advanceWidthMax:Math.max.apply(null,a),advanceWidthAvg:iD(a),minLeftSideBearing:Math.min.apply(null,s),maxLeftSideBearing:Math.max.apply(null,s),minRightSideBearing:Math.min.apply(null,o)};w.ascender=e.ascender,w.descender=e.descender;var B=p1.make({flags:3,unitsPerEm:e.unitsPerEm,xMin:w.xMin,yMin:w.yMin,xMax:w.xMax,yMax:w.yMax,lowestRecPPEM:3,createdTimestamp:e.createdTimestamp}),C=m1.make({ascender:w.ascender,descender:w.descender,advanceWidthMax:w.advanceWidthMax,minLeftSideBearing:w.minLeftSideBearing,minRightSideBearing:w.minRightSideBearing,xMaxExtent:w.maxLeftSideBearing+(w.xMax-w.xMin),numberOfHMetrics:e.glyphs.length}),x=v1.make(e.glyphs.length),b=Eh.make(Object.assign({xAvgCharWidth:Math.round(w.advanceWidthAvg),usFirstCharIndex:c,usLastCharIndex:l,ulUnicodeRange1:u,ulUnicodeRange2:A,ulUnicodeRange3:h,ulUnicodeRange4:f,sTypoAscender:w.ascender,sTypoDescender:w.descender,sTypoLineGap:0,usWinAscent:w.yMax,usWinDescent:Math.abs(w.yMin),ulCodePageRange1:1,sxHeight:P1(e,"xyvw",{yMax:Math.round(w.ascender/2)}).yMax,sCapHeight:P1(e,"HIKLEFJMNTZBDPRAGOQSUVWXY",w).yMax,usDefaultChar:e.hasChar(" ")?32:0,usBreakChar:e.hasChar(" ")?32:0},e.tables.os2)),D=y1.make(e.glyphs),N=t1.make(e.glyphs),P=e.getEnglishName("fontFamily"),U=e.getEnglishName("fontSubfamily"),L=P+" "+U,V=e.getEnglishName("postScriptName");V||(V=P.replace(/\s/g,"")+"-"+U);var W={};for(var J in e.names)W[J]=e.names[J];W.uniqueID||(W.uniqueID={en:e.getEnglishName("manufacturer")+":"+L}),W.postScriptName||(W.postScriptName={en:V}),W.preferredFamily||(W.preferredFamily=e.names.fontFamily),W.preferredSubfamily||(W.preferredSubfamily=e.names.fontSubfamily);var Z=[],et=D1.make(W,Z),ct=Z.length>0?w1.make(Z):void 0,O=I1.make(),M=d1.make(e.glyphs,{version:e.getEnglishName("version"),fullName:L,familyName:P,weightName:U,postScriptName:V,unitsPerEm:e.unitsPerEm,fontBBox:[0,w.yMin,w.ascender,w.advanceWidthMax]}),z=e.metas&&Object.keys(e.metas).length>0?Q1.make(e.metas):void 0,X=[B,C,x,b,et,N,O,M,D];ct&&X.push(ct),e.tables.gsub&&X.push(F1.make(e.tables.gsub)),z&&X.push(z);for(var ot=N1(X),Mt=ot.encode(),yt=Bh(Mt),Se=ot.fields,hn=!1,Xt=0;Xt<Se.length;Xt+=1)if(Se[Xt].name==="head table"){Se[Xt].value.checkSumAdjustment=2981146554-yt,hn=!0;break}if(!hn)throw new Error("Could not find head table with checkSum to adjust.");return ot}var sD={make:N1,fontToTable:aD,computeCheckSum:Bh};function Ch(e,t){for(var n=0,r=e.length-1;n<=r;){var i=n+r>>>1,a=e[i].tag;if(a===t)return i;a<t?n=i+1:r=i-1}return-n-1}function k1(e,t){for(var n=0,r=e.length-1;n<=r;){var i=n+r>>>1,a=e[i];if(a===t)return i;a<t?n=i+1:r=i-1}return-n-1}function R1(e,t){for(var n,r=0,i=e.length-1;r<=i;){var a=r+i>>>1;n=e[a];var s=n.start;if(s===t)return n;s<t?r=a+1:i=a-1}if(r>0)return n=e[r-1],t>n.end?0:n}function Gs(e,t){this.font=e,this.tableName=t}Gs.prototype={searchTag:Ch,binSearch:k1,getTable:function(e){var t=this.font.tables[this.tableName];return!t&&e&&(t=this.font.tables[this.tableName]=this.createDefaultTable()),t},getScriptNames:function(){var e=this.getTable();return e?e.scripts.map(function(t){return t.tag}):[]},getDefaultScriptName:function(){var e=this.getTable();if(e){for(var t=!1,n=0;n<e.scripts.length;n++){var r=e.scripts[n].tag;if(r==="DFLT")return r;r==="latn"&&(t=!0)}if(t)return"latn"}},getScriptTable:function(e,t){var n=this.getTable(t);if(n){e=e||"DFLT";var r=n.scripts,i=Ch(n.scripts,e);if(i>=0)return r[i].script;if(t){var a={tag:e,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}};return r.splice(-1-i,0,a),a.script}}},getLangSysTable:function(e,t,n){var r=this.getScriptTable(e,n);if(r){if(!t||t==="dflt"||t==="DFLT")return r.defaultLangSys;var i=Ch(r.langSysRecords,t);if(i>=0)return r.langSysRecords[i].langSys;if(n){var a={tag:t,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}};return r.langSysRecords.splice(-1-i,0,a),a.langSys}}},getFeatureTable:function(e,t,n,r){var i=this.getLangSysTable(e,t,r);if(i){for(var a,s=i.featureIndexes,o=this.font.tables[this.tableName].features,c=0;c<s.length;c++)if(a=o[s[c]],a.tag===n)return a.feature;if(r){var l=o.length;return ht.assert(l===0||n>=o[l-1].tag,"Features must be added in alphabetical order."),a={tag:n,feature:{params:0,lookupListIndexes:[]}},o.push(a),s.push(l),a.feature}}},getLookupTables:function(e,t,n,r,i){var a=this.getFeatureTable(e,t,n,i),s=[];if(a){for(var o,c=a.lookupListIndexes,l=this.font.tables[this.tableName].lookups,u=0;u<c.length;u++)o=l[c[u]],o.lookupType===r&&s.push(o);if(s.length===0&&i){o={lookupType:r,lookupFlag:0,subtables:[],markFilteringSet:void 0};var A=l.length;return l.push(o),c.push(A),[o]}}return s},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:var n=R1(e.ranges,t);return n?n.classId:0}},getCoverageIndex:function(e,t){switch(e.format){case 1:var n=k1(e.glyphs,t);return n>=0?n:-1;case 2:var r=R1(e.ranges,t);return r?r.index+t-r.start:-1}},expandCoverage:function(e){if(e.format===1)return e.glyphs;for(var t=[],n=e.ranges,r=0;r<n.length;r++)for(var i=n[r],a=i.start,s=i.end,o=a;o<=s;o++)t.push(o);return t}};function Vs(e){Gs.call(this,e,"gpos")}Vs.prototype=Gs.prototype,Vs.prototype.init=function(){var e=this.getDefaultScriptName();this.defaultKerningTables=this.getKerningTables(e)},Vs.prototype.getKerningValue=function(e,t,n){for(var r=0;r<e.length;r++)for(var i=e[r].subtables,a=0;a<i.length;a++){var s=i[a],o=this.getCoverageIndex(s.coverage,t);if(!(o<0))switch(s.posFormat){case 1:for(var c=s.pairSets[o],l=0;l<c.length;l++){var u=c[l];if(u.secondGlyph===n)return u.value1&&u.value1.xAdvance||0}break;case 2:var A=this.getGlyphClass(s.classDef1,t),h=this.getGlyphClass(s.classDef2,n),f=s.classRecords[A][h];return f.value1&&f.value1.xAdvance||0}}return 0},Vs.prototype.getKerningTables=function(e,t){if(this.font.tables.gpos)return this.getLookupTables(e,t,"kern",2)};function mn(e){Gs.call(this,e,"gsub")}function oD(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function xh(e,t,n){for(var r=e.subtables,i=0;i<r.length;i++){var a=r[i];if(a.substFormat===t)return a}if(n)return r.push(n),n}mn.prototype=Gs.prototype,mn.prototype.createDefaultTable=function(){return{version:1,scripts:[{tag:"DFLT",script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}}],features:[],lookups:[]}},mn.prototype.getSingle=function(e,t,n){for(var r=[],i=this.getLookupTables(t,n,e,1),a=0;a<i.length;a++)for(var s=i[a].subtables,o=0;o<s.length;o++){var c=s[o],l=this.expandCoverage(c.coverage),u=void 0;if(c.substFormat===1){var A=c.deltaGlyphId;for(u=0;u<l.length;u++){var h=l[u];r.push({sub:h,by:h+A})}}else{var f=c.substitute;for(u=0;u<l.length;u++)r.push({sub:l[u],by:f[u]})}}return r},mn.prototype.getMultiple=function(e,t,n){for(var r=[],i=this.getLookupTables(t,n,e,2),a=0;a<i.length;a++)for(var s=i[a].subtables,o=0;o<s.length;o++){var c=s[o],l=this.expandCoverage(c.coverage),u=void 0;for(u=0;u<l.length;u++){var A=l[u],h=c.sequences[u];r.push({sub:A,by:h})}}return r},mn.prototype.getAlternates=function(e,t,n){for(var r=[],i=this.getLookupTables(t,n,e,3),a=0;a<i.length;a++)for(var s=i[a].subtables,o=0;o<s.length;o++)for(var c=s[o],l=this.expandCoverage(c.coverage),u=c.alternateSets,A=0;A<l.length;A++)r.push({sub:l[A],by:u[A]});return r},mn.prototype.getLigatures=function(e,t,n){for(var r=[],i=this.getLookupTables(t,n,e,4),a=0;a<i.length;a++)for(var s=i[a].subtables,o=0;o<s.length;o++)for(var c=s[o],l=this.expandCoverage(c.coverage),u=c.ligatureSets,A=0;A<l.length;A++)for(var h=l[A],f=u[A],d=0;d<f.length;d++){var p=f[d];r.push({sub:[h].concat(p.components),by:p.ligGlyph})}return r},mn.prototype.addSingle=function(e,t,n,r){var i=this.getLookupTables(n,r,e,1,!0)[0],a=xh(i,2,{substFormat:2,coverage:{format:1,glyphs:[]},substitute:[]});ht.assert(a.coverage.format===1,"Single: unable to modify coverage table format "+a.coverage.format);var s=t.sub,o=this.binSearch(a.coverage.glyphs,s);o<0&&(o=-1-o,a.coverage.glyphs.splice(o,0,s),a.substitute.splice(o,0,0)),a.substitute[o]=t.by},mn.prototype.addMultiple=function(e,t,n,r){ht.assert(t.by instanceof Array&&t.by.length>1,'Multiple: "by" must be an array of two or more ids');var i=this.getLookupTables(n,r,e,2,!0)[0],a=xh(i,1,{substFormat:1,coverage:{format:1,glyphs:[]},sequences:[]});ht.assert(a.coverage.format===1,"Multiple: unable to modify coverage table format "+a.coverage.format);var s=t.sub,o=this.binSearch(a.coverage.glyphs,s);o<0&&(o=-1-o,a.coverage.glyphs.splice(o,0,s),a.sequences.splice(o,0,0)),a.sequences[o]=t.by},mn.prototype.addAlternate=function(e,t,n,r){var i=this.getLookupTables(n,r,e,3,!0)[0],a=xh(i,1,{substFormat:1,coverage:{format:1,glyphs:[]},alternateSets:[]});ht.assert(a.coverage.format===1,"Alternate: unable to modify coverage table format "+a.coverage.format);var s=t.sub,o=this.binSearch(a.coverage.glyphs,s);o<0&&(o=-1-o,a.coverage.glyphs.splice(o,0,s),a.alternateSets.splice(o,0,0)),a.alternateSets[o]=t.by},mn.prototype.addLigature=function(e,t,n,r){var i=this.getLookupTables(n,r,e,4,!0)[0],a=i.subtables[0];a||(a={substFormat:1,coverage:{format:1,glyphs:[]},ligatureSets:[]},i.subtables[0]=a),ht.assert(a.coverage.format===1,"Ligature: unable to modify coverage table format "+a.coverage.format);var s=t.sub[0],o=t.sub.slice(1),c={ligGlyph:t.by,components:o},l=this.binSearch(a.coverage.glyphs,s);if(l>=0){for(var u=a.ligatureSets[l],A=0;A<u.length;A++)if(oD(u[A].components,o))return;u.push(c)}else l=-1-l,a.coverage.glyphs.splice(l,0,s),a.ligatureSets.splice(l,0,[c])},mn.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)}},mn.prototype.add=function(e,t,n,r){if(/ss\d\d/.test(e))return this.addSingle(e,t,n,r);switch(e){case"aalt":case"salt":return typeof t.by=="number"?this.addSingle(e,t,n,r):this.addAlternate(e,t,n,r);case"dlig":case"liga":case"rlig":return this.addLigature(e,t,n,r);case"ccmp":return t.by instanceof Array?this.addMultiple(e,t,n,r):this.addLigature(e,t,n,r)}};function cD(){return typeof window<"u"}function O1(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0;r<e.length;++r)n[r]=e[r];return t}function lD(e){for(var t=new Buffer(e.byteLength),n=new Uint8Array(e),r=0;r<t.length;++r)t[r]=n[r];return t}function zs(e,t){if(!e)throw t}function U1(e,t,n,r,i){var a;return(t&r)>0?(a=e.parseByte(),t&i||(a=-a),a=n+a):(t&i)>0?a=n:a=n+e.parseShort(),a}function L1(e,t,n){var r=new rt.Parser(t,n);e.numberOfContours=r.parseShort(),e._xMin=r.parseShort(),e._yMin=r.parseShort(),e._xMax=r.parseShort(),e._yMax=r.parseShort();var i,a;if(e.numberOfContours>0){for(var s=e.endPointIndices=[],o=0;o<e.numberOfContours;o+=1)s.push(r.parseUShort());e.instructionLength=r.parseUShort(),e.instructions=[];for(var c=0;c<e.instructionLength;c+=1)e.instructions.push(r.parseByte());var l=s[s.length-1]+1;i=[];for(var u=0;u<l;u+=1)if(a=r.parseByte(),i.push(a),(a&8)>0)for(var A=r.parseByte(),h=0;h<A;h+=1)i.push(a),u+=1;if(ht.argument(i.length===l,"Bad flags."),s.length>0){var f=[],d;if(l>0){for(var p=0;p<l;p+=1)a=i[p],d={},d.onCurve=!!(a&1),d.lastPointOfContour=s.indexOf(p)>=0,f.push(d);for(var m=0,y=0;y<l;y+=1)a=i[y],d=f[y],d.x=U1(r,a,m,2,16),m=d.x;for(var v=0,w=0;w<l;w+=1)a=i[w],d=f[w],d.y=U1(r,a,v,4,32),v=d.y}e.points=f}else e.points=[]}else if(e.numberOfContours===0)e.points=[];else{e.isComposite=!0,e.points=[],e.components=[];for(var B=!0;B;){i=r.parseUShort();var C={glyphIndex:r.parseUShort(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0};(i&1)>0?(i&2)>0?(C.dx=r.parseShort(),C.dy=r.parseShort()):C.matchedPoints=[r.parseUShort(),r.parseUShort()]:(i&2)>0?(C.dx=r.parseChar(),C.dy=r.parseChar()):C.matchedPoints=[r.parseByte(),r.parseByte()],(i&8)>0?C.xScale=C.yScale=r.parseF2Dot14():(i&64)>0?(C.xScale=r.parseF2Dot14(),C.yScale=r.parseF2Dot14()):(i&128)>0&&(C.xScale=r.parseF2Dot14(),C.scale01=r.parseF2Dot14(),C.scale10=r.parseF2Dot14(),C.yScale=r.parseF2Dot14()),e.components.push(C),B=!!(i&32)}if(i&256){e.instructionLength=r.parseUShort(),e.instructions=[];for(var x=0;x<e.instructionLength;x+=1)e.instructions.push(r.parseByte())}}}function bh(e,t){for(var n=[],r=0;r<e.length;r+=1){var i=e[r],a={x:t.xScale*i.x+t.scale01*i.y+t.dx,y:t.scale10*i.x+t.yScale*i.y+t.dy,onCurve:i.onCurve,lastPointOfContour:i.lastPointOfContour};n.push(a)}return n}function uD(e){for(var t=[],n=[],r=0;r<e.length;r+=1){var i=e[r];n.push(i),i.lastPointOfContour&&(t.push(n),n=[])}return ht.argument(n.length===0,"There are still points left in the current contour."),t}function Y1(e){var t=new ye;if(!e)return t;for(var n=uD(e),r=0;r<n.length;++r){var i=n[r],a=null,s=i[i.length-1],o=i[0];if(s.onCurve)t.moveTo(s.x,s.y);else if(o.onCurve)t.moveTo(o.x,o.y);else{var c={x:(s.x+o.x)*.5,y:(s.y+o.y)*.5};t.moveTo(c.x,c.y)}for(var l=0;l<i.length;++l)if(a=s,s=o,o=i[(l+1)%i.length],s.onCurve)t.lineTo(s.x,s.y);else{var u=o;a.onCurve||((s.x+a.x)*.5,(s.y+a.y)*.5),o.onCurve||(u={x:(s.x+o.x)*.5,y:(s.y+o.y)*.5}),t.quadraticCurveTo(s.x,s.y,u.x,u.y)}t.closePath()}return t}function H1(e,t){if(t.isComposite)for(var n=0;n<t.components.length;n+=1){var r=t.components[n],i=e.get(r.glyphIndex);if(i.getPath(),i.points){var a=void 0;if(r.matchedPoints===void 0)a=bh(i.points,r);else{if(r.matchedPoints[0]>t.points.length-1||r.matchedPoints[1]>i.points.length-1)throw Error("Matched points out of range in "+t.name);var s=t.points[r.matchedPoints[0]],o=i.points[r.matchedPoints[1]],c={xScale:r.xScale,scale01:r.scale01,scale10:r.scale10,yScale:r.yScale,dx:0,dy:0};o=bh([o],c)[0],c.dx=s.x-o.x,c.dy=s.y-o.y,a=bh(i.points,c)}t.points=t.points.concat(a)}}return Y1(t.points)}function AD(e,t,n,r){for(var i=new sr.GlyphSet(r),a=0;a<n.length-1;a+=1){var s=n[a],o=n[a+1];s!==o?i.push(a,sr.ttfGlyphLoader(r,a,L1,e,t+s,H1)):i.push(a,sr.glyphLoader(r,a))}return i}function hD(e,t,n,r){var i=new sr.GlyphSet(r);return r._push=function(a){var s=n[a],o=n[a+1];s!==o?i.push(a,sr.ttfGlyphLoader(r,a,L1,e,t+s,H1)):i.push(a,sr.glyphLoader(r,a))},i}function fD(e,t,n,r,i){return i.lowMemory?hD(e,t,n,r):AD(e,t,n,r)}var G1={getPath:Y1,parse:fD},V1,Fi,z1,Sh;function J1(e){this.font=e,this.getCommands=function(t){return G1.getPath(t).commands},this._fpgmState=this._prepState=void 0,this._errorState=0}function gD(e){return e}function j1(e){return Math.sign(e)*Math.round(Math.abs(e))}function dD(e){return Math.sign(e)*Math.round(Math.abs(e*2))/2}function pD(e){return Math.sign(e)*(Math.round(Math.abs(e)+.5)-.5)}function mD(e){return Math.sign(e)*Math.ceil(Math.abs(e))}function yD(e){return Math.sign(e)*Math.floor(Math.abs(e))}var W1=function(e){var t=this.srPeriod,n=this.srPhase,r=this.srThreshold,i=1;return e<0&&(e=-e,i=-1),e+=r-n,e=Math.trunc(e/t)*t,e+=n,e<0?n*i:e*i},or={x:1,y:0,axis:"x",distance:function(e,t,n,r){return(n?e.xo:e.x)-(r?t.xo:t.x)},interpolate:function(e,t,n,r){var i,a,s,o,c,l,u;if(!r||r===this){if(i=e.xo-t.xo,a=e.xo-n.xo,c=t.x-t.xo,l=n.x-n.xo,s=Math.abs(i),o=Math.abs(a),u=s+o,u===0){e.x=e.xo+(c+l)/2;return}e.x=e.xo+(c*o+l*s)/u;return}if(i=r.distance(e,t,!0,!0),a=r.distance(e,n,!0,!0),c=r.distance(t,t,!1,!0),l=r.distance(n,n,!1,!0),s=Math.abs(i),o=Math.abs(a),u=s+o,u===0){or.setRelative(e,e,(c+l)/2,r,!0);return}or.setRelative(e,e,(c*o+l*s)/u,r,!0)},normalSlope:Number.NEGATIVE_INFINITY,setRelative:function(e,t,n,r,i){if(!r||r===this){e.x=(i?t.xo:t.x)+n;return}var a=i?t.xo:t.x,s=i?t.yo:t.y,o=a+n*r.x,c=s+n*r.y;e.x=o+(e.y-c)/r.normalSlope},slope:0,touch:function(e){e.xTouched=!0},touched:function(e){return e.xTouched},untouch:function(e){e.xTouched=!1}},yr={x:0,y:1,axis:"y",distance:function(e,t,n,r){return(n?e.yo:e.y)-(r?t.yo:t.y)},interpolate:function(e,t,n,r){var i,a,s,o,c,l,u;if(!r||r===this){if(i=e.yo-t.yo,a=e.yo-n.yo,c=t.y-t.yo,l=n.y-n.yo,s=Math.abs(i),o=Math.abs(a),u=s+o,u===0){e.y=e.yo+(c+l)/2;return}e.y=e.yo+(c*o+l*s)/u;return}if(i=r.distance(e,t,!0,!0),a=r.distance(e,n,!0,!0),c=r.distance(t,t,!1,!0),l=r.distance(n,n,!1,!0),s=Math.abs(i),o=Math.abs(a),u=s+o,u===0){yr.setRelative(e,e,(c+l)/2,r,!0);return}yr.setRelative(e,e,(c*o+l*s)/u,r,!0)},normalSlope:0,setRelative:function(e,t,n,r,i){if(!r||r===this){e.y=(i?t.yo:t.y)+n;return}var a=i?t.xo:t.x,s=i?t.yo:t.y,o=a+n*r.x,c=s+n*r.y;e.y=c+r.normalSlope*(e.x-o)},slope:Number.POSITIVE_INFINITY,touch:function(e){e.yTouched=!0},touched:function(e){return e.yTouched},untouch:function(e){e.yTouched=!1}};Object.freeze(or),Object.freeze(yr);function Js(e,t){this.x=e,this.y=t,this.axis=void 0,this.slope=t/e,this.normalSlope=-e/t,Object.freeze(this)}Js.prototype.distance=function(e,t,n,r){return this.x*or.distance(e,t,n,r)+this.y*yr.distance(e,t,n,r)},Js.prototype.interpolate=function(e,t,n,r){var i,a,s,o,c,l,u;if(s=r.distance(e,t,!0,!0),o=r.distance(e,n,!0,!0),i=r.distance(t,t,!1,!0),a=r.distance(n,n,!1,!0),c=Math.abs(s),l=Math.abs(o),u=c+l,u===0){this.setRelative(e,e,(i+a)/2,r,!0);return}this.setRelative(e,e,(i*l+a*c)/u,r,!0)},Js.prototype.setRelative=function(e,t,n,r,i){r=r||this;var a=i?t.xo:t.x,s=i?t.yo:t.y,o=a+n*r.x,c=s+n*r.y,l=r.normalSlope,u=this.slope,A=e.x,h=e.y;e.x=(u*A-l*o+c-h)/(u-l),e.y=u*(e.x-A)+h},Js.prototype.touch=function(e){e.xTouched=!0,e.yTouched=!0};function js(e,t){var n=Math.sqrt(e*e+t*t);return e/=n,t/=n,e===1&&t===0?or:e===0&&t===1?yr:new Js(e,t)}function wr(e,t,n,r){this.x=this.xo=Math.round(e*64)/64,this.y=this.yo=Math.round(t*64)/64,this.lastPointOfContour=n,this.onCurve=r,this.prevPointOnContour=void 0,this.nextPointOnContour=void 0,this.xTouched=!1,this.yTouched=!1,Object.preventExtensions(this)}wr.prototype.nextTouched=function(e){for(var t=this.nextPointOnContour;!e.touched(t)&&t!==this;)t=t.nextPointOnContour;return t},wr.prototype.prevTouched=function(e){for(var t=this.prevPointOnContour;!e.touched(t)&&t!==this;)t=t.prevPointOnContour;return t};var Ws=Object.freeze(new wr(0,0)),wD={cvCutIn:17/16,deltaBase:9,deltaShift:.125,loop:1,minDis:1,autoFlip:!0};function Kr(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=or,this.round=j1}}J1.prototype.exec=function(e,t){if(typeof t!="number")throw new Error("Point size is not a number!");if(!(this._errorState>2)){var n=this.font,r=this._prepState;if(!r||r.ppem!==t){var i=this._fpgmState;if(!i){Kr.prototype=wD,i=this._fpgmState=new Kr("fpgm",n.tables.fpgm),i.funcs=[],i.font=n,I.DEBUG&&(console.log("---EXEC FPGM---"),i.step=-1);try{Fi(i)}catch(l){console.log("Hinting error in FPGM:"+l),this._errorState=3;return}}Kr.prototype=i,r=this._prepState=new Kr("prep",n.tables.prep),r.ppem=t;var a=n.tables.cvt;if(a)for(var s=r.cvt=new Array(a.length),o=t/n.unitsPerEm,c=0;c<a.length;c++)s[c]=a[c]*o;else r.cvt=[];I.DEBUG&&(console.log("---EXEC PREP---"),r.step=-1);try{Fi(r)}catch(l){this._errorState<2&&console.log("Hinting error in PREP:"+l),this._errorState=2}}if(!(this._errorState>1))try{return z1(e,r)}catch(l){this._errorState<1&&(console.log("Hinting error:"+l),console.log("Note: further hinting errors are silenced")),this._errorState=1;return}}},z1=function(e,t){var n=t.ppem/t.font.unitsPerEm,r=n,i=e.components,a,s,o;if(Kr.prototype=t,!i)o=new Kr("glyf",e.instructions),I.DEBUG&&(console.log("---EXEC GLYPH---"),o.step=-1),Sh(e,o,n,r),s=o.gZone;else{var c=t.font;s=[],a=[];for(var l=0;l<i.length;l++){var u=i[l],A=c.glyphs.get(u.glyphIndex);o=new Kr("glyf",A.instructions),I.DEBUG&&(console.log("---EXEC COMP "+l+"---"),o.step=-1),Sh(A,o,n,r);for(var h=Math.round(u.dx*n),f=Math.round(u.dy*r),d=o.gZone,p=o.contours,m=0;m<d.length;m++){var y=d[m];y.xTouched=y.yTouched=!1,y.xo=y.x=y.x+h,y.yo=y.y=y.y+f}var v=s.length;s.push.apply(s,d);for(var w=0;w<p.length;w++)a.push(p[w]+v)}e.instructions&&!o.inhibitGridFit&&(o=new Kr("glyf",e.instructions),o.gZone=o.z0=o.z1=o.z2=s,o.contours=a,s.push(new wr(0,0),new wr(Math.round(e.advanceWidth*n),0)),I.DEBUG&&(console.log("---EXEC COMPOSITE---"),o.step=-1),Fi(o),s.length-=2)}return s},Sh=function(e,t,n,r){for(var i=e.points||[],a=i.length,s=t.gZone=t.z0=t.z1=t.z2=[],o=t.contours=[],c,l=0;l<a;l++)c=i[l],s[l]=new wr(c.x*n,c.y*r,c.lastPointOfContour,c.onCurve);for(var u,A,h=0;h<a;h++)c=s[h],u||(u=c,o.push(h)),c.lastPointOfContour?(c.nextPointOnContour=u,u.prevPointOnContour=c,u=void 0):(A=s[h+1],c.nextPointOnContour=A,A.prevPointOnContour=c);if(!t.inhibitGridFit){if(I.DEBUG){console.log("PROCESSING GLYPH",t.stack);for(var f=0;f<a;f++)console.log(f,s[f].x,s[f].y)}if(s.push(new wr(0,0),new wr(Math.round(e.advanceWidth*n),0)),Fi(t),s.length-=2,I.DEBUG){console.log("FINISHED GLYPH",t.stack);for(var d=0;d<a;d++)console.log(d,s[d].x,s[d].y)}}},Fi=function(e){var t=e.prog;if(t){var n=t.length,r;for(e.ip=0;e.ip<n;e.ip++){if(I.DEBUG&&e.step++,r=V1[t[e.ip]],!r)throw new Error("unknown instruction: 0x"+Number(t[e.ip]).toString(16));r(e)}}};function xl(e){for(var t=e.tZone=new Array(e.gZone.length),n=0;n<t.length;n++)t[n]=new wr(0,0)}function K1(e,t){var n=e.prog,r=e.ip,i=1,a;do if(a=n[++r],a===88)i++;else if(a===89)i--;else if(a===64)r+=n[r+1]+1;else if(a===65)r+=2*n[r+1]+1;else if(a>=176&&a<=183)r+=a-176+1;else if(a>=184&&a<=191)r+=(a-184+1)*2;else if(t&&i===1&&a===27)break;while(i>0);e.ip=r}function X1(e,t){I.DEBUG&&console.log(t.step,"SVTCA["+e.axis+"]"),t.fv=t.pv=t.dpv=e}function _1(e,t){I.DEBUG&&console.log(t.step,"SPVTCA["+e.axis+"]"),t.pv=t.dpv=e}function q1(e,t){I.DEBUG&&console.log(t.step,"SFVTCA["+e.axis+"]"),t.fv=e}function Z1(e,t){var n=t.stack,r=n.pop(),i=n.pop(),a=t.z2[r],s=t.z1[i];I.DEBUG&&console.log("SPVTL["+e+"]",r,i);var o,c;e?(o=a.y-s.y,c=s.x-a.x):(o=s.x-a.x,c=s.y-a.y),t.pv=t.dpv=js(o,c)}function $1(e,t){var n=t.stack,r=n.pop(),i=n.pop(),a=t.z2[r],s=t.z1[i];I.DEBUG&&console.log("SFVTL["+e+"]",r,i);var o,c;e?(o=a.y-s.y,c=s.x-a.x):(o=s.x-a.x,c=s.y-a.y),t.fv=js(o,c)}function vD(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"SPVFS[]",n,r),e.pv=e.dpv=js(r,n)}function ED(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"SPVFS[]",n,r),e.fv=js(r,n)}function BD(e){var t=e.stack,n=e.pv;I.DEBUG&&console.log(e.step,"GPV[]"),t.push(n.x*16384),t.push(n.y*16384)}function CD(e){var t=e.stack,n=e.fv;I.DEBUG&&console.log(e.step,"GFV[]"),t.push(n.x*16384),t.push(n.y*16384)}function xD(e){e.fv=e.pv,I.DEBUG&&console.log(e.step,"SFVTPV[]")}function bD(e){var t=e.stack,n=t.pop(),r=t.pop(),i=t.pop(),a=t.pop(),s=t.pop(),o=e.z0,c=e.z1,l=o[n],u=o[r],A=c[i],h=c[a],f=e.z2[s];I.DEBUG&&console.log("ISECT[], ",n,r,i,a,s);var d=l.x,p=l.y,m=u.x,y=u.y,v=A.x,w=A.y,B=h.x,C=h.y,x=(d-m)*(w-C)-(p-y)*(v-B),b=d*y-p*m,D=v*C-w*B;f.x=(b*(v-B)-D*(d-m))/x,f.y=(b*(w-C)-D*(p-y))/x}function SD(e){e.rp0=e.stack.pop(),I.DEBUG&&console.log(e.step,"SRP0[]",e.rp0)}function DD(e){e.rp1=e.stack.pop(),I.DEBUG&&console.log(e.step,"SRP1[]",e.rp1)}function ID(e){e.rp2=e.stack.pop(),I.DEBUG&&console.log(e.step,"SRP2[]",e.rp2)}function FD(e){var t=e.stack.pop();switch(I.DEBUG&&console.log(e.step,"SZP0[]",t),e.zp0=t,t){case 0:e.tZone||xl(e),e.z0=e.tZone;break;case 1:e.z0=e.gZone;break;default:throw new Error("Invalid zone pointer")}}function QD(e){var t=e.stack.pop();switch(I.DEBUG&&console.log(e.step,"SZP1[]",t),e.zp1=t,t){case 0:e.tZone||xl(e),e.z1=e.tZone;break;case 1:e.z1=e.gZone;break;default:throw new Error("Invalid zone pointer")}}function MD(e){var t=e.stack.pop();switch(I.DEBUG&&console.log(e.step,"SZP2[]",t),e.zp2=t,t){case 0:e.tZone||xl(e),e.z2=e.tZone;break;case 1:e.z2=e.gZone;break;default:throw new Error("Invalid zone pointer")}}function TD(e){var t=e.stack.pop();switch(I.DEBUG&&console.log(e.step,"SZPS[]",t),e.zp0=e.zp1=e.zp2=t,t){case 0:e.tZone||xl(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 ND(e){e.loop=e.stack.pop(),I.DEBUG&&console.log(e.step,"SLOOP[]",e.loop)}function PD(e){I.DEBUG&&console.log(e.step,"RTG[]"),e.round=j1}function kD(e){I.DEBUG&&console.log(e.step,"RTHG[]"),e.round=pD}function RD(e){var t=e.stack.pop();I.DEBUG&&console.log(e.step,"SMD[]",t),e.minDis=t/64}function OD(e){I.DEBUG&&console.log(e.step,"ELSE[]"),K1(e,!1)}function UD(e){var t=e.stack.pop();I.DEBUG&&console.log(e.step,"JMPR[]",t),e.ip+=t-1}function LD(e){var t=e.stack.pop();I.DEBUG&&console.log(e.step,"SCVTCI[]",t),e.cvCutIn=t/64}function YD(e){var t=e.stack;I.DEBUG&&console.log(e.step,"DUP[]"),t.push(t[t.length-1])}function Dh(e){I.DEBUG&&console.log(e.step,"POP[]"),e.stack.pop()}function HD(e){I.DEBUG&&console.log(e.step,"CLEAR[]"),e.stack.length=0}function GD(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"SWAP[]"),t.push(n),t.push(r)}function VD(e){var t=e.stack;I.DEBUG&&console.log(e.step,"DEPTH[]"),t.push(t.length)}function zD(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"LOOPCALL[]",n,r);var i=e.ip,a=e.prog;e.prog=e.funcs[n];for(var s=0;s<r;s++)Fi(e),I.DEBUG&&console.log(++e.step,s+1<r?"next loopcall":"done loopcall",s);e.ip=i,e.prog=a}function JD(e){var t=e.stack.pop();I.DEBUG&&console.log(e.step,"CALL[]",t);var n=e.ip,r=e.prog;e.prog=e.funcs[t],Fi(e),e.ip=n,e.prog=r,I.DEBUG&&console.log(++e.step,"returning from",t)}function jD(e){var t=e.stack,n=t.pop();I.DEBUG&&console.log(e.step,"CINDEX[]",n),t.push(t[t.length-n])}function WD(e){var t=e.stack,n=t.pop();I.DEBUG&&console.log(e.step,"MINDEX[]",n),t.push(t.splice(t.length-n,1)[0])}function KD(e){if(e.env!=="fpgm")throw new Error("FDEF not allowed here");var t=e.stack,n=e.prog,r=e.ip,i=t.pop(),a=r;for(I.DEBUG&&console.log(e.step,"FDEF[]",i);n[++r]!==45;);e.ip=r,e.funcs[i]=n.slice(a+1,r)}function tm(e,t){var n=t.stack.pop(),r=t.z0[n],i=t.fv,a=t.pv;I.DEBUG&&console.log(t.step,"MDAP["+e+"]",n);var s=a.distance(r,Ws);e&&(s=t.round(s)),i.setRelative(r,Ws,s,a),i.touch(r),t.rp0=t.rp1=n}function em(e,t){var n=t.z2,r=n.length-2,i,a,s;I.DEBUG&&console.log(t.step,"IUP["+e.axis+"]");for(var o=0;o<r;o++)i=n[o],!e.touched(i)&&(a=i.prevTouched(e),a!==i&&(s=i.nextTouched(e),a===s&&e.setRelative(i,i,e.distance(a,a,!1,!0),e,!0),e.interpolate(i,a,s,e)))}function nm(e,t){for(var n=t.stack,r=e?t.rp1:t.rp2,i=(e?t.z0:t.z1)[r],a=t.fv,s=t.pv,o=t.loop,c=t.z2;o--;){var l=n.pop(),u=c[l],A=s.distance(i,i,!1,!0);a.setRelative(u,u,A,s),a.touch(u),I.DEBUG&&console.log(t.step,(t.loop>1?"loop "+(t.loop-o)+": ":"")+"SHP["+(e?"rp1":"rp2")+"]",l)}t.loop=1}function rm(e,t){var n=t.stack,r=e?t.rp1:t.rp2,i=(e?t.z0:t.z1)[r],a=t.fv,s=t.pv,o=n.pop(),c=t.z2[t.contours[o]],l=c;I.DEBUG&&console.log(t.step,"SHC["+e+"]",o);var u=s.distance(i,i,!1,!0);do l!==i&&a.setRelative(l,l,u,s),l=l.nextPointOnContour;while(l!==c)}function im(e,t){var n=t.stack,r=e?t.rp1:t.rp2,i=(e?t.z0:t.z1)[r],a=t.fv,s=t.pv,o=n.pop();I.DEBUG&&console.log(t.step,"SHZ["+e+"]",o);var c;switch(o){case 0:c=t.tZone;break;case 1:c=t.gZone;break;default:throw new Error("Invalid zone")}for(var l,u=s.distance(i,i,!1,!0),A=c.length-2,h=0;h<A;h++)l=c[h],a.setRelative(l,l,u,s)}function XD(e){for(var t=e.stack,n=e.loop,r=e.fv,i=t.pop()/64,a=e.z2;n--;){var s=t.pop(),o=a[s];I.DEBUG&&console.log(e.step,(e.loop>1?"loop "+(e.loop-n)+": ":"")+"SHPIX[]",s,i),r.setRelative(o,o,i),r.touch(o)}e.loop=1}function _D(e){for(var t=e.stack,n=e.rp1,r=e.rp2,i=e.loop,a=e.z0[n],s=e.z1[r],o=e.fv,c=e.dpv,l=e.z2;i--;){var u=t.pop(),A=l[u];I.DEBUG&&console.log(e.step,(e.loop>1?"loop "+(e.loop-i)+": ":"")+"IP[]",u,n,"<->",r),o.interpolate(A,a,s,c),o.touch(A)}e.loop=1}function am(e,t){var n=t.stack,r=n.pop()/64,i=n.pop(),a=t.z1[i],s=t.z0[t.rp0],o=t.fv,c=t.pv;o.setRelative(a,s,r,c),o.touch(a),I.DEBUG&&console.log(t.step,"MSIRP["+e+"]",r,i),t.rp1=t.rp0,t.rp2=i,e&&(t.rp0=i)}function qD(e){for(var t=e.stack,n=e.rp0,r=e.z0[n],i=e.loop,a=e.fv,s=e.pv,o=e.z1;i--;){var c=t.pop(),l=o[c];I.DEBUG&&console.log(e.step,(e.loop>1?"loop "+(e.loop-i)+": ":"")+"ALIGNRP[]",c),a.setRelative(l,r,0,s),a.touch(l)}e.loop=1}function ZD(e){I.DEBUG&&console.log(e.step,"RTDG[]"),e.round=dD}function sm(e,t){var n=t.stack,r=n.pop(),i=n.pop(),a=t.z0[i],s=t.fv,o=t.pv,c=t.cvt[r];I.DEBUG&&console.log(t.step,"MIAP["+e+"]",r,"(",c,")",i);var l=o.distance(a,Ws);e&&(Math.abs(l-c)<t.cvCutIn&&(l=c),l=t.round(l)),s.setRelative(a,Ws,l,o),t.zp0===0&&(a.xo=a.x,a.yo=a.y),s.touch(a),t.rp0=t.rp1=i}function $D(e){var t=e.prog,n=e.ip,r=e.stack,i=t[++n];I.DEBUG&&console.log(e.step,"NPUSHB[]",i);for(var a=0;a<i;a++)r.push(t[++n]);e.ip=n}function t4(e){var t=e.ip,n=e.prog,r=e.stack,i=n[++t];I.DEBUG&&console.log(e.step,"NPUSHW[]",i);for(var a=0;a<i;a++){var s=n[++t]<<8|n[++t];s&32768&&(s=-((s^65535)+1)),r.push(s)}e.ip=t}function e4(e){var t=e.stack,n=e.store;n||(n=e.store=[]);var r=t.pop(),i=t.pop();I.DEBUG&&console.log(e.step,"WS",r,i),n[i]=r}function n4(e){var t=e.stack,n=e.store,r=t.pop();I.DEBUG&&console.log(e.step,"RS",r);var i=n&&n[r]||0;t.push(i)}function r4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"WCVTP",n,r),e.cvt[r]=n/64}function i4(e){var t=e.stack,n=t.pop();I.DEBUG&&console.log(e.step,"RCVT",n),t.push(e.cvt[n]*64)}function om(e,t){var n=t.stack,r=n.pop(),i=t.z2[r];I.DEBUG&&console.log(t.step,"GC["+e+"]",r),n.push(t.dpv.distance(i,Ws,e,!1)*64)}function cm(e,t){var n=t.stack,r=n.pop(),i=n.pop(),a=t.z1[r],s=t.z0[i],o=t.dpv.distance(s,a,e,e);I.DEBUG&&console.log(t.step,"MD["+e+"]",r,i,"->",o),t.stack.push(Math.round(o*64))}function a4(e){I.DEBUG&&console.log(e.step,"MPPEM[]"),e.stack.push(e.ppem)}function s4(e){I.DEBUG&&console.log(e.step,"FLIPON[]"),e.autoFlip=!0}function o4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"LT[]",n,r),t.push(r<n?1:0)}function c4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"LTEQ[]",n,r),t.push(r<=n?1:0)}function l4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"GT[]",n,r),t.push(r>n?1:0)}function u4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"GTEQ[]",n,r),t.push(r>=n?1:0)}function A4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"EQ[]",n,r),t.push(n===r?1:0)}function h4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"NEQ[]",n,r),t.push(n!==r?1:0)}function f4(e){var t=e.stack,n=t.pop();I.DEBUG&&console.log(e.step,"ODD[]",n),t.push(Math.trunc(n)%2?1:0)}function g4(e){var t=e.stack,n=t.pop();I.DEBUG&&console.log(e.step,"EVEN[]",n),t.push(Math.trunc(n)%2?0:1)}function d4(e){var t=e.stack.pop();I.DEBUG&&console.log(e.step,"IF[]",t),t||(K1(e,!0),I.DEBUG&&console.log(e.step,"EIF[]"))}function p4(e){I.DEBUG&&console.log(e.step,"EIF[]")}function m4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"AND[]",n,r),t.push(n&&r?1:0)}function y4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"OR[]",n,r),t.push(n||r?1:0)}function w4(e){var t=e.stack,n=t.pop();I.DEBUG&&console.log(e.step,"NOT[]",n),t.push(n?0:1)}function Ih(e,t){var n=t.stack,r=n.pop(),i=t.fv,a=t.pv,s=t.ppem,o=t.deltaBase+(e-1)*16,c=t.deltaShift,l=t.z0;I.DEBUG&&console.log(t.step,"DELTAP["+e+"]",r,n);for(var u=0;u<r;u++){var A=n.pop(),h=n.pop(),f=o+((h&240)>>4);if(f===s){var d=(h&15)-8;d>=0&&d++,I.DEBUG&&console.log(t.step,"DELTAPFIX",A,"by",d*c);var p=l[A];i.setRelative(p,p,d*c,a)}}}function v4(e){var t=e.stack,n=t.pop();I.DEBUG&&console.log(e.step,"SDB[]",n),e.deltaBase=n}function E4(e){var t=e.stack,n=t.pop();I.DEBUG&&console.log(e.step,"SDS[]",n),e.deltaShift=Math.pow(.5,n)}function B4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"ADD[]",n,r),t.push(r+n)}function C4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"SUB[]",n,r),t.push(r-n)}function x4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"DIV[]",n,r),t.push(r*64/n)}function b4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"MUL[]",n,r),t.push(r*n/64)}function S4(e){var t=e.stack,n=t.pop();I.DEBUG&&console.log(e.step,"ABS[]",n),t.push(Math.abs(n))}function D4(e){var t=e.stack,n=t.pop();I.DEBUG&&console.log(e.step,"NEG[]",n),t.push(-n)}function I4(e){var t=e.stack,n=t.pop();I.DEBUG&&console.log(e.step,"FLOOR[]",n),t.push(Math.floor(n/64)*64)}function F4(e){var t=e.stack,n=t.pop();I.DEBUG&&console.log(e.step,"CEILING[]",n),t.push(Math.ceil(n/64)*64)}function bl(e,t){var n=t.stack,r=n.pop();I.DEBUG&&console.log(t.step,"ROUND[]"),n.push(t.round(r/64)*64)}function Q4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"WCVTF[]",n,r),e.cvt[r]=n*e.ppem/e.font.unitsPerEm}function Fh(e,t){var n=t.stack,r=n.pop(),i=t.ppem,a=t.deltaBase+(e-1)*16,s=t.deltaShift;I.DEBUG&&console.log(t.step,"DELTAC["+e+"]",r,n);for(var o=0;o<r;o++){var c=n.pop(),l=n.pop(),u=a+((l&240)>>4);if(u===i){var A=(l&15)-8;A>=0&&A++;var h=A*s;I.DEBUG&&console.log(t.step,"DELTACFIX",c,"by",h),t.cvt[c]+=h}}}function M4(e){var t=e.stack.pop();I.DEBUG&&console.log(e.step,"SROUND[]",t),e.round=W1;var 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 T4(e){var t=e.stack.pop();I.DEBUG&&console.log(e.step,"S45ROUND[]",t),e.round=W1;var 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 N4(e){I.DEBUG&&console.log(e.step,"ROFF[]"),e.round=gD}function P4(e){I.DEBUG&&console.log(e.step,"RUTG[]"),e.round=mD}function k4(e){I.DEBUG&&console.log(e.step,"RDTG[]"),e.round=yD}function R4(e){var t=e.stack.pop();I.DEBUG&&console.log(e.step,"SCANCTRL[]",t)}function lm(e,t){var n=t.stack,r=n.pop(),i=n.pop(),a=t.z2[r],s=t.z1[i];I.DEBUG&&console.log(t.step,"SDPVTL["+e+"]",r,i);var o,c;e?(o=a.y-s.y,c=s.x-a.x):(o=s.x-a.x,c=s.y-a.y),t.dpv=js(o,c)}function O4(e){var t=e.stack,n=t.pop(),r=0;I.DEBUG&&console.log(e.step,"GETINFO[]",n),n&1&&(r=35),n&32&&(r|=4096),t.push(r)}function U4(e){var t=e.stack,n=t.pop(),r=t.pop(),i=t.pop();I.DEBUG&&console.log(e.step,"ROLL[]"),t.push(r),t.push(n),t.push(i)}function L4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"MAX[]",n,r),t.push(Math.max(r,n))}function Y4(e){var t=e.stack,n=t.pop(),r=t.pop();I.DEBUG&&console.log(e.step,"MIN[]",n,r),t.push(Math.min(r,n))}function H4(e){var t=e.stack.pop();I.DEBUG&&console.log(e.step,"SCANTYPE[]",t)}function G4(e){var t=e.stack.pop(),n=e.stack.pop();switch(I.DEBUG&&console.log(e.step,"INSTCTRL[]",t,n),t){case 1:e.inhibitGridFit=!!n;return;case 2:e.ignoreCvt=!!n;return;default:throw new Error("invalid INSTCTRL[] selector")}}function Xr(e,t){var n=t.stack,r=t.prog,i=t.ip;I.DEBUG&&console.log(t.step,"PUSHB["+e+"]");for(var a=0;a<e;a++)n.push(r[++i]);t.ip=i}function _r(e,t){var n=t.ip,r=t.prog,i=t.stack;I.DEBUG&&console.log(t.ip,"PUSHW["+e+"]");for(var a=0;a<e;a++){var s=r[++n]<<8|r[++n];s&32768&&(s=-((s^65535)+1)),i.push(s)}t.ip=n}function it(e,t,n,r,i,a){var s=a.stack,o=e&&s.pop(),c=s.pop(),l=a.rp0,u=a.z0[l],A=a.z1[c],h=a.minDis,f=a.fv,d=a.dpv,p,m,y,v;m=p=d.distance(A,u,!0,!0),y=m>=0?1:-1,m=Math.abs(m),e&&(v=a.cvt[o],r&&Math.abs(m-v)<a.cvCutIn&&(m=v)),n&&m<h&&(m=h),r&&(m=a.round(m)),f.setRelative(A,u,y*m,d),f.touch(A),I.DEBUG&&console.log(a.step,(e?"MIRP[":"MDRP[")+(t?"M":"m")+(n?">":"_")+(r?"R":"_")+(i===0?"Gr":i===1?"Bl":i===2?"Wh":"")+"]",e?o+"("+a.cvt[o]+","+v+")":"",c,"(d =",p,"->",y*m,")"),a.rp1=a.rp0,a.rp2=c,t&&(a.rp0=c)}V1=[X1.bind(void 0,yr),X1.bind(void 0,or),_1.bind(void 0,yr),_1.bind(void 0,or),q1.bind(void 0,yr),q1.bind(void 0,or),Z1.bind(void 0,0),Z1.bind(void 0,1),$1.bind(void 0,0),$1.bind(void 0,1),vD,ED,BD,CD,xD,bD,SD,DD,ID,FD,QD,MD,TD,ND,PD,kD,RD,OD,UD,LD,void 0,void 0,YD,Dh,HD,GD,VD,jD,WD,void 0,void 0,void 0,zD,JD,KD,void 0,tm.bind(void 0,0),tm.bind(void 0,1),em.bind(void 0,yr),em.bind(void 0,or),nm.bind(void 0,0),nm.bind(void 0,1),rm.bind(void 0,0),rm.bind(void 0,1),im.bind(void 0,0),im.bind(void 0,1),XD,_D,am.bind(void 0,0),am.bind(void 0,1),qD,ZD,sm.bind(void 0,0),sm.bind(void 0,1),$D,t4,e4,n4,r4,i4,om.bind(void 0,0),om.bind(void 0,1),void 0,cm.bind(void 0,0),cm.bind(void 0,1),a4,void 0,s4,void 0,void 0,o4,c4,l4,u4,A4,h4,f4,g4,d4,p4,m4,y4,w4,Ih.bind(void 0,1),v4,E4,B4,C4,x4,b4,S4,D4,I4,F4,bl.bind(void 0,0),bl.bind(void 0,1),bl.bind(void 0,2),bl.bind(void 0,3),void 0,void 0,void 0,void 0,Q4,Ih.bind(void 0,2),Ih.bind(void 0,3),Fh.bind(void 0,1),Fh.bind(void 0,2),Fh.bind(void 0,3),M4,T4,void 0,void 0,N4,void 0,P4,k4,Dh,Dh,void 0,void 0,void 0,void 0,void 0,R4,lm.bind(void 0,0),lm.bind(void 0,1),O4,void 0,U4,L4,Y4,H4,G4,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,Xr.bind(void 0,1),Xr.bind(void 0,2),Xr.bind(void 0,3),Xr.bind(void 0,4),Xr.bind(void 0,5),Xr.bind(void 0,6),Xr.bind(void 0,7),Xr.bind(void 0,8),_r.bind(void 0,1),_r.bind(void 0,2),_r.bind(void 0,3),_r.bind(void 0,4),_r.bind(void 0,5),_r.bind(void 0,6),_r.bind(void 0,7),_r.bind(void 0,8),it.bind(void 0,0,0,0,0,0),it.bind(void 0,0,0,0,0,1),it.bind(void 0,0,0,0,0,2),it.bind(void 0,0,0,0,0,3),it.bind(void 0,0,0,0,1,0),it.bind(void 0,0,0,0,1,1),it.bind(void 0,0,0,0,1,2),it.bind(void 0,0,0,0,1,3),it.bind(void 0,0,0,1,0,0),it.bind(void 0,0,0,1,0,1),it.bind(void 0,0,0,1,0,2),it.bind(void 0,0,0,1,0,3),it.bind(void 0,0,0,1,1,0),it.bind(void 0,0,0,1,1,1),it.bind(void 0,0,0,1,1,2),it.bind(void 0,0,0,1,1,3),it.bind(void 0,0,1,0,0,0),it.bind(void 0,0,1,0,0,1),it.bind(void 0,0,1,0,0,2),it.bind(void 0,0,1,0,0,3),it.bind(void 0,0,1,0,1,0),it.bind(void 0,0,1,0,1,1),it.bind(void 0,0,1,0,1,2),it.bind(void 0,0,1,0,1,3),it.bind(void 0,0,1,1,0,0),it.bind(void 0,0,1,1,0,1),it.bind(void 0,0,1,1,0,2),it.bind(void 0,0,1,1,0,3),it.bind(void 0,0,1,1,1,0),it.bind(void 0,0,1,1,1,1),it.bind(void 0,0,1,1,1,2),it.bind(void 0,0,1,1,1,3),it.bind(void 0,1,0,0,0,0),it.bind(void 0,1,0,0,0,1),it.bind(void 0,1,0,0,0,2),it.bind(void 0,1,0,0,0,3),it.bind(void 0,1,0,0,1,0),it.bind(void 0,1,0,0,1,1),it.bind(void 0,1,0,0,1,2),it.bind(void 0,1,0,0,1,3),it.bind(void 0,1,0,1,0,0),it.bind(void 0,1,0,1,0,1),it.bind(void 0,1,0,1,0,2),it.bind(void 0,1,0,1,0,3),it.bind(void 0,1,0,1,1,0),it.bind(void 0,1,0,1,1,1),it.bind(void 0,1,0,1,1,2),it.bind(void 0,1,0,1,1,3),it.bind(void 0,1,1,0,0,0),it.bind(void 0,1,1,0,0,1),it.bind(void 0,1,1,0,0,2),it.bind(void 0,1,1,0,0,3),it.bind(void 0,1,1,0,1,0),it.bind(void 0,1,1,0,1,1),it.bind(void 0,1,1,0,1,2),it.bind(void 0,1,1,0,1,3),it.bind(void 0,1,1,1,0,0),it.bind(void 0,1,1,1,0,1),it.bind(void 0,1,1,1,0,2),it.bind(void 0,1,1,1,0,3),it.bind(void 0,1,1,1,1,0),it.bind(void 0,1,1,1,1,1),it.bind(void 0,1,1,1,1,2),it.bind(void 0,1,1,1,1,3)];function Fa(e){this.char=e,this.state={},this.activeState=null}function Qh(e,t,n){this.contextName=n,this.startIndex=e,this.endOffset=t}function V4(e,t,n){this.contextName=e,this.openRange=null,this.ranges=[],this.checkStart=t,this.checkEnd=n}function Rn(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 Sl(e){this.eventId=e,this.subscribers=[]}function z4(e){var t=this,n=["start","end","next","newToken","contextStart","contextEnd","insertToken","removeToken","removeRange","replaceToken","replaceRange","composeRUD","updateContextsRanges"];n.forEach(function(i){Object.defineProperty(t.events,i,{value:new Sl(i)})}),e&&n.forEach(function(i){var a=e[i];typeof a=="function"&&t.events[i].subscribe(a)});var r=["insertToken","removeToken","removeRange","replaceToken","replaceRange","composeRUD"];r.forEach(function(i){t.events[i].subscribe(t.updateContextsRanges)})}function ce(e){this.tokens=[],this.registeredContexts={},this.contextCheckers=[],this.events={},this.registeredModifiers=[],z4.call(this,e)}Fa.prototype.setState=function(e,t){return this.state[e]=t,this.activeState={key:e,value:this.state[e]},this.activeState},Fa.prototype.getState=function(e){return this.state[e]||null},ce.prototype.inboundIndex=function(e){return e>=0&&e<this.tokens.length},ce.prototype.composeRUD=function(e){var t=this,n=!0,r=e.map(function(a){return t[a[0]].apply(t,a.slice(1).concat(n))}),i=function(a){return typeof a=="object"&&a.hasOwnProperty("FAIL")};if(r.every(i))return{FAIL:"composeRUD: one or more operations hasn't completed successfully",report:r.filter(i)};this.dispatch("composeRUD",[r.filter(function(a){return!i(a)})])},ce.prototype.replaceRange=function(e,t,n,r){t=t!==null?t:this.tokens.length;var i=n.every(function(s){return s instanceof Fa});if(!isNaN(e)&&this.inboundIndex(e)&&i){var a=this.tokens.splice.apply(this.tokens,[e,t].concat(n));return r||this.dispatch("replaceToken",[e,t,n]),[a,n]}else return{FAIL:"replaceRange: invalid tokens or startIndex."}},ce.prototype.replaceToken=function(e,t,n){if(!isNaN(e)&&this.inboundIndex(e)&&t instanceof Fa){var r=this.tokens.splice(e,1,t);return n||this.dispatch("replaceToken",[e,t]),[r[0],t]}else return{FAIL:"replaceToken: invalid token or index."}},ce.prototype.removeRange=function(e,t,n){t=isNaN(t)?this.tokens.length:t;var r=this.tokens.splice(e,t);return n||this.dispatch("removeRange",[r,e,t]),r},ce.prototype.removeToken=function(e,t){if(!isNaN(e)&&this.inboundIndex(e)){var n=this.tokens.splice(e,1);return t||this.dispatch("removeToken",[n,e]),n}else return{FAIL:"removeToken: invalid token index."}},ce.prototype.insertToken=function(e,t,n){var r=e.every(function(i){return i instanceof Fa});return r?(this.tokens.splice.apply(this.tokens,[t,0].concat(e)),n||this.dispatch("insertToken",[e,t]),e):{FAIL:"insertToken: invalid token(s)."}},ce.prototype.registerModifier=function(e,t,n){this.events.newToken.subscribe(function(r,i){var a=[r,i],s=t===null||t.apply(this,a)===!0,o=[r,i];if(s){var c=n.apply(this,o);r.setState(e,c)}}),this.registeredModifiers.push(e)},Sl.prototype.subscribe=function(e){return typeof e=="function"?this.subscribers.push(e)-1:{FAIL:"invalid '"+this.eventId+"' event handler"}},Sl.prototype.unsubscribe=function(e){this.subscribers.splice(e,1)},Rn.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)},Rn.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}},ce.prototype.rangeToText=function(e){if(e instanceof Qh)return this.getRangeTokens(e).map(function(t){return t.char}).join("")},ce.prototype.getText=function(){return this.tokens.map(function(e){return e.char}).join("")},ce.prototype.getContext=function(e){var t=this.registeredContexts[e];return t||null},ce.prototype.on=function(e,t){var n=this.events[e];return n?n.subscribe(t):null},ce.prototype.dispatch=function(e,t){var n=this,r=this.events[e];r instanceof Sl&&r.subscribers.forEach(function(i){i.apply(n,t||[])})},ce.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."};var r=new V4(e,t,n);return this.registeredContexts[e]=r,this.contextCheckers.push(r),r},ce.prototype.getRangeTokens=function(e){var t=e.startIndex+e.endOffset;return[].concat(this.tokens.slice(e.startIndex,t))},ce.prototype.getContextRanges=function(e){var t=this.getContext(e);return t?t.ranges:{FAIL:"context checker '"+e+"' is not registered."}},ce.prototype.resetContextsRanges=function(){var e=this.registeredContexts;for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];n.ranges=[]}},ce.prototype.updateContextsRanges=function(){this.resetContextsRanges();for(var e=this.tokens.map(function(r){return r.char}),t=0;t<e.length;t++){var n=new Rn(e,t);this.runContextCheck(n)}this.dispatch("updateContextsRanges",[this.registeredContexts])},ce.prototype.setEndOffset=function(e,t){var n=this.getContext(t).openRange.startIndex,r=new Qh(n,e,t),i=this.getContext(t).ranges;return r.rangeId=t+"."+i.length,i.push(r),this.getContext(t).openRange=null,r},ce.prototype.runContextCheck=function(e){var t=this,n=e.index;this.contextCheckers.forEach(function(r){var i=r.contextName,a=t.getContext(i).openRange;if(!a&&r.checkStart(e)&&(a=new Qh(n,null,i),t.getContext(i).openRange=a,t.dispatch("contextStart",[i,n])),a&&r.checkEnd(e)){var s=n-a.startIndex+1,o=t.setEndOffset(s,i);t.dispatch("contextEnd",[i,o])}})},ce.prototype.tokenize=function(e){this.tokens=[],this.resetContextsRanges();var t=Array.from(e);this.dispatch("start");for(var n=0;n<t.length;n++){var r=t[n],i=new Rn(t,n);this.dispatch("next",[i]),this.runContextCheck(i);var a=new Fa(r);this.tokens.push(a),this.dispatch("newToken",[a,i])}return this.dispatch("end",[this.tokens]),this.tokens};function qr(e){return/[\u0600-\u065F\u066A-\u06D2\u06FA-\u06FF]/.test(e)}function um(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 Zr(e){return/[\u0600-\u0605\u060C-\u060E\u0610-\u061B\u061E\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED]/.test(e)}function Dl(e){return/[A-z]/.test(e)}function J4(e){return/\s/.test(e)}function yn(e){this.font=e,this.features={}}function Qi(e){this.id=e.id,this.tag=e.tag,this.substitution=e.substitution}function Ks(e,t){if(!e)return-1;switch(t.format){case 1:return t.glyphs.indexOf(e);case 2:for(var n=t.ranges,r=0;r<n.length;r++){var i=n[r];if(e>=i.start&&e<=i.end){var a=e-i.start;return i.index+a}}break;default:return-1}return-1}function j4(e,t){var n=Ks(e,t.coverage);return n===-1?null:e+t.deltaGlyphId}function W4(e,t){var n=Ks(e,t.coverage);return n===-1?null:t.substitute[n]}function Mh(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r],a=t.current;a=Array.isArray(a)?a[0]:a;var s=Ks(a,i);s!==-1&&n.push(s)}return n.length!==e.length?-1:n}function K4(e,t){var n=t.inputCoverage.length+t.lookaheadCoverage.length+t.backtrackCoverage.length;if(e.context.length<n)return[];var r=Mh(t.inputCoverage,e);if(r===-1)return[];var i=t.inputCoverage.length-1;if(e.lookahead.length<t.lookaheadCoverage.length)return[];for(var a=e.lookahead.slice(i);a.length&&Zr(a[0].char);)a.shift();var s=new Rn(a,0),o=Mh(t.lookaheadCoverage,s),c=[].concat(e.backtrack);for(c.reverse();c.length&&Zr(c[0].char);)c.shift();if(c.length<t.backtrackCoverage.length)return[];var l=new Rn(c,0),u=Mh(t.backtrackCoverage,l),A=r.length===t.inputCoverage.length&&o.length===t.lookaheadCoverage.length&&u.length===t.backtrackCoverage.length,h=[];if(A)for(var f=0;f<t.lookupRecords.length;f++)for(var d=t.lookupRecords[f],p=d.lookupListIndex,m=this.getLookupByIndex(p),y=0;y<m.subtables.length;y++){var v=m.subtables[y],w=this.getLookupMethod(m,v),B=this.getSubstitutionType(m,v);if(B==="12")for(var C=0;C<r.length;C++){var x=e.get(C),b=w(x);b&&h.push(b)}}return h}function X4(e,t){var n=e.current,r=Ks(n,t.coverage);if(r===-1)return null;for(var i,a=t.ligatureSets[r],s=0;s<a.length;s++){i=a[s];for(var o=0;o<i.components.length;o++){var c=e.lookahead[o],l=i.components[o];if(c!==l)break;if(o===i.components.length-1)return i}}return null}function _4(e,t){var n=Ks(e,t.coverage);return n===-1?null:t.sequences[n]}yn.prototype.getDefaultScriptFeaturesIndexes=function(){for(var e=this.font.tables.gsub.scripts,t=0;t<e.length;t++){var n=e[t];if(n.tag==="DFLT")return n.script.defaultLangSys.featureIndexes}return[]},yn.prototype.getScriptFeaturesIndexes=function(e){var t=this.font.tables;if(!t.gsub)return[];if(!e)return this.getDefaultScriptFeaturesIndexes();for(var n=this.font.tables.gsub.scripts,r=0;r<n.length;r++){var i=n[r];if(i.tag===e&&i.script.defaultLangSys)return i.script.defaultLangSys.featureIndexes;var a=i.langSysRecords;if(a)for(var s=0;s<a.length;s++){var o=a[s];if(o.tag===e){var c=o.langSys;return c.featureIndexes}}}return this.getDefaultScriptFeaturesIndexes()},yn.prototype.mapTagsToFeatures=function(e,t){for(var n={},r=0;r<e.length;r++){var i=e[r].tag,a=e[r].feature;n[i]=a}this.features[t].tags=n},yn.prototype.getScriptFeatures=function(e){var t=this.features[e];if(this.features.hasOwnProperty(e))return t;var n=this.getScriptFeaturesIndexes(e);if(!n)return null;var r=this.font.tables.gsub;return t=n.map(function(i){return r.features[i]}),this.features[e]=t,this.mapTagsToFeatures(t,e),t},yn.prototype.getSubstitutionType=function(e,t){var n=e.lookupType.toString(),r=t.substFormat.toString();return n+r},yn.prototype.getLookupMethod=function(e,t){var n=this,r=this.getSubstitutionType(e,t);switch(r){case"11":return function(i){return j4.apply(n,[i,t])};case"12":return function(i){return W4.apply(n,[i,t])};case"63":return function(i){return K4.apply(n,[i,t])};case"41":return function(i){return X4.apply(n,[i,t])};case"21":return function(i){return _4.apply(n,[i,t])};default:throw new Error("lookupType: "+e.lookupType+" - substFormat: "+t.substFormat+" is not yet supported")}},yn.prototype.lookupFeature=function(e){var t=e.contextParams,n=t.index,r=this.getFeature({tag:e.tag,script:e.script});if(!r)return new Error("font '"+this.font.names.fullName.en+"' doesn't support feature '"+e.tag+"' for script '"+e.script+"'.");for(var i=this.getFeatureLookups(r),a=[].concat(t.context),s=0;s<i.length;s++)for(var o=i[s],c=this.getLookupSubtables(o),l=0;l<c.length;l++){var u=c[l],A=this.getSubstitutionType(o,u),h=this.getLookupMethod(o,u),f=void 0;switch(A){case"11":f=h(t.current),f&&a.splice(n,1,new Qi({id:11,tag:e.tag,substitution:f}));break;case"12":f=h(t.current),f&&a.splice(n,1,new Qi({id:12,tag:e.tag,substitution:f}));break;case"63":f=h(t),Array.isArray(f)&&f.length&&a.splice(n,1,new Qi({id:63,tag:e.tag,substitution:f}));break;case"41":f=h(t),f&&a.splice(n,1,new Qi({id:41,tag:e.tag,substitution:f}));break;case"21":f=h(t.current),f&&a.splice(n,1,new Qi({id:21,tag:e.tag,substitution:f}));break}t=new Rn(a,n),!(Array.isArray(f)&&!f.length)&&(f=null)}return a.length?a:null},yn.prototype.supports=function(e){if(!e.script)return!1;this.getScriptFeatures(e.script);var t=this.features.hasOwnProperty(e.script);if(!e.tag)return t;var n=this.features[e.script].some(function(r){return r.tag===e.tag});return t&&n},yn.prototype.getLookupSubtables=function(e){return e.subtables||null},yn.prototype.getLookupByIndex=function(e){var t=this.font.tables.gsub.lookups;return t[e]||null},yn.prototype.getFeatureLookups=function(e){return e.lookupListIndexes.map(this.getLookupByIndex.bind(this))},yn.prototype.getFeature=function(e){if(!this.font)return{FAIL:"No font was found"};this.features.hasOwnProperty(e.script)||this.getScriptFeatures(e.script);var t=this.features[e.script];return t?t.tags[e.tag]?this.features[e.script].tags[e.tag]:null:{FAIL:"No feature for script "+e.script}};function q4(e){var t=e.current,n=e.get(-1);return n===null&&qr(t)||!qr(n)&&qr(t)}function Z4(e){var t=e.get(1);return t===null||!qr(t)}var $4={startCheck:q4,endCheck:Z4};function tI(e){var t=e.current,n=e.get(-1);return(qr(t)||Zr(t))&&!qr(n)}function eI(e){var t=e.get(1);switch(!0){case t===null:return!0;case(!qr(t)&&!Zr(t)):var n=J4(t);if(!n)return!0;if(n){var r=!1;if(r=e.lookahead.some(function(i){return qr(i)||Zr(i)}),!r)return!0}break;default:return!1}}var nI={startCheck:tI,endCheck:eI};function rI(e,t,n){t[n].setState(e.tag,e.substitution)}function iI(e,t,n){t[n].setState(e.tag,e.substitution)}function aI(e,t,n){e.substitution.forEach(function(r,i){var a=t[n+i];a.setState(e.tag,r)})}function sI(e,t,n){var r=t[n];r.setState(e.tag,e.substitution.ligGlyph);for(var i=e.substitution.components.length,a=0;a<i;a++)r=t[n+a+1],r.setState("deleted",!0)}var Am={11:rI,12:iI,63:aI,41:sI};function Th(e,t,n){e instanceof Qi&&Am[e.id]&&Am[e.id](e,t,n)}function oI(e){for(var t=[].concat(e.backtrack),n=t.length-1;n>=0;n--){var r=t[n],i=um(r),a=Zr(r);if(!i&&!a)return!0;if(i)return!1}return!1}function cI(e){if(um(e.current))return!1;for(var t=0;t<e.lookahead.length;t++){var n=e.lookahead[t],r=Zr(n);if(!r)return!0}return!1}function lI(e){var t=this,n="arab",r=this.featuresTags[n],i=this.tokenizer.getRangeTokens(e);if(i.length!==1){var a=new Rn(i.map(function(o){return o.getState("glyphIndex")}),0),s=new Rn(i.map(function(o){return o.char}),0);i.forEach(function(o,c){if(!Zr(o.char)){a.setCurrentIndex(c),s.setCurrentIndex(c);var l=0;oI(s)&&(l|=1),cI(s)&&(l|=2);var u;switch(l){case 1:u="fina";break;case 2:u="init";break;case 3:u="medi";break}if(r.indexOf(u)!==-1){var A=t.query.lookupFeature({tag:u,script:n,contextParams:a});if(A instanceof Error)return console.info(A.message);A.forEach(function(h,f){h instanceof Qi&&(Th(h,i,f),a.context[f]=h.substitution)})}}})}}function hm(e,t){var n=e.map(function(r){return r.activeState.value});return new Rn(n,t||0)}function uI(e){var t=this,n="arab",r=this.tokenizer.getRangeTokens(e),i=hm(r);i.context.forEach(function(a,s){i.setCurrentIndex(s);var o=t.query.lookupFeature({tag:"rlig",script:n,contextParams:i});o.length&&(o.forEach(function(c){return Th(c,r,s)}),i=hm(r))})}function AI(e){var t=e.current,n=e.get(-1);return n===null&&Dl(t)||!Dl(n)&&Dl(t)}function hI(e){var t=e.get(1);return t===null||!Dl(t)}var fI={startCheck:AI,endCheck:hI};function fm(e,t){var n=e.map(function(r){return r.activeState.value});return new Rn(n,t||0)}function gI(e){var t=this,n="latn",r=this.tokenizer.getRangeTokens(e),i=fm(r);i.context.forEach(function(a,s){i.setCurrentIndex(s);var o=t.query.lookupFeature({tag:"liga",script:n,contextParams:i});o.length&&(o.forEach(function(c){return Th(c,r,s)}),i=fm(r))})}function On(e){this.baseDir=e||"ltr",this.tokenizer=new ce,this.featuresTags={}}On.prototype.setText=function(e){this.text=e},On.prototype.contextChecks={latinWordCheck:fI,arabicWordCheck:$4,arabicSentenceCheck:nI};function Nh(e){var t=this.contextChecks[e+"Check"];return this.tokenizer.registerContextChecker(e,t.startCheck,t.endCheck)}function dI(){return Nh.call(this,"latinWord"),Nh.call(this,"arabicWord"),Nh.call(this,"arabicSentence"),this.tokenizer.tokenize(this.text)}function pI(){var e=this,t=this.tokenizer.getContextRanges("arabicSentence");t.forEach(function(n){var r=e.tokenizer.getRangeTokens(n);e.tokenizer.replaceRange(n.startIndex,n.endOffset,r.reverse())})}On.prototype.registerFeatures=function(e,t){var n=this,r=t.filter(function(i){return n.query.supports({script:e,tag:i})});this.featuresTags.hasOwnProperty(e)?this.featuresTags[e]=this.featuresTags[e].concat(r):this.featuresTags[e]=r},On.prototype.applyFeatures=function(e,t){if(!e)throw new Error("No valid font was provided to apply features");this.query||(this.query=new yn(e));for(var n=0;n<t.length;n++){var r=t[n];this.query.supports({script:r.script})&&this.registerFeatures(r.script,r.tags)}},On.prototype.registerModifier=function(e,t,n){this.tokenizer.registerModifier(e,t,n)};function Ph(){if(this.tokenizer.registeredModifiers.indexOf("glyphIndex")===-1)throw new Error("glyphIndex modifier is required to apply arabic presentation features.")}function mI(){var e=this,t="arab";if(this.featuresTags.hasOwnProperty(t)){Ph.call(this);var n=this.tokenizer.getContextRanges("arabicWord");n.forEach(function(r){lI.call(e,r)})}}function yI(){var e=this,t="arab";if(this.featuresTags.hasOwnProperty(t)){var n=this.featuresTags[t];if(n.indexOf("rlig")!==-1){Ph.call(this);var r=this.tokenizer.getContextRanges("arabicWord");r.forEach(function(i){uI.call(e,i)})}}}function wI(){var e=this,t="latn";if(this.featuresTags.hasOwnProperty(t)){var n=this.featuresTags[t];if(n.indexOf("liga")!==-1){Ph.call(this);var r=this.tokenizer.getContextRanges("latinWord");r.forEach(function(i){gI.call(e,i)})}}}On.prototype.checkContextReady=function(e){return!!this.tokenizer.getContext(e)},On.prototype.applyFeaturesToContexts=function(){this.checkContextReady("arabicWord")&&(mI.call(this),yI.call(this)),this.checkContextReady("latinWord")&&wI.call(this),this.checkContextReady("arabicSentence")&&pI.call(this)},On.prototype.processText=function(e){(!this.text||this.text!==e)&&(this.setText(e),dI.call(this),this.applyFeaturesToContexts())},On.prototype.getBidiText=function(e){return this.processText(e),this.tokenizer.getText()},On.prototype.getTextGlyphs=function(e){this.processText(e);for(var t=[],n=0;n<this.tokenizer.tokens.length;n++){var r=this.tokenizer.tokens[n];if(!r.state.deleted){var i=r.activeState.value;t.push(Array.isArray(i)?i[0]:i)}}return t};function Ot(e){e=e||{},e.tables=e.tables||{},e.empty||(zs(e.familyName,"When creating a new Font object, familyName is required."),zs(e.styleName,"When creating a new Font object, styleName is required."),zs(e.unitsPerEm,"When creating a new Font object, unitsPerEm is required."),zs(e.ascender,"When creating a new Font object, ascender is required."),zs(e.descender<=0,"When creating a new Font object, negative descender value is required."),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).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||" "}},this.unitsPerEm=e.unitsPerEm||1e3,this.ascender=e.ascender,this.descender=e.descender,this.createdTimestamp=e.createdTimestamp,this.tables=Object.assign(e.tables,{os2:Object.assign({usWeightClass:e.weightClass||this.usWeightClasses.MEDIUM,usWidthClass:e.widthClass||this.usWidthClasses.MEDIUM,fsSelection:e.fsSelection||this.fsSelectionValues.REGULAR},e.tables.os2)})),this.supported=!0,this.glyphs=new sr.GlyphSet(this,e.glyphs||[]),this.encoding=new e1(this),this.position=new Vs(this),this.substitution=new mn(this),this.tables=this.tables||{},this._push=null,this._hmtxTableData={},Object.defineProperty(this,"hinting",{get:function(){if(this._hinting)return this._hinting;if(this.outlinesFormat==="truetype")return this._hinting=new J1(this)}})}Ot.prototype.hasChar=function(e){return this.encoding.charToGlyphIndex(e)!==null},Ot.prototype.charToGlyphIndex=function(e){return this.encoding.charToGlyphIndex(e)},Ot.prototype.charToGlyph=function(e){var t=this.charToGlyphIndex(e),n=this.glyphs.get(t);return n||(n=this.glyphs.get(0)),n},Ot.prototype.updateFeatures=function(e){return this.defaultRenderOptions.features.map(function(t){return t.script==="latn"?{script:"latn",tags:t.tags.filter(function(n){return e[n]})}:t})},Ot.prototype.stringToGlyphs=function(e,t){var n=this,r=new On,i=function(A){return n.charToGlyphIndex(A.char)};r.registerModifier("glyphIndex",null,i);var a=t?this.updateFeatures(t.features):this.defaultRenderOptions.features;r.applyFeatures(this,a);for(var s=r.getTextGlyphs(e),o=s.length,c=new Array(o),l=this.glyphs.get(0),u=0;u<o;u+=1)c[u]=this.glyphs.get(s[u])||l;return c},Ot.prototype.nameToGlyphIndex=function(e){return this.glyphNames.nameToGlyphIndex(e)},Ot.prototype.nameToGlyph=function(e){var t=this.nameToGlyphIndex(e),n=this.glyphs.get(t);return n||(n=this.glyphs.get(0)),n},Ot.prototype.glyphIndexToName=function(e){return this.glyphNames.glyphIndexToName?this.glyphNames.glyphIndexToName(e):""},Ot.prototype.getKerningValue=function(e,t){e=e.index||e,t=t.index||t;var n=this.position.defaultKerningTables;return n?this.position.getKerningValue(n,e,t):this.kerningPairs[e+","+t]||0},Ot.prototype.defaultRenderOptions={kerning:!0,features:[{script:"arab",tags:["init","medi","fina","rlig"]},{script:"latn",tags:["liga","rlig"]}]},Ot.prototype.forEachGlyph=function(e,t,n,r,i,a){t=t!==void 0?t:0,n=n!==void 0?n:0,r=r!==void 0?r:72,i=Object.assign({},this.defaultRenderOptions,i);var s=1/this.unitsPerEm*r,o=this.stringToGlyphs(e,i),c;if(i.kerning){var l=i.script||this.position.getDefaultScriptName();c=this.position.getKerningTables(l,i.language)}for(var u=0;u<o.length;u+=1){var A=o[u];if(a.call(this,A,t,n,r,i),A.advanceWidth&&(t+=A.advanceWidth*s),i.kerning&&u<o.length-1){var h=c?this.position.getKerningValue(c,A.index,o[u+1].index):this.getKerningValue(A,o[u+1]);t+=h*s}i.letterSpacing?t+=i.letterSpacing*r:i.tracking&&(t+=i.tracking/1e3*r)}return t},Ot.prototype.getPath=function(e,t,n,r,i){var a=new ye;return this.forEachGlyph(e,t,n,r,i,function(s,o,c,l){var u=s.getPath(o,c,l,i,this);a.extend(u)}),a},Ot.prototype.getPaths=function(e,t,n,r,i){var a=[];return this.forEachGlyph(e,t,n,r,i,function(s,o,c,l){var u=s.getPath(o,c,l,i,this);a.push(u)}),a},Ot.prototype.getAdvanceWidth=function(e,t,n){return this.forEachGlyph(e,0,0,t,n,function(){})},Ot.prototype.draw=function(e,t,n,r,i,a){this.getPath(t,n,r,i,a).draw(e)},Ot.prototype.drawPoints=function(e,t,n,r,i,a){this.forEachGlyph(t,n,r,i,a,function(s,o,c,l){s.drawPoints(e,o,c,l)})},Ot.prototype.drawMetrics=function(e,t,n,r,i,a){this.forEachGlyph(t,n,r,i,a,function(s,o,c,l){s.drawMetrics(e,o,c,l)})},Ot.prototype.getEnglishName=function(e){var t=this.names[e];if(t)return t.en},Ot.prototype.validate=function(){var e=this;function t(n){var r=e.getEnglishName(n);r&&r.trim().length>0}t("fontFamily"),t("weightName"),t("manufacturer"),t("copyright"),t("version"),this.unitsPerEm>0},Ot.prototype.toTables=function(){return sD.fontToTable(this)},Ot.prototype.toBuffer=function(){return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."),this.toArrayBuffer()},Ot.prototype.toArrayBuffer=function(){for(var e=this.toTables(),t=e.encode(),n=new ArrayBuffer(t.length),r=new Uint8Array(n),i=0;i<t.length;i++)r[i]=t[i];return n},Ot.prototype.download=function(e){var t=this.getEnglishName("fontFamily"),n=this.getEnglishName("fontSubfamily");e=e||t.replace(/\s/g,"")+"-"+n+".otf";var r=this.toArrayBuffer();if(cD())if(window.URL=window.URL||window.webkitURL,window.URL){var i=new DataView(r),a=new Blob([i],{type:"font/opentype"}),s=document.createElement("a");s.href=window.URL.createObjectURL(a),s.download=e;var o=document.createEvent("MouseEvents");o.initEvent("click",!0,!1),s.dispatchEvent(o)}else console.warn("Font file could not be downloaded. Try using a different browser.");else{var c=require("fs"),l=lD(r);c.writeFileSync(e,l)}},Ot.prototype.fsSelectionValues={ITALIC:1,UNDERSCORE:2,NEGATIVE:4,OUTLINED:8,STRIKEOUT:16,BOLD:32,REGULAR:64,USER_TYPO_METRICS:128,WWS:256,OBLIQUE:512},Ot.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},Ot.prototype.usWeightClasses={THIN:100,EXTRA_LIGHT:200,LIGHT:300,NORMAL:400,MEDIUM:500,SEMI_BOLD:600,BOLD:700,EXTRA_BOLD:800,BLACK:900};function gm(e,t){var n=JSON.stringify(e),r=256;for(var i in t){var a=parseInt(i);if(!(!a||a<256)){if(JSON.stringify(t[i])===n)return a;r<=a&&(r=a+1)}}return t[r]=e,r}function vI(e,t,n){var r=gm(t.name,n);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:r}]}function EI(e,t,n){var r={},i=new rt.Parser(e,t);return r.tag=i.parseTag(),r.minValue=i.parseFixed(),r.defaultValue=i.parseFixed(),r.maxValue=i.parseFixed(),i.skip("uShort",1),r.name=n[i.parseUShort()]||{},r}function BI(e,t,n,r){for(var i=gm(t.name,r),a=[{name:"nameID_"+e,type:"USHORT",value:i},{name:"flags_"+e,type:"USHORT",value:0}],s=0;s<n.length;++s){var o=n[s].tag;a.push({name:"axis_"+e+" "+o,type:"FIXED",value:t.coordinates[o]<<16})}return a}function CI(e,t,n,r){var i={},a=new rt.Parser(e,t);i.name=r[a.parseUShort()]||{},a.skip("uShort",1),i.coordinates={};for(var s=0;s<n.length;++s)i.coordinates[n[s].tag]=a.parseFixed();return i}function xI(e,t){var n=new tt.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(var r=0;r<e.axes.length;r++)n.fields=n.fields.concat(vI(r,e.axes[r],t));for(var i=0;i<e.instances.length;i++)n.fields=n.fields.concat(BI(i,e.instances[i],e.axes,t));return n}function bI(e,t,n){var r=new rt.Parser(e,t),i=r.parseULong();ht.argument(i===65536,"Unsupported fvar table version.");var a=r.parseOffset16();r.skip("uShort",1);for(var s=r.parseUShort(),o=r.parseUShort(),c=r.parseUShort(),l=r.parseUShort(),u=[],A=0;A<s;A++)u.push(EI(e,t+a+A*o,n));for(var h=[],f=t+a+s*o,d=0;d<c;d++)h.push(CI(e,f+d*l,u,n));return{axes:u,instances:h}}var SI={make:xI,parse:bI},DI=function(){return{coverage:this.parsePointer(R.coverage),attachPoints:this.parseList(R.pointer(R.uShortList))}},II=function(){var e=this.parseUShort();if(ht.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()}},FI=function(){return this.parseList(R.pointer(II))},QI=function(){return{coverage:this.parsePointer(R.coverage),ligGlyphs:this.parseList(R.pointer(FI))}},MI=function(){return this.parseUShort(),this.parseList(R.pointer(R.coverage))};function TI(e,t){t=t||0;var n=new R(e,t),r=n.parseVersion(1);ht.argument(r===1||r===1.2||r===1.3,"Unsupported GDEF table version.");var i={version:r,classDef:n.parsePointer(R.classDef),attachList:n.parsePointer(DI),ligCaretList:n.parsePointer(QI),markAttachClassDef:n.parsePointer(R.classDef)};return r>=1.2&&(i.markGlyphSets=n.parsePointer(MI)),i}var NI={parse:TI},Un=new Array(10);Un[1]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{posFormat:1,coverage:this.parsePointer(R.coverage),value:this.parseValueRecord()};if(t===2)return{posFormat:2,coverage:this.parsePointer(R.coverage),values:this.parseValueRecordList()};ht.assert(!1,"0x"+e.toString(16)+": GPOS lookup type 1 format must be 1 or 2.")},Un[2]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();ht.assert(t===1||t===2,"0x"+e.toString(16)+": GPOS lookup type 2 format must be 1 or 2.");var n=this.parsePointer(R.coverage),r=this.parseUShort(),i=this.parseUShort();if(t===1)return{posFormat:t,coverage:n,valueFormat1:r,valueFormat2:i,pairSets:this.parseList(R.pointer(R.list(function(){return{secondGlyph:this.parseUShort(),value1:this.parseValueRecord(r),value2:this.parseValueRecord(i)}})))};if(t===2){var a=this.parsePointer(R.classDef),s=this.parsePointer(R.classDef),o=this.parseUShort(),c=this.parseUShort();return{posFormat:t,coverage:n,valueFormat1:r,valueFormat2:i,classDef1:a,classDef2:s,class1Count:o,class2Count:c,classRecords:this.parseList(o,R.list(c,function(){return{value1:this.parseValueRecord(r),value2:this.parseValueRecord(i)}}))}}},Un[3]=function(){return{error:"GPOS Lookup 3 not supported"}},Un[4]=function(){return{error:"GPOS Lookup 4 not supported"}},Un[5]=function(){return{error:"GPOS Lookup 5 not supported"}},Un[6]=function(){return{error:"GPOS Lookup 6 not supported"}},Un[7]=function(){return{error:"GPOS Lookup 7 not supported"}},Un[8]=function(){return{error:"GPOS Lookup 8 not supported"}},Un[9]=function(){return{error:"GPOS Lookup 9 not supported"}};function PI(e,t){t=t||0;var n=new R(e,t),r=n.parseVersion(1);return ht.argument(r===1||r===1.1,"Unsupported GPOS table version "+r),r===1?{version:r,scripts:n.parseScriptList(),features:n.parseFeatureList(),lookups:n.parseLookupList(Un)}:{version:r,scripts:n.parseScriptList(),features:n.parseFeatureList(),lookups:n.parseLookupList(Un),variations:n.parseFeatureVariationsList()}}var kI=new Array(10);function RI(e){return new tt.Table("GPOS",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new tt.ScriptList(e.scripts)},{name:"features",type:"TABLE",value:new tt.FeatureList(e.features)},{name:"lookups",type:"TABLE",value:new tt.LookupList(e.lookups,kI)}])}var OI={parse:PI,make:RI};function UI(e){var t={};e.skip("uShort");var n=e.parseUShort();ht.argument(n===0,"Unsupported kern sub-table version."),e.skip("uShort",2);var r=e.parseUShort();e.skip("uShort",3);for(var i=0;i<r;i+=1){var a=e.parseUShort(),s=e.parseUShort(),o=e.parseShort();t[a+","+s]=o}return t}function LI(e){var t={};e.skip("uShort");var n=e.parseULong();n>1&&console.warn("Only the first kern subtable is supported."),e.skip("uLong");var r=e.parseUShort(),i=r&255;if(e.skip("uShort"),i===0){var a=e.parseUShort();e.skip("uShort",3);for(var s=0;s<a;s+=1){var o=e.parseUShort(),c=e.parseUShort(),l=e.parseShort();t[o+","+c]=l}}return t}function YI(e,t){var n=new rt.Parser(e,t),r=n.parseUShort();if(r===0)return UI(n);if(r===1)return LI(n);throw new Error("Unsupported kern table version ("+r+").")}var HI={parse:YI};function GI(e,t,n,r){for(var i=new rt.Parser(e,t),a=r?i.parseUShort:i.parseULong,s=[],o=0;o<n+1;o+=1){var c=a.call(i);r&&(c*=2),s.push(c)}return s}var VI={parse:GI};function zI(e,t){var n=require("fs");n.readFile(e,function(r,i){if(r)return t(r.message);t(null,O1(i))})}function JI(e,t){var n=new XMLHttpRequest;n.open("get",e,!0),n.responseType="arraybuffer",n.onload=function(){return n.response?t(null,n.response):t("Font could not be loaded: "+n.statusText)},n.onerror=function(){t("Font could not be loaded")},n.send()}function dm(e,t){for(var n=[],r=12,i=0;i<t;i+=1){var a=rt.getTag(e,r),s=rt.getULong(e,r+4),o=rt.getULong(e,r+8),c=rt.getULong(e,r+12);n.push({tag:a,checksum:s,offset:o,length:c,compression:!1}),r+=16}return n}function jI(e,t){for(var n=[],r=44,i=0;i<t;i+=1){var a=rt.getTag(e,r),s=rt.getULong(e,r+4),o=rt.getULong(e,r+8),c=rt.getULong(e,r+12),l=void 0;o<c?l="WOFF":l=!1,n.push({tag:a,offset:s,compression:l,compressedLength:o,length:c}),r+=20}return n}function he(e,t){if(t.compression==="WOFF"){var n=new Uint8Array(e.buffer,t.offset+2,t.compressedLength-2),r=new Uint8Array(t.length);if(Ob(n,r),r.byteLength!==t.length)throw new Error("Decompression error: "+t.tag+" decompressed length doesn't match recorded length");var i=new DataView(r.buffer,0);return{data:i,offset:0}}else return{data:e,offset:t.offset}}function kh(e,t){t=t??{};var n,r,i=new Ot({empty:!0}),a=new DataView(e,0),s,o=[],c=rt.getTag(a,0);if(c===String.fromCharCode(0,1,0,0)||c==="true"||c==="typ1")i.outlinesFormat="truetype",s=rt.getUShort(a,4),o=dm(a,s);else if(c==="OTTO")i.outlinesFormat="cff",s=rt.getUShort(a,4),o=dm(a,s);else if(c==="wOFF"){var l=rt.getTag(a,4);if(l===String.fromCharCode(0,1,0,0))i.outlinesFormat="truetype";else if(l==="OTTO")i.outlinesFormat="cff";else throw new Error("Unsupported OpenType flavor "+c);s=rt.getUShort(a,12),o=jI(a,s)}else throw new Error("Unsupported OpenType signature "+c);for(var u,A,h,f,d,p,m,y,v,w,B,C,x=0;x<s;x+=1){var b=o[x],D=void 0;switch(b.tag){case"cmap":D=he(a,b),i.tables.cmap=t1.parse(D.data,D.offset),i.encoding=new n1(i.tables.cmap);break;case"cvt ":D=he(a,b),C=new rt.Parser(D.data,D.offset),i.tables.cvt=C.parseShortList(b.length/2);break;case"fvar":A=b;break;case"fpgm":D=he(a,b),C=new rt.Parser(D.data,D.offset),i.tables.fpgm=C.parseByteList(b.length);break;case"head":D=he(a,b),i.tables.head=p1.parse(D.data,D.offset),i.unitsPerEm=i.tables.head.unitsPerEm,n=i.tables.head.indexToLocFormat;break;case"hhea":D=he(a,b),i.tables.hhea=m1.parse(D.data,D.offset),i.ascender=i.tables.hhea.ascender,i.descender=i.tables.hhea.descender,i.numberOfHMetrics=i.tables.hhea.numberOfHMetrics;break;case"hmtx":m=b;break;case"ltag":D=he(a,b),r=w1.parse(D.data,D.offset);break;case"maxp":D=he(a,b),i.tables.maxp=v1.parse(D.data,D.offset),i.numGlyphs=i.tables.maxp.numGlyphs;break;case"name":w=b;break;case"OS/2":D=he(a,b),i.tables.os2=Eh.parse(D.data,D.offset);break;case"post":D=he(a,b),i.tables.post=I1.parse(D.data,D.offset),i.glyphNames=new dh(i.tables.post);break;case"prep":D=he(a,b),C=new rt.Parser(D.data,D.offset),i.tables.prep=C.parseByteList(b.length);break;case"glyf":h=b;break;case"loca":v=b;break;case"CFF ":u=b;break;case"kern":y=b;break;case"GDEF":f=b;break;case"GPOS":d=b;break;case"GSUB":p=b;break;case"meta":B=b;break}}var N=he(a,w);if(i.tables.name=D1.parse(N.data,N.offset,r),i.names=i.tables.name,h&&v){var P=n===0,U=he(a,v),L=VI.parse(U.data,U.offset,i.numGlyphs,P),V=he(a,h);i.glyphs=G1.parse(V.data,V.offset,L,i,t)}else if(u){var W=he(a,u);d1.parse(W.data,W.offset,i,t)}else throw new Error("Font doesn't contain TrueType or CFF outlines.");var J=he(a,m);if(y1.parse(i,J.data,J.offset,i.numberOfHMetrics,i.numGlyphs,i.glyphs,t),iS(i,t),y){var Z=he(a,y);i.kerningPairs=HI.parse(Z.data,Z.offset)}else i.kerningPairs={};if(f){var et=he(a,f);i.tables.gdef=NI.parse(et.data,et.offset)}if(d){var ct=he(a,d);i.tables.gpos=OI.parse(ct.data,ct.offset),i.position.init()}if(p){var O=he(a,p);i.tables.gsub=F1.parse(O.data,O.offset)}if(A){var M=he(a,A);i.tables.fvar=SI.parse(M.data,M.offset,i.names)}if(B){var z=he(a,B);i.tables.meta=Q1.parse(z.data,z.offset),i.metas=i.tables.meta}return i}function WI(e,t,n){n=n??{};var r=typeof window>"u",i=r&&!n.isUrl?zI:JI;return new Promise(function(a,s){i(e,function(o,c){if(o){if(t)return t(o);s(o)}var l;try{l=kh(c,n)}catch(u){if(t)return t(u,null);s(u)}if(t)return t(null,l);a(l)})})}function KI(e,t){var n=require("fs"),r=n.readFileSync(e);return kh(O1(r),t)}var XI=Object.freeze({__proto__:null,Font:Ot,Glyph:pn,Path:ye,BoundingBox:mr,_parse:rt,parse:kh,load:WI,loadSync:KI}),pm=/[\s\n\\/='"\0<>]/,mm=/^(xlink|xmlns|xml)(:|[A-Z])/,_I=/^accessK|^auto[A-Z]|^ch|^col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|readO|rowS|spellC|src[A-Z]|tabI|item[A-Z]/,qI=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,ZI=/["&<]/;function Il(e){if(e.length===0||ZI.test(e)===!1)return e;for(var t=0,n=0,r="",i="";n<e.length;n++){switch(e.charCodeAt(n)){case 34:i=""";break;case 38:i="&";break;case 60:i="<";break;default:continue}n!==t&&(r+=e.slice(t,n)),r+=i,t=n+1}return n!==t&&(r+=e.slice(t,n)),r}var ym={},$I=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),tF=/[A-Z]/g;function eF(e){var t="";for(var n in e){var r=e[n];if(r!=null&&r!==""){var i=n[0]=="-"?n:ym[n]||(ym[n]=n.replace(tF,"-$&").toLowerCase()),a=";";typeof r!="number"||i.startsWith("--")||$I.has(i)||(a="px;"),t=t+i+":"+r+a}}return t||void 0}var Rh,Mi,Xs,Ti,wm=[],nF=Array.isArray,Oh=Object.assign;function rF(e,t){var n=$.__s;$.__s=!0,Rh=$.__b,Mi=$.diffed,Xs=$.__r,Ti=$.unmount;var r=nr(ze,null);r.__k=[e];try{return Qa(e,t||Em,!1,void 0,r)}finally{$.__c&&$.__c(e,wm),$.__s=n,wm.length=0}}function vm(){this.__d=!0}var Em={};function Bm(e,t){var n,r=e.type,i=!0;return e.__c?(i=!1,(n=e.__c).state=n.__s):n=new r(e.props,t),e.__c=n,n.__v=e,n.props=e.props,n.context=t,n.__d=!0,n.state==null&&(n.state=Em),n.__s==null&&(n.__s=n.state),r.getDerivedStateFromProps?n.state=Oh({},n.state,r.getDerivedStateFromProps(n.props,n.state)):i&&n.componentWillMount?(n.componentWillMount(),n.state=n.__s!==n.state?n.__s:n.state):!i&&n.componentWillUpdate&&n.componentWillUpdate(),Xs&&Xs(e),n.render(n.props,n.state,t)}function Qa(e,t,n,r,i){if(e==null||e===!0||e===!1||e==="")return"";if(typeof e!="object")return typeof e=="function"?"":Il(e+"");if(nF(e)){var a="";i.__k=e;for(var s=0;s<e.length;s++){var o=e[s];o!=null&&typeof o!="boolean"&&(a+=Qa(o,t,n,r,i))}return a}if(e.constructor!==void 0)return"";e.__=i,Rh&&Rh(e);var c,l,u,A=e.type,h=e.props,f=t;if(typeof A=="function"){if(A===ze){if(h.UNSTABLE_comment)return"<!--"+Il(h.UNSTABLE_comment||"")+"-->";l=h.children}else{if((c=A.contextType)!=null){var d=t[c.__c];f=d?d.props.value:c.__}if(A.prototype&&typeof A.prototype.render=="function")l=Bm(e,f),u=e.__c;else{e.__c=u={__v:e,props:h,context:f,setState:vm,forceUpdate:vm,__d:!0,__h:[]};for(var p=0;u.__d&&p++<25;)u.__d=!1,Xs&&Xs(e),l=A.call(u,h,f);u.__d=!0}if(u.getChildContext!=null&&(t=Oh({},t,u.getChildContext())),(A.getDerivedStateFromError||u.componentDidCatch)&&$.errorBoundaries){var m="";l=l!=null&&l.type===ze&&l.key==null?l.props.children:l;try{return m=Qa(l,t,n,r,e)}catch(b){return A.getDerivedStateFromError&&(u.__s=A.getDerivedStateFromError(b)),u.componentDidCatch&&u.componentDidCatch(b,{}),u.__d&&(l=Bm(e,t),(u=e.__c).getChildContext!=null&&(t=Oh({},t,u.getChildContext())),m=Qa(l=l!=null&&l.type===ze&&l.key==null?l.props.children:l,t,n,r,e)),m}finally{Mi&&Mi(e),e.__=void 0,Ti&&Ti(e)}}}var y=Qa(l=l!=null&&l.type===ze&&l.key==null?l.props.children:l,t,n,r,e);return Mi&&Mi(e),e.__=void 0,Ti&&Ti(e),y}var v,w="<"+A,B="";for(var C in h){var x=h[C];switch(C){case"children":v=x;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in h)continue;C="for";break;case"className":if("class"in h)continue;C="class";break;case"defaultChecked":C="checked";break;case"defaultSelected":C="selected";break;case"defaultValue":case"value":switch(C="value",A){case"textarea":v=x;continue;case"select":r=x;continue;case"option":r!=x||"selected"in h||(w+=" selected")}break;case"dangerouslySetInnerHTML":B=x&&x.__html;continue;case"style":typeof x=="object"&&(x=eF(x));break;case"acceptCharset":C="accept-charset";break;case"httpEquiv":C="http-equiv";break;default:if(mm.test(C))C=C.replace(mm,"$1:$2").toLowerCase();else{if(pm.test(C))continue;C[4]!=="-"&&C!=="draggable"||x==null?n?qI.test(C)&&(C=C==="panose1"?"panose-1":C.replace(/([A-Z])/g,"-$1").toLowerCase()):_I.test(C)&&(C=C.toLowerCase()):x+=""}}x!=null&&x!==!1&&typeof x!="function"&&(w=x===!0||x===""?w+" "+C:w+" "+C+'="'+Il(x+"")+'"')}if(pm.test(A))throw new Error(A+" is not a valid HTML tag name in "+w+">");return B||(typeof v=="string"?B=Il(v):v!=null&&v!==!1&&v!==!0&&(B=Qa(v,t,A==="svg"||A!=="foreignObject"&&n,r,e))),Mi&&Mi(e),e.__=void 0,Ti&&Ti(e),!B&&iF.has(A)?w+"/>":w+">"+B+"</"+A+">"}var iF=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),aF=rF;let Uh,Lh;const Cm=new Map,sF=async e=>{const t=Cm.get(e);if(t)return t;const n=(await Ma(e)).blob();return Cm.set(e,n),n};function oF(e){Uh=e}function cF(e){Lh=e}function Fl(){if(!Uh)throw new Error("DOM constructor is not registered. Please register it before calling this function.");return new Uh}function Ma(e,t){if(!Lh){if(typeof window<"u"&&window.fetch)return window.fetch(e,t);if(typeof global<"u"&&global.fetch)return global.fetch(e,t);throw new Error("Fetch implementation is not registered. Please register it before calling this function.")}return Lh(e,t)}const _s=e=>e.every(t=>t!=="undefined"),Ql=e=>_s([typeof document])?document.createElement(e):Fl().window.document.createElement(e),lF=(e,t)=>{if(_s([typeof document]))return document.createElementNS(e,t);const n=Fl().window.document.createElement(t);return n.setAttribute("xmlns",e),n},$r=()=>{if(_s([typeof DOMParser]))return new DOMParser;const e=Fl();return new e.window.DOMParser},Ml=e=>new Promise((t,n)=>{Ma(e).then(r=>{t(r.arrayBuffer())}).catch(r=>{n(r)})}),Ln=e=>new Promise((t,n)=>{Ma(e).then(r=>{t(r.text())}).catch(n)}),xm=e=>aF(e),bm=async(e,t)=>{if(_s([typeof FontFace])){const n=e.names.fullName.en,r=new FontFace(n,`url(${t})`);return document.fonts.add(r),r.load()}},Tl=()=>{if(_s([typeof XMLSerializer]))return new XMLSerializer;const e=Fl();return new e.window.XMLSerializer},Sm=e=>btoa(e),Yh=e=>{function t(){const r=new Uint8Array(e),i=4;if(r.length>=i){let a=new Array(i);for(let s=0;s<i;s++)a[s]=new Uint8Array(e)[s].toString(16);switch(a.join("").toUpperCase()){case"89504E47":return"image/png";case"47494638":return"image/gif";case"25504446":return"application/pdf";case"FFD8FFDB":case"FFD8FFE0":return"image/jpeg";case"504B0304":return"application/zip";default:return null}}return null}return t()||"image/svg+xml"},Dm=async e=>{const t=await sF(e);return await AF(t)},Im=async e=>{const t=await Yh(e),n=new Uint8Array(e),r=String.fromCharCode(...n),i=btoa(r);return`data:${t};base64,${i}`},uF=e=>{const t=e.replace(/\r?\n/g,""),n=t.indexOf(",");if(n===-1||n<=4)throw new TypeError("malformed data: URI");const r=t.substring(5,n).split(";");let i=!1;for(let s=1;s<r.length;s++)r[s]==="base64"&&(i=!0);const a=decodeURI(t.substring(n+1));return i?new Uint8Array(atob(a).split("").map(s=>s.charCodeAt(0))).buffer:new Uint8Array(a.split("").map(s=>s.charCodeAt(0))).buffer},AF=e=>new Promise((t,n)=>{const r=new FileReader;r.onload=function(i){const a=i.target;!a||!a.result?n():t(a.result.toString())},r.readAsDataURL(e)}),Fm=new Map;class hF{constructor(t){this.font=t,this.glyphsFromText=new Map,this.kerningValues=new Map,this.height=this.calculateApproximateHeight()}getFont(){return this.font}getGlyphs(t){const n=this.glyphsFromText.get(t);if(n)return n;const r=this.font.stringToGlyphs(t);return this.glyphsFromText.set(t,r),r}getApproximateHeight(){return this.height}getExactHeight(t){const n=this.font.stringToGlyphs(t);let r=0,i=0;return n.forEach(a=>{const s=a.getMetrics();r=Math.max(r,s.yMax),i=Math.min(i,s.yMin)}),r-i}getKerningValue(t,n){if(!t.name||!n.name)return;let r=this.kerningValues.get(t.name);r||(r=new Map,this.kerningValues.set(t.name,r));let i=r.get(n.name);return i||(i=this.font.getKerningValue(t,n),r.set(n.name,i)),i}calculateApproximateHeight(){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=this.font.stringToGlyphs(t);let r=0,i=0;return n.forEach(a=>{const s=a.getMetrics();r=Math.max(r,s.yMax),i=Math.min(i,s.yMin)}),r-i}}const fF=e=>e.substring(0,5).toLowerCase().trim()==="data:",Ni=async e=>{try{return ti(e).getFont()}catch{const t=fF(e)?Pi(e):Pi(await Dm(e));return Qm(e,t),await bm(t,e),t}},Pi=e=>{try{return ti(e).getFont()}catch{const t=uF(e),n=XI.parse(t);return Qm(e,n),n}},ti=e=>{const t=Fm.get(e);if(t)return t;throw new Error("Font metrics unavailable for font")},Qm=(e,t)=>{const n=new hF(t);return Fm.set(e,n),n},Nl=(e,t,n,r)=>Math.max(mF(e.join(`
|
|
69
69
|
`),n,r),t),Mm=(e,t,n,r,i,a)=>{const s=(a||Gh)*i.getApproximateHeight(),o=t.split(`
|
|
70
70
|
`);try{const c=o.flatMap(u=>Pl(u,e.width,r,i)),l=c.flatMap(u=>u.lines);return{lines:l,requiredHeight:c.flatMap(u=>u.lines).length*(r*s),fontSize:n,requiredWidth:Nl(l,e.width,r,i)}}catch{const c=t.split("");return{lines:c,requiredHeight:c.length*(r*s),fontSize:n,requiredWidth:Nl(c,e.width,r,i)}}},Pl=(e,t,n,r)=>{const i=ei(e,n,r);if(i<=t)return{lines:[e],width:i};if(!(e.indexOf(" ")>-1)){if(e.length<=1)throw new Error(`Character ${e} is wider than region`);const l=Math.floor(e.length/2),u=Pl(e.slice(0,l),t,n,r),A=Pl(e.slice(l),t,n,r);return{lines:[...u.lines,...A.lines],width:Math.max(u.width,A.width)}}const a=e.split(" "),s=[];let o=-1/0,c=0;for(;c<a.length;){const l=a[c];if(ei(l,n,r)>t){const u=Pl(l,t,n,r);s.push(...u.lines),o=Math.max(o,u.width),c++}else{const u=[l];o=Math.max(o,ei(l,n,r));let A=c+1,h=!0;for(;A<a.length&&h;){const f=a[A],d=ei(`${u.join(" ")} ${f}`,n,r);d<=t?(u.push(f),o=Math.max(o,d),A++):h=!1}s.push(u.join(" ")),c=A}}if(o<0)throw new Error(`No max width calculated for text: ${s}.`);return{lines:s,width:o}},gF=(e,t,n,r,i,a)=>{const s=(a??Gh)*t.getApproximateHeight(),o=1/n.unitsPerEm,c=Tm(e,o,t),l=e.length*s*o,u=r/c,A=i/l;return Math.min(A,u)},dF=(e,t,n,r)=>{var i;const a=ti(t.fontData.assetUrl),s=a.getFont(),o=t.fontSize/s.unitsPerEm;if(!n)return Mm(t,e,t.fontSize,o,a,r);let c;if(t.text?c=t.text.split(`
|
|
71
71
|
`):c=((i=t.input)==null?void 0:i.split(`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spiffcommerce/core",
|
|
3
|
-
"version": "16.0.0-beta.
|
|
3
|
+
"version": "16.0.0-beta.6",
|
|
4
4
|
"description": "Core client API for interacting with the Spiff Commerce backend.",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "dist/index.umd.cjs",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@apollo/client": "^3.8.3",
|
|
57
|
-
"@spiffcommerce/papyrus": "5.0.7-alpha.
|
|
57
|
+
"@spiffcommerce/papyrus": "5.0.7-alpha.12",
|
|
58
58
|
"graphql": "^16.8.0",
|
|
59
59
|
"lodash.clonedeep": "^4.5.0",
|
|
60
60
|
"lodash.debounce": "^4.0.8",
|