textmode.js 0.1.6-beta.5 → 0.1.6-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/textmode.esm.js +1845 -0
- package/dist/textmode.esm.min.js +1844 -0
- package/dist/textmode.umd.js +26 -0
- package/dist/textmode.umd.min.js +25 -0
- package/dist/types/ColorPalette.d.ts +1 -5
- package/dist/types/Textmode.d.ts +0 -10
- package/dist/types/export/image/ImageDataExtractor.d.ts +1 -1
- package/dist/types/export/image/ImageExporter.d.ts +1 -1
- package/dist/types/export/image/ImageFileHandler.d.ts +1 -7
- package/dist/types/export/svg/SVGContentGenerator.d.ts +1 -1
- package/dist/types/export/svg/SVGDataExtractor.d.ts +1 -1
- package/dist/types/export/svg/SVGPathGenerator.d.ts +0 -5
- package/dist/types/export/txt/TXTDataExtractor.d.ts +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/textmode/Canvas.d.ts +0 -11
- package/dist/types/textmode/ConversionPipeline.d.ts +12 -9
- package/dist/types/textmode/Grid.d.ts +1 -6
- package/dist/types/textmode/Textmodifier.d.ts +5 -25
- package/dist/types/textmode/converters/FeatureConverter.d.ts +24 -0
- package/dist/types/textmode/mixins/ConversionMixin.d.ts +63 -0
- package/dist/types/textmode/mixins/ExportMixin.d.ts +112 -1
- package/dist/types/textmode/mixins/FontMixin.d.ts +1 -1
- package/dist/types/textmode/mixins/RenderingMixin.d.ts +304 -1
- package/dist/types/textmode/mixins/{MixinBase.d.ts → TextmodifierMixin.d.ts} +4 -4
- package/dist/types/textmode/mixins/index.d.ts +2 -1
- package/package.json +16 -2
- package/dist/textmode.js +0 -26
- package/dist/textmode.min.js +0 -25
- package/dist/types/types/index.d.ts +0 -4
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
var UA=Object.defineProperty;var FA=(I,P,b)=>P in I?UA(I,P,{enumerable:!0,configurable:!0,writable:!0,value:b}):I[P]=b;var g=(I,P,b)=>FA(I,typeof P!="symbol"?P+"":P,b);var A,t;A=this,t=function(I){class P extends Error{constructor(B,s,Q={}){super(P.t(B,Q));g(this,"A");g(this,"context");this.name="TextmodeError",this.A=s,this.context=Q}static t(B,s){let Q=B;if(s&&Object.keys(s).length>0){Q+=`
|
|
2
|
+
|
|
3
|
+
📋 Context:`;for(const[i,E]of Object.entries(s))Q+=`
|
|
4
|
+
- ${i}: ${P.i(E)}`}return Q+=`
|
|
5
|
+
|
|
6
|
+
`,Q+="↓".repeat(24)+`
|
|
7
|
+
`,Q}static i(B){if(B===null)return"null";if(B===void 0)return"undefined";if(typeof B=="string")return`"${B}"`;if(typeof B=="number"||typeof B=="boolean")return B+"";if(Array.isArray(B))return B.length===0?"[]":B.length<=5?`[${B.map(s=>P.i(s)).join(", ")}]`:`[${B.slice(0,3).map(s=>P.i(s)).join(", ")}, ... +${B.length-3} more]`;if(typeof B=="object"){const s=Object.keys(B);return s.length===0?"{}":s.length<=3?`{ ${s.map(Q=>`${Q}: ${P.i(B[Q])}`).join(", ")} }`:`{ ${s.slice(0,2).map(Q=>`${Q}: ${P.i(B[Q])}`).join(", ")}, ... +${s.length-2} more }`}return B+""}}var b=(o=>(o[o.SILENT=0]="SILENT",o[o.WARNING=1]="WARNING",o[o.ERROR=2]="ERROR",o[o.THROW=3]="THROW",o))(b||{});const _=class _{constructor(){g(this,"h",{D:3})}static l(){return _.o||(_.o=new _),_.o}C(e,B,s){const Q="%c[textmode.js] Oops! (╯°□°)╯︵ Something went wrong in your code.",i="color: #f44336; font-weight: bold; background: #ffebee; padding: 2px 6px; border-radius: 3px;";switch(this.h.D){case 0:return!1;case 1:return console.group(Q,i),console.warn(P.t(e,B)),console.groupEnd(),!1;case 2:return console.group(Q,i),console.error(P.t(e,B)),console.groupEnd(),!1;default:throw new P(e,s,B)}}validate(e,B,s){return!!e||(this.C(B,s),!1)}u(e){this.h.D=e}};g(_,"o",null);let k=_;const d=k.l(),N=new WeakMap;function F(o,e){N.set(o,e)}function J(o){return N.get(o)}class X{constructor(e,B,s=B,Q={}){g(this,"P");g(this,"I");g(this,"m");g(this,"p");g(this,"v");g(this,"options");g(this,"_",null);g(this,"M",null);this.P=e,this.p=B,this.v=s,this.options={filter:"nearest",wrap:"clamp",format:"rgba",type:"unsigned_byte",...Q},this.m=this.createTexture(),this.I=e.createFramebuffer(),this.G()}F(e){const{P:B}=this,s=B.getParameter(B.FRAMEBUFFER_BINDING);B.bindFramebuffer(B.FRAMEBUFFER,this.I);try{return e()}finally{B.bindFramebuffer(B.FRAMEBUFFER,s)}}createTexture(){const{P:e}=this,B=e.createTexture();e.bindTexture(e.TEXTURE_2D,B);const s=this.options.filter==="linear"?e.LINEAR:e.NEAREST,Q=this.options.wrap==="repeat"?e.REPEAT:e.CLAMP_TO_EDGE;return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,s),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,s),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,Q),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,Q),this.Y(),B}Y(){const{P:e}=this,B=this.options.type==="float"?e.FLOAT:e.UNSIGNED_BYTE;e.texImage2D(e.TEXTURE_2D,0,e.RGBA,this.p,this.v,0,e.RGBA,B,null)}G(){const{P:e}=this;e.bindFramebuffer(e.FRAMEBUFFER,this.I),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.m,0),e.bindFramebuffer(e.FRAMEBUFFER,null)}update(e){const{P:B}=this;B.bindTexture(B.TEXTURE_2D,this.m),B.pixelStorei(B.UNPACK_FLIP_Y_WEBGL,1),B.texImage2D(B.TEXTURE_2D,0,B.RGBA,B.RGBA,B.UNSIGNED_BYTE,e),B.bindTexture(B.TEXTURE_2D,null)}S(e,B,s){const{P:Q}=this;Q.bindTexture(Q.TEXTURE_2D,this.m),Q.texImage2D(Q.TEXTURE_2D,0,Q.RGBA,B,s,0,Q.RGBA,Q.UNSIGNED_BYTE,e),Q.bindTexture(Q.TEXTURE_2D,null)}resize(e,B){const{P:s}=this;this.p=e,this.v=B,this.M=null,s.bindTexture(s.TEXTURE_2D,this.m),this.Y(),s.bindTexture(s.TEXTURE_2D,null)}O(){const{P:e}=this;this._={framebuffer:e.getParameter(e.FRAMEBUFFER_BINDING),viewport:e.getParameter(e.VIEWPORT)},e.bindFramebuffer(e.FRAMEBUFFER,this.I),e.viewport(0,0,this.p,this.v),F(e,[0,0,this.p,this.v])}end(){if(!this._)return;const{P:e}=this;e.bindFramebuffer(e.FRAMEBUFFER,this._.framebuffer),e.viewport(...this._.viewport),F(e,this._.viewport),this._=null}U(){const{P:e}=this;this.M||(this.M=new Uint8Array(this.p*this.v*4)),this.F(()=>{e.readPixels(0,0,this.p,this.v,e.RGBA,e.UNSIGNED_BYTE,this.M)})}get(e,B,s,Q){const{P:i}=this;if(e===void 0&&B===void 0){const E=new Uint8Array(this.p*this.v*4);return this.F(()=>(i.readPixels(0,0,this.p,this.v,i.RGBA,i.UNSIGNED_BYTE,E),E))}if(s===void 0&&Q===void 0){(e<0||B<0||e>=this.p||B>=this.v)&&(console.warn("The x and y values passed to Framebuffer.get are outside of its range and will be clamped."),e=Math.max(0,Math.min(e,this.p-1)),B=Math.max(0,Math.min(B,this.v-1)));const E=new Uint8Array(4);return this.F(()=>(i.readPixels(e,B,1,1,i.RGBA,i.UNSIGNED_BYTE,E),[E[0],E[1],E[2],E[3]]))}{e=Math.max(0,Math.min(e,this.p-1)),B=Math.max(0,Math.min(B,this.v-1)),s=Math.max(1,Math.min(s,this.p-e)),Q=Math.max(1,Math.min(Q,this.v-B));const E=new Uint8Array(s*Q*4);return this.F(()=>(i.readPixels(e,B,s,Q,i.RGBA,i.UNSIGNED_BYTE,E),E))}}dispose(){this.I&&this.P.deleteFramebuffer(this.I),this.m&&this.P.deleteTexture(this.m)}get framebuffer(){return this.I}get texture(){return this.m}get width(){return this.p}get height(){return this.v}get k(){return this.M}}class v{constructor(e,B,s){g(this,"P");g(this,"V");g(this,"H",new Map);g(this,"R",new Map);g(this,"$",0);g(this,"J");this.P=e,this.V=this.createProgram(B,s),this.J=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),this.L()}L(){const e=this.P.getProgramParameter(this.V,this.P.ACTIVE_UNIFORMS);for(let B=0;B<e;B++){const s=this.P.getActiveUniform(this.V,B);if(s){const Q=this.P.getUniformLocation(this.V,s.name);Q&&(this.H.set(s.name,Q),this.R.set(s.name,s.type))}}}createProgram(e,B){const s=this.createShader(this.P.VERTEX_SHADER,e),Q=this.createShader(this.P.FRAGMENT_SHADER,B),i=this.P.createProgram();if(this.P.attachShader(i,s),this.P.attachShader(i,Q),this.P.linkProgram(i),!this.P.getProgramParameter(i,this.P.LINK_STATUS)){const E=this.P.getProgramInfoLog(i);throw Error("Shader program link error: "+E)}return this.P.deleteShader(s),this.P.deleteShader(Q),i}createShader(e,B){const s=this.P.createShader(e);if(this.P.shaderSource(s,B),this.P.compileShader(s),!this.P.getShaderParameter(s,this.P.COMPILE_STATUS)){const Q=this.P.getShaderInfoLog(s);throw this.P.deleteShader(s),Error("Shader compilation error: "+Q)}return s}K(){this.P.useProgram(this.V),this.W()}j(e,B){const s=this.H.get(e);if(s)if(typeof B=="number")this.Z(e)?this.P.uniform1i(s,Math.floor(B)):this.P.uniform1f(s,B);else if(typeof B=="boolean")this.P.uniform1i(s,B?1:0);else if(Array.isArray(B))switch(B.length){case 2:this.P.uniform2f(s,B[0],B[1]);break;case 3:this.P.uniform3f(s,B[0],B[1],B[2]);break;case 4:this.P.uniform4f(s,B[0],B[1],B[2],B[3]);break;default:console.warn(`Unsupported array length ${B.length} for uniform '${e}'`)}else if(B instanceof WebGLTexture){const Q=this.N();this.P.uniform1i(s,Q),this.P.activeTexture(this.P.TEXTURE0+Q),this.P.bindTexture(this.P.TEXTURE_2D,B)}else if(B instanceof X){const Q=this.N();this.P.uniform1i(s,Q),this.P.activeTexture(this.P.TEXTURE0+Q),this.P.bindTexture(this.P.TEXTURE_2D,B.texture)}else console.warn(`Unsupported uniform type for '${e}':`,typeof B)}N(){return this.$>=this.J&&console.warn(`Exceeded maximum texture units (${this.J}). Texture may not render correctly.`),this.$++}Z(e){const B=this.R.get(e);return!!B&&(B===this.P.INT||B===this.P.INT_VEC2||B===this.P.INT_VEC3||B===this.P.INT_VEC4||B===this.P.SAMPLER_2D||B===this.P.SAMPLER_CUBE)}get X(){return this.V}dispose(){this.P.deleteProgram(this.V)}W(){this.$=0}}class W{constructor(e){g(this,"P");g(this,"q",null);g(this,"AA",16);g(this,"tA",new Map);this.P=e}eA(){if(this.q)return;const e=this.P;this.q=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,this.q)}BA(){const e=this.P,B=e.getParameter(e.CURRENT_PROGRAM);let s=this.tA.get(B);return s||(s={QA:e.getAttribLocation(B,"a_position"),sA:e.getAttribLocation(B,"a_texCoord")},this.tA.set(B,s)),e.enableVertexAttribArray(s.QA),e.vertexAttribPointer(s.QA,2,e.FLOAT,!1,this.AA,0),e.enableVertexAttribArray(s.sA),e.vertexAttribPointer(s.sA,2,e.FLOAT,!1,this.AA,8),{iA:s.QA,EA:s.sA}}rA(e,B){const s=this.P;s.disableVertexAttribArray(e),s.disableVertexAttribArray(B)}gA(e,B){const s=this.P,Q=J(s)||[0,0,s.canvas.width,s.canvas.height];return{oA:e/Q[2]*2-1,nA:1-B/Q[3]*2}}hA(e,B,s,Q){const i=this.P;this.eA(),i.bindBuffer(i.ARRAY_BUFFER,this.q);const E=new Float32Array([e,Q,0,0,s,Q,1,0,e,B,0,1,e,B,0,1,s,Q,1,0,s,B,1,1]);i.bufferData(i.ARRAY_BUFFER,E,i.DYNAMIC_DRAW)}dispose(){this.q&&this.P.deleteBuffer(this.q)}}class QA extends W{constructor(e){super(e)}aA(e,B,s,Q){const i=this.gA(e,B),E=this.gA(e+s,B+Q);this.hA(i.oA,i.nA,E.oA,E.nA);const r=this.BA();this.P.drawArrays(this.P.TRIANGLES,0,6),this.rA(r.iA,r.EA)}DA(e,B,s,Q,i){this.aA(e,B,s,i),this.aA(e+s-i,B,i,Q),this.aA(e,B+Q-i,s,i),this.aA(e,B,i,Q)}}class iA extends W{constructor(e){super(e)}draw(e,B,s,Q,i){const E=s-e,r=Q-B,n=Math.hypot(E,r);if(n===0){const a=i/2,D=this.gA(e-a,B-a),l=this.gA(e+a,B+a);this.hA(D.oA,D.nA,l.oA,l.nA)}else{const a=-r/n,D=E/n,l=i/2,u=e+a*l,w=B+D*l,c=e-a*l,f=B-D*l,p=s+a*l,m=Q+D*l,y=s-a*l,M=Q-D*l,O=this.gA(u,w),T=this.gA(c,f),R=this.gA(p,m),sA=this.gA(y,M),U=this.P;this.eA(),U.bindBuffer(U.ARRAY_BUFFER,this.q);const GA=new Float32Array([O.oA,O.nA,0,0,T.oA,T.nA,0,1,R.oA,R.nA,1,0,T.oA,T.nA,0,1,sA.oA,sA.nA,1,1,R.oA,R.nA,1,0]);U.bufferData(U.ARRAY_BUFFER,GA,U.DYNAMIC_DRAW)}const h=this.BA();this.P.drawArrays(this.P.TRIANGLES,0,6),this.rA(h.iA,h.EA)}}var x="attribute vec2 a_position;attribute vec2 a_texCoord;varying vec2 v_uv;uniform float u_rotation;uniform vec2 u_center;uniform float u_aspectRatio;mat2 rotate2D(float angle){float s=sin(angle);float c=cos(angle);return mat2(c,-s,s,c);}void main(){v_uv=a_texCoord;vec2 pos=a_position;pos-=u_center;pos.x*=u_aspectRatio;pos=rotate2D(-u_rotation)*pos;pos.x/=u_aspectRatio;pos+=u_center;gl_Position=vec4(pos,0.0,1.0);}";class EA{constructor(e){g(this,"P");g(this,"lA");g(this,"CA");g(this,"cA",null);g(this,"uA");g(this,"PA");g(this,"IA",[1,1,1,1]);g(this,"wA",!0);g(this,"fA",[0,0,0,1]);g(this,"dA",1);g(this,"mA",!0);g(this,"pA",0);g(this,"vA",[]);this.P=e,this.lA=new v(this.P,x,"precision lowp float;uniform sampler2D u_texture;varying vec2 v_uv;void main(){gl_FragColor=texture2D(u_texture,v_uv);}"),this.CA=new v(this.P,x,"precision lowp float;uniform vec4 u_color;void main(){gl_FragColor=u_color;}"),this.uA=new QA(this.P),this.PA=new iA(this.P),this.P.enable(this.P.BLEND),this.P.blendEquation(this.P.FUNC_ADD),this.P.blendFunc(this.P.ONE,this.P.ONE_MINUS_SRC_ALPHA),F(this.P,[0,0,this.P.canvas.width,this.P.canvas.height])}bA(e){this.cA!==e&&(this.cA=e,e.K())}fill(e,B,s,Q){if(this.wA=!0,B===void 0&&s===void 0&&Q===void 0){const i=e/255;this.IA=[i,i,i,1]}else if(s!==void 0&&Q===void 0)this.IA=[e/255,B/255,s/255,1];else{if(s===void 0||Q===void 0)throw Error("Invalid fill parameters. Use fill(gray), fill(r,g,b), or fill(r,g,b,a)");this.IA=[e/255,B/255,s/255,Q/255]}}stroke(e,B,s,Q){if(this.mA=!0,B===void 0&&s===void 0&&Q===void 0){const i=e/255;this.fA=[i,i,i,1]}else if(s!==void 0&&Q===void 0)this.fA=[e/255,B/255,s/255,1];else{if(s===void 0||Q===void 0)throw Error("Invalid stroke parameters. Use stroke(gray), stroke(r,g,b), or stroke(r,g,b,a)");this.fA=[e/255,B/255,s/255,Q/255]}}xA(e){if(e<0)throw Error("Stroke weight must be non-negative");this.dA=e}_A(){this.mA=!1}yA(){this.wA=!1}rotate(e){this.pA=e}push(){this.vA.push({MA:[...this.IA],wA:this.wA,GA:[...this.fA],xA:this.dA,mA:this.mA,rotation:this.pA})}pop(){const e=this.vA.pop();e?(this.IA=e.MA,this.wA=e.wA,this.fA=e.GA,this.dA=e.xA,this.mA=e.mA,this.pA=e.rotation):console.warn("pop() called without matching push()")}reset(){this.cA=null,this.vA=[],this.pA=0}createShader(e,B){return new v(this.P,e,B)}FA(e){return new v(this.P,x,e)}j(e,B){this.cA.j(e,B)}rect(e,B,s,Q){if(this.cA!==null){const{YA:D,TA:l,SA:u,aspectRatio:w}=this.OA(e,B,s,Q);return this.j("u_rotation",u),this.j("u_center",[D,l]),this.j("u_aspectRatio",w),this.uA.aA(e,B,s,Q),void(this.cA=null)}const i=this.CA;let E=0,r=0,n=0,h=1;const a=this.OA(e,B,s,Q);E=a.YA,r=a.TA,n=a.SA,h=a.aspectRatio,this.wA&&(this.bA(i),this.j("u_color",this.IA),this.j("u_rotation",n),this.j("u_center",[E,r]),this.j("u_aspectRatio",h),this.uA.aA(e,B,s,Q)),this.mA&&this.dA>0&&(this.bA(i),this.j("u_color",this.fA),this.j("u_rotation",n),this.j("u_center",[E,r]),this.j("u_aspectRatio",h),this.uA.DA(e,B,s,Q,this.dA)),this.cA=null}line(e,B,s,Q){if(this.cA!==null){const c=(e+s)/2,f=(B+Q)/2,p=Math.abs(s-e)||1,m=Math.abs(Q-B)||1,{YA:y,TA:M,SA:O,aspectRatio:T}=this.OA(c-p/2,f-m/2,p,m);this.j("u_rotation",O),this.j("u_center",[y,M]),this.j("u_aspectRatio",T);const R=this.dA>0?this.dA:1;return this.PA.draw(e,B,s,Q,R),void(this.cA=null)}if(!this.mA||this.dA<=0)return;const i=this.CA,E=(e+s)/2,r=(B+Q)/2,n=Math.abs(s-e)||1,h=Math.abs(Q-B)||1,a=this.pA!==0;let D=0,l=0,u=0,w=1;if(a){const c=this.OA(E-n/2,r-h/2,n,h);D=c.YA,l=c.TA,u=c.SA,w=c.aspectRatio}this.bA(i),this.j("u_color",this.fA),a&&(this.j("u_rotation",u),this.j("u_center",[D,l]),this.j("u_aspectRatio",w)),this.PA.draw(e,B,s,Q,this.dA)}OA(e,B,s,Q){const i=J(this.P)||[0,0,this.P.canvas.width,this.P.canvas.height],E=i[2],r=i[3],n=E/r;return{YA:(e+s/2)/E*2-1,TA:1-(B+Q/2)/r*2,SA:this.pA*Math.PI/180,aspectRatio:n}}createFramebuffer(e,B,s={}){return new X(this.P,e,B,s)}background(e,B=e,s=e,Q=255){this.clear(e/255,B/255,s/255,Q/255)}clear(e=0,B=0,s=0,Q=0){this.P.clearColor(e,B,s,Q),this.P.clear(this.P.COLOR_BUFFER_BIT)}UA(){this.P.viewport(0,0,this.P.canvas.width,this.P.canvas.height),F(this.P,[0,0,this.P.canvas.width,this.P.canvas.height])}get context(){return this.P}dispose(){this.lA.dispose(),this.CA.dispose(),this.uA.dispose(),this.PA.dispose()}image(e,B,s,Q,i){const E=this.P,r=Q??e.width,n=i??e.height;this.bA(this.lA),this.j("u_texture",e.texture);const h=this.OA(B,s,r,n);this.j("u_rotation",h.SA),this.j("u_center",[h.YA,h.TA]),this.j("u_aspectRatio",h.aspectRatio),this.uA.aA(B,s,r,n),E.bindTexture(E.TEXTURE_2D,null),this.cA=null}}var S,C={parse:function(o){var e=function(B,s,Q,i){var E=C.T,r={cmap:E.cmap,head:E.head,hhea:E.hhea,maxp:E.maxp,hmtx:E.hmtx,loca:E.loca,glyf:E.glyf},n={_data:B,_index:s,_offset:Q};for(var h in r){var a=C.findTable(B,h,Q);if(a){var D=a[0],l=i[D];l==null&&(l=r[h].kA(B,D,a[1],n)),n[h]=i[D]=l}}return n}(new Uint8Array(o),0,0,{});return[e]},findTable:function(o,e,B){for(var s=C.B,Q=s.VA(o,B+4),i=B+12,E=0;E<Q;E++){var r=s.HA(o,i,4);s.RA(o,i+4);var n=s.RA(o,i+8),h=s.RA(o,i+12);if(r==e)return[n,h];i+=16}return null},T:{}};C.B={$A:function(o,e){return C.B.zA.uint16[0]=o[e]<<8|o[e+1],C.B.zA.int16[0]},VA:function(o,e){return o[e]<<8|o[e+1]},JA:function(o,e,B){for(var s=[],Q=0;Q<B;Q++)s.push(C.B.VA(o,e+2*Q));return s},RA:function(o,e){var B=C.B.zA.uint8;return B[3]=o[e],B[2]=o[e+1],B[1]=o[e+2],B[0]=o[e+3],C.B.zA.uint32[0]},HA:function(o,e,B){for(var s="",Q=0;Q<B;Q++)s+=String.fromCharCode(o[e+Q]);return s},zA:(S=new ArrayBuffer(8),{uint8:new Uint8Array(S),int16:new Int16Array(S),uint16:new Uint16Array(S),uint32:new Uint32Array(S)})},C.T.cmap={kA:function(o,e,B){var s={LA:[],KA:{},off:e};o=new Uint8Array(o.buffer,e,B),e=0;var Q=C.B,i=Q.VA,E=C.T.cmap;i(o,e);var r=i(o,e+=2);e+=2;for(var n=[],h=0;h<r;h++){var a=i(o,e),D=i(o,e+=2);e+=2;var l=Q.RA(o,e);e+=4;var u="p"+a+"e"+D,w=n.indexOf(l);if(w==-1){w=s.LA.length;var c={};n.push(l);var f=c.format=i(o,l);f==4?c=E.WA(o,l,c):f==12&&(c=E.jA(o,l,c)),s.LA.push(c)}s.KA[u]!=null&&console.log("multiple tables for one platform+encoding: "+u),s.KA[u]=w}return s},WA:function(o,e,B){var s=C.B,Q=s.VA,i=s.JA,E=e,r=Q(o,e+=2);Q(o,e+=2);var n=Q(o,e+=2);e+=2;var h=n>>>1;B.ZA=Q(o,e),e+=2,B.NA=Q(o,e),e+=2,B.XA=Q(o,e),e+=2,B.qA=i(o,e,h),e+=2*h,e+=2,B.At=i(o,e,h),e+=2*h,B.tt=[];for(var a=0;a<h;a++)B.tt.push(s.$A(o,e)),e+=2;return B.et=i(o,e,h),e+=2*h,B.Bt=i(o,e,E+r-e>>1),B},jA:function(o,e,B){var s=C.B.RA;s(o,e+=4),s(o,e+=4);var Q=3*s(o,e+=4);e+=4;for(var i=B.groups=new Uint32Array(Q),E=0;E<Q;E+=3)i[E]=s(o,e+(E<<2)),i[E+1]=s(o,e+(E<<2)+4),i[E+2]=s(o,e+(E<<2)+8);return B}},C.T.head={kA:function(o,e,B){var s=C.B,Q={};return e+=18,Q.unitsPerEm=s.VA(o,e),e+=2,e+=16,Q.xMin=s.$A(o,e),e+=2,Q.yMin=s.$A(o,e),e+=2,Q.xMax=s.$A(o,e),e+=2,Q.yMax=s.$A(o,e),e+=2,e+=6,Q.indexToLocFormat=s.$A(o,e),Q}},C.T.hhea={kA:function(o,e,B){var s=C.B,Q={};e+=4;for(var i=["ascender","descender","lineGap","advanceWidthMax","minLeftSideBearing","minRightSideBearing","xMaxExtent","caretSlopeRise","caretSlopeRun","caretOffset","res0","res1","res2","res3","metricDataFormat","numberOfHMetrics"],E=0;E<i.length;E++){var r=i[E],n=r=="advanceWidthMax"||r=="numberOfHMetrics"?s.VA:s.$A;Q[r]=n(o,e+2*E)}return Q}},C.T.hmtx={kA:function(o,e,B,s){for(var Q=C.B,i=[],E=[],r=s.maxp.numGlyphs,n=s.hhea.numberOfHMetrics,h=0,a=0,D=0;D<n;)h=Q.VA(o,e+(D<<2)),a=Q.$A(o,e+(D<<2)+2),i.push(h),E.push(a),D++;for(;D<r;)i.push(h),E.push(a),D++;return{Qt:i,st:E}}},C.T.maxp={kA:function(o,e,B){var s=C.B,Q=s.VA,i={};return s.RA(o,e),e+=4,i.numGlyphs=Q(o,e),e+=2,i}},C.T.loca={kA:function(o,e,B,s){var Q=C.B,i=[],E=s.head.indexToLocFormat,r=s.maxp.numGlyphs+1;if(E==0)for(var n=0;n<r;n++)i.push(Q.VA(o,e+(n<<1))<<1);if(E==1)for(n=0;n<r;n++)i.push(Q.RA(o,e+(n<<2)));return i}},C.T.glyf={kA:function(o,e,B,s){for(var Q=[],i=s.maxp.numGlyphs,E=0;E<i;E++)Q.push(null);return Q},it:function(o,e){var B=C.B,s=o._data,Q=o.loca;if(Q[e]==Q[e+1])return null;var i=C.findTable(s,"glyf",o._offset)[0]+Q[e],E={};if(E.Et=B.$A(s,i),i+=2,E.xMin=B.$A(s,i),i+=2,E.yMin=B.$A(s,i),i+=2,E.xMax=B.$A(s,i),i+=2,E.yMax=B.$A(s,i),i+=2,E.xMin>=E.xMax||E.yMin>=E.yMax)return null;if(E.Et>0){E.rt=[];for(var r=0;r<E.Et;r++)E.rt.push(B.VA(s,i)),i+=2;var n=B.VA(s,i);if(i+=2,s.length-i<n)return null;i+=n;var h=E.rt[E.Et-1]+1;for(E.flags=[],r=0;r<h;r++){var a=s[i];if(i++,E.flags.push(a),8&a){var D=s[i];i++;for(var l=0;l<D;l++)E.flags.push(a),r++}}for(E.gt=[],r=0;r<h;r++){var u=!!(2&E.flags[r]),w=!!(16&E.flags[r]);u?(E.gt.push(w?s[i]:-s[i]),i++):w?E.gt.push(0):(E.gt.push(B.$A(s,i)),i+=2)}for(E.ot=[],r=0;r<h;r++)u=!!(4&E.flags[r]),w=!!(32&E.flags[r]),u?(E.ot.push(w?s[i]:-s[i]),i++):w?E.ot.push(0):(E.ot.push(B.$A(s,i)),i+=2);var c=0,f=0;for(r=0;r<h;r++)c+=E.gt[r],f+=E.ot[r],E.gt[r]=c,E.ot[r]=f}else E.nt=[];return E}},typeof module<"u"&&module.exports?module.exports=C:typeof window<"u"&&(window.Typr=C);class rA{ht(e){var s;const B=[];return(s=e==null?void 0:e.cmap)!=null&&s.LA?(e.cmap.LA.forEach(Q=>{if(Q.format===4){const i=this.Dt(Q);B.push(...i)}else if(Q.format===12){const i=this.lt(Q);B.push(...i)}}),[...new Set(B)]):[]}Dt(e){const B=[];if(!(e.At&&e.qA&&e.et&&e.tt))return B;for(let s=0;s<e.At.length;s++){const Q=e.At[s],i=e.qA[s];if(Q!==65535||i!==65535){for(let E=Q;E<=i;E++)if(this.Ct(e,E,s)>0){const r=String.fromCodePoint(E);B.push(r)}}}return B}lt(e){const B=[];if(!e.groups)return B;for(let s=0;s<e.groups.length;s+=3){const Q=e.groups[s],i=e.groups[s+1],E=e.groups[s+2];for(let r=Q;r<=i;r++)if(E+(r-Q)>0){const n=String.fromCodePoint(r);B.push(n)}}return B}Ct(e,B,s){if(e.et[s]===0)return B+e.tt[s]&65535;{const Q=e.et[s]/2+(B-e.At[s])-(e.At.length-s);if(Q>=0&&e.Bt&&Q<e.Bt.length){const i=e.Bt[Q];if(i!==0)return i+e.tt[s]&65535}}return 0}ct(e){return e.filter(B=>this.ut(B))}ut(e){const B=e.codePointAt(0)||0;return!(B>=0&&B<=31&&B!==9&&B!==10&&B!==13||B>=127&&B<=159)}}class gA{constructor(e){g(this,"Pt");g(this,"It");g(this,"wt");this.wt=e,this.Pt=document.createElement("canvas"),this.It=this.Pt.getContext("2d",{ft:!0,alpha:!1})}dt(e,B,s,Q){const i=e.length,E=Math.ceil(Math.sqrt(i)),r=Math.ceil(i/E),n=B.width*E,h=B.height*r;this.vt(n,h,s,Q),this.bt(e,B,E,s),this.xt();const a=this.wt.createFramebuffer(n,h,{filter:"nearest"});return a.update(this.Pt),{framebuffer:a,columns:E,rows:r}}vt(e,B,s,Q){this.Pt.width=e,this.Pt.height=B,this.Pt.style.width=e+"px",this.Pt.style.height=e+"px",this.It.imageSmoothingEnabled=!1,this.Pt.style.imageRendering="pixelated",this.It.fillStyle="black",this.It.fillRect(0,0,e,B),this.It.font=`${s}px ${Q}`,this.It.textBaseline="top",this.It.textAlign="left",this.It.fillStyle="white"}bt(e,B,s,Q){for(let i=0;i<e.length;i++){const E=i%s,r=Math.floor(i/s),n=E*B.width+.5*B.width,h=r*B.height+.5*B.height,a=Math.round(n-.5*B.width),D=Math.round(h-.5*Q);this.It.fillText(e[i]._t,a,D)}}xt(e=128){const B=this.It.getImageData(0,0,this.Pt.width,this.Pt.height),s=B.data;for(let Q=0;Q<s.length;Q+=4){const i=.299*s[Q]+.587*s[Q+1]+.114*s[Q+2]>e+32?255:0;s[Q]=i,s[Q+1]=i,s[Q+2]=i}this.It.putImageData(B,0,0)}}class oA{constructor(){g(this,"yt");g(this,"Mt");this.yt=document.createElement("canvas"),this.Mt=this.yt.getContext("2d")}Gt(e,B,s){this.Mt.font=`${B}px ${s}`;let Q=0,i=0;for(const E of e){const r=this.Mt.measureText(E);Q=Math.max(Q,r.width),i=Math.max(i,r.actualBoundingBoxAscent+r.actualBoundingBoxDescent)}return{width:Q,height:i}}}class nA{Ft(e,B){return e.map((s,Q)=>{const i=s.codePointAt(0)||0,E=this.Yt(Q);let r=0;if(B.hmtx&&B.hmtx.Qt){const n=this.Tt(B,i);n>0&&B.hmtx.Qt[n]!==void 0&&(r=B.hmtx.Qt[n])}return{_t:s,unicode:i,color:E,St:r}})}Tt(e,B){const s=e.cmap;if(!s||!s.LA)return 0;for(const Q of s.LA)if(Q.format===4){for(let i=0;i<Q.At.length;i++)if(B>=Q.At[i]&&B<=Q.qA[i]){if(Q.et[i]===0)return B+Q.tt[i]&65535;{const E=Q.et[i]/2+(B-Q.At[i])-(Q.At.length-i);if(E>=0&&E<Q.Bt.length){const r=Q.Bt[E];if(r!==0)return r+Q.tt[i]&65535}}}}return 0}Yt(e){return[e%256,Math.floor(e/256)%256,Math.floor(e/65536)%256]}Ot(e,B){if(!d.validate(typeof e=="string","Character must be a string.",{method:"getCharacterColor",Ut:e}))return[0,0,0];const s=B.find(Q=>Q._t===e);return s?s.color:[0,0,0]}kt(e,B){return d.validate(typeof e=="string"&&e.length>0,"Characters must be a string with at least one character.",{method:"getCharacterColors",Ut:e})?e.split("").map(s=>this.Ot(s,B)||[0,0,0]):[[0,0,0]]}}class K{constructor(e,B=16){g(this,"Vt");g(this,"Ht",[]);g(this,"Rt");g(this,"$t",16);g(this,"zt",0);g(this,"Jt",0);g(this,"Lt",{width:0,height:0});g(this,"Kt");g(this,"Wt","UrsaFont");g(this,"jt");g(this,"Zt");g(this,"Nt");g(this,"Xt");this.$t=B,this.jt=new rA,this.Zt=new gA(e),this.Nt=new oA,this.Xt=new nA}async initialize(e){let B;if(e){const s=await fetch(e);if(!s.ok)throw new P(`Failed to load font file: ${s.status} ${s.statusText}`);B=await s.arrayBuffer()}else B=await(await fetch(`data:font/truetype;charset=utf-8;base64,AAEAAAAKAIAAAwAgT1MvMs+QEyQAAAEoAAAAYGNtYXAg7yVJAAAFjAAACSBnbHlmuHLTdAAAErQAAGi0aGVhZFvXdUwAAACsAAAANmhoZWELAQUCAAAA5AAAACRobXR4BACDgAAAAYgAAAQEbG9jYQAy54AAAA6sAAAECG1heHABIgCCAAABCAAAACBuYW1lVs/OSgAAe2gAAAOicG9zdABpADQAAH8MAAAAIAABAAAAAQAAzOWHqV8PPPUAAAQAAAAAAHxiGCcAAAAAfGIYJwAAAAAEAAQAAAAACAACAAEAAAAAAAEAAAQAAAAAAAQAAAAAAAcAAAEAAAAAAAAAAAAAAAAAAAEBAAEAAAEBAIAAIAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAgQAAZAABQAEAgACAAAAAAACAAIAAAACAAAzAMwAAAAABAAAAAAAAACAAACLAABw4wAAAAAAAAAAWUFMLgBAACAmawQAAAAAAAQAAAAAAAFRAAAAAAMABAAAAAAgAAAEAAAABAAAAAQAAAAEAAGABAABAAQAAIAEAACABAAAgAQAAIAEAAGABAABAAQAAQAEAACABAABAAQAAIAEAACABAABAAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAABAAQAAIAEAAEABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAABAAQAAIAEAAEABAAAgAQAAIAEAAEABAAAgAQAAIAEAACABAAAgAQAAIAEAAEABAAAgAQAAIAEAAGABAAAgAQAAIAEAAGABAAAgAQAAIAEAACABAAAgAQAAIAEAAEABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAAAgAQAAIAEAACABAABgAQAAQAEAACABAAAAAQAAgAEAACABAAAgAQAAIAEAACABAACAAQAAAAEAAIABAABgAQAAgAEAACABAAAgAQAAAAEAACABAAAAAQAAAAEAAAABAAAAAQAAAAEAAIABAADAAQAAAAEAAAABAAAgAQAAYAEAAAABAAAAAQAAIAEAAAABAAAgAQAAIAEAACABAAAAAQAAIAEAAAABAAAAAQAAIAEAAGABAAAAAQAAAAEAAAABAAAAAQAAIAEAACABAAAAAQAAIAEAACABAAAAAQAAIAEAACABAAAgAQAAAAEAACABAAAAAQAAAAEAAEABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAACAAQAAIAEAAAABAAAAAQAAAAEAACABAABAAQAAQAEA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==\r
|
|
8
|
+
`)).arrayBuffer();await this.qt(B),this.Vt=C.parse(B)[0],await this.Ae()}te(e){if(e===void 0)return this.$t;this.$t=e,this.Lt=this.Nt.Gt(this.Ht.map(s=>s._t),this.$t,this.Wt);const B=this.Zt.dt(this.Ht,this.Lt,this.$t,this.Wt);this.Rt=B.framebuffer,this.zt=B.columns,this.Jt=B.rows}async ee(e){try{const B=await fetch(e);if(!B.ok)throw new P(`Failed to load font file: ${B.status} ${B.statusText}`);const s=await B.arrayBuffer();await this.qt(s);const Q=C.parse(s);if(!Q||Q.length===0)throw Error("Failed to parse font file");this.Vt=Q[0],await this.Ae()}catch(B){throw new P("Failed to load font: "+(B instanceof Error?B.message:"Unknown error"),B)}}async qt(e){const B=Date.now();this.Wt=this.Wt==="UrsaFont"?"UrsaFont":"CustomFont_"+B,this.Kt=new FontFace(this.Wt,e),await this.Kt.load(),document.fonts.add(this.Kt)}async Ae(){const e=this.jt.ht(this.Vt),B=this.jt.ct(e);this.Ht=this.Xt.Ft(B,this.Vt),this.Lt=this.Nt.Gt(B,this.$t,this.Wt);const s=this.Zt.dt(this.Ht,this.Lt,this.$t,this.Wt);this.Rt=s.framebuffer,this.zt=s.columns,this.Jt=s.rows}Ot(e){return this.Xt.Ot(e,this.Ht)}kt(e){return this.Xt.kt(e,this.Ht)}Be(e){if(typeof e!="string"||e.length===0)return!1;const B=new Set(this.Ht.map(s=>s._t));for(const s of e)if(!B.has(s))return!1;return!0}get Qe(){return this.Rt}get se(){return this.Ht}get ie(){return this.zt}get Ee(){return this.Jt}get re(){return this.Lt}dispose(){this.Rt.dispose(),document.fonts.delete(this.Kt)}get fontSize(){return this.$t}get font(){return this.Vt}}class Z{constructor(e,B,s){g(this,"ge");g(this,"oe");g(this,"p");g(this,"v");g(this,"ne");g(this,"he");g(this,"ae",!1);g(this,"De");g(this,"le");g(this,"Ce");this.De=e,this.le=B,this.Ce=s,this.reset()}reset(){this.ae||(this.ge=Math.floor(this.De.width/this.le),this.oe=Math.floor(this.De.height/this.Ce)),this.ce()}ce(){this.p=this.ge*this.le,this.v=this.oe*this.Ce,this.ne=Math.floor((this.De.width-this.p)/2),this.he=Math.floor((this.De.height-this.v)/2)}ue(e,B){this.le=e,this.Ce=B,this.reset()}Pe(e,B){this.ae=!0,this.ge=e,this.oe=B,this.ce()}Ie(){this.ae=!1,this.reset()}resize(){this.ae?this.ce():this.reset()}we(e){if(e===void 0)return this.ae;this.ae=e}get fe(){return this.le}get de(){return this.Ce}get cols(){return this.ge}get rows(){return this.oe}get width(){return this.p}get height(){return this.v}get offsetX(){return this.ne}get offsetY(){return this.he}}class q{constructor(e,B=!1,s={}){g(this,"De");g(this,"me");g(this,"pe");g(this,"ve");g(this,"be");this.me=e,this.pe=B,this.De=this.xe(s.width,s.height),B&&this._e()}xe(e,B){var Q;const s=document.createElement("canvas");if(s.className="textmodeCanvas",s.style.imageRendering="pixelated",this.pe)s.width=e||800,s.height=B||600,document.body.appendChild(s);else{const i=this.me.getBoundingClientRect();let E=Math.round(i.width),r=Math.round(i.height);if(this.me instanceof HTMLVideoElement){const a=this.me;(E===0||r===0)&&a.videoWidth>0&&a.videoHeight>0&&(E=a.videoWidth,r=a.videoHeight)}s.width=E,s.height=r,s.style.position="absolute",s.style.pointerEvents="none";const n=window.getComputedStyle(this.me);let h=parseInt(n.zIndex||"0",10);isNaN(h)&&(h=0),s.style.zIndex=""+(h+1),this.ye(s),(Q=this.me.parentNode)==null||Q.insertBefore(s,this.me.nextSibling)}return s}ye(e){const B=this.me.getBoundingClientRect();let s=this.me.offsetParent;if(s&&s!==document.body){const Q=s.getBoundingClientRect();e.style.top=B.top-Q.top+"px",e.style.left=B.left-Q.left+"px"}else e.style.top=B.top+window.scrollY+"px",e.style.left=B.left+window.scrollX+"px"}resize(e,B){if(this.pe)this.De.width=e??this.De.width,this.De.height=B??this.De.height;else{const s=this.me.getBoundingClientRect();let Q=Math.round(s.width),i=Math.round(s.height);if(this.me instanceof HTMLVideoElement){const E=this.me;(Q===0||i===0)&&E.videoWidth>0&&E.videoHeight>0&&(Q=E.videoWidth,i=E.videoHeight)}this.De.width=Q,this.De.height=i,this.ye(this.De)}}Me(){const e={alpha:!1,premultipliedAlpha:!1,Ge:!0,antialias:!1,Fe:!1,Ye:!1,powerPreference:"high-performance"},B=this.De.getContext("webgl2",e)||this.De.getContext("webgl",e);if(!B)throw new P("WebGL context could not be created. Ensure your browser supports WebGL.");return B}_e(){this.ve=new ResizeObserver(e=>{for(const B of e){const s=B.contentRect;!this.be||Math.round(s.width)===this.De.width&&Math.round(s.height)===this.De.height||this.be()}}),this.ve.observe(this.De)}dispose(){if(this.ve&&this.ve.disconnect(),this.De){const e=this.De.getContext("webgl")||this.De.getContext("webgl2");if(e){const B=e.getExtension("WEBGL_lose_context");B&&B.Te()}this.De.parentNode&&this.De.parentNode.removeChild(this.De)}}get canvas(){return this.De}get width(){return this.De.width}get height(){return this.De.height}}class G{constructor(e,B,s,Q={}){g(this,"Se");g(this,"Oe");g(this,"grid");g(this,"Ue");g(this,"ke");g(this,"Ve");g(this,"He");g(this,"Re");g(this,"h");this.Se=e,this.Oe=B,this.grid=s,this.h=Q;const i=this.grid.cols,E=this.grid.rows;this.Ue=this.Se.createFramebuffer(i,E),this.ke=this.Se.createFramebuffer(i,E),this.Ve=this.Se.createFramebuffer(i,E),this.He=this.Se.createFramebuffer(i,E),this.Re=this.Se.createFramebuffer(i,E)}resize(){const e=this.grid.cols,B=this.grid.rows;this.Ue.resize(e,B),this.ke.resize(e,B),this.Ve.resize(e,B),this.He.resize(e,B),this.Re.resize(e,B)}enabled(e){this.h.enabled=e}enable(){this.enabled(!0)}disable(){this.enabled(!1)}dispose(){this.Ue.dispose(),this.ke.dispose(),this.Ve.dispose(),this.He.dispose(),this.Re.dispose()}get $e(){return this.Ue}get ze(){return this.ke}get Je(){return this.Ve}get Le(){return this.He}get Ke(){return this.Re}get options(){return this.h}}class hA{constructor(e,B){g(this,"I");g(this,"wt");g(this,"We");this.wt=e,this.We=B;const s=Math.max(this.We.length,1);this.I=this.wt.createFramebuffer(s,1),this.je()}je(){const e=this.We.length;this.I.width!==e&&this.I.resize(e,1);const B=new Uint8Array(1*e*4);for(let s=0;s<e;s++){const Q=this.We[s],i=4*s;B[i]=Q[0],B[i+1]=Q[1],B[i+2]=Q[2],B[i+3]=255}this.I.S(B,e,1)}Ze(e){this.We=e,this.je()}get Ne(){return this.We}get framebuffer(){return this.I}get texture(){return this.I.texture}}class j extends G{constructor(B,s,Q,i={}){super(B,s,Q,i);g(this,"palette");this.palette=new hA(this.Se,this.Oe.kt(" .:-=+*%@#"))}se(B){d.validate(this.Oe.Be(B),"One or more characters do not exist in the current font.",{method:"characters",Ut:B})&&(this.h.se=B,this.palette.Ze(this.Oe.kt(B)))}Xe(B,s,Q,i=255){const E=this.qe(B,"characterColor",s,Q,i);E&&(this.h.Xe=E)}AB(B){this.tB(B,"characterColorMode")}eB(B,s,Q,i=255){const E=this.qe(B,"cellColor",s,Q,i);E&&(this.h.eB=E)}BB(B){this.tB(B,"cellColorMode")}QB(B){this.sB(B,"invert","Invert")}rotation(B){if(!d.validate(typeof B=="number","Rotation angle must be a number.",{method:"rotation",Ut:B}))return;(B%=360)<0&&(B+=360);const s=255*B/360,Q=Math.floor(s)/255,i=Math.round(s-Q);this.h.rotation=[Q,i,0,1]}iB(B){this.sB(B,"flipHorizontally","Flip horizontally")}EB(B){this.sB(B,"flipVertically","Flip vertically")}qe(B,s,Q,i,E=255){let r,n,h,a;if(typeof B=="string"){const D=this.rB(B);if(!D)return d.validate(!1,"Invalid hex color format. Use '#FF0000', '#F00', 'FF0000', or 'F00'.",{method:s,Ut:B}),null;[r,n,h,a]=D}else if(r=B,n=Q!==void 0?Q:B,h=i!==void 0?i:B,a=E,!d.validate([r,n,h,a].every(D=>D>=0&&D<=255),s.charAt(0).toUpperCase()+s.slice(1)+" color values must be between 0 and 255",{method:s,gB:{r,g:n,b:h,a}}))return null;return[r/255,n/255,h/255,a/255]}tB(B,s){d.validate(["sampled","fixed"].includes(B),"Invalid color mode. Must be 'sampled' or 'fixed'.",{method:s,Ut:B})&&(this.h[s]=B)}sB(B,s,Q){d.validate(typeof B=="boolean"||typeof B=="number"&&Number.isInteger(B),Q+" must be a boolean value or an integer (0 for false, any other number for true).",{method:s,Ut:B})&&(this.h[s]=!!B)}rB(B){return B=B.replace(/^#/,""),/^[0-9A-Fa-f]{3}$|^[0-9A-Fa-f]{6}$/.test(B)?(B.length===3&&(B=B.split("").map(s=>s+s).join("")),[parseInt(B.slice(0,2),16),parseInt(B.slice(2,4),16),parseInt(B.slice(4,6),16),255]):null}}const aA={enabled:!0,se:" .:-=+*%@#",Xe:[1,1,1,1],AB:"sampled",eB:[0,0,0,1],BB:"fixed",QB:!1,rotation:[0,0,0,255],iB:!1,EB:!1,oB:[0,255]};class $ extends j{constructor(B,s,Q){super(B,s,Q,{...aA});g(this,"nB");g(this,"hB");g(this,"aB");g(this,"DB");g(this,"lB");g(this,"CB");this.nB=new v(B.context,x,"precision lowp float;uniform sampler2D u_sketchTexture;uniform vec2 u_gridCellDimensions;uniform vec2 u_brightnessRange;varying vec2 v_uv;void main(){vec2 cellCenter=(floor(v_uv*u_gridCellDimensions)+vec2(0.5))/u_gridCellDimensions;vec4 color=texture2D(u_sketchTexture,cellCenter);float brightness=dot(color.rgb,vec3(0.299,0.587,0.114));float brightnessValue=brightness*255.0;if(brightnessValue>=u_brightnessRange.x&&brightnessValue<=u_brightnessRange.y){gl_FragColor=color;}else{gl_FragColor=vec4(0.0);}}"),this.hB=new v(B.context,x,"precision lowp float;uniform sampler2D u_sampleTexture;uniform vec4 u_fillColor;uniform bool u_useFixedColor;varying vec2 v_uv;void main(){vec4 sampleColor=texture2D(u_sampleTexture,v_uv);if(sampleColor.a>0.0){if(u_useFixedColor){gl_FragColor=u_fillColor;}else{gl_FragColor=sampleColor;}}else{gl_FragColor=vec4(0.0);}}"),this.DB=new v(B.context,x,"precision lowp float;uniform sampler2D u_sampleTexture;uniform bool u_invert;uniform bool u_flipHorizontally;uniform bool u_flipVertically;varying vec2 v_uv;void main(){vec4 sampleColor=texture2D(u_sampleTexture,v_uv);if(sampleColor.a>0.0){float invertValue=u_invert ? 1.0 : 0.0;float flipHValue=u_flipHorizontally ? 1.0 : 0.0;float flipVValue=u_flipVertically ? 1.0 : 0.0;gl_FragColor=vec4(invertValue,flipHValue,flipVValue,1.0);}else{gl_FragColor=vec4(0.0);}}"),this.lB=new v(B.context,x,"precision lowp float;uniform sampler2D u_sampleTexture;uniform vec4 u_rotationColor;varying vec2 v_uv;void main(){vec4 sampleColor=texture2D(u_sampleTexture,v_uv);if(sampleColor.a>0.0){gl_FragColor=u_rotationColor;}else{gl_FragColor=vec4(0.0);}}"),this.aB=new v(B.context,x,"precision lowp float;uniform sampler2D u_colorSampleFramebuffer;uniform sampler2D u_charPaletteTexture;uniform vec2 u_charPaletteSize;uniform vec2 u_brightnessRange;varying vec2 v_uv;void main(){vec4 color=texture2D(u_colorSampleFramebuffer,v_uv);if(color.a==0.0){gl_FragColor=vec4(0.0);return;}float brightness=dot(color.rgb,vec3(0.299,0.587,0.114))*255.0;vec2 range=u_brightnessRange;if(brightness<range.x||brightness>range.y){gl_FragColor=vec4(0.0);return;}float t=(brightness-range.x)/(range.y-range.x);float idx=clamp(floor(t*u_charPaletteSize.x),0.0,u_charPaletteSize.x-1.0);vec3 charColor=texture2D(u_charPaletteTexture,vec2((idx+0.5)/u_charPaletteSize.x,0.0)).rgb;gl_FragColor=vec4(charColor,1.0);}"),this.CB=this.Se.createFramebuffer(this.grid.cols,this.grid.rows)}cB(B){const s=this.grid.cols,Q=this.grid.rows;this.CB.O(),this.Se.clear(),this.Se.bA(this.nB),this.Se.j("u_sketchTexture",B),this.Se.j("u_gridCellDimensions",[s,Q]),this.Se.j("u_brightnessRange",this.h.oB),this.Se.rect(0,0,s,Q),this.CB.end(),this.ke.O(),this.Se.clear(),this.Se.bA(this.hB),this.Se.j("u_sampleTexture",this.CB),this.Se.j("u_fillColor",this.h.Xe),this.Se.j("u_useFixedColor",this.h.AB==="fixed"),this.Se.rect(0,0,s,Q),this.ke.end(),this.Ve.O(),this.Se.clear(),this.Se.bA(this.hB),this.Se.j("u_sampleTexture",this.CB),this.Se.j("u_fillColor",this.h.eB),this.Se.j("u_useFixedColor",this.h.BB==="fixed"),this.Se.rect(0,0,s,Q),this.Ve.end(),this.Re.O(),this.Se.clear(),this.Se.bA(this.DB),this.Se.j("u_sampleTexture",this.CB),this.Se.j("u_invert",this.h.QB),this.Se.j("u_flipHorizontally",this.h.iB),this.Se.j("u_flipVertically",this.h.EB),this.Se.rect(0,0,s,Q),this.Re.end(),this.He.O(),this.Se.clear(),this.Se.bA(this.lB),this.Se.j("u_sampleTexture",this.CB),this.Se.j("u_rotationColor",this.h.rotation),this.Se.rect(0,0,s,Q),this.He.end(),this.Ue.O(),this.Se.clear(),this.Se.bA(this.aB),this.Se.j("u_colorSampleFramebuffer",this.CB),this.Se.j("u_charPaletteTexture",this.palette.texture),this.Se.j("u_charPaletteSize",[this.palette.Ne.length,1]),this.Se.j("u_brightnessRange",this.h.oB),this.Se.rect(0,0,s,Q),this.Ue.end()}resize(){super.resize(),this.CB.resize(this.grid.cols,this.grid.rows)}oB(B){d.validate(Array.isArray(B)&&B.length===2&&B.every(s=>typeof s=="number"&&s>=0&&s<=255),"Brightness range must be an array of two numbers between 0 and 255.",{method:"brightnessRange",Ut:B})&&(this.h.oB=B)}}const DA=Object.freeze(Object.defineProperty({__proto__:null,uB:$,PB:G,IB:j},Symbol.toStringTag,{value:"Module"}));class AA{constructor(e,B,s){g(this,"Se");g(this,"font");g(this,"grid");g(this,"wB");g(this,"fB");g(this,"dB");g(this,"mB");g(this,"pB");g(this,"Ue");g(this,"ke");g(this,"Ve");g(this,"He");g(this,"Re");this.Se=e,this.font=B,this.grid=s,this.pB=this.Se.createShader(x,"precision mediump float;uniform sampler2D u_characterTexture;uniform vec2 u_charsetDimensions;uniform sampler2D u_primaryColorTexture;uniform sampler2D u_secondaryColorTexture;uniform sampler2D u_transformTexture;uniform sampler2D u_asciiCharacterTexture;uniform sampler2D u_rotationTexture;uniform sampler2D u_captureTexture;uniform vec2 u_captureDimensions;uniform int u_backgroundMode;uniform vec2 u_gridCellDimensions;uniform vec2 u_gridPixelDimensions;mat2 rotate2D(float angle){float s=sin(angle);float c=cos(angle);return mat2(c,-s,s,c);}void main(){vec2 adjustedCoord=gl_FragCoord.xy/u_gridPixelDimensions;vec2 gridCoord=adjustedCoord*u_gridCellDimensions;vec2 cellCoord=floor(gridCoord);vec2 charIndexTexCoord=(cellCoord+0.5)/u_gridCellDimensions;vec4 primaryColor=texture2D(u_primaryColorTexture,charIndexTexCoord);vec4 secondaryColor=texture2D(u_secondaryColorTexture,charIndexTexCoord);vec4 transformColor=texture2D(u_transformTexture,charIndexTexCoord);bool isInverted=transformColor.r>0.5;bool flipHorizontal=transformColor.g>0.5;bool flipVertical=transformColor.b>0.5;vec4 encodedIndexVec=texture2D(u_asciiCharacterTexture,charIndexTexCoord);if(encodedIndexVec.a<0.01){gl_FragColor=(u_backgroundMode==0)? vec4(0.0):texture2D(u_captureTexture,gl_FragCoord.xy/u_captureDimensions);return;}int charIndex=int(encodedIndexVec.r*255.0+0.5)+int(encodedIndexVec.g*255.0+0.5)*256;int charCol=int(mod(float(charIndex),u_charsetDimensions.x));int charRow=charIndex/int(u_charsetDimensions.x);float flippedRow=(u_charsetDimensions.y-1.0)-float(charRow);vec2 charCoord=vec2(float(charCol),flippedRow)/u_charsetDimensions;vec4 rotationColor=texture2D(u_rotationTexture,charIndexTexCoord);float scaledAngle=rotationColor.r*255.0+rotationColor.g;float rotationAngle=(scaledAngle*360.0/255.0)*0.017453292;vec2 fractionalPart=fract(gridCoord)-0.5;if(flipHorizontal)fractionalPart.x=-fractionalPart.x;if(flipVertical)fractionalPart.y=-fractionalPart.y;fractionalPart=rotate2D(rotationAngle)*fractionalPart+0.5;vec2 cellSize=1.0/u_charsetDimensions;vec2 texCoord=charCoord+fractionalPart*cellSize;vec2 cellMax=charCoord+cellSize;if(any(lessThan(texCoord,charCoord))||any(greaterThan(texCoord,cellMax))){gl_FragColor=isInverted ? primaryColor : secondaryColor;return;}vec4 charTexel=texture2D(u_characterTexture,texCoord);if(isInverted)charTexel.rgb=1.0-charTexel.rgb;gl_FragColor=mix(secondaryColor,primaryColor,charTexel);}"),this.fB=new $(e,B,s),this.dB=new G(e,B,s),this.wB=[this.fB,this.dB],this.Ue=this.Se.createFramebuffer(s.cols,s.rows),this.ke=this.Se.createFramebuffer(s.cols,s.rows),this.Ve=this.Se.createFramebuffer(s.cols,s.rows),this.He=this.Se.createFramebuffer(s.cols,s.rows),this.Re=this.Se.createFramebuffer(s.cols,s.rows),this.mB=this.Se.createFramebuffer(this.grid.width,this.grid.height)}vB(e){for(const s of this.wB)s.options.enabled&&s instanceof j&&s.cB(e);const B=(s,Q)=>{s.O(),this.Se.clear();for(const i of this.wB)i.options.enabled&&this.Se.image(Q(i),0,0);s.end()};B(this.Ue,s=>s.$e),B(this.ke,s=>s.ze),B(this.Ve,s=>s.Je),B(this.He,s=>s.Le),B(this.Re,s=>s.Ke),this.mB.O(),this.Se.clear(),this.Se.bA(this.pB),this.Se.j("u_characterTexture",this.font.Qe),this.Se.j("u_charsetDimensions",[this.font.ie,this.font.Ee]),this.Se.j("u_asciiCharacterTexture",this.Ue.texture),this.Se.j("u_primaryColorTexture",this.ke.texture),this.Se.j("u_secondaryColorTexture",this.Ve.texture),this.Se.j("u_transformTexture",this.Re.texture),this.Se.j("u_rotationTexture",this.He.texture),this.Se.j("u_captureTexture",e.texture),this.Se.j("u_backgroundMode",!1),this.Se.j("u_captureDimensions",[e.width,e.height]),this.Se.j("u_gridCellDimensions",[this.grid.cols,this.grid.rows]),this.Se.j("u_gridPixelDimensions",[this.grid.width,this.grid.height]),this.Se.rect(0,0,this.mB.width,this.mB.height),this.mB.end()}add(e){if(!d.validate(e==="brightness"||e==="custom",'Converter type must be either "brightness" or "custom". Provided: '+e,{method:"add",Ut:e}))return;let B;return B=e==="brightness"?new $(this.Se,this.font,this.grid):new G(this.Se,this.font,this.grid),this.wB.push(B),B}remove(e){if(!d.validate(e instanceof G,"Parameter must be a TextmodeConverter instance.",{method:"remove",Ut:e}))return;const B=this.wB.indexOf(e);d.validate(B!==-1,"Converter instance not found in pipeline.",{method:"remove",Ut:e,bB:this.wB.length})&&this.wB.splice(B,1)}get texture(){return this.mB}resize(){this.mB.resize(this.grid.width,this.grid.height);const e=this.grid.cols,B=this.grid.rows;this.Ue.resize(e,B),this.ke.resize(e,B),this.Ve.resize(e,B),this.He.resize(e,B),this.Re.resize(e,B);for(const s of this.wB)s.resize()}xB(){return this.wB.some(e=>e.options.enabled)}disable(){for(const e of this.wB)e.disable()}enable(){for(const e of this.wB)e.enable()}dispose(){for(const e of this.wB)e.dispose();this.Ue.dispose(),this.ke.dispose(),this.Ve.dispose(),this.He.dispose(),this.Re.dispose(),this.mB.dispose(),this.pB.dispose()}get $e(){return this.Ue}get ze(){return this.ke}get Je(){return this.Ve}get Le(){return this.He}get Ke(){return this.Re}}const lA=o=>class extends o{fill(e,B,s,Q){this.wt.fill(e,B,s,Q)}stroke(e,B,s,Q){this.wt.stroke(e,B,s,Q)}xA(e){this.wt.xA(e)}_A(){this.wt._A()}yA(){this.wt.yA()}rotate(e){this.wt.rotate(e)}push(){this.wt.push()}pop(){this.wt.pop()}rect(e,B,s=1,Q=1){this.wt.rect(e,B,s,Q)}line(e,B,s,Q){this.wt.line(e,B,s,Q)}background(e,B=e,s=e,Q=255){this.wt.background(e,B,s,Q)}createShader(e,B){return this.wt.createShader(e,B)}FA(e){return this.wt.FA(e)}bA(e){this.wt.bA(e)}j(e,B){this.wt.j(e,B)}};class V{_B(e){const B=e.get("brightness"),s=B==null?void 0:B.$e,Q=B==null?void 0:B.ze,i=B==null?void 0:B.Je,E=B==null?void 0:B.Ke,r=B==null?void 0:B.Le;return s==null||s.U(),Q==null||Q.U(),i==null||i.U(),E==null||E.U(),r==null||r.U(),{yB:(s==null?void 0:s.k)||new Uint8Array(0),MB:(Q==null?void 0:Q.k)||new Uint8Array(0),GB:(i==null?void 0:i.k)||new Uint8Array(0),FB:(E==null?void 0:E.k)||new Uint8Array(0),YB:(r==null?void 0:r.k)||new Uint8Array(0)}}TB(e,B){return e[B]+(e[B+1]<<8)}SB(e,B){return{r:e[B],g:e[B+1],b:e[B+2],a:e[B+3]}}}class L{OB(e,B){return new Blob([e],{type:B})}UB(e,B,s){try{const Q=this.OB(e,s),i=URL.createObjectURL(Q),E=document.createElement("a");E.href=i,E.download=B,E.style.display="none",E.rel="noopener",document.body.appendChild(E),E.click(),document.body.removeChild(E),URL.revokeObjectURL(i)}catch(Q){throw console.error("Failed to download file:",Q),Error("File download failed: "+(Q instanceof Error?Q.message:"Unknown error"))}}kB(){return new Date().toISOString().slice(0,19).replace(/:/g,"-")}VB(){const e=new Date;return{HB:e.toISOString().split("T")[0],time:e.toTimeString().split(" ")[0].replace(/:/g,"-")}}RB(e){return e.replace(/[<>:"/\\|?*]/g,"_").replace(/\s+/g,"_").replace(/_{2,}/g,"_").replace(/^_+|_+$/g,"").substring(0,255)}$B(){return"'textmode-export'-"+this.kB()}}class CA extends V{zB(e,B,s){const Q=e[s]===255,i=e[s+1]===255,E=e[s+2]===255,r=B[s],n=B[s+1];return{JB:Q,LB:i,KB:E,rotation:Math.round(360*(r+n/255)/255*100)/100}}WB(e,B,s){return{x:e,y:B,jB:e*s.fe,ZB:B*s.de}}NB(e,B){const s=[];let Q=0;for(let i=0;i<B.rows;i++)for(let E=0;E<B.cols;E++){const r=4*Q,n=this.TB(e.yB,r);let h=this.SB(e.MB,r),a=this.SB(e.GB,r);const D=this.zB(e.FB,e.YB,r);if(D.JB){const u=h;h=a,a=u}const l=this.WB(E,i,B);s.push({charIndex:n,XB:h,qB:a,transform:D,position:l}),Q++}return s}}class cA{AQ(e,B){const s=e.cmap;for(const Q of s.LA)if(Q.format===4){for(let i=0;i<Q.At.length;i++)if(B>=Q.At[i]&&B<=Q.qA[i]){if(Q.et[i]===0)return B+Q.tt[i]&65535;{const E=Q.et[i]/2+(B-Q.At[i])-(Q.At.length-i);if(E>=0&&E<Q.Bt.length){const r=Q.Bt[E];if(r!==0)return r+Q.tt[i]&65535}}}}return 0}tQ(e,B,s,Q,i){const E=i/e.head.unitsPerEm;return{eQ:()=>({x1:s+B.xMin*E,y1:Q+-B.yMax*E,x2:s+B.xMax*E,y2:Q+-B.yMin*E}),BQ:()=>this.QQ(B,s,Q,E)}}QQ(e,B,s,Q){if(!e||!e.gt)return"";const{gt:i,ot:E,rt:r,flags:n}=e;if(!(i&&E&&r&&n))return"";let h="",a=0;for(let D=0;D<r.length;D++){const l=r[D];if(!(l<a)){if(l>=a){const u=B+i[a]*Q,w=s-E[a]*Q;h+=`M${u.toFixed(2)},${w.toFixed(2)}`;let c=a+1;for(;c<=l;)if(1&n[c]){const f=B+i[c]*Q,p=s-E[c]*Q;h+=`L${f.toFixed(2)},${p.toFixed(2)}`,c++}else{const f=B+i[c]*Q,p=s-E[c]*Q;let m=c+1>l?a:c+1;if(1&n[m]){const y=B+i[m]*Q,M=s-E[m]*Q;h+=`Q${f.toFixed(2)},${p.toFixed(2)} ${y.toFixed(2)},${M.toFixed(2)}`,c=m+1}else{const y=(f+(B+i[m]*Q))/2,M=(p+(s-E[m]*Q))/2;h+=`Q${f.toFixed(2)},${p.toFixed(2)} ${y.toFixed(2)},${M.toFixed(2)}`,c=m}}h+="Z"}a=l+1}}return h}sQ(e,B,s,Q,i){const E=e.codePointAt(0)||0,r=this.AQ(B,E);let n=null;return B.glyf&&B.glyf[r]!==null?n=B.glyf[r]:C&&C.T&&C.T.glyf&&C.T.glyf.it&&(n=C.T.glyf.it(B,r),B.glyf&&n&&(B.glyf[r]=n)),this.tQ(B,n,s,Q,i)}iQ(e,B,s,Q,i,E,r,n){const h=s+(i-n*(r/B.head.unitsPerEm))/2,a=Q+(E+.7*r)/2;return this.sQ(e,B,h,a,r).BQ()||null}}class PA{constructor(){g(this,"EQ");this.EQ=new cA}rQ(e){return`<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
9
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
10
|
+
<svg width="${e.width}" height="${e.height}" viewBox="0 0 ${e.width} ${e.height}"
|
|
11
|
+
xmlns="http://www.w3.org/2000/svg" version="1.1">
|
|
12
|
+
<title>textmode art generated via textmode.js</title>
|
|
13
|
+
<desc>textmode art visualization generated by textmode.js library</desc>`}gQ(){return`
|
|
14
|
+
</g>
|
|
15
|
+
</svg>`}oQ(e,B){if(!B.nQ)return"";const s=B.backgroundColor,Q=`rgba(${s[0]},${s[1]},${s[2]},${s[3]/255})`;return`
|
|
16
|
+
<rect width="${e.width}" height="${e.height}" fill="${Q}" />`}hQ(e){return`rgba(${e.r},${e.g},${e.b},${e.a/255})`}aQ(e,B){const{transform:s,position:Q}=e,i=Q.jB+B.fe/2,E=Q.ZB+B.de/2,r=[];if(s.LB||s.KB){const n=s.LB?-1:1,h=s.KB?-1:1;r.push(`translate(${i} ${E})`),r.push(`scale(${n} ${h})`),r.push(`translate(${-i} ${-E})`)}return s.rotation&&r.push(`rotate(${s.rotation} ${i} ${E})`),r.length?` transform="${r.join(" ")}"`:""}DQ(e,B,s){if(!s.nQ||e.qB.a===0)return"";const{position:Q}=e,i=this.hQ(e.qB);return s.lQ==="stroke"?`
|
|
17
|
+
<rect x="${Q.jB}" y="${Q.ZB}" width="${B.fe}" height="${B.de}" stroke="${i}" fill="none" stroke-width="${s.strokeWidth}" />`:`
|
|
18
|
+
<rect x="${Q.jB}" y="${Q.ZB}" width="${B.fe}" height="${B.de}" fill="${i}" />`}sQ(e,B,s,Q){const i=s.se[e.charIndex];if(!i)return"";const E=this.EQ.iQ(i._t,s.font,e.position.jB,e.position.ZB,B.fe,B.de,s.fontSize,i.St);if(!E)return"";const r=this.hQ(e.XB);return Q.lQ==="stroke"?`
|
|
19
|
+
<path id="${`path-${e.charIndex}-${e.position.jB}-${e.position.ZB}`.replace(/\./g,"-")}" d="${E}" stroke="${r}" stroke-width="${Q.strokeWidth}" fill="none" />`:`
|
|
20
|
+
<path d="${E}" fill="${r}" />`}CQ(e,B,s,Q){let i="";i+=this.DQ(e,B,Q);const E=this.aQ(e,B),r=this.sQ(e,B,s,Q);return r&&(E?(i+=`
|
|
21
|
+
<g${E}>`,i+=r,i+=`
|
|
22
|
+
</g>`):i+=r),i}cQ(e,B,s,Q){let i=this.rQ(B);i+=this.oQ(B,Q),i+=`
|
|
23
|
+
<g id="ascii-cells">`;for(const E of e)i+=this.CQ(E,B,s,Q);return i+=this.gQ(),i}uQ(e){return e.replace(/<path[^>]*d=""[^>]*\/>/g,"").replace(/\n\s*\n/g,`
|
|
24
|
+
`).replace(/[ \t]+$/gm,"")}}class uA extends L{PQ(e){return this.OB(e,"image/svg+xml;charset=utf-8")}IQ(e,B){this.UB(e,this.RB(B)+".svg","image/svg+xml;charset=utf-8")}wQ(e,B){this.IQ(e,B||this.$B())}}class tA{constructor(){g(this,"fQ");g(this,"dQ");g(this,"mQ");this.fQ=new CA,this.dQ=new PA,this.mQ=new uA}pQ(e){return{nQ:e.nQ??!0,lQ:e.lQ??"fill",strokeWidth:e.strokeWidth??1,backgroundColor:e.backgroundColor??[0,0,0,0]}}vQ(e,B={}){const s=this.pQ(B),Q=this.fQ._B(e.bQ),i=this.fQ.NB(Q,e.grid),E=this.dQ.cQ(i,e.grid,e.font,s);return this.dQ.uQ(E)}wQ(e,B={}){const s=this.vQ(e,B),Q=B.filename||this.mQ.$B();this.mQ.wQ(s,Q)}}class IA extends V{xQ(e,B,s,Q=" "){var r;const i=[];let E=0;for(let n=0;n<B.rows;n++){const h=[];for(let a=0;a<B.cols;a++){const D=4*E,l=this.TB(e.yB,D),u=((r=s.se[l])==null?void 0:r._t)||Q;h.push(u),E++}i.push(h)}return i}}class wA{_Q(e,B){const s=[];for(const i of e){let E=i.join("");B.yQ||(E=E.replace(/\s+$/,"")),s.push(E)}const Q=B.MQ==="crlf"?`\r
|
|
25
|
+
`:`
|
|
26
|
+
`;return s.join(Q)}}class dA extends L{GQ(e,B){const s=this.FQ(B);this.UB(e,s,"text/plain;charset=utf-8")}FQ(e){let B=this.RB(e);return B===".txt"||B.length<=4?this.$B():B}}class eA{constructor(){g(this,"fQ");g(this,"dQ");g(this,"mQ");this.fQ=new IA,this.dQ=new wA,this.mQ=new dA}pQ(e){return{yQ:e.yQ??!1,MQ:e.MQ??"lf",YQ:e.YQ??" "}}TQ(e,B={}){const s=this.pQ(B),Q=this.fQ._B(e.bQ),i=this.fQ.xQ(Q,e.grid,e.font,s.YQ);return this.dQ._Q(i,s)}GQ(e,B={}){const s=this.TQ(e,B),Q=B.filename||this.mQ.$B();this.mQ.GQ(s,Q)}}class fA extends V{SQ(e,B=1,s="transparent"){const Q=e.canvas;if(B===1&&s==="transparent")return Q;const i=document.createElement("canvas"),E=i.getContext("2d"),r=Math.round(Q.width*B),n=Math.round(Q.height*B);return i.width=r,i.height=n,s!=="transparent"&&(E.fillStyle=s,E.fillRect(0,0,r,n)),E.imageSmoothingEnabled=!1,E.drawImage(Q,0,0,Q.width,Q.height,0,0,r,n),i}}class mA{OQ(e,B){const s=this.UQ(B.format);return B.format==="png"?e.toDataURL(s):e.toDataURL(s,B.kQ)}async VQ(e,B){return new Promise((s,Q)=>{const i=this.UQ(B.format),E=r=>{r?s(r):Q(Error(`Failed to generate ${B.format.toUpperCase()} blob`))};B.format==="png"?e.toBlob(E,i):e.toBlob(E,i,B.kQ)})}UQ(e){switch(e){case"png":return"image/png";case"jpg":return"image/jpeg";case"webp":return"image/webp";default:throw Error("Unsupported image format: "+e)}}}const BA={HQ:"image/png",RQ:"image/jpeg",$Q:"image/webp"},z={HQ:".png",RQ:".jpg",$Q:".webp"};class pA extends L{zQ(e,B,s){this.JQ(e,this.RB(B)+z[s])}JQ(e,B){const s=URL.createObjectURL(e);try{const Q=document.createElement("a");Q.href=s,Q.download=B,Q.style.display="none",Q.rel="noopener",document.body.appendChild(Q),Q.click(),document.body.removeChild(Q)}finally{URL.revokeObjectURL(s)}}LQ(e){return e in BA&&e in z}UQ(e){return BA[e]}KQ(e){return z[e]}}class vA{constructor(){g(this,"fQ");g(this,"dQ");g(this,"mQ");this.fQ=new fA,this.dQ=new mA,this.mQ=new pA}pQ(e){return{format:e.format??"png",kQ:e.kQ??1,scale:e.scale??1,backgroundColor:e.backgroundColor??"transparent"}}WQ(e){if(console.log("Validating image export options:",e),!this.mQ.LQ(e.format))throw Error(`Saving '${e.format}' files is not supported`);if(e.kQ<0||e.kQ>1)throw Error("Image quality must be between 0.0 and 1.0");if(e.scale<=0)throw Error("Scale factor must be greater than 0");e.scale>10&&console.warn("Large scale factors may result in very large files and slow performance"),e.format==="jpg"&&e.backgroundColor==="transparent"&&(e.backgroundColor="black")}jQ(e,B={}){const s=this.pQ(B);if(this.WQ(s),s.scale===1&&s.backgroundColor==="transparent")return this.dQ.OQ(e.canvas,s);const Q=this.fQ.SQ(e,s.scale,s.backgroundColor);return this.dQ.OQ(Q,s)}async VQ(e,B={}){const s=this.pQ(B);if(this.WQ(s),s.scale===1&&s.backgroundColor==="transparent")return await this.dQ.VQ(e.canvas,s);const Q=this.fQ.SQ(e,s.scale,s.backgroundColor);return await this.dQ.VQ(Q,s)}async zQ(e,B={}){const s=await this.VQ(e,B),Q=B.format??"png",i=B.filename||this.mQ.$B();this.mQ.zQ(s,i,Q)}}const xA=o=>class extends o{toString(e={}){return new eA().TQ(this,e)}ZQ(e={}){new eA().GQ(this,e)}BQ(e={}){return new tA().vQ(this,e)}wQ(e={}){new tA().wQ(this,e)}async NQ(e,B="png",s={}){await new vA().zQ(this.XQ,{...s,filename:e,format:B})}},bA=o=>class extends o{async ee(e){return this.Vt.ee(e).then(()=>{const B=this.Vt.re;this.qQ.ue(B.width,B.height),this.As.resize()})}fontSize(e){if(!d.validate(typeof e=="number"&&e>0,"Font size must be a positive number greater than 0.",{method:"fontSize",Ut:e})||this.Vt.fontSize===e)return;this.Vt.te(e);const B=this.Vt.re;this.qQ.ue(B.width,B.height),this.As.resize(),this.wt.UA()}},_A=o=>class extends o{ts(e){return this.As.add(e)}es(e){this.As.remove(e)}};class yA{constructor(){g(this,"wt");g(this,"Vt");g(this,"As");g(this,"XQ");g(this,"qQ")}}class H extends function(B,...s){return s.reduce((Q,i)=>i(Q),B)}(yA,lA,xA,bA,_A){constructor(B=null,s={}){super();g(this,"me");g(this,"Bs");g(this,"ve");g(this,"Qs");g(this,"ss");g(this,"Es",null);g(this,"rs",0);g(this,"gs");g(this,"ns",!0);g(this,"hs",0);g(this,"Ds",0);g(this,"ls",0);g(this,"Cs",[]);g(this,"cs",10);g(this,"us",!1);g(this,"Ps",!1);g(this,"Is",()=>{});g(this,"ws",()=>{});g(this,"fs");g(this,"ds",!1);this.me=B,this.Ps=B===null,this.Qs=s.ps??"auto",this.ss=s.vs??60,this.gs=1e3/this.ss}static async create(B=null,s={}){const Q=new this(B,s),i=Q.Ps?s:void 0;let E,r;Q.XQ=new q(Q.me,Q.Ps,i),Q.wt=new EA(Q.XQ.Me()),Q.Ps?(E=s.width||800,r=s.height||600):(E=Q.XQ.width||800,r=Q.XQ.height||600),Q.Bs=Q.wt.createFramebuffer(E,r),Q.Vt=new K(Q.wt,s.fontSize??16),await Q.Vt.initialize(s.bs);const n=Q.Vt.re;return Q.qQ=new Z(Q.XQ.canvas,n.width,n.height),Q.As=new AA(Q.wt,Q.Vt,Q.qQ),Q.xs(),Q._s(),Q}xs(){this.fs=()=>{this.Ps?this.ws():this.resize()},window.addEventListener("resize",this.fs),window.ResizeObserver&&this.me&&!this.Ps&&(this.ve=new ResizeObserver(()=>{this.resize()}),this.ve.observe(this.me))}vB(){if(this.ys(),this.ls++,this.us)console.warn("Cannot render: Required resources have been disposed");else if(this.Ps?(this.Bs.O(),this.Is(),this.Bs.end()):this.Bs.update(this.me),this.As.xB()?(this.As.vB(this.Bs),this.wt.background(0),this.wt.image(this.As.texture,this.qQ.offsetX,this.qQ.offsetY,this.As.texture.width,this.As.texture.height)):(this.wt.clear(),this.wt.image(this.Bs,this.qQ.offsetX,this.qQ.offsetY,this.Bs.width,this.Bs.height)),this.ds){let B=0;this.wt.image(this.As.$e,B,0,this.As.$e.width,this.As.$e.height),B+=this.As.$e.width,this.wt.image(this.As.ze,B,0,this.As.ze.width,this.As.ze.height),B+=this.As.ze.width,this.wt.image(this.As.Je,B,0,this.As.Je.width,this.As.Je.height),B+=this.As.Je.width,this.wt.image(this.As.Ke,B,0,this.As.Ke.width,this.As.Ke.height),B+=this.As.Ke.width,this.wt.image(this.As.Le,B,0,this.As.Le.width,this.As.Le.height)}}resize(){this.XQ.resize(),this.Bs.resize(this.XQ.width,this.XQ.height),this.qQ.resize(),this.As.resize(),this.wt.UA(),this.Qs!=="manual"&&this.vB()}_s(){if(this.Qs!=="auto"||!this.ns)return;this.rs=performance.now();const B=s=>{if(!this.ns)return void(this.Es=null);const Q=s-this.rs;Q>=this.gs&&(this.vB(),this.rs=s-Q%this.gs),this.ns&&(this.Es=requestAnimationFrame(B))};this.Es=requestAnimationFrame(B)}ys(){const B=performance.now();if(this.Ds>0){const s=B-this.Ds;this.Cs.push(s),this.Cs.length>this.cs&&this.Cs.shift();const Q=this.Cs.reduce((i,E)=>i+E,0)/this.Cs.length;this.hs=1e3/Q}this.Ds=B}Ms(){this.Es&&(cancelAnimationFrame(this.Es),this.Es=null)}ps(B){this.Qs!==B&&(this.Ms(),this.Qs=B,B==="auto"&&this.ns&&this._s())}vs(B){if(B===void 0)return this.hs;this.ss=B,this.gs=1e3/B,this.Qs==="auto"&&this.ns&&(this.Ms(),this._s())}Gs(){this.ns&&(this.ns=!1,this.Es&&(cancelAnimationFrame(this.Es),this.Es=null))}loop(){this.ns||(this.ns=!0,this.Qs==="auto"&&this._s())}Fs(B=1){if(d.validate(typeof B=="number"&&B>0&&Number.isInteger(B),"Redraw count must be a positive integer.",{method:"redraw",Ut:B}))for(let s=0;s<B;s++)this.vB()}Ys(){return this.Qs==="auto"&&this.ns}draw(B){this.Is=B}Ts(B){this.ws=B}Ss(B,s){this.XQ.resize(B,s),this.Bs.resize(this.XQ.width,this.XQ.height),this.qQ.resize(),this.As.resize(),this.wt.UA(),this.Qs!=="manual"&&this.vB()}destroy(){this.us||(this.Ms(),window.removeEventListener("resize",this.fs),this.ve&&this.ve.disconnect(),this.As.dispose(),this.Vt.dispose(),this.Bs.dispose(),this.wt.dispose(),this.us=!0)}debug(B){this.ds=B}get grid(){return this.qQ}get font(){return this.Vt}get mode(){return this.Qs}get bQ(){return this.As}get frameCount(){return this.ls}set frameCount(B){this.ls=B}get width(){return this.XQ.width}get height(){return this.XQ.height}get Os(){return this.us}}class Y{static async create(e,B={}){if(e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement)return H.create(e,B);{const s=e||{};return H.create(null,s)}}static Us(e){d.u(e)}static get version(){return"0.1.6-beta.6"}}const MA=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),TA=Y.create,RA=Y.Us,SA=Y.version;I.ks=q,I.Vs=AA,I.Hs=b,I.Rs=K,I.$s=Z,I.zs=H,I.wB=DA,I.create=TA,I.Js=MA,I.Us=RA,I.Ls=Y,I.version=SA,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"})},typeof exports=="object"&&typeof module<"u"?t(exports):typeof define=="function"&&define.amd?define(["exports"],t):t((A=typeof globalThis<"u"?globalThis:A||self).Ls={});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
var Yt=Object.defineProperty;var Pt=(v,x,L)=>x in v?Yt(v,x,{enumerable:!0,configurable:!0,writable:!0,value:L}):v[x]=L;var l=(v,x,L)=>Pt(v,typeof x!="symbol"?x+"":x,L);var t,e;t=this,e=function(v){class x extends Error{constructor(i,r,o={}){super(x.i(i,o));l(this,"t");l(this,"context");this.name="TextmodeError",this.t=r,this.context=o}static i(i,r){let o=i;if(r&&Object.keys(r).length>0){o+=`
|
|
2
|
+
|
|
3
|
+
📋 Context:`;for(const[n,h]of Object.entries(r))o+=`
|
|
4
|
+
- ${n}: ${x.o(h)}`}return o+=`
|
|
5
|
+
|
|
6
|
+
`,o+="↓".repeat(24)+`
|
|
7
|
+
`,o}static o(i){if(i===null)return"null";if(i===void 0)return"undefined";if(typeof i=="string")return`"${i}"`;if(typeof i=="number"||typeof i=="boolean")return i+"";if(Array.isArray(i))return i.length===0?"[]":i.length<=5?`[${i.map(r=>x.o(r)).join(", ")}]`:`[${i.slice(0,3).map(r=>x.o(r)).join(", ")}, ... +${i.length-3} more]`;if(typeof i=="object"){const r=Object.keys(i);return r.length===0?"{}":r.length<=3?`{ ${r.map(o=>`${o}: ${x.o(i[o])}`).join(", ")} }`:`{ ${r.slice(0,2).map(o=>`${o}: ${x.o(i[o])}`).join(", ")}, ... +${r.length-2} more }`}return i+""}}var L=(c=>(c[c.SILENT=0]="SILENT",c[c.WARNING=1]="WARNING",c[c.ERROR=2]="ERROR",c[c.THROW=3]="THROW",c))(L||{});const D=class D{constructor(){l(this,"l",{u:3})}static m(){return D.h||(D.h=new D),D.h}p(s,i,r){const o="%c[textmode.js] Oops! (╯°□°)╯︵ Something went wrong in your code.",n="color: #f44336; font-weight: bold; background: #ffebee; padding: 2px 6px; border-radius: 3px;";switch(this.l.u){case 0:return!1;case 1:return console.group(o,n),console.warn(x.i(s,i)),console.groupEnd(),!1;case 2:return console.group(o,n),console.error(x.i(s,i)),console.groupEnd(),!1;default:throw new x(s,r,i)}}validate(s,i,r){return!!s||(this.p(i,r),!1)}v(s){this.l.u=s}};l(D,"h",null);let k=D;const y=k.m(),X=new WeakMap;function P(c,s){X.set(c,s)}function W(c){return X.get(c)}class q{constructor(s,i,r=i,o={}){l(this,"_");l(this,"C");l(this,"F");l(this,"$");l(this,"M");l(this,"options");l(this,"D",null);l(this,"S",null);this._=s,this.$=i,this.M=r,this.options={filter:"nearest",wrap:"clamp",format:"rgba",type:"unsigned_byte",...o},this.F=this.createTexture(),this.C=s.createFramebuffer(),this.V()}R(s){const{_:i}=this,r=i.getParameter(i.FRAMEBUFFER_BINDING);i.bindFramebuffer(i.FRAMEBUFFER,this.C);try{return s()}finally{i.bindFramebuffer(i.FRAMEBUFFER,r)}}createTexture(){const{_:s}=this,i=s.createTexture();s.bindTexture(s.TEXTURE_2D,i);const r=this.options.filter==="linear"?s.LINEAR:s.NEAREST,o=this.options.wrap==="repeat"?s.REPEAT:s.CLAMP_TO_EDGE;return s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,r),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,r),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,o),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,o),this.k(),i}k(){const{_:s}=this,i=this.options.type==="float"?s.FLOAT:s.UNSIGNED_BYTE;s.texImage2D(s.TEXTURE_2D,0,s.RGBA,this.$,this.M,0,s.RGBA,i,null)}V(){const{_:s}=this;s.bindFramebuffer(s.FRAMEBUFFER,this.C),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,this.F,0),s.bindFramebuffer(s.FRAMEBUFFER,null)}update(s){const{_:i}=this;i.bindTexture(i.TEXTURE_2D,this.F),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,1),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,s),i.bindTexture(i.TEXTURE_2D,null)}I(s,i,r){const{_:o}=this;o.bindTexture(o.TEXTURE_2D,this.F),o.texImage2D(o.TEXTURE_2D,0,o.RGBA,i,r,0,o.RGBA,o.UNSIGNED_BYTE,s),o.bindTexture(o.TEXTURE_2D,null)}resize(s,i){const{_:r}=this;this.$=s,this.M=i,this.S=null,r.bindTexture(r.TEXTURE_2D,this.F),this.k(),r.bindTexture(r.TEXTURE_2D,null)}P(){const{_:s}=this;this.D={framebuffer:s.getParameter(s.FRAMEBUFFER_BINDING),viewport:s.getParameter(s.VIEWPORT)},s.bindFramebuffer(s.FRAMEBUFFER,this.C),s.viewport(0,0,this.$,this.M),P(s,[0,0,this.$,this.M])}end(){if(!this.D)return;const{_:s}=this;s.bindFramebuffer(s.FRAMEBUFFER,this.D.framebuffer),s.viewport(...this.D.viewport),P(s,this.D.viewport),this.D=null}A(){const{_:s}=this;this.S||(this.S=new Uint8Array(this.$*this.M*4)),this.R(()=>{s.readPixels(0,0,this.$,this.M,s.RGBA,s.UNSIGNED_BYTE,this.S)})}get(s,i,r,o){const{_:n}=this;if(s===void 0&&i===void 0){const h=new Uint8Array(this.$*this.M*4);return this.R(()=>(n.readPixels(0,0,this.$,this.M,n.RGBA,n.UNSIGNED_BYTE,h),h))}if(r===void 0&&o===void 0){(s<0||i<0||s>=this.$||i>=this.M)&&(console.warn("The x and y values passed to Framebuffer.get are outside of its range and will be clamped."),s=Math.max(0,Math.min(s,this.$-1)),i=Math.max(0,Math.min(i,this.M-1)));const h=new Uint8Array(4);return this.R(()=>(n.readPixels(s,i,1,1,n.RGBA,n.UNSIGNED_BYTE,h),[h[0],h[1],h[2],h[3]]))}{s=Math.max(0,Math.min(s,this.$-1)),i=Math.max(0,Math.min(i,this.M-1)),r=Math.max(1,Math.min(r,this.$-s)),o=Math.max(1,Math.min(o,this.M-i));const h=new Uint8Array(r*o*4);return this.R(()=>(n.readPixels(s,i,r,o,n.RGBA,n.UNSIGNED_BYTE,h),h))}}dispose(){this.C&&this._.deleteFramebuffer(this.C),this.F&&this._.deleteTexture(this.F)}get framebuffer(){return this.C}get texture(){return this.F}get width(){return this.$}get height(){return this.M}get U(){return this.S}}class E{constructor(s,i,r){l(this,"_");l(this,"G");l(this,"L",new Map);l(this,"O",new Map);l(this,"H",0);l(this,"j");this._=s,this.G=this.createProgram(i,r),this.j=s.getParameter(s.MAX_TEXTURE_IMAGE_UNITS),this.W()}W(){const s=this._.getProgramParameter(this.G,this._.ACTIVE_UNIFORMS);for(let i=0;i<s;i++){const r=this._.getActiveUniform(this.G,i);if(r){const o=this._.getUniformLocation(this.G,r.name);o&&(this.L.set(r.name,o),this.O.set(r.name,r.type))}}}createProgram(s,i){const r=this.createShader(this._.VERTEX_SHADER,s),o=this.createShader(this._.FRAGMENT_SHADER,i),n=this._.createProgram();if(this._.attachShader(n,r),this._.attachShader(n,o),this._.linkProgram(n),!this._.getProgramParameter(n,this._.LINK_STATUS)){const h=this._.getProgramInfoLog(n);throw Error("Shader program link error: "+h)}return this._.deleteShader(r),this._.deleteShader(o),n}createShader(s,i){const r=this._.createShader(s);if(this._.shaderSource(r,i),this._.compileShader(r),!this._.getShaderParameter(r,this._.COMPILE_STATUS)){const o=this._.getShaderInfoLog(r);throw this._.deleteShader(r),Error("Shader compilation error: "+o)}return r}N(){this._.useProgram(this.G),this.X()}Y(s,i){const r=this.L.get(s);if(r)if(typeof i=="number")this.q(s)?this._.uniform1i(r,Math.floor(i)):this._.uniform1f(r,i);else if(typeof i=="boolean")this._.uniform1i(r,i?1:0);else if(Array.isArray(i))switch(i.length){case 2:this._.uniform2f(r,i[0],i[1]);break;case 3:this._.uniform3f(r,i[0],i[1],i[2]);break;case 4:this._.uniform4f(r,i[0],i[1],i[2],i[3]);break;default:console.warn(`Unsupported array length ${i.length} for uniform '${s}'`)}else if(i instanceof WebGLTexture){const o=this.Z();this._.uniform1i(r,o),this._.activeTexture(this._.TEXTURE0+o),this._.bindTexture(this._.TEXTURE_2D,i)}else if(i instanceof q){const o=this.Z();this._.uniform1i(r,o),this._.activeTexture(this._.TEXTURE0+o),this._.bindTexture(this._.TEXTURE_2D,i.texture)}else console.warn(`Unsupported uniform type for '${s}':`,typeof i)}Z(){return this.H>=this.j&&console.warn(`Exceeded maximum texture units (${this.j}). Texture may not render correctly.`),this.H++}q(s){const i=this.O.get(s);return!!i&&(i===this._.INT||i===this._.INT_VEC2||i===this._.INT_VEC3||i===this._.INT_VEC4||i===this._.SAMPLER_2D||i===this._.SAMPLER_CUBE)}get J(){return this.G}dispose(){this._.deleteProgram(this.G)}X(){this.H=0}}class J{constructor(s){l(this,"_");l(this,"K",null);l(this,"tt",16);l(this,"et",new Map);this._=s}st(){if(this.K)return;const s=this._;this.K=s.createBuffer(),s.bindBuffer(s.ARRAY_BUFFER,this.K)}it(){const s=this._,i=s.getParameter(s.CURRENT_PROGRAM);let r=this.et.get(i);return r||(r={rt:s.getAttribLocation(i,"a_position"),ot:s.getAttribLocation(i,"a_texCoord")},this.et.set(i,r)),s.enableVertexAttribArray(r.rt),s.vertexAttribPointer(r.rt,2,s.FLOAT,!1,this.tt,0),s.enableVertexAttribArray(r.ot),s.vertexAttribPointer(r.ot,2,s.FLOAT,!1,this.tt,8),{nt:r.rt,ht:r.ot}}lt(s,i){const r=this._;r.disableVertexAttribArray(s),r.disableVertexAttribArray(i)}ct(s,i){const r=this._,o=W(r)||[0,0,r.canvas.width,r.canvas.height];return{ut:s/o[2]*2-1,ft:1-i/o[3]*2}}dt(s,i,r,o){const n=this._;this.st(),n.bindBuffer(n.ARRAY_BUFFER,this.K);const h=new Float32Array([s,o,0,0,r,o,1,0,s,i,0,1,s,i,0,1,r,o,1,0,r,i,1,1]);n.bufferData(n.ARRAY_BUFFER,h,n.DYNAMIC_DRAW)}dispose(){this.K&&this._.deleteBuffer(this.K)}}class ot extends J{constructor(s){super(s)}gt(s,i,r,o){const n=this.ct(s,i),h=this.ct(s+r,i+o);this.dt(n.ut,n.ft,h.ut,h.ft);const a=this.it();this._.drawArrays(this._.TRIANGLES,0,6),this.lt(a.nt,a.ht)}vt(s,i,r,o,n){this.gt(s,i,r,n),this.gt(s+r-n,i,n,o),this.gt(s,i+o-n,r,n),this.gt(s,i,n,o)}}class nt extends J{constructor(s){super(s)}draw(s,i,r,o,n){const h=r-s,a=o-i,u=Math.hypot(h,a);if(u===0){const d=n/2,g=this.ct(s-d,i-d),p=this.ct(s+d,i+d);this.dt(g.ut,g.ft,p.ut,p.ft)}else{const d=-a/u,g=h/u,p=n/2,w=s+d*p,b=i+g*p,_=s-d*p,T=i-g*p,R=r+d*p,C=o+g*p,M=r-d*p,$=o-g*p,N=this.ct(w,b),A=this.ct(_,T),S=this.ct(R,C),rt=this.ct(M,$),Y=this._;this.st(),Y.bindBuffer(Y.ARRAY_BUFFER,this.K);const Bt=new Float32Array([N.ut,N.ft,0,0,A.ut,A.ft,0,1,S.ut,S.ft,1,0,A.ut,A.ft,0,1,rt.ut,rt.ft,1,1,S.ut,S.ft,1,0]);Y.bufferData(Y.ARRAY_BUFFER,Bt,Y.DYNAMIC_DRAW)}const f=this.it();this._.drawArrays(this._.TRIANGLES,0,6),this.lt(f.nt,f.ht)}}var F="attribute vec2 a_position;attribute vec2 a_texCoord;varying vec2 v_uv;uniform float u_rotation;uniform vec2 u_center;uniform float u_aspectRatio;mat2 rotate2D(float angle){float s=sin(angle);float c=cos(angle);return mat2(c,-s,s,c);}void main(){v_uv=a_texCoord;vec2 pos=a_position;pos-=u_center;pos.x*=u_aspectRatio;pos=rotate2D(-u_rotation)*pos;pos.x/=u_aspectRatio;pos+=u_center;gl_Position=vec4(pos,0.0,1.0);}";class ht{constructor(s){l(this,"_");l(this,"_t");l(this,"xt");l(this,"bt",null);l(this,"wt");l(this,"Ct");l(this,"yt",[1,1,1,1]);l(this,"Ft",!0);l(this,"Tt",[0,0,0,1]);l(this,"$t",1);l(this,"Mt",!0);l(this,"Dt",0);l(this,"St",[]);this._=s,this._t=new E(this._,F,"precision lowp float;uniform sampler2D u_texture;varying vec2 v_uv;void main(){gl_FragColor=texture2D(u_texture,v_uv);}"),this.xt=new E(this._,F,"precision lowp float;uniform vec4 u_color;void main(){gl_FragColor=u_color;}"),this.wt=new ot(this._),this.Ct=new nt(this._),this._.enable(this._.BLEND),this._.blendEquation(this._.FUNC_ADD),this._.blendFunc(this._.ONE,this._.ONE_MINUS_SRC_ALPHA),P(this._,[0,0,this._.canvas.width,this._.canvas.height])}Vt(s){this.bt!==s&&(this.bt=s,s.N())}fill(s,i,r,o){if(this.Ft=!0,i===void 0&&r===void 0&&o===void 0){const n=s/255;this.yt=[n,n,n,1]}else if(r!==void 0&&o===void 0)this.yt=[s/255,i/255,r/255,1];else{if(r===void 0||o===void 0)throw Error("Invalid fill parameters. Use fill(gray), fill(r,g,b), or fill(r,g,b,a)");this.yt=[s/255,i/255,r/255,o/255]}}stroke(s,i,r,o){if(this.Mt=!0,i===void 0&&r===void 0&&o===void 0){const n=s/255;this.Tt=[n,n,n,1]}else if(r!==void 0&&o===void 0)this.Tt=[s/255,i/255,r/255,1];else{if(r===void 0||o===void 0)throw Error("Invalid stroke parameters. Use stroke(gray), stroke(r,g,b), or stroke(r,g,b,a)");this.Tt=[s/255,i/255,r/255,o/255]}}Rt(s){if(s<0)throw Error("Stroke weight must be non-negative");this.$t=s}kt(){this.Mt=!1}zt(){this.Ft=!1}rotate(s){this.Dt=s}push(){this.St.push({It:[...this.yt],Ft:this.Ft,Pt:[...this.Tt],Rt:this.$t,Mt:this.Mt,rotation:this.Dt})}pop(){const s=this.St.pop();s?(this.yt=s.It,this.Ft=s.Ft,this.Tt=s.Pt,this.$t=s.Rt,this.Mt=s.Mt,this.Dt=s.rotation):console.warn("pop() called without matching push()")}reset(){this.bt=null,this.St=[],this.Dt=0}createShader(s,i){return new E(this._,s,i)}At(s){return new E(this._,F,s)}Y(s,i){this.bt.Y(s,i)}rect(s,i,r,o){if(this.bt!==null){const{Ut:g,Gt:p,Et:w,aspectRatio:b}=this.Lt(s,i,r,o);return this.Y("u_rotation",w),this.Y("u_center",[g,p]),this.Y("u_aspectRatio",b),this.wt.gt(s,i,r,o),void(this.bt=null)}const n=this.xt;let h=0,a=0,u=0,f=1;const d=this.Lt(s,i,r,o);h=d.Ut,a=d.Gt,u=d.Et,f=d.aspectRatio,this.Ft&&(this.Vt(n),this.Y("u_color",this.yt),this.Y("u_rotation",u),this.Y("u_center",[h,a]),this.Y("u_aspectRatio",f),this.wt.gt(s,i,r,o)),this.Mt&&this.$t>0&&(this.Vt(n),this.Y("u_color",this.Tt),this.Y("u_rotation",u),this.Y("u_center",[h,a]),this.Y("u_aspectRatio",f),this.wt.vt(s,i,r,o,this.$t)),this.bt=null}line(s,i,r,o){if(this.bt!==null){const _=(s+r)/2,T=(i+o)/2,R=Math.abs(r-s)||1,C=Math.abs(o-i)||1,{Ut:M,Gt:$,Et:N,aspectRatio:A}=this.Lt(_-R/2,T-C/2,R,C);this.Y("u_rotation",N),this.Y("u_center",[M,$]),this.Y("u_aspectRatio",A);const S=this.$t>0?this.$t:1;return this.Ct.draw(s,i,r,o,S),void(this.bt=null)}if(!this.Mt||this.$t<=0)return;const n=this.xt,h=(s+r)/2,a=(i+o)/2,u=Math.abs(r-s)||1,f=Math.abs(o-i)||1,d=this.Dt!==0;let g=0,p=0,w=0,b=1;if(d){const _=this.Lt(h-u/2,a-f/2,u,f);g=_.Ut,p=_.Gt,w=_.Et,b=_.aspectRatio}this.Vt(n),this.Y("u_color",this.Tt),d&&(this.Y("u_rotation",w),this.Y("u_center",[g,p]),this.Y("u_aspectRatio",b)),this.Ct.draw(s,i,r,o,this.$t)}Lt(s,i,r,o){const n=W(this._)||[0,0,this._.canvas.width,this._.canvas.height],h=n[2],a=n[3],u=h/a;return{Ut:(s+r/2)/h*2-1,Gt:1-(i+o/2)/a*2,Et:this.Dt*Math.PI/180,aspectRatio:u}}createFramebuffer(s,i,r={}){return new q(this._,s,i,r)}background(s,i=s,r=s,o=255){this.clear(s/255,i/255,r/255,o/255)}clear(s=0,i=0,r=0,o=0){this._.clearColor(s,i,r,o),this._.clear(this._.COLOR_BUFFER_BIT)}Ot(){this._.viewport(0,0,this._.canvas.width,this._.canvas.height),P(this._,[0,0,this._.canvas.width,this._.canvas.height])}get context(){return this._}dispose(){this._t.dispose(),this.xt.dispose(),this.wt.dispose(),this.Ct.dispose()}image(s,i,r,o,n){const h=this._,a=o??s.width,u=n??s.height;this.Vt(this._t),this.Y("u_texture",s.texture);const f=this.Lt(i,r,a,u);this.Y("u_rotation",f.Et),this.Y("u_center",[f.Ut,f.Gt]),this.Y("u_aspectRatio",f.aspectRatio),this.wt.gt(i,r,a,u),h.bindTexture(h.TEXTURE_2D,null),this.bt=null}}var U,m={parse:function(c){var s=function(i,r,o,n){var h=m.T,a={cmap:h.cmap,head:h.head,hhea:h.hhea,maxp:h.maxp,hmtx:h.hmtx,loca:h.loca,glyf:h.glyf},u={_data:i,_index:r,_offset:o};for(var f in a){var d=m.findTable(i,f,o);if(d){var g=d[0],p=n[g];p==null&&(p=a[f].Bt(i,g,d[1],u)),u[f]=n[g]=p}}return u}(new Uint8Array(c),0,0,{});return[s]},findTable:function(c,s,i){for(var r=m.B,o=r.Ht(c,i+4),n=i+12,h=0;h<o;h++){var a=r.jt(c,n,4);r.Wt(c,n+4);var u=r.Wt(c,n+8),f=r.Wt(c,n+12);if(a==s)return[u,f];n+=16}return null},T:{}};m.B={Nt:function(c,s){return m.B.Xt.uint16[0]=c[s]<<8|c[s+1],m.B.Xt.int16[0]},Ht:function(c,s){return c[s]<<8|c[s+1]},Yt:function(c,s,i){for(var r=[],o=0;o<i;o++)r.push(m.B.Ht(c,s+2*o));return r},Wt:function(c,s){var i=m.B.Xt.uint8;return i[3]=c[s],i[2]=c[s+1],i[1]=c[s+2],i[0]=c[s+3],m.B.Xt.uint32[0]},jt:function(c,s,i){for(var r="",o=0;o<i;o++)r+=String.fromCharCode(c[s+o]);return r},Xt:(U=new ArrayBuffer(8),{uint8:new Uint8Array(U),int16:new Int16Array(U),uint16:new Uint16Array(U),uint32:new Uint32Array(U)})},m.T.cmap={Bt:function(c,s,i){var r={qt:[],Qt:{},off:s};c=new Uint8Array(c.buffer,s,i),s=0;var o=m.B,n=o.Ht,h=m.T.cmap;n(c,s);var a=n(c,s+=2);s+=2;for(var u=[],f=0;f<a;f++){var d=n(c,s),g=n(c,s+=2);s+=2;var p=o.Wt(c,s);s+=4;var w="p"+d+"e"+g,b=u.indexOf(p);if(b==-1){b=r.qt.length;var _={};u.push(p);var T=_.format=n(c,p);T==4?_=h.Zt(c,p,_):T==12&&(_=h.Jt(c,p,_)),r.qt.push(_)}r.Qt[w]!=null&&console.log("multiple tables for one platform+encoding: "+w),r.Qt[w]=b}return r},Zt:function(c,s,i){var r=m.B,o=r.Ht,n=r.Yt,h=s,a=o(c,s+=2);o(c,s+=2);var u=o(c,s+=2);s+=2;var f=u>>>1;i.Kt=o(c,s),s+=2,i.te=o(c,s),s+=2,i.ee=o(c,s),s+=2,i.se=n(c,s,f),s+=2*f,s+=2,i.ie=n(c,s,f),s+=2*f,i.re=[];for(var d=0;d<f;d++)i.re.push(r.Nt(c,s)),s+=2;return i.oe=n(c,s,f),s+=2*f,i.ne=n(c,s,h+a-s>>1),i},Jt:function(c,s,i){var r=m.B.Wt;r(c,s+=4),r(c,s+=4);var o=3*r(c,s+=4);s+=4;for(var n=i.groups=new Uint32Array(o),h=0;h<o;h+=3)n[h]=r(c,s+(h<<2)),n[h+1]=r(c,s+(h<<2)+4),n[h+2]=r(c,s+(h<<2)+8);return i}},m.T.head={Bt:function(c,s,i){var r=m.B,o={};return s+=18,o.unitsPerEm=r.Ht(c,s),s+=2,s+=16,o.xMin=r.Nt(c,s),s+=2,o.yMin=r.Nt(c,s),s+=2,o.xMax=r.Nt(c,s),s+=2,o.yMax=r.Nt(c,s),s+=2,s+=6,o.indexToLocFormat=r.Nt(c,s),o}},m.T.hhea={Bt:function(c,s,i){var r=m.B,o={};s+=4;for(var n=["ascender","descender","lineGap","advanceWidthMax","minLeftSideBearing","minRightSideBearing","xMaxExtent","caretSlopeRise","caretSlopeRun","caretOffset","res0","res1","res2","res3","metricDataFormat","numberOfHMetrics"],h=0;h<n.length;h++){var a=n[h],u=a=="advanceWidthMax"||a=="numberOfHMetrics"?r.Ht:r.Nt;o[a]=u(c,s+2*h)}return o}},m.T.hmtx={Bt:function(c,s,i,r){for(var o=m.B,n=[],h=[],a=r.maxp.numGlyphs,u=r.hhea.numberOfHMetrics,f=0,d=0,g=0;g<u;)f=o.Ht(c,s+(g<<2)),d=o.Nt(c,s+(g<<2)+2),n.push(f),h.push(d),g++;for(;g<a;)n.push(f),h.push(d),g++;return{he:n,ae:h}}},m.T.maxp={Bt:function(c,s,i){var r=m.B,o=r.Ht,n={};return r.Wt(c,s),s+=4,n.numGlyphs=o(c,s),s+=2,n}},m.T.loca={Bt:function(c,s,i,r){var o=m.B,n=[],h=r.head.indexToLocFormat,a=r.maxp.numGlyphs+1;if(h==0)for(var u=0;u<a;u++)n.push(o.Ht(c,s+(u<<1))<<1);if(h==1)for(u=0;u<a;u++)n.push(o.Wt(c,s+(u<<2)));return n}},m.T.glyf={Bt:function(c,s,i,r){for(var o=[],n=r.maxp.numGlyphs,h=0;h<n;h++)o.push(null);return o},le:function(c,s){var i=m.B,r=c._data,o=c.loca;if(o[s]==o[s+1])return null;var n=m.findTable(r,"glyf",c._offset)[0]+o[s],h={};if(h.ce=i.Nt(r,n),n+=2,h.xMin=i.Nt(r,n),n+=2,h.yMin=i.Nt(r,n),n+=2,h.xMax=i.Nt(r,n),n+=2,h.yMax=i.Nt(r,n),n+=2,h.xMin>=h.xMax||h.yMin>=h.yMax)return null;if(h.ce>0){h.ue=[];for(var a=0;a<h.ce;a++)h.ue.push(i.Ht(r,n)),n+=2;var u=i.Ht(r,n);if(n+=2,r.length-n<u)return null;n+=u;var f=h.ue[h.ce-1]+1;for(h.flags=[],a=0;a<f;a++){var d=r[n];if(n++,h.flags.push(d),8&d){var g=r[n];n++;for(var p=0;p<g;p++)h.flags.push(d),a++}}for(h.fe=[],a=0;a<f;a++){var w=!!(2&h.flags[a]),b=!!(16&h.flags[a]);w?(h.fe.push(b?r[n]:-r[n]),n++):b?h.fe.push(0):(h.fe.push(i.Nt(r,n)),n+=2)}for(h.de=[],a=0;a<f;a++)w=!!(4&h.flags[a]),b=!!(32&h.flags[a]),w?(h.de.push(b?r[n]:-r[n]),n++):b?h.de.push(0):(h.de.push(i.Nt(r,n)),n+=2);var _=0,T=0;for(a=0;a<f;a++)_+=h.fe[a],T+=h.de[a],h.fe[a]=_,h.de[a]=T}else h.me=[];return h}},typeof module<"u"&&module.exports?module.exports=m:typeof window<"u"&&(window.Typr=m);class at{ge(s){var r;const i=[];return(r=s==null?void 0:s.cmap)!=null&&r.qt?(s.cmap.qt.forEach(o=>{if(o.format===4){const n=this.pe(o);i.push(...n)}else if(o.format===12){const n=this.ve(o);i.push(...n)}}),[...new Set(i)]):[]}pe(s){const i=[];if(!(s.ie&&s.se&&s.oe&&s.re))return i;for(let r=0;r<s.ie.length;r++){const o=s.ie[r],n=s.se[r];if(o!==65535||n!==65535){for(let h=o;h<=n;h++)if(this._e(s,h,r)>0){const a=String.fromCodePoint(h);i.push(a)}}}return i}ve(s){const i=[];if(!s.groups)return i;for(let r=0;r<s.groups.length;r+=3){const o=s.groups[r],n=s.groups[r+1],h=s.groups[r+2];for(let a=o;a<=n;a++)if(h+(a-o)>0){const u=String.fromCodePoint(a);i.push(u)}}return i}_e(s,i,r){if(s.oe[r]===0)return i+s.re[r]&65535;{const o=s.oe[r]/2+(i-s.ie[r])-(s.ie.length-r);if(o>=0&&s.ne&&o<s.ne.length){const n=s.ne[o];if(n!==0)return n+s.re[r]&65535}}return 0}xe(s){return s.filter(i=>this.be(i))}be(s){const i=s.codePointAt(0)||0;return!(i>=0&&i<=31&&i!==9&&i!==10&&i!==13||i>=127&&i<=159)}}class lt{constructor(s){l(this,"we");l(this,"Ce");l(this,"ye");this.ye=s,this.we=document.createElement("canvas"),this.Ce=this.we.getContext("2d",{Fe:!0,alpha:!1})}Te(s,i,r,o){const n=s.length,h=Math.ceil(Math.sqrt(n)),a=Math.ceil(n/h),u=i.width*h,f=i.height*a;this.$e(u,f,r,o),this.Me(s,i,h,r),this.De();const d=this.ye.createFramebuffer(u,f,{filter:"nearest"});return d.update(this.we),{framebuffer:d,columns:h,rows:a}}$e(s,i,r,o){this.we.width=s,this.we.height=i,this.we.style.width=s+"px",this.we.style.height=s+"px",this.Ce.imageSmoothingEnabled=!1,this.we.style.imageRendering="pixelated",this.Ce.fillStyle="black",this.Ce.fillRect(0,0,s,i),this.Ce.font=`${r}px ${o}`,this.Ce.textBaseline="top",this.Ce.textAlign="left",this.Ce.fillStyle="white"}Me(s,i,r,o){for(let n=0;n<s.length;n++){const h=n%r,a=Math.floor(n/r),u=h*i.width+.5*i.width,f=a*i.height+.5*i.height,d=Math.round(u-.5*i.width),g=Math.round(f-.5*o);this.Ce.fillText(s[n].Se,d,g)}}De(s=128){const i=this.Ce.getImageData(0,0,this.we.width,this.we.height),r=i.data;for(let o=0;o<r.length;o+=4){const n=.299*r[o]+.587*r[o+1]+.114*r[o+2]>s+32?255:0;r[o]=n,r[o+1]=n,r[o+2]=n}this.Ce.putImageData(i,0,0)}}class ct{constructor(){l(this,"Ve");l(this,"Re");this.Ve=document.createElement("canvas"),this.Re=this.Ve.getContext("2d")}ke(s,i,r){this.Re.font=`${i}px ${r}`;let o=0,n=0;for(const h of s){const a=this.Re.measureText(h);o=Math.max(o,a.width),n=Math.max(n,a.actualBoundingBoxAscent+a.actualBoundingBoxDescent)}return{width:o,height:n}}}class ut{ze(s,i){return s.map((r,o)=>{const n=r.codePointAt(0)||0,h=this.Ie(o);let a=0;if(i.hmtx&&i.hmtx.he){const u=this.Pe(i,n);u>0&&i.hmtx.he[u]!==void 0&&(a=i.hmtx.he[u])}return{Se:r,unicode:n,color:h,Ae:a}})}Pe(s,i){const r=s.cmap;if(!r||!r.qt)return 0;for(const o of r.qt)if(o.format===4){for(let n=0;n<o.ie.length;n++)if(i>=o.ie[n]&&i<=o.se[n]){if(o.oe[n]===0)return i+o.re[n]&65535;{const h=o.oe[n]/2+(i-o.ie[n])-(o.ie.length-n);if(h>=0&&h<o.ne.length){const a=o.ne[h];if(a!==0)return a+o.re[n]&65535}}}}return 0}Ie(s){return[s%256,Math.floor(s/256)%256,Math.floor(s/65536)%256]}Ue(s,i){if(!y.validate(typeof s=="string","Character must be a string.",{method:"getCharacterColor",Ge:s}))return[0,0,0];const r=i.find(o=>o.Se===s);return r?r.color:[0,0,0]}Ee(s,i){return y.validate(typeof s=="string"&&s.length>0,"Characters must be a string with at least one character.",{method:"getCharacterColors",Ge:s})?s.split("").map(r=>this.Ue(r,i)||[0,0,0]):[[0,0,0]]}}class Z{constructor(s,i=16){l(this,"Le");l(this,"Oe",[]);l(this,"Be");l(this,"He",16);l(this,"je",0);l(this,"We",0);l(this,"Ne",{width:0,height:0});l(this,"Xe");l(this,"Ye","UrsaFont");l(this,"qe");l(this,"Qe");l(this,"Ze");l(this,"Je");this.He=i,this.qe=new at,this.Qe=new lt(s),this.Ze=new ct,this.Je=new ut}async initialize(s){let i;if(!s)throw new x("Embedded font not available. This appears to be a minified build - please provide `fontSource`.");{const r=await fetch(s);if(!r.ok)throw new x(`Failed to load font file: ${r.status} ${r.statusText}`);i=await r.arrayBuffer()}await this.Ke(i),this.Le=m.parse(i)[0],await this.ts()}es(s){if(s===void 0)return this.He;this.He=s,this.Ne=this.Ze.ke(this.Oe.map(r=>r.Se),this.He,this.Ye);const i=this.Qe.Te(this.Oe,this.Ne,this.He,this.Ye);this.Be=i.framebuffer,this.je=i.columns,this.We=i.rows}async ss(s){try{const i=await fetch(s);if(!i.ok)throw new x(`Failed to load font file: ${i.status} ${i.statusText}`);const r=await i.arrayBuffer();await this.Ke(r);const o=m.parse(r);if(!o||o.length===0)throw Error("Failed to parse font file");this.Le=o[0],await this.ts()}catch(i){throw new x("Failed to load font: "+(i instanceof Error?i.message:"Unknown error"),i)}}async Ke(s){const i=Date.now();this.Ye=this.Ye==="UrsaFont"?"UrsaFont":"CustomFont_"+i,this.Xe=new FontFace(this.Ye,s),await this.Xe.load(),document.fonts.add(this.Xe)}async ts(){const s=this.qe.ge(this.Le),i=this.qe.xe(s);this.Oe=this.Je.ze(i,this.Le),this.Ne=this.Ze.ke(i,this.He,this.Ye);const r=this.Qe.Te(this.Oe,this.Ne,this.He,this.Ye);this.Be=r.framebuffer,this.je=r.columns,this.We=r.rows}Ue(s){return this.Je.Ue(s,this.Oe)}Ee(s){return this.Je.Ee(s,this.Oe)}rs(s){if(typeof s!="string"||s.length===0)return!1;const i=new Set(this.Oe.map(r=>r.Se));for(const r of s)if(!i.has(r))return!1;return!0}get ns(){return this.Be}get hs(){return this.Oe}get ls(){return this.je}get cs(){return this.We}get us(){return this.Ne}dispose(){this.Be.dispose(),document.fonts.delete(this.Xe)}get fontSize(){return this.He}get font(){return this.Le}}class K{constructor(s,i,r){l(this,"fs");l(this,"ds");l(this,"$");l(this,"M");l(this,"gs");l(this,"ps");l(this,"vs",!1);l(this,"_s");l(this,"xs");l(this,"bs");this._s=s,this.xs=i,this.bs=r,this.reset()}reset(){this.vs||(this.fs=Math.floor(this._s.width/this.xs),this.ds=Math.floor(this._s.height/this.bs)),this.ws()}ws(){this.$=this.fs*this.xs,this.M=this.ds*this.bs,this.gs=Math.floor((this._s.width-this.$)/2),this.ps=Math.floor((this._s.height-this.M)/2)}Cs(s,i){this.xs=s,this.bs=i,this.reset()}ys(s,i){this.vs=!0,this.fs=s,this.ds=i,this.ws()}Fs(){this.vs=!1,this.reset()}resize(){this.vs?this.ws():this.reset()}Ts(s){if(s===void 0)return this.vs;this.vs=s}get $s(){return this.xs}get Ms(){return this.bs}get cols(){return this.fs}get rows(){return this.ds}get width(){return this.$}get height(){return this.M}get offsetX(){return this.gs}get offsetY(){return this.ps}}class Q{constructor(s,i=!1,r={}){l(this,"_s");l(this,"Ds");l(this,"Ss");l(this,"Vs");l(this,"Rs");this.Ds=s,this.Ss=i,this._s=this.ks(r.width,r.height),i&&this.zs()}ks(s,i){var o;const r=document.createElement("canvas");if(r.className="textmodeCanvas",r.style.imageRendering="pixelated",this.Ss)r.width=s||800,r.height=i||600,document.body.appendChild(r);else{const n=this.Ds.getBoundingClientRect();let h=Math.round(n.width),a=Math.round(n.height);if(this.Ds instanceof HTMLVideoElement){const d=this.Ds;(h===0||a===0)&&d.videoWidth>0&&d.videoHeight>0&&(h=d.videoWidth,a=d.videoHeight)}r.width=h,r.height=a,r.style.position="absolute",r.style.pointerEvents="none";const u=window.getComputedStyle(this.Ds);let f=parseInt(u.zIndex||"0",10);isNaN(f)&&(f=0),r.style.zIndex=""+(f+1),this.Is(r),(o=this.Ds.parentNode)==null||o.insertBefore(r,this.Ds.nextSibling)}return r}Is(s){const i=this.Ds.getBoundingClientRect();let r=this.Ds.offsetParent;if(r&&r!==document.body){const o=r.getBoundingClientRect();s.style.top=i.top-o.top+"px",s.style.left=i.left-o.left+"px"}else s.style.top=i.top+window.scrollY+"px",s.style.left=i.left+window.scrollX+"px"}resize(s,i){if(this.Ss)this._s.width=s??this._s.width,this._s.height=i??this._s.height;else{const r=this.Ds.getBoundingClientRect();let o=Math.round(r.width),n=Math.round(r.height);if(this.Ds instanceof HTMLVideoElement){const h=this.Ds;(o===0||n===0)&&h.videoWidth>0&&h.videoHeight>0&&(o=h.videoWidth,n=h.videoHeight)}this._s.width=o,this._s.height=n,this.Is(this._s)}}Ps(){const s={alpha:!1,premultipliedAlpha:!1,As:!0,antialias:!1,Us:!1,Gs:!1,powerPreference:"high-performance"},i=this._s.getContext("webgl2",s)||this._s.getContext("webgl",s);if(!i)throw new x("WebGL context could not be created. Ensure your browser supports WebGL.");return i}zs(){this.Vs=new ResizeObserver(s=>{for(const i of s){const r=i.contentRect;!this.Rs||Math.round(r.width)===this._s.width&&Math.round(r.height)===this._s.height||this.Rs()}}),this.Vs.observe(this._s)}dispose(){if(this.Vs&&this.Vs.disconnect(),this._s){const s=this._s.getContext("webgl")||this._s.getContext("webgl2");if(s){const i=s.getExtension("WEBGL_lose_context");i&&i.Es()}this._s.parentNode&&this._s.parentNode.removeChild(this._s)}}get canvas(){return this._s}get width(){return this._s.width}get height(){return this._s.height}}class B{constructor(s,i,r,o={}){l(this,"Ls");l(this,"Os");l(this,"grid");l(this,"Bs");l(this,"Hs");l(this,"js");l(this,"Ws");l(this,"Ns");l(this,"l");this.Ls=s,this.Os=i,this.grid=r,this.l=o;const n=this.grid.cols,h=this.grid.rows;this.Bs=this.Ls.createFramebuffer(n,h),this.Hs=this.Ls.createFramebuffer(n,h),this.js=this.Ls.createFramebuffer(n,h),this.Ws=this.Ls.createFramebuffer(n,h),this.Ns=this.Ls.createFramebuffer(n,h)}resize(){const s=this.grid.cols,i=this.grid.rows;this.Bs.resize(s,i),this.Hs.resize(s,i),this.js.resize(s,i),this.Ws.resize(s,i),this.Ns.resize(s,i)}enabled(s){this.l.enabled=s}enable(){this.enabled(!0)}disable(){this.enabled(!1)}dispose(){this.Bs.dispose(),this.Hs.dispose(),this.js.dispose(),this.Ws.dispose(),this.Ns.dispose()}get Xs(){return this.Bs}get Ys(){return this.Hs}get qs(){return this.js}get Qs(){return this.Ws}get Zs(){return this.Ns}get options(){return this.l}}class ft{constructor(s,i){l(this,"C");l(this,"ye");l(this,"Js");this.ye=s,this.Js=i;const r=Math.max(this.Js.length,1);this.C=this.ye.createFramebuffer(r,1),this.Ks()}Ks(){const s=this.Js.length;this.C.width!==s&&this.C.resize(s,1);const i=new Uint8Array(1*s*4);for(let r=0;r<s;r++){const o=this.Js[r],n=4*r;i[n]=o[0],i[n+1]=o[1],i[n+2]=o[2],i[n+3]=255}this.C.I(i,s,1)}ti(s){this.Js=s,this.Ks()}get ei(){return this.Js}get framebuffer(){return this.C}get texture(){return this.C.texture}}class z extends B{constructor(i,r,o,n={}){super(i,r,o,n);l(this,"palette");this.palette=new ft(this.Ls,this.Os.Ee(" .:-=+*%@#"))}hs(i){y.validate(this.Os.rs(i),"One or more characters do not exist in the current font.",{method:"characters",Ge:i})&&(this.l.hs=i,this.palette.ti(this.Os.Ee(i)))}si(i,r,o,n=255){const h=this.ii(i,"characterColor",r,o,n);h&&(this.l.si=h)}ri(i){this.oi(i,"characterColorMode")}ni(i,r,o,n=255){const h=this.ii(i,"cellColor",r,o,n);h&&(this.l.ni=h)}hi(i){this.oi(i,"cellColorMode")}ai(i){this.li(i,"invert","Invert")}rotation(i){if(!y.validate(typeof i=="number","Rotation angle must be a number.",{method:"rotation",Ge:i}))return;(i%=360)<0&&(i+=360);const r=255*i/360,o=Math.floor(r)/255,n=Math.round(r-o);this.l.rotation=[o,n,0,1]}ci(i){this.li(i,"flipHorizontally","Flip horizontally")}ui(i){this.li(i,"flipVertically","Flip vertically")}ii(i,r,o,n,h=255){let a,u,f,d;if(typeof i=="string"){const g=this.fi(i);if(!g)return y.validate(!1,"Invalid hex color format. Use '#FF0000', '#F00', 'FF0000', or 'F00'.",{method:r,Ge:i}),null;[a,u,f,d]=g}else if(a=i,u=o!==void 0?o:i,f=n!==void 0?n:i,d=h,!y.validate([a,u,f,d].every(g=>g>=0&&g<=255),r.charAt(0).toUpperCase()+r.slice(1)+" color values must be between 0 and 255",{method:r,di:{r:a,g:u,b:f,a:d}}))return null;return[a/255,u/255,f/255,d/255]}oi(i,r){y.validate(["sampled","fixed"].includes(i),"Invalid color mode. Must be 'sampled' or 'fixed'.",{method:r,Ge:i})&&(this.l[r]=i)}li(i,r,o){y.validate(typeof i=="boolean"||typeof i=="number"&&Number.isInteger(i),o+" must be a boolean value or an integer (0 for false, any other number for true).",{method:r,Ge:i})&&(this.l[r]=!!i)}fi(i){return i=i.replace(/^#/,""),/^[0-9A-Fa-f]{3}$|^[0-9A-Fa-f]{6}$/.test(i)?(i.length===3&&(i=i.split("").map(r=>r+r).join("")),[parseInt(i.slice(0,2),16),parseInt(i.slice(2,4),16),parseInt(i.slice(4,6),16),255]):null}}const dt={enabled:!0,hs:" .:-=+*%@#",si:[1,1,1,1],ri:"sampled",ni:[0,0,0,1],hi:"fixed",ai:!1,rotation:[0,0,0,255],ci:!1,ui:!1,mi:[0,255]};class V extends z{constructor(i,r,o){super(i,r,o,{...dt});l(this,"gi");l(this,"pi");l(this,"_i");l(this,"xi");l(this,"bi");l(this,"wi");this.gi=new E(i.context,F,"precision lowp float;uniform sampler2D u_sketchTexture;uniform vec2 u_gridCellDimensions;uniform vec2 u_brightnessRange;varying vec2 v_uv;void main(){vec2 cellCenter=(floor(v_uv*u_gridCellDimensions)+vec2(0.5))/u_gridCellDimensions;vec4 color=texture2D(u_sketchTexture,cellCenter);float brightness=dot(color.rgb,vec3(0.299,0.587,0.114));float brightnessValue=brightness*255.0;if(brightnessValue>=u_brightnessRange.x&&brightnessValue<=u_brightnessRange.y){gl_FragColor=color;}else{gl_FragColor=vec4(0.0);}}"),this.pi=new E(i.context,F,"precision lowp float;uniform sampler2D u_sampleTexture;uniform vec4 u_fillColor;uniform bool u_useFixedColor;varying vec2 v_uv;void main(){vec4 sampleColor=texture2D(u_sampleTexture,v_uv);if(sampleColor.a>0.0){if(u_useFixedColor){gl_FragColor=u_fillColor;}else{gl_FragColor=sampleColor;}}else{gl_FragColor=vec4(0.0);}}"),this.xi=new E(i.context,F,"precision lowp float;uniform sampler2D u_sampleTexture;uniform bool u_invert;uniform bool u_flipHorizontally;uniform bool u_flipVertically;varying vec2 v_uv;void main(){vec4 sampleColor=texture2D(u_sampleTexture,v_uv);if(sampleColor.a>0.0){float invertValue=u_invert ? 1.0 : 0.0;float flipHValue=u_flipHorizontally ? 1.0 : 0.0;float flipVValue=u_flipVertically ? 1.0 : 0.0;gl_FragColor=vec4(invertValue,flipHValue,flipVValue,1.0);}else{gl_FragColor=vec4(0.0);}}"),this.bi=new E(i.context,F,"precision lowp float;uniform sampler2D u_sampleTexture;uniform vec4 u_rotationColor;varying vec2 v_uv;void main(){vec4 sampleColor=texture2D(u_sampleTexture,v_uv);if(sampleColor.a>0.0){gl_FragColor=u_rotationColor;}else{gl_FragColor=vec4(0.0);}}"),this._i=new E(i.context,F,"precision lowp float;uniform sampler2D u_colorSampleFramebuffer;uniform sampler2D u_charPaletteTexture;uniform vec2 u_charPaletteSize;uniform vec2 u_brightnessRange;varying vec2 v_uv;void main(){vec4 color=texture2D(u_colorSampleFramebuffer,v_uv);if(color.a==0.0){gl_FragColor=vec4(0.0);return;}float brightness=dot(color.rgb,vec3(0.299,0.587,0.114))*255.0;vec2 range=u_brightnessRange;if(brightness<range.x||brightness>range.y){gl_FragColor=vec4(0.0);return;}float t=(brightness-range.x)/(range.y-range.x);float idx=clamp(floor(t*u_charPaletteSize.x),0.0,u_charPaletteSize.x-1.0);vec3 charColor=texture2D(u_charPaletteTexture,vec2((idx+0.5)/u_charPaletteSize.x,0.0)).rgb;gl_FragColor=vec4(charColor,1.0);}"),this.wi=this.Ls.createFramebuffer(this.grid.cols,this.grid.rows)}Ci(i){const r=this.grid.cols,o=this.grid.rows;this.wi.P(),this.Ls.clear(),this.Ls.Vt(this.gi),this.Ls.Y("u_sketchTexture",i),this.Ls.Y("u_gridCellDimensions",[r,o]),this.Ls.Y("u_brightnessRange",this.l.mi),this.Ls.rect(0,0,r,o),this.wi.end(),this.Hs.P(),this.Ls.clear(),this.Ls.Vt(this.pi),this.Ls.Y("u_sampleTexture",this.wi),this.Ls.Y("u_fillColor",this.l.si),this.Ls.Y("u_useFixedColor",this.l.ri==="fixed"),this.Ls.rect(0,0,r,o),this.Hs.end(),this.js.P(),this.Ls.clear(),this.Ls.Vt(this.pi),this.Ls.Y("u_sampleTexture",this.wi),this.Ls.Y("u_fillColor",this.l.ni),this.Ls.Y("u_useFixedColor",this.l.hi==="fixed"),this.Ls.rect(0,0,r,o),this.js.end(),this.Ns.P(),this.Ls.clear(),this.Ls.Vt(this.xi),this.Ls.Y("u_sampleTexture",this.wi),this.Ls.Y("u_invert",this.l.ai),this.Ls.Y("u_flipHorizontally",this.l.ci),this.Ls.Y("u_flipVertically",this.l.ui),this.Ls.rect(0,0,r,o),this.Ns.end(),this.Ws.P(),this.Ls.clear(),this.Ls.Vt(this.bi),this.Ls.Y("u_sampleTexture",this.wi),this.Ls.Y("u_rotationColor",this.l.rotation),this.Ls.rect(0,0,r,o),this.Ws.end(),this.Bs.P(),this.Ls.clear(),this.Ls.Vt(this._i),this.Ls.Y("u_colorSampleFramebuffer",this.wi),this.Ls.Y("u_charPaletteTexture",this.palette.texture),this.Ls.Y("u_charPaletteSize",[this.palette.ei.length,1]),this.Ls.Y("u_brightnessRange",this.l.mi),this.Ls.rect(0,0,r,o),this.Bs.end()}resize(){super.resize(),this.wi.resize(this.grid.cols,this.grid.rows)}mi(i){y.validate(Array.isArray(i)&&i.length===2&&i.every(r=>typeof r=="number"&&r>=0&&r<=255),"Brightness range must be an array of two numbers between 0 and 255.",{method:"brightnessRange",Ge:i})&&(this.l.mi=i)}}const gt=Object.freeze(Object.defineProperty({__proto__:null,yi:V,Fi:B,Ti:z},Symbol.toStringTag,{value:"Module"}));class tt{constructor(s,i,r){l(this,"Ls");l(this,"font");l(this,"grid");l(this,"$i");l(this,"Mi");l(this,"Di");l(this,"Si");l(this,"Vi");l(this,"Bs");l(this,"Hs");l(this,"js");l(this,"Ws");l(this,"Ns");this.Ls=s,this.font=i,this.grid=r,this.Vi=this.Ls.createShader(F,"precision mediump float;uniform sampler2D u_characterTexture;uniform vec2 u_charsetDimensions;uniform sampler2D u_primaryColorTexture;uniform sampler2D u_secondaryColorTexture;uniform sampler2D u_transformTexture;uniform sampler2D u_asciiCharacterTexture;uniform sampler2D u_rotationTexture;uniform sampler2D u_captureTexture;uniform vec2 u_captureDimensions;uniform int u_backgroundMode;uniform vec2 u_gridCellDimensions;uniform vec2 u_gridPixelDimensions;mat2 rotate2D(float angle){float s=sin(angle);float c=cos(angle);return mat2(c,-s,s,c);}void main(){vec2 adjustedCoord=gl_FragCoord.xy/u_gridPixelDimensions;vec2 gridCoord=adjustedCoord*u_gridCellDimensions;vec2 cellCoord=floor(gridCoord);vec2 charIndexTexCoord=(cellCoord+0.5)/u_gridCellDimensions;vec4 primaryColor=texture2D(u_primaryColorTexture,charIndexTexCoord);vec4 secondaryColor=texture2D(u_secondaryColorTexture,charIndexTexCoord);vec4 transformColor=texture2D(u_transformTexture,charIndexTexCoord);bool isInverted=transformColor.r>0.5;bool flipHorizontal=transformColor.g>0.5;bool flipVertical=transformColor.b>0.5;vec4 encodedIndexVec=texture2D(u_asciiCharacterTexture,charIndexTexCoord);if(encodedIndexVec.a<0.01){gl_FragColor=(u_backgroundMode==0)? vec4(0.0):texture2D(u_captureTexture,gl_FragCoord.xy/u_captureDimensions);return;}int charIndex=int(encodedIndexVec.r*255.0+0.5)+int(encodedIndexVec.g*255.0+0.5)*256;int charCol=int(mod(float(charIndex),u_charsetDimensions.x));int charRow=charIndex/int(u_charsetDimensions.x);float flippedRow=(u_charsetDimensions.y-1.0)-float(charRow);vec2 charCoord=vec2(float(charCol),flippedRow)/u_charsetDimensions;vec4 rotationColor=texture2D(u_rotationTexture,charIndexTexCoord);float scaledAngle=rotationColor.r*255.0+rotationColor.g;float rotationAngle=(scaledAngle*360.0/255.0)*0.017453292;vec2 fractionalPart=fract(gridCoord)-0.5;if(flipHorizontal)fractionalPart.x=-fractionalPart.x;if(flipVertical)fractionalPart.y=-fractionalPart.y;fractionalPart=rotate2D(rotationAngle)*fractionalPart+0.5;vec2 cellSize=1.0/u_charsetDimensions;vec2 texCoord=charCoord+fractionalPart*cellSize;vec2 cellMax=charCoord+cellSize;if(any(lessThan(texCoord,charCoord))||any(greaterThan(texCoord,cellMax))){gl_FragColor=isInverted ? primaryColor : secondaryColor;return;}vec4 charTexel=texture2D(u_characterTexture,texCoord);if(isInverted)charTexel.rgb=1.0-charTexel.rgb;gl_FragColor=mix(secondaryColor,primaryColor,charTexel);}"),this.Mi=new V(s,i,r),this.Di=new B(s,i,r),this.$i=[this.Mi,this.Di],this.Bs=this.Ls.createFramebuffer(r.cols,r.rows),this.Hs=this.Ls.createFramebuffer(r.cols,r.rows),this.js=this.Ls.createFramebuffer(r.cols,r.rows),this.Ws=this.Ls.createFramebuffer(r.cols,r.rows),this.Ns=this.Ls.createFramebuffer(r.cols,r.rows),this.Si=this.Ls.createFramebuffer(this.grid.width,this.grid.height)}Ri(s){for(const r of this.$i)r.options.enabled&&r instanceof z&&r.Ci(s);const i=(r,o)=>{r.P(),this.Ls.clear();for(const n of this.$i)n.options.enabled&&this.Ls.image(o(n),0,0);r.end()};i(this.Bs,r=>r.Xs),i(this.Hs,r=>r.Ys),i(this.js,r=>r.qs),i(this.Ws,r=>r.Qs),i(this.Ns,r=>r.Zs),this.Si.P(),this.Ls.clear(),this.Ls.Vt(this.Vi),this.Ls.Y("u_characterTexture",this.font.ns),this.Ls.Y("u_charsetDimensions",[this.font.ls,this.font.cs]),this.Ls.Y("u_asciiCharacterTexture",this.Bs.texture),this.Ls.Y("u_primaryColorTexture",this.Hs.texture),this.Ls.Y("u_secondaryColorTexture",this.js.texture),this.Ls.Y("u_transformTexture",this.Ns.texture),this.Ls.Y("u_rotationTexture",this.Ws.texture),this.Ls.Y("u_captureTexture",s.texture),this.Ls.Y("u_backgroundMode",!1),this.Ls.Y("u_captureDimensions",[s.width,s.height]),this.Ls.Y("u_gridCellDimensions",[this.grid.cols,this.grid.rows]),this.Ls.Y("u_gridPixelDimensions",[this.grid.width,this.grid.height]),this.Ls.rect(0,0,this.Si.width,this.Si.height),this.Si.end()}add(s){if(!y.validate(s==="brightness"||s==="custom",'Converter type must be either "brightness" or "custom". Provided: '+s,{method:"add",Ge:s}))return;let i;return i=s==="brightness"?new V(this.Ls,this.font,this.grid):new B(this.Ls,this.font,this.grid),this.$i.push(i),i}remove(s){if(!y.validate(s instanceof B,"Parameter must be a TextmodeConverter instance.",{method:"remove",Ge:s}))return;const i=this.$i.indexOf(s);y.validate(i!==-1,"Converter instance not found in pipeline.",{method:"remove",Ge:s,ki:this.$i.length})&&this.$i.splice(i,1)}get texture(){return this.Si}resize(){this.Si.resize(this.grid.width,this.grid.height);const s=this.grid.cols,i=this.grid.rows;this.Bs.resize(s,i),this.Hs.resize(s,i),this.js.resize(s,i),this.Ws.resize(s,i),this.Ns.resize(s,i);for(const r of this.$i)r.resize()}zi(){return this.$i.some(s=>s.options.enabled)}disable(){for(const s of this.$i)s.disable()}enable(){for(const s of this.$i)s.enable()}dispose(){for(const s of this.$i)s.dispose();this.Bs.dispose(),this.Hs.dispose(),this.js.dispose(),this.Ws.dispose(),this.Ns.dispose(),this.Si.dispose(),this.Vi.dispose()}get Xs(){return this.Bs}get Ys(){return this.Hs}get qs(){return this.js}get Qs(){return this.Ws}get Zs(){return this.Ns}}const pt=c=>class extends c{fill(s,i,r,o){this.ye.fill(s,i,r,o)}stroke(s,i,r,o){this.ye.stroke(s,i,r,o)}Rt(s){this.ye.Rt(s)}kt(){this.ye.kt()}zt(){this.ye.zt()}rotate(s){this.ye.rotate(s)}push(){this.ye.push()}pop(){this.ye.pop()}rect(s,i,r=1,o=1){this.ye.rect(s,i,r,o)}line(s,i,r,o){this.ye.line(s,i,r,o)}background(s,i=s,r=s,o=255){this.ye.background(s,i,r,o)}createShader(s,i){return this.ye.createShader(s,i)}At(s){return this.ye.At(s)}Vt(s){this.ye.Vt(s)}Y(s,i){this.ye.Y(s,i)}};class G{Ii(s){const i=s.get("brightness"),r=i==null?void 0:i.Xs,o=i==null?void 0:i.Ys,n=i==null?void 0:i.qs,h=i==null?void 0:i.Zs,a=i==null?void 0:i.Qs;return r==null||r.A(),o==null||o.A(),n==null||n.A(),h==null||h.A(),a==null||a.A(),{Pi:(r==null?void 0:r.U)||new Uint8Array(0),Ai:(o==null?void 0:o.U)||new Uint8Array(0),Ui:(n==null?void 0:n.U)||new Uint8Array(0),Gi:(h==null?void 0:h.U)||new Uint8Array(0),Ei:(a==null?void 0:a.U)||new Uint8Array(0)}}Li(s,i){return s[i]+(s[i+1]<<8)}Oi(s,i){return{r:s[i],g:s[i+1],b:s[i+2],a:s[i+3]}}}class H{Bi(s,i){return new Blob([s],{type:i})}Hi(s,i,r){try{const o=this.Bi(s,r),n=URL.createObjectURL(o),h=document.createElement("a");h.href=n,h.download=i,h.style.display="none",h.rel="noopener",document.body.appendChild(h),h.click(),document.body.removeChild(h),URL.revokeObjectURL(n)}catch(o){throw console.error("Failed to download file:",o),Error("File download failed: "+(o instanceof Error?o.message:"Unknown error"))}}ji(){return new Date().toISOString().slice(0,19).replace(/:/g,"-")}Wi(){const s=new Date;return{Ni:s.toISOString().split("T")[0],time:s.toTimeString().split(" ")[0].replace(/:/g,"-")}}Xi(s){return s.replace(/[<>:"/\\|?*]/g,"_").replace(/\s+/g,"_").replace(/_{2,}/g,"_").replace(/^_+|_+$/g,"").substring(0,255)}Yi(){return"'textmode-export'-"+this.ji()}}class mt extends G{qi(s,i,r){const o=s[r]===255,n=s[r+1]===255,h=s[r+2]===255,a=i[r],u=i[r+1];return{Qi:o,Zi:n,Ji:h,rotation:Math.round(360*(a+u/255)/255*100)/100}}Ki(s,i,r){return{x:s,y:i,tr:s*r.$s,er:i*r.Ms}}sr(s,i){const r=[];let o=0;for(let n=0;n<i.rows;n++)for(let h=0;h<i.cols;h++){const a=4*o,u=this.Li(s.Pi,a);let f=this.Oi(s.Ai,a),d=this.Oi(s.Ui,a);const g=this.qi(s.Gi,s.Ei,a);if(g.Qi){const w=f;f=d,d=w}const p=this.Ki(h,n,i);r.push({charIndex:u,ir:f,rr:d,transform:g,position:p}),o++}return r}}class _t{nr(s,i){const r=s.cmap;for(const o of r.qt)if(o.format===4){for(let n=0;n<o.ie.length;n++)if(i>=o.ie[n]&&i<=o.se[n]){if(o.oe[n]===0)return i+o.re[n]&65535;{const h=o.oe[n]/2+(i-o.ie[n])-(o.ie.length-n);if(h>=0&&h<o.ne.length){const a=o.ne[h];if(a!==0)return a+o.re[n]&65535}}}}return 0}hr(s,i,r,o,n){const h=n/s.head.unitsPerEm;return{ar:()=>({x1:r+i.xMin*h,y1:o+-i.yMax*h,x2:r+i.xMax*h,y2:o+-i.yMin*h}),lr:()=>this.cr(i,r,o,h)}}cr(s,i,r,o){if(!s||!s.fe)return"";const{fe:n,de:h,ue:a,flags:u}=s;if(!(n&&h&&a&&u))return"";let f="",d=0;for(let g=0;g<a.length;g++){const p=a[g];if(!(p<d)){if(p>=d){const w=i+n[d]*o,b=r-h[d]*o;f+=`M${w.toFixed(2)},${b.toFixed(2)}`;let _=d+1;for(;_<=p;)if(1&u[_]){const T=i+n[_]*o,R=r-h[_]*o;f+=`L${T.toFixed(2)},${R.toFixed(2)}`,_++}else{const T=i+n[_]*o,R=r-h[_]*o;let C=_+1>p?d:_+1;if(1&u[C]){const M=i+n[C]*o,$=r-h[C]*o;f+=`Q${T.toFixed(2)},${R.toFixed(2)} ${M.toFixed(2)},${$.toFixed(2)}`,_=C+1}else{const M=(T+(i+n[C]*o))/2,$=(R+(r-h[C]*o))/2;f+=`Q${T.toFixed(2)},${R.toFixed(2)} ${M.toFixed(2)},${$.toFixed(2)}`,_=C}}f+="Z"}d=p+1}}return f}ur(s,i,r,o,n){const h=s.codePointAt(0)||0,a=this.nr(i,h);let u=null;return i.glyf&&i.glyf[a]!==null?u=i.glyf[a]:m&&m.T&&m.T.glyf&&m.T.glyf.le&&(u=m.T.glyf.le(i,a),i.glyf&&u&&(i.glyf[a]=u)),this.hr(i,u,r,o,n)}dr(s,i,r,o,n,h,a,u){const f=r+(n-u*(a/i.head.unitsPerEm))/2,d=o+(h+.7*a)/2;return this.ur(s,i,f,d,a).lr()||null}}class xt{constructor(){l(this,"mr");this.mr=new _t}gr(s){return`<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
8
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
9
|
+
<svg width="${s.width}" height="${s.height}" viewBox="0 0 ${s.width} ${s.height}"
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg" version="1.1">
|
|
11
|
+
<title>textmode art generated via textmode.js</title>
|
|
12
|
+
<desc>textmode art visualization generated by textmode.js library</desc>`}pr(){return`
|
|
13
|
+
</g>
|
|
14
|
+
</svg>`}vr(s,i){if(!i._r)return"";const r=i.backgroundColor,o=`rgba(${r[0]},${r[1]},${r[2]},${r[3]/255})`;return`
|
|
15
|
+
<rect width="${s.width}" height="${s.height}" fill="${o}" />`}br(s){return`rgba(${s.r},${s.g},${s.b},${s.a/255})`}wr(s,i){const{transform:r,position:o}=s,n=o.tr+i.$s/2,h=o.er+i.Ms/2,a=[];if(r.Zi||r.Ji){const u=r.Zi?-1:1,f=r.Ji?-1:1;a.push(`translate(${n} ${h})`),a.push(`scale(${u} ${f})`),a.push(`translate(${-n} ${-h})`)}return r.rotation&&a.push(`rotate(${r.rotation} ${n} ${h})`),a.length?` transform="${a.join(" ")}"`:""}Cr(s,i,r){if(!r._r||s.rr.a===0)return"";const{position:o}=s,n=this.br(s.rr);return r.yr==="stroke"?`
|
|
16
|
+
<rect x="${o.tr}" y="${o.er}" width="${i.$s}" height="${i.Ms}" stroke="${n}" fill="none" stroke-width="${r.strokeWidth}" />`:`
|
|
17
|
+
<rect x="${o.tr}" y="${o.er}" width="${i.$s}" height="${i.Ms}" fill="${n}" />`}ur(s,i,r,o){const n=r.hs[s.charIndex];if(!n)return"";const h=this.mr.dr(n.Se,r.font,s.position.tr,s.position.er,i.$s,i.Ms,r.fontSize,n.Ae);if(!h)return"";const a=this.br(s.ir);return o.yr==="stroke"?`
|
|
18
|
+
<path id="${`path-${s.charIndex}-${s.position.tr}-${s.position.er}`.replace(/\./g,"-")}" d="${h}" stroke="${a}" stroke-width="${o.strokeWidth}" fill="none" />`:`
|
|
19
|
+
<path d="${h}" fill="${a}" />`}Fr(s,i,r,o){let n="";n+=this.Cr(s,i,o);const h=this.wr(s,i),a=this.ur(s,i,r,o);return a&&(h?(n+=`
|
|
20
|
+
<g${h}>`,n+=a,n+=`
|
|
21
|
+
</g>`):n+=a),n}Tr(s,i,r,o){let n=this.gr(i);n+=this.vr(i,o),n+=`
|
|
22
|
+
<g id="ascii-cells">`;for(const h of s)n+=this.Fr(h,i,r,o);return n+=this.pr(),n}$r(s){return s.replace(/<path[^>]*d=""[^>]*\/>/g,"").replace(/\n\s*\n/g,`
|
|
23
|
+
`).replace(/[ \t]+$/gm,"")}}class wt extends H{Mr(s){return this.Bi(s,"image/svg+xml;charset=utf-8")}Dr(s,i){this.Hi(s,this.Xi(i)+".svg","image/svg+xml;charset=utf-8")}Sr(s,i){this.Dr(s,i||this.Yi())}}class et{constructor(){l(this,"Vr");l(this,"Rr");l(this,"kr");this.Vr=new mt,this.Rr=new xt,this.kr=new wt}zr(s){return{_r:s._r??!0,yr:s.yr??"fill",strokeWidth:s.strokeWidth??1,backgroundColor:s.backgroundColor??[0,0,0,0]}}Ir(s,i={}){const r=this.zr(i),o=this.Vr.Ii(s.Pr),n=this.Vr.sr(o,s.grid),h=this.Rr.Tr(n,s.grid,s.font,r);return this.Rr.$r(h)}Sr(s,i={}){const r=this.Ir(s,i),o=i.filename||this.kr.Yi();this.kr.Sr(r,o)}}class vt extends G{Ar(s,i,r,o=" "){var a;const n=[];let h=0;for(let u=0;u<i.rows;u++){const f=[];for(let d=0;d<i.cols;d++){const g=4*h,p=this.Li(s.Pi,g),w=((a=r.hs[p])==null?void 0:a.Se)||o;f.push(w),h++}n.push(f)}return n}}class bt{Ur(s,i){const r=[];for(const n of s){let h=n.join("");i.Gr||(h=h.replace(/\s+$/,"")),r.push(h)}const o=i.Er==="crlf"?`\r
|
|
24
|
+
`:`
|
|
25
|
+
`;return r.join(o)}}class yt extends H{Lr(s,i){const r=this.Or(i);this.Hi(s,r,"text/plain;charset=utf-8")}Or(s){let i=this.Xi(s);return i===".txt"||i.length<=4?this.Yi():i}}class st{constructor(){l(this,"Vr");l(this,"Rr");l(this,"kr");this.Vr=new vt,this.Rr=new bt,this.kr=new yt}zr(s){return{Gr:s.Gr??!1,Er:s.Er??"lf",Br:s.Br??" "}}Hr(s,i={}){const r=this.zr(i),o=this.Vr.Ii(s.Pr),n=this.Vr.Ar(o,s.grid,s.font,r.Br);return this.Rr.Ur(n,r)}Lr(s,i={}){const r=this.Hr(s,i),o=i.filename||this.kr.Yi();this.kr.Lr(r,o)}}class Tt extends G{jr(s,i=1,r="transparent"){const o=s.canvas;if(i===1&&r==="transparent")return o;const n=document.createElement("canvas"),h=n.getContext("2d"),a=Math.round(o.width*i),u=Math.round(o.height*i);return n.width=a,n.height=u,r!=="transparent"&&(h.fillStyle=r,h.fillRect(0,0,a,u)),h.imageSmoothingEnabled=!1,h.drawImage(o,0,0,o.width,o.height,0,0,a,u),n}}class Ct{Wr(s,i){const r=this.Nr(i.format);return i.format==="png"?s.toDataURL(r):s.toDataURL(r,i.Xr)}async Yr(s,i){return new Promise((r,o)=>{const n=this.Nr(i.format),h=a=>{a?r(a):o(Error(`Failed to generate ${i.format.toUpperCase()} blob`))};i.format==="png"?s.toBlob(h,n):s.toBlob(h,n,i.Xr)})}Nr(s){switch(s){case"png":return"image/png";case"jpg":return"image/jpeg";case"webp":return"image/webp";default:throw Error("Unsupported image format: "+s)}}}const it={qr:"image/png",Qr:"image/jpeg",Zr:"image/webp"},O={qr:".png",Qr:".jpg",Zr:".webp"};class Rt extends H{Jr(s,i,r){this.Kr(s,this.Xi(i)+O[r])}Kr(s,i){const r=URL.createObjectURL(s);try{const o=document.createElement("a");o.href=r,o.download=i,o.style.display="none",o.rel="noopener",document.body.appendChild(o),o.click(),document.body.removeChild(o)}finally{URL.revokeObjectURL(r)}}eo(s){return s in it&&s in O}Nr(s){return it[s]}so(s){return O[s]}}class Et{constructor(){l(this,"Vr");l(this,"Rr");l(this,"kr");this.Vr=new Tt,this.Rr=new Ct,this.kr=new Rt}zr(s){return{format:s.format??"png",Xr:s.Xr??1,scale:s.scale??1,backgroundColor:s.backgroundColor??"transparent"}}io(s){if(console.log("Validating image export options:",s),!this.kr.eo(s.format))throw Error(`Saving '${s.format}' files is not supported`);if(s.Xr<0||s.Xr>1)throw Error("Image quality must be between 0.0 and 1.0");if(s.scale<=0)throw Error("Scale factor must be greater than 0");s.scale>10&&console.warn("Large scale factors may result in very large files and slow performance"),s.format==="jpg"&&s.backgroundColor==="transparent"&&(s.backgroundColor="black")}ro(s,i={}){const r=this.zr(i);if(this.io(r),r.scale===1&&r.backgroundColor==="transparent")return this.Rr.Wr(s.canvas,r);const o=this.Vr.jr(s,r.scale,r.backgroundColor);return this.Rr.Wr(o,r)}async Yr(s,i={}){const r=this.zr(i);if(this.io(r),r.scale===1&&r.backgroundColor==="transparent")return await this.Rr.Yr(s.canvas,r);const o=this.Vr.jr(s,r.scale,r.backgroundColor);return await this.Rr.Yr(o,r)}async Jr(s,i={}){const r=await this.Yr(s,i),o=i.format??"png",n=i.filename||this.kr.Yi();this.kr.Jr(r,n,o)}}const Ft=c=>class extends c{toString(s={}){return new st().Hr(this,s)}oo(s={}){new st().Lr(this,s)}lr(s={}){return new et().Ir(this,s)}Sr(s={}){new et().Sr(this,s)}async no(s,i="png",r={}){await new Et().Jr(this.ho,{...r,filename:s,format:i})}},Lt=c=>class extends c{async ss(s){return this.Le.ss(s).then(()=>{const i=this.Le.us;this.ao.Cs(i.width,i.height),this.lo.resize()})}fontSize(s){if(!y.validate(typeof s=="number"&&s>0,"Font size must be a positive number greater than 0.",{method:"fontSize",Ge:s})||this.Le.fontSize===s)return;this.Le.es(s);const i=this.Le.us;this.ao.Cs(i.width,i.height),this.lo.resize(),this.ye.Ot()}},Dt=c=>class extends c{co(s){return this.lo.add(s)}uo(s){this.lo.remove(s)}};class Mt{constructor(){l(this,"ye");l(this,"Le");l(this,"lo");l(this,"ho");l(this,"ao")}}class j extends function(i,...r){return r.reduce((o,n)=>n(o),i)}(Mt,pt,Ft,Lt,Dt){constructor(i=null,r={}){super();l(this,"Ds");l(this,"fo");l(this,"Vs");l(this,"do");l(this,"mo");l(this,"po",null);l(this,"vo",0);l(this,"_o");l(this,"xo",!0);l(this,"bo",0);l(this,"wo",0);l(this,"Co",0);l(this,"yo",[]);l(this,"Fo",10);l(this,"To",!1);l(this,"$o",!1);l(this,"Mo",()=>{});l(this,"Do",()=>{});l(this,"So");l(this,"Vo",!1);this.Ds=i,this.$o=i===null,this.do=r.Ro??"auto",this.mo=r.ko??60,this._o=1e3/this.mo}static async create(i=null,r={}){const o=new this(i,r),n=o.$o?r:void 0;let h,a;o.ho=new Q(o.Ds,o.$o,n),o.ye=new ht(o.ho.Ps()),o.$o?(h=r.width||800,a=r.height||600):(h=o.ho.width||800,a=o.ho.height||600),o.fo=o.ye.createFramebuffer(h,a),o.Le=new Z(o.ye,r.fontSize??16),await o.Le.initialize(r.zo);const u=o.Le.us;return o.ao=new K(o.ho.canvas,u.width,u.height),o.lo=new tt(o.ye,o.Le,o.ao),o.Io(),o.Po(),o}Io(){this.So=()=>{this.$o?this.Do():this.resize()},window.addEventListener("resize",this.So),window.ResizeObserver&&this.Ds&&!this.$o&&(this.Vs=new ResizeObserver(()=>{this.resize()}),this.Vs.observe(this.Ds))}Ri(){if(this.Ao(),this.Co++,this.To)console.warn("Cannot render: Required resources have been disposed");else if(this.$o?(this.fo.P(),this.Mo(),this.fo.end()):this.fo.update(this.Ds),this.lo.zi()?(this.lo.Ri(this.fo),this.ye.background(0),this.ye.image(this.lo.texture,this.ao.offsetX,this.ao.offsetY,this.lo.texture.width,this.lo.texture.height)):(this.ye.clear(),this.ye.image(this.fo,this.ao.offsetX,this.ao.offsetY,this.fo.width,this.fo.height)),this.Vo){let i=0;this.ye.image(this.lo.Xs,i,0,this.lo.Xs.width,this.lo.Xs.height),i+=this.lo.Xs.width,this.ye.image(this.lo.Ys,i,0,this.lo.Ys.width,this.lo.Ys.height),i+=this.lo.Ys.width,this.ye.image(this.lo.qs,i,0,this.lo.qs.width,this.lo.qs.height),i+=this.lo.qs.width,this.ye.image(this.lo.Zs,i,0,this.lo.Zs.width,this.lo.Zs.height),i+=this.lo.Zs.width,this.ye.image(this.lo.Qs,i,0,this.lo.Qs.width,this.lo.Qs.height)}}resize(){this.ho.resize(),this.fo.resize(this.ho.width,this.ho.height),this.ao.resize(),this.lo.resize(),this.ye.Ot(),this.do!=="manual"&&this.Ri()}Po(){if(this.do!=="auto"||!this.xo)return;this.vo=performance.now();const i=r=>{if(!this.xo)return void(this.po=null);const o=r-this.vo;o>=this._o&&(this.Ri(),this.vo=r-o%this._o),this.xo&&(this.po=requestAnimationFrame(i))};this.po=requestAnimationFrame(i)}Ao(){const i=performance.now();if(this.wo>0){const r=i-this.wo;this.yo.push(r),this.yo.length>this.Fo&&this.yo.shift();const o=this.yo.reduce((n,h)=>n+h,0)/this.yo.length;this.bo=1e3/o}this.wo=i}Uo(){this.po&&(cancelAnimationFrame(this.po),this.po=null)}Ro(i){this.do!==i&&(this.Uo(),this.do=i,i==="auto"&&this.xo&&this.Po())}ko(i){if(i===void 0)return this.bo;this.mo=i,this._o=1e3/i,this.do==="auto"&&this.xo&&(this.Uo(),this.Po())}Go(){this.xo&&(this.xo=!1,this.po&&(cancelAnimationFrame(this.po),this.po=null))}loop(){this.xo||(this.xo=!0,this.do==="auto"&&this.Po())}Eo(i=1){if(y.validate(typeof i=="number"&&i>0&&Number.isInteger(i),"Redraw count must be a positive integer.",{method:"redraw",Ge:i}))for(let r=0;r<i;r++)this.Ri()}Lo(){return this.do==="auto"&&this.xo}draw(i){this.Mo=i}Oo(i){this.Do=i}Bo(i,r){this.ho.resize(i,r),this.fo.resize(this.ho.width,this.ho.height),this.ao.resize(),this.lo.resize(),this.ye.Ot(),this.do!=="manual"&&this.Ri()}destroy(){this.To||(this.Uo(),window.removeEventListener("resize",this.So),this.Vs&&this.Vs.disconnect(),this.lo.dispose(),this.Le.dispose(),this.fo.dispose(),this.ye.dispose(),this.To=!0)}debug(i){this.Vo=i}get grid(){return this.ao}get font(){return this.Le}get mode(){return this.do}get Pr(){return this.lo}get frameCount(){return this.Co}set frameCount(i){this.Co=i}get width(){return this.ho.width}get height(){return this.ho.height}get Ho(){return this.To}}class I{static async create(s,i={}){if(s instanceof HTMLCanvasElement||s instanceof HTMLVideoElement)return j.create(s,i);{const r=s||{};return j.create(null,r)}}static jo(s){y.v(s)}static get version(){return"0.1.6-beta.6"}}const $t=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),At=I.create,St=I.jo,Ut=I.version;v.Wo=Q,v.No=tt,v.Xo=L,v.Yo=Z,v.qo=K,v.Qo=j,v.$i=gt,v.create=At,v.Zo=$t,v.jo=St,v.Jo=I,v.version=Ut,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})},typeof exports=="object"&&typeof module<"u"?e(exports):typeof define=="function"&&define.amd?define(["exports"],e):e((t=typeof globalThis<"u"?globalThis:t||self).Jo={});
|
|
@@ -2,10 +2,6 @@ import { Framebuffer } from './rendering/webgl/Framebuffer';
|
|
|
2
2
|
import type { GLRenderer } from './rendering/webgl/Renderer';
|
|
3
3
|
/**
|
|
4
4
|
* A 1D color palette stored in a framebuffer that is used to pass colors to shaders.
|
|
5
|
-
*
|
|
6
|
-
* There is no need to modify instances of this class provided by the library,
|
|
7
|
-
* as they are managed internally and can be modified more easily through classes managing them.
|
|
8
|
-
* But you technically could - *if you wanted to* - without breaking anything.
|
|
9
5
|
*/
|
|
10
6
|
export declare class ColorPalette {
|
|
11
7
|
/** The framebuffer used to store the color palette. */
|
|
@@ -21,7 +17,7 @@ export declare class ColorPalette {
|
|
|
21
17
|
/**
|
|
22
18
|
* Update the framebuffer with the currently selected colors.
|
|
23
19
|
*/
|
|
24
|
-
private
|
|
20
|
+
private _update;
|
|
25
21
|
/**
|
|
26
22
|
* Sets the colors of the palette and updates the framebuffer.
|
|
27
23
|
* @param newColors The new RGB colors to set as [r, g, b] arrays.
|
package/dist/types/Textmode.d.ts
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import type { TextmodeErrorLevel } from './errors';
|
|
2
2
|
import { Textmodifier, type TextmodeOptions, type CaptureSource } from './textmode/Textmodifier';
|
|
3
|
-
export { Textmodifier } from './textmode/Textmodifier';
|
|
4
|
-
export { TextmodeFont } from './textmode/font';
|
|
5
|
-
export { TextmodeCanvas } from './textmode/Canvas';
|
|
6
|
-
export { TextmodeGrid } from './textmode/Grid';
|
|
7
|
-
export type { TextmodeOptions, CaptureSource } from './textmode/Textmodifier';
|
|
8
|
-
export type { TextmodeCharacter } from './textmode/font';
|
|
9
|
-
export { TextmodeErrorLevel } from './errors/ErrorHandler';
|
|
10
|
-
/** Contains all converters that can be added to a rendering pipeline to shape the textmode output. */
|
|
11
|
-
export * as TextmodeConverters from './textmode/converters';
|
|
12
3
|
/**
|
|
13
4
|
* The main entry point for the `textmode.js` library.
|
|
14
5
|
*
|
|
@@ -95,5 +86,4 @@ export declare class Textmode {
|
|
|
95
86
|
* ```
|
|
96
87
|
*/
|
|
97
88
|
static get version(): string;
|
|
98
|
-
private constructor();
|
|
99
89
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ImageExportOptions } from './types';
|
|
2
|
-
import type { TextmodeCanvas } from '../../
|
|
2
|
+
import type { TextmodeCanvas } from '../../index';
|
|
3
3
|
/**
|
|
4
4
|
* Main image exporter for the textmode.js library.
|
|
5
5
|
* Orchestrates the image export process by coordinating canvas capture,
|
|
@@ -11,13 +11,7 @@ export declare class ImageFileHandler extends FileHandler {
|
|
|
11
11
|
* @param filename The filename (without extension)
|
|
12
12
|
* @param format The image format
|
|
13
13
|
*/
|
|
14
|
-
saveImage(content:
|
|
15
|
-
/**
|
|
16
|
-
* Saves image from data URL
|
|
17
|
-
* @param dataURL The data URL containing image data
|
|
18
|
-
* @param filename The complete filename with extension
|
|
19
|
-
*/
|
|
20
|
-
private saveImageFromDataURL;
|
|
14
|
+
saveImage(content: Blob, filename: string, format: ImageFormat): void;
|
|
21
15
|
/**
|
|
22
16
|
* Saves image from blob
|
|
23
17
|
* @param blob The blob containing image data
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SVGCellData, SVGGenerationOptions } from './types';
|
|
2
|
-
import type { TextmodeFont, TextmodeGrid } from '../../
|
|
2
|
+
import type { TextmodeFont, TextmodeGrid } from '../../index';
|
|
3
3
|
/**
|
|
4
4
|
* Generates SVG content and markup from processed cell data.
|
|
5
5
|
* This class handles the creation of SVG elements, groups, and styling.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FramebufferData, SVGCellData } from './types';
|
|
2
2
|
import { DataExtractor } from '../base';
|
|
3
|
-
import type { TextmodeGrid } from '../../
|
|
3
|
+
import type { TextmodeGrid } from '../../index';
|
|
4
4
|
/**
|
|
5
5
|
* Extracts and processes data from framebuffers for SVG generation.
|
|
6
6
|
* This class handles the conversion of raw pixel data into structured data objects.
|
|
@@ -12,11 +12,6 @@ export declare class SVGPathGenerator {
|
|
|
12
12
|
* @returns The glyph index, or 0 if not found
|
|
13
13
|
*/
|
|
14
14
|
private getGlyphIndex;
|
|
15
|
-
/**
|
|
16
|
-
* Creates an empty path object for characters with no glyph data
|
|
17
|
-
* @returns Empty path object
|
|
18
|
-
*/
|
|
19
|
-
private createEmptyPath;
|
|
20
15
|
/**
|
|
21
16
|
* Creates a path object for a glyph
|
|
22
17
|
* @param fontData Font data object
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FramebufferData } from './types';
|
|
2
2
|
import { DataExtractor } from '../base';
|
|
3
|
-
import type { TextmodeFont, TextmodeGrid } from '../../
|
|
3
|
+
import type { TextmodeFont, TextmodeGrid } from '../../index';
|
|
4
4
|
/**
|
|
5
5
|
* Extracts and processes data from framebuffers for TXT generation.
|
|
6
6
|
* This class handles the conversion of raw pixel data into character arrays.
|
package/dist/types/index.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ export { TextmodeErrorLevel } from './errors/ErrorHandler';
|
|
|
12
12
|
/** Contains all converters that can be added to a rendering pipeline to shape the textmode output. */
|
|
13
13
|
export * as converters from './textmode/converters';
|
|
14
14
|
export { Textmode as textmode } from './Textmode';
|
|
15
|
-
export default Textmode;
|
|
16
15
|
/**
|
|
17
16
|
* Exports the create, setErrorLevel, and version functions from the Textmode class for UMD compatibility,
|
|
18
17
|
* so calls like `textmode.create()` can be used.
|
|
@@ -23,17 +23,6 @@ export declare class TextmodeCanvas {
|
|
|
23
23
|
* Get the WebGL context for the overlay canvas
|
|
24
24
|
*/
|
|
25
25
|
getWebGLContext(): WebGL2RenderingContext | WebGLRenderingContext;
|
|
26
|
-
/**
|
|
27
|
-
* Get the effective rendering dimensions accounting for CSS transforms
|
|
28
|
-
*/
|
|
29
|
-
getEffectiveRenderingDimensions(): {
|
|
30
|
-
width: number;
|
|
31
|
-
height: number;
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* Check if the canvas is affected by CSS transforms
|
|
35
|
-
*/
|
|
36
|
-
isTransformed(): boolean;
|
|
37
26
|
/**
|
|
38
27
|
* Set up ResizeObserver to monitor for CSS transform changes
|
|
39
28
|
*/
|