"u",k=L?SK:zK;k(E,function(O,W){if(O)return z(O);var t1;try{t1=Zl(W)}catch(i1){return z(i1,null)}return z(null,t1)})}function LK(E){var z=d5("fs"),L=z.readFileSync(E);return Zl(Bv(L))}i.Font=a2,i.Glyph=y4,i.Path=N,i.BoundingBox=B,i._parse=N1,i.parse=Zl,i.load=_K,i.loadSync=LK,Object.defineProperty(i,"__esModule",{value:!0})})}),rt1=X0((e,t)=>{"use strict";t.exports=function(i){i.prototype[Symbol.iterator]=function*(){for(let a=this.head;a;a=a.next)yield a.value}}}),at1=X0((e,t)=>{"use strict";t.exports=i,i.Node=n,i.create=i;function i(r){var h=this;if(h instanceof i||(h=new i),h.tail=null,h.head=null,h.length=0,r&&typeof r.forEach=="function")r.forEach(function(g){h.push(g)});else if(arguments.length>0)for(var l=0,p=arguments.length;l1)l=h;else if(this.head)p=this.head.next,l=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var g=0;p!==null;g++)l=r(l,p.value,g),p=p.next;return l},i.prototype.reduceReverse=function(r,h){var l,p=this.tail;if(arguments.length>1)l=h;else if(this.tail)p=this.tail.prev,l=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var g=this.length-1;p!==null;g--)l=r(l,p.value,g),p=p.prev;return l},i.prototype.toArray=function(){for(var r=new Array(this.length),h=0,l=this.head;l!==null;h++)r[h]=l.value,l=l.next;return r},i.prototype.toArrayReverse=function(){for(var r=new Array(this.length),h=0,l=this.tail;l!==null;h++)r[h]=l.value,l=l.prev;return r},i.prototype.slice=function(r,h){h=h||this.length,h<0&&(h+=this.length),r=r||0,r<0&&(r+=this.length);var l=new i;if(hthis.length&&(h=this.length);for(var p=0,g=this.head;g!==null&&pthis.length&&(h=this.length);for(var p=this.length,g=this.tail;g!==null&&p>h;p--)g=g.prev;for(;g!==null&&p>r;p--,g=g.prev)l.push(g.value);return l},i.prototype.splice=function(r,h,...l){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var p=0,g=this.head;g!==null&&p{"use strict";var i=at1(),a=Symbol("max"),c=Symbol("length"),s=Symbol("lengthCalculator"),n=Symbol("allowStale"),r=Symbol("maxAge"),h=Symbol("dispose"),l=Symbol("noDisposeOnSet"),p=Symbol("lruList"),g=Symbol("cache"),v=Symbol("updateAgeOnGet"),d=()=>1,u=class{constructor(f){if(typeof f=="number"&&(f={max:f}),f||(f={}),f.max&&(typeof f.max!="number"||f.max<0))throw new TypeError("max must be a non-negative number");let b=this[a]=f.max||1/0,y=f.length||d;if(this[s]=typeof y!="function"?d:y,this[n]=f.stale||!1,f.maxAge&&typeof f.maxAge!="number")throw new TypeError("maxAge must be a number");this[r]=f.maxAge||0,this[h]=f.dispose,this[l]=f.noDisposeOnSet||!1,this[v]=f.updateAgeOnGet||!1,this.reset()}set max(f){if(typeof f!="number"||f<0)throw new TypeError("max must be a non-negative number");this[a]=f||1/0,o(this)}get max(){return this[a]}set allowStale(f){this[n]=!!f}get allowStale(){return this[n]}set maxAge(f){if(typeof f!="number")throw new TypeError("maxAge must be a non-negative number");this[r]=f,o(this)}get maxAge(){return this[r]}set lengthCalculator(f){typeof f!="function"&&(f=d),f!==this[s]&&(this[s]=f,this[c]=0,this[p].forEach(b=>{b.length=this[s](b.value,b.key),this[c]+=b.length})),o(this)}get lengthCalculator(){return this[s]}get length(){return this[c]}get itemCount(){return this[p].length}rforEach(f,b){b=b||this;for(let y=this[p].tail;y!==null;){let S=y.prev;A(this,f,y,b),y=S}}forEach(f,b){b=b||this;for(let y=this[p].head;y!==null;){let S=y.next;A(this,f,y,b),y=S}}keys(){return this[p].toArray().map(f=>f.key)}values(){return this[p].toArray().map(f=>f.value)}reset(){this[h]&&this[p]&&this[p].length&&this[p].forEach(f=>this[h](f.key,f.value)),this[g]=new Map,this[p]=new i,this[c]=0}dump(){return this[p].map(f=>m(this,f)?!1:{k:f.key,v:f.value,e:f.now+(f.maxAge||0)}).toArray().filter(f=>f)}dumpLru(){return this[p]}set(f,b,y){if(y=y||this[r],y&&typeof y!="number")throw new TypeError("maxAge must be a number");let S=y?Date.now():0,P=this[s](b,f);if(this[g].has(f)){if(P>this[a])return M(this,this[g].get(f)),!1;let D=this[g].get(f).value;return this[h]&&(this[l]||this[h](f,D.value)),D.now=S,D.maxAge=y,D.value=b,this[c]+=P-D.length,D.length=P,this.get(f),o(this),!0}let H=new C(f,b,P,S,y);return H.length>this[a]?(this[h]&&this[h](f,b),!1):(this[c]+=H.length,this[p].unshift(H),this[g].set(f,this[p].head),o(this),!0)}has(f){if(!this[g].has(f))return!1;let b=this[g].get(f).value;return!m(this,b)}get(f){return w(this,f,!0)}peek(f){return w(this,f,!1)}pop(){let f=this[p].tail;return f?(M(this,f),f.value):null}del(f){M(this,this[g].get(f))}load(f){this.reset();let b=Date.now();for(let y=f.length-1;y>=0;y--){let S=f[y],P=S.e||0;if(P===0)this.set(S.k,S.v);else{let H=P-b;H>0&&this.set(S.k,S.v,H)}}}prune(){this[g].forEach((f,b)=>w(this,b,!1))}},w=(f,b,y)=>{let S=f[g].get(b);if(S){let P=S.value;if(m(f,P)){if(M(f,S),!f[n])return}else y&&(f[v]&&(S.value.now=Date.now()),f[p].unshiftNode(S));return P.value}},m=(f,b)=>{if(!b||!b.maxAge&&!f[r])return!1;let y=Date.now()-b.now;return b.maxAge?y>b.maxAge:f[r]&&y>f[r]},o=f=>{if(f[c]>f[a])for(let b=f[p].tail;f[c]>f[a]&&b!==null;){let y=b.prev;M(f,b),b=y}},M=(f,b)=>{if(b){let y=b.value;f[h]&&f[h](y.key,y.value),f[c]-=y.length,f[g].delete(y.key),f[p].removeNode(b)}},C=class{constructor(f,b,y,S,P){this.key=f,this.value=b,this.length=y,this.now=S,this.maxAge=P||0}},A=(f,b,y,S)=>{let P=y.value;m(f,P)&&(M(f,y),f[n]||(P=void 0)),P&&b.call(S,P.value,P.key,f)};t.exports=u}),vH=X0(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});function t(l){let p={individual:{},range:[]};for(let g of l)i(p,g);return p}e.default=t;function i(l,p){for(let[g,v]of Object.entries(p.individual))if(l.individual[g])a(l.individual[g],v);else{let d=!1;for(let[u,{range:w,entry:m}]of l.range.entries()){let o=s(Number(g),w);if(o.both!==null){d=!0,l.individual[g]=v,a(l.individual[g],r(m)),l.range.splice(u,1);for(let M of o.second)Array.isArray(M)?l.range.push({range:M,entry:r(m)}):l.individual[M]=r(m)}}d||(l.individual[g]=v)}for(let{range:g,entry:v}of p.range){let d=[g];for(let u=0;up.lookup.index||l.lookup.index===p.lookup.index&&l.lookup.subIndex>p.lookup.subIndex)&&(l.lookup=p.lookup),p.forward&&(l.forward?i(l.forward,p.forward):l.forward=p.forward),p.reverse&&(l.reverse?i(l.reverse,p.reverse):l.reverse=p.reverse)}function c(l,p){let g={first:[],second:[],both:null};if(l[0]p[1]){let v=Math.max(l[0],p[1]),d=l[1];g.first.push(n(v,d))}else if(p[1]>l[1]){let v=Math.max(l[1],p[0]),d=p[1];g.second.push(n(v,d))}return g}function s(l,p){if(l
p[1])return{first:[l],second:[p],both:null};let g={first:[],second:[],both:l};return p[0]l&&g.second.push(n(l+1,p[1])),g}function n(l,p){return p-l===1?l:[l,p]}function r(l){let p={};return l.forward&&(p.forward=h(l.forward)),l.reverse&&(p.reverse=h(l.reverse)),l.lookup&&(p.lookup={contextRange:l.lookup.contextRange.slice(),index:l.lookup.index,length:l.lookup.length,subIndex:l.lookup.subIndex,substitutions:l.lookup.substitutions.slice()}),p}function h(l){let p={};for(let[g,v]of Object.entries(l.individual))p[g]=r(v);return{individual:p,range:l.range.map(({range:g,entry:v})=>({range:g.slice(),entry:r(v)}))}}}),nt1=X0(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});function t(a,c,s,n){let r=c[n],h=a[r];if(!h)return;let l=h.lookup;if(h.reverse){let g=i(h.reverse,c,s);(!l&&g||g&&l&&(l.index>g.index||l.index===g.index&&l.subIndex>g.subIndex))&&(l=g)}if(++n>=c.length||!h.forward)return l;let p=t(h.forward,c,s,n);return(!l&&p||p&&l&&(l.index>p.index||l.index===p.index&&l.subIndex>p.subIndex))&&(l=p),l}e.default=t;function i(a,c,s){let n=a[c[--s]],r=n&&n.lookup;for(;n&&((!r&&n.lookup||n.lookup&&r&&r.index>n.lookup.index)&&(r=n.lookup),!(--s<0||!n.reverse));)n=n.reverse[c[s]];return r}}),ct1=X0(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});function t(i,a,c){let s=!1;for(let n=0;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0});function t(a,c){switch(a.format){case 1:let s=a.glyphs.indexOf(c);return s!==-1?s:null;case 2:let n=a.ranges.find(r=>r.start<=c&&r.end>=c);return n?n.index:null}}e.default=t;function i(a){switch(a.format){case 1:return a.glyphs.map((s,n)=>({glyphId:s,index:n}));case 2:let c=[];for(let[s,n]of a.ranges.entries())n.end===n.start?c.push({glyphId:n.start,index:s}):c.push({glyphId:[n.start,n.end+1],index:s});return c}}e.listGlyphsByIndex=i}),lt1=X0(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Zi();function i(c,s){let n=s[0],r=a(c,n),h=s[0]+1,l=new Map;for(;h{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=lt1();function i(h,l,p,g,v){let d=[];for(let u of p){u.entry.forward={individual:{},range:[]};for(let w of h)d.push(...s(u.entry.forward,g,v,l,w).map(({entry:m,substitution:o})=>({entry:m,substitutions:[...u.substitutions,o]})))}return d}e.processInputPosition=i;function a(h,l){let p=[];for(let g of l)for(let v of h){let d={};g.entry.forward||(g.entry.forward={individual:{},range:[]}),p.push({entry:d,substitutions:g.substitutions}),Array.isArray(v)?g.entry.forward.range.push({entry:d,range:v}):g.entry.forward.individual[v]=d}return p}e.processLookaheadPosition=a;function c(h,l){let p=[];for(let g of l)for(let v of h){let d={};g.entry.reverse||(g.entry.reverse={individual:{},range:[]}),p.push({entry:d,substitutions:g.substitutions}),Array.isArray(v)?g.entry.reverse.range.push({entry:d,range:v}):g.entry.reverse.individual[v]=d}return p}e.processBacktrackPosition=c;function s(h,l,p,g,v){let d=[];if(!Array.isArray(v))h.individual[v]={},d.push({entry:h.individual[v],substitution:r(l,p,g,v)});else{let u=n(l,p,g,v);for(let[w,m]of u){let o={};Array.isArray(w)?h.range.push({range:w,entry:o}):h.individual[w]={},d.push({entry:o,substitution:m})}}return d}e.getInputTree=s;function n(h,l,p,g){for(let v of h.filter(d=>d.sequenceIndex===p))for(let d of l[v.lookupListIndex].subtables){let u=t.getRangeSubstitutionGlyphs(d,g);if(!Array.from(u.values()).every(w=>w!==null))return u}return new Map([[g,null]])}function r(h,l,p,g){for(let v of h.filter(d=>d.sequenceIndex===p))for(let d of l[v.lookupListIndex].subtables){let u=t.getIndividualSubstitutionGlyph(d,g);if(u!==null)return u}return null}}),ht1=X0(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Zi(),i=pc();function a(c,s,n){let r={individual:{},range:[]},h=t.listGlyphsByIndex(c.coverage);for(let{glyphId:l,index:p}of h){let g=c.chainRuleSets[p];if(g)for(let[v,d]of g.entries()){let u=i.getInputTree(r,d.lookupRecords,s,0,l).map(({entry:w,substitution:m})=>({entry:w,substitutions:[m]}));for(let[w,m]of d.input.entries())u=i.processInputPosition([m],w+1,u,d.lookupRecords,s);for(let w of d.lookahead)u=i.processLookaheadPosition([w],u);for(let w of d.backtrack)u=i.processBacktrackPosition([w],u);for(let{entry:w,substitutions:m}of u)w.lookup={substitutions:m,length:d.input.length+1,index:n,subIndex:v,contextRange:[-1*d.backtrack.length,1+d.input.length+d.lookahead.length]}}}return r}e.default=a}),ut1=X0(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});function t(s,n){return s.format===2?Array.isArray(n)?i(s,n):new Map([[n,a(s,n)]]):new Map([[n,null]])}e.default=t;function i(s,n){let r=n[0],h=a(s,r),l=n[0]+1,p=new Map;for(;l=n)return r.classId;return null}function c(s,n){switch(s.format){case 2:let r=[];for(let h of s.ranges)h.classId===n&&(h.end===h.start?r.push(h.start):r.push([h.start,h.end+1]));return r;default:return[]}}e.listClassGlyphs=c}),pt1=X0(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=vH(),i=Zi(),a=ut1(),c=pc();function s(n,r,h){let l=[],p=i.listGlyphsByIndex(n.coverage);for(let{glyphId:g}of p){let v=a.default(n.inputClassDef,g);for(let[d,u]of v.entries()){if(u===null)continue;let w=n.chainClassSet[u];if(w)for(let[m,o]of w.entries()){let M={individual:{},range:[]},C=c.getInputTree(M,o.lookupRecords,r,0,d).map(({entry:A,substitution:f})=>({entry:A,substitutions:[f]}));for(let[A,f]of o.input.entries())C=c.processInputPosition(a.listClassGlyphs(n.inputClassDef,f),A+1,C,o.lookupRecords,r);for(let A of o.lookahead)C=c.processLookaheadPosition(a.listClassGlyphs(n.lookaheadClassDef,A),C);for(let A of o.backtrack)C=c.processBacktrackPosition(a.listClassGlyphs(n.backtrackClassDef,A),C);for(let{entry:A,substitutions:f}of C)A.lookup={substitutions:f,index:h,subIndex:m,length:o.input.length+1,contextRange:[-1*o.backtrack.length,1+o.input.length+o.lookahead.length]};l.push(M)}}}return t.default(l)}e.default=s}),gt1=X0(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Zi(),i=pc();function a(c,s,n){let r={individual:{},range:[]},h=t.listGlyphsByIndex(c.inputCoverage[0]);for(let{glyphId:l}of h){let p=i.getInputTree(r,c.lookupRecords,s,0,l).map(({entry:g,substitution:v})=>({entry:g,substitutions:[v]}));for(let[g,v]of c.inputCoverage.slice(1).entries())p=i.processInputPosition(t.listGlyphsByIndex(v).map(d=>d.glyphId),g+1,p,c.lookupRecords,s);for(let g of c.lookaheadCoverage)p=i.processLookaheadPosition(t.listGlyphsByIndex(g).map(v=>v.glyphId),p);for(let g of c.backtrackCoverage)p=i.processBacktrackPosition(t.listGlyphsByIndex(g).map(v=>v.glyphId),p);for(let{entry:g,substitutions:v}of p)g.lookup={substitutions:v,index:n,subIndex:0,length:c.inputCoverage.length,contextRange:[-1*c.backtrackCoverage.length,c.inputCoverage.length+c.lookaheadCoverage.length]}}return r}e.default=a}),dt1=X0(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Zi(),i=pc();function a(c,s){let n={individual:{},range:[]},r=t.listGlyphsByIndex(c.coverage);for(let{glyphId:h,index:l}of r){let p={};Array.isArray(h)?n.range.push({entry:p,range:h}):n.individual[h]=p;let g=[{entry:p,substitutions:[c.substitutes[l]]}];for(let v of c.lookaheadCoverage)g=i.processLookaheadPosition(t.listGlyphsByIndex(v).map(d=>d.glyphId),g);for(let v of c.backtrackCoverage)g=i.processBacktrackPosition(t.listGlyphsByIndex(v).map(d=>d.glyphId),g);for(let{entry:v,substitutions:d}of g)v.lookup={substitutions:d,index:s,subIndex:0,length:1,contextRange:[-1*c.backtrackCoverage.length,1+c.lookaheadCoverage.length]}}return n}e.default=a}),mt1=X0(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});function t(a){let c={};for(let[s,n]of Object.entries(a.individual))c[s]=i(n);for(let{range:s,entry:n}of a.range){let r=i(n);for(let h=s[0];h{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=d5("fs"),i=d5("util"),a=d5("path"),c=i.promisify(t.readdir),s=i.promisify(t.stat);async function n(h,l){let p=new Set;return await Promise.all(h.map(async g=>{let v=await r(a.resolve(g),new RegExp(`\\.${l.map(d=>`(?:${d})`).join("|")}$`,"i"));for(let d of v)p.add(d)})),[...p]}e.default=n;async function r(h,l,p=10){if(p<=0)return[];let g;try{g=await c(h)}catch(d){return[]}let v=[];return await Promise.all(g.map(async d=>{let u=a.join(h,d),w;try{w=await s(u)}catch(m){return}w.isFile()&&l.test(u)?v.push(u):w.isDirectory()&&v.push(...await r(u,l,p-1))})),v}}),ft1=X0((e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=d5("path"),a=d5("os"),c=vt1(),s={win32:()=>{let r=i.join(process.env.WINDIR||"C:\\Windows","Fonts"),h="Microsoft\\Windows\\Fonts",l;return process.env.LOCALAPPDATA?l=i.join(process.env.LOCALAPPDATA,h):process.env.APPDATA?l=i.join(process.env.APPDATA,"Local",h):process.env.USERPROFILE&&(l=i.join(process.env.USERPROFILE,"AppData","Local",h)),l?[r,l]:[r]},darwin:()=>{let r=a.homedir();return[...r?[i.join(r,"/Library/Fonts")]:[],"/Library/Fonts","/Network/Library/Fonts","/System/Library/Fonts","/System Folder/Fonts"]},linux:()=>{let r=a.homedir();return["/usr/share/fonts","/usr/local/share/fonts",...r?[i.join(r,".fonts"),i.join(r,".local/share/fonts")]:[]]}};function n(r){let h=Object.assign({extensions:["ttf","otf","ttc","woff","woff2"],additionalFolders:[]},r),l=a.platform(),p=s[l];if(!p)throw new Error(`Unsupported platform: ${l}`);let g=p();return c.default([...g,...h.additionalFolders],h.extensions)}t.exports=Object.assign(n,{default:n}),e.default=n}),At1=X0((e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=d5("stream"),a=class extends i.Writable{constructor(){super(...arguments),this.offset=0,this._waiters=[],this._closed=!1}_write(s,n,r){let h=0,l=()=>{for(;this._waiters.length>0;){let p=this._waiters[0];if(this._buffer){let g=this._buffer.size-this._buffer.offset;if(g+s.length>=p.size){if(p.skip)this._buffer=void 0,p.resolve();else{let v=Math.min(g,p.size),d=Buffer.alloc(p.size);this._buffer.buf.copy(d,0,this._buffer.offset,this._buffer.offset+v),s.copy(d,v,0,p.size-v),p.resolve(d)}if(this.offset+=p.size,this._waiters.shift(),this._buffer=void 0,g+s.length===p.size){r();break}else h+=p.size-g}else{if(!p.skip){let v=Buffer.alloc(g+s.length);this._buffer.buf.copy(v,0,this._buffer.offset,this._buffer.size),s.copy(v,g,0,s.length),this._buffer.buf=v}this._buffer.offset=0,this._buffer.size=g+s.length,r();break}}else if(s.length-h>=p.size){if(p.skip?p.resolve():p.resolve(s.slice(h,h+p.size)),this.offset+=p.size,this._waiters.shift(),h+=p.size,s.length===h){r();break}}else{this._buffer={buf:p.skip?void 0:s.slice(h),offset:0,size:s.length-h},h=s.length,r();break}}this._processTrigger=s.length-h>0?l:void 0};l()}_destroy(s,n){this._processTrigger=void 0;for(let r of this._waiters)r.reject(s||new Error("stream destroyed"));this._waiters=[],this._closed=!0}_final(s){this._processTrigger=void 0;for(let n of this._waiters)n.reject(new Error("not enough data in stream"));this._waiters=[],this._closed=!0}read(s){return new Promise((n,r)=>{this._closed&&r(new Error("stream is closed")),this._waiters.push({resolve:n,reject:r,size:s,skip:!1}),this._processTrigger&&this._processTrigger()})}skip(s){return new Promise((n,r)=>{this._closed&&r(new Error("stream is closed")),this._waiters.push({resolve:n,reject:r,size:s,skip:!0}),this._processTrigger&&this._processTrigger()})}};function c(){return new a}t.exports=Object.assign(c,{default:c}),e.default=c}),Ct1=X0(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=["copyright","fontFamily","fontSubfamily","uniqueID","fullName","version","postScriptName","trademark","manufacturer","designer","description","manufacturerURL","designerURL","license","licenseURL","reserved","preferredFamily","preferredSubfamily","compatibleFullName","sampleText","postScriptFindFontName","wwsFamily","wwsSubfamily"],i={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"},a={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 c(v,d,u){switch(v){case 0:if(d===65535)return"und";if(u)return u[d];break;case 1:return i[d];case 3:return a[d]}}var s="utf-16",n={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"},r={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 h(v,d,u){switch(v){case 0:return s;case 1:return r[u]||n[d];case 3:if(d===1||d===10)return s;break}}function l(v,d){let u={},w=v.readUInt16BE(2),m=v.readUInt16BE(4),o=6;for(let M=0;M{"use strict";Object.defineProperty(e,"__esModule",{value:!0});function t(i){if(i.readUInt32BE(0)!==1)throw new Error("Unsupported ltag table version.");let a=i.readUInt32BE(8),c=[];for(let s=0;s{"use strict";Object.defineProperty(e,"__esModule",{value:!0});function t(i){if(i.length<78)return;let a={version:i.readUInt16BE(0),xAvgCharWidth:i.readUInt16BE(2),usWeightClass:i.readUInt16BE(4),usWidthClass:i.readUInt16BE(6),fsType:i.readUInt16BE(8),ySubscriptXSize:i.readInt16BE(10),ySubscriptYSize:i.readInt16BE(12),ySubscriptXOffset:i.readInt16BE(14),ySubscriptYOffset:i.readInt16BE(16),ySuperscriptXSize:i.readInt16BE(18),ySuperscriptYSize:i.readInt16BE(20),ySuperscriptXOffset:i.readInt16BE(22),ySuperscriptYOffset:i.readInt16BE(24),yStrikeoutSize:i.readInt16BE(26),yStrikeoutPosition:i.readInt16BE(28),sFamilyClass:i.readInt16BE(30),panose:[i.readUInt8(32),i.readUInt8(33),i.readUInt8(34),i.readUInt8(35),i.readUInt8(36),i.readUInt8(37),i.readUInt8(38),i.readUInt8(39),i.readUInt8(40),i.readUInt8(41)],ulUnicodeRange1:i.readUInt32BE(42),ulUnicodeRange2:i.readUInt32BE(46),ulUnicodeRange3:i.readUInt32BE(50),ulUnicodeRange4:i.readUInt32BE(54),achVendID:String.fromCharCode(i.readUInt8(58),i.readUInt8(59),i.readUInt8(60),i.readUInt8(61)),fsSelection:i.readUInt16BE(62),usFirstCharIndex:i.readUInt16BE(64),usLastCharIndex:i.readUInt16BE(66),sTypoAscender:i.readInt16BE(68),sTypoDescender:i.readInt16BE(70),sTypoLineGap:i.readInt16BE(72),usWinAscent:i.readUInt16BE(74),usWinDescent:i.readUInt16BE(76)};return a.version>=1&&i.length>=86&&(a.ulCodePageRange1=i.readUInt32BE(78),a.ulCodePageRange2=i.readUInt32BE(82)),a.version>=2&&i.length>=96&&(a.sxHeight=i.readInt16BE(86),a.sCapHeight=i.readInt16BE(88),a.usDefaultChar=i.readUInt16BE(90),a.usBreakChar=i.readUInt16BE(92),a.usMaxContent=i.readUInt16BE(94)),a}e.default=t}),fH=X0(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});function t(a,c){return a+c/2**16}e.formatFixed=t;function i(a,c){return(a*2**32+c-2082844800)*1e3}e.formatLongDateTime=i}),Et1=X0(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=fH();function i(a){return{version:t.formatFixed(a.readUInt16BE(0),a.readUInt16BE(2)),fontRevision:t.formatFixed(a.readUInt16BE(4),a.readUInt16BE(6)),checkSumAdjustment:a.readUInt32BE(8),magicNumber:a.readUInt32BE(12),flags:a.readUInt16BE(16),unitsPerEm:a.readUInt16BE(18),created:t.formatLongDateTime(a.readUInt32BE(20),a.readUInt32BE(24)),modified:t.formatLongDateTime(a.readUInt32BE(28),a.readUInt32BE(32)),xMin:a.readInt16BE(36),yMin:a.readInt16BE(38),xMax:a.readInt16BE(40),yMax:a.readInt16BE(42),macStyle:a.readUInt16BE(44),lowestRecPPEM:a.readUInt16BE(46),fontDirectionHint:a.readInt16BE(48),indexToLocFormat:a.readInt16BE(50),glyphDataFormat:a.readInt16BE(52)}}e.default=i}),Mt1=X0(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=fH();function i(a){return{version:t.formatFixed(a.readUInt16BE(0),a.readUInt16BE(2)),italicAngle:t.formatFixed(a.readUInt16BE(4),a.readUInt16BE(6)),underlinePosition:a.readInt16BE(8),underlineThickness:a.readInt16BE(10),isFixedPitch:a.readUInt32BE(12),minMemType42:a.readUInt32BE(16),maxMemType42:a.readUInt32BE(20),minMemType1:a.readUInt32BE(24),maxMemType1:a.readUInt32BE(28)}}e.default=i}),yt1=X0(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=d5("fs"),i=At1(),a=Ct1(),c=wt1(),s=bt1(),n=Et1(),r=Mt1(),h;(function(u){u[u.TrueType=0]="TrueType",u[u.CFF=1]="CFF",u[u.Woff=2]="Woff"})(h||(h={}));var l={name:{tag:Buffer.from("name"),parse:a.default},ltag:{tag:Buffer.from("ltag"),parse:c.default},os2:{tag:Buffer.from("OS/2"),parse:s.default},head:{tag:Buffer.from("head"),parse:n.default},post:{tag:Buffer.from("post"),parse:r.default}};async function p(u){return new Promise((w,m)=>{(async()=>{let o=i.default(),M=t.createReadStream(u),C=!1,A=()=>{C=!0};M.once("close",A),M.once("end",A),M.once("error",f=>{C=!0,m(f)}),M.pipe(o);try{switch(v(await o.read(4))){case h.TrueType:case h.CFF:let f=(await o.read(2)).readUInt16BE(0);await o.skip(6);let b=await d(o,f),y=Object.entries(b).sort((H,D)=>H[1].offset-D[1].offset),S={};for(let[H,D]of y)await o.skip(D.offset-o.offset),S[H]=await o.read(D.length);let P=[];if(S.ltag&&(P=l.ltag.parse(S.ltag)),!S.name)throw new Error(`missing required OpenType table 'name' in font file: ${u}`);return{names:l.name.parse(S.name,P),os2:S.os2&&l.os2.parse(S.os2),head:S.head&&l.head.parse(S.head),post:S.post&&l.post.parse(S.post)};case h.Woff:default:throw new Error("provided font type is not supported yet")}}finally{M.unpipe(o),C||(M.destroy(),o.destroy())}})().then(w,m)})}e.default=p;var g={one:Buffer.from([0,1,0,0]),otto:Buffer.from("OTTO"),true:Buffer.from("true"),typ1:Buffer.from("typ1"),woff:Buffer.from("wOFF")};function v(u){if(u.equals(g.one)||u.equals(g.true)||u.equals(g.typ1))return h.TrueType;if(u.equals(g.otto))return h.CFF;if(u.equals(g.woff))return h.Woff;throw new Error(`Unsupported signature type: ${u}`)}async function d(u,w){let m={};for(let o=0;o{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=d5("os"),i;(function(p){p.Serif="serif",p.SansSerif="sansSerif",p.Monospace="monospace",p.Cursive="cursive",p.Unknown="unknown"})(i=e.Type||(e.Type={}));var a;(function(p){p.Regular="regular",p.Italic="italic",p.Oblique="oblique",p.Bold="bold",p.BoldItalic="boldItalic",p.BoldOblique="boldOblique",p.Other="other"})(a=e.Style||(e.Style={}));var c=[" Regular"," Bold"," Bold Italic"," Bold Oblique"," Italic"," Oblique"];function s(p,g){let v=p.names.preferredFamily&&p.names.preferredFamily[g]?p.names.preferredFamily[g]:p.names.fontFamily[g];if(t.platform()==="win32"){let d=p.names.preferredSubfamily&&p.names.preferredSubfamily[g]?p.names.preferredSubfamily[g]:p.names.fontSubfamily[g],u=`${v} ${d}`,w=-1;for(let m of c){let o=u.lastIndexOf(m);if(o!==-1){w=o;break}}return w!==-1?u.substring(0,w):u}return v}e.name=s;function n(p){if(p.os2)switch(p.os2.panose[0]){case 2:return p.os2.panose[3]===9?i.Monospace:p.os2.panose[1]>=11&&p.os2.panose[1]<=15||p.os2.panose[1]===0?i.SansSerif:i.Serif;case 3:return i.Cursive}else if(p.post&&p.post.isFixedPitch)return i.Monospace;return i.Unknown}e.type=n;function r(p){if(!p.os2&&!p.head)return a.Other;let g=p.os2?p.os2.fsSelection&32:p.head.macStyle&1,v=p.os2?p.os2.fsSelection&1:p.post?p.post.italicAngle<0:p.head.macStyle&2,d=p.os2?p.os2.fsSelection&512:p.post?p.post.italicAngle>0:0,u=p.os2?p.os2.fsSelection&320:1;return g?d?a.BoldOblique:v?a.BoldItalic:a.Bold:d?a.Oblique:v?a.Italic:u?a.Regular:a.Other}e.style=r;var h=[a.Bold,a.BoldItalic,a.BoldOblique];function l(p){return p.os2?p.os2.usWeightClass:h.includes(r(p))?700:400}e.weight=l}),St1=X0(e=>{"use strict";var t=e&&e.__rest||function(g,v){var d={};for(var u in g)Object.prototype.hasOwnProperty.call(g,u)&&v.indexOf(u)<0&&(d[u]=g[u]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,u=Object.getOwnPropertySymbols(g);w{try{let o=await a.default(m);return l(m,o,v.language)}catch(o){v.onFontError&&v.onFontError(m,o)}},d,v.concurrency),w={};for(let m of u.filter(o=>o)){let{name:o}=m,M=t(m,["name"]);w[o]||(w[o]=[]),w[o].push(M)}return w}e.list=n;async function r(g,v){return(await n(v))[g]||[]}e.listVariants=r;async function h(g,v){let d=Object.assign({language:"en"},v),u=await a.default(g);return l(g,u,d.language)}e.get=h;function l(g,v,d){return{name:c.name(v,d),path:g,type:c.type(v),weight:c.weight(v),style:c.style(v)}}async function p(g,v,d){let u=[],w=0,m=async M=>{u.push(await g(v[M])),w{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=it1(),i=ot1(),a=vH(),c=nt1(),s=ct1(),n=ht1(),r=pt1(),h=gt1(),l=dt1(),p=mt1(),g=class{constructor(w,m){this._lookupTrees=[],this._glyphLookups={},this._font=w,m.cacheSize>0&&(this._cache=new i({max:m.cacheSize,length:(A,f)=>f.length}));let o=(this._font.tables.gsub&&this._font.tables.gsub.features.filter(A=>A.tag==="calt")||[]).reduce((A,f)=>[...A,...f.feature.lookupListIndexes],[]),M=this._font.tables.gsub&&this._font.tables.gsub.lookups||[],C=M.filter((A,f)=>o.some(b=>b===f));for(let[A,f]of C.entries()){let b=[];switch(f.lookupType){case 6:for(let[S,P]of f.subtables.entries())switch(P.substFormat){case 1:b.push(n.default(P,M,S));break;case 2:b.push(r.default(P,M,S));break;case 3:b.push(h.default(P,M,S));break}break;case 8:for(let[S,P]of f.subtables.entries())b.push(l.default(P,S));break}let y=p.default(a.default(b));this._lookupTrees.push({tree:y,processForward:f.lookupType!==8});for(let S of Object.keys(y))this._glyphLookups[S]||(this._glyphLookups[S]=[]),this._glyphLookups[S].push(A)}}findLigatures(w){let m=this._cache&&this._cache.get(w);if(m&&!Array.isArray(m))return m;let o=[];for(let A of w)o.push(this._font.charToGlyphIndex(A));if(this._lookupTrees.length===0)return{inputGlyphs:o,outputGlyphs:o,contextRanges:[]};let M=this._findInternal(o.slice()),C={inputGlyphs:o,outputGlyphs:M.sequence,contextRanges:M.ranges};return this._cache&&this._cache.set(w,C),C}findLigatureRanges(w){if(this._lookupTrees.length===0)return[];let m=this._cache&&this._cache.get(w);if(m)return Array.isArray(m)?m:m.contextRanges;let o=[];for(let C of w)o.push(this._font.charToGlyphIndex(C));let M=this._findInternal(o);return this._cache&&this._cache.set(w,M.ranges),M.ranges}_findInternal(w){let m=[],o=this._getNextLookup(w,0);for(;o.index!==null;){let M=this._lookupTrees[o.index];if(M.processForward){let C=o.last;for(let A=o.first;A=C&&(C=A+f.length+1),A+=f.length-1}}}else for(let C=o.last-1;C>=o.first;C--){let A=c.default(M.tree,w,C,C);if(A){for(let f=0;f=m){(o.index===null||f<=o.index)&&(o.index=f,o.first>M&&(o.first=M),o.last=M+1);break}}}return o}};async function v(w,m){let[o]=await Promise.resolve().then(()=>St1()).then(M=>M.listVariants(w));if(!o)throw new Error(`Font ${w} not found`);return d(o.path,m)}e.load=v;async function d(w,m){let o=await Promise.resolve().then(()=>d5("util")).then(M=>M.promisify(t.load)(w));return new g(o,Object.assign({cacheSize:0},m))}e.loadFile=d;function u(w,m){let o=t.parse(w);return new g(o,Object.assign({cacheSize:0},m))}e.loadBuffer=u}),xt1=st1(zt1());kt1=["serif","sans-serif","cursive","fantasy","monospace","system-ui","emoji","math","fangsong"],Dt1=1e5;Ht1=class{constructor(e){this._fallbackLigatures=((e==null?void 0:e.fallbackLigatures)||["<--","<---","<<-","<-","->","->>","-->","--->","<==","<===","<<=","<=","=>","=>>","==>","===>",">=",">>=","<->","<-->","<--->","<---->","<=>","<==>","<===>","<====>","::",":::","<~~","",">","/>","~~>","==","!=","/=","~=","<>","===","!==","!===","<:",":=","*=","*+","<*","<*>","*>","<|","<|>","|>","+*","=*","=:",":>","/*","*/","+++","";let o="#000000",M="#ffffff";this._options.includeGlobalBackground&&(o=(f=(A=this._terminal.options.theme)==null?void 0:A.foreground)!=null?f:"#ffffff",M=(y=(b=this._terminal.options.theme)==null?void 0:b.background)!=null?y:"#000000");let C=[];C.push("color: "+o+";"),C.push("background-color: "+M+";"),C.push("font-family: "+this._terminal.options.fontFamily+";"),C.push("font-size: "+this._terminal.options.fontSize+"px;"),this._htmlContent+=""}_afterSerialize(){this._htmlContent+="
",this._htmlContent+="