UNPKG

x_ite

Version:

X_ITE X3D Browser — View and Manipulate X3D, VRML, glTF and Other 3D Sources in HTML

2 lines 263 kB
/* X_ITE v15.0.3 */ const e=window[Symbol.for("X_ITE.X3D")];(()=>{var t={254(t){t.exports=e.jquery}},n={};function s(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,s),o.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const r=e.Components;var o=s.n(r);const a=e.Fields;var i=s.n(a);const l=e.X3DFieldDefinition;var u=s.n(l);const c=e.FieldDefinitionArray;var p=s.n(c);const h=e.X3DNode;var f=s.n(h);const d=e.X3DUrlObject;var g=s.n(d);const m=e.Namespace;var y=s.n(m);let v=0;const b={BEGIN:++v,FIRST:++v,MIDDLE:++v,END:++v},S=y().add("TextAlignment",b),x=e.X3DConstants;var T=s.n(x);const O=e.URLs;var w=s.n(O),k=s(254);const I=new Map([["SERIF",new Map([["PLAIN",w().getFontsURL("Droid/DroidSerif-Regular.woff2")],["ITALIC",w().getFontsURL("Droid/DroidSerif-Italic.woff2")],["BOLD",w().getFontsURL("Droid/DroidSerif-Bold.woff2")],["BOLDITALIC",w().getFontsURL("Droid/DroidSerif-BoldItalic.woff2")]])],["SANS",new Map([["PLAIN",w().getFontsURL("Ubuntu/Ubuntu-R.woff2")],["ITALIC",w().getFontsURL("Ubuntu/Ubuntu-RI.woff2")],["BOLD",w().getFontsURL("Ubuntu/Ubuntu-B.woff2")],["BOLDITALIC",w().getFontsURL("Ubuntu/Ubuntu-BI.woff2")]])],["TYPEWRITER",new Map([["PLAIN",w().getFontsURL("Ubuntu/UbuntuMono-R.woff2")],["ITALIC",w().getFontsURL("Ubuntu/UbuntuMono-RI.woff2")],["BOLD",w().getFontsURL("Ubuntu/UbuntuMono-B.woff2")],["BOLDITALIC",w().getFontsURL("Ubuntu/UbuntuMono-BI.woff2")]])]]);function R(e){f().call(this,e),g().call(this,e),this.getType().pop(),this.addType(T().X3DFontStyleNode),this.addChildObjects(T().inputOutput,"description",new(i().SFString),T().inputOutput,"url",new(i().MFString),T().inputOutput,"load",new(i().SFBool)(!0),T().inputOutput,"autoRefresh",new(i().SFTime)(0),T().inputOutput,"autoRefreshTimeLimit",new(i().SFTime)(3600)),this.alignments=[],this.loadCounter=0,this.loadCount=-1}Object.assign(Object.setPrototypeOf(R.prototype,f().prototype),g().prototype,{initialize(){f().prototype.initialize.call(this),g().prototype.initialize.call(this),this._family.addInterest("set_url__",this),this._style.addInterest("set_url__",this),this._justify.addInterest("set_justify__",this),this.set_justify__(),this.requestImmediateLoad().catch(Function.prototype)},set_justify__(){const e=this._horizontal.getValue()?this._leftToRight.getValue():this._topToBottom.getValue();this.alignments[0]=this._justify.length>0?this.getAlignment(0,e):e?S.BEGIN:S.END;const t=this._horizontal.getValue()?this._topToBottom.getValue():this._leftToRight.getValue();this.alignments[1]=this._justify.length>1?this.getAlignment(1,t):t?S.FIRST:S.END},getAllowEmptyUrl:()=>!0,getFont(){return this.font},getDefaultFont(e,t){const n=I.get(e);return n?.get(t)??n?.get("PLAIN")},getMajorAlignment(){return this.alignments[0]},getMinorAlignment(){return this.alignments[1]},getAlignment(e,t){if(t)switch(this._justify[e]){case"FIRST":return S.FIRST;case"BEGIN":return S.BEGIN;case"MIDDLE":return S.MIDDLE;case"END":return S.END}else switch(this._justify[e]){case"FIRST":case"BEGIN":return S.END;case"MIDDLE":return S.MIDDLE;case"END":return S.BEGIN}return e?S.FIRST:S.BEGIN},async loadData(){const e=++this.loadCounter,t=this.getBrowser(),n=this.getExecutionContext(),s=this._family.copy(),r=this._style.getValue();s.push("SERIF"),await k.sleep(0);let o=null;for(const a of s){const s=this.getDefaultFont(a,r);if(s&&(o=await t.loadFont(new URL(s),!0),o))break;if(o=await t.getFont(n,a),o)break;const i=new URL(a,n.getBaseURL());if("data:"===i.protocol||i.pathname.match(/\.(?:woff2|woff|otf|ttf)$/i)){if(n.getSpecificationVersion()>=4.1&&console.warn("Loading a font file via family field is deprecated, please use new FontLibrary node instead."),o=await t.loadFont(i,this.getCache()),o)break}else e>this.loadCount&&console.warn(`Couldn't find font family '${a}' with style '${r}'.`)}e<this.loadCount||(this.loadCount=e,this.font=o,this.setLoadState(o?T().COMPLETE_STATE:T().FAILED_STATE),this.addNodeEvent())},dispose(){g().prototype.dispose.call(this),f().prototype.dispose.call(this)}}),Object.defineProperties(R,f().getStaticProperties("X3DFontStyleNode","Text",1));const U=R,L=y().add("X3DFontStyleNode",U),C=e.PrimitiveQuality;var E=s.n(C);const D=e.TextCompression;var F=s.n(D);const M=e.Box2;var A=s.n(M);const N=e.Box3;var P=s.n(N);const B=e.Vector2;var G=s.n(B);const _=e.Vector3;var H=s.n(_);const V=e.Matrix3;var z=s.n(V);const q=new(A()),j=new(A()),W=new(G()),$=new(G()),X=new(G()),Y=new(G()),Z=new(H()),Q=new(H()),K=new(G()),J=new(G()),ee=new(G()),te=new(G()),ne=new(G()),se=new(G()),re=new(H()),oe=new(A()),ae=new(G()),ie=new(H());function le(e,t){this.browser=e.getBrowser(),this.text=e,this.fontStyle=t,this.glyphs=[],this.minorAlignment=new(G()),this.lineIndices=[],this.translations=[],this.charSpacings=[],this.scales=[],this.bearing=new(G()),this.bbox=new(P())}Object.assign(le.prototype,{getBrowser(){return this.browser},getText(){return this.text},getFontStyle(){return this.fontStyle},getGlyphs(){return this.glyphs},getMinorAlignment(){return this.minorAlignment},getTranslations(){return this.translations},getCharSpacings(){return this.charSpacings},getScales(){return this.scales},getBearing(){return this.bearing},getBBox(){return this.bbox},update(){this.configure(),this.build()},configure(){const e=this.text,t=this.fontStyle,n=e._string.length;if(e._lineBounds.length=n,this.glyphs.length=0,0===n||!t.getFont())return e._origin.setValue(ie),e._textBounds.setValue(ae),void this.bbox.set();if(t._horizontal.getValue())this.resizeArray(this.translations,n),this.lineIndices.length=0,this.charSpacings.length=n,this.scales.length=n,this.horizontal(e,t);else{const s=e._string.reduce((e,t)=>e+t.length,0);this.resizeArray(this.translations,s),this.lineIndices.length=s,this.charSpacings.length=n,this.scales.length=n,this.vertical(e,t)}},resizeArray(e,t){for(let n=e.length;n<t;++n)e.push(new(G()));e.length=t},horizontal(e,t){const n=t.getFont(),s=e._string,r=s.length,o=Math.max(0,e._maxExtent.getValue()),a=t._topToBottom.getValue(),i=t.getScale(),l=t.getContentScale(),u=t._spacing.getValue(),c=this.getBrowser().getBrowserOptions().getTextCompression();q.set();const p=a?r:-1,h=a?1:-1;for(let o=a?0:r-1,f=0;o!==p;o+=h,++f){const r=s[o],a=this.getHorizontalLineExtents(t,r,W,$,f);K.assign($).subtract(W);const p=e.getLength(o)*l,h=K.x*i;let d=0;switch(se.set(h,0==f?$.y-n.descender/n.unitsPerEm*i:u),p&&(c===F().CHAR_SPACING&&a.length>1&&(d=(p-se.x)/(a.length-1)),se.x=p,K.x=p/i),this.charSpacings[f]=d,this.scales[f]=c===F().SCALING?se.x/h:1,e._lineBounds[o]=se,t.getMajorAlignment()){case S.BEGIN:case S.FIRST:this.translations[f].set(0,-f*u);break;case S.MIDDLE:this.translations[f].set(-W.x-K.x/2,-f*u);break;case S.END:this.translations[f].set(-W.x-K.x,-f*u)}this.translations[f].multiply(i),J.assign(W).add(ee.assign(K).divide(2)),q.add(oe.set(K.multiply(i),J.multiply(i).add(this.translations[f])))}if(o){const t=e._lineBounds.reduce((e,t)=>Math.max(e,t.x),0);if(t>o){const n=o*l/t;switch(c){case F().CHAR_SPACING:for(const t of this.charSpacings.keys())e._string[t].length<2||(this.charSpacings[t]-=(e._lineBounds[t].x-e._lineBounds[t].x*n)/(e._string[t].length-1));break;case F().SCALING:for(const e of this.scales.keys())this.scales[e]*=n}for(const e of this.translations.keys())this.translations[e].x*=n;for(const t of e._lineBounds.keys())e._lineBounds[t].x*=n;q.multRight(new(z())(n,0,0,0,1,0,0,0,0))}}switch(q.getExtents(W,$),K.assign($).subtract(W),e._textBounds=K,this.bearing.set(0,-$.y),t.getMinorAlignment()){case S.BEGIN:this.minorAlignment.assign(this.bearing);break;case S.FIRST:this.minorAlignment.set(0);break;case S.MIDDLE:this.minorAlignment.set(0,K.y/2-$.y);break;case S.END:this.minorAlignment.set(0,(r-1)*u*i)}W.add(this.minorAlignment),$.add(this.minorAlignment),e._origin.setValue(re.set(W.x,$.y,0)),this.bbox.setExtents(Z.set(W.x,W.y,0),Q.set($.x,$.y,0))},vertical(e,t){const n=t.getFont(),s=e._string,r=s.length,o=Math.max(0,e._maxExtent.getValue()),a=t._leftToRight.getValue(),i=t._topToBottom.getValue(),l=t.getScale(),u=t.getContentScale(),c=t._spacing.getValue(),p=this.getBrowser().getBrowserOptions().getPrimitiveQuality(),h=this.getBrowser().getBrowserOptions().getTextCompression();q.set();const f=a?r:-1,d=a?1:-1;let g=0;for(let o=a?0:r-1;o!==f;o+=d){const f=this.stringToGlyphs(n,s[o],!0,o),d=g,m=f.length;j.set();const y=i?m:-1,v=i?1:-1;for(let e=i?0:m-1;e!==y;e+=v,++g){const t=f[e];this.getGlyphExtents(n,t,p,W,$),K.assign($).subtract(W);const s=i?e:m-e-1;this.lineIndices[g]=o,this.translations[g].set((c-K.x-W.x)/2,-s),J.assign(W).add(ee.assign(K).divide(2)).add(this.translations[g]),j.add(oe.set(K,J))}j.getExtents(W,$),K.assign($).subtract(W);const b=a?o:r-o-1,x=(c-K.x)/2,T=e.getLength(o)*u;let O=0;se.set(0===o?c-x:c,m?K.y:0).multiply(l);const w=se.y;if(T){switch(h){case F().CHAR_SPACING:f.length>1&&(O=(T-se.y)/(f.length-1));break;case F().SCALING:t.getMajorAlignment()===S.MIDDLE&&($.y+=(T-se.y)/2)}se.y=T,K.y=T/l,W.y=$.y-K.y}switch(this.charSpacings[o]=O,this.scales[o]=h===F().SCALING?se.y/w:1,e._lineBounds[o]=se,t.getMajorAlignment()){case S.BEGIN:case S.FIRST:ne.assign(te.set(b*c,-$.y));break;case S.MIDDLE:ne.assign(te.set(b*c,K.y/2-$.y));break;case S.END:te.set(b*c,K.y/this.scales[o]-$.y),ne.set(b*c,K.y-$.y)}for(let e=d;e<g;++e)this.translations[e].add(te).multiply(l);J.assign(W).add(ee.assign(K).divide(2)),q.add(oe.set(K.multiply(l),J.add(ne).multiply(l)))}if(o){const n=e._lineBounds.reduce((e,t)=>Math.max(e,t.y),0);if(n>o){const s=o*u/n;switch(h){case F().CHAR_SPACING:for(const t of this.charSpacings.keys())e._string[t].length<2||(this.charSpacings[t]-=(e._lineBounds[t].y-e._lineBounds[t].y*s)/(e._string[t].length-1));switch(t.getMajorAlignment()){case S.MIDDLE:for(const t of this.translations.keys()){const n=this.lineIndices[t];this.translations[t].y-=(e._lineBounds[n].y-e._lineBounds[n].y*s)/2}break;case S.END:for(const t of this.translations.keys()){const n=this.lineIndices[t];this.translations[t].y-=e._lineBounds[n].y-e._lineBounds[n].y*s}}break;case F().SCALING:for(const e of this.scales.keys())this.scales[e]*=s}for(const t of e._lineBounds.keys())e._lineBounds[t].y*=s;q.multRight(new(z())(1,0,0,0,s,0,0,0,0))}}switch(q.getExtents(W,$),K.assign($).subtract(W),e._textBounds=K,t.getMajorAlignment()){case S.BEGIN:case S.FIRST:this.bearing.set(-W.x,$.y);break;case S.MIDDLE:this.bearing.set(-W.x,0);break;case S.END:this.bearing.set(-W.x,W.y)}switch(t.getMinorAlignment()){case S.BEGIN:case S.FIRST:this.minorAlignment.set(-W.x,0);break;case S.MIDDLE:this.minorAlignment.set(-W.x-K.x/2,0);break;case S.END:this.minorAlignment.set(-W.x-K.x,0)}W.add(this.minorAlignment),$.add(this.minorAlignment),e._origin.setValue(re.set(W.x,$.y,0)),this.bbox.setExtents(Z.set(W.x,W.y,0),Q.set($.x,$.y,0))},stringToGlyphs(e,t,n,s){const r=this.glyphs[s]??(this.glyphs[s]=[]);r.length=t.length;const o=n?0:t.length-1,a=n?t.length:-1,i=n?1:-1;for(let n=o,s=0;n!==a;n+=i,++s)r[s]=e.charToGlyph(t[n]);return r},getHorizontalLineExtents(e,t,n,s,r){const o=e.getFont(),a=e._horizontal.getValue()?e._leftToRight.getValue():e._topToBottom.getValue(),i=this.stringToGlyphs(o,t,a,r),l=i.length,u=this.getBrowser().getBrowserOptions().getPrimitiveQuality();let c=0,p=0,h=Number.POSITIVE_INFINITY,f=Number.NEGATIVE_INFINITY;for(let e=0;e<l;++e){const t=i[e],n=i[e+1],s=n?o.getKerningValue(t,n):0;this.getGlyphExtents(o,t,u,X,Y),p+=e<l-1?t.advanceWidth+s:Y.x*o.unitsPerEm,h=Math.min(h,X.y),f=Math.max(f,Y.y)}switch(i.length?(this.getGlyphExtents(o,i[0],u,X,Y),c=X.x):(h=0,f=0),n.set(c,h),s.set(p/o.unitsPerEm,f),e.getMajorAlignment()){case S.BEGIN:case S.FIRST:n.x=0}return i}});const ue=le,ce=y().add("X3DTextGeometry",ue),pe=e.Matrix4;var he=s.n(pe);const fe=e.Bezier;var de=s.n(fe);const ge=e.libtess;var me=s.n(ge);const ye=Symbol();function ve(e,t){ce.call(this,e,t),e.setTransparent(!1)}Object.assign(Object.setPrototypeOf(ve.prototype,ce.prototype),{getMatrix:()=>he().IDENTITY,getTextureNode:()=>null,build:(()=>{const e=new(H()),t=new(H());return function(){const n=this.getFontStyle(),s=n.getFont();if(!s)return;const r=this.getText(),o=this.getGlyphs(),a=this.getMinorAlignment(),i=this.getTranslations(),l=this.getCharSpacings(),u=this.getScales(),c=n.getScale(),p=n._spacing.getValue(),h=r._origin.getValue(),f=c/s.unitsPerEm,d=this.getBrowser().getBrowserOptions().getPrimitiveQuality(),g=r.getTexCoords(),m=r.getNormals(),y=r.getVertices();if(r.getMultiTexCoords().push(g),this.getBBox().getExtents(e,t),r.getMin().assign(e),r.getMax().assign(t),n._horizontal.getValue())for(let e=0,t=o.length;e<t;++e){const t=o[e],n=i[e],r=l[e],v=u[e];let b=0;for(let e=0,o=t.length;e<o;++e){const o=t[e],i=this.getGlyphGeometry(s,o,d),l=a.x+n.x+b*v+e*r,u=a.y+n.y;for(const{x:e,y:t}of i){const n=e*c*v+l,s=t*c+u;g.push((n-h.x)/p,(s-h.y)/p,0,1),m.push(0,0,1),y.push(n,s,0,1)}let S=0;e+1<t.length&&(S=s.getKerningValue(o,t[e+1])),b+=(o.advanceWidth+S)*f}}else{const e=n._leftToRight.getValue(),t=n._topToBottom.getValue(),f=e?0:r._string.length-1,v=e?r._string.length:-1,b=e?1:-1;for(let e=f,n=0;e!==v;e+=b){const r=o[e],f=r.length,v=t?0:f-1,b=t?f:-1,S=t?1:-1,x=l[e],T=u[e];for(let e=v;e!==b;e+=S,++n){const o=i[n],l=this.getGlyphGeometry(s,r[e],d);for(const{x:n,y:s}of l){const r=t?e:f-e-1,i=n*c+a.x+o.x,l=s*c*T+a.y+o.y*T-r*x;g.push((i-h.x)/p,(l-h.y)/p,0,1),m.push(0,0,1),y.push(i,l,0,1)}}}}}})(),getGlyph(e,t,n){const s=e[ye]??=[],r=s[t]??=[];return r[n]??={}},getGlyphExtents(e,t,n,s,r){const o=this.getGlyph(e,n,t.index),a=o.extents;if(a)s.assign(a.min),r.assign(a.max);else{const a=this.getGlyphGeometry(e,t,n);a.length?(s.assign(a[0]).min(...a),r.assign(a[0]).max(...a)):(s.set(0),r.set(0));const i=o.extents={};i.min=s.copy(),i.max=r.copy()}},getGlyphGeometry(e,t,n){const s=this.getGlyph(e,n,t.index);return s.geometry??=this.createGlyphGeometry(t,n)},createGlyphGeometry(e,t){const n=this.getBezierSteps(t),s=e.getPath(0,0,1),r=[];let o=[],a=0,i=0;s.commands.push({type:"Z"});for(const{type:e,x1:t,y1:l,x2:u,y2:c,x:p,y:h}of s.commands){switch(e){case"M":case"Z":o.length>2&&r.push(o),o=[],"M"===e&&o.push(new(H())(p,-h,0));break;case"L":o.push(new(H())(p,-h,0));break;case"Q":de().quadric(a,-i,0,t,-l,0,p,-h,0,n,o);break;case"C":de().cubic(a,-i,0,t,-l,0,u,-c,0,p,-h,0,n,o);break;default:continue}a=p,i=h}return this.triangulatePolygon(r,[])},getBezierSteps(e){switch(e){case E().LOW:return 3;case E().HIGH:return 7;default:return 5}},triangulatePolygon:(()=>{const e=new(me().GluTesselator);return e.gluTessCallback(me().gluEnum.GLU_TESS_VERTEX_DATA,function(e,t){t.push(e)}),e.gluTessCallback(me().gluEnum.GLU_TESS_COMBINE,function(e,t,n){return new(H())(...e)}),e.gluTessProperty(me().gluEnum.GLU_TESS_WINDING_RULE,me().windingRule.GLU_TESS_WINDING_NONZERO),e.gluTessNormal(0,0,1),function(t,n){e.gluTessBeginPolygon(n);for(const n of t){e.gluTessBeginContour();for(const t of n)e.gluTessVertex(t,t);e.gluTessEndContour()}return e.gluTessEndPolygon(),n}})()});const be=ve,Se=y().add("PolygonText",be);function xe(e){L.call(this,e),this.addType(T().FontStyle),this._size.setUnit("length")}Object.assign(Object.setPrototypeOf(xe.prototype,L.prototype),{createTextGeometry(e){return new Se(e,this)},getScale(){return this._size.getValue()},getContentScale:()=>1}),Object.defineProperties(xe,{...f().getStaticProperties("FontStyle","Text",1,"fontStyle","2.0"),fieldDefinitions:{value:new(p())([new(u())(T().inputOutput,"metadata",new(i().SFNode)),new(u())(T().inputOutput,"language",new(i().SFString)),new(u())(T().inputOutput,"family",new(i().MFString)("SERIF")),new(u())(T().inputOutput,"style",new(i().SFString)("PLAIN")),new(u())(T().inputOutput,"size",new(i().SFFloat)(1)),new(u())(T().inputOutput,"spacing",new(i().SFFloat)(1)),new(u())(T().inputOutput,"horizontal",new(i().SFBool)(!0)),new(u())(T().inputOutput,"leftToRight",new(i().SFBool)(!0)),new(u())(T().inputOutput,"topToBottom",new(i().SFBool)(!0)),new(u())(T().inputOutput,"justify",new(i().MFString)("BEGIN"))]),enumerable:!0}});const Te=xe,Oe=y().add("FontStyle",Te),we=e.X3DChildNode;var ke=s.n(we);function Ie(e){ke().call(this,e),g().call(this,e),this.addType(T().FontLibrary),this.loadCounter=0,this.loadCount=-1}Object.assign(Object.setPrototypeOf(Ie.prototype,ke().prototype),g().prototype,{initialize(){ke().prototype.initialize.call(this),g().prototype.initialize.call(this),this._family.addInterest("set_family__",this),this.requestImmediateLoad().catch(Function.prototype)},set_family__(){if(!this.font)return;const e=this._family.getValue();e&&this.getBrowser().registerFontLibrary(this.getExecutionContext(),e,this.font)},async loadData(){const e=++this.loadCounter,t=this.getBrowser(),n=this.getExecutionContext(),s=Array.from(this._url).map(e=>new URL(e,n.getBaseURL()));let r;for(const e of s)if(r=await t.loadFont(e,this.getCache()),r)break;e<this.loadCount||(this.loadCount=e,this.font=r,this.set_family__(),this.setLoadState(r?T().COMPLETE_STATE:T().FAILED_STATE))},dispose(){g().prototype.dispose.call(this),ke().prototype.dispose.call(this)}}),Object.defineProperties(Ie,{...f().getStaticProperties("FontLibrary","Text",2,"children","4.1"),fieldDefinitions:{value:new(p())([new(u())(T().inputOutput,"metadata",new(i().SFNode)),new(u())(T().inputOutput,"description",new(i().SFString)),new(u())(T().inputOutput,"family",new(i().SFString)),new(u())(T().inputOutput,"load",new(i().SFBool)(!0)),new(u())(T().inputOutput,"url",new(i().MFString)),new(u())(T().inputOutput,"autoRefresh",new(i().SFTime)(0)),new(u())(T().inputOutput,"autoRefreshTimeLimit",new(i().SFTime)(3600))]),enumerable:!0}});const Re=Ie,Ue=y().add("FontLibrary",Re);function Le(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function Ce(e,t){this.source=e,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=t,this.destLen=0,this.ltree=new Le,this.dtree=new Le}var Ee=new Le,De=new Le,Fe=new Uint8Array(30),Me=new Uint16Array(30),Ae=new Uint8Array(30),Ne=new Uint16Array(30),Pe=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Be=new Le,Ge=new Uint8Array(320);function _e(e,t,n,s){var r,o;for(r=0;r<n;++r)e[r]=0;for(r=0;r<30-n;++r)e[r+n]=r/n|0;for(o=s,r=0;r<30;++r)t[r]=o,o+=1<<e[r]}var He=new Uint16Array(16);function Ve(e,t,n,s){var r,o;for(r=0;r<16;++r)e.table[r]=0;for(r=0;r<s;++r)e.table[t[n+r]]++;for(e.table[0]=0,o=0,r=0;r<16;++r)He[r]=o,o+=e.table[r];for(r=0;r<s;++r)t[n+r]&&(e.trans[He[t[n+r]]++]=r)}function ze(e){e.bitcount--||(e.tag=e.source[e.sourceIndex++],e.bitcount=7);var t=1&e.tag;return e.tag>>>=1,t}function qe(e,t,n){if(!t)return n;for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var s=e.tag&65535>>>16-t;return e.tag>>>=t,e.bitcount-=t,s+n}function je(e,t){for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var n=0,s=0,r=0,o=e.tag;do{s=2*s+(1&o),o>>>=1,++r,n+=t.table[r],s-=t.table[r]}while(s>=0);return e.tag=o,e.bitcount-=r,t.trans[n+s]}function We(e,t,n){var s,r,o,a,i,l;for(s=qe(e,5,257),r=qe(e,5,1),o=qe(e,4,4),a=0;a<19;++a)Ge[a]=0;for(a=0;a<o;++a){var u=qe(e,3,0);Ge[Pe[a]]=u}for(Ve(Be,Ge,0,19),i=0;i<s+r;){var c=je(e,Be);switch(c){case 16:var p=Ge[i-1];for(l=qe(e,2,3);l;--l)Ge[i++]=p;break;case 17:for(l=qe(e,3,3);l;--l)Ge[i++]=0;break;case 18:for(l=qe(e,7,11);l;--l)Ge[i++]=0;break;default:Ge[i++]=c}}Ve(t,Ge,0,s),Ve(n,Ge,s,r)}function $e(e,t,n){for(;;){var s,r,o,a,i=je(e,t);if(256===i)return 0;if(i<256)e.dest[e.destLen++]=i;else for(s=qe(e,Fe[i-=257],Me[i]),r=je(e,n),a=o=e.destLen-qe(e,Ae[r],Ne[r]);a<o+s;++a)e.dest[e.destLen++]=e.dest[a]}}function Xe(e){for(var t,n;e.bitcount>8;)e.sourceIndex--,e.bitcount-=8;if((t=256*(t=e.source[e.sourceIndex+1])+e.source[e.sourceIndex])!==(65535&~(256*e.source[e.sourceIndex+3]+e.source[e.sourceIndex+2])))return-3;for(e.sourceIndex+=4,n=t;n;--n)e.dest[e.destLen++]=e.source[e.sourceIndex++];return e.bitcount=0,0}function Ye(e,t){var n,s,r=new Ce(e,t);do{switch(n=ze(r),qe(r,2,0)){case 0:s=Xe(r);break;case 1:s=$e(r,Ee,De);break;case 2:We(r,r.ltree,r.dtree),s=$e(r,r.ltree,r.dtree);break;default:s=-3}if(0!==s)throw new Error("Data error")}while(!n);return r.destLen<r.dest.length?"function"==typeof r.dest.slice?r.dest.slice(0,r.destLen):r.dest.subarray(0,r.destLen):r.dest}function Ze(e,t,n,s,r){return Math.pow(1-r,3)*e+3*Math.pow(1-r,2)*r*t+3*(1-r)*Math.pow(r,2)*n+Math.pow(r,3)*s}function Qe(){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN}!function(e,t){var n;for(n=0;n<7;++n)e.table[n]=0;for(e.table[7]=24,e.table[8]=152,e.table[9]=112,n=0;n<24;++n)e.trans[n]=256+n;for(n=0;n<144;++n)e.trans[24+n]=n;for(n=0;n<8;++n)e.trans[168+n]=280+n;for(n=0;n<112;++n)e.trans[176+n]=144+n;for(n=0;n<5;++n)t.table[n]=0;for(t.table[5]=32,n=0;n<32;++n)t.trans[n]=n}(Ee,De),_e(Fe,Me,4,3),_e(Ae,Ne,2,1),Fe[28]=0,Me[28]=258,Qe.prototype.isEmpty=function(){return isNaN(this.x1)||isNaN(this.y1)||isNaN(this.x2)||isNaN(this.y2)},Qe.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))},Qe.prototype.addX=function(e){this.addPoint(e,null)},Qe.prototype.addY=function(e){this.addPoint(null,e)},Qe.prototype.addBezier=function(e,t,n,s,r,o,a,i){const l=[e,t],u=[n,s],c=[r,o],p=[a,i];this.addPoint(e,t),this.addPoint(a,i);for(let e=0;e<=1;e++){const t=6*l[e]-12*u[e]+6*c[e],n=-3*l[e]+9*u[e]-9*c[e]+3*p[e],s=3*u[e]-3*l[e];if(0===n){if(0===t)continue;const n=-s/t;0<n&&n<1&&(0===e&&this.addX(Ze(l[e],u[e],c[e],p[e],n)),1===e&&this.addY(Ze(l[e],u[e],c[e],p[e],n)));continue}const r=Math.pow(t,2)-4*s*n;if(r<0)continue;const o=(-t+Math.sqrt(r))/(2*n);0<o&&o<1&&(0===e&&this.addX(Ze(l[e],u[e],c[e],p[e],o)),1===e&&this.addY(Ze(l[e],u[e],c[e],p[e],o)));const a=(-t-Math.sqrt(r))/(2*n);0<a&&a<1&&(0===e&&this.addX(Ze(l[e],u[e],c[e],p[e],a)),1===e&&this.addY(Ze(l[e],u[e],c[e],p[e],a)))}},Qe.prototype.addQuad=function(e,t,n,s,r,o){const a=e+2/3*(n-e),i=t+2/3*(s-t),l=a+1/3*(r-e),u=i+1/3*(o-t);this.addBezier(e,t,a,i,l,u,r,o)};var Ke=Qe;function Je(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}var et={};function tt(e,t){const n=Math.floor(e),s=e-n;if(et[t]||(et[t]={}),void 0!==et[t][s]){return n+et[t][s]}const r=+(Math.round(s+"e+"+t)+"e-"+t);return et[t][s]=r,n+r}function nt(e){let t=[[]],n=0,s=0;for(let r=0;r<e.length;r+=1){const o=t[t.length-1],a=e[r],i=o[0],l=o[1],u=o[o.length-1],c=e[r+1];o.push(a),"M"===a.type?(n=a.x,s=a.y):"L"!==a.type||c&&"Z"!==c.type?"L"===a.type&&u&&u.x===a.x&&u.y===a.y?o.pop():"Z"===a.type&&(i&&l&&u&&"M"===i.type&&"L"===l.type&&"L"===u.type&&u.x===i.x&&u.y===i.y&&(o.shift(),o[0].type="M"),r+1<e.length&&t.push([])):Math.abs(a.x-n)>1||Math.abs(a.y-s)>1||o.pop()}return e=[].concat.apply([],t)}Je.prototype.fromSVG=function(e,t={}){"undefined"!=typeof SVGPathElement&&e instanceof SVGPathElement&&(e=e.getAttribute("d")),t=function(e){return Object.assign({},{decimalPlaces:2,optimize:!0,flipY:!0,flipYBase:void 0,scale:1,x:0,y:0},e)}(t),this.commands=[];const n="MmLlQqCcZzHhVv";let s={},r=[""],o=!1;function a(e){if(!this.commands.length)return e;const t=this.commands[this.commands.length-1];for(let n=0;n<e.length;n++)e[n]+=t[1&n?"y":"x"];return e}function i(){if(void 0===s.type)return;const e=s.type.toUpperCase(),n="Z"!==e&&s.type.toUpperCase()!==s.type;let o=r.filter(e=>e.length).map(e=>{let n=parseFloat(e);return(t.decimalPlaces||0===t.decimalPlaces)&&(n=tt(n,t.decimalPlaces)),n});if(r=[""],!o.length&&"Z"!==e)return;n&&"H"!==e&&"V"!==e&&(o=a.apply(this,[o]));const i=this.commands.length&&this.commands[this.commands.length-1].x||0,l=this.commands.length&&this.commands[this.commands.length-1].y||0;switch(e){case"M":this.moveTo(...o);break;case"L":this.lineTo(...o);break;case"V":for(let e=0;e<o.length;e++){let t=0;n&&(t=this.commands.length&&this.commands[this.commands.length-1].y||0),this.lineTo(i,o[e]+t)}break;case"H":for(let e=0;e<o.length;e++){let t=0;n&&(t=this.commands.length&&this.commands[this.commands.length-1].x||0),this.lineTo(o[e]+t,l)}break;case"C":this.bezierCurveTo(...o);break;case"Q":this.quadraticCurveTo(...o);break;case"Z":(this.commands.length<1||"Z"!==this.commands[this.commands.length-1].type)&&this.close()}if(this.commands.length)for(const e in this.commands[this.commands.length-1])void 0===this.commands[this.commands.length-1][e]&&(this.commands[this.commands.length-1][e]=0)}for(let t=0;t<e.length;t++){const a=e.charAt(t),l=r[r.length-1];if("0123456789".indexOf(a)>-1)r[r.length-1]+=a;else if("-+".indexOf(a)>-1)if(s.type||this.commands.length||(s.type="L"),"-"===a)!s.type||l.indexOf("-")>0?o=!0:l.length?r.push("-"):r[r.length-1]=a;else{if(s.type&&!(l.length>0))continue;o=!0}else if(n.indexOf(a)>-1)s.type?(i.apply(this),s={type:a}):s.type=a;else{if("SsTtAa".indexOf(a)>-1)throw new Error("Unsupported path command: "+a+". Currently supported commands are "+n.split("").join(", ")+".");" ,\t\n\r\f\v".indexOf(a)>-1?r.push(""):"."===a?!s.type||l.indexOf(a)>-1?o=!0:r[r.length-1]+=a:o=!0}if(o)throw new Error("Unexpected character: "+a+" at offset "+t)}i.apply(this),t.optimize&&(this.commands=nt(this.commands));const l=t.flipY;let u=t.flipYBase;if(!0===l&&void 0===t.flipYBase){const e=this.getBoundingBox();u=e.y1+e.y2}for(const e in this.commands){const n=this.commands[e];for(const s in n)["x","x1","x2"].includes(s)?this.commands[e][s]=t.x+n[s]*t.scale:["y","y1","y2"].includes(s)&&(this.commands[e][s]=t.y+(l?u-n[s]:n[s])*t.scale)}return this},Je.fromSVG=function(e,t){return(new Je).fromSVG(e,t)},Je.prototype.moveTo=function(e,t){this.commands.push({type:"M",x:e,y:t})},Je.prototype.lineTo=function(e,t){this.commands.push({type:"L",x:e,y:t})},Je.prototype.curveTo=Je.prototype.bezierCurveTo=function(e,t,n,s,r,o){this.commands.push({type:"C",x1:e,y1:t,x2:n,y2:s,x:r,y:o})},Je.prototype.quadTo=Je.prototype.quadraticCurveTo=function(e,t,n,s){this.commands.push({type:"Q",x1:e,y1:t,x:n,y:s})},Je.prototype.close=Je.prototype.closePath=function(){this.commands.push({type:"Z"})},Je.prototype.extend=function(e){if(e.commands)e=e.commands;else if(e instanceof Ke){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)},Je.prototype.getBoundingBox=function(){const e=new Ke;let t=0,n=0,s=0,r=0;for(let o=0;o<this.commands.length;o++){const a=this.commands[o];switch(a.type){case"M":e.addPoint(a.x,a.y),t=s=a.x,n=r=a.y;break;case"L":e.addPoint(a.x,a.y),s=a.x,r=a.y;break;case"Q":e.addQuad(s,r,a.x1,a.y1,a.x,a.y),s=a.x,r=a.y;break;case"C":e.addBezier(s,r,a.x1,a.y1,a.x2,a.y2,a.x,a.y),s=a.x,r=a.y;break;case"Z":s=t,r=n;break;default:throw new Error("Unexpected path command "+a.type)}}return e.isEmpty()&&e.addPoint(0,0),e},Je.prototype.draw=function(e){const t=this._layers;if(t&&t.length){for(let n=0;n<t.length;n++)this.draw.call(t[n],e);return}const n=this._image;if(n)e.drawImage(n.image,n.x,n.y,n.width,n.height);else{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&&this.stroke&&this.strokeWidth&&e.closePath()}this.fill&&(e.fillStyle=this.fill,e.fill()),this.stroke&&(e.strokeStyle=this.stroke,e.lineWidth=this.strokeWidth,e.stroke())}},Je.prototype.toPathData=function(e){function t(t){const n=tt(t,e.decimalPlaces);return Math.round(t)===n?""+n:n.toFixed(e.decimalPlaces)}function n(){let e="";for(let n=0;n<arguments.length;n+=1){const s=arguments[n];s>=0&&n>0&&(e+=" "),e+=t(s)}return e}e=function(e){return parseInt(e)===e&&(e={decimalPlaces:e,flipY:!1}),Object.assign({},{decimalPlaces:2,optimize:!0,flipY:!0,flipYBase:void 0},e)}(e);let s=this.commands;e.optimize&&(s=JSON.parse(JSON.stringify(this.commands)),s=nt(s));const r=e.flipY;let o=e.flipYBase;if(!0===r&&void 0===o){const e=new Je;e.extend(s);const t=e.getBoundingBox();o=t.y1+t.y2}let a="";for(let e=0;e<s.length;e+=1){const t=s[e];"M"===t.type?a+="M"+n(t.x,r?o-t.y:t.y):"L"===t.type?a+="L"+n(t.x,r?o-t.y:t.y):"C"===t.type?a+="C"+n(t.x1,r?o-t.y1:t.y1,t.x2,r?o-t.y2:t.y2,t.x,r?o-t.y:t.y):"Q"===t.type?a+="Q"+n(t.x1,r?o-t.y1:t.y1,t.x,r?o-t.y:t.y):"Z"===t.type&&(a+="Z")}return a},Je.prototype.toSVG=function(e,t){this._layers&&this._layers.length&&console.warn("toSVG() does not support colr font layers yet"),this._image&&console.warn("toSVG() does not support SVG glyphs yet"),t||(t=this.toPathData(e));let n='<path d="';return n+=t,n+='"',void 0!==this.fill&&"black"!==this.fill&&(null===this.fill?n+=' fill="none"':n+=' fill="'+this.fill+'"'),this.stroke&&(n+=' stroke="'+this.stroke+'" stroke-width="'+this.strokeWidth+'"'),n+="/>",n},Je.prototype.toDOMElement=function(e,t){this._layers&&this._layers.length&&console.warn("toDOMElement() does not support colr font layers yet"),t||(t=this.toPathData(e));const n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d",t),void 0!==this.fill&&"black"!==this.fill&&(null===this.fill?n.setAttribute("fill","none"):n.setAttribute("fill",this.fill)),this.stroke&&(n.setAttribute("stroke",this.stroke),n.setAttribute("stroke-width",this.strokeWidth)),n};var st=Je;function rt(e){throw new Error(e)}function ot(e,t){e||rt(t)}var at={fail:rt,argument:ot,assert:ot},it=2147483648,lt={},ut={},ct={};function pt(e){return function(){return e}}ut.BYTE=function(e){return at.argument(e>=0&&e<=255,"Byte value should be between 0 and 255."),[e]},ct.BYTE=pt(1),ut.CHAR=function(e){return[e.charCodeAt(0)]},ct.CHAR=pt(1),ut.CHARARRAY=function(e){null==e&&(e="",console.warn("CHARARRAY with undefined or null value encountered and treated as an empty string. This is probably caused by a missing glyph name."));const t=[];for(let n=0;n<e.length;n+=1)t[n]=e.charCodeAt(n);return t},ct.CHARARRAY=function(e){return void 0===e?0:e.length},ut.USHORT=function(e){return[e>>8&255,255&e]},ct.USHORT=pt(2),ut.SHORT=function(e){return e>=32768&&(e=-(65536-e)),[e>>8&255,255&e]},ct.SHORT=pt(2),ut.UINT24=function(e){return[e>>16&255,e>>8&255,255&e]},ct.UINT24=pt(3),ut.ULONG=function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]},ct.ULONG=pt(4),ut.LONG=function(e){return e>=it&&(e=-(2*it-e)),[e>>24&255,e>>16&255,e>>8&255,255&e]},ct.LONG=pt(4),ut.FLOAT=function(e){if(e>32767.00001525879||e<-32768)throw new Error(`Value ${e} is outside the range of representable values in 16.16 format`);const t=Math.round(65536*e)|0;return ut.ULONG(t)},ct.FLOAT=ct.ULONG,ut.FIXED=ut.ULONG,ct.FIXED=ct.ULONG,ut.FWORD=ut.SHORT,ct.FWORD=ct.SHORT,ut.UFWORD=ut.USHORT,ct.UFWORD=ct.USHORT,ut.F2DOT14=function(e){return ut.USHORT(16384*e)},ct.F2DOT14=ct.USHORT,ut.LONGDATETIME=function(e){return[0,0,0,0,e>>24&255,e>>16&255,e>>8&255,255&e]},ct.LONGDATETIME=pt(8),ut.TAG=function(e){return at.argument(4===e.length,"Tag should be exactly 4 ASCII characters."),[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]},ct.TAG=pt(4),ut.Card8=ut.BYTE,ct.Card8=ct.BYTE,ut.Card16=ut.USHORT,ct.Card16=ct.USHORT,ut.OffSize=ut.BYTE,ct.OffSize=ct.BYTE,ut.SID=ut.USHORT,ct.SID=ct.USHORT,ut.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?ut.NUMBER16(e):ut.NUMBER32(e)},ct.NUMBER=function(e){return ut.NUMBER(e).length},ut.NUMBER16=function(e){return[28,e>>8&255,255&e]},ct.NUMBER16=pt(3),ut.NUMBER32=function(e){return[29,e>>24&255,e>>16&255,e>>8&255,255&e]},ct.NUMBER32=pt(5),ut.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 s=parseFloat("1e"+((n[2]?+n[2]:0)+n[1].length));t=(Math.round(e*s)/s).toString()}let s="";for(let e=0,n=t.length;e<n;e+=1){const n=t[e];s+="e"===n?"-"===t[++e]?"c":"b":"."===n?"a":"-"===n?"e":n}s+=1&s.length?"f":"ff";const r=[30];for(let e=0,t=s.length;e<t;e+=2)r.push(parseInt(s.substr(e,2),16));return r},ct.REAL=function(e){return ut.REAL(e).length},ut.NAME=ut.CHARARRAY,ct.NAME=ct.CHARARRAY,ut.STRING=ut.CHARARRAY,ct.STRING=ct.CHARARRAY,lt.UTF8=function(e,t,n){const s=[],r=n;for(let n=0;n<r;n++,t+=1)s[n]=e.getUint8(t);return String.fromCharCode.apply(null,s)},lt.UTF16=function(e,t,n){const s=[],r=n/2;for(let n=0;n<r;n++,t+=2)s[n]=e.getUint16(t);return String.fromCharCode.apply(null,s)},ut.UTF16=function(e){const t=[];for(let n=0;n<e.length;n+=1){const s=e.charCodeAt(n);t[t.length]=s>>8&255,t[t.length]=255&s}return t},ct.UTF16=function(e){return 2*e.length};var ht={"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":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"};lt.MACSTRING=function(e,t,n,s){const r=ht[s];if(void 0===r)return;let o="";for(let s=0;s<n;s++){const n=e.getUint8(t+s);o+=n<=127?String.fromCharCode(n):r[127&n]}return o};var ft,dt="function"==typeof WeakMap&&new WeakMap;function gt(e){return e>=-128&&e<=127}function mt(e,t,n){let s=0;const r=e.length;for(;t<r&&s<64&&0===e[t];)++t,++s;return n.push(128|s-1),t}function yt(e,t,n){let s=0;const r=e.length;let o=t;for(;o<r&&s<64;){const t=e[o];if(!gt(t))break;if(0===t&&o+1<r&&0===e[o+1])break;++o,++s}n.push(s-1);for(let s=t;s<o;++s)n.push(e[s]+256&255);return o}function vt(e,t,n){let s=0;const r=e.length;let o=t;for(;o<r&&s<64;){const t=e[o];if(0===t)break;if(gt(t)&&o+1<r&&gt(e[o+1]))break;++o,++s}n.push(64|s-1);for(let s=t;s<o;++s){const t=e[s];n.push(t+65536>>8&255,t+256&255)}return o}ut.MACSTRING=function(e,t){const n=function(e){if(!ft){ft={};for(let e in ht)ft[e]=new String(e)}const t=ft[e];if(void 0===t)return;if(dt){const e=dt.get(t);if(void 0!==e)return e}const n=ht[e];if(void 0===n)return;const s={};for(let e=0;e<n.length;e++)s[n.charCodeAt(e)]=e+128;return dt&&dt.set(t,s),s}(t);if(void 0===n)return;const s=[];for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r>=128&&(r=n[r],void 0===r))return;s[t]=r}return s},ct.MACSTRING=function(e,t){const n=ut.MACSTRING(e,t);return void 0!==n?n.length:0},ut.VARDELTAS=function(e){let t=0;const n=[];for(;t<e.length;){const s=e[t];t=0===s?mt(e,t,n):s>=-128&&s<=127?yt(e,t,n):vt(e,t,n)}return n},ut.INDEX=function(e){let t=1;const n=[t],s=[];for(let r=0;r<e.length;r+=1){const o=ut.OBJECT(e[r]);Array.prototype.push.apply(s,o),t+=o.length,n.push(t)}if(0===s.length)return[0,0];const r=[],o=1+Math.floor(Math.log(t)/Math.log(2))/8|0,a=[void 0,ut.BYTE,ut.USHORT,ut.UINT24,ut.ULONG][o];for(let e=0;e<n.length;e+=1){const t=a(n[e]);Array.prototype.push.apply(r,t)}return Array.prototype.concat(ut.Card16(e.length),ut.OffSize(o),r,s)},ct.INDEX=function(e){return ut.INDEX(e).length},ut.DICT=function(e){let t=[];const n=Object.keys(e),s=n.length;for(let r=0;r<s;r+=1){const s=parseInt(n[r],0),o=e[s],a=ut.OPERAND(o.value,o.type),i=ut.OPERATOR(s);for(let e=0;e<a.length;e++)t.push(a[e]);for(let e=0;e<i.length;e++)t.push(i[e])}return t},ct.DICT=function(e){return ut.DICT(e).length},ut.OPERATOR=function(e){return e<1200?[e]:[12,e-1200]},ut.OPERAND=function(e,t){let n=[];if(Array.isArray(t))for(let s=0;s<t.length;s+=1){at.argument(e.length===t.length,"Not enough arguments given for type"+t);const r=ut.OPERAND(e[s],t[s]);for(let e=0;e<r.length;e++)n.push(r[e])}else if("SID"===t){const t=ut.NUMBER(e);for(let e=0;e<t.length;e++)n.push(t[e])}else if("offset"===t){const t=ut.NUMBER32(e);for(let e=0;e<t.length;e++)n.push(t[e])}else if("number"===t){const t=ut.NUMBER(e);for(let e=0;e<t.length;e++)n.push(t[e])}else{if("real"!==t)throw new Error("Unknown operand type "+t);{const t=ut.REAL(e);for(let e=0;e<t.length;e++)n.push(t[e])}}return n},ut.OP=ut.BYTE,ct.OP=ct.BYTE;var bt="function"==typeof WeakMap&&new WeakMap;function St(e,t,n){if(t&&t.length)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 s=e[t],r=n[s];void 0!==this[s]&&(this[s]=r)}}}function xt(e,t,n){void 0===n&&(n=t.length);const s=new Array(t.length+1);s[0]={name:e+"Count",type:"USHORT",value:n};for(let n=0;n<t.length;n++)s[n+1]={name:e+n,type:"USHORT",value:t[n]};return s}function Tt(e,t,n){const s=t.length,r=new Array(s+1);r[0]={name:e+"Count",type:"USHORT",value:s};for(let o=0;o<s;o++)r[o+1]={name:e+o,type:"TABLE",value:n(t[o],o)};return r}function Ot(e,t,n){const s=t.length;let r=[];r[0]={name:e+"Count",type:"USHORT",value:s};for(let e=0;e<s;e++)r=r.concat(n(t[e],e));return r}function wt(e){1===e.format?St.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:1}].concat(xt("glyph",e.glyphs))):2===e.format?St.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:2}].concat(Ot("rangeRecord",e.ranges,function(e,t){return[{name:"startGlyphID"+t,type:"USHORT",value:e.start},{name:"endGlyphID"+t,type:"USHORT",value:e.end},{name:"startCoverageIndex"+t,type:"USHORT",value:e.index}]}))):at.assert(!1,"Coverage format must be 1 or 2.")}function kt(e){St.call(this,"scriptListTable",Ot("scriptRecord",e,function(e,t){const n=e.script;let s=n.defaultLangSys;return at.assert(!!s,"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 St("scriptTable",[{name:"defaultLangSys",type:"TABLE",value:new St("defaultLangSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:s.reqFeatureIndex}].concat(xt("featureIndex",s.featureIndexes)))}].concat(Ot("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 St("langSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:n.reqFeatureIndex}].concat(xt("featureIndex",n.featureIndexes)))}]})))}]}))}function It(e){St.call(this,"featureListTable",Ot("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 St("featureTable",[{name:"featureParams",type:"USHORT",value:n.featureParams}].concat(xt("lookupListIndex",n.lookupListIndexes)))}]}))}function Rt(e,t){St.call(this,"lookupListTable",Tt("lookup",e,function(e){let n=t[e.lookupType];return at.assert(!!n,"Unable to write GSUB lookup type "+e.lookupType+" tables."),new St("lookupTable",[{name:"lookupType",type:"USHORT",value:e.lookupType},{name:"lookupFlag",type:"USHORT",value:e.lookupFlag}].concat(Tt("subtable",e.subtables,n)))}))}function Ut(e){1===e.format?St.call(this,"classDefTable",[{name:"classFormat",type:"USHORT",value:1},{name:"startGlyphID",type:"USHORT",value:e.startGlyph}].concat(xt("glyph",e.classes))):2===e.format?St.call(this,"classDefTable",[{name:"classFormat",type:"USHORT",value:2}].concat(Ot("rangeRecord",e.ranges,function(e,t){return[{name:"startGlyphID"+t,type:"USHORT",value:e.start},{name:"endGlyphID"+t,type:"USHORT",value:e.end},{name:"class"+t,type:"USHORT",value:e.classId}]}))):at.assert(!1,"Class format must be 1 or 2.")}ut.CHARSTRING=function(e){if(bt){const t=bt.get(e);if(void 0!==t)return t}let t=[];const n=e.length;for(let s=0;s<n;s+=1){const n=e[s],r=ut[n.type](n.value);for(let e=0;e<r.length;e++)t.push(r[e])}return bt&&bt.set(e,t),t},ct.CHARSTRING=function(e){return ut.CHARSTRING(e).length},ut.OBJECT=function(e){const t=ut[e.type];return at.argument(void 0!==t,"No encoding function for type "+e.type),t(e.value)},ct.OBJECT=function(e){const t=ct[e.type];return at.argument(void 0!==t,"No sizeOf function for type "+e.type),t(e.value)},ut.TABLE=function(e){let t=[];const n=(e.fields||[]).length,s=[],r=[];for(let o=0;o<n;o+=1){const n=e.fields[o],a=ut[n.type];at.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);if("TABLE"===n.type)null!==i.fields&&(r.push(t.length),s.push(l)),t.push(0,0);else for(let e=0;e<l.length;e++)t.push(l[e])}for(let n=0;n<s.length;n+=1){const o=r[n],a=t.length;at.argument(a<65536,"Table "+e.tableName+" too big."),t[o]=a>>8,t[o+1]=255&a;for(let e=0;e<s[n].length;e++)t.push(s[n][e])}return t},ct.TABLE=function(e){let t=0;const n=(e.fields||[]).length;for(let s=0;s<n;s+=1){const n=e.fields[s],r=ct[n.type];at.argument(void 0!==r,"No sizeOf function for field type "+n.type+" ("+n.name+")");let o=e[n.name];void 0===o&&(o=n.value),t+=r(o),"TABLE"===n.type&&(t+=2)}return t},ut.RECORD=ut.TABLE,ct.RECORD=ct.TABLE,ut.LITERAL=function(e){return e},ct.LITERAL=function(e){return e.length},St.prototype.encode=function(){return ut.TABLE(this)},St.prototype.sizeOf=function(){return ct.TABLE(this)},wt.prototype=Object.create(St.prototype),wt.prototype.constructor=wt,kt.prototype=Object.create(St.prototype),kt.prototype.constructor=kt,It.prototype=Object.create(St.prototype),It.prototype.constructor=It,Rt.prototype=Object.create(St.prototype),Rt.prototype.constructor=Rt,Ut.prototype=Object.create(St.prototype),Ut.prototype.constructor=Ut;var Lt={Table:St,Record:St,Coverage:wt,ClassDef:Ut,ScriptList:kt,FeatureList:It,LookupList:Rt,ushortList:xt,tableList:Tt,recordList:Ot};function Ct(e,t){return e.getUint8(t)}function Et(e,t){return e.getUint16(t,!1)}function Dt(e,t){return(e.getUint16(t)<<8)+e.getUint8(t+2)}function Ft(e,t){return e.getUint32(t,!1)}function Mt(e,t){return e.getInt16(t,!1)+e.getUint16(t+2,!1)/65535}var At={byte:1,uShort:2,f2dot14:2,short:2,uInt24:3,uLong:4,fixed:4,longDateTime:8,tag:4},Nt=32768,Pt=32767,Bt=32768,Gt=4095,_t=32768,Ht=16384,Vt=8192,zt=4095,qt=128,jt=127,Wt=128,$t=64,Xt=63,Yt=15,Zt=48;function Qt(e,t){this.data=e,this.offset=t,this.relativeOffset=0}Qt.prototype.parseByte=function(){const e=this.data.getUint8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},Qt.prototype.parseChar=function(){const e=this.data.getInt8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},Qt.prototype.parseCard8=Qt.prototype.parseByte,Qt.prototype.parseUShort=function(){const e=this.data.getUint16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},Qt.prototype.parseCard16=Qt.prototype.parseUShort,Qt.prototype.parseSID=Qt.prototype.parseUShort,Qt.prototype.parseOffset16=Qt.prototype.parseUShort,Qt.prototype.parseShort=function(){const e=this.data.getInt16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},Qt.prototype.parseF2Dot14=function(){const e=this.data.getInt16(this.offset+this.relativeOffset)/16384;return this.relativeOffset+=2,e},Qt.prototype.parseUInt24=function(){const e=Dt(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=3,e},Qt.prototype.parseULong=function(){const e=Ft(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},Qt.prototype.parseLong=function(){const e=(t=this.data,n=this.offset+this.relativeOffset,t.getInt32(n,!1));var t,n;return this.relativeOffset+=4,e},Qt.prototype.parseOffset32=Qt.prototype.parseULong,Qt.prototype.parseFixed=function(){const e=Mt(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},Qt.prototype.parseString=function(e){const t=this.data,n=this.offset+this.relativeOffset;let s="";this.relativeOffset+=e;for(let r=0;r<e;r++)s+=String.fromCharCode(t.getUint8(n+r));return s},Qt.prototype.parseTag=function(){return this.parseString(4)},Qt.prototype.parseLongDateTime=function(){let e=Ft(this.data,this.offset+this.relativeOffset+4);return e-=2082844800,this.relativeOffset+=8,e},Qt.prototype.parseVersion=function(e){const t=Et(this.data,this.offset+this.relativeOffset),n=Et(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,void 0===e&&(e=4096),t+n/e/10},Qt.prototype.skip=function(e,t){void 0===t&&(t=1),this.relativeOffset+=At[e]*t},Qt.prototype.parseULongList=function(e){void 0===e&&(e=this.parseULong());const t=new Array(e),n=this.data;let s=this.offset+this.relativeOffset;for(let r=0;r<e;r++)t[r]=n.getUint32(s),s+=4;return this.relativeOffset+=4*e,t},Qt.prototype.parseOffset16List=Qt.prototype.parseUShortList=function(e){void 0===e&&(e=this.parseUShort());const t=new Array(e),n=this.data;let s=this.offset+this.relativeOffset;for(let r=0;r<e;r++)t[r]=n.getUint16(s),s+=2;return this.relativeOffset+=2*e,t},Qt.prototype.parseShortList=function(e){const t=new Array(e),n=this.data;let s=this.offset+this.relativeOffset;for(let r=0;r<e;r++)t[r]=n.getInt16(s),s+=2;return this.relativeOffset+=2*e,t},Qt.prototype.parseByteList=function(e){const t=new Array(e),n=this.data;let s=this.offset+this.relativeOffset;for(let r=0;r<e;r++)t[r]=n.getUint8(s++);return this.relativeOffset+=e,t},Qt.prototype.parseList=function(e,t){t||(t=e,e=this.parseUShort());const n=new Array(e);for(let s=0;s<e;s++)n[s]=t.call(this);return n},Qt.prototype.parseList32=function(e,t){t||(t=e,e=this.parseULong());const n=new Array(e);for(let s=0;s<e;s++)n[s]=t.call(this);return n},Qt.prototype.parseRecordList=function(e,t){t||(t=e,e=this.parseUShort());const n=new Array(e),s=Object.keys(t);for(let r=0;r<e;r++){const e={};for(let n=0;n<s.length;n++){const r=s[n],o=t[r];e[r]=o.call(this)}n[r]=e}return n},Qt.prototype.parseRecordList32=function(e,t){t||(t=e,e=this.parseULong());const n=new Array(e),s=Object.keys(t);for(let r=0;r<e;r++){const e={};for(let n=0;n<s.length;n++){const r=s[n],o=t[r];e[r]=o.call(this)}n[r]=e}return n},Qt.prototype.parseTupleRecords=function(e,t){let n=[];for(let s=0;s<e;s++){let e=[];for(let n=0;n<t;n++)e.push(this.parseF2Dot14());n.push(e)}return n},Qt.prototype.parseStruct=function(e){if("function"==typeof e)return e.call(this);{const t=Object.keys(e),n={};for(let s=0;s<t.length;s++){const r=t[s],o=e[r];n[r]=o.call(this)}return n}},Qt.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},Qt.prototype.parseValueRecordList=function(){const e=this.parseUShort(),t=this.parseUShort(),n=new Array(t);for(let s=0;s<t;s++)n[s]=this.parseValueRecord(e);return n},Qt.prototype.parsePointer=function(e){const t=this.parseOffset16();if(t>0)return new Qt(this.data,this.offset+t).parseStruct(e)},Qt.prototype.parsePointer32=function(e){const t=this.parseOffset32();if(t>0)return new Qt(this.data,this.offset+t).parseStruct(e)},Qt.prototype.parseListOfLists=function(e){const t=this.parseOffset16List(),n=t.length,s=this.relativeOffset,r=new Array(n);for(let s=0;s<n;s++){const n=t[s];if(0!==n)if(this.relativeOffset=n,e){const t=this.parseOffset16List(),o=new Array(t.length);for(let s=0;s<t.length;s++)this.relativeOffset=n+t[s],o[s]=e.call(this);r[s]=o}else r[s]=this.parseUShortList();else r[s]=void 0}return this.relativeOffset=s,r},Qt.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.")},Qt.prototype.parseClassDef=function(){const e=this.offset+this.relativeOffset,t=this.parseUShort();return 1===t?{format:1,startGlyph:this.parseUShort(),classes:this.parseUShortList()}:2===t?{format:2,ranges:this.parseRecordList({start:Qt.uShort,end:Qt.uShort,classId:Qt.uShort})}:(console.warn(`0x${e.toString(16)}: This font file uses an invalid ClassDef format of ${t}. It might be corrupted and should be reacquired if it doesn't display as intended.`),{format:t})},Qt.list=function(e,t){return function(){return this.parseList(e,t)}},Qt.list32=function(e,t){return function(){return this.parseList32(e,t)}},Qt.recordList=function(e,t){return function(){return this.parseRecordList(e,t)}},Qt.recordList32=function(e,t){return function(){return this.parseRecordList32(e,t)}},Qt.pointer=function(e){return function(){return this.parsePointer(e)}},Qt.pointer32=function(e){return function(){return this.parsePointer32(e)}},Qt.tag=Qt.prototype.parseTag,Qt.byte=Qt.prototype.parseByte,Qt.uShort=Qt.offset16=Qt.prototype.parseUShort,Qt.uShortList=Qt.prototype.parseUShortList,Qt.uInt24=Qt.prototype.parseUInt24,Qt.uLong=Qt.offset32=Qt.prototype.parseULong,Qt.uLongList=Qt.prototype.parseULongList,Qt.fixed=Qt.prototype.parseF