UNPKG

@times-components/test-utils

Version:
1 lines 167 kB
module.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var s=t[o]={i:o,l:!1,exports:{}};return e[o].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)n.d(o,s,function(t){return e[t]}.bind(null,s));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(e,t){e.exports=require("fs")},function(e,t,n){"use strict";(function(e){var o=n(5),s=n(4),r=n.n(s);t.a=o.a(r.a.join(e,"/../fonts/Roboto-Regular.ttf"))}).call(this,"/")},function(e,t){e.exports=require("crypto")},function(e,t){e.exports=require("tiny-inflate")},function(e,t){e.exports=require("path")},function(e,t,n){"use strict";n(6);var o=n(3),s=n.n(o);function r(e,t,n,o,s){return Math.pow(1-s,3)*e+3*Math.pow(1-s,2)*s*t+3*(1-s)*Math.pow(s,2)*n+Math.pow(s,3)*o}function a(){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN}a.prototype.isEmpty=function(){return isNaN(this.x1)||isNaN(this.y1)||isNaN(this.x2)||isNaN(this.y2)},a.prototype.addPoint=function(e,t){"number"==typeof e&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),e<this.x1&&(this.x1=e),e>this.x2&&(this.x2=e)),"number"==typeof t&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=t,this.y2=t),t<this.y1&&(this.y1=t),t>this.y2&&(this.y2=t))},a.prototype.addX=function(e){this.addPoint(e,null)},a.prototype.addY=function(e){this.addPoint(null,e)},a.prototype.addBezier=function(e,t,n,o,s,a,i,l){const c=[e,t],u=[n,o],p=[s,a],h=[i,l];this.addPoint(e,t),this.addPoint(i,l);for(let e=0;e<=1;e++){const t=6*c[e]-12*u[e]+6*p[e],n=-3*c[e]+9*u[e]-9*p[e]+3*h[e],o=3*u[e]-3*c[e];if(0===n){if(0===t)continue;const n=-o/t;0<n&&n<1&&(0===e&&this.addX(r(c[e],u[e],p[e],h[e],n)),1===e&&this.addY(r(c[e],u[e],p[e],h[e],n)));continue}const s=Math.pow(t,2)-4*o*n;if(s<0)continue;const a=(-t+Math.sqrt(s))/(2*n);0<a&&a<1&&(0===e&&this.addX(r(c[e],u[e],p[e],h[e],a)),1===e&&this.addY(r(c[e],u[e],p[e],h[e],a)));const i=(-t-Math.sqrt(s))/(2*n);0<i&&i<1&&(0===e&&this.addX(r(c[e],u[e],p[e],h[e],i)),1===e&&this.addY(r(c[e],u[e],p[e],h[e],i)))}},a.prototype.addQuad=function(e,t,n,o,s,r){const a=e+2/3*(n-e),i=t+2/3*(o-t),l=a+1/3*(s-e),c=i+1/3*(r-t);this.addBezier(e,t,a,i,l,c,s,r)};var i=a;function l(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}l.prototype.moveTo=function(e,t){this.commands.push({type:"M",x:e,y:t})},l.prototype.lineTo=function(e,t){this.commands.push({type:"L",x:e,y:t})},l.prototype.curveTo=l.prototype.bezierCurveTo=function(e,t,n,o,s,r){this.commands.push({type:"C",x1:e,y1:t,x2:n,y2:o,x:s,y:r})},l.prototype.quadTo=l.prototype.quadraticCurveTo=function(e,t,n,o){this.commands.push({type:"Q",x1:e,y1:t,x:n,y:o})},l.prototype.close=l.prototype.closePath=function(){this.commands.push({type:"Z"})},l.prototype.extend=function(e){if(e.commands)e=e.commands;else if(e instanceof i){const t=e;return this.moveTo(t.x1,t.y1),this.lineTo(t.x2,t.y1),this.lineTo(t.x2,t.y2),this.lineTo(t.x1,t.y2),void this.close()}Array.prototype.push.apply(this.commands,e)},l.prototype.getBoundingBox=function(){const e=new i;let t=0,n=0,o=0,s=0;for(let r=0;r<this.commands.length;r++){const a=this.commands[r];switch(a.type){case"M":e.addPoint(a.x,a.y),t=o=a.x,n=s=a.y;break;case"L":e.addPoint(a.x,a.y),o=a.x,s=a.y;break;case"Q":e.addQuad(o,s,a.x1,a.y1,a.x,a.y),o=a.x,s=a.y;break;case"C":e.addBezier(o,s,a.x1,a.y1,a.x2,a.y2,a.x,a.y),o=a.x,s=a.y;break;case"Z":o=t,s=n;break;default:throw new Error("Unexpected path command "+a.type)}}return e.isEmpty()&&e.addPoint(0,0),e},l.prototype.draw=function(e){e.beginPath();for(let t=0;t<this.commands.length;t+=1){const n=this.commands[t];"M"===n.type?e.moveTo(n.x,n.y):"L"===n.type?e.lineTo(n.x,n.y):"C"===n.type?e.bezierCurveTo(n.x1,n.y1,n.x2,n.y2,n.x,n.y):"Q"===n.type?e.quadraticCurveTo(n.x1,n.y1,n.x,n.y):"Z"===n.type&&e.closePath()}this.fill&&(e.fillStyle=this.fill,e.fill()),this.stroke&&(e.strokeStyle=this.stroke,e.lineWidth=this.strokeWidth,e.stroke())},l.prototype.toPathData=function(e){function t(t){return Math.round(t)===t?""+Math.round(t):t.toFixed(e)}function n(){let e="";for(let n=0;n<arguments.length;n+=1){const o=arguments[n];o>=0&&n>0&&(e+=" "),e+=t(o)}return e}e=void 0!==e?e:2;let o="";for(let e=0;e<this.commands.length;e+=1){const t=this.commands[e];"M"===t.type?o+="M"+n(t.x,t.y):"L"===t.type?o+="L"+n(t.x,t.y):"C"===t.type?o+="C"+n(t.x1,t.y1,t.x2,t.y2,t.x,t.y):"Q"===t.type?o+="Q"+n(t.x1,t.y1,t.x,t.y):"Z"===t.type&&(o+="Z")}return o},l.prototype.toSVG=function(e){let t='<path d="';return t+=this.toPathData(e),t+='"',this.fill&&"black"!==this.fill&&(null===this.fill?t+=' fill="none"':t+=' fill="'+this.fill+'"'),this.stroke&&(t+=' stroke="'+this.stroke+'" stroke-width="'+this.strokeWidth+'"'),t+="/>",t},l.prototype.toDOMElement=function(e){const t=this.toPathData(e),n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d",t),n};var c=l;function u(e){throw new Error(e)}function p(e,t){e||u(t)}var h={fail:u,argument:p,assert:p};const f={},d={},g={};function m(e){return function(){return e}}d.BYTE=function(e){return h.argument(e>=0&&e<=255,"Byte value should be between 0 and 255."),[e]},g.BYTE=m(1),d.CHAR=function(e){return[e.charCodeAt(0)]},g.CHAR=m(1),d.CHARARRAY=function(e){const t=[];for(let n=0;n<e.length;n+=1)t[n]=e.charCodeAt(n);return t},g.CHARARRAY=function(e){return e.length},d.USHORT=function(e){return[e>>8&255,255&e]},g.USHORT=m(2),d.SHORT=function(e){return e>=32768&&(e=-(65536-e)),[e>>8&255,255&e]},g.SHORT=m(2),d.UINT24=function(e){return[e>>16&255,e>>8&255,255&e]},g.UINT24=m(3),d.ULONG=function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]},g.ULONG=m(4),d.LONG=function(e){return e>=2147483648&&(e=-(4294967296-e)),[e>>24&255,e>>16&255,e>>8&255,255&e]},g.LONG=m(4),d.FIXED=d.ULONG,g.FIXED=g.ULONG,d.FWORD=d.SHORT,g.FWORD=g.SHORT,d.UFWORD=d.USHORT,g.UFWORD=g.USHORT,d.LONGDATETIME=function(e){return[0,0,0,0,e>>24&255,e>>16&255,e>>8&255,255&e]},g.LONGDATETIME=m(8),d.TAG=function(e){return h.argument(4===e.length,"Tag should be exactly 4 ASCII characters."),[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]},g.TAG=m(4),d.Card8=d.BYTE,g.Card8=g.BYTE,d.Card16=d.USHORT,g.Card16=g.USHORT,d.OffSize=d.BYTE,g.OffSize=g.BYTE,d.SID=d.USHORT,g.SID=g.USHORT,d.NUMBER=function(e){return e>=-107&&e<=107?[e+139]:e>=108&&e<=1131?[247+((e-=108)>>8),255&e]:e>=-1131&&e<=-108?[251+((e=-e-108)>>8),255&e]:e>=-32768&&e<=32767?d.NUMBER16(e):d.NUMBER32(e)},g.NUMBER=function(e){return d.NUMBER(e).length},d.NUMBER16=function(e){return[28,e>>8&255,255&e]},g.NUMBER16=m(3),d.NUMBER32=function(e){return[29,e>>24&255,e>>16&255,e>>8&255,255&e]},g.NUMBER32=m(5),d.REAL=function(e){let t=e.toString();const n=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(t);if(n){const o=parseFloat("1e"+((n[2]?+n[2]:0)+n[1].length));t=(Math.round(e*o)/o).toString()}let o="";for(let e=0,n=t.length;e<n;e+=1){const n=t[e];o+="e"===n?"-"===t[++e]?"c":"b":"."===n?"a":"-"===n?"e":n}o+=1&o.length?"f":"ff";const s=[30];for(let e=0,t=o.length;e<t;e+=2)s.push(parseInt(o.substr(e,2),16));return s},g.REAL=function(e){return d.REAL(e).length},d.NAME=d.CHARARRAY,g.NAME=g.CHARARRAY,d.STRING=d.CHARARRAY,g.STRING=g.CHARARRAY,f.UTF8=function(e,t,n){const o=[],s=n;for(let n=0;n<s;n++,t+=1)o[n]=e.getUint8(t);return String.fromCharCode.apply(null,o)},f.UTF16=function(e,t,n){const o=[],s=n/2;for(let n=0;n<s;n++,t+=2)o[n]=e.getUint16(t);return String.fromCharCode.apply(null,o)},d.UTF16=function(e){const t=[];for(let n=0;n<e.length;n+=1){const o=e.charCodeAt(n);t[t.length]=o>>8&255,t[t.length]=255&o}return t},g.UTF16=function(e){return 2*e.length};const y={"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":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"};f.MACSTRING=function(e,t,n,o){const s=y[o];if(void 0===s)return;let r="";for(let o=0;o<n;o++){const n=e.getUint8(t+o);r+=n<=127?String.fromCharCode(n):s[127&n]}return r};const v="function"==typeof WeakMap&&new WeakMap;let b;function x(e){return e>=-128&&e<=127}function S(e,t,n){let o=0;const s=e.length;for(;t<s&&o<64&&0===e[t];)++t,++o;return n.push(128|o-1),t}function T(e,t,n){let o=0;const s=e.length;let r=t;for(;r<s&&o<64;){const t=e[r];if(!x(t))break;if(0===t&&r+1<s&&0===e[r+1])break;++r,++o}n.push(o-1);for(let o=t;o<r;++o)n.push(e[o]+256&255);return r}function U(e,t,n){let o=0;const s=e.length;let r=t;for(;r<s&&o<64;){const t=e[r];if(0===t)break;if(x(t)&&r+1<s&&x(e[r+1]))break;++r,++o}n.push(64|o-1);for(let o=t;o<r;++o){const t=e[o];n.push(t+65536>>8&255,t+256&255)}return r}d.MACSTRING=function(e,t){const n=function(e){if(!b){b={};for(let e in y)b[e]=new String(e)}const t=b[e];if(void 0===t)return;if(v){const e=v.get(t);if(void 0!==e)return e}const n=y[e];if(void 0===n)return;const o={};for(let e=0;e<n.length;e++)o[n.charCodeAt(e)]=e+128;return v&&v.set(t,o),o}(t);if(void 0===n)return;const o=[];for(let t=0;t<e.length;t++){let s=e.charCodeAt(t);if(s>=128&&(s=n[s],void 0===s))return;o[t]=s}return o},g.MACSTRING=function(e,t){const n=d.MACSTRING(e,t);return void 0!==n?n.length:0},d.VARDELTAS=function(e){let t=0;const n=[];for(;t<e.length;){const o=e[t];t=0===o?S(e,t,n):o>=-128&&o<=127?T(e,t,n):U(e,t,n)}return n},d.INDEX=function(e){let t=1;const n=[t],o=[];for(let s=0;s<e.length;s+=1){const r=d.OBJECT(e[s]);Array.prototype.push.apply(o,r),t+=r.length,n.push(t)}if(0===o.length)return[0,0];const s=[],r=1+Math.floor(Math.log(t)/Math.log(2))/8|0,a=[void 0,d.BYTE,d.USHORT,d.UINT24,d.ULONG][r];for(let e=0;e<n.length;e+=1){const t=a(n[e]);Array.prototype.push.apply(s,t)}return Array.prototype.concat(d.Card16(e.length),d.OffSize(r),s,o)},g.INDEX=function(e){return d.INDEX(e).length},d.DICT=function(e){let t=[];const n=Object.keys(e),o=n.length;for(let s=0;s<o;s+=1){const o=parseInt(n[s],0),r=e[o];t=t.concat(d.OPERAND(r.value,r.type)),t=t.concat(d.OPERATOR(o))}return t},g.DICT=function(e){return d.DICT(e).length},d.OPERATOR=function(e){return e<1200?[e]:[12,e-1200]},d.OPERAND=function(e,t){let n=[];if(Array.isArray(t))for(let o=0;o<t.length;o+=1)h.argument(e.length===t.length,"Not enough arguments given for type"+t),n=n.concat(d.OPERAND(e[o],t[o]));else if("SID"===t)n=n.concat(d.NUMBER(e));else if("offset"===t)n=n.concat(d.NUMBER32(e));else if("number"===t)n=n.concat(d.NUMBER(e));else{if("real"!==t)throw new Error("Unknown operand type "+t);n=n.concat(d.REAL(e))}return n},d.OP=d.BYTE,g.OP=g.BYTE;const k="function"==typeof WeakMap&&new WeakMap;function O(e,t,n){for(let e=0;e<t.length;e+=1){const n=t[e];this[n.name]=n.value}if(this.tableName=e,this.fields=t,n){const e=Object.keys(n);for(let t=0;t<e.length;t+=1){const o=e[t],s=n[o];void 0!==this[o]&&(this[o]=s)}}}function E(e,t,n){void 0===n&&(n=t.length);const o=new Array(t.length+1);o[0]={name:e+"Count",type:"USHORT",value:n};for(let n=0;n<t.length;n++)o[n+1]={name:e+n,type:"USHORT",value:t[n]};return o}function R(e,t,n){const o=t.length,s=new Array(o+1);s[0]={name:e+"Count",type:"USHORT",value:o};for(let r=0;r<o;r++)s[r+1]={name:e+r,type:"TABLE",value:n(t[r],r)};return s}function C(e,t,n){const o=t.length;let s=[];s[0]={name:e+"Count",type:"USHORT",value:o};for(let e=0;e<o;e++)s=s.concat(n(t[e],e));return s}function L(e){1===e.format?O.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:1}].concat(E("glyph",e.glyphs))):h.assert(!1,"Can't create coverage table format 2 yet.")}function w(e){O.call(this,"scriptListTable",C("scriptRecord",e,(function(e,t){const n=e.script;let o=n.defaultLangSys;return h.assert(!!o,"Unable to write GSUB: script "+e.tag+" has no default language system."),[{name:"scriptTag"+t,type:"TAG",value:e.tag},{name:"script"+t,type:"TABLE",value:new O("scriptTable",[{name:"defaultLangSys",type:"TABLE",value:new O("defaultLangSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:o.reqFeatureIndex}].concat(E("featureIndex",o.featureIndexes)))}].concat(C("langSys",n.langSysRecords,(function(e,t){const n=e.langSys;return[{name:"langSysTag"+t,type:"TAG",value:e.tag},{name:"langSys"+t,type:"TABLE",value:new O("langSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:n.reqFeatureIndex}].concat(E("featureIndex",n.featureIndexes)))}]}))))}]})))}function D(e){O.call(this,"featureListTable",C("featureRecord",e,(function(e,t){const n=e.feature;return[{name:"featureTag"+t,type:"TAG",value:e.tag},{name:"feature"+t,type:"TABLE",value:new O("featureTable",[{name:"featureParams",type:"USHORT",value:n.featureParams}].concat(E("lookupListIndex",n.lookupListIndexes)))}]})))}function I(e,t){O.call(this,"lookupListTable",R("lookup",e,(function(e){let n=t[e.lookupType];return h.assert(!!n,"Unable to write GSUB lookup type "+e.lookupType+" tables."),new O("lookupTable",[{name:"lookupType",type:"USHORT",value:e.lookupType},{name:"lookupFlag",type:"USHORT",value:e.lookupFlag}].concat(R("subtable",e.subtables,n)))})))}d.CHARSTRING=function(e){if(k){const t=k.get(e);if(void 0!==t)return t}let t=[];const n=e.length;for(let o=0;o<n;o+=1){const n=e[o];t=t.concat(d[n.type](n.value))}return k&&k.set(e,t),t},g.CHARSTRING=function(e){return d.CHARSTRING(e).length},d.OBJECT=function(e){const t=d[e.type];return h.argument(void 0!==t,"No encoding function for type "+e.type),t(e.value)},g.OBJECT=function(e){const t=g[e.type];return h.argument(void 0!==t,"No sizeOf function for type "+e.type),t(e.value)},d.TABLE=function(e){let t=[];const n=e.fields.length,o=[],s=[];for(let r=0;r<n;r+=1){const n=e.fields[r],a=d[n.type];h.argument(void 0!==a,"No encoding function for field type "+n.type+" ("+n.name+")");let i=e[n.name];void 0===i&&(i=n.value);const l=a(i);"TABLE"===n.type?(s.push(t.length),t=t.concat([0,0]),o.push(l)):t=t.concat(l)}for(let n=0;n<o.length;n+=1){const r=s[n],a=t.length;h.argument(a<65536,"Table "+e.tableName+" too big."),t[r]=a>>8,t[r+1]=255&a,t=t.concat(o[n])}return t},g.TABLE=function(e){let t=0;const n=e.fields.length;for(let o=0;o<n;o+=1){const n=e.fields[o],s=g[n.type];h.argument(void 0!==s,"No sizeOf function for field type "+n.type+" ("+n.name+")");let r=e[n.name];void 0===r&&(r=n.value),t+=s(r),"TABLE"===n.type&&(t+=2)}return t},d.RECORD=d.TABLE,g.RECORD=g.TABLE,d.LITERAL=function(e){return e},g.LITERAL=function(e){return e.length},O.prototype.encode=function(){return d.TABLE(this)},O.prototype.sizeOf=function(){return g.TABLE(this)},L.prototype=Object.create(O.prototype),L.prototype.constructor=L,w.prototype=Object.create(O.prototype),w.prototype.constructor=w,D.prototype=Object.create(O.prototype),D.prototype.constructor=D,I.prototype=Object.create(O.prototype),I.prototype.constructor=I;var M={Table:O,Record:O,Coverage:L,ScriptList:w,FeatureList:D,LookupList:I,ushortList:E,tableList:R,recordList:C};function B(e,t){return e.getUint8(t)}function G(e,t){return e.getUint16(t,!1)}function N(e,t){return e.getUint32(t,!1)}function P(e,t){return e.getInt16(t,!1)+e.getUint16(t+2,!1)/65535}const F={byte:1,uShort:2,short:2,uLong:4,fixed:4,longDateTime:8,tag:4};function A(e,t){this.data=e,this.offset=t,this.relativeOffset=0}A.prototype.parseByte=function(){const e=this.data.getUint8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},A.prototype.parseChar=function(){const e=this.data.getInt8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},A.prototype.parseCard8=A.prototype.parseByte,A.prototype.parseUShort=function(){const e=this.data.getUint16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},A.prototype.parseCard16=A.prototype.parseUShort,A.prototype.parseSID=A.prototype.parseUShort,A.prototype.parseOffset16=A.prototype.parseUShort,A.prototype.parseShort=function(){const e=this.data.getInt16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},A.prototype.parseF2Dot14=function(){const e=this.data.getInt16(this.offset+this.relativeOffset)/16384;return this.relativeOffset+=2,e},A.prototype.parseULong=function(){const e=N(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},A.prototype.parseOffset32=A.prototype.parseULong,A.prototype.parseFixed=function(){const e=P(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},A.prototype.parseString=function(e){const t=this.data,n=this.offset+this.relativeOffset;let o="";this.relativeOffset+=e;for(let s=0;s<e;s++)o+=String.fromCharCode(t.getUint8(n+s));return o},A.prototype.parseTag=function(){return this.parseString(4)},A.prototype.parseLongDateTime=function(){let e=N(this.data,this.offset+this.relativeOffset+4);return e-=2082844800,this.relativeOffset+=8,e},A.prototype.parseVersion=function(e){const t=G(this.data,this.offset+this.relativeOffset),n=G(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,void 0===e&&(e=4096),t+n/e/10},A.prototype.skip=function(e,t){void 0===t&&(t=1),this.relativeOffset+=F[e]*t},A.prototype.parseULongList=function(e){void 0===e&&(e=this.parseULong());const t=new Array(e),n=this.data;let o=this.offset+this.relativeOffset;for(let s=0;s<e;s++)t[s]=n.getUint32(o),o+=4;return this.relativeOffset+=4*e,t},A.prototype.parseOffset16List=A.prototype.parseUShortList=function(e){void 0===e&&(e=this.parseUShort());const t=new Array(e),n=this.data;let o=this.offset+this.relativeOffset;for(let s=0;s<e;s++)t[s]=n.getUint16(o),o+=2;return this.relativeOffset+=2*e,t},A.prototype.parseShortList=function(e){const t=new Array(e),n=this.data;let o=this.offset+this.relativeOffset;for(let s=0;s<e;s++)t[s]=n.getInt16(o),o+=2;return this.relativeOffset+=2*e,t},A.prototype.parseByteList=function(e){const t=new Array(e),n=this.data;let o=this.offset+this.relativeOffset;for(let s=0;s<e;s++)t[s]=n.getUint8(o++);return this.relativeOffset+=e,t},A.prototype.parseList=function(e,t){t||(t=e,e=this.parseUShort());const n=new Array(e);for(let o=0;o<e;o++)n[o]=t.call(this);return n},A.prototype.parseList32=function(e,t){t||(t=e,e=this.parseULong());const n=new Array(e);for(let o=0;o<e;o++)n[o]=t.call(this);return n},A.prototype.parseRecordList=function(e,t){t||(t=e,e=this.parseUShort());const n=new Array(e),o=Object.keys(t);for(let s=0;s<e;s++){const e={};for(let n=0;n<o.length;n++){const s=o[n],r=t[s];e[s]=r.call(this)}n[s]=e}return n},A.prototype.parseRecordList32=function(e,t){t||(t=e,e=this.parseULong());const n=new Array(e),o=Object.keys(t);for(let s=0;s<e;s++){const e={};for(let n=0;n<o.length;n++){const s=o[n],r=t[s];e[s]=r.call(this)}n[s]=e}return n},A.prototype.parseStruct=function(e){if("function"==typeof e)return e.call(this);{const t=Object.keys(e),n={};for(let o=0;o<t.length;o++){const s=t[o],r=e[s];n[s]=r.call(this)}return n}},A.prototype.parseValueRecord=function(e){if(void 0===e&&(e=this.parseUShort()),0===e)return;const t={};return 1&e&&(t.xPlacement=this.parseShort()),2&e&&(t.yPlacement=this.parseShort()),4&e&&(t.xAdvance=this.parseShort()),8&e&&(t.yAdvance=this.parseShort()),16&e&&(t.xPlaDevice=void 0,this.parseShort()),32&e&&(t.yPlaDevice=void 0,this.parseShort()),64&e&&(t.xAdvDevice=void 0,this.parseShort()),128&e&&(t.yAdvDevice=void 0,this.parseShort()),t},A.prototype.parseValueRecordList=function(){const e=this.parseUShort(),t=this.parseUShort(),n=new Array(t);for(let o=0;o<t;o++)n[o]=this.parseValueRecord(e);return n},A.prototype.parsePointer=function(e){const t=this.parseOffset16();if(t>0)return new A(this.data,this.offset+t).parseStruct(e)},A.prototype.parsePointer32=function(e){const t=this.parseOffset32();if(t>0)return new A(this.data,this.offset+t).parseStruct(e)},A.prototype.parseListOfLists=function(e){const t=this.parseOffset16List(),n=t.length,o=this.relativeOffset,s=new Array(n);for(let o=0;o<n;o++){const n=t[o];if(0!==n)if(this.relativeOffset=n,e){const t=this.parseOffset16List(),r=new Array(t.length);for(let o=0;o<t.length;o++)this.relativeOffset=n+t[o],r[o]=e.call(this);s[o]=r}else s[o]=this.parseUShortList();else s[o]=void 0}return this.relativeOffset=o,s},A.prototype.parseCoverage=function(){const e=this.offset+this.relativeOffset,t=this.parseUShort(),n=this.parseUShort();if(1===t)return{format:1,glyphs:this.parseUShortList(n)};if(2===t){const e=new Array(n);for(let t=0;t<n;t++)e[t]={start:this.parseUShort(),end:this.parseUShort(),index:this.parseUShort()};return{format:2,ranges:e}}throw new Error("0x"+e.toString(16)+": Coverage format must be 1 or 2.")},A.prototype.parseClassDef=function(){const e=this.offset+this.relativeOffset,t=this.parseUShort();if(1===t)return{format:1,startGlyph:this.parseUShort(),classes:this.parseUShortList()};if(2===t)return{format:2,ranges:this.parseRecordList({start:A.uShort,end:A.uShort,classId:A.uShort})};throw new Error("0x"+e.toString(16)+": ClassDef format must be 1 or 2.")},A.list=function(e,t){return function(){return this.parseList(e,t)}},A.list32=function(e,t){return function(){return this.parseList32(e,t)}},A.recordList=function(e,t){return function(){return this.parseRecordList(e,t)}},A.recordList32=function(e,t){return function(){return this.parseRecordList32(e,t)}},A.pointer=function(e){return function(){return this.parsePointer(e)}},A.pointer32=function(e){return function(){return this.parsePointer32(e)}},A.tag=A.prototype.parseTag,A.byte=A.prototype.parseByte,A.uShort=A.offset16=A.prototype.parseUShort,A.uShortList=A.prototype.parseUShortList,A.uLong=A.offset32=A.prototype.parseULong,A.uLongList=A.prototype.parseULongList,A.struct=A.prototype.parseStruct,A.coverage=A.prototype.parseCoverage,A.classDef=A.prototype.parseClassDef;const H={reserved:A.uShort,reqFeatureIndex:A.uShort,featureIndexes:A.uShortList};A.prototype.parseScriptList=function(){return this.parsePointer(A.recordList({tag:A.tag,script:A.pointer({defaultLangSys:A.pointer(H),langSysRecords:A.recordList({tag:A.tag,langSys:A.pointer(H)})})}))||[]},A.prototype.parseFeatureList=function(){return this.parsePointer(A.recordList({tag:A.tag,feature:A.pointer({featureParams:A.offset16,lookupListIndexes:A.uShortList})}))||[]},A.prototype.parseLookupList=function(e){return this.parsePointer(A.list(A.pointer((function(){const t=this.parseUShort();h.argument(1<=t&&t<=9,"GPOS/GSUB lookup type "+t+" unknown.");const n=this.parseUShort(),o=16&n;return{lookupType:t,lookupFlag:n,subtables:this.parseList(A.pointer(e[t])),markFilteringSet:o?this.parseUShort():void 0}}))))||[]},A.prototype.parseFeatureVariationsList=function(){return this.parsePointer32((function(){const e=this.parseUShort(),t=this.parseUShort();h.argument(1===e&&t<1,"GPOS/GSUB feature variations table unknown.");return this.parseRecordList32({conditionSetOffset:A.offset32,featureTableSubstitutionOffset:A.offset32})}))||[]};var z={getByte:B,getCard8:B,getUShort:G,getCard16:G,getShort:function(e,t){return e.getInt16(t,!1)},getULong:N,getFixed:P,getTag:function(e,t){let n="";for(let o=t;o<t+4;o+=1)n+=String.fromCharCode(e.getInt8(o));return n},getOffset:function(e,t,n){let o=0;for(let s=0;s<n;s+=1)o<<=8,o+=e.getUint8(t+s);return o},getBytes:function(e,t,n){const o=[];for(let s=t;s<n;s+=1)o.push(e.getUint8(s));return o},bytesToString:function(e){let t="";for(let n=0;n<e.length;n+=1)t+=String.fromCharCode(e[n]);return t},Parser:A};function W(e,t,n){e.segments.push({end:t,start:t,delta:-(t-n),offset:0,glyphIndex:n})}var _={parse:function(e,t){const n={};n.version=z.getUShort(e,t),h.argument(0===n.version,"cmap table version should be 0."),n.numTables=z.getUShort(e,t+2);let o=-1;for(let s=n.numTables-1;s>=0;s-=1){const n=z.getUShort(e,t+4+8*s),r=z.getUShort(e,t+4+8*s+2);if(3===n&&(0===r||1===r||10===r)||0===n&&(0===r||1===r||2===r||3===r||4===r)){o=z.getULong(e,t+4+8*s+4);break}}if(-1===o)throw new Error("No valid cmap sub-tables found.");const s=new z.Parser(e,t+o);if(n.format=s.parseUShort(),12===n.format)!function(e,t){let n;t.parseUShort(),e.length=t.parseULong(),e.language=t.parseULong(),e.groupCount=n=t.parseULong(),e.glyphIndexMap={};for(let o=0;o<n;o+=1){const n=t.parseULong(),o=t.parseULong();let s=t.parseULong();for(let t=n;t<=o;t+=1)e.glyphIndexMap[t]=s,s++}}(n,s);else{if(4!==n.format)throw new Error("Only format 4 and 12 cmap tables are supported (found format "+n.format+").");!function(e,t,n,o,s){let r;e.length=t.parseUShort(),e.language=t.parseUShort(),e.segCount=r=t.parseUShort()>>1,t.skip("uShort",3),e.glyphIndexMap={};const a=new z.Parser(n,o+s+14),i=new z.Parser(n,o+s+16+2*r),l=new z.Parser(n,o+s+16+4*r),c=new z.Parser(n,o+s+16+6*r);let u=o+s+16+8*r;for(let t=0;t<r-1;t+=1){let t;const o=a.parseUShort(),s=i.parseUShort(),r=l.parseShort(),p=c.parseUShort();for(let a=s;a<=o;a+=1)0!==p?(u=c.offset+c.relativeOffset-2,u+=p,u+=2*(a-s),t=z.getUShort(n,u),0!==t&&(t=t+r&65535)):t=a+r&65535,e.glyphIndexMap[a]=t}}(n,s,e,t,o)}return n},make:function(e){let t,n=!0;for(t=e.length-1;t>0;t-=1){if(e.get(t).unicode>65535){console.log("Adding CMAP format 12 (needed!)"),n=!1;break}}let o=[{name:"version",type:"USHORT",value:0},{name:"numTables",type:"USHORT",value:n?1:2},{name:"platformID",type:"USHORT",value:3},{name:"encodingID",type:"USHORT",value:1},{name:"offset",type:"ULONG",value:n?12:20}];n||(o=o.concat([{name:"cmap12PlatformID",type:"USHORT",value:3},{name:"cmap12EncodingID",type:"USHORT",value:10},{name:"cmap12Offset",type:"ULONG",value:0}])),o=o.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}]);const s=new M.Table("cmap",o);for(s.segments=[],t=0;t<e.length;t+=1){const n=e.get(t);for(let e=0;e<n.unicodes.length;e+=1)W(s,n.unicodes[e],t);s.segments=s.segments.sort((function(e,t){return e.start-t.start}))}!function(e){e.segments.push({end:65535,start:65535,delta:1,offset:0})}(s);const r=s.segments.length;let a=0,i=[],l=[],c=[],u=[],p=[],h=[];for(t=0;t<r;t+=1){const e=s.segments[t];e.end<=65535&&e.start<=65535?(i=i.concat({name:"end_"+t,type:"USHORT",value:e.end}),l=l.concat({name:"start_"+t,type:"USHORT",value:e.start}),c=c.concat({name:"idDelta_"+t,type:"SHORT",value:e.delta}),u=u.concat({name:"idRangeOffset_"+t,type:"USHORT",value:e.offset}),void 0!==e.glyphId&&(p=p.concat({name:"glyph_"+t,type:"USHORT",value:e.glyphId}))):a+=1,n||void 0===e.glyphIndex||(h=h.concat({name:"cmap12Start_"+t,type:"ULONG",value:e.start}),h=h.concat({name:"cmap12End_"+t,type:"ULONG",value:e.end}),h=h.concat({name:"cmap12Glyph_"+t,type:"ULONG",value:e.glyphIndex}))}if(s.segCountX2=2*(r-a),s.searchRange=2*Math.pow(2,Math.floor(Math.log(r-a)/Math.log(2))),s.entrySelector=Math.log(s.searchRange/2)/Math.log(2),s.rangeShift=s.segCountX2-s.searchRange,s.fields=s.fields.concat(i),s.fields.push({name:"reservedPad",type:"USHORT",value:0}),s.fields=s.fields.concat(l),s.fields=s.fields.concat(c),s.fields=s.fields.concat(u),s.fields=s.fields.concat(p),s.cmap4Length=14+2*i.length+2+2*l.length+2*c.length+2*u.length+2*p.length,!n){const e=16+4*h.length;s.cmap12Offset=20+s.cmap4Length,s.fields=s.fields.concat([{name:"cmap12Format",type:"USHORT",value:12},{name:"cmap12Reserved",type:"USHORT",value:0},{name:"cmap12Length",type:"ULONG",value:e},{name:"cmap12Language",type:"ULONG",value:0},{name:"cmap12nGroups",type:"ULONG",value:h.length/3}]),s.fields=s.fields.concat(h)}return s}};const q=[".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"],X=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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"],V=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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"],j=[".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 Y(e){this.font=e}function Z(e){this.cmap=e}function Q(e,t){this.encoding=e,this.charset=t}function K(e){switch(e.version){case 1:this.names=j.slice();break;case 2:this.names=new Array(e.numberOfGlyphs);for(let t=0;t<e.numberOfGlyphs;t++)e.glyphNameIndex[t]<j.length?this.names[t]=j[e.glyphNameIndex[t]]:this.names[t]=e.names[e.glyphNameIndex[t]-j.length];break;case 2.5:this.names=new Array(e.numberOfGlyphs);for(let t=0;t<e.numberOfGlyphs;t++)this.names[t]=j[t+e.glyphNameIndex[t]];break;case 3:default:this.names=[]}}function J(e,t){t.lowMemory?function(e){e._IndexToUnicodeMap={};const t=e.tables.cmap.glyphIndexMap,n=Object.keys(t);for(let o=0;o<n.length;o+=1){const s=n[o];let r=t[s];void 0===e._IndexToUnicodeMap[r]?e._IndexToUnicodeMap[r]={unicodes:[parseInt(s)]}:e._IndexToUnicodeMap[r].unicodes.push(parseInt(s))}}(e):function(e){let t;const n=e.tables.cmap.glyphIndexMap,o=Object.keys(n);for(let s=0;s<o.length;s+=1){const r=o[s],a=n[r];t=e.glyphs.get(a),t.addUnicode(parseInt(r))}for(let n=0;n<e.glyphs.length;n+=1)t=e.glyphs.get(n),e.cffEncoding?e.isCIDFont?t.name="gid"+n:t.name=e.cffEncoding.charset[n]:e.glyphNames.names&&(t.name=e.glyphNames.glyphIndexToName(n))}(e)}Y.prototype.charToGlyphIndex=function(e){const t=e.codePointAt(0),n=this.font.glyphs;if(n)for(let e=0;e<n.length;e+=1){const o=n.get(e);for(let n=0;n<o.unicodes.length;n+=1)if(o.unicodes[n]===t)return e}return null},Z.prototype.charToGlyphIndex=function(e){return this.cmap.glyphIndexMap[e.codePointAt(0)]||0},Q.prototype.charToGlyphIndex=function(e){const t=e.codePointAt(0),n=this.encoding[t];return this.charset.indexOf(n)},K.prototype.nameToGlyphIndex=function(e){return this.names.indexOf(e)},K.prototype.glyphIndexToName=function(e){return this.names[e]};var $={line:function(e,t,n,o,s){e.beginPath(),e.moveTo(t,n),e.lineTo(o,s),e.stroke()}};function ee(e){this.bindConstructorValues(e)}ee.prototype.bindConstructorValues=function(e){this.index=e.index||0,this.name=e.name||null,this.unicode=e.unicode||void 0,this.unicodes=e.unicodes||void 0!==e.unicode?[e.unicode]:[],e.xMin&&(this.xMin=e.xMin),e.yMin&&(this.yMin=e.yMin),e.xMax&&(this.xMax=e.xMax),e.yMax&&(this.yMax=e.yMax),e.advanceWidth&&(this.advanceWidth=e.advanceWidth),Object.defineProperty(this,"path",function(e,t){let n=t||new c;return{configurable:!0,get:function(){return"function"==typeof n&&(n=n()),n},set:function(e){n=e}}}(0,e.path))},ee.prototype.addUnicode=function(e){0===this.unicodes.length&&(this.unicode=e),this.unicodes.push(e)},ee.prototype.getBoundingBox=function(){return this.path.getBoundingBox()},ee.prototype.getPath=function(e,t,n,o,s){let r,a;e=void 0!==e?e:0,t=void 0!==t?t:0,n=void 0!==n?n:72,o||(o={});let i=o.xScale,l=o.yScale;if(o.hinting&&s&&s.hinting&&(a=this.path&&s.hinting.exec(this,n)),a)r=s.hinting.getCommands(a),e=Math.round(e),t=Math.round(t),i=l=1;else{r=this.path.commands;const e=1/(this.path.unitsPerEm||1e3)*n;void 0===i&&(i=e),void 0===l&&(l=e)}const u=new c;for(let n=0;n<r.length;n+=1){const o=r[n];"M"===o.type?u.moveTo(e+o.x*i,t+-o.y*l):"L"===o.type?u.lineTo(e+o.x*i,t+-o.y*l):"Q"===o.type?u.quadraticCurveTo(e+o.x1*i,t+-o.y1*l,e+o.x*i,t+-o.y*l):"C"===o.type?u.curveTo(e+o.x1*i,t+-o.y1*l,e+o.x2*i,t+-o.y2*l,e+o.x*i,t+-o.y*l):"Z"===o.type&&u.closePath()}return u},ee.prototype.getContours=function(){if(void 0===this.points)return[];const e=[];let t=[];for(let n=0;n<this.points.length;n+=1){const o=this.points[n];t.push(o),o.lastPointOfContour&&(e.push(t),t=[])}return h.argument(0===t.length,"There are still points left in the current contour."),e},ee.prototype.getMetrics=function(){const e=this.path.commands,t=[],n=[];for(let o=0;o<e.length;o+=1){const s=e[o];"Z"!==s.type&&(t.push(s.x),n.push(s.y)),"Q"!==s.type&&"C"!==s.type||(t.push(s.x1),n.push(s.y1)),"C"===s.type&&(t.push(s.x2),n.push(s.y2))}const o={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(o.xMin)||(o.xMin=0),isFinite(o.xMax)||(o.xMax=this.advanceWidth),isFinite(o.yMin)||(o.yMin=0),isFinite(o.yMax)||(o.yMax=0),o.rightSideBearing=this.advanceWidth-o.leftSideBearing-(o.xMax-o.xMin),o},ee.prototype.draw=function(e,t,n,o,s){this.getPath(t,n,o,s).draw(e)},ee.prototype.drawPoints=function(e,t,n,o){function s(t,n,o,s){const r=2*Math.PI;e.beginPath();for(let a=0;a<t.length;a+=1)e.moveTo(n+t[a].x*s,o+t[a].y*s),e.arc(n+t[a].x*s,o+t[a].y*s,2,0,r,!1);e.closePath(),e.fill()}t=void 0!==t?t:0,n=void 0!==n?n:0,o=void 0!==o?o:24;const r=1/this.path.unitsPerEm*o,a=[],i=[],l=this.path;for(let e=0;e<l.commands.length;e+=1){const t=l.commands[e];void 0!==t.x&&a.push({x:t.x,y:-t.y}),void 0!==t.x1&&i.push({x:t.x1,y:-t.y1}),void 0!==t.x2&&i.push({x:t.x2,y:-t.y2})}e.fillStyle="blue",s(a,t,n,r),e.fillStyle="red",s(i,t,n,r)},ee.prototype.drawMetrics=function(e,t,n,o){let s;t=void 0!==t?t:0,n=void 0!==n?n:0,o=void 0!==o?o:24,s=1/this.path.unitsPerEm*o,e.lineWidth=1,e.strokeStyle="black",$.line(e,t,-1e4,t,1e4),$.line(e,-1e4,n,1e4,n);const r=this.xMin||0;let a=this.yMin||0;const i=this.xMax||0;let l=this.yMax||0;const c=this.advanceWidth||0;e.strokeStyle="blue",$.line(e,t+r*s,-1e4,t+r*s,1e4),$.line(e,t+i*s,-1e4,t+i*s,1e4),$.line(e,-1e4,n+-a*s,1e4,n+-a*s),$.line(e,-1e4,n+-l*s,1e4,n+-l*s),e.strokeStyle="green",$.line(e,t+c*s,-1e4,t+c*s,1e4)};var te=ee;function ne(e,t,n){Object.defineProperty(e,t,{get:function(){return e.path,e[n]},set:function(t){e[n]=t},enumerable:!0,configurable:!0})}function oe(e,t){if(this.font=e,this.glyphs={},Array.isArray(t))for(let n=0;n<t.length;n++){const o=t[n];o.path.unitsPerEm=e.unitsPerEm,this.glyphs[n]=o}this.length=t&&t.length||0}oe.prototype.get=function(e){if(void 0===this.glyphs[e]){this.font._push(e),"function"==typeof this.glyphs[e]&&(this.glyphs[e]=this.glyphs[e]());let t=this.glyphs[e],n=this.font._IndexToUnicodeMap[e];if(n)for(let e=0;e<n.unicodes.length;e++)t.addUnicode(n.unicodes[e]);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"function"==typeof this.glyphs[e]&&(this.glyphs[e]=this.glyphs[e]());return this.glyphs[e]},oe.prototype.push=function(e,t){this.glyphs[e]=t,this.length++};var se={GlyphSet:oe,glyphLoader:function(e,t){return new te({index:t,font:e})},ttfGlyphLoader:function(e,t,n,o,s,r){return function(){const a=new te({index:t,font:e});return a.path=function(){n(a,o,s);const t=r(e.glyphs,a);return t.unitsPerEm=e.unitsPerEm,t},ne(a,"xMin","_xMin"),ne(a,"xMax","_xMax"),ne(a,"yMin","_yMin"),ne(a,"yMax","_yMax"),a}},cffGlyphLoader:function(e,t,n,o){return function(){const s=new te({index:t,font:e});return s.path=function(){const t=n(e,s,o);return t.unitsPerEm=e.unitsPerEm,t},s}}};function re(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(!re(e[n],t[n]))return!1;return!0}return!1}function ae(e){let t;return t=e.length<1240?107:e.length<33900?1131:32768,t}function ie(e,t,n){const o=[],s=[],r=z.getCard16(e,t);let a,i;if(0!==r){const n=z.getByte(e,t+2);a=t+(r+1)*n+2;let s=t+3;for(let t=0;t<r+1;t+=1)o.push(z.getOffset(e,s,n)),s+=n;i=a+o[r]}else i=t+2;for(let t=0;t<o.length-1;t+=1){let r=z.getBytes(e,a+o[t],a+o[t+1]);n&&(r=n(r)),s.push(r)}return{objects:s,startOffset:t,endOffset:i}}function le(e,t){let n,o,s,r;if(28===t)return n=e.parseByte(),o=e.parseByte(),n<<8|o;if(29===t)return n=e.parseByte(),o=e.parseByte(),s=e.parseByte(),r=e.parseByte(),n<<24|o<<16|s<<8|r;if(30===t)return function(e){let t="";const n=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"];for(;;){const o=e.parseByte(),s=o>>4,r=15&o;if(15===s)break;if(t+=n[s],15===r)break;t+=n[r]}return parseFloat(t)}(e);if(t>=32&&t<=246)return t-139;if(t>=247&&t<=250)return n=e.parseByte(),256*(t-247)+n+108;if(t>=251&&t<=254)return n=e.parseByte(),256*-(t-251)-n-108;throw new Error("Invalid b0 "+t)}function ce(e,t,n){t=void 0!==t?t:0;const o=new z.Parser(e,t),s=[];let r=[];for(n=void 0!==n?n:e.length;o.relativeOffset<n;){let e=o.parseByte();e<=21?(12===e&&(e=1200+o.parseByte()),s.push([e,r]),r=[]):r.push(le(o,e))}return function(e){const t={};for(let n=0;n<e.length;n+=1){const o=e[n][0],s=e[n][1];let r;if(r=1===s.length?s[0]:s,t.hasOwnProperty(o)&&!isNaN(t[o]))throw new Error("Object "+t+" already has key "+o);t[o]=r}return t}(s)}function ue(e,t){return t=t<=390?q[t]:e[t-391]}function pe(e,t,n){const o={};let s;for(let r=0;r<t.length;r+=1){const a=t[r];if(Array.isArray(a.type)){const t=[];t.length=a.type.length;for(let o=0;o<a.type.length;o++)s=void 0!==e[a.op]?e[a.op][o]:void 0,void 0===s&&(s=void 0!==a.value&&void 0!==a.value[o]?a.value[o]:null),"SID"===a.type[o]&&(s=ue(n,s)),t[o]=s;o[a.name]=t}else s=e[a.op],void 0===s&&(s=void 0!==a.value?a.value:null),"SID"===a.type&&(s=ue(n,s)),o[a.name]=s}return o}const he=[{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,typ