From b652fedcfde0b6a2de66f2ad06a576801dcf7c0e Mon Sep 17 00:00:00 2001 From: eguneys Date: Wed, 3 Jan 2024 22:30:51 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20eguneys/?= =?UTF-8?q?solitaire23@e3d40adecedcdef2e2eb538d224300da52c355a4=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/{index-98f9ffb1.js => index-879a4c0c.js} | 12 ++++++------ index.html | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) rename assets/{index-98f9ffb1.js => index-879a4c0c.js} (96%) diff --git a/assets/index-98f9ffb1.js b/assets/index-879a4c0c.js similarity index 96% rename from assets/index-98f9ffb1.js rename to assets/index-879a4c0c.js index c2e1d71..f7be57e 100644 --- a/assets/index-98f9ffb1.js +++ b/assets/index-879a4c0c.js @@ -1,4 +1,4 @@ -var _s=Object.defineProperty;var ds=(t,a,e)=>a in t?_s(t,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[a]=e;var o=(t,a,e)=>(ds(t,typeof a!="symbol"?a+"":a,e),e);(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const h of i)if(h.type==="childList")for(const r of h.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function e(i){const h={};return i.integrity&&(h.integrity=i.integrity),i.referrerPolicy&&(h.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?h.credentials="include":i.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function s(i){if(i.ep)return;i.ep=!0;const h=e(i);fetch(i.href,h)}})();var cs=Object.defineProperty,ps=(t,a,e)=>a in t?cs(t,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[a]=e,_=(t,a,e)=>(ps(t,typeof a!="symbol"?a+"":a,e),e);const J={info(t){console.log(t)},warn(t){console.warn(t)},error(t){console.error(t)}},V=1e-6,Sa=1,za=4,Fa=8,Ra=16,A=class{constructor(t,a){_(this,"x"),_(this,"y"),this.x=t,this.y=a}static get unit_x(){return A.make(1,0)}static get unit_y(){return A.make(0,1)}static get right(){return A.make(1,0)}static get up(){return A.make(0,-1)}static get down(){return A.make(0,1)}static get left(){return A.make(-1,0)}static get zero(){return A.make(0,0)}static get one(){return A.make(1,1)}add(t){return new A(this.x+t.x,this.y+t.y)}sub(t){return new A(this.x-t.x,this.y-t.y)}mul(t){return new A(this.x*t.x,this.y*t.y)}div(t){return new A(this.x/t.x,this.y/t.y)}scale(t){return new A(this.x*t,this.y*t)}add_in(t){return this.x+=t.x,this.y+=t.y,this}sub_in(t){return this.x-=t.x,this.y-=t.y,this}mul_in(t){return this.x*=t.x,this.y*=t.y,this}scale_in(t){return this.x*=t,this.y*=t,this}set_in(t){this.x=t.x,this.y=t.y}equals(t){return Math.abs(this.x-t.x)new A(t.x,t.y)),_(n,"make",(t,a)=>new A(t,a)),_(n,"dot",(t,a)=>t.x*a.x+t.y*a.y),_(n,"transform",(t,a)=>new A(t.x*a.m11+t.y*a.m21+a.m31,t.x*a.m12+t.y*a.m22+a.m32)),_(n,"transform_normal",(t,a)=>new A(t.x*a.m11+t.y*a.m21,t.x*a.m12+t.y*a.m22)),_(n,"from_angle",(t,a=1)=>new A(Math.cos(t)*a,Math.sin(t)*a)),_(n,"approach",(t,a,e)=>t.sub(a).length_squared<=e*e?a:t.add(a.sub(t).normal).scale(e)),_(n,"lerp",(t,a,e)=>e===0?t:e===1?a:t.add(a.sub(t).scale(e))),_(n,"lerp_bezier",(t,a,e,s)=>{let{lerp:i}=A;return i(i(t,a,s),i(a,e,s),s)}),_(n,"reflect",(t,a)=>{let e=t.x*a.x+t.y*a.y;return new A(t.x-2*e*a.x,t.y-2*e*a.y)}),_(n,"min",(t,a)=>new A(Math.min(t.x,a.x),Math.min(t.y,a.y))),_(n,"max",(t,a)=>new A(Math.max(t.x,a.x),Math.max(t.y,a.y)));const ve=class{constructor(t,a,e){_(this,"x"),_(this,"y"),_(this,"z"),this.x=t,this.y=a,this.z=e}add(t){return new ve(this.x+t.x,this.y+t.y,this.z+this.z)}sub(t){return new ve(this.x-t.x,this.y-t.y,this.z-this.z)}get length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}get normal(){let{length:t}=this;return new ve(this.x/t,this.y/t,this.z/t)}};let _e=ve;_(_e,"make",(t,a,e)=>new ve(t,a,e)),_(_e,"dot",(t,a)=>t.x*a.x+t.y*a.y+t.z*a.z),_(_e,"cross",(t,a)=>new ve(t.y*a.z-t.z*a.y,t.z*a.x-t.x*a.z,t.x*a.y-t.y*a.x));const Ca=class{constructor(t,a,e,s){_(this,"x"),_(this,"y"),_(this,"z"),_(this,"w"),this.x=t,this.y=a,this.z=e,this.w=s}};let fs=Ca;_(fs,"make",(t,a,e,s)=>new Ca(t,a,e,s));const Q=class{constructor(t,a,e,s){_(this,"x"),_(this,"y"),_(this,"w"),_(this,"h"),this.x=t,this.y=a,this.w=e,this.h=s}add(t){return new Q(this.x+t.x,this.y+t.y,this.w,this.h)}sub(t){return new Q(this.x-t.x,this.y-t.y,this.w,this.h)}add_in(t){return this.x+=t.x,this.y+=t.y,this}sub_in(t){return this.x-=t.x,this.y-=t.y,this}equals(t){return Math.abs(this.x-t.x)=this.x&&t.x=this.y&&t.y=this.x&&t.x+t.w=this.y&&t.y+t.h=t.x&&this.y+this.h>=t.y&&this.x=t.x&&this.x=t.y&&this.y=this.right&&(a|=za),t.y=this.bottom&&(a|=Ra),a}};let x=Q;_(x,"make",(t=0,a=0,e=0,s=0)=>new Q(t,a,e,s)),_(x,"transform",(t,a)=>new Q(t.x*a.m11+t.y*a.m21+a.m31,t.x*a.m12+t.y*a.m22+a.m32,t.w*a.m11+t.h*a.m21,t.w*a.m12+t.h*a.m22)),_(x,"from_points",(t,a)=>{let e=n.min(t,a),s=n.max(t,a);return new Q(e.x,e.y,s.x-e.x,s.y-e.y)});const Nt=class{constructor(t,a){this.center=t,this.radius=a}project(t){let a=n.dot(this.center.sub(t.scale(this.radius)),t),e=n.dot(this.center.add(t.scale(this.radius)),t);return[a,e]}};let ia=Nt;_(ia,"make_x",(t,a,e)=>new Nt(n.make(t,a),e)),_(ia,"make",(t,a)=>new Nt(t,a));const Be=class{constructor(t,a){_(this,"a"),_(this,"b"),this.a=t,this.b=a}get bounds(){return x.from_points(this.a,this.b)}closest_point(t){let a=this.b.sub(this.a),e=t.sub(this.a),s=n.dot(e,a)/(a.x*a.x+a.y*a.y);return s<0?s=0:s>1&&(s=1),a.scale(s).add(this.a)}intersects_rect(t,a){let e=t.get_sector(this.a),s=t.get_sector(this.b);if(e==s||e&s)return!1;let i=e|s;return!!(i&Fa&&this.intersects_line(t.top_line,a)||i&Ra&&this.intersects_line(t.bottom_line,a)||i&Sa&&this.intersects_line(t.left_line,a)||i&za&&this.intersects_line(t.right_line,a))}intersects_line(t,a){let e=this.b.sub(this.a),s=t.b.sub(t.a),i=e.x*s.y-e.y*s.x;if(i>-V&&i1)return!1;let l=(h.x*e.y-h.y*e.x)/i;return l<0||l>1?!1:(a&&a.set_in(e.scale(r).add(this.a)),!0)}project(t){let a=this.a.x*t.x+this.a.y*t.y,e=a,s=a;return a=this.b.x*t.x+this.b.y*t.y,e=as?a:s,[e,s]}add(t){return new Be(this.a.add(t),this.b.add(t))}sub(t){return new Be(this.a.sub(t),this.b.sub(t))}};let ae=Be;_(ae,"make_x",(t,a,e,s)=>new Be(n.make(t,a),n.make(e,s))),_(ae,"make",(t,a)=>new Be(t,a));const F=class{constructor(t,a,e,s,i,h){_(this,"m11"),_(this,"m12"),_(this,"m21"),_(this,"m22"),_(this,"m31"),_(this,"m32"),this.m11=t,this.m12=a,this.m21=e,this.m22=s,this.m31=i,this.m32=h}static get identity(){return new F(1,0,0,1,0,0)}mul(t){return F.mul(this,t)}add(t){return F.add(this,t)}sub(t){return F.sub(this,t)}mul_in(t){let a=F.mul(this,t);return this.m11=a.m11,this.m12=a.m12,this.m21=a.m21,this.m22=a.m22,this.m31=a.m31,this.m32=a.m32,this}get invert(){let{m11:t,m12:a,m21:e,m22:s,m31:i,m32:h}=this,r=1/(t*s-e*a);return new F(s*r,-a*r,-e*r,t*r,(e*h-i*s)*r,(i*a-t*h)*r)}get scaling_factor(){let{m11:t,m12:a,m21:e,m22:s,m31:i,m32:h}=this;return Math.sqrt(t*t+a*a)}equals(t){return Math.abs(this.m11-t.m11)new F(t,a,e,s,i,h)),_(v,"copy",t=>new F(t.m11,t.m12,t.m21,t.m22,t.m31,t.m32)),_(v,"create_translation",t=>new F(1,0,0,1,t.x,t.y)),_(v,"create_translation_x",(t,a)=>new F(1,0,0,1,t,a)),_(v,"create_scale",(t,a)=>{if(a){let e=a.x*(1-t),s=a.y*(1-t);return new F(t,0,0,t,e,s)}return new F(t,0,0,t,0,0)}),_(v,"create_scale_xy",(t,a,e)=>{if(e){let s=e.x*(1-t),i=e.y*(1-a);return new F(t,0,0,a,s,i)}return new F(t,0,0,a,0,0)}),_(v,"create_scale_v",(t,a)=>{if(a){let e=a.x*(1-t.x),s=a.y*(1-t.y);return new F(t.x,0,0,t.y,e,s)}return new F(t.x,0,0,t.y,0,0)}),_(v,"create_rotation",t=>{let a=Math.cos(t),e=Math.sin(t);return new F(a,e,-e,a,0,0)}),_(v,"create_transform",(t,a,e,s)=>{let i=F.identity;return(a.x!==0||a.y!==0)&&(i=F.create_translation_x(-a.x,-a.y)),(e.x!==1||e.y!==1)&&(i=i.mul(F.create_scale_v(e))),s!==0&&(i=i.mul(F.create_rotation(s))),(t.x!==0||t.y!==0)&&(i=i.mul(F.create_translation(t))),i}),_(v,"add",(t,a)=>new F(t.m11+a.m11,t.m12+a.m12,t.m21+a.m21,t.m22+a.m22,t.m31+a.m31,t.m32+a.m32)),_(v,"sub",(t,a)=>new F(t.m11-a.m11,t.m12-a.m12,t.m21-a.m21,t.m22-a.m22,t.m31-a.m31,t.m32-a.m32)),_(v,"mul",(t,a)=>new F(t.m11*a.m11+t.m12*a.m21,t.m11*a.m12+t.m12*a.m22,t.m21*a.m11+t.m22*a.m21,t.m21*a.m12+t.m22*a.m22,t.m31*a.m11+t.m32*a.m21+a.m31,t.m31*a.m12+t.m32*a.m22+a.m32));const se=class{constructor(t,a,e,s,i,h,r,l,p,d,g,f,m,u,k,z){_(this,"m11"),_(this,"m12"),_(this,"m13"),_(this,"m14"),_(this,"m21"),_(this,"m22"),_(this,"m23"),_(this,"m24"),_(this,"m31"),_(this,"m32"),_(this,"m33"),_(this,"m34"),_(this,"m41"),_(this,"m42"),_(this,"m43"),_(this,"m44"),this.m11=t,this.m12=a,this.m13=e,this.m14=s,this.m21=i,this.m22=h,this.m23=r,this.m24=l,this.m31=p,this.m32=d,this.m33=g,this.m34=f,this.m41=m,this.m42=u,this.m43=k,this.m44=z}static get identity(){return new se(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)}mul(t){let{m11:a,m12:e,m13:s,m14:i,m21:h,m22:r,m23:l,m24:p,m31:d,m32:g,m33:f,m34:m,m41:u,m42:k,m43:z,m44:P}=this,U=se.identity;return U.m11=a*t.m11+e*t.m21+s*t.m31+i*t.m41,U.m12=a*t.m12+e*t.m22+s*t.m32+i*t.m42,U.m13=a*t.m13+e*t.m23+s*t.m33+i*t.m43,U.m14=a*t.m14+e*t.m24+s*t.m34+i*t.m44,U.m21=h*t.m11+r*t.m21+l*t.m31+p*t.m41,U.m22=h*t.m12+r*t.m22+l*t.m32+p*t.m42,U.m23=h*t.m13+r*t.m23+l*t.m33+p*t.m43,U.m24=h*t.m14+r*t.m24+l*t.m34+p*t.m44,U.m31=d*t.m11+g*t.m21+f*t.m31+m*t.m41,U.m32=d*t.m12+g*t.m22+f*t.m32+m*t.m42,U.m33=d*t.m13+g*t.m23+f*t.m33+m*t.m43,U.m34=d*t.m14+g*t.m24+f*t.m34+m*t.m44,U.m41=u*t.m11+k*t.m21+z*t.m31+P*t.m41,U.m42=u*t.m12+k*t.m22+z*t.m32+P*t.m42,U.m43=u*t.m13+k*t.m23+z*t.m33+P*t.m43,U.m44=u*t.m14+k*t.m24+z*t.m34+P*t.m44,U}};let ie=se;_(ie,"create_ortho",(t,a,e,s)=>{let i=se.identity;return i.m11=2/t,i.m12=i.m13=i.m14=0,i.m22=-2/a,i.m21=i.m23=i.m24=0,i.m33=1/(e-s),i.m31=i.m32=i.m34=0,i.m41=i.m42=0,i.m43=e/(e-s),i.m44=1,i}),_(ie,"create_ortho_offcenter",(t,a,e,s,i,h)=>{let r=se.identity;return r.m11=2/(a-t),r.m12=r.m13=r.m14=0,r.m22=2/(s-e),r.m21=r.m23=r.m24=0,r.m33=1/(i-h),r.m31=r.m32=r.m34=0,r.m41=(t+a)/(t-a),r.m42=(s+e)/(e-s),r.m43=i/(i-h),r.m44=1,r}),_(ie,"create_perspective",(t,a,e,s)=>{let i=1/Math.tan(t*.5),h=i/a,r=se.identity;return r.m11=h,r.m12=r.m13=r.m14=0,r.m22=i,r.m21=r.m23=r.m24=0,r.m31=r.m32=0,r.m33=s/(e-s),r.m34=-1,r.m41=r.m42=r.m44=0,r.m43=e*s/(e-s),r}),_(ie,"create_translation",(t,a,e)=>{let s=se.identity;return s.m41=t,s.m42=a,s.m43=e,s}),_(ie,"create_scale",(t,a,e)=>{let s=se.identity;return s.m11=t,s.m22=a,s.m33=e,s}),_(ie,"create_lookat",(t,a,e)=>{let s=t.sub(a).normal,i=_e.cross(e,s).normal,h=_e.cross(s,i),r=se.identity;return r.m11=i.x,r.m12=h.x,r.m13=s.x,r.m14=0,r.m21=i.y,r.m22=h.y,r.m23=s.y,r.m24=0,r.m31=i.z,r.m32=h.z,r.m33=s.z,r.m34=0,r.m41=-_e.dot(i,t),r.m42=-_e.dot(h,t),r.m43=-_e.dot(s,t),r.m44=1,r});const we=class{constructor(t,a,e,s){this.r=t,this.g=a,this.b=e,this.a=s}get rgb(){return this.r<<16|this.g<<8|this.b}};let y=we;_(y,"hex",t=>new we((t&16711680)>>16,(t&65280)>>8,t&255,255)),_(y,"lerp",(t,a,e)=>(e<0&&(e=0),e>1&&(e=1),new we(t.r+(a.r-t.r)*e,t.g+(a.g-t.g)*e,t.b+(a.b-t.b)*e,t.a+(a.a-t.a)*e))),_(y,"white",new we(255,255,255,255)),_(y,"black",new we(0,0,0,255)),_(y,"red",new we(255,0,0,255));const gs=(t,a)=>t-Math.floor(t/a)*a;class ms{constructor(){_(this,"ticks_per_second",1e3),_(this,"ticks",0),_(this,"seconds",0),_(this,"delta",0),_(this,"previous_ticks",0),_(this,"previous_seconds",0),_(this,"pause_timer",0)}pause_for(a){a>=this.pause_timer&&(this.pause_timer=a)}on_interval(a,e=0){let s=this.seconds,i=this.delta,h=Math.floor((s-e-i)/a),r=Math.floor((s-e)/a);return h=e&&s=a}}const b=new ms,Ua=class{constructor(t){_(this,"canvas"),this.config=t}get get_draw_size(){return this.canvas?[this.canvas.width,this.canvas.height]:[this.config.width,this.config.height]}present(){}update(){}gl_context_create(){return this.canvas=document.createElement("canvas"),this.canvas.width=this.config.width,this.canvas.height=this.config.height,this.canvas.getContext("webgl2")}init(){}ready(){}};let Oa=Ua;_(Oa,"try_make_platform",t=>new Ua(t));var I=(t=>(t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.SrcColor=2]="SrcColor",t[t.OneMinusSrcColor=3]="OneMinusSrcColor",t[t.DstColor=4]="DstColor",t[t.OneMinusDstColor=5]="OneMinusDstColor",t[t.SrcAlpha=6]="SrcAlpha",t[t.OneMinusSrcAlpha=7]="OneMinusSrcAlpha",t[t.DstAlpha=8]="DstAlpha",t[t.OneMinusDstAlpha=9]="OneMinusDstAlpha",t[t.ConstantColor=10]="ConstantColor",t[t.OneMinusConstantColor=11]="OneMinusConstantColor",t[t.ConstantAlpha=12]="ConstantAlpha",t[t.OneMinusConstantAlpha=13]="OneMinusConstantAlpha",t))(I||{}),Ue=(t=>(t[t.Add=0]="Add",t[t.Subtract=1]="Subtract",t[t.Min=2]="Min",t[t.Max=3]="Max",t))(Ue||{});const et=class{constructor(t,a,e,s,i,h){this.color_op=t,this.color_src=a,this.color_dst=e,this.alpha_op=s,this.alpha_src=i,this.alpha_dst=h}};let tt=et;_(tt,"Normal",new et(0,1,7,0,1,7)),_(tt,"NonPremultiplied",new et(0,6,7,0,6,7)),_(tt,"Additive",new et(0,6,1,0,6,1));const ys=t=>[t.m11,t.m12,t.m13,t.m14,t.m21,t.m22,t.m23,t.m24,t.m31,t.m32,t.m33,t.m34,t.m41,t.m42,t.m43,t.m44],ha=t=>{let a=0;switch(t.type){case C.Float:a=1;break;case C.Float2:a=2;break;case C.Float3:a=3;break;case C.Float4:a=4;break;case C.Mat3x2:a=9;break;case C.Mat4x4:a=16;break}return a*t.array_length};var C=(t=>(t[t.None=0]="None",t[t.Float=1]="Float",t[t.Float2=2]="Float2",t[t.Float3=3]="Float3",t[t.Float4=4]="Float4",t[t.Mat3x2=5]="Mat3x2",t[t.Mat4x4=6]="Mat4x4",t[t.Texture2D=7]="Texture2D",t[t.Sampler2D=8]="Sampler2D",t))(C||{}),at=(t=>(t[t.None=0]="None",t[t.Vertex=1]="Vertex",t[t.Fragment=2]="Fragment",t[t.Both=3]="Both",t))(at||{});class At{constructor(a,e,s,i=0,h=0,r=0){this.name=a,this.type=e,this.shader=s,this.register_index=i,this.buffer_index=h,this.array_length=r}}class Vt{constructor(a){_(this,"stride",0),this.attributes=a,a.forEach(e=>{switch(e.type){case O.Float:this.stride+=4;break;case O.Float2:this.stride+=8;break;case O.Float3:this.stride+=12;break;case O.Float4:this.stride+=16;break;case O.UByte4:this.stride+=4;break}})}}const Da=class{constructor(){_(this,"index",0),_(this,"type",O.None),_(this,"normalized",!1)}};let ne=Da;_(ne,"make",(t,a,e)=>{let s=new Da;return s.index=t,s.type=a,s.normalized=e,s});var O=(t=>(t[t.None=0]="None",t[t.Float=1]="Float",t[t.Float2=2]="Float2",t[t.Float3=3]="Float3",t[t.Float4=4]="Float4",t[t.UByte4=5]="UByte4",t))(O||{}),ft=(t=>(t[t.None=0]="None",t[t.R=1]="R",t[t.RGBA=2]="RGBA",t[t.DepthStencil=3]="DepthStencil",t[t.Count=4]="Count",t))(ft||{}),Le=(t=>(t[t.None=0]="None",t[t.Linear=1]="Linear",t[t.Nearest=2]="Nearest",t))(Le||{}),Oe=(t=>(t[t.None=0]="None",t[t.Clamp=1]="Clamp",t[t.Repeat=2]="Repeat",t))(Oe||{});const qt=class{constructor(t,a,e){this.filter=t,this.wrap_x=a,this.wrap_y=e}static get get_default(){return new qt(1,2,2)}};let ye=qt;_(ye,"make",(t=1,a=2,e=2)=>new qt(t,a,e));const Na=class{constructor(){}};let Me=Na;_(Me,"from_image",t=>Na.create(t.width,t.height,2,t)),_(Me,"create",(t,a,e,s)=>{let i=c.renderer.create_texture(t,a,e);return i&&s&&i.set_data(s),i});class me{get width(){return this.textures[0].width}get height(){return this.textures[0].height}texture(a){return this.textures[a]}}_(me,"create",(t,a)=>c.renderer.create_target(t,a));class Ve{}_(Ve,"create",()=>c.renderer.create_mesh());class qe{}_(qe,"create",t=>c.renderer.create_shader(t));const Pa=class{constructor(t){_(this,"m_shader"),_(this,"m_textures",[]),_(this,"m_samplers",[]),_(this,"m_data"),this.m_shader=t;let a=t.uniforms,e=0;a.forEach(s=>{s.type!==0&&(s.type,s.type,e+=ha(s))}),this.m_data=new Float32Array(e)}get shader(){return this.m_shader}get data(){return this.m_data}get_sampler(t,a=0){}get_sampler_at(t){return this.m_samplers[t]}get_texture(t,a=0){}get_texture_at(t){return this.m_textures[t]}set_sampler_at_location(t,a){this.m_samplers[t]=a}set_texture_at_location(t,a){this.m_textures[t]=a}set_texture(t,a,e=0){let s=this.m_shader.uniforms.find(i=>i.type===7&&i.name===t);s&&(this.m_textures[s.register_index+e]=a)}set_sampler(t,a,e=0){let s=this.m_shader.uniforms.find(i=>i.type===8&&i.name===t);s&&(this.m_samplers[s.register_index+e]=a)}set_matrix(t,a){let e=0;this.m_shader.uniforms.find(s=>s.type===7||s.type===8||s.type===0?!1:s.name===t?(this.m_data.set(ys(a),e),!0):(e+=ha(s),!1))||J.warn(`No uniform ${t} exists`)}has_value(t){return!!this.m_shader.uniforms.find(a=>a.name===t)}};let gt=Pa;_(gt,"create",t=>new Pa(t));class Kt{constructor(){_(this,"target",c.backbuffer),_(this,"mesh"),_(this,"material"),_(this,"has_viewport",!1),_(this,"has_scissor",!1),_(this,"viewport",x.make()),_(this,"scissor",x.make()),_(this,"index_start",0),_(this,"index_count",0),_(this,"instance_count",0),_(this,"blend",tt.Normal)}perform(){let a=this;a.target||(a.target=c.backbuffer,J.warn("Trying to draw with an invalid Target; falling back to back buffer"));let e=a.mesh.index_count;if(a.index_start+a.index_count>e){if(J.warn(`Trying to draw more indices than exists in the index buffer (${a.index_start}-${a.index_start+a.index_count} / ${e}; trimming extra indices`),a.index_start>a.index_count)return;a.index_count=a.index_count-a.index_start}let s=a.mesh.instance_count;a.instance_count>s&&(J.warn(`Trying to draw more instances than exists in the index buffer (${a.instance_count} / ${s}); trimming extra instances`),a.instance_count=s);let i=n.make(a.target.width,a.target.height);a.has_viewport?a.viewport=a.viewport.overlaps_rect(x.make(0,0,i.x,i.y)):(a.viewport.x=0,a.viewport.y=0,a.viewport.w=i.x,a.viewport.h=i.y),a.has_scissor&&(a.scissor=a.scissor.overlaps_rect(x.make(0,0,i.x,i.y))),c.renderer.render(a)}}var us=`#version 300 es +var _s=Object.defineProperty;var ds=(t,a,e)=>a in t?_s(t,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[a]=e;var o=(t,a,e)=>(ds(t,typeof a!="symbol"?a+"":a,e),e);(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const h of i)if(h.type==="childList")for(const r of h.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function e(i){const h={};return i.integrity&&(h.integrity=i.integrity),i.referrerPolicy&&(h.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?h.credentials="include":i.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function s(i){if(i.ep)return;i.ep=!0;const h=e(i);fetch(i.href,h)}})();var cs=Object.defineProperty,ps=(t,a,e)=>a in t?cs(t,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[a]=e,_=(t,a,e)=>(ps(t,typeof a!="symbol"?a+"":a,e),e);const J={info(t){console.log(t)},warn(t){console.warn(t)},error(t){console.error(t)}},V=1e-6,Sa=1,za=4,Fa=8,Ra=16,M=class{constructor(t,a){_(this,"x"),_(this,"y"),this.x=t,this.y=a}static get unit_x(){return M.make(1,0)}static get unit_y(){return M.make(0,1)}static get right(){return M.make(1,0)}static get up(){return M.make(0,-1)}static get down(){return M.make(0,1)}static get left(){return M.make(-1,0)}static get zero(){return M.make(0,0)}static get one(){return M.make(1,1)}add(t){return new M(this.x+t.x,this.y+t.y)}sub(t){return new M(this.x-t.x,this.y-t.y)}mul(t){return new M(this.x*t.x,this.y*t.y)}div(t){return new M(this.x/t.x,this.y/t.y)}scale(t){return new M(this.x*t,this.y*t)}add_in(t){return this.x+=t.x,this.y+=t.y,this}sub_in(t){return this.x-=t.x,this.y-=t.y,this}mul_in(t){return this.x*=t.x,this.y*=t.y,this}scale_in(t){return this.x*=t,this.y*=t,this}set_in(t){this.x=t.x,this.y=t.y}equals(t){return Math.abs(this.x-t.x)new M(t.x,t.y)),_(n,"make",(t,a)=>new M(t,a)),_(n,"dot",(t,a)=>t.x*a.x+t.y*a.y),_(n,"transform",(t,a)=>new M(t.x*a.m11+t.y*a.m21+a.m31,t.x*a.m12+t.y*a.m22+a.m32)),_(n,"transform_normal",(t,a)=>new M(t.x*a.m11+t.y*a.m21,t.x*a.m12+t.y*a.m22)),_(n,"from_angle",(t,a=1)=>new M(Math.cos(t)*a,Math.sin(t)*a)),_(n,"approach",(t,a,e)=>t.sub(a).length_squared<=e*e?a:t.add(a.sub(t).normal).scale(e)),_(n,"lerp",(t,a,e)=>e===0?t:e===1?a:t.add(a.sub(t).scale(e))),_(n,"lerp_bezier",(t,a,e,s)=>{let{lerp:i}=M;return i(i(t,a,s),i(a,e,s),s)}),_(n,"reflect",(t,a)=>{let e=t.x*a.x+t.y*a.y;return new M(t.x-2*e*a.x,t.y-2*e*a.y)}),_(n,"min",(t,a)=>new M(Math.min(t.x,a.x),Math.min(t.y,a.y))),_(n,"max",(t,a)=>new M(Math.max(t.x,a.x),Math.max(t.y,a.y)));const ve=class{constructor(t,a,e){_(this,"x"),_(this,"y"),_(this,"z"),this.x=t,this.y=a,this.z=e}add(t){return new ve(this.x+t.x,this.y+t.y,this.z+this.z)}sub(t){return new ve(this.x-t.x,this.y-t.y,this.z-this.z)}get length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}get normal(){let{length:t}=this;return new ve(this.x/t,this.y/t,this.z/t)}};let _e=ve;_(_e,"make",(t,a,e)=>new ve(t,a,e)),_(_e,"dot",(t,a)=>t.x*a.x+t.y*a.y+t.z*a.z),_(_e,"cross",(t,a)=>new ve(t.y*a.z-t.z*a.y,t.z*a.x-t.x*a.z,t.x*a.y-t.y*a.x));const Ca=class{constructor(t,a,e,s){_(this,"x"),_(this,"y"),_(this,"z"),_(this,"w"),this.x=t,this.y=a,this.z=e,this.w=s}};let fs=Ca;_(fs,"make",(t,a,e,s)=>new Ca(t,a,e,s));const Q=class{constructor(t,a,e,s){_(this,"x"),_(this,"y"),_(this,"w"),_(this,"h"),this.x=t,this.y=a,this.w=e,this.h=s}add(t){return new Q(this.x+t.x,this.y+t.y,this.w,this.h)}sub(t){return new Q(this.x-t.x,this.y-t.y,this.w,this.h)}add_in(t){return this.x+=t.x,this.y+=t.y,this}sub_in(t){return this.x-=t.x,this.y-=t.y,this}equals(t){return Math.abs(this.x-t.x)=this.x&&t.x=this.y&&t.y=this.x&&t.x+t.w=this.y&&t.y+t.h=t.x&&this.y+this.h>=t.y&&this.x=t.x&&this.x=t.y&&this.y=this.right&&(a|=za),t.y=this.bottom&&(a|=Ra),a}};let x=Q;_(x,"make",(t=0,a=0,e=0,s=0)=>new Q(t,a,e,s)),_(x,"transform",(t,a)=>new Q(t.x*a.m11+t.y*a.m21+a.m31,t.x*a.m12+t.y*a.m22+a.m32,t.w*a.m11+t.h*a.m21,t.w*a.m12+t.h*a.m22)),_(x,"from_points",(t,a)=>{let e=n.min(t,a),s=n.max(t,a);return new Q(e.x,e.y,s.x-e.x,s.y-e.y)});const Nt=class{constructor(t,a){this.center=t,this.radius=a}project(t){let a=n.dot(this.center.sub(t.scale(this.radius)),t),e=n.dot(this.center.add(t.scale(this.radius)),t);return[a,e]}};let ia=Nt;_(ia,"make_x",(t,a,e)=>new Nt(n.make(t,a),e)),_(ia,"make",(t,a)=>new Nt(t,a));const Be=class{constructor(t,a){_(this,"a"),_(this,"b"),this.a=t,this.b=a}get bounds(){return x.from_points(this.a,this.b)}closest_point(t){let a=this.b.sub(this.a),e=t.sub(this.a),s=n.dot(e,a)/(a.x*a.x+a.y*a.y);return s<0?s=0:s>1&&(s=1),a.scale(s).add(this.a)}intersects_rect(t,a){let e=t.get_sector(this.a),s=t.get_sector(this.b);if(e==s||e&s)return!1;let i=e|s;return!!(i&Fa&&this.intersects_line(t.top_line,a)||i&Ra&&this.intersects_line(t.bottom_line,a)||i&Sa&&this.intersects_line(t.left_line,a)||i&za&&this.intersects_line(t.right_line,a))}intersects_line(t,a){let e=this.b.sub(this.a),s=t.b.sub(t.a),i=e.x*s.y-e.y*s.x;if(i>-V&&i1)return!1;let l=(h.x*e.y-h.y*e.x)/i;return l<0||l>1?!1:(a&&a.set_in(e.scale(r).add(this.a)),!0)}project(t){let a=this.a.x*t.x+this.a.y*t.y,e=a,s=a;return a=this.b.x*t.x+this.b.y*t.y,e=as?a:s,[e,s]}add(t){return new Be(this.a.add(t),this.b.add(t))}sub(t){return new Be(this.a.sub(t),this.b.sub(t))}};let ae=Be;_(ae,"make_x",(t,a,e,s)=>new Be(n.make(t,a),n.make(e,s))),_(ae,"make",(t,a)=>new Be(t,a));const F=class{constructor(t,a,e,s,i,h){_(this,"m11"),_(this,"m12"),_(this,"m21"),_(this,"m22"),_(this,"m31"),_(this,"m32"),this.m11=t,this.m12=a,this.m21=e,this.m22=s,this.m31=i,this.m32=h}static get identity(){return new F(1,0,0,1,0,0)}mul(t){return F.mul(this,t)}add(t){return F.add(this,t)}sub(t){return F.sub(this,t)}mul_in(t){let a=F.mul(this,t);return this.m11=a.m11,this.m12=a.m12,this.m21=a.m21,this.m22=a.m22,this.m31=a.m31,this.m32=a.m32,this}get invert(){let{m11:t,m12:a,m21:e,m22:s,m31:i,m32:h}=this,r=1/(t*s-e*a);return new F(s*r,-a*r,-e*r,t*r,(e*h-i*s)*r,(i*a-t*h)*r)}get scaling_factor(){let{m11:t,m12:a,m21:e,m22:s,m31:i,m32:h}=this;return Math.sqrt(t*t+a*a)}equals(t){return Math.abs(this.m11-t.m11)new F(t,a,e,s,i,h)),_(v,"copy",t=>new F(t.m11,t.m12,t.m21,t.m22,t.m31,t.m32)),_(v,"create_translation",t=>new F(1,0,0,1,t.x,t.y)),_(v,"create_translation_x",(t,a)=>new F(1,0,0,1,t,a)),_(v,"create_scale",(t,a)=>{if(a){let e=a.x*(1-t),s=a.y*(1-t);return new F(t,0,0,t,e,s)}return new F(t,0,0,t,0,0)}),_(v,"create_scale_xy",(t,a,e)=>{if(e){let s=e.x*(1-t),i=e.y*(1-a);return new F(t,0,0,a,s,i)}return new F(t,0,0,a,0,0)}),_(v,"create_scale_v",(t,a)=>{if(a){let e=a.x*(1-t.x),s=a.y*(1-t.y);return new F(t.x,0,0,t.y,e,s)}return new F(t.x,0,0,t.y,0,0)}),_(v,"create_rotation",t=>{let a=Math.cos(t),e=Math.sin(t);return new F(a,e,-e,a,0,0)}),_(v,"create_transform",(t,a,e,s)=>{let i=F.identity;return(a.x!==0||a.y!==0)&&(i=F.create_translation_x(-a.x,-a.y)),(e.x!==1||e.y!==1)&&(i=i.mul(F.create_scale_v(e))),s!==0&&(i=i.mul(F.create_rotation(s))),(t.x!==0||t.y!==0)&&(i=i.mul(F.create_translation(t))),i}),_(v,"add",(t,a)=>new F(t.m11+a.m11,t.m12+a.m12,t.m21+a.m21,t.m22+a.m22,t.m31+a.m31,t.m32+a.m32)),_(v,"sub",(t,a)=>new F(t.m11-a.m11,t.m12-a.m12,t.m21-a.m21,t.m22-a.m22,t.m31-a.m31,t.m32-a.m32)),_(v,"mul",(t,a)=>new F(t.m11*a.m11+t.m12*a.m21,t.m11*a.m12+t.m12*a.m22,t.m21*a.m11+t.m22*a.m21,t.m21*a.m12+t.m22*a.m22,t.m31*a.m11+t.m32*a.m21+a.m31,t.m31*a.m12+t.m32*a.m22+a.m32));const se=class{constructor(t,a,e,s,i,h,r,l,p,d,g,f,m,u,k,A){_(this,"m11"),_(this,"m12"),_(this,"m13"),_(this,"m14"),_(this,"m21"),_(this,"m22"),_(this,"m23"),_(this,"m24"),_(this,"m31"),_(this,"m32"),_(this,"m33"),_(this,"m34"),_(this,"m41"),_(this,"m42"),_(this,"m43"),_(this,"m44"),this.m11=t,this.m12=a,this.m13=e,this.m14=s,this.m21=i,this.m22=h,this.m23=r,this.m24=l,this.m31=p,this.m32=d,this.m33=g,this.m34=f,this.m41=m,this.m42=u,this.m43=k,this.m44=A}static get identity(){return new se(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)}mul(t){let{m11:a,m12:e,m13:s,m14:i,m21:h,m22:r,m23:l,m24:p,m31:d,m32:g,m33:f,m34:m,m41:u,m42:k,m43:A,m44:P}=this,U=se.identity;return U.m11=a*t.m11+e*t.m21+s*t.m31+i*t.m41,U.m12=a*t.m12+e*t.m22+s*t.m32+i*t.m42,U.m13=a*t.m13+e*t.m23+s*t.m33+i*t.m43,U.m14=a*t.m14+e*t.m24+s*t.m34+i*t.m44,U.m21=h*t.m11+r*t.m21+l*t.m31+p*t.m41,U.m22=h*t.m12+r*t.m22+l*t.m32+p*t.m42,U.m23=h*t.m13+r*t.m23+l*t.m33+p*t.m43,U.m24=h*t.m14+r*t.m24+l*t.m34+p*t.m44,U.m31=d*t.m11+g*t.m21+f*t.m31+m*t.m41,U.m32=d*t.m12+g*t.m22+f*t.m32+m*t.m42,U.m33=d*t.m13+g*t.m23+f*t.m33+m*t.m43,U.m34=d*t.m14+g*t.m24+f*t.m34+m*t.m44,U.m41=u*t.m11+k*t.m21+A*t.m31+P*t.m41,U.m42=u*t.m12+k*t.m22+A*t.m32+P*t.m42,U.m43=u*t.m13+k*t.m23+A*t.m33+P*t.m43,U.m44=u*t.m14+k*t.m24+A*t.m34+P*t.m44,U}};let ie=se;_(ie,"create_ortho",(t,a,e,s)=>{let i=se.identity;return i.m11=2/t,i.m12=i.m13=i.m14=0,i.m22=-2/a,i.m21=i.m23=i.m24=0,i.m33=1/(e-s),i.m31=i.m32=i.m34=0,i.m41=i.m42=0,i.m43=e/(e-s),i.m44=1,i}),_(ie,"create_ortho_offcenter",(t,a,e,s,i,h)=>{let r=se.identity;return r.m11=2/(a-t),r.m12=r.m13=r.m14=0,r.m22=2/(s-e),r.m21=r.m23=r.m24=0,r.m33=1/(i-h),r.m31=r.m32=r.m34=0,r.m41=(t+a)/(t-a),r.m42=(s+e)/(e-s),r.m43=i/(i-h),r.m44=1,r}),_(ie,"create_perspective",(t,a,e,s)=>{let i=1/Math.tan(t*.5),h=i/a,r=se.identity;return r.m11=h,r.m12=r.m13=r.m14=0,r.m22=i,r.m21=r.m23=r.m24=0,r.m31=r.m32=0,r.m33=s/(e-s),r.m34=-1,r.m41=r.m42=r.m44=0,r.m43=e*s/(e-s),r}),_(ie,"create_translation",(t,a,e)=>{let s=se.identity;return s.m41=t,s.m42=a,s.m43=e,s}),_(ie,"create_scale",(t,a,e)=>{let s=se.identity;return s.m11=t,s.m22=a,s.m33=e,s}),_(ie,"create_lookat",(t,a,e)=>{let s=t.sub(a).normal,i=_e.cross(e,s).normal,h=_e.cross(s,i),r=se.identity;return r.m11=i.x,r.m12=h.x,r.m13=s.x,r.m14=0,r.m21=i.y,r.m22=h.y,r.m23=s.y,r.m24=0,r.m31=i.z,r.m32=h.z,r.m33=s.z,r.m34=0,r.m41=-_e.dot(i,t),r.m42=-_e.dot(h,t),r.m43=-_e.dot(s,t),r.m44=1,r});const we=class{constructor(t,a,e,s){this.r=t,this.g=a,this.b=e,this.a=s}get rgb(){return this.r<<16|this.g<<8|this.b}};let y=we;_(y,"hex",t=>new we((t&16711680)>>16,(t&65280)>>8,t&255,255)),_(y,"lerp",(t,a,e)=>(e<0&&(e=0),e>1&&(e=1),new we(t.r+(a.r-t.r)*e,t.g+(a.g-t.g)*e,t.b+(a.b-t.b)*e,t.a+(a.a-t.a)*e))),_(y,"white",new we(255,255,255,255)),_(y,"black",new we(0,0,0,255)),_(y,"red",new we(255,0,0,255));const gs=(t,a)=>t-Math.floor(t/a)*a;class ms{constructor(){_(this,"ticks_per_second",1e3),_(this,"ticks",0),_(this,"seconds",0),_(this,"delta",0),_(this,"previous_ticks",0),_(this,"previous_seconds",0),_(this,"pause_timer",0)}pause_for(a){a>=this.pause_timer&&(this.pause_timer=a)}on_interval(a,e=0){let s=this.seconds,i=this.delta,h=Math.floor((s-e-i)/a),r=Math.floor((s-e)/a);return h=e&&s=a}}const b=new ms,Ua=class{constructor(t){_(this,"canvas"),this.config=t}get get_draw_size(){return this.canvas?[this.canvas.width,this.canvas.height]:[this.config.width,this.config.height]}present(){}update(){}gl_context_create(){return this.canvas=document.createElement("canvas"),this.canvas.width=this.config.width,this.canvas.height=this.config.height,this.canvas.getContext("webgl2")}init(){}ready(){}};let Oa=Ua;_(Oa,"try_make_platform",t=>new Ua(t));var I=(t=>(t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.SrcColor=2]="SrcColor",t[t.OneMinusSrcColor=3]="OneMinusSrcColor",t[t.DstColor=4]="DstColor",t[t.OneMinusDstColor=5]="OneMinusDstColor",t[t.SrcAlpha=6]="SrcAlpha",t[t.OneMinusSrcAlpha=7]="OneMinusSrcAlpha",t[t.DstAlpha=8]="DstAlpha",t[t.OneMinusDstAlpha=9]="OneMinusDstAlpha",t[t.ConstantColor=10]="ConstantColor",t[t.OneMinusConstantColor=11]="OneMinusConstantColor",t[t.ConstantAlpha=12]="ConstantAlpha",t[t.OneMinusConstantAlpha=13]="OneMinusConstantAlpha",t))(I||{}),Ue=(t=>(t[t.Add=0]="Add",t[t.Subtract=1]="Subtract",t[t.Min=2]="Min",t[t.Max=3]="Max",t))(Ue||{});const et=class{constructor(t,a,e,s,i,h){this.color_op=t,this.color_src=a,this.color_dst=e,this.alpha_op=s,this.alpha_src=i,this.alpha_dst=h}};let tt=et;_(tt,"Normal",new et(0,1,7,0,1,7)),_(tt,"NonPremultiplied",new et(0,6,7,0,6,7)),_(tt,"Additive",new et(0,6,1,0,6,1));const ys=t=>[t.m11,t.m12,t.m13,t.m14,t.m21,t.m22,t.m23,t.m24,t.m31,t.m32,t.m33,t.m34,t.m41,t.m42,t.m43,t.m44],ha=t=>{let a=0;switch(t.type){case C.Float:a=1;break;case C.Float2:a=2;break;case C.Float3:a=3;break;case C.Float4:a=4;break;case C.Mat3x2:a=9;break;case C.Mat4x4:a=16;break}return a*t.array_length};var C=(t=>(t[t.None=0]="None",t[t.Float=1]="Float",t[t.Float2=2]="Float2",t[t.Float3=3]="Float3",t[t.Float4=4]="Float4",t[t.Mat3x2=5]="Mat3x2",t[t.Mat4x4=6]="Mat4x4",t[t.Texture2D=7]="Texture2D",t[t.Sampler2D=8]="Sampler2D",t))(C||{}),at=(t=>(t[t.None=0]="None",t[t.Vertex=1]="Vertex",t[t.Fragment=2]="Fragment",t[t.Both=3]="Both",t))(at||{});class At{constructor(a,e,s,i=0,h=0,r=0){this.name=a,this.type=e,this.shader=s,this.register_index=i,this.buffer_index=h,this.array_length=r}}class Vt{constructor(a){_(this,"stride",0),this.attributes=a,a.forEach(e=>{switch(e.type){case O.Float:this.stride+=4;break;case O.Float2:this.stride+=8;break;case O.Float3:this.stride+=12;break;case O.Float4:this.stride+=16;break;case O.UByte4:this.stride+=4;break}})}}const Da=class{constructor(){_(this,"index",0),_(this,"type",O.None),_(this,"normalized",!1)}};let ne=Da;_(ne,"make",(t,a,e)=>{let s=new Da;return s.index=t,s.type=a,s.normalized=e,s});var O=(t=>(t[t.None=0]="None",t[t.Float=1]="Float",t[t.Float2=2]="Float2",t[t.Float3=3]="Float3",t[t.Float4=4]="Float4",t[t.UByte4=5]="UByte4",t))(O||{}),ft=(t=>(t[t.None=0]="None",t[t.R=1]="R",t[t.RGBA=2]="RGBA",t[t.DepthStencil=3]="DepthStencil",t[t.Count=4]="Count",t))(ft||{}),Le=(t=>(t[t.None=0]="None",t[t.Linear=1]="Linear",t[t.Nearest=2]="Nearest",t))(Le||{}),Oe=(t=>(t[t.None=0]="None",t[t.Clamp=1]="Clamp",t[t.Repeat=2]="Repeat",t))(Oe||{});const qt=class{constructor(t,a,e){this.filter=t,this.wrap_x=a,this.wrap_y=e}static get get_default(){return new qt(1,2,2)}};let ye=qt;_(ye,"make",(t=1,a=2,e=2)=>new qt(t,a,e));const Na=class{constructor(){}};let Me=Na;_(Me,"from_image",t=>Na.create(t.width,t.height,2,t)),_(Me,"create",(t,a,e,s)=>{let i=c.renderer.create_texture(t,a,e);return i&&s&&i.set_data(s),i});class me{get width(){return this.textures[0].width}get height(){return this.textures[0].height}texture(a){return this.textures[a]}}_(me,"create",(t,a)=>c.renderer.create_target(t,a));class Ve{}_(Ve,"create",()=>c.renderer.create_mesh());class qe{}_(qe,"create",t=>c.renderer.create_shader(t));const Pa=class{constructor(t){_(this,"m_shader"),_(this,"m_textures",[]),_(this,"m_samplers",[]),_(this,"m_data"),this.m_shader=t;let a=t.uniforms,e=0;a.forEach(s=>{s.type!==0&&(s.type,s.type,e+=ha(s))}),this.m_data=new Float32Array(e)}get shader(){return this.m_shader}get data(){return this.m_data}get_sampler(t,a=0){}get_sampler_at(t){return this.m_samplers[t]}get_texture(t,a=0){}get_texture_at(t){return this.m_textures[t]}set_sampler_at_location(t,a){this.m_samplers[t]=a}set_texture_at_location(t,a){this.m_textures[t]=a}set_texture(t,a,e=0){let s=this.m_shader.uniforms.find(i=>i.type===7&&i.name===t);s&&(this.m_textures[s.register_index+e]=a)}set_sampler(t,a,e=0){let s=this.m_shader.uniforms.find(i=>i.type===8&&i.name===t);s&&(this.m_samplers[s.register_index+e]=a)}set_matrix(t,a){let e=0;this.m_shader.uniforms.find(s=>s.type===7||s.type===8||s.type===0?!1:s.name===t?(this.m_data.set(ys(a),e),!0):(e+=ha(s),!1))||J.warn(`No uniform ${t} exists`)}has_value(t){return!!this.m_shader.uniforms.find(a=>a.name===t)}};let gt=Pa;_(gt,"create",t=>new Pa(t));class Kt{constructor(){_(this,"target",c.backbuffer),_(this,"mesh"),_(this,"material"),_(this,"has_viewport",!1),_(this,"has_scissor",!1),_(this,"viewport",x.make()),_(this,"scissor",x.make()),_(this,"index_start",0),_(this,"index_count",0),_(this,"instance_count",0),_(this,"blend",tt.Normal)}perform(){let a=this;a.target||(a.target=c.backbuffer,J.warn("Trying to draw with an invalid Target; falling back to back buffer"));let e=a.mesh.index_count;if(a.index_start+a.index_count>e){if(J.warn(`Trying to draw more indices than exists in the index buffer (${a.index_start}-${a.index_start+a.index_count} / ${e}; trimming extra indices`),a.index_start>a.index_count)return;a.index_count=a.index_count-a.index_start}let s=a.mesh.instance_count;a.instance_count>s&&(J.warn(`Trying to draw more instances than exists in the index buffer (${a.instance_count} / ${s}); trimming extra instances`),a.instance_count=s);let i=n.make(a.target.width,a.target.height);a.has_viewport?a.viewport=a.viewport.overlaps_rect(x.make(0,0,i.x,i.y)):(a.viewport.x=0,a.viewport.y=0,a.viewport.w=i.x,a.viewport.h=i.y),a.has_scissor&&(a.scissor=a.scissor.overlaps_rect(x.make(0,0,i.x,i.y))),c.renderer.render(a)}}var us=`#version 300 es uniform mat4 u_matrix; layout(location=0) in vec2 a_position; layout(location=1) in vec2 a_tex; @@ -29,10 +29,10 @@ void main(void) { v_type.y * color.a * v_col + v_type.z * v_col; }`;const ws=[us,xs];class ks extends qe{constructor(a){super(),_(this,"m_id"),_(this,"m_uniforms",[]),_(this,"uniform_locations",[]),this.data=a;let e=c.renderer.gl.createShader(c.renderer.gl.VERTEX_SHADER);{c.renderer.gl.shaderSource(e,a[0]),c.renderer.gl.compileShader(e);let r=c.renderer.gl.getShaderInfoLog(e);if(r){J.error(r);return}}let s=c.renderer.gl.createShader(c.renderer.gl.FRAGMENT_SHADER);{c.renderer.gl.shaderSource(s,a[1]),c.renderer.gl.compileShader(s);let r=c.renderer.gl.getShaderInfoLog(s);if(r&&r.length>0){J.error(r);return}}let i=c.renderer.gl.createProgram();c.renderer.gl.attachShader(i,e),c.renderer.gl.attachShader(i,s),c.renderer.gl.linkProgram(i);let h=c.renderer.gl.getProgramInfoLog(i);if(c.renderer.gl.deleteShader(e),c.renderer.gl.deleteShader(s),h&&h.length>0){J.error(h);return}{let r=c.renderer.gl.getProgramParameter(i,c.renderer.gl.ACTIVE_UNIFORMS),l=0;for(let p=0;p{let l=c.renderer.gl.UNSIGNED_BYTE,p=0,d=1;r.type===O.Float&&(l=c.renderer.gl.FLOAT,p=4,d=1),r.type===O.Float2&&(l=c.renderer.gl.FLOAT,p=4,d=2),r.type===O.Float3&&(l=c.renderer.gl.FLOAT,p=4,d=3),r.type===O.Float4&&(l=c.renderer.gl.FLOAT,p=4,d=4),r.type===O.UByte4&&(l=c.renderer.gl.UNSIGNED_BYTE,p=1,d=4);let g=r.index;c.renderer.gl.enableVertexAttribArray(g),c.renderer.gl.vertexAttribPointer(g,d,l,r.normalized,s.stride,h),c.renderer.gl.vertexAttribDivisor(g,i),h+=d*p}),s.stride}}class bs extends me{constructor(a,e,s){super(),_(this,"m_id"),_(this,"m_attachments"),_(this,"m_width"),_(this,"m_height"),this.m_attachments=[],this.m_id=c.renderer.gl.createFramebuffer(),this.m_width=a,this.m_height=e,c.renderer.gl.bindFramebuffer(c.renderer.gl.FRAMEBUFFER,this.m_id),s.forEach((i,h)=>{let r=Me.create(a,e,i);r.framebuffer_parent=!0,this.m_attachments.push(r),i!==ft.DepthStencil?c.renderer.gl.framebufferTexture2D(c.renderer.gl.FRAMEBUFFER,c.renderer.gl.COLOR_ATTACHMENT0+h,c.renderer.gl.TEXTURE_2D,r.gl_id,0):c.renderer.gl.framebufferTexture2D(c.renderer.gl.FRAMEBUFFER,c.renderer.gl.DEPTH_STENCIL_ATTACHMENT,c.renderer.gl.TEXTURE_2D,r.gl_id,0)})}get gl_id(){return this.m_id}get textures(){return this.m_attachments}clear(a,e=1,s=0){c.renderer.clear_backbuffer(a,e,s,this.m_id)}}class Es extends Me{constructor(a,e,s){super(),_(this,"m_id"),_(this,"m_width"),_(this,"m_height"),_(this,"m_sampler"),_(this,"m_format"),_(this,"m_gl_internal_format"),_(this,"m_gl_format"),_(this,"m_gl_type"),_(this,"framebuffer_parent"),this.m_id=0,this.m_width=a,this.m_height=e,this.m_sampler=new ye(Le.None,Oe.None,Oe.None),this.m_format=s,this.framebuffer_parent=!1,this.m_gl_internal_format=c.renderer.gl.RED,this.m_gl_format=c.renderer.gl.RED,this.m_gl_type=c.renderer.gl.UNSIGNED_BYTE,s===ft.RGBA?(this.m_gl_internal_format=c.renderer.gl.RGBA,this.m_gl_format=c.renderer.gl.RGBA,this.m_gl_type=c.renderer.gl.UNSIGNED_BYTE):J.error(`Unsupported Texture format ${s}`),this.m_id=c.renderer.gl.createTexture(),c.renderer.gl.activeTexture(c.renderer.gl.TEXTURE0),c.renderer.gl.bindTexture(c.renderer.gl.TEXTURE_2D,this.m_id),c.renderer.gl.texImage2D(c.renderer.gl.TEXTURE_2D,0,this.m_gl_internal_format,a,e,0,this.m_gl_format,this.m_gl_type,null)}get is_framebuffer(){return this.framebuffer_parent}get width(){return this.m_width}get height(){return this.m_height}set_data(a){c.renderer.gl.activeTexture(c.renderer.gl.TEXTURE0),c.renderer.gl.bindTexture(c.renderer.gl.TEXTURE_2D,this.m_id),c.renderer.gl.texImage2D(c.renderer.gl.TEXTURE_2D,0,this.m_gl_internal_format,this.m_width,this.m_height,0,this.m_gl_format,this.m_gl_type,a)}update_sampler(a){this.m_sampler!==a&&(this.m_sampler=a,c.renderer.gl.bindTexture(c.renderer.gl.TEXTURE_2D,this.m_id),c.renderer.gl.texParameteri(c.renderer.gl.TEXTURE_2D,c.renderer.gl.TEXTURE_MIN_FILTER,this.m_sampler.filter===Le.Nearest?c.renderer.gl.NEAREST:c.renderer.gl.LINEAR),c.renderer.gl.texParameteri(c.renderer.gl.TEXTURE_2D,c.renderer.gl.TEXTURE_MAG_FILTER,this.m_sampler.filter===Le.Nearest?c.renderer.gl.NEAREST:c.renderer.gl.LINEAR),c.renderer.gl.texParameteri(c.renderer.gl.TEXTURE_2D,c.renderer.gl.TEXTURE_WRAP_S,this.m_sampler.wrap_x===Oe.Clamp?c.renderer.gl.CLAMP_TO_EDGE:c.renderer.gl.REPEAT),c.renderer.gl.texParameteri(c.renderer.gl.TEXTURE_2D,c.renderer.gl.TEXTURE_WRAP_T,this.m_sampler.wrap_y===Oe.Clamp?c.renderer.gl.CLAMP_TO_EDGE:c.renderer.gl.REPEAT))}get gl_id(){return this.m_id}}const La=class{constructor(){_(this,"origin_bottom_left",!0),_(this,"gl"),_(this,"default_batcher_shader")}get get_draw_size(){}create_shader(t){return new ks(t)}create_target(t,a){return new bs(t,a,[ft.RGBA])}create_texture(t,a,e){return new Es(t,a,e)}create_mesh(){return new vs}update(){}init(){let t=c.platform.gl_context_create();return t===null?(J.error("Failed to create WebGL Context"),!1):(this.gl=t,J.info("WebGL2"),this.gl.pixelStorei(this.gl.PACK_ALIGNMENT,1),this.gl.pixelStorei(this.gl.UNPACK_ALIGNMENT,1),this.default_batcher_shader=qe.create(ws),!0)}render(t){if(t.target===c.backbuffer)this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,null);else if(t.target){let d=t.target;this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,d.gl_id)}let a=n.make(t.target.width,t.target.height),e=t.material.shader,s=t.mesh;this.gl.useProgram(e.gl_id);let i=0,h=[],r=e.uniforms,l=t.material.data,p=0;r.forEach((d,g)=>{let f=e.uniform_locations[g];if(d.type!==C.Sampler2D){if(d.type===C.Texture2D){for(let m=0;m0?this.gl.drawElementsInstanced(this.gl.TRIANGLES,t.index_count,d,g*t.index_start,t.instance_count):this.gl.drawElements(this.gl.TRIANGLES,t.index_count,d,g*t.index_start)}this.gl.bindVertexArray(null)}clear_backbuffer(t,a,e,s=null){this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,s),this.gl.disable(this.gl.SCISSOR_TEST);let i=0;i|=this.gl.COLOR_BUFFER_BIT,this.gl.colorMask(!0,!0,!0,!0),this.gl.clearColor(t.r/255,t.g/255,t.b/255,t.a/255),this.gl.clear(i)}before_render(){}after_render(){}};let Ia=La;_(Ia,"try_make_renderer",()=>new La);const ra=t=>{switch(t){case Ue.Add:return c.renderer.gl.FUNC_ADD;case Ue.Subtract:return c.renderer.gl.FUNC_SUBTRACT;case Ue.Min:return c.renderer.gl.MIN;case Ue.Max:return c.renderer.gl.MAX;default:return c.renderer.gl.FUNC_ADD}},Qe=t=>{switch(t){case I.Zero:return c.renderer.gl.ZERO;case I.One:return c.renderer.gl.ONE;case I.SrcColor:return c.renderer.gl.SRC_COLOR;case I.OneMinusSrcColor:return c.renderer.gl.ONE_MINUS_SRC_COLOR;case I.DstColor:return c.renderer.gl.DST_COLOR;case I.OneMinusDstColor:return c.renderer.gl.ONE_MINUS_DST_COLOR;case I.SrcAlpha:return c.renderer.gl.SRC_ALPHA;case I.OneMinusSrcAlpha:return c.renderer.gl.ONE_MINUS_SRC_ALPHA;case I.DstAlpha:return c.renderer.gl.DST_ALPHA;case I.OneMinusDstAlpha:return c.renderer.gl.ONE_MINUS_DST_ALPHA;case I.ConstantColor:return c.renderer.gl.CONSTANT_COLOR;case I.ConstantAlpha:return c.renderer.gl.CONSTANT_ALPHA;case I.OneMinusConstantColor:return c.renderer.gl.ONE_MINUS_CONSTANT_COLOR;case I.OneMinusConstantAlpha:return c.renderer.gl.ONE_MINUS_CONSTANT_ALPHA;default:return c.renderer.gl.ZERO}},na=()=>c.renderer.get_draw_size||c.platform.get_draw_size,$a=class extends me{get width(){return na()[0]}get height(){return na()[1]}get textures(){return $a.empty_textures}clear(t,a,e){c.renderer.clear_backbuffer(t,a,e)}};let Ba=$a;_(Ba,"empty_textures",[]);class Ts{constructor(){_(this,"platform"),_(this,"renderer"),_(this,"backbuffer"),_(this,"config"),_(this,"app_time_last",0),_(this,"app_time_accumulator",0)}get canvas(){return this.platform.canvas}run(a){var e,s;this.config=a,this.backbuffer=new Ba,this.platform=Oa.try_make_platform(this.config),this.platform.init(),this.renderer=Ia.try_make_renderer(),this.renderer.init(),this.platform.update(),(s=(e=this.config).on_startup)==null||s.call(e),this.app_time_accumulator=0,this.platform.ready(),this.begin_iterate()}begin_iterate(){const a=()=>{var s,i;this.platform.update(),this.renderer.update(),(i=(s=this.config).on_update)==null||i.call(s)},e=s=>{var i,h;let r=s-this.app_time_last;this.app_time_last=s,this.app_time_accumulator+=r,b.delta=r/b.ticks_per_second,b.pause_timer>0?b.pause_timer-=b.delta:(b.previous_ticks=b.ticks,b.ticks+=r,b.previous_seconds=b.seconds,b.seconds+=b.delta,a()),this.renderer.before_render(),(h=(i=this.config).on_render)==null||h.call(i),this.renderer.after_render(),this.platform.present(),requestAnimationFrame(e)};requestAnimationFrame(e)}}const c=new Ts,oa="u_texture",la="u_texture_sampler",As="u_matrix",_a=new Vt([ne.make(0,O.Float2,!1),ne.make(1,O.Float2,!1),ne.make(2,O.UByte4,!0),ne.make(3,O.UByte4,!0)]);class Gt{constructor(){_(this,"layer",0),_(this,"offset",0),_(this,"elements",0),_(this,"material"),_(this,"texture"),_(this,"sampler",ye.get_default),_(this,"scissor",x.make(0,0,-1,-1)),_(this,"flip_vertically",!1)}get clone(){let a=new Gt;return a.layer=this.layer,a.offset=this.offset,a.elements=this.elements,a.material=this.material,a.texture=this.texture,a.sampler=this.sampler,a.scissor=this.scissor,a.flip_vertically=this.flip_vertically,a}}class Ms{constructor(){_(this,"m_default_material"),_(this,"m_mesh"),_(this,"m_batch",new Gt),_(this,"m_matrix",v.identity),_(this,"m_tex_mult",255),_(this,"m_tex_wash",0),_(this,"m_vertices",[]),_(this,"m_indices",[]),_(this,"m_matrix_stack",[]),_(this,"m_scissor_stack",[]),_(this,"m_material_stack",[]),_(this,"m_batches",[]),_(this,"m_batch_insert",0),_(this,"integerize",!1),_(this,"default_sampler",ye.get_default)}push_matrix(a,e=!1){this.m_matrix_stack.push(this.m_matrix),e?this.m_matrix=a:this.m_matrix=a.mul(this.m_matrix)}pop_matrix(){let a=this.m_matrix;return this.m_matrix=this.m_matrix_stack.pop(),a}peek_matrix(){return this.m_matrix}push_scissor(a){this.m_scissor_stack.push(this.m_batch.scissor),this.m_batch.elements>0&&a!==this.m_batch.scissor&&this.INSERT_BATCH(),this.m_batch.scissor=a}pop_scissor(){let a=this.m_batch.scissor,e=this.m_scissor_stack.pop();return this.m_batch.elements>0&&e!==this.m_batch.scissor&&this.INSERT_BATCH(),this.m_batch.scissor=e??x.make(0,0,-1,-1),a}peek_scissor(){}push_material(a){}pop_material(){}peek_material(){}set_texture(a){this.m_batch.elements>0&&a!==this.m_batch.texture&&this.INSERT_BATCH(),this.m_batch.texture!==a&&(this.m_batch.texture=a,this.m_batch.flip_vertically=c.renderer.origin_bottom_left&&a&&a.is_framebuffer)}set_sampler(a){console.log(a)}render(a=c.backbuffer){this.render_with_m(a,ie.create_ortho_offcenter(0,a.width,a.height,0,.01,1e3))}render_with_m(a,e){if(this.m_batches.length<=0&&this.m_batch.elements<=0||this.m_indices.length<=0)return;this.m_mesh||(this.m_mesh=Ve.create()),this.m_default_material||(this.m_default_material=gt.create(c.renderer.default_batcher_shader));let s=_a.stride,i=new ArrayBuffer(s*this.m_vertices.length),h=new DataView(i);this.m_vertices.reduce((l,p)=>p.push_to(h,l),0),this.m_mesh.index_data(this.m_indices),this.m_mesh.vertex_data(_a,i);let r=new Kt;r.target=a,r.mesh=this.m_mesh,r.has_viewport=!1,r.viewport=x.make(0,0,0,0),r.instance_count=0,this.m_batches.forEach((l,p)=>{this.render_single_batch(r,l,e)}),this.m_batch.elements>0&&this.render_single_batch(r,this.m_batch,e)}render_single_batch(a,e,s){e.material?a.material=e.material:a.material=this.m_default_material,a.material.has_value(oa)?a.material.set_texture(oa,e.texture):a.material.set_texture_at_location(0,e.texture),a.material.has_value(la)?a.material.set_sampler(la,e.sampler):a.material.set_sampler_at_location(0,e.sampler),a.material.set_matrix(As,s),a.has_scissor=e.scissor.w>=0&&e.scissor.h>=0,a.scissor=e.scissor,a.index_start=e.offset*3,a.index_count=e.elements*3,a.perform()}clear(){this.m_matrix=v.identity,this.m_tex_mult=255,this.m_tex_wash=0,this.m_vertices=[],this.m_indices=[],this.m_batch.layer=0,this.m_batch.elements=0,this.m_batch.offset=0,this.m_batch.material=void 0,this.m_batch.texture=void 0,this.m_batch.sampler=this.default_sampler,this.m_batch.scissor.w=this.m_batch.scissor.h=-1,this.m_batch.flip_vertically=!1,this.m_matrix_stack=[],this.m_scissor_stack=[],this.m_material_stack=[],this.m_batches=[],this.m_batch_insert=0}line(a,e,s,i){}rect(a,e){this.PUSH_QUAD(a.x,a.y,a.x+a.w,a.y,a.x+a.w,a.y+a.h,a.x,a.y+a.h,0,0,0,0,0,0,0,0,e,e,e,e,0,0,255)}rect_line(a,e,s){e>=a.w||e>=a.h?this.rect(a,s):(this.PUSH_QUAD(a.x,a.y,a.x+a.w-e,a.y,a.x+a.w-e,a.y+e,a.x,a.y+e,0,0,0,0,0,0,0,0,s,s,s,s,0,0,255),this.PUSH_QUAD(a.x+a.w-e,a.y,a.x+a.w,a.y,a.x+a.w,a.y+a.h-e,a.x+a.w-e,a.y+a.h-e,0,0,0,0,0,0,0,0,s,s,s,s,0,0,255),this.PUSH_QUAD(a.x+e,a.y+a.h-e,a.x+a.w,a.y+a.h-e,a.x+a.w,a.y+a.h,a.x,a.y+a.h,0,0,0,0,0,0,0,0,s,s,s,s,0,0,255),this.PUSH_QUAD(a.x,a.y+e,a.x+e,a.y+e,a.x+e,a.y+a.h-e,a.x,a.y+a.h,0,0,0,0,0,0,0,0,s,s,s,s,0,0,255))}circle(a,e,s,i){}circle_line(a,e,s,i,h){}quad(a,e,s,i,h){}quad_line(a,e,s,i,h,r){}tex(a,e=n.zero,s=y.white){this.set_texture(a);let i=a.width,h=a.height,{m_tex_mult:r,m_tex_wash:l}=this;this.PUSH_QUAD(e.x,e.y,e.x+i,e.y,e.x+i,e.y+h,e.x,e.y+h,0,0,1,0,1,1,0,1,s,s,s,s,r,l,0)}tex_o(a,e,s,i,h,r){}tex_c(a,e,s,i,h,r,l){}stex(a,e=n.zero,s=y.white){let{m_tex_mult:i,m_tex_wash:h}=this;this.set_texture(a.texture),this.PUSH_QUAD(e.x+a.draw_coords[0].x,e.y+a.draw_coords[0].y,e.x+a.draw_coords[1].x,e.y+a.draw_coords[1].y,e.x+a.draw_coords[2].x,e.y+a.draw_coords[2].y,e.x+a.draw_coords[3].x,e.y+a.draw_coords[3].y,a.tex_coords[0].x,a.tex_coords[0].y,a.tex_coords[1].x,a.tex_coords[1].y,a.tex_coords[2].x,a.tex_coords[2].y,a.tex_coords[3].x,a.tex_coords[3].y,s,s,s,s,i,h,0)}stex_o(a,e,s,i,h,r){let{m_tex_mult:l,m_tex_wash:p}=this;this.push_matrix(v.create_transform(e,s,i,h)),this.set_texture(a.texture),this.PUSH_QUAD(a.draw_coords[0].x,a.draw_coords[0].y,a.draw_coords[1].x,a.draw_coords[1].y,a.draw_coords[2].x,a.draw_coords[2].y,a.draw_coords[3].x,a.draw_coords[3].y,a.tex_coords[0].x,a.tex_coords[0].y,a.tex_coords[1].x,a.tex_coords[1].y,a.tex_coords[2].x,a.tex_coords[2].y,a.tex_coords[3].x,a.tex_coords[3].y,r,r,r,r,l,p,0),this.pop_matrix()}stex_c(a,e,s,i,h,r,l){}str(a,e,s,i){this.str_j(a,e,s,n.zero,a.size,i)}str_j(a,e,s,i,h,r){this.push_matrix(v.create_scale(h/a.size).mul(v.create_translation(s)));let l=n.make(0,a.ascent+a.descent);i.x!==0&&(l.x-=a.width_of_line(e)*i.x),i.y!==0&&(l.y-=a.height_of(e)*i.y);let p=0,d=0;for(let g of e){if(g===` -`)l.x=0,l.y+=a.line_height,i.x!==0&&(l.x-=a.width_of_line(e,d+1)*i.x),p=0;else{let f=a.get_character(g.charCodeAt(0));if(f.subtexture.texture){let m=l.add(f.offset);p&&(m.x+=a.get_kerning(p,g.charCodeAt(0))),this.stex(f.subtexture,m,r)}l.x+=f.advance,p=g.charCodeAt(0)}d++}this.pop_matrix()}INSERT_BATCH(){this.m_batches.push(this.m_batch.clone),this.m_batch.offset+=this.m_batch.elements,this.m_batch.elements=0}PUSH_QUAD(a,e,s,i,h,r,l,p,d,g,f,m,u,k,z,P,U,bt,Et,Tt,Ge,We,Ye){this.m_batch.elements+=2,this.m_indices.push(this.m_vertices.length+0),this.m_indices.push(this.m_vertices.length+1),this.m_indices.push(this.m_vertices.length+2),this.m_indices.push(this.m_vertices.length+0),this.m_indices.push(this.m_vertices.length+2),this.m_indices.push(this.m_vertices.length+3),this.MAKE_VERTEX(a,e,d,g,U,Ge,Ye,We),this.MAKE_VERTEX(s,i,f,m,bt,Ge,Ye,We),this.MAKE_VERTEX(h,r,u,k,Et,Ge,Ye,We),this.MAKE_VERTEX(l,p,z,P,Tt,Ge,Ye,We)}MAKE_VERTEX(a,e,s,i,h,r,l,p){let d=this.m_matrix;this.m_vertices.push(new Ss(n.make(a*d.m11+e*d.m21+d.m31,a*d.m12+e*d.m22+d.m32),n.make(s,this.m_batch.flip_vertically?1-i:i),h,r,p,l))}}const de=new Ms;class Ss{constructor(a,e,s,i,h,r){this.pos=a,this.tex=e,this.col=s,this.mult=i,this.wash=h,this.fill=r}push_to(a,e){let{pos:s,tex:i,col:h,mult:r,wash:l,fill:p}=this;return a.setFloat32(e+0,s.x,!0),a.setFloat32(e+4,s.y,!0),a.setFloat32(e+8,i.x,!0),a.setFloat32(e+12,i.y,!0),a.setUint8(e+16,h.r),a.setUint8(e+17,h.g),a.setUint8(e+18,h.b),a.setUint8(e+19,h.a),a.setUint8(e+20,r),a.setUint8(e+21,l),a.setUint8(e+22,p),e+24}}const ja=class{constructor(t){_(this,"pixels"),this.data=t,this.pixels=[];for(let a=0;a{let a=document.createElement("canvas"),e=a.getContext("2d");return a.width=t.width,a.height=t.height,e.drawImage(t,0,0),new ja(e.getImageData(0,0,t.width,t.height))});const Wt=class{constructor(t,a,e){_(this,"draw_coords"),_(this,"tex_coords"),this.texture=t,this.source=a,this.frame=e,this.draw_coords=[n.zero,n.zero,n.zero,n.zero],this.tex_coords=[n.zero,n.zero,n.zero,n.zero],this.update()}get width(){return this.frame.w}get height(){return this.frame.h}update(){let{draw_coords:t,tex_coords:a,texture:e,frame:s,source:i}=this;if(t[0].x=-s.x,t[0].y=-s.y,t[1].x=-s.x+i.w,t[1].y=-s.y,t[2].x=-s.x+i.w,t[2].y=-s.y+i.h,t[3].x=-s.x,t[3].y=-s.y+i.h,e){let h=1/e.width,r=1/e.height;a[0].x=i.x*h,a[0].y=i.y*r,a[1].x=(i.x+i.w)*h,a[1].y=i.y*r,a[2].x=(i.x+i.w)*h,a[2].y=(i.y+i.h)*r,a[3].x=i.x*h,a[3].y=(i.y+i.h)*r}}crop_info(t){let{source:a,frame:e}=this,s=t.add(a.top_left).add(e.top_left).overlaps_rect(a),i=x.make(Math.min(0,e.x,+t.x),Math.min(0,e.y+t.y),t.w,t.h);return[s,i]}crop(t){let{texture:a}=this,[e,s]=this.crop_info(t);return new Wt(a,e,s)}};let je=Wt;_(je,"make",(t,a=x.make(0,0,t.width,t.height),e=x.make(0,0,a.w,a.h))=>new Wt(t,a,e));const Ha=class{constructor(){_(this,"scale"),_(this,"characters"),_(this,"glyphs"),_(this,"kernings"),_(this,"packs"),_(this,"_descent"),_(this,"_ascent"),_(this,"_line_gap"),_(this,"family_name"),_(this,"texture")}get ascent(){return this._ascent*this.scale}get descent(){return this._descent*this.scale}get line_gap(){return this._line_gap*this.scale}get_character(t){return this.characters.get(t)}get_kerning(t,a){var e;return(e=this.kernings.get(t))==null?void 0:e.get(a)}get_glyph(t){return this.glyphs.get(t)}get_subtexture(t){let a=this.packs.get(t);if(!a)return new je(this.texture,x.make(0,0,0,0),x.make(0,0,0,0));let{packed:e,frame:s}=a;return new je(this.texture,x.make(e.x,e.y,e.w,e.h),x.make(s.x,s.y,s.w,s.h))}};let Xa=Ha;_(Xa,"make",(t,a)=>{let e=new Ha;e.scale=t.meta.scale;let s=new Map(t.chars.map(l=>[l.glyph,{...l,has_glyph:l.has_glyph!==0}])),i=new Map(t.glyphs.map(l=>[l.codepoint,l.glyph])),h=new Map;t.kernings.forEach(l=>{h.get(l.glyph1)||h.set(l.glyph1,new Map),h.get(l.glyph1).set(l.glyph2,l.kerning)});let r=new Map(t.colors.map(l=>[l.glyph,{frame:l.frame,packed:l.packed}]));return e._descent=t.meta.descent,e._ascent=t.meta.ascent,e._line_gap=t.meta.line_gap,e.family_name=t.meta.name,e.texture=a,e.packs=r,e.kernings=h,e.glyphs=i,e.characters=s,e.scale=t.meta.scale,e});const Pt=class{constructor(){_(this,"_characters"),_(this,"_kerning"),_(this,"_atlas"),_(this,"name"),_(this,"size",0),_(this,"ascent",0),_(this,"descent",0),_(this,"line_gap",0)}clear(){this._atlas=[],this._characters=[],this._kerning=[],this.name=""}get height(){return this.ascent-this.descent}get line_height(){return this.ascent-this.descent+this.line_gap}get textures(){return this._atlas}width_of(t){let a=0,e=0,s=0;for(let i of t)i===` +`)l.x=0,l.y+=a.line_height,i.x!==0&&(l.x-=a.width_of_line(e,d+1)*i.x),p=0;else{let f=a.get_character(g.charCodeAt(0));if(f.subtexture.texture){let m=l.add(f.offset);p&&(m.x+=a.get_kerning(p,g.charCodeAt(0))),this.stex(f.subtexture,m,r)}l.x+=f.advance,p=g.charCodeAt(0)}d++}this.pop_matrix()}INSERT_BATCH(){this.m_batches.push(this.m_batch.clone),this.m_batch.offset+=this.m_batch.elements,this.m_batch.elements=0}PUSH_QUAD(a,e,s,i,h,r,l,p,d,g,f,m,u,k,A,P,U,bt,Et,Tt,Ge,We,Ye){this.m_batch.elements+=2,this.m_indices.push(this.m_vertices.length+0),this.m_indices.push(this.m_vertices.length+1),this.m_indices.push(this.m_vertices.length+2),this.m_indices.push(this.m_vertices.length+0),this.m_indices.push(this.m_vertices.length+2),this.m_indices.push(this.m_vertices.length+3),this.MAKE_VERTEX(a,e,d,g,U,Ge,Ye,We),this.MAKE_VERTEX(s,i,f,m,bt,Ge,Ye,We),this.MAKE_VERTEX(h,r,u,k,Et,Ge,Ye,We),this.MAKE_VERTEX(l,p,A,P,Tt,Ge,Ye,We)}MAKE_VERTEX(a,e,s,i,h,r,l,p){let d=this.m_matrix;this.m_vertices.push(new Ss(n.make(a*d.m11+e*d.m21+d.m31,a*d.m12+e*d.m22+d.m32),n.make(s,this.m_batch.flip_vertically?1-i:i),h,r,p,l))}}const de=new Ms;class Ss{constructor(a,e,s,i,h,r){this.pos=a,this.tex=e,this.col=s,this.mult=i,this.wash=h,this.fill=r}push_to(a,e){let{pos:s,tex:i,col:h,mult:r,wash:l,fill:p}=this;return a.setFloat32(e+0,s.x,!0),a.setFloat32(e+4,s.y,!0),a.setFloat32(e+8,i.x,!0),a.setFloat32(e+12,i.y,!0),a.setUint8(e+16,h.r),a.setUint8(e+17,h.g),a.setUint8(e+18,h.b),a.setUint8(e+19,h.a),a.setUint8(e+20,r),a.setUint8(e+21,l),a.setUint8(e+22,p),e+24}}const ja=class{constructor(t){_(this,"pixels"),this.data=t,this.pixels=[];for(let a=0;a{let a=document.createElement("canvas"),e=a.getContext("2d");return a.width=t.width,a.height=t.height,e.drawImage(t,0,0),new ja(e.getImageData(0,0,t.width,t.height))});const Wt=class{constructor(t,a,e){_(this,"draw_coords"),_(this,"tex_coords"),this.texture=t,this.source=a,this.frame=e,this.draw_coords=[n.zero,n.zero,n.zero,n.zero],this.tex_coords=[n.zero,n.zero,n.zero,n.zero],this.update()}get width(){return this.frame.w}get height(){return this.frame.h}update(){let{draw_coords:t,tex_coords:a,texture:e,frame:s,source:i}=this;if(t[0].x=-s.x,t[0].y=-s.y,t[1].x=-s.x+i.w,t[1].y=-s.y,t[2].x=-s.x+i.w,t[2].y=-s.y+i.h,t[3].x=-s.x,t[3].y=-s.y+i.h,e){let h=1/e.width,r=1/e.height;a[0].x=i.x*h,a[0].y=i.y*r,a[1].x=(i.x+i.w)*h,a[1].y=i.y*r,a[2].x=(i.x+i.w)*h,a[2].y=(i.y+i.h)*r,a[3].x=i.x*h,a[3].y=(i.y+i.h)*r}}crop_info(t){let{source:a,frame:e}=this,s=t.add(a.top_left).add(e.top_left).overlaps_rect(a),i=x.make(Math.min(0,e.x,+t.x),Math.min(0,e.y+t.y),t.w,t.h);return[s,i]}crop(t){let{texture:a}=this,[e,s]=this.crop_info(t);return new Wt(a,e,s)}};let je=Wt;_(je,"make",(t,a=x.make(0,0,t.width,t.height),e=x.make(0,0,a.w,a.h))=>new Wt(t,a,e));const Ha=class{constructor(){_(this,"scale"),_(this,"characters"),_(this,"glyphs"),_(this,"kernings"),_(this,"packs"),_(this,"_descent"),_(this,"_ascent"),_(this,"_line_gap"),_(this,"family_name"),_(this,"texture")}get ascent(){return this._ascent*this.scale}get descent(){return this._descent*this.scale}get line_gap(){return this._line_gap*this.scale}get_character(t){return this.characters.get(t)}get_kerning(t,a){var e;return(e=this.kernings.get(t))==null?void 0:e.get(a)}get_glyph(t){return this.glyphs.get(t)}get_subtexture(t){let a=this.packs.get(t);if(!a)return new je(this.texture,x.make(0,0,0,0),x.make(0,0,0,0));let{packed:e,frame:s}=a;return new je(this.texture,x.make(e.x,e.y,e.w,e.h),x.make(s.x,s.y,s.w,s.h))}};let Xa=Ha;_(Xa,"make",(t,a)=>{let e=new Ha;e.scale=t.meta.scale;let s=new Map(t.chars.map(l=>[l.glyph,{...l,has_glyph:l.has_glyph!==0}])),i=new Map(t.glyphs.map(l=>[l.codepoint,l.glyph])),h=new Map;t.kernings.forEach(l=>{h.get(l.glyph1)||h.set(l.glyph1,new Map),h.get(l.glyph1).set(l.glyph2,l.kerning)});let r=new Map(t.colors.map(l=>[l.glyph,{frame:l.frame,packed:l.packed}]));return e._descent=t.meta.descent,e._ascent=t.meta.ascent,e._line_gap=t.meta.line_gap,e.family_name=t.meta.name,e.texture=a,e.packs=r,e.kernings=h,e.glyphs=i,e.characters=s,e.scale=t.meta.scale,e});const Pt=class{constructor(){_(this,"_characters"),_(this,"_kerning"),_(this,"_atlas"),_(this,"name"),_(this,"size",0),_(this,"ascent",0),_(this,"descent",0),_(this,"line_gap",0)}clear(){this._atlas=[],this._characters=[],this._kerning=[],this.name=""}get height(){return this.ascent-this.descent}get line_height(){return this.ascent-this.descent+this.line_gap}get textures(){return this._atlas}width_of(t){let a=0,e=0,s=0;for(let i of t)i===` `?e=0:(e+=this.get_character(i.charCodeAt(0)).advance,s&&(e+=this.get_kerning(s,i.charCodeAt(0))),e>a&&(a=e),s=i.charCodeAt(0));return a}width_of_line(t,a=0){if(a<0||a>=t.length)return 0;let e=0,s=0;for(let i of t){if(i===` `)break;e+=this.get_character(i.charCodeAt(0)).advance,s&&(e+=this.get_kerning(s,i.charCodeAt(0))),s=i.charCodeAt(0)}return e}height_of(t){if(t.length<=0)return 0;let a=this.line_height;for(let e of t)e===` -`&&(a+=this.line_height);return a-this.line_gap}rebuild(t,a,e){this.clear(),this.name=t.family_name,this.ascent=t.ascent,this.descent=t.descent,this.line_gap=t.line_gap,this.size=a;for(let s of e){let{from:i,to:h}=s;for(let r=i;r<=h;r++){let l=t.get_glyph(r);if(l===void 0)continue;let p=t.get_character(l),d=t.get_subtexture(p.glyph),g={glyph:l,codepoint:r,advance:p.advance,offset:n.make(p.offset_x,p.offset_y),subtexture:d};this._characters.push(g)}}for(let s of this._characters)for(let i of this._characters){let h=t.get_kerning(s.glyph,i.glyph);h!==void 0&&this.set_kerning(s.codepoint,i.codepoint,h)}}get_kerning(t,a){let e=da(this._kerning,t,a);return e!==-1?this._kerning[e].value:0}set_kerning(t,a,e){let s=da(this._kerning,t,a);s!==-1?this._kerning[s].value=e:this._kerning.push({a:t,b:a,value:e})}get_character(t){let a=Fs(this._characters,t);return a!==-1?this._characters[a]:this._characters[0]}};let Lt=Pt;_(Lt,"make",(t,a)=>{let e=Me.from_image(a),s=Xa.make(t,e);return Pt.make_from_font(s,t.size)}),_(Lt,"make_from_font",(t,a)=>{let e=[{from:32,to:127},{from:161,to:355}],s=new Pt;return s.rebuild(t,a,e),s});function Fs(t,a){let e=0,s=t.length-1;for(;e<=s;){let i=Math.round((s+e)/2);if(t[i].codepoint===a)return i;t[i].codepointe.name===a)}}class Us{constructor(a,e){this.name=a,this.frames=e}}const Os=""+new URL("out_0-253f9001.png",import.meta.url).href,Ds=[{name:"arrow_up_fire",tags:[{from:0,to:2,name:"idle"}],packs:[{frame:{x:4,y:4,w:48,h:48},packed:{x:3226,y:2728,w:56,h:56},meta:{duration:100}},{frame:{x:4,y:4,w:48,h:48},packed:{x:3226,y:2656,w:56,h:56},meta:{duration:100}},{frame:{x:4,y:4,w:48,h:48},packed:{x:3225,y:3377,w:56,h:56},meta:{duration:100}}]},{name:"button_bg",tags:[{from:0,to:0,name:"idle"},{from:1,to:1,name:"hover"},{from:2,to:2,name:"click"},{from:3,to:3,name:"disabled"}],packs:[{frame:{x:4,y:4,w:366,h:200},packed:{x:2592,y:2656,w:374,h:208},meta:{duration:100}},{frame:{x:4,y:4,w:366,h:200},packed:{x:0,y:2909,w:374,h:208},meta:{duration:100}},{frame:{x:4,y:4,w:366,h:200},packed:{x:374,y:2909,w:374,h:208},meta:{duration:300}},{frame:{x:4,y:4,w:366,h:200},packed:{x:748,y:2909,w:374,h:208},meta:{duration:100}}]},{name:"card",tags:[{from:0,to:0,name:"idle"},{from:1,to:1,name:"hover"},{from:2,to:4,name:"click"},{from:5,to:7,name:"flip"},{from:8,to:8,name:"back_idle"},{from:9,to:9,name:"back_hover"},{from:10,to:10,name:"back_click"},{from:11,to:13,name:"back_flip"},{from:14,to:15,name:"drag"},{from:16,to:17,name:"back_drag"},{from:18,to:18,name:"wait"},{from:19,to:19,name:"shadow"},{from:20,to:20,name:"highlight"}],packs:[{frame:{x:4,y:4,w:204,h:245},packed:{x:2897,y:1909,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:2849,y:0,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:3061,y:0,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:2849,y:253,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:3061,y:253,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:2849,y:506,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:3061,y:506,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:1578,y:821,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:1790,y:821,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:2002,y:821,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:2214,y:821,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:2426,y:821,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:2638,y:821,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:2850,y:821,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:3062,y:821,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:0,y:2656,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:212,y:2656,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:424,y:2656,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:636,y:2656,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:848,y:2656,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:1060,y:2656,w:212,h:253},meta:{duration:100}}]},{name:"confbar",tags:[{from:0,to:0,name:"idle"}],packs:[{frame:{x:4,y:4,w:360,h:320},packed:{x:2529,y:1909,w:368,h:328},meta:{duration:100}}]},{name:"confetti",tags:[{from:0,to:6,name:"idle"}],packs:[{frame:{x:4,y:4,w:180,h:180},packed:{x:1122,y:2909,w:188,h:188},meta:{duration:200}},{frame:{x:4,y:4,w:180,h:180},packed:{x:1310,y:2909,w:188,h:188},meta:{duration:200}},{frame:{x:4,y:4,w:180,h:180},packed:{x:1498,y:2909,w:188,h:188},meta:{duration:200}},{frame:{x:4,y:4,w:180,h:180},packed:{x:1686,y:2909,w:188,h:188},meta:{duration:200}},{frame:{x:4,y:4,w:180,h:180},packed:{x:1874,y:2909,w:188,h:188},meta:{duration:200}},{frame:{x:4,y:4,w:180,h:180},packed:{x:2062,y:2909,w:188,h:188},meta:{duration:200}},{frame:{x:4,y:4,w:180,h:180},packed:{x:2250,y:2909,w:188,h:188},meta:{duration:200}}]},{name:"confetti2",tags:[{from:0,to:6,name:"idle"}],packs:[{frame:{x:4,y:4,w:180,h:180},packed:{x:2438,y:2909,w:188,h:188},meta:{duration:300}},{frame:{x:4,y:4,w:180,h:180},packed:{x:2626,y:2909,w:188,h:188},meta:{duration:300}},{frame:{x:4,y:4,w:180,h:180},packed:{x:2814,y:2909,w:188,h:188},meta:{duration:300}},{frame:{x:4,y:4,w:180,h:180},packed:{x:3002,y:2909,w:188,h:188},meta:{duration:300}},{frame:{x:4,y:4,w:180,h:180},packed:{x:2966,y:2656,w:188,h:188},meta:{duration:300}},{frame:{x:4,y:4,w:180,h:180},packed:{x:0,y:3117,w:188,h:188},meta:{duration:300}},{frame:{x:4,y:4,w:180,h:180},packed:{x:188,y:3117,w:188,h:188},meta:{duration:300}}]},{name:"dropdown_bg",tags:[{from:0,to:0,name:"idle"},{from:1,to:1,name:"hover"}],packs:[{frame:{x:4,y:4,w:510,h:172},packed:{x:376,y:3117,w:518,h:180},meta:{duration:100}},{frame:{x:4,y:4,w:510,h:172},packed:{x:894,y:3117,w:518,h:180},meta:{duration:100}}]},{name:"hmg_bg",tags:[{from:0,to:0,name:"idle"},{from:1,to:1,name:"hover"},{from:2,to:2,name:"open"},{from:3,to:3,name:"open_hover"}],packs:[{frame:{x:4,y:4,w:240,h:140},packed:{x:1945,y:3305,w:248,h:148},meta:{duration:100}},{frame:{x:4,y:4,w:240,h:140},packed:{x:2193,y:3305,w:248,h:148},meta:{duration:100}},{frame:{x:4,y:4,w:240,h:140},packed:{x:2441,y:3305,w:248,h:148},meta:{duration:100}},{frame:{x:4,y:4,w:240,h:140},packed:{x:2689,y:3305,w:248,h:148},meta:{duration:100}}]},{name:"main_bg",tags:[{from:0,to:0,name:"idle"}],packs:[{frame:{x:4,y:4,w:1570,h:1080},packed:{x:0,y:0,w:1578,h:1088},meta:{duration:100}}]},{name:"main_card_bg",tags:[{from:0,to:0,name:"solitaire"},{from:1,to:1,name:"solitaire_hover"},{from:2,to:2,name:"fourtimes"},{from:3,to:3,name:"fourtimes_hover"},{from:4,to:4,name:"octopus"},{from:5,to:5,name:"octopus_hover"}],packs:[{frame:{x:4,y:4,w:481,h:739},packed:{x:1271,y:1088,w:489,h:747},meta:{duration:100}},{frame:{x:4,y:4,w:481,h:739},packed:{x:1760,y:1088,w:489,h:747},meta:{duration:100}},{frame:{x:4,y:4,w:481,h:739},packed:{x:2249,y:1088,w:489,h:747},meta:{duration:100}},{frame:{x:4,y:4,w:481,h:739},packed:{x:2738,y:1088,w:489,h:747},meta:{duration:100}},{frame:{x:4,y:4,w:481,h:739},packed:{x:0,y:1909,w:489,h:747},meta:{duration:100}},{frame:{x:4,y:4,w:481,h:739},packed:{x:489,y:1909,w:489,h:747},meta:{duration:100}}]},{name:"main_settings_bg",tags:[{from:0,to:0,name:"idle"},{from:1,to:1,name:"hover"}],packs:[{frame:{x:4,y:4,w:652,h:223},packed:{x:1272,y:2656,w:660,h:231},meta:{duration:100}},{frame:{x:4,y:4,w:652,h:223},packed:{x:1932,y:2656,w:660,h:231},meta:{duration:100}}]},{name:"main_title_bg",tags:[{from:0,to:0,name:"idle"}],packs:[{frame:{x:4,y:4,w:780,h:560},packed:{x:1333,y:1909,w:788,h:568},meta:{duration:100}}]},{name:"menu_bar",tags:[{from:0,to:0,name:"idle"}],packs:[{frame:{x:4,y:4,w:240,h:160},packed:{x:1412,y:3117,w:248,h:168},meta:{duration:100}}]},{name:"navigation_bg",tags:[{from:0,to:0,name:"idle"},{from:1,to:1,name:"hover"}],packs:[{frame:{x:4,y:4,w:593,h:157},packed:{x:2224,y:3117,w:601,h:165},meta:{duration:100}},{frame:{x:4,y:4,w:593,h:157},packed:{x:0,y:3305,w:601,h:165},meta:{duration:100}}]},{name:"panel_bg_nine_slice",tags:[{from:0,to:0,name:"idle"}],packs:[{frame:{x:4,y:4,w:400,h:400},packed:{x:2121,y:1909,w:408,h:408},meta:{duration:100}}]},{name:"rank",tags:[{from:0,to:0,name:"a"},{from:1,to:1,name:"2"},{from:2,to:2,name:"3"},{from:3,to:3,name:"4"},{from:4,to:4,name:"5"},{from:5,to:5,name:"6"},{from:6,to:6,name:"7"},{from:7,to:7,name:"8"},{from:8,to:8,name:"9"},{from:9,to:9,name:"t"},{from:10,to:10,name:"j"},{from:11,to:11,name:"q"},{from:12,to:12,name:"k"}],packs:[{frame:{x:4,y:4,w:64,h:64},packed:{x:2937,y:3305,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3009,y:3305,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3081,y:3305,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3153,y:3305,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:2937,y:3377,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3009,y:3377,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3081,y:3377,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3153,y:3377,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:2825,y:3117,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:2897,y:3117,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:2969,y:3117,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3041,y:3117,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3113,y:3117,w:72,h:72},meta:{duration:100}}]},{name:"rank_2",tags:[{from:0,to:0,name:"a"},{from:1,to:1,name:"2"},{from:2,to:2,name:"3"},{from:3,to:3,name:"4"},{from:4,to:4,name:"5"},{from:5,to:5,name:"6"},{from:6,to:6,name:"7"},{from:7,to:7,name:"8"},{from:8,to:8,name:"9"},{from:9,to:9,name:"t"},{from:10,to:10,name:"j"},{from:11,to:11,name:"q"},{from:12,to:12,name:"k"}],packs:[{frame:{x:4,y:4,w:64,h:64},packed:{x:3185,y:3117,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:2825,y:3189,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:2897,y:3189,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:2969,y:3189,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3041,y:3189,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3113,y:3189,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3185,y:3189,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3154,y:2656,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3154,y:2728,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3190,y:2909,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3190,y:2981,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3109,y:1909,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3181,y:1909,w:72,h:72},meta:{duration:100}}]},{name:"recycle",tags:[{from:0,to:0,name:"idle"},{from:1,to:1,name:"hover"},{from:2,to:2,name:"disabled"}],packs:[{frame:{x:4,y:4,w:180,h:160},packed:{x:1660,y:3117,w:188,h:168},meta:{duration:100}},{frame:{x:4,y:4,w:180,h:160},packed:{x:1848,y:3117,w:188,h:168},meta:{duration:100}},{frame:{x:4,y:4,w:180,h:160},packed:{x:2036,y:3117,w:188,h:168},meta:{duration:100}}]},{name:"side_menu_bg",tags:[{from:0,to:0,name:"idle"}],packs:[{frame:{x:4,y:4,w:347,h:659},packed:{x:978,y:1909,w:355,h:667},meta:{duration:100}}]},{name:"suit",tags:[{from:0,to:0,name:"spades"},{from:1,to:1,name:"hearts"},{from:2,to:2,name:"diamonds"},{from:3,to:3,name:"clubs"}],packs:[{frame:{x:4,y:4,w:64,h:64},packed:{x:3109,y:1981,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3181,y:1981,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3109,y:2053,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3181,y:2053,w:72,h:72},meta:{duration:100}}]},{name:"swiggle",tags:[{from:0,to:0,name:"idle"},{from:1,to:1,name:"small"}],packs:[{frame:{x:4,y:4,w:1263,h:813},packed:{x:1578,y:0,w:1271,h:821},meta:{duration:100}},{frame:{x:4,y:4,w:1263,h:813},packed:{x:0,y:1088,w:1271,h:821},meta:{duration:100}}]},{name:"tab3_bg",tags:[{from:0,to:0,name:"idle"},{from:1,to:1,name:"hover"},{from:2,to:2,name:"active"}],packs:[{frame:{x:4,y:4,w:440,h:150},packed:{x:601,y:3305,w:448,h:158},meta:{duration:100}},{frame:{x:4,y:4,w:440,h:150},packed:{x:1049,y:3305,w:448,h:158},meta:{duration:100}},{frame:{x:4,y:4,w:440,h:150},packed:{x:1497,y:3305,w:448,h:158},meta:{duration:100}}]}],Ns={sprites:Ds},Ps=""+new URL("out_0-1e3dd4e6.png",import.meta.url).href,Ls=[],Is={scale:.0625,descent:-568,ascent:1992,line_gap:0,name:"Capriola"},$s=[{glyph:22,width:0,height:0,advance:32.0625,offset_x:0,offset_y:0,scale:.0625,has_glyph:0},{glyph:23,width:23,height:102,advance:42.75,offset_x:10.9375,offset_y:-100,scale:.0625,has_glyph:1},{glyph:24,width:42,height:40,advance:53.1875,offset_x:6.3125,offset_y:-108,scale:.0625,has_glyph:1},{glyph:25,width:77,height:87,advance:85.125,offset_x:3.5,offset_y:-89,scale:.0625,has_glyph:1},{glyph:26,width:57,height:127,advance:64,offset_x:3.4375,offset_y:-107,scale:.0625,has_glyph:1},{glyph:27,width:118,height:103,advance:127.6875,offset_x:5.875,offset_y:-101,scale:.0625,has_glyph:1},{glyph:28,width:71,height:94,advance:85.0625,offset_x:9.3125,offset_y:-92,scale:.0625,has_glyph:1},{glyph:29,width:16,height:40,advance:31.9375,offset_x:8.125,offset_y:-108,scale:.0625,has_glyph:1},{glyph:30,width:35,height:141,advance:53.375,offset_x:10.25,offset_y:-120,scale:.0625,has_glyph:1},{glyph:31,width:36,height:141,advance:53.375,offset_x:8.3125,offset_y:-120,scale:.0625,has_glyph:1},{glyph:32,width:73,height:67,advance:85.1875,offset_x:6.3125,offset_y:-119,scale:.0625,has_glyph:1},{glyph:33,width:69,height:69,advance:85.1875,offset_x:8.25,offset_y:-72,scale:.0625,has_glyph:1},{glyph:34,width:23,height:47,advance:32.0625,offset_x:4,offset_y:-21,scale:.0625,has_glyph:1},{glyph:35,width:46,height:13,advance:74.5625,offset_x:14.8125,offset_y:-44,scale:.0625,has_glyph:1},{glyph:36,width:22,height:23,advance:32.0625,offset_x:5.375,offset_y:-21,scale:.0625,has_glyph:1},{glyph:37,width:40,height:111,advance:53.3125,offset_x:9.375,offset_y:-102,scale:.0625,has_glyph:1},{glyph:38,width:71,height:79,advance:85.1875,offset_x:7.5625,offset_y:-77,scale:.0625,has_glyph:1},{glyph:39,width:35,height:76,advance:53.0625,offset_x:3.9375,offset_y:-76,scale:.0625,has_glyph:1},{glyph:40,width:59,height:77,advance:74.625,offset_x:8,offset_y:-77,scale:.0625,has_glyph:1},{glyph:41,width:61,height:94,advance:74.625,offset_x:5.9375,offset_y:-77,scale:.0625,has_glyph:1},{glyph:42,width:69,height:94,advance:74.0625,offset_x:5.4375,offset_y:-79,scale:.0625,has_glyph:1},{glyph:43,width:65,height:92,advance:74.5625,offset_x:7.6875,offset_y:-75,scale:.0625,has_glyph:1},{glyph:44,width:65,height:93,advance:74.5625,offset_x:5.9375,offset_y:-91,scale:.0625,has_glyph:1},{glyph:45,width:57,height:92,advance:63.8125,offset_x:3.125,offset_y:-75,scale:.0625,has_glyph:1},{glyph:46,width:64,height:93,advance:74.5625,offset_x:5.8125,offset_y:-91,scale:.0625,has_glyph:1},{glyph:47,width:65,height:94,advance:74.5625,offset_x:3.625,offset_y:-77,scale:.0625,has_glyph:1},{glyph:48,width:23,height:72,advance:31.9375,offset_x:4.9375,offset_y:-70,scale:.0625,has_glyph:1},{glyph:49,width:23,height:96,advance:32.0625,offset_x:4.1875,offset_y:-70,scale:.0625,has_glyph:1},{glyph:50,width:65,height:62,advance:85.25,offset_x:9.3125,offset_y:-68,scale:.0625,has_glyph:1},{glyph:51,width:67,height:41,advance:85.1875,offset_x:9.8125,offset_y:-58,scale:.0625,has_glyph:1},{glyph:52,width:65,height:62,advance:85.25,offset_x:11.8125,offset_y:-68,scale:.0625,has_glyph:1},{glyph:53,width:59,height:103,advance:74.9375,offset_x:8.375,offset_y:-101,scale:.0625,has_glyph:1},{glyph:54,width:94,height:106,advance:106.3125,offset_x:7.5,offset_y:-82,scale:.0625,has_glyph:1},{glyph:55,width:88,height:96,advance:96,offset_x:4.25,offset_y:-96,scale:.0625,has_glyph:1},{glyph:56,width:73,height:96,advance:95.0625,offset_x:14.875,offset_y:-96,scale:.0625,has_glyph:1},{glyph:57,width:77,height:100,advance:85.125,offset_x:6.9375,offset_y:-98,scale:.0625,has_glyph:1},{glyph:58,width:76,height:96,advance:95.8125,offset_x:14.875,offset_y:-96,scale:.0625,has_glyph:1},{glyph:59,width:63,height:96,advance:85.125,offset_x:14.625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:60,width:59,height:96,advance:74.375,offset_x:14.75,offset_y:-96,scale:.0625,has_glyph:1},{glyph:61,width:82,height:100,advance:95.8125,offset_x:8.6875,offset_y:-98,scale:.0625,has_glyph:1},{glyph:62,width:79,height:96,advance:106.1875,offset_x:14.125,offset_y:-96,scale:.0625,has_glyph:1},{glyph:63,width:17,height:96,advance:42.6875,offset_x:13.5,offset_y:-96,scale:.0625,has_glyph:1},{glyph:64,width:41,height:98,advance:53.125,offset_x:1.9375,offset_y:-96,scale:.0625,has_glyph:1},{glyph:65,width:74,height:102,advance:85.25,offset_x:13.5,offset_y:-97,scale:.0625,has_glyph:1},{glyph:66,width:54,height:96,advance:74.6875,offset_x:14.9375,offset_y:-96,scale:.0625,has_glyph:1},{glyph:67,width:113,height:96,advance:127.4375,offset_x:8.0625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:68,width:77,height:96,advance:106.3125,offset_x:15.0625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:69,width:93,height:100,advance:106.8125,offset_x:7.1875,offset_y:-98,scale:.0625,has_glyph:1},{glyph:70,width:68,height:96,advance:85,offset_x:14.3125,offset_y:-96,scale:.0625,has_glyph:1},{glyph:71,width:98,height:118,advance:106.4375,offset_x:7.1875,offset_y:-98,scale:.0625,has_glyph:1},{glyph:72,width:76,height:98,advance:95.8125,offset_x:14.625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:73,width:63,height:100,advance:74.625,offset_x:6.875,offset_y:-98,scale:.0625,has_glyph:1},{glyph:74,width:70,height:96,advance:74.5,offset_x:2.75,offset_y:-96,scale:.0625,has_glyph:1},{glyph:75,width:77,height:98,advance:95.5625,offset_x:9.6875,offset_y:-96,scale:.0625,has_glyph:1},{glyph:76,width:83,height:96,advance:85.25,offset_x:1.5625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:77,width:126,height:96,advance:138.3125,offset_x:6.125,offset_y:-96,scale:.0625,has_glyph:1},{glyph:78,width:78,height:96,advance:85.1875,offset_x:4,offset_y:-96,scale:.0625,has_glyph:1},{glyph:79,width:84,height:96,advance:84.6875,offset_x:1,offset_y:-96,scale:.0625,has_glyph:1},{glyph:80,width:67,height:96,advance:74.5625,offset_x:4.625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:81,width:33,height:140,advance:53.375,offset_x:12.9375,offset_y:-119,scale:.0625,has_glyph:1},{glyph:82,width:40,height:111,advance:53.3125,offset_x:4.0625,offset_y:-102,scale:.0625,has_glyph:1},{glyph:83,width:33,height:140,advance:53.375,offset_x:8.5,offset_y:-119,scale:.0625,has_glyph:1},{glyph:84,width:60,height:65,advance:63.875,offset_x:2.5625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:85,width:104,height:13,advance:95.8125,offset_x:-3.625,offset_y:10,scale:.0625,has_glyph:1},{glyph:86,width:33,height:28,advance:42.9375,offset_x:.875,offset_y:-108,scale:.0625,has_glyph:1},{glyph:87,width:63,height:75,advance:74.6875,offset_x:6.125,offset_y:-73,scale:.0625,has_glyph:1},{glyph:88,width:67,height:113,advance:85.3125,offset_x:12.6875,offset_y:-111,scale:.0625,has_glyph:1},{glyph:89,width:61,height:77,advance:74.5625,offset_x:7.5625,offset_y:-73,scale:.0625,has_glyph:1},{glyph:90,width:70,height:113,advance:85.25,offset_x:6.9375,offset_y:-111,scale:.0625,has_glyph:1},{glyph:91,width:61,height:75,advance:74.6875,offset_x:7.125,offset_y:-73,scale:.0625,has_glyph:1},{glyph:92,width:54,height:112,advance:53.1875,offset_x:4.75,offset_y:-112,scale:.0625,has_glyph:1},{glyph:93,width:66,height:120,advance:74.5625,offset_x:6.8125,offset_y:-84,scale:.0625,has_glyph:1},{glyph:94,width:62,height:111,advance:85.25,offset_x:13.375,offset_y:-111,scale:.0625,has_glyph:1},{glyph:95,width:32,height:105,advance:42.6875,offset_x:8.875,offset_y:-103,scale:.0625,has_glyph:1},{glyph:96,width:36,height:139,advance:42.6875,offset_x:-3.625,offset_y:-103,scale:.0625,has_glyph:1},{glyph:97,width:62,height:113,advance:74.75,offset_x:11.875,offset_y:-111,scale:.0625,has_glyph:1},{glyph:98,width:30,height:113,advance:42.6875,offset_x:11.6875,offset_y:-111,scale:.0625,has_glyph:1},{glyph:99,width:106,height:73,advance:127.6875,offset_x:11.5,offset_y:-73,scale:.0625,has_glyph:1},{glyph:100,width:63,height:73,advance:85.25,offset_x:11.5,offset_y:-73,scale:.0625,has_glyph:1},{glyph:101,width:71,height:75,advance:85.375,offset_x:7.5,offset_y:-73,scale:.0625,has_glyph:1},{glyph:102,width:69,height:109,advance:85.3125,offset_x:10.3125,offset_y:-73,scale:.0625,has_glyph:1},{glyph:103,width:66,height:109,advance:85.3125,offset_x:7.4375,offset_y:-73,scale:.0625,has_glyph:1},{glyph:104,width:45,height:73,advance:53.3125,offset_x:9.9375,offset_y:-73,scale:.0625,has_glyph:1},{glyph:105,width:51,height:75,advance:64,offset_x:7.25,offset_y:-73,scale:.0625,has_glyph:1},{glyph:106,width:50,height:91,advance:53.1875,offset_x:3.9375,offset_y:-89,scale:.0625,has_glyph:1},{glyph:107,width:64,height:73,advance:85.25,offset_x:11.8125,offset_y:-71,scale:.0625,has_glyph:1},{glyph:108,width:66,height:72,advance:74.75,offset_x:4.4375,offset_y:-71,scale:.0625,has_glyph:1},{glyph:109,width:107,height:72,advance:116.9375,offset_x:4.5,offset_y:-71,scale:.0625,has_glyph:1},{glyph:110,width:61,height:71,advance:63.9375,offset_x:1.5625,offset_y:-71,scale:.0625,has_glyph:1},{glyph:111,width:66,height:107,advance:74.5625,offset_x:4.5,offset_y:-71,scale:.0625,has_glyph:1},{glyph:112,width:54,height:71,advance:63.9375,offset_x:5.4375,offset_y:-71,scale:.0625,has_glyph:1},{glyph:113,width:42,height:144,advance:64,offset_x:15,offset_y:-120,scale:.0625,has_glyph:1},{glyph:114,width:14,height:139,advance:42.6875,offset_x:14.6875,offset_y:-118,scale:.0625,has_glyph:1},{glyph:115,width:42,height:144,advance:64,offset_x:7.8125,offset_y:-120,scale:.0625,has_glyph:1},{glyph:116,width:78,height:27,advance:106.6875,offset_x:15.375,offset_y:-53,scale:.0625,has_glyph:1},{glyph:118,width:23,height:102,advance:42.75,offset_x:10.875,offset_y:-70,scale:.0625,has_glyph:1},{glyph:119,width:61,height:112,advance:74.5625,offset_x:7.5625,offset_y:-92,scale:.0625,has_glyph:1},{glyph:120,width:56,height:91,advance:63.6875,offset_x:6.9375,offset_y:-91,scale:.0625,has_glyph:1},{glyph:121,width:66,height:66,advance:74.5625,offset_x:4.3125,offset_y:-71,scale:.0625,has_glyph:1},{glyph:122,width:79,height:90,advance:85.1875,offset_x:3.0625,offset_y:-90,scale:.0625,has_glyph:1},{glyph:123,width:14,height:138,advance:42.6875,offset_x:14.6875,offset_y:-118,scale:.0625,has_glyph:1},{glyph:124,width:66,height:142,advance:85.1875,offset_x:9.3125,offset_y:-113,scale:.0625,has_glyph:1},{glyph:125,width:51,height:20,advance:65,offset_x:7.75,offset_y:-102,scale:.0625,has_glyph:1},{glyph:126,width:97,height:97,advance:106.5,offset_x:5.3125,offset_y:-96,scale:.0625,has_glyph:1},{glyph:127,width:51,height:61,advance:74.6875,offset_x:7.4375,offset_y:-98,scale:.0625,has_glyph:1},{glyph:128,width:77,height:63,advance:95.875,offset_x:9.8125,offset_y:-67,scale:.0625,has_glyph:1},{glyph:129,width:75,height:40,advance:95.8125,offset_x:8.25,offset_y:-54,scale:.0625,has_glyph:1},{glyph:130,width:0,height:0,advance:106.6875,offset_x:0,offset_y:0,scale:.0625,has_glyph:0},{glyph:131,width:97,height:97,advance:106.5,offset_x:5.3125,offset_y:-96,scale:.0625,has_glyph:1},{glyph:132,width:39,height:14,advance:42.6875,offset_x:2.4375,offset_y:-99,scale:.0625,has_glyph:1},{glyph:133,width:47,height:49,advance:53.3125,offset_x:3.1875,offset_y:-105,scale:.0625,has_glyph:1},{glyph:134,width:69,height:77,advance:85.1875,offset_x:8.25,offset_y:-77,scale:.0625,has_glyph:1},{glyph:135,width:49,height:64,advance:63.6875,offset_x:6.25,offset_y:-117,scale:.0625,has_glyph:1},{glyph:136,width:49,height:66,advance:63.75,offset_x:6.9375,offset_y:-117,scale:.0625,has_glyph:1},{glyph:137,width:34,height:28,advance:42.9375,offset_x:10.875,offset_y:-108,scale:.0625,has_glyph:1},{glyph:138,width:64,height:105,advance:85.25,offset_x:11.8125,offset_y:-71,scale:.0625,has_glyph:1},{glyph:139,width:69,height:96,advance:96,offset_x:13.0625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:140,width:22,height:23,advance:32.0625,offset_x:5.375,offset_y:-49,scale:.0625,has_glyph:1},{glyph:141,width:32,height:33,advance:31.6875,offset_x:-11.4375,offset_y:-3,scale:.0625,has_glyph:1},{glyph:142,width:31,height:64,advance:42.4375,offset_x:1.8125,offset_y:-117,scale:.0625,has_glyph:1},{glyph:143,width:54,height:61,advance:63.9375,offset_x:5.3125,offset_y:-98,scale:.0625,has_glyph:1},{glyph:144,width:78,height:63,advance:95.875,offset_x:9.3125,offset_y:-68,scale:.0625,has_glyph:1},{glyph:145,width:121,height:105,advance:138.3125,offset_x:9.3125,offset_y:-103,scale:.0625,has_glyph:1},{glyph:146,width:122,height:105,advance:148.8125,offset_x:9.3125,offset_y:-103,scale:.0625,has_glyph:1},{glyph:147,width:134,height:105,advance:148.9375,offset_x:6.9375,offset_y:-103,scale:.0625,has_glyph:1},{glyph:148,width:59,height:103,advance:74.9375,offset_x:8.3125,offset_y:-70,scale:.0625,has_glyph:1},{glyph:149,width:88,height:125,advance:96,offset_x:4.25,offset_y:-125,scale:.0625,has_glyph:1},{glyph:150,width:88,height:125,advance:96,offset_x:4.25,offset_y:-125,scale:.0625,has_glyph:1},{glyph:151,width:88,height:124,advance:96,offset_x:4.25,offset_y:-124,scale:.0625,has_glyph:1},{glyph:152,width:88,height:125,advance:96,offset_x:4.25,offset_y:-125,scale:.0625,has_glyph:1},{glyph:153,width:88,height:124,advance:96,offset_x:4.25,offset_y:-124,scale:.0625,has_glyph:1},{glyph:154,width:88,height:124,advance:96,offset_x:4.25,offset_y:-124,scale:.0625,has_glyph:1},{glyph:155,width:105,height:96,advance:117.0625,offset_x:4.125,offset_y:-96,scale:.0625,has_glyph:1},{glyph:156,width:77,height:128,advance:95.6875,offset_x:6.9375,offset_y:-98,scale:.0625,has_glyph:1},{glyph:157,width:63,height:125,advance:85.125,offset_x:14.625,offset_y:-125,scale:.0625,has_glyph:1},{glyph:158,width:63,height:125,advance:85.125,offset_x:14.625,offset_y:-125,scale:.0625,has_glyph:1},{glyph:159,width:63,height:124,advance:85.125,offset_x:14.625,offset_y:-124,scale:.0625,has_glyph:1},{glyph:160,width:63,height:124,advance:85.125,offset_x:14.625,offset_y:-124,scale:.0625,has_glyph:1},{glyph:161,width:35,height:125,advance:42.6875,offset_x:-.75,offset_y:-125,scale:.0625,has_glyph:1},{glyph:162,width:36,height:125,advance:42.6875,offset_x:10.875,offset_y:-125,scale:.0625,has_glyph:1},{glyph:163,width:45,height:124,advance:42.6875,offset_x:-.9375,offset_y:-124,scale:.0625,has_glyph:1},{glyph:164,width:51,height:124,advance:42.6875,offset_x:-3.75,offset_y:-124,scale:.0625,has_glyph:1},{glyph:165,width:87,height:96,advance:95.8125,offset_x:3.0625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:166,width:77,height:125,advance:106.3125,offset_x:15.0625,offset_y:-125,scale:.0625,has_glyph:1},{glyph:167,width:93,height:127,advance:106.8125,offset_x:7.1875,offset_y:-125,scale:.0625,has_glyph:1},{glyph:168,width:93,height:127,advance:106.8125,offset_x:7.1875,offset_y:-125,scale:.0625,has_glyph:1},{glyph:169,width:93,height:126,advance:106.8125,offset_x:7.1875,offset_y:-124,scale:.0625,has_glyph:1},{glyph:170,width:93,height:127,advance:106.8125,offset_x:7.1875,offset_y:-125,scale:.0625,has_glyph:1},{glyph:171,width:93,height:126,advance:106.8125,offset_x:7.1875,offset_y:-124,scale:.0625,has_glyph:1},{glyph:172,width:55,height:55,advance:74.5625,offset_x:10.625,offset_y:-65,scale:.0625,has_glyph:1},{glyph:173,width:93,height:108,advance:106.8125,offset_x:7.1875,offset_y:-103,scale:.0625,has_glyph:1},{glyph:174,width:77,height:127,advance:106.125,offset_x:15,offset_y:-125,scale:.0625,has_glyph:1},{glyph:175,width:77,height:127,advance:106.125,offset_x:15,offset_y:-125,scale:.0625,has_glyph:1},{glyph:176,width:77,height:126,advance:106.125,offset_x:15,offset_y:-124,scale:.0625,has_glyph:1},{glyph:177,width:77,height:126,advance:106.125,offset_x:15,offset_y:-124,scale:.0625,has_glyph:1},{glyph:178,width:84,height:125,advance:84.6875,offset_x:1,offset_y:-125,scale:.0625,has_glyph:1},{glyph:179,width:68,height:96,advance:85,offset_x:14.9375,offset_y:-96,scale:.0625,has_glyph:1},{glyph:180,width:77,height:114,advance:95.8125,offset_x:14.6875,offset_y:-112,scale:.0625,has_glyph:1},{glyph:181,width:63,height:110,advance:74.6875,offset_x:6.125,offset_y:-108,scale:.0625,has_glyph:1},{glyph:182,width:63,height:110,advance:74.6875,offset_x:6.125,offset_y:-108,scale:.0625,has_glyph:1},{glyph:183,width:63,height:109,advance:74.6875,offset_x:6.125,offset_y:-107,scale:.0625,has_glyph:1},{glyph:184,width:63,height:106,advance:74.6875,offset_x:6.125,offset_y:-104,scale:.0625,has_glyph:1},{glyph:185,width:63,height:104,advance:74.6875,offset_x:6.125,offset_y:-102,scale:.0625,has_glyph:1},{glyph:186,width:63,height:115,advance:74.6875,offset_x:6.125,offset_y:-113,scale:.0625,has_glyph:1},{glyph:187,width:104,height:75,advance:117.125,offset_x:6.125,offset_y:-73,scale:.0625,has_glyph:1},{glyph:188,width:61,height:103,advance:74.5625,offset_x:7.5625,offset_y:-73,scale:.0625,has_glyph:1},{glyph:189,width:61,height:110,advance:74.6875,offset_x:7.125,offset_y:-108,scale:.0625,has_glyph:1},{glyph:190,width:61,height:110,advance:74.6875,offset_x:7.125,offset_y:-108,scale:.0625,has_glyph:1},{glyph:191,width:61,height:109,advance:74.6875,offset_x:7.125,offset_y:-107,scale:.0625,has_glyph:1},{glyph:192,width:61,height:104,advance:74.6875,offset_x:7.125,offset_y:-102,scale:.0625,has_glyph:1},{glyph:193,width:42,height:110,advance:42.6875,offset_x:-1.8125,offset_y:-108,scale:.0625,has_glyph:1},{glyph:194,width:33,height:110,advance:42.6875,offset_x:9.4375,offset_y:-108,scale:.0625,has_glyph:1},{glyph:195,width:44,height:109,advance:42.6875,offset_x:-2,offset_y:-107,scale:.0625,has_glyph:1},{glyph:196,width:51,height:104,advance:42.6875,offset_x:-5.5625,offset_y:-102,scale:.0625,has_glyph:1},{glyph:197,width:71,height:120,advance:85.1875,offset_x:8.1875,offset_y:-118,scale:.0625,has_glyph:1},{glyph:198,width:63,height:104,advance:85.25,offset_x:11.5,offset_y:-104,scale:.0625,has_glyph:1},{glyph:199,width:71,height:110,advance:85.375,offset_x:7.5,offset_y:-108,scale:.0625,has_glyph:1},{glyph:200,width:71,height:110,advance:85.375,offset_x:7.5,offset_y:-108,scale:.0625,has_glyph:1},{glyph:201,width:71,height:109,advance:85.375,offset_x:7.5,offset_y:-107,scale:.0625,has_glyph:1},{glyph:202,width:71,height:106,advance:85.375,offset_x:7.5,offset_y:-104,scale:.0625,has_glyph:1},{glyph:203,width:71,height:104,advance:85.375,offset_x:7.5,offset_y:-102,scale:.0625,has_glyph:1},{glyph:204,width:69,height:72,advance:85.1875,offset_x:8.1875,offset_y:-73,scale:.0625,has_glyph:1},{glyph:205,width:71,height:85,advance:85.375,offset_x:7.5,offset_y:-78,scale:.0625,has_glyph:1},{glyph:206,width:64,height:110,advance:85.25,offset_x:11.8125,offset_y:-108,scale:.0625,has_glyph:1},{glyph:207,width:64,height:110,advance:85.25,offset_x:11.8125,offset_y:-108,scale:.0625,has_glyph:1},{glyph:208,width:64,height:109,advance:85.25,offset_x:11.8125,offset_y:-107,scale:.0625,has_glyph:1},{glyph:209,width:64,height:104,advance:85.25,offset_x:11.8125,offset_y:-102,scale:.0625,has_glyph:1},{glyph:210,width:66,height:144,advance:74.5625,offset_x:4.5,offset_y:-108,scale:.0625,has_glyph:1},{glyph:211,width:67,height:147,advance:85.5,offset_x:12.6875,offset_y:-111,scale:.0625,has_glyph:1},{glyph:212,width:66,height:138,advance:74.5625,offset_x:4.6875,offset_y:-102,scale:.0625,has_glyph:1},{glyph:213,width:88,height:121,advance:96,offset_x:4.25,offset_y:-121,scale:.0625,has_glyph:1},{glyph:214,width:63,height:101,advance:74.6875,offset_x:6.125,offset_y:-99,scale:.0625,has_glyph:1},{glyph:215,width:88,height:125,advance:96,offset_x:4.25,offset_y:-125,scale:.0625,has_glyph:1},{glyph:216,width:63,height:106,advance:74.6875,offset_x:6.125,offset_y:-104,scale:.0625,has_glyph:1},{glyph:217,width:91,height:126,advance:96,offset_x:4.25,offset_y:-96,scale:.0625,has_glyph:1},{glyph:218,width:64,height:103,advance:74.6875,offset_x:6.125,offset_y:-73,scale:.0625,has_glyph:1},{glyph:219,width:77,height:127,advance:85.125,offset_x:6.9375,offset_y:-125,scale:.0625,has_glyph:1},{glyph:220,width:61,height:112,advance:74.5625,offset_x:7.5625,offset_y:-108,scale:.0625,has_glyph:1},{glyph:221,width:77,height:126,advance:85.125,offset_x:6.9375,offset_y:-124,scale:.0625,has_glyph:1},{glyph:222,width:61,height:111,advance:74.5625,offset_x:7.5625,offset_y:-107,scale:.0625,has_glyph:1},{glyph:223,width:77,height:127,advance:85.125,offset_x:6.9375,offset_y:-125,scale:.0625,has_glyph:1},{glyph:224,width:61,height:106,advance:74.5625,offset_x:7.5625,offset_y:-102,scale:.0625,has_glyph:1},{glyph:225,width:77,height:127,advance:85.125,offset_x:6.9375,offset_y:-125,scale:.0625,has_glyph:1},{glyph:226,width:61,height:111,advance:74.5625,offset_x:7.5625,offset_y:-107,scale:.0625,has_glyph:1},{glyph:227,width:76,height:125,advance:95.8125,offset_x:14.875,offset_y:-125,scale:.0625,has_glyph:1},{glyph:228,width:95,height:114,advance:95.8125,offset_x:6.9375,offset_y:-112,scale:.0625,has_glyph:1},{glyph:229,width:87,height:96,advance:95.8125,offset_x:3.0625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:230,width:78,height:113,advance:85.25,offset_x:6.9375,offset_y:-111,scale:.0625,has_glyph:1},{glyph:231,width:63,height:121,advance:85.125,offset_x:14.625,offset_y:-121,scale:.0625,has_glyph:1},{glyph:232,width:61,height:101,advance:74.6875,offset_x:7.125,offset_y:-99,scale:.0625,has_glyph:1},{glyph:233,width:63,height:125,advance:85.125,offset_x:14.625,offset_y:-125,scale:.0625,has_glyph:1},{glyph:234,width:61,height:106,advance:74.6875,offset_x:7.125,offset_y:-104,scale:.0625,has_glyph:1},{glyph:235,width:63,height:125,advance:85.125,offset_x:14.625,offset_y:-125,scale:.0625,has_glyph:1},{glyph:236,width:61,height:104,advance:74.6875,offset_x:7.125,offset_y:-102,scale:.0625,has_glyph:1},{glyph:237,width:63,height:126,advance:85.125,offset_x:14.625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:238,width:61,height:103,advance:74.6875,offset_x:7.125,offset_y:-73,scale:.0625,has_glyph:1},{glyph:239,width:63,height:125,advance:85.125,offset_x:14.625,offset_y:-125,scale:.0625,has_glyph:1},{glyph:240,width:61,height:109,advance:74.6875,offset_x:7.125,offset_y:-107,scale:.0625,has_glyph:1},{glyph:241,width:82,height:126,advance:95.8125,offset_x:8.6875,offset_y:-124,scale:.0625,has_glyph:1},{glyph:242,width:66,height:143,advance:74.5625,offset_x:6.8125,offset_y:-107,scale:.0625,has_glyph:1},{glyph:243,width:82,height:127,advance:95.8125,offset_x:8.6875,offset_y:-125,scale:.0625,has_glyph:1},{glyph:244,width:66,height:140,advance:74.5625,offset_x:6.8125,offset_y:-104,scale:.0625,has_glyph:1},{glyph:245,width:82,height:127,advance:95.8125,offset_x:8.6875,offset_y:-125,scale:.0625,has_glyph:1},{glyph:246,width:66,height:138,advance:74.5625,offset_x:6.8125,offset_y:-102,scale:.0625,has_glyph:1},{glyph:247,width:82,height:134,advance:95.8125,offset_x:8.6875,offset_y:-98,scale:.0625,has_glyph:1},{glyph:248,width:66,height:146,advance:74.5625,offset_x:6.8125,offset_y:-110,scale:.0625,has_glyph:1},{glyph:249,width:79,height:124,advance:106.1875,offset_x:14.125,offset_y:-124,scale:.0625,has_glyph:1},{glyph:250,width:62,height:124,advance:85.25,offset_x:13.375,offset_y:-124,scale:.0625,has_glyph:1},{glyph:251,width:95,height:96,advance:106.1875,offset_x:5.625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:252,width:74,height:111,advance:85.25,offset_x:1.875,offset_y:-111,scale:.0625,has_glyph:1},{glyph:253,width:49,height:125,advance:42.6875,offset_x:-2.875,offset_y:-125,scale:.0625,has_glyph:1},{glyph:254,width:49,height:106,advance:42.6875,offset_x:-3.3125,offset_y:-104,scale:.0625,has_glyph:1},{glyph:255,width:39,height:121,advance:42.6875,offset_x:2.375,offset_y:-121,scale:.0625,has_glyph:1},{glyph:256,width:40,height:101,advance:42.6875,offset_x:.1875,offset_y:-99,scale:.0625,has_glyph:1},{glyph:257,width:43,height:125,advance:42.6875,offset_x:0,offset_y:-125,scale:.0625,has_glyph:1},{glyph:258,width:44,height:106,advance:42.6875,offset_x:-1.75,offset_y:-104,scale:.0625,has_glyph:1},{glyph:259,width:29,height:126,advance:42.6875,offset_x:7.8125,offset_y:-96,scale:.0625,has_glyph:1},{glyph:260,width:32,height:133,advance:42.6875,offset_x:8.875,offset_y:-103,scale:.0625,has_glyph:1},{glyph:261,width:21,height:125,advance:42.6875,offset_x:11.0625,offset_y:-125,scale:.0625,has_glyph:1},{glyph:262,width:29,height:73,advance:42.6875,offset_x:11.375,offset_y:-71,scale:.0625,has_glyph:1},{glyph:263,width:72,height:98,advance:95.8125,offset_x:13.5,offset_y:-96,scale:.0625,has_glyph:1},{glyph:264,width:67,height:139,advance:85.375,offset_x:8.875,offset_y:-103,scale:.0625,has_glyph:1},{glyph:265,width:55,height:126,advance:53.125,offset_x:1.9375,offset_y:-124,scale:.0625,has_glyph:1},{glyph:266,width:47,height:143,advance:42.6875,offset_x:-3.625,offset_y:-107,scale:.0625,has_glyph:1},{glyph:267,width:74,height:133,advance:85.25,offset_x:13.5,offset_y:-97,scale:.0625,has_glyph:1},{glyph:268,width:62,height:147,advance:74.75,offset_x:11.875,offset_y:-111,scale:.0625,has_glyph:1},{glyph:269,width:62,height:75,advance:74.75,offset_x:11.875,offset_y:-73,scale:.0625,has_glyph:1},{glyph:270,width:54,height:125,advance:74.6875,offset_x:14.9375,offset_y:-125,scale:.0625,has_glyph:1},{glyph:271,width:36,height:127,advance:42.6875,offset_x:10.75,offset_y:-125,scale:.0625,has_glyph:1},{glyph:272,width:54,height:132,advance:74.6875,offset_x:14.9375,offset_y:-96,scale:.0625,has_glyph:1},{glyph:273,width:30,height:147,advance:42.6875,offset_x:11.6875,offset_y:-111,scale:.0625,has_glyph:1},{glyph:274,width:54,height:97,advance:74.6875,offset_x:14.9375,offset_y:-97,scale:.0625,has_glyph:1},{glyph:275,width:43,height:114,advance:53.5625,offset_x:11.6875,offset_y:-112,scale:.0625,has_glyph:1},{glyph:276,width:55,height:96,advance:74.6875,offset_x:15,offset_y:-96,scale:.0625,has_glyph:1},{glyph:277,width:56,height:113,advance:74.75,offset_x:11.6875,offset_y:-111,scale:.0625,has_glyph:1},{glyph:278,width:64,height:96,advance:74.6875,offset_x:4.375,offset_y:-96,scale:.0625,has_glyph:1},{glyph:279,width:41,height:113,advance:42.6875,offset_x:1.5,offset_y:-111,scale:.0625,has_glyph:1},{glyph:280,width:77,height:125,advance:106.3125,offset_x:15.0625,offset_y:-125,scale:.0625,has_glyph:1},{glyph:281,width:63,height:108,advance:85.25,offset_x:11.5,offset_y:-108,scale:.0625,has_glyph:1},{glyph:282,width:77,height:132,advance:106.3125,offset_x:15.0625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:283,width:63,height:109,advance:85.25,offset_x:11.5,offset_y:-73,scale:.0625,has_glyph:1},{glyph:284,width:77,height:124,advance:106.3125,offset_x:15.0625,offset_y:-124,scale:.0625,has_glyph:1},{glyph:285,width:63,height:107,advance:85.25,offset_x:11.5,offset_y:-107,scale:.0625,has_glyph:1},{glyph:286,width:77,height:132,advance:106.3125,offset_x:15.0625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:287,width:63,height:109,advance:85.25,offset_x:11.5,offset_y:-73,scale:.0625,has_glyph:1},{glyph:288,width:93,height:123,advance:106.8125,offset_x:7.1875,offset_y:-121,scale:.0625,has_glyph:1},{glyph:289,width:71,height:101,advance:85.375,offset_x:7.5,offset_y:-99,scale:.0625,has_glyph:1},{glyph:290,width:93,height:127,advance:106.8125,offset_x:7.1875,offset_y:-125,scale:.0625,has_glyph:1},{glyph:291,width:71,height:106,advance:85.375,offset_x:7.5,offset_y:-104,scale:.0625,has_glyph:1},{glyph:292,width:93,height:127,advance:106.8125,offset_x:7.1875,offset_y:-125,scale:.0625,has_glyph:1},{glyph:293,width:73,height:110,advance:85.375,offset_x:7.5,offset_y:-108,scale:.0625,has_glyph:1},{glyph:294,width:123,height:100,advance:138.3125,offset_x:7.1875,offset_y:-98,scale:.0625,has_glyph:1},{glyph:295,width:114,height:75,advance:127.75,offset_x:7.5,offset_y:-73,scale:.0625,has_glyph:1},{glyph:296,width:76,height:127,advance:95.8125,offset_x:14.625,offset_y:-125,scale:.0625,has_glyph:1},{glyph:297,width:45,height:108,advance:53.3125,offset_x:9.9375,offset_y:-108,scale:.0625,has_glyph:1},{glyph:298,width:76,height:132,advance:95.8125,offset_x:14.625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:299,width:45,height:109,advance:53.3125,offset_x:9.9375,offset_y:-73,scale:.0625,has_glyph:1},{glyph:300,width:76,height:127,advance:95.8125,offset_x:14.625,offset_y:-125,scale:.0625,has_glyph:1},{glyph:301,width:46,height:107,advance:53.3125,offset_x:8.375,offset_y:-107,scale:.0625,has_glyph:1},{glyph:302,width:63,height:127,advance:74.625,offset_x:6.875,offset_y:-125,scale:.0625,has_glyph:1},{glyph:303,width:51,height:110,advance:64,offset_x:7.25,offset_y:-108,scale:.0625,has_glyph:1},{glyph:304,width:63,height:126,advance:74.625,offset_x:6.875,offset_y:-124,scale:.0625,has_glyph:1},{glyph:305,width:51,height:109,advance:64,offset_x:7.25,offset_y:-107,scale:.0625,has_glyph:1},{glyph:306,width:63,height:128,advance:74.625,offset_x:6.875,offset_y:-98,scale:.0625,has_glyph:1},{glyph:307,width:51,height:103,advance:64,offset_x:7.25,offset_y:-73,scale:.0625,has_glyph:1},{glyph:308,width:63,height:127,advance:74.625,offset_x:6.875,offset_y:-125,scale:.0625,has_glyph:1},{glyph:309,width:51,height:109,advance:64,offset_x:7.25,offset_y:-107,scale:.0625,has_glyph:1},{glyph:310,width:70,height:132,advance:74.5,offset_x:2.75,offset_y:-96,scale:.0625,has_glyph:1}],Bs=[{glyph:22,codepoint:32},{glyph:23,codepoint:33},{glyph:24,codepoint:34},{glyph:25,codepoint:35},{glyph:26,codepoint:36},{glyph:27,codepoint:37},{glyph:28,codepoint:38},{glyph:29,codepoint:39},{glyph:30,codepoint:40},{glyph:31,codepoint:41},{glyph:32,codepoint:42},{glyph:33,codepoint:43},{glyph:34,codepoint:44},{glyph:35,codepoint:45},{glyph:36,codepoint:46},{glyph:37,codepoint:47},{glyph:38,codepoint:48},{glyph:39,codepoint:49},{glyph:40,codepoint:50},{glyph:41,codepoint:51},{glyph:42,codepoint:52},{glyph:43,codepoint:53},{glyph:44,codepoint:54},{glyph:45,codepoint:55},{glyph:46,codepoint:56},{glyph:47,codepoint:57},{glyph:48,codepoint:58},{glyph:49,codepoint:59},{glyph:50,codepoint:60},{glyph:51,codepoint:61},{glyph:52,codepoint:62},{glyph:53,codepoint:63},{glyph:54,codepoint:64},{glyph:55,codepoint:65},{glyph:56,codepoint:66},{glyph:57,codepoint:67},{glyph:58,codepoint:68},{glyph:59,codepoint:69},{glyph:60,codepoint:70},{glyph:61,codepoint:71},{glyph:62,codepoint:72},{glyph:63,codepoint:73},{glyph:64,codepoint:74},{glyph:65,codepoint:75},{glyph:66,codepoint:76},{glyph:67,codepoint:77},{glyph:68,codepoint:78},{glyph:69,codepoint:79},{glyph:70,codepoint:80},{glyph:71,codepoint:81},{glyph:72,codepoint:82},{glyph:73,codepoint:83},{glyph:74,codepoint:84},{glyph:75,codepoint:85},{glyph:76,codepoint:86},{glyph:77,codepoint:87},{glyph:78,codepoint:88},{glyph:79,codepoint:89},{glyph:80,codepoint:90},{glyph:81,codepoint:91},{glyph:82,codepoint:92},{glyph:83,codepoint:93},{glyph:84,codepoint:94},{glyph:85,codepoint:95},{glyph:86,codepoint:96},{glyph:87,codepoint:97},{glyph:88,codepoint:98},{glyph:89,codepoint:99},{glyph:90,codepoint:100},{glyph:91,codepoint:101},{glyph:92,codepoint:102},{glyph:93,codepoint:103},{glyph:94,codepoint:104},{glyph:95,codepoint:105},{glyph:96,codepoint:106},{glyph:97,codepoint:107},{glyph:98,codepoint:108},{glyph:99,codepoint:109},{glyph:100,codepoint:110},{glyph:101,codepoint:111},{glyph:102,codepoint:112},{glyph:103,codepoint:113},{glyph:104,codepoint:114},{glyph:105,codepoint:115},{glyph:106,codepoint:116},{glyph:107,codepoint:117},{glyph:108,codepoint:118},{glyph:109,codepoint:119},{glyph:110,codepoint:120},{glyph:111,codepoint:121},{glyph:112,codepoint:122},{glyph:113,codepoint:123},{glyph:114,codepoint:124},{glyph:115,codepoint:125},{glyph:116,codepoint:126},{glyph:118,codepoint:161},{glyph:119,codepoint:162},{glyph:120,codepoint:163},{glyph:121,codepoint:164},{glyph:122,codepoint:165},{glyph:123,codepoint:166},{glyph:124,codepoint:167},{glyph:125,codepoint:168},{glyph:126,codepoint:169},{glyph:127,codepoint:170},{glyph:128,codepoint:171},{glyph:129,codepoint:172},{glyph:130,codepoint:173},{glyph:131,codepoint:174},{glyph:132,codepoint:175},{glyph:133,codepoint:176},{glyph:134,codepoint:177},{glyph:135,codepoint:178},{glyph:136,codepoint:179},{glyph:137,codepoint:180},{glyph:138,codepoint:181},{glyph:139,codepoint:182},{glyph:140,codepoint:183},{glyph:141,codepoint:184},{glyph:142,codepoint:185},{glyph:143,codepoint:186},{glyph:144,codepoint:187},{glyph:145,codepoint:188},{glyph:146,codepoint:189},{glyph:147,codepoint:190},{glyph:148,codepoint:191},{glyph:149,codepoint:192},{glyph:150,codepoint:193},{glyph:151,codepoint:194},{glyph:152,codepoint:195},{glyph:153,codepoint:196},{glyph:154,codepoint:197},{glyph:155,codepoint:198},{glyph:156,codepoint:199},{glyph:157,codepoint:200},{glyph:158,codepoint:201},{glyph:159,codepoint:202},{glyph:160,codepoint:203},{glyph:161,codepoint:204},{glyph:162,codepoint:205},{glyph:163,codepoint:206},{glyph:164,codepoint:207},{glyph:165,codepoint:208},{glyph:166,codepoint:209},{glyph:167,codepoint:210},{glyph:168,codepoint:211},{glyph:169,codepoint:212},{glyph:170,codepoint:213},{glyph:171,codepoint:214},{glyph:172,codepoint:215},{glyph:173,codepoint:216},{glyph:174,codepoint:217},{glyph:175,codepoint:218},{glyph:176,codepoint:219},{glyph:177,codepoint:220},{glyph:178,codepoint:221},{glyph:179,codepoint:222},{glyph:180,codepoint:223},{glyph:181,codepoint:224},{glyph:182,codepoint:225},{glyph:183,codepoint:226},{glyph:184,codepoint:227},{glyph:185,codepoint:228},{glyph:186,codepoint:229},{glyph:187,codepoint:230},{glyph:188,codepoint:231},{glyph:189,codepoint:232},{glyph:190,codepoint:233},{glyph:191,codepoint:234},{glyph:192,codepoint:235},{glyph:193,codepoint:236},{glyph:194,codepoint:237},{glyph:195,codepoint:238},{glyph:196,codepoint:239},{glyph:197,codepoint:240},{glyph:198,codepoint:241},{glyph:199,codepoint:242},{glyph:200,codepoint:243},{glyph:201,codepoint:244},{glyph:202,codepoint:245},{glyph:203,codepoint:246},{glyph:204,codepoint:247},{glyph:205,codepoint:248},{glyph:206,codepoint:249},{glyph:207,codepoint:250},{glyph:208,codepoint:251},{glyph:209,codepoint:252},{glyph:210,codepoint:253},{glyph:211,codepoint:254},{glyph:212,codepoint:255},{glyph:213,codepoint:256},{glyph:214,codepoint:257},{glyph:215,codepoint:258},{glyph:216,codepoint:259},{glyph:217,codepoint:260},{glyph:218,codepoint:261},{glyph:219,codepoint:262},{glyph:220,codepoint:263},{glyph:221,codepoint:264},{glyph:222,codepoint:265},{glyph:223,codepoint:266},{glyph:224,codepoint:267},{glyph:225,codepoint:268},{glyph:226,codepoint:269},{glyph:227,codepoint:270},{glyph:228,codepoint:271},{glyph:229,codepoint:272},{glyph:230,codepoint:273},{glyph:231,codepoint:274},{glyph:232,codepoint:275},{glyph:233,codepoint:276},{glyph:234,codepoint:277},{glyph:235,codepoint:278},{glyph:236,codepoint:279},{glyph:237,codepoint:280},{glyph:238,codepoint:281},{glyph:239,codepoint:282},{glyph:240,codepoint:283},{glyph:241,codepoint:284},{glyph:242,codepoint:285},{glyph:243,codepoint:286},{glyph:244,codepoint:287},{glyph:245,codepoint:288},{glyph:246,codepoint:289},{glyph:247,codepoint:290},{glyph:248,codepoint:291},{glyph:249,codepoint:292},{glyph:250,codepoint:293},{glyph:251,codepoint:294},{glyph:252,codepoint:295},{glyph:253,codepoint:296},{glyph:254,codepoint:297},{glyph:255,codepoint:298},{glyph:256,codepoint:299},{glyph:257,codepoint:300},{glyph:258,codepoint:301},{glyph:259,codepoint:302},{glyph:260,codepoint:303},{glyph:261,codepoint:304},{glyph:262,codepoint:305},{glyph:263,codepoint:306},{glyph:264,codepoint:307},{glyph:265,codepoint:308},{glyph:266,codepoint:309},{glyph:267,codepoint:310},{glyph:268,codepoint:311},{glyph:269,codepoint:312},{glyph:270,codepoint:313},{glyph:271,codepoint:314},{glyph:272,codepoint:315},{glyph:273,codepoint:316},{glyph:274,codepoint:317},{glyph:275,codepoint:318},{glyph:276,codepoint:319},{glyph:277,codepoint:320},{glyph:278,codepoint:321},{glyph:279,codepoint:322},{glyph:280,codepoint:323},{glyph:281,codepoint:324},{glyph:282,codepoint:325},{glyph:283,codepoint:326},{glyph:284,codepoint:327},{glyph:285,codepoint:328},{glyph:286,codepoint:330},{glyph:287,codepoint:331},{glyph:288,codepoint:332},{glyph:289,codepoint:333},{glyph:290,codepoint:334},{glyph:291,codepoint:335},{glyph:292,codepoint:336},{glyph:293,codepoint:337},{glyph:294,codepoint:338},{glyph:295,codepoint:339},{glyph:296,codepoint:340},{glyph:297,codepoint:341},{glyph:298,codepoint:342},{glyph:299,codepoint:343},{glyph:300,codepoint:344},{glyph:301,codepoint:345},{glyph:302,codepoint:346},{glyph:303,codepoint:347},{glyph:304,codepoint:348},{glyph:305,codepoint:349},{glyph:306,codepoint:350},{glyph:307,codepoint:351},{glyph:308,codepoint:352},{glyph:309,codepoint:353},{glyph:310,codepoint:354}],js=[{glyph:23,frame:{x:2,y:2,w:23,h:102},packed:{x:253,y:1014,w:27,h:106}},{glyph:24,frame:{x:2,y:2,w:42,h:40},packed:{x:1354,y:1413,w:46,h:44}},{glyph:25,frame:{x:2,y:2,w:77,h:87},packed:{x:0,y:1322,w:81,h:91}},{glyph:26,frame:{x:2,y:2,w:57,h:127},packed:{x:383,y:151,w:61,h:131}},{glyph:27,frame:{x:2,y:2,w:118,h:103},packed:{x:1196,y:904,w:122,h:107}},{glyph:28,frame:{x:2,y:2,w:71,h:94},packed:{x:733,y:1222,w:75,h:98}},{glyph:29,frame:{x:2,y:2,w:16,h:40},packed:{x:1400,y:1413,w:20,h:44}},{glyph:30,frame:{x:2,y:2,w:35,h:141},packed:{x:594,y:0,w:39,h:145}},{glyph:31,frame:{x:2,y:2,w:36,h:141},packed:{x:633,y:0,w:40,h:145}},{glyph:32,frame:{x:2,y:2,w:73,h:67},packed:{x:380,y:1413,w:77,h:71}},{glyph:33,frame:{x:2,y:2,w:69,h:69},packed:{x:307,y:1413,w:73,h:73}},{glyph:34,frame:{x:2,y:2,w:23,h:47},packed:{x:1256,y:1413,w:27,h:51}},{glyph:35,frame:{x:2,y:2,w:46,h:13},packed:{x:232,y:1489,w:50,h:17}},{glyph:36,frame:{x:2,y:2,w:22,h:23},packed:{x:82,y:1489,w:26,h:27}},{glyph:37,frame:{x:2,y:2,w:40,h:111},packed:{x:188,y:675,w:44,h:115}},{glyph:38,frame:{x:2,y:2,w:71,h:79},packed:{x:156,y:1322,w:75,h:83}},{glyph:39,frame:{x:2,y:2,w:35,h:76},packed:{x:432,y:1322,w:39,h:80}},{glyph:40,frame:{x:2,y:2,w:59,h:77},packed:{x:231,y:1322,w:63,h:81}},{glyph:41,frame:{x:2,y:2,w:61,h:94},packed:{x:808,y:1222,w:65,h:98}},{glyph:42,frame:{x:2,y:2,w:69,h:94},packed:{x:873,y:1222,w:73,h:98}},{glyph:43,frame:{x:2,y:2,w:65,h:92},packed:{x:1152,y:1222,w:69,h:96}},{glyph:44,frame:{x:2,y:2,w:65,h:93},packed:{x:1015,y:1222,w:69,h:97}},{glyph:45,frame:{x:2,y:2,w:57,h:92},packed:{x:1221,y:1222,w:61,h:96}},{glyph:46,frame:{x:2,y:2,w:64,h:93},packed:{x:1084,y:1222,w:68,h:97}},{glyph:47,frame:{x:2,y:2,w:65,h:94},packed:{x:946,y:1222,w:69,h:98}},{glyph:48,frame:{x:2,y:2,w:23,h:72},packed:{x:1352,y:1322,w:27,h:76}},{glyph:49,frame:{x:2,y:2,w:23,h:96},packed:{x:159,y:1121,w:27,h:100}},{glyph:50,frame:{x:2,y:2,w:65,h:62},packed:{x:895,y:1413,w:69,h:66}},{glyph:51,frame:{x:2,y:2,w:67,h:41},packed:{x:1283,y:1413,w:71,h:45}},{glyph:52,frame:{x:2,y:2,w:65,h:62},packed:{x:964,y:1413,w:69,h:66}},{glyph:53,frame:{x:2,y:2,w:59,h:103},packed:{x:1318,y:904,w:63,h:107}},{glyph:54,frame:{x:2,y:2,w:94,h:106},packed:{x:1081,y:791,w:98,h:110}},{glyph:55,frame:{x:2,y:2,w:88,h:96},packed:{x:186,y:1121,w:92,h:100}},{glyph:56,frame:{x:2,y:2,w:73,h:96},packed:{x:278,y:1121,w:77,h:100}},{glyph:57,frame:{x:2,y:2,w:77,h:100},packed:{x:636,y:1014,w:81,h:104}},{glyph:58,frame:{x:2,y:2,w:76,h:96},packed:{x:355,y:1121,w:80,h:100}},{glyph:59,frame:{x:2,y:2,w:63,h:96},packed:{x:435,y:1121,w:67,h:100}},{glyph:60,frame:{x:2,y:2,w:59,h:96},packed:{x:502,y:1121,w:63,h:100}},{glyph:61,frame:{x:2,y:2,w:82,h:100},packed:{x:717,y:1014,w:86,h:104}},{glyph:62,frame:{x:2,y:2,w:79,h:96},packed:{x:565,y:1121,w:83,h:100}},{glyph:63,frame:{x:2,y:2,w:17,h:96},packed:{x:648,y:1121,w:21,h:100}},{glyph:64,frame:{x:2,y:2,w:41,h:98},packed:{x:1094,y:1014,w:45,h:102}},{glyph:65,frame:{x:2,y:2,w:74,h:102},packed:{x:280,y:1014,w:78,h:106}},{glyph:66,frame:{x:2,y:2,w:54,h:96},packed:{x:669,y:1121,w:58,h:100}},{glyph:67,frame:{x:2,y:2,w:113,h:96},packed:{x:727,y:1121,w:117,h:100}},{glyph:68,frame:{x:2,y:2,w:77,h:96},packed:{x:844,y:1121,w:81,h:100}},{glyph:69,frame:{x:2,y:2,w:93,h:100},packed:{x:803,y:1014,w:97,h:104}},{glyph:70,frame:{x:2,y:2,w:68,h:96},packed:{x:925,y:1121,w:72,h:100}},{glyph:71,frame:{x:2,y:2,w:98,h:118},packed:{x:674,y:547,w:102,h:122}},{glyph:72,frame:{x:2,y:2,w:76,h:98},packed:{x:1139,y:1014,w:80,h:102}},{glyph:73,frame:{x:2,y:2,w:63,h:100},packed:{x:900,y:1014,w:67,h:104}},{glyph:74,frame:{x:2,y:2,w:70,h:96},packed:{x:997,y:1121,w:74,h:100}},{glyph:75,frame:{x:2,y:2,w:77,h:98},packed:{x:1219,y:1014,w:81,h:102}},{glyph:76,frame:{x:2,y:2,w:83,h:96},packed:{x:1071,y:1121,w:87,h:100}},{glyph:77,frame:{x:2,y:2,w:126,h:96},packed:{x:1158,y:1121,w:130,h:100}},{glyph:78,frame:{x:2,y:2,w:78,h:96},packed:{x:1288,y:1121,w:82,h:100}},{glyph:79,frame:{x:2,y:2,w:84,h:96},packed:{x:1370,y:1121,w:88,h:100}},{glyph:80,frame:{x:2,y:2,w:67,h:96},packed:{x:0,y:1222,w:71,h:100}},{glyph:81,frame:{x:2,y:2,w:33,h:140},packed:{x:673,y:0,w:37,h:144}},{glyph:82,frame:{x:2,y:2,w:40,h:111},packed:{x:232,y:675,w:44,h:115}},{glyph:83,frame:{x:2,y:2,w:33,h:140},packed:{x:710,y:0,w:37,h:144}},{glyph:84,frame:{x:2,y:2,w:60,h:65},packed:{x:580,y:1413,w:64,h:69}},{glyph:85,frame:{x:2,y:2,w:104,h:13},packed:{x:282,y:1489,w:108,h:17}},{glyph:86,frame:{x:2,y:2,w:33,h:28},packed:{x:1449,y:1359,w:37,h:32}},{glyph:87,frame:{x:2,y:2,w:63,h:75},packed:{x:471,y:1322,w:67,h:79}},{glyph:88,frame:{x:2,y:2,w:67,h:113},packed:{x:1070,y:547,w:71,h:117}},{glyph:89,frame:{x:2,y:2,w:61,h:77},packed:{x:294,y:1322,w:65,h:81}},{glyph:90,frame:{x:2,y:2,w:70,h:113},packed:{x:1141,y:547,w:74,h:117}},{glyph:91,frame:{x:2,y:2,w:61,h:75},packed:{x:538,y:1322,w:65,h:79}},{glyph:92,frame:{x:2,y:2,w:54,h:112},packed:{x:0,y:675,w:58,h:116}},{glyph:93,frame:{x:2,y:2,w:66,h:120},packed:{x:529,y:547,w:70,h:124}},{glyph:94,frame:{x:2,y:2,w:62,h:111},packed:{x:276,y:675,w:66,h:115}},{glyph:95,frame:{x:2,y:2,w:32,h:105},packed:{x:241,y:904,w:36,h:109}},{glyph:96,frame:{x:2,y:2,w:36,h:139},packed:{x:817,y:0,w:40,h:143}},{glyph:97,frame:{x:2,y:2,w:62,h:113},packed:{x:1215,y:547,w:66,h:117}},{glyph:98,frame:{x:2,y:2,w:30,h:113},packed:{x:1281,y:547,w:34,h:117}},{glyph:99,frame:{x:2,y:2,w:106,h:73},packed:{x:1025,y:1322,w:110,h:77}},{glyph:100,frame:{x:2,y:2,w:63,h:73},packed:{x:1135,y:1322,w:67,h:77}},{glyph:101,frame:{x:2,y:2,w:71,h:75},packed:{x:603,y:1322,w:75,h:79}},{glyph:102,frame:{x:2,y:2,w:69,h:109},packed:{x:1315,y:675,w:73,h:113}},{glyph:103,frame:{x:2,y:2,w:66,h:109},packed:{x:1388,y:675,w:70,h:113}},{glyph:104,frame:{x:2,y:2,w:45,h:73},packed:{x:1202,y:1322,w:49,h:77}},{glyph:105,frame:{x:2,y:2,w:51,h:75},packed:{x:678,y:1322,w:55,h:79}},{glyph:106,frame:{x:2,y:2,w:50,h:91},packed:{x:1282,y:1222,w:54,h:95}},{glyph:107,frame:{x:2,y:2,w:64,h:73},packed:{x:1251,y:1322,w:68,h:77}},{glyph:108,frame:{x:2,y:2,w:66,h:72},packed:{x:1379,y:1322,w:70,h:76}},{glyph:109,frame:{x:2,y:2,w:107,h:72},packed:{x:0,y:1413,w:111,h:76}},{glyph:110,frame:{x:2,y:2,w:61,h:71},packed:{x:184,y:1413,w:65,h:75}},{glyph:111,frame:{x:2,y:2,w:66,h:107},packed:{x:894,y:791,w:70,h:111}},{glyph:112,frame:{x:2,y:2,w:54,h:71},packed:{x:249,y:1413,w:58,h:75}},{glyph:113,frame:{x:2,y:2,w:42,h:144},packed:{x:241,y:0,w:46,h:148}},{glyph:114,frame:{x:2,y:2,w:14,h:139},packed:{x:857,y:0,w:18,h:143}},{glyph:115,frame:{x:2,y:2,w:42,h:144},packed:{x:287,y:0,w:46,h:148}},{glyph:116,frame:{x:2,y:2,w:78,h:27},packed:{x:0,y:1489,w:82,h:31}},{glyph:118,frame:{x:2,y:2,w:23,h:102},packed:{x:358,y:1014,w:27,h:106}},{glyph:119,frame:{x:2,y:2,w:61,h:112},packed:{x:58,y:675,w:65,h:116}},{glyph:120,frame:{x:2,y:2,w:56,h:91},packed:{x:1336,y:1222,w:60,h:95}},{glyph:121,frame:{x:2,y:2,w:66,h:66},packed:{x:457,y:1413,w:70,h:70}},{glyph:122,frame:{x:2,y:2,w:79,h:90},packed:{x:1396,y:1222,w:83,h:94}},{glyph:123,frame:{x:2,y:2,w:14,h:138},packed:{x:946,y:0,w:18,h:142}},{glyph:124,frame:{x:2,y:2,w:66,h:142},packed:{x:524,y:0,w:70,h:146}},{glyph:125,frame:{x:2,y:2,w:51,h:20},packed:{x:134,y:1489,w:55,h:24}},{glyph:126,frame:{x:2,y:2,w:97,h:97},packed:{x:1376,y:1014,w:101,h:101}},{glyph:127,frame:{x:2,y:2,w:51,h:61},packed:{x:1033,y:1413,w:55,h:65}},{glyph:128,frame:{x:2,y:2,w:77,h:63},packed:{x:732,y:1413,w:81,h:67}},{glyph:129,frame:{x:2,y:2,w:75,h:40},packed:{x:1420,y:1413,w:79,h:44}},{glyph:131,frame:{x:2,y:2,w:97,h:97},packed:{x:0,y:1121,w:101,h:101}},{glyph:132,frame:{x:2,y:2,w:39,h:14},packed:{x:189,y:1489,w:43,h:18}},{glyph:133,frame:{x:2,y:2,w:47,h:49},packed:{x:1205,y:1413,w:51,h:53}},{glyph:134,frame:{x:2,y:2,w:69,h:77},packed:{x:359,y:1322,w:73,h:81}},{glyph:135,frame:{x:2,y:2,w:49,h:64},packed:{x:644,y:1413,w:53,h:68}},{glyph:136,frame:{x:2,y:2,w:49,h:66},packed:{x:527,y:1413,w:53,h:70}},{glyph:137,frame:{x:2,y:2,w:34,h:28},packed:{x:1458,y:1121,w:38,h:32}},{glyph:138,frame:{x:2,y:2,w:64,h:105},packed:{x:277,y:904,w:68,h:109}},{glyph:139,frame:{x:2,y:2,w:69,h:96},packed:{x:71,y:1222,w:73,h:100}},{glyph:140,frame:{x:2,y:2,w:22,h:23},packed:{x:108,y:1489,w:26,h:27}},{glyph:141,frame:{x:2,y:2,w:32,h:33},packed:{x:1449,y:1322,w:36,h:37}},{glyph:142,frame:{x:2,y:2,w:31,h:64},packed:{x:697,y:1413,w:35,h:68}},{glyph:143,frame:{x:2,y:2,w:54,h:61},packed:{x:1088,y:1413,w:58,h:65}},{glyph:144,frame:{x:2,y:2,w:78,h:63},packed:{x:813,y:1413,w:82,h:67}},{glyph:145,frame:{x:2,y:2,w:121,h:105},packed:{x:345,y:904,w:125,h:109}},{glyph:146,frame:{x:2,y:2,w:122,h:105},packed:{x:470,y:904,w:126,h:109}},{glyph:147,frame:{x:2,y:2,w:134,h:105},packed:{x:596,y:904,w:138,h:109}},{glyph:148,frame:{x:2,y:2,w:59,h:103},packed:{x:1381,y:904,w:63,h:107}},{glyph:149,frame:{x:2,y:2,w:88,h:125},packed:{x:1235,y:287,w:92,h:129}},{glyph:150,frame:{x:2,y:2,w:88,h:125},packed:{x:1327,y:287,w:92,h:129}},{glyph:151,frame:{x:2,y:2,w:88,h:124},packed:{x:1111,y:418,w:92,h:128}},{glyph:152,frame:{x:2,y:2,w:88,h:125},packed:{x:0,y:418,w:92,h:129}},{glyph:153,frame:{x:2,y:2,w:88,h:124},packed:{x:1203,y:418,w:92,h:128}},{glyph:154,frame:{x:2,y:2,w:88,h:124},packed:{x:1295,y:418,w:92,h:128}},{glyph:155,frame:{x:2,y:2,w:105,h:96},packed:{x:144,y:1222,w:109,h:100}},{glyph:156,frame:{x:2,y:2,w:77,h:128},packed:{x:235,y:151,w:81,h:132}},{glyph:157,frame:{x:2,y:2,w:63,h:125},packed:{x:92,y:418,w:67,h:129}},{glyph:158,frame:{x:2,y:2,w:63,h:125},packed:{x:159,y:418,w:67,h:129}},{glyph:159,frame:{x:2,y:2,w:63,h:124},packed:{x:1387,y:418,w:67,h:128}},{glyph:160,frame:{x:2,y:2,w:63,h:124},packed:{x:1419,y:287,w:67,h:128}},{glyph:161,frame:{x:2,y:2,w:35,h:125},packed:{x:226,y:418,w:39,h:129}},{glyph:162,frame:{x:2,y:2,w:36,h:125},packed:{x:265,y:418,w:40,h:129}},{glyph:163,frame:{x:2,y:2,w:45,h:124},packed:{x:1449,y:151,w:49,h:128}},{glyph:164,frame:{x:2,y:2,w:51,h:124},packed:{x:1443,y:0,w:55,h:128}},{glyph:165,frame:{x:2,y:2,w:87,h:96},packed:{x:253,y:1222,w:91,h:100}},{glyph:166,frame:{x:2,y:2,w:77,h:125},packed:{x:305,y:418,w:81,h:129}},{glyph:167,frame:{x:2,y:2,w:93,h:127},packed:{x:444,y:151,w:97,h:131}},{glyph:168,frame:{x:2,y:2,w:93,h:127},packed:{x:541,y:151,w:97,h:131}},{glyph:169,frame:{x:2,y:2,w:93,h:126},packed:{x:391,y:287,w:97,h:130}},{glyph:170,frame:{x:2,y:2,w:93,h:127},packed:{x:638,y:151,w:97,h:131}},{glyph:171,frame:{x:2,y:2,w:93,h:126},packed:{x:488,y:287,w:97,h:130}},{glyph:172,frame:{x:2,y:2,w:55,h:55},packed:{x:1146,y:1413,w:59,h:59}},{glyph:173,frame:{x:2,y:2,w:93,h:108},packed:{x:681,y:791,w:97,h:112}},{glyph:174,frame:{x:2,y:2,w:77,h:127},packed:{x:735,y:151,w:81,h:131}},{glyph:175,frame:{x:2,y:2,w:77,h:127},packed:{x:816,y:151,w:81,h:131}},{glyph:176,frame:{x:2,y:2,w:77,h:126},packed:{x:585,y:287,w:81,h:130}},{glyph:177,frame:{x:2,y:2,w:77,h:126},packed:{x:666,y:287,w:81,h:130}},{glyph:178,frame:{x:2,y:2,w:84,h:125},packed:{x:386,y:418,w:88,h:129}},{glyph:179,frame:{x:2,y:2,w:68,h:96},packed:{x:344,y:1222,w:72,h:100}},{glyph:180,frame:{x:2,y:2,w:77,h:114},packed:{x:843,y:547,w:81,h:118}},{glyph:181,frame:{x:2,y:2,w:63,h:110},packed:{x:550,y:675,w:67,h:114}},{glyph:182,frame:{x:2,y:2,w:63,h:110},packed:{x:617,y:675,w:67,h:114}},{glyph:183,frame:{x:2,y:2,w:63,h:109},packed:{x:0,y:791,w:67,h:113}},{glyph:184,frame:{x:2,y:2,w:63,h:106},packed:{x:1179,y:791,w:67,h:110}},{glyph:185,frame:{x:2,y:2,w:63,h:104},packed:{x:734,y:904,w:67,h:108}},{glyph:186,frame:{x:2,y:2,w:63,h:115},packed:{x:776,y:547,w:67,h:119}},{glyph:187,frame:{x:2,y:2,w:104,h:75},packed:{x:733,y:1322,w:108,h:79}},{glyph:188,frame:{x:2,y:2,w:61,h:103},packed:{x:0,y:1014,w:65,h:107}},{glyph:189,frame:{x:2,y:2,w:61,h:110},packed:{x:684,y:675,w:65,h:114}},{glyph:190,frame:{x:2,y:2,w:61,h:110},packed:{x:749,y:675,w:65,h:114}},{glyph:191,frame:{x:2,y:2,w:61,h:109},packed:{x:67,y:791,w:65,h:113}},{glyph:192,frame:{x:2,y:2,w:61,h:104},packed:{x:801,y:904,w:65,h:108}},{glyph:193,frame:{x:2,y:2,w:42,h:110},packed:{x:814,y:675,w:46,h:114}},{glyph:194,frame:{x:2,y:2,w:33,h:110},packed:{x:860,y:675,w:37,h:114}},{glyph:195,frame:{x:2,y:2,w:44,h:109},packed:{x:132,y:791,w:48,h:113}},{glyph:196,frame:{x:2,y:2,w:51,h:104},packed:{x:866,y:904,w:55,h:108}},{glyph:197,frame:{x:2,y:2,w:71,h:120},packed:{x:599,y:547,w:75,h:124}},{glyph:198,frame:{x:2,y:2,w:63,h:104},packed:{x:921,y:904,w:67,h:108}},{glyph:199,frame:{x:2,y:2,w:71,h:110},packed:{x:897,y:675,w:75,h:114}},{glyph:200,frame:{x:2,y:2,w:71,h:110},packed:{x:972,y:675,w:75,h:114}},{glyph:201,frame:{x:2,y:2,w:71,h:109},packed:{x:180,y:791,w:75,h:113}},{glyph:202,frame:{x:2,y:2,w:71,h:106},packed:{x:1246,y:791,w:75,h:110}},{glyph:203,frame:{x:2,y:2,w:71,h:104},packed:{x:988,y:904,w:75,h:108}},{glyph:204,frame:{x:2,y:2,w:69,h:72},packed:{x:111,y:1413,w:73,h:76}},{glyph:205,frame:{x:2,y:2,w:71,h:85},packed:{x:81,y:1322,w:75,h:89}},{glyph:206,frame:{x:2,y:2,w:64,h:110},packed:{x:1047,y:675,w:68,h:114}},{glyph:207,frame:{x:2,y:2,w:64,h:110},packed:{x:1115,y:675,w:68,h:114}},{glyph:208,frame:{x:2,y:2,w:64,h:109},packed:{x:255,y:791,w:68,h:113}},{glyph:209,frame:{x:2,y:2,w:64,h:104},packed:{x:1063,y:904,w:68,h:108}},{glyph:210,frame:{x:2,y:2,w:66,h:144},packed:{x:333,y:0,w:70,h:148}},{glyph:211,frame:{x:2,y:2,w:67,h:147},packed:{x:0,y:0,w:71,h:151}},{glyph:212,frame:{x:2,y:2,w:66,h:138},packed:{x:964,y:0,w:70,h:142}},{glyph:213,frame:{x:2,y:2,w:88,h:121},packed:{x:327,y:547,w:92,h:125}},{glyph:214,frame:{x:2,y:2,w:63,h:101},packed:{x:385,y:1014,w:67,h:105}},{glyph:215,frame:{x:2,y:2,w:88,h:125},packed:{x:474,y:418,w:92,h:129}},{glyph:216,frame:{x:2,y:2,w:63,h:106},packed:{x:1321,y:791,w:67,h:110}},{glyph:217,frame:{x:2,y:2,w:91,h:126},packed:{x:747,y:287,w:95,h:130}},{glyph:218,frame:{x:2,y:2,w:64,h:103},packed:{x:65,y:1014,w:68,h:107}},{glyph:219,frame:{x:2,y:2,w:77,h:127},packed:{x:897,y:151,w:81,h:131}},{glyph:220,frame:{x:2,y:2,w:61,h:112},packed:{x:123,y:675,w:65,h:116}},{glyph:221,frame:{x:2,y:2,w:77,h:126},packed:{x:842,y:287,w:81,h:130}},{glyph:222,frame:{x:2,y:2,w:61,h:111},packed:{x:342,y:675,w:65,h:115}},{glyph:223,frame:{x:2,y:2,w:77,h:127},packed:{x:978,y:151,w:81,h:131}},{glyph:224,frame:{x:2,y:2,w:61,h:106},packed:{x:1388,y:791,w:65,h:110}},{glyph:225,frame:{x:2,y:2,w:77,h:127},packed:{x:1059,y:151,w:81,h:131}},{glyph:226,frame:{x:2,y:2,w:61,h:111},packed:{x:407,y:675,w:65,h:115}},{glyph:227,frame:{x:2,y:2,w:76,h:125},packed:{x:566,y:418,w:80,h:129}},{glyph:228,frame:{x:2,y:2,w:95,h:114},packed:{x:924,y:547,w:99,h:118}},{glyph:229,frame:{x:2,y:2,w:87,h:96},packed:{x:416,y:1222,w:91,h:100}},{glyph:230,frame:{x:2,y:2,w:78,h:113},packed:{x:1315,y:547,w:82,h:117}},{glyph:231,frame:{x:2,y:2,w:63,h:121},packed:{x:419,y:547,w:67,h:125}},{glyph:232,frame:{x:2,y:2,w:61,h:101},packed:{x:452,y:1014,w:65,h:105}},{glyph:233,frame:{x:2,y:2,w:63,h:125},packed:{x:646,y:418,w:67,h:129}},{glyph:234,frame:{x:2,y:2,w:61,h:106},packed:{x:0,y:904,w:65,h:110}},{glyph:235,frame:{x:2,y:2,w:63,h:125},packed:{x:713,y:418,w:67,h:129}},{glyph:236,frame:{x:2,y:2,w:61,h:104},packed:{x:1131,y:904,w:65,h:108}},{glyph:237,frame:{x:2,y:2,w:63,h:126},packed:{x:923,y:287,w:67,h:130}},{glyph:238,frame:{x:2,y:2,w:61,h:103},packed:{x:133,y:1014,w:65,h:107}},{glyph:239,frame:{x:2,y:2,w:63,h:125},packed:{x:780,y:418,w:67,h:129}},{glyph:240,frame:{x:2,y:2,w:61,h:109},packed:{x:323,y:791,w:65,h:113}},{glyph:241,frame:{x:2,y:2,w:82,h:126},packed:{x:990,y:287,w:86,h:130}},{glyph:242,frame:{x:2,y:2,w:66,h:143},packed:{x:403,y:0,w:70,h:147}},{glyph:243,frame:{x:2,y:2,w:82,h:127},packed:{x:1140,y:151,w:86,h:131}},{glyph:244,frame:{x:2,y:2,w:66,h:140},packed:{x:747,y:0,w:70,h:144}},{glyph:245,frame:{x:2,y:2,w:82,h:127},packed:{x:1226,y:151,w:86,h:131}},{glyph:246,frame:{x:2,y:2,w:66,h:138},packed:{x:1034,y:0,w:70,h:142}},{glyph:247,frame:{x:2,y:2,w:82,h:134},packed:{x:1104,y:0,w:86,h:138}},{glyph:248,frame:{x:2,y:2,w:66,h:146},packed:{x:171,y:0,w:70,h:150}},{glyph:249,frame:{x:2,y:2,w:79,h:124},packed:{x:0,y:547,w:83,h:128}},{glyph:250,frame:{x:2,y:2,w:62,h:124},packed:{x:83,y:547,w:66,h:128}},{glyph:251,frame:{x:2,y:2,w:95,h:96},packed:{x:507,y:1222,w:99,h:100}},{glyph:252,frame:{x:2,y:2,w:74,h:111},packed:{x:472,y:675,w:78,h:115}},{glyph:253,frame:{x:2,y:2,w:49,h:125},packed:{x:847,y:418,w:53,h:129}},{glyph:254,frame:{x:2,y:2,w:49,h:106},packed:{x:65,y:904,w:53,h:110}},{glyph:255,frame:{x:2,y:2,w:39,h:121},packed:{x:486,y:547,w:43,h:125}},{glyph:256,frame:{x:2,y:2,w:40,h:101},packed:{x:517,y:1014,w:44,h:105}},{glyph:257,frame:{x:2,y:2,w:43,h:125},packed:{x:900,y:418,w:47,h:129}},{glyph:258,frame:{x:2,y:2,w:44,h:106},packed:{x:118,y:904,w:48,h:110}},{glyph:259,frame:{x:2,y:2,w:29,h:126},packed:{x:1076,y:287,w:33,h:130}},{glyph:260,frame:{x:2,y:2,w:32,h:133},packed:{x:1190,y:0,w:36,h:137}},{glyph:261,frame:{x:2,y:2,w:21,h:125},packed:{x:947,y:418,w:25,h:129}},{glyph:262,frame:{x:2,y:2,w:29,h:73},packed:{x:1319,y:1322,w:33,h:77}},{glyph:263,frame:{x:2,y:2,w:72,h:98},packed:{x:1300,y:1014,w:76,h:102}},{glyph:264,frame:{x:2,y:2,w:67,h:139},packed:{x:875,y:0,w:71,h:143}},{glyph:265,frame:{x:2,y:2,w:55,h:126},packed:{x:1109,y:287,w:59,h:130}},{glyph:266,frame:{x:2,y:2,w:47,h:143},packed:{x:473,y:0,w:51,h:147}},{glyph:267,frame:{x:2,y:2,w:74,h:133},packed:{x:1226,y:0,w:78,h:137}},{glyph:268,frame:{x:2,y:2,w:62,h:147},packed:{x:71,y:0,w:66,h:151}},{glyph:269,frame:{x:2,y:2,w:62,h:75},packed:{x:841,y:1322,w:66,h:79}},{glyph:270,frame:{x:2,y:2,w:54,h:125},packed:{x:972,y:418,w:58,h:129}},{glyph:271,frame:{x:2,y:2,w:36,h:127},packed:{x:1312,y:151,w:40,h:131}},{glyph:272,frame:{x:2,y:2,w:54,h:132},packed:{x:1304,y:0,w:58,h:136}},{glyph:273,frame:{x:2,y:2,w:30,h:147},packed:{x:137,y:0,w:34,h:151}},{glyph:274,frame:{x:2,y:2,w:54,h:97},packed:{x:101,y:1121,w:58,h:101}},{glyph:275,frame:{x:2,y:2,w:43,h:114},packed:{x:1023,y:547,w:47,h:118}},{glyph:276,frame:{x:2,y:2,w:55,h:96},packed:{x:606,y:1222,w:59,h:100}},{glyph:277,frame:{x:2,y:2,w:56,h:113},packed:{x:1397,y:547,w:60,h:117}},{glyph:278,frame:{x:2,y:2,w:64,h:96},packed:{x:665,y:1222,w:68,h:100}},{glyph:279,frame:{x:2,y:2,w:41,h:113},packed:{x:1454,y:418,w:45,h:117}},{glyph:280,frame:{x:2,y:2,w:77,h:125},packed:{x:1030,y:418,w:81,h:129}},{glyph:281,frame:{x:2,y:2,w:63,h:108},packed:{x:778,y:791,w:67,h:112}},{glyph:282,frame:{x:2,y:2,w:77,h:132},packed:{x:1362,y:0,w:81,h:136}},{glyph:283,frame:{x:2,y:2,w:63,h:109},packed:{x:388,y:791,w:67,h:113}},{glyph:284,frame:{x:2,y:2,w:77,h:124},packed:{x:149,y:547,w:81,h:128}},{glyph:285,frame:{x:2,y:2,w:63,h:107},packed:{x:964,y:791,w:67,h:111}},{glyph:286,frame:{x:2,y:2,w:77,h:132},packed:{x:0,y:151,w:81,h:136}},{glyph:287,frame:{x:2,y:2,w:63,h:109},packed:{x:455,y:791,w:67,h:113}},{glyph:288,frame:{x:2,y:2,w:93,h:123},packed:{x:230,y:547,w:97,h:127}},{glyph:289,frame:{x:2,y:2,w:71,h:101},packed:{x:561,y:1014,w:75,h:105}},{glyph:290,frame:{x:2,y:2,w:93,h:127},packed:{x:1352,y:151,w:97,h:131}},{glyph:291,frame:{x:2,y:2,w:71,h:106},packed:{x:166,y:904,w:75,h:110}},{glyph:292,frame:{x:2,y:2,w:93,h:127},packed:{x:0,y:287,w:97,h:131}},{glyph:293,frame:{x:2,y:2,w:73,h:110},packed:{x:1183,y:675,w:77,h:114}},{glyph:294,frame:{x:2,y:2,w:123,h:100},packed:{x:967,y:1014,w:127,h:104}},{glyph:295,frame:{x:2,y:2,w:114,h:75},packed:{x:907,y:1322,w:118,h:79}},{glyph:296,frame:{x:2,y:2,w:76,h:127},packed:{x:97,y:287,w:80,h:131}},{glyph:297,frame:{x:2,y:2,w:45,h:108},packed:{x:845,y:791,w:49,h:112}},{glyph:298,frame:{x:2,y:2,w:76,h:132},packed:{x:81,y:151,w:80,h:136}},{glyph:299,frame:{x:2,y:2,w:45,h:109},packed:{x:522,y:791,w:49,h:113}},{glyph:300,frame:{x:2,y:2,w:76,h:127},packed:{x:177,y:287,w:80,h:131}},{glyph:301,frame:{x:2,y:2,w:46,h:107},packed:{x:1031,y:791,w:50,h:111}},{glyph:302,frame:{x:2,y:2,w:63,h:127},packed:{x:257,y:287,w:67,h:131}},{glyph:303,frame:{x:2,y:2,w:51,h:110},packed:{x:1260,y:675,w:55,h:114}},{glyph:304,frame:{x:2,y:2,w:63,h:126},packed:{x:1168,y:287,w:67,h:130}},{glyph:305,frame:{x:2,y:2,w:51,h:109},packed:{x:571,y:791,w:55,h:113}},{glyph:306,frame:{x:2,y:2,w:63,h:128},packed:{x:316,y:151,w:67,h:132}},{glyph:307,frame:{x:2,y:2,w:51,h:103},packed:{x:198,y:1014,w:55,h:107}},{glyph:308,frame:{x:2,y:2,w:63,h:127},packed:{x:324,y:287,w:67,h:131}},{glyph:309,frame:{x:2,y:2,w:51,h:109},packed:{x:626,y:791,w:55,h:113}},{glyph:310,frame:{x:2,y:2,w:70,h:132},packed:{x:161,y:151,w:74,h:136}}],Hs={kernings:Ls,meta:Is,chars:$s,glyphs:Bs,colors:js};function pa(t){return new Promise(a=>{let e=new Image;e.onload=()=>a(e),e.src=t})}const ot=class ot{constructor(){o(this,"load",async()=>{let[a,e]=await Promise.all([pa(Os),pa(Ps)]),s=Me.from_image(a);this.sprites=[],this.nine_slice=[],Ns.sprites.forEach(h=>{let{name:r,packs:l,tags:p}=h;if(r.match(/nine_slice/)){this.nine_slice.push(ot.make_nine_slice(s,h));return}let d=n.zero,g=[];p.forEach(m=>{let u=[];for(let z=m.from;z<=m.to;z++){let P=l[z],U=P.meta.duration/1e3,bt=x.make(P.frame.x,P.frame.y,P.frame.w,P.frame.h),Et=x.make(P.packed.x,P.packed.y,P.packed.w,P.packed.h),Tt=new ca(je.make(s,Et,bt),U);u.push(Tt)}let k=new Rs(m.name,u);g.push(k)});let f=new Cs(r,d,g);this.sprites.push(f)});let i={...Hs,size:128};this.sp_font=Lt.make(i,e)});o(this,"sp_font");o(this,"sprites");o(this,"nine_slice")}find_sprite(a){return this.sprites.find(e=>e.name===a)}find_nine(a){return this.nine_slice.find(e=>e.name===a)}};o(ot,"make_nine_slice",(a,e)=>{let{name:s,packs:i,_tags:h}=e,r=[];for(let l=0;l<3;l++)for(let p=0;p<3;p++){let d=i[0],g=1,f=l*d.frame.w/3,m=p*d.frame.h/3,u=x.make(d.frame.x,d.frame.y,d.frame.w/3,d.frame.h/3),k=x.make(f+d.packed.x,m+d.packed.y,4+400/3,4+400/3),z=new ca(je.make(a,k,u),g);r.push(z)}return new Us(s,r)});let It=ot;const Se=new It;function Xs(t){var a;return t.clientX!==void 0&&t.clientY!==void 0?[t.clientX,t.clientY]:(a=t.targetTouches)!=null&&a[0]?[t.targetTouches[0].clientX,t.targetTouches[0].clientY]:[0,0]}class Va{}o(Va,"init",(a,e=document)=>{const s=k=>{let z=Xs(k);return z?n.make(z[0],z[1]):n.zero};let{_onDragStart:i,_onDragMove:h,_onDragEnd:r,_onContextMenu:l,_onWheel:p}=a;const d=k=>{k.preventDefault(),i==null||i(s(k),k.buttons===2||k.button===2)},g=k=>{h==null||h(s(k))},f=k=>{r==null||r(s(k))},m=k=>{l&&(k.preventDefault(),l())},u=k=>{p&&(p(Math.sign(k.deltaY),s(k)),k.preventDefault())};return e.addEventListener("wheel",u,{passive:!1}),e.addEventListener("touchstart",d,{capture:!0,passive:!1}),e.addEventListener("mousedown",d,{capture:!0,passive:!1}),e.addEventListener("contextmenu",m),document.addEventListener("mousemove",g),document.addEventListener("mouseup",f),document.addEventListener("touchmove",g),document.addEventListener("touchend",f),()=>{e.removeEventListener("wheel",u),e.removeEventListener("touchstart",d),e.removeEventListener("mousedown",d),e.removeEventListener("contextmenu",m),document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",f),document.removeEventListener("touchmove",g),document.removeEventListener("touchend",f)}});class Vs{constructor(){o(this,"_on_update");o(this,"_hooks",[])}register(a){return this._hooks.push(a),()=>{this._hooks.splice(this._hooks.indexOf(a),1)}}get hooks(){return this._hooks}_sort_hooks(){this._hooks.sort((a,e)=>(e.priority??0)-(a.priority??0))}_on_hover(a){var i,h;let e=this.hooks,s=e.findIndex(r=>{var l;return(l=r.on_hover)==null?void 0:l.call(r,a)});if(s!==-1)for(let r=s+1;r{var h;return(h=i.on_up)==null?void 0:h.call(i,a,e,s)})}_on_click(a,e){this.hooks.find(s=>{var i;return(i=s.on_click)==null?void 0:i.call(s,a,e)})}_on_click_begin(a,e){this.hooks.find(s=>{var i;return(i=s.on_click_begin)==null?void 0:i.call(s,a,e)})}_on_drag(a,e){this.hooks.find(s=>{var i;return(i=s.on_drag)==null?void 0:i.call(s,a,e)})}_on_context(){this.hooks.find(a=>{var e;return(e=a.on_context)==null?void 0:e.call(a)})}_on_wheel(a,e){this.hooks.find(s=>{var i;return(i=s.on_wheel)==null?void 0:i.call(s,a,e)})}listen(a){let e;const s=()=>{e=a.getBoundingClientRect()};s();const i=g=>{let f=n.make(e.x,e.y),m=n.make(e.width,e.height);return g.sub(f).div(m)};let h=g=>g&&{...g},r,l,p,d=this;Va.init({_onDragStart(g,f){if(f)return;let m=i(g);l=h(r),r={e:m,_right:f},d._on_update=()=>{r?((r.m||p&&r.e.distance(p)>16/1080)&&(r.m=p),d._on_drag(r,l),l=h(r)):d._on_update=void 0},d._on_click_begin(m,f)},_onDragMove(g){let f=i(g);p=f,r||d._on_hover(f)},_onDragEnd(){r&&(r.m||d._on_click(r.e,r._right),d._on_up(r.e,r._right,r.m),d._on_update=void 0,r=void 0,p=void 0)},_onWheel(g,f){var m;(m=d._on_wheel)==null||m.call(d,g,i(f))},_onContextMenu(){}},a),document.addEventListener("scroll",()=>{s()},{capture:!0,passive:!0}),window.addEventListener("resize",()=>{s()},{passive:!0})}update(){var a;(a=this._on_update)==null||a.call(this)}}const ht=new Vs;var qs=`#version 300 es +`&&(a+=this.line_height);return a-this.line_gap}rebuild(t,a,e){this.clear(),this.name=t.family_name,this.ascent=t.ascent,this.descent=t.descent,this.line_gap=t.line_gap,this.size=a;for(let s of e){let{from:i,to:h}=s;for(let r=i;r<=h;r++){let l=t.get_glyph(r);if(l===void 0)continue;let p=t.get_character(l),d=t.get_subtexture(p.glyph),g={glyph:l,codepoint:r,advance:p.advance,offset:n.make(p.offset_x,p.offset_y),subtexture:d};this._characters.push(g)}}for(let s of this._characters)for(let i of this._characters){let h=t.get_kerning(s.glyph,i.glyph);h!==void 0&&this.set_kerning(s.codepoint,i.codepoint,h)}}get_kerning(t,a){let e=da(this._kerning,t,a);return e!==-1?this._kerning[e].value:0}set_kerning(t,a,e){let s=da(this._kerning,t,a);s!==-1?this._kerning[s].value=e:this._kerning.push({a:t,b:a,value:e})}get_character(t){let a=Fs(this._characters,t);return a!==-1?this._characters[a]:this._characters[0]}};let Lt=Pt;_(Lt,"make",(t,a)=>{let e=Me.from_image(a),s=Xa.make(t,e);return Pt.make_from_font(s,t.size)}),_(Lt,"make_from_font",(t,a)=>{let e=[{from:32,to:127},{from:161,to:355}],s=new Pt;return s.rebuild(t,a,e),s});function Fs(t,a){let e=0,s=t.length-1;for(;e<=s;){let i=Math.round((s+e)/2);if(t[i].codepoint===a)return i;t[i].codepointe.name===a)}}class Us{constructor(a,e){this.name=a,this.frames=e}}const Os=""+new URL("out_0-253f9001.png",import.meta.url).href,Ds=[{name:"arrow_up_fire",tags:[{from:0,to:2,name:"idle"}],packs:[{frame:{x:4,y:4,w:48,h:48},packed:{x:3226,y:2728,w:56,h:56},meta:{duration:100}},{frame:{x:4,y:4,w:48,h:48},packed:{x:3226,y:2656,w:56,h:56},meta:{duration:100}},{frame:{x:4,y:4,w:48,h:48},packed:{x:3225,y:3377,w:56,h:56},meta:{duration:100}}]},{name:"button_bg",tags:[{from:0,to:0,name:"idle"},{from:1,to:1,name:"hover"},{from:2,to:2,name:"click"},{from:3,to:3,name:"disabled"}],packs:[{frame:{x:4,y:4,w:366,h:200},packed:{x:2592,y:2656,w:374,h:208},meta:{duration:100}},{frame:{x:4,y:4,w:366,h:200},packed:{x:0,y:2909,w:374,h:208},meta:{duration:100}},{frame:{x:4,y:4,w:366,h:200},packed:{x:374,y:2909,w:374,h:208},meta:{duration:300}},{frame:{x:4,y:4,w:366,h:200},packed:{x:748,y:2909,w:374,h:208},meta:{duration:100}}]},{name:"card",tags:[{from:0,to:0,name:"idle"},{from:1,to:1,name:"hover"},{from:2,to:4,name:"click"},{from:5,to:7,name:"flip"},{from:8,to:8,name:"back_idle"},{from:9,to:9,name:"back_hover"},{from:10,to:10,name:"back_click"},{from:11,to:13,name:"back_flip"},{from:14,to:15,name:"drag"},{from:16,to:17,name:"back_drag"},{from:18,to:18,name:"wait"},{from:19,to:19,name:"shadow"},{from:20,to:20,name:"highlight"}],packs:[{frame:{x:4,y:4,w:204,h:245},packed:{x:2897,y:1909,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:2849,y:0,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:3061,y:0,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:2849,y:253,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:3061,y:253,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:2849,y:506,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:3061,y:506,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:1578,y:821,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:1790,y:821,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:2002,y:821,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:2214,y:821,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:2426,y:821,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:2638,y:821,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:2850,y:821,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:3062,y:821,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:0,y:2656,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:212,y:2656,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:424,y:2656,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:636,y:2656,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:848,y:2656,w:212,h:253},meta:{duration:100}},{frame:{x:4,y:4,w:204,h:245},packed:{x:1060,y:2656,w:212,h:253},meta:{duration:100}}]},{name:"confbar",tags:[{from:0,to:0,name:"idle"}],packs:[{frame:{x:4,y:4,w:360,h:320},packed:{x:2529,y:1909,w:368,h:328},meta:{duration:100}}]},{name:"confetti",tags:[{from:0,to:6,name:"idle"}],packs:[{frame:{x:4,y:4,w:180,h:180},packed:{x:1122,y:2909,w:188,h:188},meta:{duration:200}},{frame:{x:4,y:4,w:180,h:180},packed:{x:1310,y:2909,w:188,h:188},meta:{duration:200}},{frame:{x:4,y:4,w:180,h:180},packed:{x:1498,y:2909,w:188,h:188},meta:{duration:200}},{frame:{x:4,y:4,w:180,h:180},packed:{x:1686,y:2909,w:188,h:188},meta:{duration:200}},{frame:{x:4,y:4,w:180,h:180},packed:{x:1874,y:2909,w:188,h:188},meta:{duration:200}},{frame:{x:4,y:4,w:180,h:180},packed:{x:2062,y:2909,w:188,h:188},meta:{duration:200}},{frame:{x:4,y:4,w:180,h:180},packed:{x:2250,y:2909,w:188,h:188},meta:{duration:200}}]},{name:"confetti2",tags:[{from:0,to:6,name:"idle"}],packs:[{frame:{x:4,y:4,w:180,h:180},packed:{x:2438,y:2909,w:188,h:188},meta:{duration:300}},{frame:{x:4,y:4,w:180,h:180},packed:{x:2626,y:2909,w:188,h:188},meta:{duration:300}},{frame:{x:4,y:4,w:180,h:180},packed:{x:2814,y:2909,w:188,h:188},meta:{duration:300}},{frame:{x:4,y:4,w:180,h:180},packed:{x:3002,y:2909,w:188,h:188},meta:{duration:300}},{frame:{x:4,y:4,w:180,h:180},packed:{x:2966,y:2656,w:188,h:188},meta:{duration:300}},{frame:{x:4,y:4,w:180,h:180},packed:{x:0,y:3117,w:188,h:188},meta:{duration:300}},{frame:{x:4,y:4,w:180,h:180},packed:{x:188,y:3117,w:188,h:188},meta:{duration:300}}]},{name:"dropdown_bg",tags:[{from:0,to:0,name:"idle"},{from:1,to:1,name:"hover"}],packs:[{frame:{x:4,y:4,w:510,h:172},packed:{x:376,y:3117,w:518,h:180},meta:{duration:100}},{frame:{x:4,y:4,w:510,h:172},packed:{x:894,y:3117,w:518,h:180},meta:{duration:100}}]},{name:"hmg_bg",tags:[{from:0,to:0,name:"idle"},{from:1,to:1,name:"hover"},{from:2,to:2,name:"open"},{from:3,to:3,name:"open_hover"}],packs:[{frame:{x:4,y:4,w:240,h:140},packed:{x:1945,y:3305,w:248,h:148},meta:{duration:100}},{frame:{x:4,y:4,w:240,h:140},packed:{x:2193,y:3305,w:248,h:148},meta:{duration:100}},{frame:{x:4,y:4,w:240,h:140},packed:{x:2441,y:3305,w:248,h:148},meta:{duration:100}},{frame:{x:4,y:4,w:240,h:140},packed:{x:2689,y:3305,w:248,h:148},meta:{duration:100}}]},{name:"main_bg",tags:[{from:0,to:0,name:"idle"}],packs:[{frame:{x:4,y:4,w:1570,h:1080},packed:{x:0,y:0,w:1578,h:1088},meta:{duration:100}}]},{name:"main_card_bg",tags:[{from:0,to:0,name:"solitaire"},{from:1,to:1,name:"solitaire_hover"},{from:2,to:2,name:"fourtimes"},{from:3,to:3,name:"fourtimes_hover"},{from:4,to:4,name:"octopus"},{from:5,to:5,name:"octopus_hover"}],packs:[{frame:{x:4,y:4,w:481,h:739},packed:{x:1271,y:1088,w:489,h:747},meta:{duration:100}},{frame:{x:4,y:4,w:481,h:739},packed:{x:1760,y:1088,w:489,h:747},meta:{duration:100}},{frame:{x:4,y:4,w:481,h:739},packed:{x:2249,y:1088,w:489,h:747},meta:{duration:100}},{frame:{x:4,y:4,w:481,h:739},packed:{x:2738,y:1088,w:489,h:747},meta:{duration:100}},{frame:{x:4,y:4,w:481,h:739},packed:{x:0,y:1909,w:489,h:747},meta:{duration:100}},{frame:{x:4,y:4,w:481,h:739},packed:{x:489,y:1909,w:489,h:747},meta:{duration:100}}]},{name:"main_settings_bg",tags:[{from:0,to:0,name:"idle"},{from:1,to:1,name:"hover"}],packs:[{frame:{x:4,y:4,w:652,h:223},packed:{x:1272,y:2656,w:660,h:231},meta:{duration:100}},{frame:{x:4,y:4,w:652,h:223},packed:{x:1932,y:2656,w:660,h:231},meta:{duration:100}}]},{name:"main_title_bg",tags:[{from:0,to:0,name:"idle"}],packs:[{frame:{x:4,y:4,w:780,h:560},packed:{x:1333,y:1909,w:788,h:568},meta:{duration:100}}]},{name:"menu_bar",tags:[{from:0,to:0,name:"idle"}],packs:[{frame:{x:4,y:4,w:240,h:160},packed:{x:1412,y:3117,w:248,h:168},meta:{duration:100}}]},{name:"navigation_bg",tags:[{from:0,to:0,name:"idle"},{from:1,to:1,name:"hover"}],packs:[{frame:{x:4,y:4,w:593,h:157},packed:{x:2224,y:3117,w:601,h:165},meta:{duration:100}},{frame:{x:4,y:4,w:593,h:157},packed:{x:0,y:3305,w:601,h:165},meta:{duration:100}}]},{name:"panel_bg_nine_slice",tags:[{from:0,to:0,name:"idle"}],packs:[{frame:{x:4,y:4,w:400,h:400},packed:{x:2121,y:1909,w:408,h:408},meta:{duration:100}}]},{name:"rank",tags:[{from:0,to:0,name:"a"},{from:1,to:1,name:"2"},{from:2,to:2,name:"3"},{from:3,to:3,name:"4"},{from:4,to:4,name:"5"},{from:5,to:5,name:"6"},{from:6,to:6,name:"7"},{from:7,to:7,name:"8"},{from:8,to:8,name:"9"},{from:9,to:9,name:"t"},{from:10,to:10,name:"j"},{from:11,to:11,name:"q"},{from:12,to:12,name:"k"}],packs:[{frame:{x:4,y:4,w:64,h:64},packed:{x:2937,y:3305,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3009,y:3305,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3081,y:3305,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3153,y:3305,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:2937,y:3377,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3009,y:3377,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3081,y:3377,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3153,y:3377,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:2825,y:3117,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:2897,y:3117,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:2969,y:3117,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3041,y:3117,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3113,y:3117,w:72,h:72},meta:{duration:100}}]},{name:"rank_2",tags:[{from:0,to:0,name:"a"},{from:1,to:1,name:"2"},{from:2,to:2,name:"3"},{from:3,to:3,name:"4"},{from:4,to:4,name:"5"},{from:5,to:5,name:"6"},{from:6,to:6,name:"7"},{from:7,to:7,name:"8"},{from:8,to:8,name:"9"},{from:9,to:9,name:"t"},{from:10,to:10,name:"j"},{from:11,to:11,name:"q"},{from:12,to:12,name:"k"}],packs:[{frame:{x:4,y:4,w:64,h:64},packed:{x:3185,y:3117,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:2825,y:3189,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:2897,y:3189,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:2969,y:3189,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3041,y:3189,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3113,y:3189,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3185,y:3189,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3154,y:2656,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3154,y:2728,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3190,y:2909,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3190,y:2981,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3109,y:1909,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3181,y:1909,w:72,h:72},meta:{duration:100}}]},{name:"recycle",tags:[{from:0,to:0,name:"idle"},{from:1,to:1,name:"hover"},{from:2,to:2,name:"disabled"}],packs:[{frame:{x:4,y:4,w:180,h:160},packed:{x:1660,y:3117,w:188,h:168},meta:{duration:100}},{frame:{x:4,y:4,w:180,h:160},packed:{x:1848,y:3117,w:188,h:168},meta:{duration:100}},{frame:{x:4,y:4,w:180,h:160},packed:{x:2036,y:3117,w:188,h:168},meta:{duration:100}}]},{name:"side_menu_bg",tags:[{from:0,to:0,name:"idle"}],packs:[{frame:{x:4,y:4,w:347,h:659},packed:{x:978,y:1909,w:355,h:667},meta:{duration:100}}]},{name:"suit",tags:[{from:0,to:0,name:"spades"},{from:1,to:1,name:"hearts"},{from:2,to:2,name:"diamonds"},{from:3,to:3,name:"clubs"}],packs:[{frame:{x:4,y:4,w:64,h:64},packed:{x:3109,y:1981,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3181,y:1981,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3109,y:2053,w:72,h:72},meta:{duration:100}},{frame:{x:4,y:4,w:64,h:64},packed:{x:3181,y:2053,w:72,h:72},meta:{duration:100}}]},{name:"swiggle",tags:[{from:0,to:0,name:"idle"},{from:1,to:1,name:"small"}],packs:[{frame:{x:4,y:4,w:1263,h:813},packed:{x:1578,y:0,w:1271,h:821},meta:{duration:100}},{frame:{x:4,y:4,w:1263,h:813},packed:{x:0,y:1088,w:1271,h:821},meta:{duration:100}}]},{name:"tab3_bg",tags:[{from:0,to:0,name:"idle"},{from:1,to:1,name:"hover"},{from:2,to:2,name:"active"}],packs:[{frame:{x:4,y:4,w:440,h:150},packed:{x:601,y:3305,w:448,h:158},meta:{duration:100}},{frame:{x:4,y:4,w:440,h:150},packed:{x:1049,y:3305,w:448,h:158},meta:{duration:100}},{frame:{x:4,y:4,w:440,h:150},packed:{x:1497,y:3305,w:448,h:158},meta:{duration:100}}]}],Ns={sprites:Ds},Ps=""+new URL("out_0-1e3dd4e6.png",import.meta.url).href,Ls=[],Is={scale:.0625,descent:-568,ascent:1992,line_gap:0,name:"Capriola"},$s=[{glyph:22,width:0,height:0,advance:32.0625,offset_x:0,offset_y:0,scale:.0625,has_glyph:0},{glyph:23,width:23,height:102,advance:42.75,offset_x:10.9375,offset_y:-100,scale:.0625,has_glyph:1},{glyph:24,width:42,height:40,advance:53.1875,offset_x:6.3125,offset_y:-108,scale:.0625,has_glyph:1},{glyph:25,width:77,height:87,advance:85.125,offset_x:3.5,offset_y:-89,scale:.0625,has_glyph:1},{glyph:26,width:57,height:127,advance:64,offset_x:3.4375,offset_y:-107,scale:.0625,has_glyph:1},{glyph:27,width:118,height:103,advance:127.6875,offset_x:5.875,offset_y:-101,scale:.0625,has_glyph:1},{glyph:28,width:71,height:94,advance:85.0625,offset_x:9.3125,offset_y:-92,scale:.0625,has_glyph:1},{glyph:29,width:16,height:40,advance:31.9375,offset_x:8.125,offset_y:-108,scale:.0625,has_glyph:1},{glyph:30,width:35,height:141,advance:53.375,offset_x:10.25,offset_y:-120,scale:.0625,has_glyph:1},{glyph:31,width:36,height:141,advance:53.375,offset_x:8.3125,offset_y:-120,scale:.0625,has_glyph:1},{glyph:32,width:73,height:67,advance:85.1875,offset_x:6.3125,offset_y:-119,scale:.0625,has_glyph:1},{glyph:33,width:69,height:69,advance:85.1875,offset_x:8.25,offset_y:-72,scale:.0625,has_glyph:1},{glyph:34,width:23,height:47,advance:32.0625,offset_x:4,offset_y:-21,scale:.0625,has_glyph:1},{glyph:35,width:46,height:13,advance:74.5625,offset_x:14.8125,offset_y:-44,scale:.0625,has_glyph:1},{glyph:36,width:22,height:23,advance:32.0625,offset_x:5.375,offset_y:-21,scale:.0625,has_glyph:1},{glyph:37,width:40,height:111,advance:53.3125,offset_x:9.375,offset_y:-102,scale:.0625,has_glyph:1},{glyph:38,width:71,height:79,advance:85.1875,offset_x:7.5625,offset_y:-77,scale:.0625,has_glyph:1},{glyph:39,width:35,height:76,advance:53.0625,offset_x:3.9375,offset_y:-76,scale:.0625,has_glyph:1},{glyph:40,width:59,height:77,advance:74.625,offset_x:8,offset_y:-77,scale:.0625,has_glyph:1},{glyph:41,width:61,height:94,advance:74.625,offset_x:5.9375,offset_y:-77,scale:.0625,has_glyph:1},{glyph:42,width:69,height:94,advance:74.0625,offset_x:5.4375,offset_y:-79,scale:.0625,has_glyph:1},{glyph:43,width:65,height:92,advance:74.5625,offset_x:7.6875,offset_y:-75,scale:.0625,has_glyph:1},{glyph:44,width:65,height:93,advance:74.5625,offset_x:5.9375,offset_y:-91,scale:.0625,has_glyph:1},{glyph:45,width:57,height:92,advance:63.8125,offset_x:3.125,offset_y:-75,scale:.0625,has_glyph:1},{glyph:46,width:64,height:93,advance:74.5625,offset_x:5.8125,offset_y:-91,scale:.0625,has_glyph:1},{glyph:47,width:65,height:94,advance:74.5625,offset_x:3.625,offset_y:-77,scale:.0625,has_glyph:1},{glyph:48,width:23,height:72,advance:31.9375,offset_x:4.9375,offset_y:-70,scale:.0625,has_glyph:1},{glyph:49,width:23,height:96,advance:32.0625,offset_x:4.1875,offset_y:-70,scale:.0625,has_glyph:1},{glyph:50,width:65,height:62,advance:85.25,offset_x:9.3125,offset_y:-68,scale:.0625,has_glyph:1},{glyph:51,width:67,height:41,advance:85.1875,offset_x:9.8125,offset_y:-58,scale:.0625,has_glyph:1},{glyph:52,width:65,height:62,advance:85.25,offset_x:11.8125,offset_y:-68,scale:.0625,has_glyph:1},{glyph:53,width:59,height:103,advance:74.9375,offset_x:8.375,offset_y:-101,scale:.0625,has_glyph:1},{glyph:54,width:94,height:106,advance:106.3125,offset_x:7.5,offset_y:-82,scale:.0625,has_glyph:1},{glyph:55,width:88,height:96,advance:96,offset_x:4.25,offset_y:-96,scale:.0625,has_glyph:1},{glyph:56,width:73,height:96,advance:95.0625,offset_x:14.875,offset_y:-96,scale:.0625,has_glyph:1},{glyph:57,width:77,height:100,advance:85.125,offset_x:6.9375,offset_y:-98,scale:.0625,has_glyph:1},{glyph:58,width:76,height:96,advance:95.8125,offset_x:14.875,offset_y:-96,scale:.0625,has_glyph:1},{glyph:59,width:63,height:96,advance:85.125,offset_x:14.625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:60,width:59,height:96,advance:74.375,offset_x:14.75,offset_y:-96,scale:.0625,has_glyph:1},{glyph:61,width:82,height:100,advance:95.8125,offset_x:8.6875,offset_y:-98,scale:.0625,has_glyph:1},{glyph:62,width:79,height:96,advance:106.1875,offset_x:14.125,offset_y:-96,scale:.0625,has_glyph:1},{glyph:63,width:17,height:96,advance:42.6875,offset_x:13.5,offset_y:-96,scale:.0625,has_glyph:1},{glyph:64,width:41,height:98,advance:53.125,offset_x:1.9375,offset_y:-96,scale:.0625,has_glyph:1},{glyph:65,width:74,height:102,advance:85.25,offset_x:13.5,offset_y:-97,scale:.0625,has_glyph:1},{glyph:66,width:54,height:96,advance:74.6875,offset_x:14.9375,offset_y:-96,scale:.0625,has_glyph:1},{glyph:67,width:113,height:96,advance:127.4375,offset_x:8.0625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:68,width:77,height:96,advance:106.3125,offset_x:15.0625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:69,width:93,height:100,advance:106.8125,offset_x:7.1875,offset_y:-98,scale:.0625,has_glyph:1},{glyph:70,width:68,height:96,advance:85,offset_x:14.3125,offset_y:-96,scale:.0625,has_glyph:1},{glyph:71,width:98,height:118,advance:106.4375,offset_x:7.1875,offset_y:-98,scale:.0625,has_glyph:1},{glyph:72,width:76,height:98,advance:95.8125,offset_x:14.625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:73,width:63,height:100,advance:74.625,offset_x:6.875,offset_y:-98,scale:.0625,has_glyph:1},{glyph:74,width:70,height:96,advance:74.5,offset_x:2.75,offset_y:-96,scale:.0625,has_glyph:1},{glyph:75,width:77,height:98,advance:95.5625,offset_x:9.6875,offset_y:-96,scale:.0625,has_glyph:1},{glyph:76,width:83,height:96,advance:85.25,offset_x:1.5625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:77,width:126,height:96,advance:138.3125,offset_x:6.125,offset_y:-96,scale:.0625,has_glyph:1},{glyph:78,width:78,height:96,advance:85.1875,offset_x:4,offset_y:-96,scale:.0625,has_glyph:1},{glyph:79,width:84,height:96,advance:84.6875,offset_x:1,offset_y:-96,scale:.0625,has_glyph:1},{glyph:80,width:67,height:96,advance:74.5625,offset_x:4.625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:81,width:33,height:140,advance:53.375,offset_x:12.9375,offset_y:-119,scale:.0625,has_glyph:1},{glyph:82,width:40,height:111,advance:53.3125,offset_x:4.0625,offset_y:-102,scale:.0625,has_glyph:1},{glyph:83,width:33,height:140,advance:53.375,offset_x:8.5,offset_y:-119,scale:.0625,has_glyph:1},{glyph:84,width:60,height:65,advance:63.875,offset_x:2.5625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:85,width:104,height:13,advance:95.8125,offset_x:-3.625,offset_y:10,scale:.0625,has_glyph:1},{glyph:86,width:33,height:28,advance:42.9375,offset_x:.875,offset_y:-108,scale:.0625,has_glyph:1},{glyph:87,width:63,height:75,advance:74.6875,offset_x:6.125,offset_y:-73,scale:.0625,has_glyph:1},{glyph:88,width:67,height:113,advance:85.3125,offset_x:12.6875,offset_y:-111,scale:.0625,has_glyph:1},{glyph:89,width:61,height:77,advance:74.5625,offset_x:7.5625,offset_y:-73,scale:.0625,has_glyph:1},{glyph:90,width:70,height:113,advance:85.25,offset_x:6.9375,offset_y:-111,scale:.0625,has_glyph:1},{glyph:91,width:61,height:75,advance:74.6875,offset_x:7.125,offset_y:-73,scale:.0625,has_glyph:1},{glyph:92,width:54,height:112,advance:53.1875,offset_x:4.75,offset_y:-112,scale:.0625,has_glyph:1},{glyph:93,width:66,height:120,advance:74.5625,offset_x:6.8125,offset_y:-84,scale:.0625,has_glyph:1},{glyph:94,width:62,height:111,advance:85.25,offset_x:13.375,offset_y:-111,scale:.0625,has_glyph:1},{glyph:95,width:32,height:105,advance:42.6875,offset_x:8.875,offset_y:-103,scale:.0625,has_glyph:1},{glyph:96,width:36,height:139,advance:42.6875,offset_x:-3.625,offset_y:-103,scale:.0625,has_glyph:1},{glyph:97,width:62,height:113,advance:74.75,offset_x:11.875,offset_y:-111,scale:.0625,has_glyph:1},{glyph:98,width:30,height:113,advance:42.6875,offset_x:11.6875,offset_y:-111,scale:.0625,has_glyph:1},{glyph:99,width:106,height:73,advance:127.6875,offset_x:11.5,offset_y:-73,scale:.0625,has_glyph:1},{glyph:100,width:63,height:73,advance:85.25,offset_x:11.5,offset_y:-73,scale:.0625,has_glyph:1},{glyph:101,width:71,height:75,advance:85.375,offset_x:7.5,offset_y:-73,scale:.0625,has_glyph:1},{glyph:102,width:69,height:109,advance:85.3125,offset_x:10.3125,offset_y:-73,scale:.0625,has_glyph:1},{glyph:103,width:66,height:109,advance:85.3125,offset_x:7.4375,offset_y:-73,scale:.0625,has_glyph:1},{glyph:104,width:45,height:73,advance:53.3125,offset_x:9.9375,offset_y:-73,scale:.0625,has_glyph:1},{glyph:105,width:51,height:75,advance:64,offset_x:7.25,offset_y:-73,scale:.0625,has_glyph:1},{glyph:106,width:50,height:91,advance:53.1875,offset_x:3.9375,offset_y:-89,scale:.0625,has_glyph:1},{glyph:107,width:64,height:73,advance:85.25,offset_x:11.8125,offset_y:-71,scale:.0625,has_glyph:1},{glyph:108,width:66,height:72,advance:74.75,offset_x:4.4375,offset_y:-71,scale:.0625,has_glyph:1},{glyph:109,width:107,height:72,advance:116.9375,offset_x:4.5,offset_y:-71,scale:.0625,has_glyph:1},{glyph:110,width:61,height:71,advance:63.9375,offset_x:1.5625,offset_y:-71,scale:.0625,has_glyph:1},{glyph:111,width:66,height:107,advance:74.5625,offset_x:4.5,offset_y:-71,scale:.0625,has_glyph:1},{glyph:112,width:54,height:71,advance:63.9375,offset_x:5.4375,offset_y:-71,scale:.0625,has_glyph:1},{glyph:113,width:42,height:144,advance:64,offset_x:15,offset_y:-120,scale:.0625,has_glyph:1},{glyph:114,width:14,height:139,advance:42.6875,offset_x:14.6875,offset_y:-118,scale:.0625,has_glyph:1},{glyph:115,width:42,height:144,advance:64,offset_x:7.8125,offset_y:-120,scale:.0625,has_glyph:1},{glyph:116,width:78,height:27,advance:106.6875,offset_x:15.375,offset_y:-53,scale:.0625,has_glyph:1},{glyph:118,width:23,height:102,advance:42.75,offset_x:10.875,offset_y:-70,scale:.0625,has_glyph:1},{glyph:119,width:61,height:112,advance:74.5625,offset_x:7.5625,offset_y:-92,scale:.0625,has_glyph:1},{glyph:120,width:56,height:91,advance:63.6875,offset_x:6.9375,offset_y:-91,scale:.0625,has_glyph:1},{glyph:121,width:66,height:66,advance:74.5625,offset_x:4.3125,offset_y:-71,scale:.0625,has_glyph:1},{glyph:122,width:79,height:90,advance:85.1875,offset_x:3.0625,offset_y:-90,scale:.0625,has_glyph:1},{glyph:123,width:14,height:138,advance:42.6875,offset_x:14.6875,offset_y:-118,scale:.0625,has_glyph:1},{glyph:124,width:66,height:142,advance:85.1875,offset_x:9.3125,offset_y:-113,scale:.0625,has_glyph:1},{glyph:125,width:51,height:20,advance:65,offset_x:7.75,offset_y:-102,scale:.0625,has_glyph:1},{glyph:126,width:97,height:97,advance:106.5,offset_x:5.3125,offset_y:-96,scale:.0625,has_glyph:1},{glyph:127,width:51,height:61,advance:74.6875,offset_x:7.4375,offset_y:-98,scale:.0625,has_glyph:1},{glyph:128,width:77,height:63,advance:95.875,offset_x:9.8125,offset_y:-67,scale:.0625,has_glyph:1},{glyph:129,width:75,height:40,advance:95.8125,offset_x:8.25,offset_y:-54,scale:.0625,has_glyph:1},{glyph:130,width:0,height:0,advance:106.6875,offset_x:0,offset_y:0,scale:.0625,has_glyph:0},{glyph:131,width:97,height:97,advance:106.5,offset_x:5.3125,offset_y:-96,scale:.0625,has_glyph:1},{glyph:132,width:39,height:14,advance:42.6875,offset_x:2.4375,offset_y:-99,scale:.0625,has_glyph:1},{glyph:133,width:47,height:49,advance:53.3125,offset_x:3.1875,offset_y:-105,scale:.0625,has_glyph:1},{glyph:134,width:69,height:77,advance:85.1875,offset_x:8.25,offset_y:-77,scale:.0625,has_glyph:1},{glyph:135,width:49,height:64,advance:63.6875,offset_x:6.25,offset_y:-117,scale:.0625,has_glyph:1},{glyph:136,width:49,height:66,advance:63.75,offset_x:6.9375,offset_y:-117,scale:.0625,has_glyph:1},{glyph:137,width:34,height:28,advance:42.9375,offset_x:10.875,offset_y:-108,scale:.0625,has_glyph:1},{glyph:138,width:64,height:105,advance:85.25,offset_x:11.8125,offset_y:-71,scale:.0625,has_glyph:1},{glyph:139,width:69,height:96,advance:96,offset_x:13.0625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:140,width:22,height:23,advance:32.0625,offset_x:5.375,offset_y:-49,scale:.0625,has_glyph:1},{glyph:141,width:32,height:33,advance:31.6875,offset_x:-11.4375,offset_y:-3,scale:.0625,has_glyph:1},{glyph:142,width:31,height:64,advance:42.4375,offset_x:1.8125,offset_y:-117,scale:.0625,has_glyph:1},{glyph:143,width:54,height:61,advance:63.9375,offset_x:5.3125,offset_y:-98,scale:.0625,has_glyph:1},{glyph:144,width:78,height:63,advance:95.875,offset_x:9.3125,offset_y:-68,scale:.0625,has_glyph:1},{glyph:145,width:121,height:105,advance:138.3125,offset_x:9.3125,offset_y:-103,scale:.0625,has_glyph:1},{glyph:146,width:122,height:105,advance:148.8125,offset_x:9.3125,offset_y:-103,scale:.0625,has_glyph:1},{glyph:147,width:134,height:105,advance:148.9375,offset_x:6.9375,offset_y:-103,scale:.0625,has_glyph:1},{glyph:148,width:59,height:103,advance:74.9375,offset_x:8.3125,offset_y:-70,scale:.0625,has_glyph:1},{glyph:149,width:88,height:125,advance:96,offset_x:4.25,offset_y:-125,scale:.0625,has_glyph:1},{glyph:150,width:88,height:125,advance:96,offset_x:4.25,offset_y:-125,scale:.0625,has_glyph:1},{glyph:151,width:88,height:124,advance:96,offset_x:4.25,offset_y:-124,scale:.0625,has_glyph:1},{glyph:152,width:88,height:125,advance:96,offset_x:4.25,offset_y:-125,scale:.0625,has_glyph:1},{glyph:153,width:88,height:124,advance:96,offset_x:4.25,offset_y:-124,scale:.0625,has_glyph:1},{glyph:154,width:88,height:124,advance:96,offset_x:4.25,offset_y:-124,scale:.0625,has_glyph:1},{glyph:155,width:105,height:96,advance:117.0625,offset_x:4.125,offset_y:-96,scale:.0625,has_glyph:1},{glyph:156,width:77,height:128,advance:95.6875,offset_x:6.9375,offset_y:-98,scale:.0625,has_glyph:1},{glyph:157,width:63,height:125,advance:85.125,offset_x:14.625,offset_y:-125,scale:.0625,has_glyph:1},{glyph:158,width:63,height:125,advance:85.125,offset_x:14.625,offset_y:-125,scale:.0625,has_glyph:1},{glyph:159,width:63,height:124,advance:85.125,offset_x:14.625,offset_y:-124,scale:.0625,has_glyph:1},{glyph:160,width:63,height:124,advance:85.125,offset_x:14.625,offset_y:-124,scale:.0625,has_glyph:1},{glyph:161,width:35,height:125,advance:42.6875,offset_x:-.75,offset_y:-125,scale:.0625,has_glyph:1},{glyph:162,width:36,height:125,advance:42.6875,offset_x:10.875,offset_y:-125,scale:.0625,has_glyph:1},{glyph:163,width:45,height:124,advance:42.6875,offset_x:-.9375,offset_y:-124,scale:.0625,has_glyph:1},{glyph:164,width:51,height:124,advance:42.6875,offset_x:-3.75,offset_y:-124,scale:.0625,has_glyph:1},{glyph:165,width:87,height:96,advance:95.8125,offset_x:3.0625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:166,width:77,height:125,advance:106.3125,offset_x:15.0625,offset_y:-125,scale:.0625,has_glyph:1},{glyph:167,width:93,height:127,advance:106.8125,offset_x:7.1875,offset_y:-125,scale:.0625,has_glyph:1},{glyph:168,width:93,height:127,advance:106.8125,offset_x:7.1875,offset_y:-125,scale:.0625,has_glyph:1},{glyph:169,width:93,height:126,advance:106.8125,offset_x:7.1875,offset_y:-124,scale:.0625,has_glyph:1},{glyph:170,width:93,height:127,advance:106.8125,offset_x:7.1875,offset_y:-125,scale:.0625,has_glyph:1},{glyph:171,width:93,height:126,advance:106.8125,offset_x:7.1875,offset_y:-124,scale:.0625,has_glyph:1},{glyph:172,width:55,height:55,advance:74.5625,offset_x:10.625,offset_y:-65,scale:.0625,has_glyph:1},{glyph:173,width:93,height:108,advance:106.8125,offset_x:7.1875,offset_y:-103,scale:.0625,has_glyph:1},{glyph:174,width:77,height:127,advance:106.125,offset_x:15,offset_y:-125,scale:.0625,has_glyph:1},{glyph:175,width:77,height:127,advance:106.125,offset_x:15,offset_y:-125,scale:.0625,has_glyph:1},{glyph:176,width:77,height:126,advance:106.125,offset_x:15,offset_y:-124,scale:.0625,has_glyph:1},{glyph:177,width:77,height:126,advance:106.125,offset_x:15,offset_y:-124,scale:.0625,has_glyph:1},{glyph:178,width:84,height:125,advance:84.6875,offset_x:1,offset_y:-125,scale:.0625,has_glyph:1},{glyph:179,width:68,height:96,advance:85,offset_x:14.9375,offset_y:-96,scale:.0625,has_glyph:1},{glyph:180,width:77,height:114,advance:95.8125,offset_x:14.6875,offset_y:-112,scale:.0625,has_glyph:1},{glyph:181,width:63,height:110,advance:74.6875,offset_x:6.125,offset_y:-108,scale:.0625,has_glyph:1},{glyph:182,width:63,height:110,advance:74.6875,offset_x:6.125,offset_y:-108,scale:.0625,has_glyph:1},{glyph:183,width:63,height:109,advance:74.6875,offset_x:6.125,offset_y:-107,scale:.0625,has_glyph:1},{glyph:184,width:63,height:106,advance:74.6875,offset_x:6.125,offset_y:-104,scale:.0625,has_glyph:1},{glyph:185,width:63,height:104,advance:74.6875,offset_x:6.125,offset_y:-102,scale:.0625,has_glyph:1},{glyph:186,width:63,height:115,advance:74.6875,offset_x:6.125,offset_y:-113,scale:.0625,has_glyph:1},{glyph:187,width:104,height:75,advance:117.125,offset_x:6.125,offset_y:-73,scale:.0625,has_glyph:1},{glyph:188,width:61,height:103,advance:74.5625,offset_x:7.5625,offset_y:-73,scale:.0625,has_glyph:1},{glyph:189,width:61,height:110,advance:74.6875,offset_x:7.125,offset_y:-108,scale:.0625,has_glyph:1},{glyph:190,width:61,height:110,advance:74.6875,offset_x:7.125,offset_y:-108,scale:.0625,has_glyph:1},{glyph:191,width:61,height:109,advance:74.6875,offset_x:7.125,offset_y:-107,scale:.0625,has_glyph:1},{glyph:192,width:61,height:104,advance:74.6875,offset_x:7.125,offset_y:-102,scale:.0625,has_glyph:1},{glyph:193,width:42,height:110,advance:42.6875,offset_x:-1.8125,offset_y:-108,scale:.0625,has_glyph:1},{glyph:194,width:33,height:110,advance:42.6875,offset_x:9.4375,offset_y:-108,scale:.0625,has_glyph:1},{glyph:195,width:44,height:109,advance:42.6875,offset_x:-2,offset_y:-107,scale:.0625,has_glyph:1},{glyph:196,width:51,height:104,advance:42.6875,offset_x:-5.5625,offset_y:-102,scale:.0625,has_glyph:1},{glyph:197,width:71,height:120,advance:85.1875,offset_x:8.1875,offset_y:-118,scale:.0625,has_glyph:1},{glyph:198,width:63,height:104,advance:85.25,offset_x:11.5,offset_y:-104,scale:.0625,has_glyph:1},{glyph:199,width:71,height:110,advance:85.375,offset_x:7.5,offset_y:-108,scale:.0625,has_glyph:1},{glyph:200,width:71,height:110,advance:85.375,offset_x:7.5,offset_y:-108,scale:.0625,has_glyph:1},{glyph:201,width:71,height:109,advance:85.375,offset_x:7.5,offset_y:-107,scale:.0625,has_glyph:1},{glyph:202,width:71,height:106,advance:85.375,offset_x:7.5,offset_y:-104,scale:.0625,has_glyph:1},{glyph:203,width:71,height:104,advance:85.375,offset_x:7.5,offset_y:-102,scale:.0625,has_glyph:1},{glyph:204,width:69,height:72,advance:85.1875,offset_x:8.1875,offset_y:-73,scale:.0625,has_glyph:1},{glyph:205,width:71,height:85,advance:85.375,offset_x:7.5,offset_y:-78,scale:.0625,has_glyph:1},{glyph:206,width:64,height:110,advance:85.25,offset_x:11.8125,offset_y:-108,scale:.0625,has_glyph:1},{glyph:207,width:64,height:110,advance:85.25,offset_x:11.8125,offset_y:-108,scale:.0625,has_glyph:1},{glyph:208,width:64,height:109,advance:85.25,offset_x:11.8125,offset_y:-107,scale:.0625,has_glyph:1},{glyph:209,width:64,height:104,advance:85.25,offset_x:11.8125,offset_y:-102,scale:.0625,has_glyph:1},{glyph:210,width:66,height:144,advance:74.5625,offset_x:4.5,offset_y:-108,scale:.0625,has_glyph:1},{glyph:211,width:67,height:147,advance:85.5,offset_x:12.6875,offset_y:-111,scale:.0625,has_glyph:1},{glyph:212,width:66,height:138,advance:74.5625,offset_x:4.6875,offset_y:-102,scale:.0625,has_glyph:1},{glyph:213,width:88,height:121,advance:96,offset_x:4.25,offset_y:-121,scale:.0625,has_glyph:1},{glyph:214,width:63,height:101,advance:74.6875,offset_x:6.125,offset_y:-99,scale:.0625,has_glyph:1},{glyph:215,width:88,height:125,advance:96,offset_x:4.25,offset_y:-125,scale:.0625,has_glyph:1},{glyph:216,width:63,height:106,advance:74.6875,offset_x:6.125,offset_y:-104,scale:.0625,has_glyph:1},{glyph:217,width:91,height:126,advance:96,offset_x:4.25,offset_y:-96,scale:.0625,has_glyph:1},{glyph:218,width:64,height:103,advance:74.6875,offset_x:6.125,offset_y:-73,scale:.0625,has_glyph:1},{glyph:219,width:77,height:127,advance:85.125,offset_x:6.9375,offset_y:-125,scale:.0625,has_glyph:1},{glyph:220,width:61,height:112,advance:74.5625,offset_x:7.5625,offset_y:-108,scale:.0625,has_glyph:1},{glyph:221,width:77,height:126,advance:85.125,offset_x:6.9375,offset_y:-124,scale:.0625,has_glyph:1},{glyph:222,width:61,height:111,advance:74.5625,offset_x:7.5625,offset_y:-107,scale:.0625,has_glyph:1},{glyph:223,width:77,height:127,advance:85.125,offset_x:6.9375,offset_y:-125,scale:.0625,has_glyph:1},{glyph:224,width:61,height:106,advance:74.5625,offset_x:7.5625,offset_y:-102,scale:.0625,has_glyph:1},{glyph:225,width:77,height:127,advance:85.125,offset_x:6.9375,offset_y:-125,scale:.0625,has_glyph:1},{glyph:226,width:61,height:111,advance:74.5625,offset_x:7.5625,offset_y:-107,scale:.0625,has_glyph:1},{glyph:227,width:76,height:125,advance:95.8125,offset_x:14.875,offset_y:-125,scale:.0625,has_glyph:1},{glyph:228,width:95,height:114,advance:95.8125,offset_x:6.9375,offset_y:-112,scale:.0625,has_glyph:1},{glyph:229,width:87,height:96,advance:95.8125,offset_x:3.0625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:230,width:78,height:113,advance:85.25,offset_x:6.9375,offset_y:-111,scale:.0625,has_glyph:1},{glyph:231,width:63,height:121,advance:85.125,offset_x:14.625,offset_y:-121,scale:.0625,has_glyph:1},{glyph:232,width:61,height:101,advance:74.6875,offset_x:7.125,offset_y:-99,scale:.0625,has_glyph:1},{glyph:233,width:63,height:125,advance:85.125,offset_x:14.625,offset_y:-125,scale:.0625,has_glyph:1},{glyph:234,width:61,height:106,advance:74.6875,offset_x:7.125,offset_y:-104,scale:.0625,has_glyph:1},{glyph:235,width:63,height:125,advance:85.125,offset_x:14.625,offset_y:-125,scale:.0625,has_glyph:1},{glyph:236,width:61,height:104,advance:74.6875,offset_x:7.125,offset_y:-102,scale:.0625,has_glyph:1},{glyph:237,width:63,height:126,advance:85.125,offset_x:14.625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:238,width:61,height:103,advance:74.6875,offset_x:7.125,offset_y:-73,scale:.0625,has_glyph:1},{glyph:239,width:63,height:125,advance:85.125,offset_x:14.625,offset_y:-125,scale:.0625,has_glyph:1},{glyph:240,width:61,height:109,advance:74.6875,offset_x:7.125,offset_y:-107,scale:.0625,has_glyph:1},{glyph:241,width:82,height:126,advance:95.8125,offset_x:8.6875,offset_y:-124,scale:.0625,has_glyph:1},{glyph:242,width:66,height:143,advance:74.5625,offset_x:6.8125,offset_y:-107,scale:.0625,has_glyph:1},{glyph:243,width:82,height:127,advance:95.8125,offset_x:8.6875,offset_y:-125,scale:.0625,has_glyph:1},{glyph:244,width:66,height:140,advance:74.5625,offset_x:6.8125,offset_y:-104,scale:.0625,has_glyph:1},{glyph:245,width:82,height:127,advance:95.8125,offset_x:8.6875,offset_y:-125,scale:.0625,has_glyph:1},{glyph:246,width:66,height:138,advance:74.5625,offset_x:6.8125,offset_y:-102,scale:.0625,has_glyph:1},{glyph:247,width:82,height:134,advance:95.8125,offset_x:8.6875,offset_y:-98,scale:.0625,has_glyph:1},{glyph:248,width:66,height:146,advance:74.5625,offset_x:6.8125,offset_y:-110,scale:.0625,has_glyph:1},{glyph:249,width:79,height:124,advance:106.1875,offset_x:14.125,offset_y:-124,scale:.0625,has_glyph:1},{glyph:250,width:62,height:124,advance:85.25,offset_x:13.375,offset_y:-124,scale:.0625,has_glyph:1},{glyph:251,width:95,height:96,advance:106.1875,offset_x:5.625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:252,width:74,height:111,advance:85.25,offset_x:1.875,offset_y:-111,scale:.0625,has_glyph:1},{glyph:253,width:49,height:125,advance:42.6875,offset_x:-2.875,offset_y:-125,scale:.0625,has_glyph:1},{glyph:254,width:49,height:106,advance:42.6875,offset_x:-3.3125,offset_y:-104,scale:.0625,has_glyph:1},{glyph:255,width:39,height:121,advance:42.6875,offset_x:2.375,offset_y:-121,scale:.0625,has_glyph:1},{glyph:256,width:40,height:101,advance:42.6875,offset_x:.1875,offset_y:-99,scale:.0625,has_glyph:1},{glyph:257,width:43,height:125,advance:42.6875,offset_x:0,offset_y:-125,scale:.0625,has_glyph:1},{glyph:258,width:44,height:106,advance:42.6875,offset_x:-1.75,offset_y:-104,scale:.0625,has_glyph:1},{glyph:259,width:29,height:126,advance:42.6875,offset_x:7.8125,offset_y:-96,scale:.0625,has_glyph:1},{glyph:260,width:32,height:133,advance:42.6875,offset_x:8.875,offset_y:-103,scale:.0625,has_glyph:1},{glyph:261,width:21,height:125,advance:42.6875,offset_x:11.0625,offset_y:-125,scale:.0625,has_glyph:1},{glyph:262,width:29,height:73,advance:42.6875,offset_x:11.375,offset_y:-71,scale:.0625,has_glyph:1},{glyph:263,width:72,height:98,advance:95.8125,offset_x:13.5,offset_y:-96,scale:.0625,has_glyph:1},{glyph:264,width:67,height:139,advance:85.375,offset_x:8.875,offset_y:-103,scale:.0625,has_glyph:1},{glyph:265,width:55,height:126,advance:53.125,offset_x:1.9375,offset_y:-124,scale:.0625,has_glyph:1},{glyph:266,width:47,height:143,advance:42.6875,offset_x:-3.625,offset_y:-107,scale:.0625,has_glyph:1},{glyph:267,width:74,height:133,advance:85.25,offset_x:13.5,offset_y:-97,scale:.0625,has_glyph:1},{glyph:268,width:62,height:147,advance:74.75,offset_x:11.875,offset_y:-111,scale:.0625,has_glyph:1},{glyph:269,width:62,height:75,advance:74.75,offset_x:11.875,offset_y:-73,scale:.0625,has_glyph:1},{glyph:270,width:54,height:125,advance:74.6875,offset_x:14.9375,offset_y:-125,scale:.0625,has_glyph:1},{glyph:271,width:36,height:127,advance:42.6875,offset_x:10.75,offset_y:-125,scale:.0625,has_glyph:1},{glyph:272,width:54,height:132,advance:74.6875,offset_x:14.9375,offset_y:-96,scale:.0625,has_glyph:1},{glyph:273,width:30,height:147,advance:42.6875,offset_x:11.6875,offset_y:-111,scale:.0625,has_glyph:1},{glyph:274,width:54,height:97,advance:74.6875,offset_x:14.9375,offset_y:-97,scale:.0625,has_glyph:1},{glyph:275,width:43,height:114,advance:53.5625,offset_x:11.6875,offset_y:-112,scale:.0625,has_glyph:1},{glyph:276,width:55,height:96,advance:74.6875,offset_x:15,offset_y:-96,scale:.0625,has_glyph:1},{glyph:277,width:56,height:113,advance:74.75,offset_x:11.6875,offset_y:-111,scale:.0625,has_glyph:1},{glyph:278,width:64,height:96,advance:74.6875,offset_x:4.375,offset_y:-96,scale:.0625,has_glyph:1},{glyph:279,width:41,height:113,advance:42.6875,offset_x:1.5,offset_y:-111,scale:.0625,has_glyph:1},{glyph:280,width:77,height:125,advance:106.3125,offset_x:15.0625,offset_y:-125,scale:.0625,has_glyph:1},{glyph:281,width:63,height:108,advance:85.25,offset_x:11.5,offset_y:-108,scale:.0625,has_glyph:1},{glyph:282,width:77,height:132,advance:106.3125,offset_x:15.0625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:283,width:63,height:109,advance:85.25,offset_x:11.5,offset_y:-73,scale:.0625,has_glyph:1},{glyph:284,width:77,height:124,advance:106.3125,offset_x:15.0625,offset_y:-124,scale:.0625,has_glyph:1},{glyph:285,width:63,height:107,advance:85.25,offset_x:11.5,offset_y:-107,scale:.0625,has_glyph:1},{glyph:286,width:77,height:132,advance:106.3125,offset_x:15.0625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:287,width:63,height:109,advance:85.25,offset_x:11.5,offset_y:-73,scale:.0625,has_glyph:1},{glyph:288,width:93,height:123,advance:106.8125,offset_x:7.1875,offset_y:-121,scale:.0625,has_glyph:1},{glyph:289,width:71,height:101,advance:85.375,offset_x:7.5,offset_y:-99,scale:.0625,has_glyph:1},{glyph:290,width:93,height:127,advance:106.8125,offset_x:7.1875,offset_y:-125,scale:.0625,has_glyph:1},{glyph:291,width:71,height:106,advance:85.375,offset_x:7.5,offset_y:-104,scale:.0625,has_glyph:1},{glyph:292,width:93,height:127,advance:106.8125,offset_x:7.1875,offset_y:-125,scale:.0625,has_glyph:1},{glyph:293,width:73,height:110,advance:85.375,offset_x:7.5,offset_y:-108,scale:.0625,has_glyph:1},{glyph:294,width:123,height:100,advance:138.3125,offset_x:7.1875,offset_y:-98,scale:.0625,has_glyph:1},{glyph:295,width:114,height:75,advance:127.75,offset_x:7.5,offset_y:-73,scale:.0625,has_glyph:1},{glyph:296,width:76,height:127,advance:95.8125,offset_x:14.625,offset_y:-125,scale:.0625,has_glyph:1},{glyph:297,width:45,height:108,advance:53.3125,offset_x:9.9375,offset_y:-108,scale:.0625,has_glyph:1},{glyph:298,width:76,height:132,advance:95.8125,offset_x:14.625,offset_y:-96,scale:.0625,has_glyph:1},{glyph:299,width:45,height:109,advance:53.3125,offset_x:9.9375,offset_y:-73,scale:.0625,has_glyph:1},{glyph:300,width:76,height:127,advance:95.8125,offset_x:14.625,offset_y:-125,scale:.0625,has_glyph:1},{glyph:301,width:46,height:107,advance:53.3125,offset_x:8.375,offset_y:-107,scale:.0625,has_glyph:1},{glyph:302,width:63,height:127,advance:74.625,offset_x:6.875,offset_y:-125,scale:.0625,has_glyph:1},{glyph:303,width:51,height:110,advance:64,offset_x:7.25,offset_y:-108,scale:.0625,has_glyph:1},{glyph:304,width:63,height:126,advance:74.625,offset_x:6.875,offset_y:-124,scale:.0625,has_glyph:1},{glyph:305,width:51,height:109,advance:64,offset_x:7.25,offset_y:-107,scale:.0625,has_glyph:1},{glyph:306,width:63,height:128,advance:74.625,offset_x:6.875,offset_y:-98,scale:.0625,has_glyph:1},{glyph:307,width:51,height:103,advance:64,offset_x:7.25,offset_y:-73,scale:.0625,has_glyph:1},{glyph:308,width:63,height:127,advance:74.625,offset_x:6.875,offset_y:-125,scale:.0625,has_glyph:1},{glyph:309,width:51,height:109,advance:64,offset_x:7.25,offset_y:-107,scale:.0625,has_glyph:1},{glyph:310,width:70,height:132,advance:74.5,offset_x:2.75,offset_y:-96,scale:.0625,has_glyph:1}],Bs=[{glyph:22,codepoint:32},{glyph:23,codepoint:33},{glyph:24,codepoint:34},{glyph:25,codepoint:35},{glyph:26,codepoint:36},{glyph:27,codepoint:37},{glyph:28,codepoint:38},{glyph:29,codepoint:39},{glyph:30,codepoint:40},{glyph:31,codepoint:41},{glyph:32,codepoint:42},{glyph:33,codepoint:43},{glyph:34,codepoint:44},{glyph:35,codepoint:45},{glyph:36,codepoint:46},{glyph:37,codepoint:47},{glyph:38,codepoint:48},{glyph:39,codepoint:49},{glyph:40,codepoint:50},{glyph:41,codepoint:51},{glyph:42,codepoint:52},{glyph:43,codepoint:53},{glyph:44,codepoint:54},{glyph:45,codepoint:55},{glyph:46,codepoint:56},{glyph:47,codepoint:57},{glyph:48,codepoint:58},{glyph:49,codepoint:59},{glyph:50,codepoint:60},{glyph:51,codepoint:61},{glyph:52,codepoint:62},{glyph:53,codepoint:63},{glyph:54,codepoint:64},{glyph:55,codepoint:65},{glyph:56,codepoint:66},{glyph:57,codepoint:67},{glyph:58,codepoint:68},{glyph:59,codepoint:69},{glyph:60,codepoint:70},{glyph:61,codepoint:71},{glyph:62,codepoint:72},{glyph:63,codepoint:73},{glyph:64,codepoint:74},{glyph:65,codepoint:75},{glyph:66,codepoint:76},{glyph:67,codepoint:77},{glyph:68,codepoint:78},{glyph:69,codepoint:79},{glyph:70,codepoint:80},{glyph:71,codepoint:81},{glyph:72,codepoint:82},{glyph:73,codepoint:83},{glyph:74,codepoint:84},{glyph:75,codepoint:85},{glyph:76,codepoint:86},{glyph:77,codepoint:87},{glyph:78,codepoint:88},{glyph:79,codepoint:89},{glyph:80,codepoint:90},{glyph:81,codepoint:91},{glyph:82,codepoint:92},{glyph:83,codepoint:93},{glyph:84,codepoint:94},{glyph:85,codepoint:95},{glyph:86,codepoint:96},{glyph:87,codepoint:97},{glyph:88,codepoint:98},{glyph:89,codepoint:99},{glyph:90,codepoint:100},{glyph:91,codepoint:101},{glyph:92,codepoint:102},{glyph:93,codepoint:103},{glyph:94,codepoint:104},{glyph:95,codepoint:105},{glyph:96,codepoint:106},{glyph:97,codepoint:107},{glyph:98,codepoint:108},{glyph:99,codepoint:109},{glyph:100,codepoint:110},{glyph:101,codepoint:111},{glyph:102,codepoint:112},{glyph:103,codepoint:113},{glyph:104,codepoint:114},{glyph:105,codepoint:115},{glyph:106,codepoint:116},{glyph:107,codepoint:117},{glyph:108,codepoint:118},{glyph:109,codepoint:119},{glyph:110,codepoint:120},{glyph:111,codepoint:121},{glyph:112,codepoint:122},{glyph:113,codepoint:123},{glyph:114,codepoint:124},{glyph:115,codepoint:125},{glyph:116,codepoint:126},{glyph:118,codepoint:161},{glyph:119,codepoint:162},{glyph:120,codepoint:163},{glyph:121,codepoint:164},{glyph:122,codepoint:165},{glyph:123,codepoint:166},{glyph:124,codepoint:167},{glyph:125,codepoint:168},{glyph:126,codepoint:169},{glyph:127,codepoint:170},{glyph:128,codepoint:171},{glyph:129,codepoint:172},{glyph:130,codepoint:173},{glyph:131,codepoint:174},{glyph:132,codepoint:175},{glyph:133,codepoint:176},{glyph:134,codepoint:177},{glyph:135,codepoint:178},{glyph:136,codepoint:179},{glyph:137,codepoint:180},{glyph:138,codepoint:181},{glyph:139,codepoint:182},{glyph:140,codepoint:183},{glyph:141,codepoint:184},{glyph:142,codepoint:185},{glyph:143,codepoint:186},{glyph:144,codepoint:187},{glyph:145,codepoint:188},{glyph:146,codepoint:189},{glyph:147,codepoint:190},{glyph:148,codepoint:191},{glyph:149,codepoint:192},{glyph:150,codepoint:193},{glyph:151,codepoint:194},{glyph:152,codepoint:195},{glyph:153,codepoint:196},{glyph:154,codepoint:197},{glyph:155,codepoint:198},{glyph:156,codepoint:199},{glyph:157,codepoint:200},{glyph:158,codepoint:201},{glyph:159,codepoint:202},{glyph:160,codepoint:203},{glyph:161,codepoint:204},{glyph:162,codepoint:205},{glyph:163,codepoint:206},{glyph:164,codepoint:207},{glyph:165,codepoint:208},{glyph:166,codepoint:209},{glyph:167,codepoint:210},{glyph:168,codepoint:211},{glyph:169,codepoint:212},{glyph:170,codepoint:213},{glyph:171,codepoint:214},{glyph:172,codepoint:215},{glyph:173,codepoint:216},{glyph:174,codepoint:217},{glyph:175,codepoint:218},{glyph:176,codepoint:219},{glyph:177,codepoint:220},{glyph:178,codepoint:221},{glyph:179,codepoint:222},{glyph:180,codepoint:223},{glyph:181,codepoint:224},{glyph:182,codepoint:225},{glyph:183,codepoint:226},{glyph:184,codepoint:227},{glyph:185,codepoint:228},{glyph:186,codepoint:229},{glyph:187,codepoint:230},{glyph:188,codepoint:231},{glyph:189,codepoint:232},{glyph:190,codepoint:233},{glyph:191,codepoint:234},{glyph:192,codepoint:235},{glyph:193,codepoint:236},{glyph:194,codepoint:237},{glyph:195,codepoint:238},{glyph:196,codepoint:239},{glyph:197,codepoint:240},{glyph:198,codepoint:241},{glyph:199,codepoint:242},{glyph:200,codepoint:243},{glyph:201,codepoint:244},{glyph:202,codepoint:245},{glyph:203,codepoint:246},{glyph:204,codepoint:247},{glyph:205,codepoint:248},{glyph:206,codepoint:249},{glyph:207,codepoint:250},{glyph:208,codepoint:251},{glyph:209,codepoint:252},{glyph:210,codepoint:253},{glyph:211,codepoint:254},{glyph:212,codepoint:255},{glyph:213,codepoint:256},{glyph:214,codepoint:257},{glyph:215,codepoint:258},{glyph:216,codepoint:259},{glyph:217,codepoint:260},{glyph:218,codepoint:261},{glyph:219,codepoint:262},{glyph:220,codepoint:263},{glyph:221,codepoint:264},{glyph:222,codepoint:265},{glyph:223,codepoint:266},{glyph:224,codepoint:267},{glyph:225,codepoint:268},{glyph:226,codepoint:269},{glyph:227,codepoint:270},{glyph:228,codepoint:271},{glyph:229,codepoint:272},{glyph:230,codepoint:273},{glyph:231,codepoint:274},{glyph:232,codepoint:275},{glyph:233,codepoint:276},{glyph:234,codepoint:277},{glyph:235,codepoint:278},{glyph:236,codepoint:279},{glyph:237,codepoint:280},{glyph:238,codepoint:281},{glyph:239,codepoint:282},{glyph:240,codepoint:283},{glyph:241,codepoint:284},{glyph:242,codepoint:285},{glyph:243,codepoint:286},{glyph:244,codepoint:287},{glyph:245,codepoint:288},{glyph:246,codepoint:289},{glyph:247,codepoint:290},{glyph:248,codepoint:291},{glyph:249,codepoint:292},{glyph:250,codepoint:293},{glyph:251,codepoint:294},{glyph:252,codepoint:295},{glyph:253,codepoint:296},{glyph:254,codepoint:297},{glyph:255,codepoint:298},{glyph:256,codepoint:299},{glyph:257,codepoint:300},{glyph:258,codepoint:301},{glyph:259,codepoint:302},{glyph:260,codepoint:303},{glyph:261,codepoint:304},{glyph:262,codepoint:305},{glyph:263,codepoint:306},{glyph:264,codepoint:307},{glyph:265,codepoint:308},{glyph:266,codepoint:309},{glyph:267,codepoint:310},{glyph:268,codepoint:311},{glyph:269,codepoint:312},{glyph:270,codepoint:313},{glyph:271,codepoint:314},{glyph:272,codepoint:315},{glyph:273,codepoint:316},{glyph:274,codepoint:317},{glyph:275,codepoint:318},{glyph:276,codepoint:319},{glyph:277,codepoint:320},{glyph:278,codepoint:321},{glyph:279,codepoint:322},{glyph:280,codepoint:323},{glyph:281,codepoint:324},{glyph:282,codepoint:325},{glyph:283,codepoint:326},{glyph:284,codepoint:327},{glyph:285,codepoint:328},{glyph:286,codepoint:330},{glyph:287,codepoint:331},{glyph:288,codepoint:332},{glyph:289,codepoint:333},{glyph:290,codepoint:334},{glyph:291,codepoint:335},{glyph:292,codepoint:336},{glyph:293,codepoint:337},{glyph:294,codepoint:338},{glyph:295,codepoint:339},{glyph:296,codepoint:340},{glyph:297,codepoint:341},{glyph:298,codepoint:342},{glyph:299,codepoint:343},{glyph:300,codepoint:344},{glyph:301,codepoint:345},{glyph:302,codepoint:346},{glyph:303,codepoint:347},{glyph:304,codepoint:348},{glyph:305,codepoint:349},{glyph:306,codepoint:350},{glyph:307,codepoint:351},{glyph:308,codepoint:352},{glyph:309,codepoint:353},{glyph:310,codepoint:354}],js=[{glyph:23,frame:{x:2,y:2,w:23,h:102},packed:{x:253,y:1014,w:27,h:106}},{glyph:24,frame:{x:2,y:2,w:42,h:40},packed:{x:1354,y:1413,w:46,h:44}},{glyph:25,frame:{x:2,y:2,w:77,h:87},packed:{x:0,y:1322,w:81,h:91}},{glyph:26,frame:{x:2,y:2,w:57,h:127},packed:{x:383,y:151,w:61,h:131}},{glyph:27,frame:{x:2,y:2,w:118,h:103},packed:{x:1196,y:904,w:122,h:107}},{glyph:28,frame:{x:2,y:2,w:71,h:94},packed:{x:733,y:1222,w:75,h:98}},{glyph:29,frame:{x:2,y:2,w:16,h:40},packed:{x:1400,y:1413,w:20,h:44}},{glyph:30,frame:{x:2,y:2,w:35,h:141},packed:{x:594,y:0,w:39,h:145}},{glyph:31,frame:{x:2,y:2,w:36,h:141},packed:{x:633,y:0,w:40,h:145}},{glyph:32,frame:{x:2,y:2,w:73,h:67},packed:{x:380,y:1413,w:77,h:71}},{glyph:33,frame:{x:2,y:2,w:69,h:69},packed:{x:307,y:1413,w:73,h:73}},{glyph:34,frame:{x:2,y:2,w:23,h:47},packed:{x:1256,y:1413,w:27,h:51}},{glyph:35,frame:{x:2,y:2,w:46,h:13},packed:{x:232,y:1489,w:50,h:17}},{glyph:36,frame:{x:2,y:2,w:22,h:23},packed:{x:82,y:1489,w:26,h:27}},{glyph:37,frame:{x:2,y:2,w:40,h:111},packed:{x:188,y:675,w:44,h:115}},{glyph:38,frame:{x:2,y:2,w:71,h:79},packed:{x:156,y:1322,w:75,h:83}},{glyph:39,frame:{x:2,y:2,w:35,h:76},packed:{x:432,y:1322,w:39,h:80}},{glyph:40,frame:{x:2,y:2,w:59,h:77},packed:{x:231,y:1322,w:63,h:81}},{glyph:41,frame:{x:2,y:2,w:61,h:94},packed:{x:808,y:1222,w:65,h:98}},{glyph:42,frame:{x:2,y:2,w:69,h:94},packed:{x:873,y:1222,w:73,h:98}},{glyph:43,frame:{x:2,y:2,w:65,h:92},packed:{x:1152,y:1222,w:69,h:96}},{glyph:44,frame:{x:2,y:2,w:65,h:93},packed:{x:1015,y:1222,w:69,h:97}},{glyph:45,frame:{x:2,y:2,w:57,h:92},packed:{x:1221,y:1222,w:61,h:96}},{glyph:46,frame:{x:2,y:2,w:64,h:93},packed:{x:1084,y:1222,w:68,h:97}},{glyph:47,frame:{x:2,y:2,w:65,h:94},packed:{x:946,y:1222,w:69,h:98}},{glyph:48,frame:{x:2,y:2,w:23,h:72},packed:{x:1352,y:1322,w:27,h:76}},{glyph:49,frame:{x:2,y:2,w:23,h:96},packed:{x:159,y:1121,w:27,h:100}},{glyph:50,frame:{x:2,y:2,w:65,h:62},packed:{x:895,y:1413,w:69,h:66}},{glyph:51,frame:{x:2,y:2,w:67,h:41},packed:{x:1283,y:1413,w:71,h:45}},{glyph:52,frame:{x:2,y:2,w:65,h:62},packed:{x:964,y:1413,w:69,h:66}},{glyph:53,frame:{x:2,y:2,w:59,h:103},packed:{x:1318,y:904,w:63,h:107}},{glyph:54,frame:{x:2,y:2,w:94,h:106},packed:{x:1081,y:791,w:98,h:110}},{glyph:55,frame:{x:2,y:2,w:88,h:96},packed:{x:186,y:1121,w:92,h:100}},{glyph:56,frame:{x:2,y:2,w:73,h:96},packed:{x:278,y:1121,w:77,h:100}},{glyph:57,frame:{x:2,y:2,w:77,h:100},packed:{x:636,y:1014,w:81,h:104}},{glyph:58,frame:{x:2,y:2,w:76,h:96},packed:{x:355,y:1121,w:80,h:100}},{glyph:59,frame:{x:2,y:2,w:63,h:96},packed:{x:435,y:1121,w:67,h:100}},{glyph:60,frame:{x:2,y:2,w:59,h:96},packed:{x:502,y:1121,w:63,h:100}},{glyph:61,frame:{x:2,y:2,w:82,h:100},packed:{x:717,y:1014,w:86,h:104}},{glyph:62,frame:{x:2,y:2,w:79,h:96},packed:{x:565,y:1121,w:83,h:100}},{glyph:63,frame:{x:2,y:2,w:17,h:96},packed:{x:648,y:1121,w:21,h:100}},{glyph:64,frame:{x:2,y:2,w:41,h:98},packed:{x:1094,y:1014,w:45,h:102}},{glyph:65,frame:{x:2,y:2,w:74,h:102},packed:{x:280,y:1014,w:78,h:106}},{glyph:66,frame:{x:2,y:2,w:54,h:96},packed:{x:669,y:1121,w:58,h:100}},{glyph:67,frame:{x:2,y:2,w:113,h:96},packed:{x:727,y:1121,w:117,h:100}},{glyph:68,frame:{x:2,y:2,w:77,h:96},packed:{x:844,y:1121,w:81,h:100}},{glyph:69,frame:{x:2,y:2,w:93,h:100},packed:{x:803,y:1014,w:97,h:104}},{glyph:70,frame:{x:2,y:2,w:68,h:96},packed:{x:925,y:1121,w:72,h:100}},{glyph:71,frame:{x:2,y:2,w:98,h:118},packed:{x:674,y:547,w:102,h:122}},{glyph:72,frame:{x:2,y:2,w:76,h:98},packed:{x:1139,y:1014,w:80,h:102}},{glyph:73,frame:{x:2,y:2,w:63,h:100},packed:{x:900,y:1014,w:67,h:104}},{glyph:74,frame:{x:2,y:2,w:70,h:96},packed:{x:997,y:1121,w:74,h:100}},{glyph:75,frame:{x:2,y:2,w:77,h:98},packed:{x:1219,y:1014,w:81,h:102}},{glyph:76,frame:{x:2,y:2,w:83,h:96},packed:{x:1071,y:1121,w:87,h:100}},{glyph:77,frame:{x:2,y:2,w:126,h:96},packed:{x:1158,y:1121,w:130,h:100}},{glyph:78,frame:{x:2,y:2,w:78,h:96},packed:{x:1288,y:1121,w:82,h:100}},{glyph:79,frame:{x:2,y:2,w:84,h:96},packed:{x:1370,y:1121,w:88,h:100}},{glyph:80,frame:{x:2,y:2,w:67,h:96},packed:{x:0,y:1222,w:71,h:100}},{glyph:81,frame:{x:2,y:2,w:33,h:140},packed:{x:673,y:0,w:37,h:144}},{glyph:82,frame:{x:2,y:2,w:40,h:111},packed:{x:232,y:675,w:44,h:115}},{glyph:83,frame:{x:2,y:2,w:33,h:140},packed:{x:710,y:0,w:37,h:144}},{glyph:84,frame:{x:2,y:2,w:60,h:65},packed:{x:580,y:1413,w:64,h:69}},{glyph:85,frame:{x:2,y:2,w:104,h:13},packed:{x:282,y:1489,w:108,h:17}},{glyph:86,frame:{x:2,y:2,w:33,h:28},packed:{x:1449,y:1359,w:37,h:32}},{glyph:87,frame:{x:2,y:2,w:63,h:75},packed:{x:471,y:1322,w:67,h:79}},{glyph:88,frame:{x:2,y:2,w:67,h:113},packed:{x:1070,y:547,w:71,h:117}},{glyph:89,frame:{x:2,y:2,w:61,h:77},packed:{x:294,y:1322,w:65,h:81}},{glyph:90,frame:{x:2,y:2,w:70,h:113},packed:{x:1141,y:547,w:74,h:117}},{glyph:91,frame:{x:2,y:2,w:61,h:75},packed:{x:538,y:1322,w:65,h:79}},{glyph:92,frame:{x:2,y:2,w:54,h:112},packed:{x:0,y:675,w:58,h:116}},{glyph:93,frame:{x:2,y:2,w:66,h:120},packed:{x:529,y:547,w:70,h:124}},{glyph:94,frame:{x:2,y:2,w:62,h:111},packed:{x:276,y:675,w:66,h:115}},{glyph:95,frame:{x:2,y:2,w:32,h:105},packed:{x:241,y:904,w:36,h:109}},{glyph:96,frame:{x:2,y:2,w:36,h:139},packed:{x:817,y:0,w:40,h:143}},{glyph:97,frame:{x:2,y:2,w:62,h:113},packed:{x:1215,y:547,w:66,h:117}},{glyph:98,frame:{x:2,y:2,w:30,h:113},packed:{x:1281,y:547,w:34,h:117}},{glyph:99,frame:{x:2,y:2,w:106,h:73},packed:{x:1025,y:1322,w:110,h:77}},{glyph:100,frame:{x:2,y:2,w:63,h:73},packed:{x:1135,y:1322,w:67,h:77}},{glyph:101,frame:{x:2,y:2,w:71,h:75},packed:{x:603,y:1322,w:75,h:79}},{glyph:102,frame:{x:2,y:2,w:69,h:109},packed:{x:1315,y:675,w:73,h:113}},{glyph:103,frame:{x:2,y:2,w:66,h:109},packed:{x:1388,y:675,w:70,h:113}},{glyph:104,frame:{x:2,y:2,w:45,h:73},packed:{x:1202,y:1322,w:49,h:77}},{glyph:105,frame:{x:2,y:2,w:51,h:75},packed:{x:678,y:1322,w:55,h:79}},{glyph:106,frame:{x:2,y:2,w:50,h:91},packed:{x:1282,y:1222,w:54,h:95}},{glyph:107,frame:{x:2,y:2,w:64,h:73},packed:{x:1251,y:1322,w:68,h:77}},{glyph:108,frame:{x:2,y:2,w:66,h:72},packed:{x:1379,y:1322,w:70,h:76}},{glyph:109,frame:{x:2,y:2,w:107,h:72},packed:{x:0,y:1413,w:111,h:76}},{glyph:110,frame:{x:2,y:2,w:61,h:71},packed:{x:184,y:1413,w:65,h:75}},{glyph:111,frame:{x:2,y:2,w:66,h:107},packed:{x:894,y:791,w:70,h:111}},{glyph:112,frame:{x:2,y:2,w:54,h:71},packed:{x:249,y:1413,w:58,h:75}},{glyph:113,frame:{x:2,y:2,w:42,h:144},packed:{x:241,y:0,w:46,h:148}},{glyph:114,frame:{x:2,y:2,w:14,h:139},packed:{x:857,y:0,w:18,h:143}},{glyph:115,frame:{x:2,y:2,w:42,h:144},packed:{x:287,y:0,w:46,h:148}},{glyph:116,frame:{x:2,y:2,w:78,h:27},packed:{x:0,y:1489,w:82,h:31}},{glyph:118,frame:{x:2,y:2,w:23,h:102},packed:{x:358,y:1014,w:27,h:106}},{glyph:119,frame:{x:2,y:2,w:61,h:112},packed:{x:58,y:675,w:65,h:116}},{glyph:120,frame:{x:2,y:2,w:56,h:91},packed:{x:1336,y:1222,w:60,h:95}},{glyph:121,frame:{x:2,y:2,w:66,h:66},packed:{x:457,y:1413,w:70,h:70}},{glyph:122,frame:{x:2,y:2,w:79,h:90},packed:{x:1396,y:1222,w:83,h:94}},{glyph:123,frame:{x:2,y:2,w:14,h:138},packed:{x:946,y:0,w:18,h:142}},{glyph:124,frame:{x:2,y:2,w:66,h:142},packed:{x:524,y:0,w:70,h:146}},{glyph:125,frame:{x:2,y:2,w:51,h:20},packed:{x:134,y:1489,w:55,h:24}},{glyph:126,frame:{x:2,y:2,w:97,h:97},packed:{x:1376,y:1014,w:101,h:101}},{glyph:127,frame:{x:2,y:2,w:51,h:61},packed:{x:1033,y:1413,w:55,h:65}},{glyph:128,frame:{x:2,y:2,w:77,h:63},packed:{x:732,y:1413,w:81,h:67}},{glyph:129,frame:{x:2,y:2,w:75,h:40},packed:{x:1420,y:1413,w:79,h:44}},{glyph:131,frame:{x:2,y:2,w:97,h:97},packed:{x:0,y:1121,w:101,h:101}},{glyph:132,frame:{x:2,y:2,w:39,h:14},packed:{x:189,y:1489,w:43,h:18}},{glyph:133,frame:{x:2,y:2,w:47,h:49},packed:{x:1205,y:1413,w:51,h:53}},{glyph:134,frame:{x:2,y:2,w:69,h:77},packed:{x:359,y:1322,w:73,h:81}},{glyph:135,frame:{x:2,y:2,w:49,h:64},packed:{x:644,y:1413,w:53,h:68}},{glyph:136,frame:{x:2,y:2,w:49,h:66},packed:{x:527,y:1413,w:53,h:70}},{glyph:137,frame:{x:2,y:2,w:34,h:28},packed:{x:1458,y:1121,w:38,h:32}},{glyph:138,frame:{x:2,y:2,w:64,h:105},packed:{x:277,y:904,w:68,h:109}},{glyph:139,frame:{x:2,y:2,w:69,h:96},packed:{x:71,y:1222,w:73,h:100}},{glyph:140,frame:{x:2,y:2,w:22,h:23},packed:{x:108,y:1489,w:26,h:27}},{glyph:141,frame:{x:2,y:2,w:32,h:33},packed:{x:1449,y:1322,w:36,h:37}},{glyph:142,frame:{x:2,y:2,w:31,h:64},packed:{x:697,y:1413,w:35,h:68}},{glyph:143,frame:{x:2,y:2,w:54,h:61},packed:{x:1088,y:1413,w:58,h:65}},{glyph:144,frame:{x:2,y:2,w:78,h:63},packed:{x:813,y:1413,w:82,h:67}},{glyph:145,frame:{x:2,y:2,w:121,h:105},packed:{x:345,y:904,w:125,h:109}},{glyph:146,frame:{x:2,y:2,w:122,h:105},packed:{x:470,y:904,w:126,h:109}},{glyph:147,frame:{x:2,y:2,w:134,h:105},packed:{x:596,y:904,w:138,h:109}},{glyph:148,frame:{x:2,y:2,w:59,h:103},packed:{x:1381,y:904,w:63,h:107}},{glyph:149,frame:{x:2,y:2,w:88,h:125},packed:{x:1235,y:287,w:92,h:129}},{glyph:150,frame:{x:2,y:2,w:88,h:125},packed:{x:1327,y:287,w:92,h:129}},{glyph:151,frame:{x:2,y:2,w:88,h:124},packed:{x:1111,y:418,w:92,h:128}},{glyph:152,frame:{x:2,y:2,w:88,h:125},packed:{x:0,y:418,w:92,h:129}},{glyph:153,frame:{x:2,y:2,w:88,h:124},packed:{x:1203,y:418,w:92,h:128}},{glyph:154,frame:{x:2,y:2,w:88,h:124},packed:{x:1295,y:418,w:92,h:128}},{glyph:155,frame:{x:2,y:2,w:105,h:96},packed:{x:144,y:1222,w:109,h:100}},{glyph:156,frame:{x:2,y:2,w:77,h:128},packed:{x:235,y:151,w:81,h:132}},{glyph:157,frame:{x:2,y:2,w:63,h:125},packed:{x:92,y:418,w:67,h:129}},{glyph:158,frame:{x:2,y:2,w:63,h:125},packed:{x:159,y:418,w:67,h:129}},{glyph:159,frame:{x:2,y:2,w:63,h:124},packed:{x:1387,y:418,w:67,h:128}},{glyph:160,frame:{x:2,y:2,w:63,h:124},packed:{x:1419,y:287,w:67,h:128}},{glyph:161,frame:{x:2,y:2,w:35,h:125},packed:{x:226,y:418,w:39,h:129}},{glyph:162,frame:{x:2,y:2,w:36,h:125},packed:{x:265,y:418,w:40,h:129}},{glyph:163,frame:{x:2,y:2,w:45,h:124},packed:{x:1449,y:151,w:49,h:128}},{glyph:164,frame:{x:2,y:2,w:51,h:124},packed:{x:1443,y:0,w:55,h:128}},{glyph:165,frame:{x:2,y:2,w:87,h:96},packed:{x:253,y:1222,w:91,h:100}},{glyph:166,frame:{x:2,y:2,w:77,h:125},packed:{x:305,y:418,w:81,h:129}},{glyph:167,frame:{x:2,y:2,w:93,h:127},packed:{x:444,y:151,w:97,h:131}},{glyph:168,frame:{x:2,y:2,w:93,h:127},packed:{x:541,y:151,w:97,h:131}},{glyph:169,frame:{x:2,y:2,w:93,h:126},packed:{x:391,y:287,w:97,h:130}},{glyph:170,frame:{x:2,y:2,w:93,h:127},packed:{x:638,y:151,w:97,h:131}},{glyph:171,frame:{x:2,y:2,w:93,h:126},packed:{x:488,y:287,w:97,h:130}},{glyph:172,frame:{x:2,y:2,w:55,h:55},packed:{x:1146,y:1413,w:59,h:59}},{glyph:173,frame:{x:2,y:2,w:93,h:108},packed:{x:681,y:791,w:97,h:112}},{glyph:174,frame:{x:2,y:2,w:77,h:127},packed:{x:735,y:151,w:81,h:131}},{glyph:175,frame:{x:2,y:2,w:77,h:127},packed:{x:816,y:151,w:81,h:131}},{glyph:176,frame:{x:2,y:2,w:77,h:126},packed:{x:585,y:287,w:81,h:130}},{glyph:177,frame:{x:2,y:2,w:77,h:126},packed:{x:666,y:287,w:81,h:130}},{glyph:178,frame:{x:2,y:2,w:84,h:125},packed:{x:386,y:418,w:88,h:129}},{glyph:179,frame:{x:2,y:2,w:68,h:96},packed:{x:344,y:1222,w:72,h:100}},{glyph:180,frame:{x:2,y:2,w:77,h:114},packed:{x:843,y:547,w:81,h:118}},{glyph:181,frame:{x:2,y:2,w:63,h:110},packed:{x:550,y:675,w:67,h:114}},{glyph:182,frame:{x:2,y:2,w:63,h:110},packed:{x:617,y:675,w:67,h:114}},{glyph:183,frame:{x:2,y:2,w:63,h:109},packed:{x:0,y:791,w:67,h:113}},{glyph:184,frame:{x:2,y:2,w:63,h:106},packed:{x:1179,y:791,w:67,h:110}},{glyph:185,frame:{x:2,y:2,w:63,h:104},packed:{x:734,y:904,w:67,h:108}},{glyph:186,frame:{x:2,y:2,w:63,h:115},packed:{x:776,y:547,w:67,h:119}},{glyph:187,frame:{x:2,y:2,w:104,h:75},packed:{x:733,y:1322,w:108,h:79}},{glyph:188,frame:{x:2,y:2,w:61,h:103},packed:{x:0,y:1014,w:65,h:107}},{glyph:189,frame:{x:2,y:2,w:61,h:110},packed:{x:684,y:675,w:65,h:114}},{glyph:190,frame:{x:2,y:2,w:61,h:110},packed:{x:749,y:675,w:65,h:114}},{glyph:191,frame:{x:2,y:2,w:61,h:109},packed:{x:67,y:791,w:65,h:113}},{glyph:192,frame:{x:2,y:2,w:61,h:104},packed:{x:801,y:904,w:65,h:108}},{glyph:193,frame:{x:2,y:2,w:42,h:110},packed:{x:814,y:675,w:46,h:114}},{glyph:194,frame:{x:2,y:2,w:33,h:110},packed:{x:860,y:675,w:37,h:114}},{glyph:195,frame:{x:2,y:2,w:44,h:109},packed:{x:132,y:791,w:48,h:113}},{glyph:196,frame:{x:2,y:2,w:51,h:104},packed:{x:866,y:904,w:55,h:108}},{glyph:197,frame:{x:2,y:2,w:71,h:120},packed:{x:599,y:547,w:75,h:124}},{glyph:198,frame:{x:2,y:2,w:63,h:104},packed:{x:921,y:904,w:67,h:108}},{glyph:199,frame:{x:2,y:2,w:71,h:110},packed:{x:897,y:675,w:75,h:114}},{glyph:200,frame:{x:2,y:2,w:71,h:110},packed:{x:972,y:675,w:75,h:114}},{glyph:201,frame:{x:2,y:2,w:71,h:109},packed:{x:180,y:791,w:75,h:113}},{glyph:202,frame:{x:2,y:2,w:71,h:106},packed:{x:1246,y:791,w:75,h:110}},{glyph:203,frame:{x:2,y:2,w:71,h:104},packed:{x:988,y:904,w:75,h:108}},{glyph:204,frame:{x:2,y:2,w:69,h:72},packed:{x:111,y:1413,w:73,h:76}},{glyph:205,frame:{x:2,y:2,w:71,h:85},packed:{x:81,y:1322,w:75,h:89}},{glyph:206,frame:{x:2,y:2,w:64,h:110},packed:{x:1047,y:675,w:68,h:114}},{glyph:207,frame:{x:2,y:2,w:64,h:110},packed:{x:1115,y:675,w:68,h:114}},{glyph:208,frame:{x:2,y:2,w:64,h:109},packed:{x:255,y:791,w:68,h:113}},{glyph:209,frame:{x:2,y:2,w:64,h:104},packed:{x:1063,y:904,w:68,h:108}},{glyph:210,frame:{x:2,y:2,w:66,h:144},packed:{x:333,y:0,w:70,h:148}},{glyph:211,frame:{x:2,y:2,w:67,h:147},packed:{x:0,y:0,w:71,h:151}},{glyph:212,frame:{x:2,y:2,w:66,h:138},packed:{x:964,y:0,w:70,h:142}},{glyph:213,frame:{x:2,y:2,w:88,h:121},packed:{x:327,y:547,w:92,h:125}},{glyph:214,frame:{x:2,y:2,w:63,h:101},packed:{x:385,y:1014,w:67,h:105}},{glyph:215,frame:{x:2,y:2,w:88,h:125},packed:{x:474,y:418,w:92,h:129}},{glyph:216,frame:{x:2,y:2,w:63,h:106},packed:{x:1321,y:791,w:67,h:110}},{glyph:217,frame:{x:2,y:2,w:91,h:126},packed:{x:747,y:287,w:95,h:130}},{glyph:218,frame:{x:2,y:2,w:64,h:103},packed:{x:65,y:1014,w:68,h:107}},{glyph:219,frame:{x:2,y:2,w:77,h:127},packed:{x:897,y:151,w:81,h:131}},{glyph:220,frame:{x:2,y:2,w:61,h:112},packed:{x:123,y:675,w:65,h:116}},{glyph:221,frame:{x:2,y:2,w:77,h:126},packed:{x:842,y:287,w:81,h:130}},{glyph:222,frame:{x:2,y:2,w:61,h:111},packed:{x:342,y:675,w:65,h:115}},{glyph:223,frame:{x:2,y:2,w:77,h:127},packed:{x:978,y:151,w:81,h:131}},{glyph:224,frame:{x:2,y:2,w:61,h:106},packed:{x:1388,y:791,w:65,h:110}},{glyph:225,frame:{x:2,y:2,w:77,h:127},packed:{x:1059,y:151,w:81,h:131}},{glyph:226,frame:{x:2,y:2,w:61,h:111},packed:{x:407,y:675,w:65,h:115}},{glyph:227,frame:{x:2,y:2,w:76,h:125},packed:{x:566,y:418,w:80,h:129}},{glyph:228,frame:{x:2,y:2,w:95,h:114},packed:{x:924,y:547,w:99,h:118}},{glyph:229,frame:{x:2,y:2,w:87,h:96},packed:{x:416,y:1222,w:91,h:100}},{glyph:230,frame:{x:2,y:2,w:78,h:113},packed:{x:1315,y:547,w:82,h:117}},{glyph:231,frame:{x:2,y:2,w:63,h:121},packed:{x:419,y:547,w:67,h:125}},{glyph:232,frame:{x:2,y:2,w:61,h:101},packed:{x:452,y:1014,w:65,h:105}},{glyph:233,frame:{x:2,y:2,w:63,h:125},packed:{x:646,y:418,w:67,h:129}},{glyph:234,frame:{x:2,y:2,w:61,h:106},packed:{x:0,y:904,w:65,h:110}},{glyph:235,frame:{x:2,y:2,w:63,h:125},packed:{x:713,y:418,w:67,h:129}},{glyph:236,frame:{x:2,y:2,w:61,h:104},packed:{x:1131,y:904,w:65,h:108}},{glyph:237,frame:{x:2,y:2,w:63,h:126},packed:{x:923,y:287,w:67,h:130}},{glyph:238,frame:{x:2,y:2,w:61,h:103},packed:{x:133,y:1014,w:65,h:107}},{glyph:239,frame:{x:2,y:2,w:63,h:125},packed:{x:780,y:418,w:67,h:129}},{glyph:240,frame:{x:2,y:2,w:61,h:109},packed:{x:323,y:791,w:65,h:113}},{glyph:241,frame:{x:2,y:2,w:82,h:126},packed:{x:990,y:287,w:86,h:130}},{glyph:242,frame:{x:2,y:2,w:66,h:143},packed:{x:403,y:0,w:70,h:147}},{glyph:243,frame:{x:2,y:2,w:82,h:127},packed:{x:1140,y:151,w:86,h:131}},{glyph:244,frame:{x:2,y:2,w:66,h:140},packed:{x:747,y:0,w:70,h:144}},{glyph:245,frame:{x:2,y:2,w:82,h:127},packed:{x:1226,y:151,w:86,h:131}},{glyph:246,frame:{x:2,y:2,w:66,h:138},packed:{x:1034,y:0,w:70,h:142}},{glyph:247,frame:{x:2,y:2,w:82,h:134},packed:{x:1104,y:0,w:86,h:138}},{glyph:248,frame:{x:2,y:2,w:66,h:146},packed:{x:171,y:0,w:70,h:150}},{glyph:249,frame:{x:2,y:2,w:79,h:124},packed:{x:0,y:547,w:83,h:128}},{glyph:250,frame:{x:2,y:2,w:62,h:124},packed:{x:83,y:547,w:66,h:128}},{glyph:251,frame:{x:2,y:2,w:95,h:96},packed:{x:507,y:1222,w:99,h:100}},{glyph:252,frame:{x:2,y:2,w:74,h:111},packed:{x:472,y:675,w:78,h:115}},{glyph:253,frame:{x:2,y:2,w:49,h:125},packed:{x:847,y:418,w:53,h:129}},{glyph:254,frame:{x:2,y:2,w:49,h:106},packed:{x:65,y:904,w:53,h:110}},{glyph:255,frame:{x:2,y:2,w:39,h:121},packed:{x:486,y:547,w:43,h:125}},{glyph:256,frame:{x:2,y:2,w:40,h:101},packed:{x:517,y:1014,w:44,h:105}},{glyph:257,frame:{x:2,y:2,w:43,h:125},packed:{x:900,y:418,w:47,h:129}},{glyph:258,frame:{x:2,y:2,w:44,h:106},packed:{x:118,y:904,w:48,h:110}},{glyph:259,frame:{x:2,y:2,w:29,h:126},packed:{x:1076,y:287,w:33,h:130}},{glyph:260,frame:{x:2,y:2,w:32,h:133},packed:{x:1190,y:0,w:36,h:137}},{glyph:261,frame:{x:2,y:2,w:21,h:125},packed:{x:947,y:418,w:25,h:129}},{glyph:262,frame:{x:2,y:2,w:29,h:73},packed:{x:1319,y:1322,w:33,h:77}},{glyph:263,frame:{x:2,y:2,w:72,h:98},packed:{x:1300,y:1014,w:76,h:102}},{glyph:264,frame:{x:2,y:2,w:67,h:139},packed:{x:875,y:0,w:71,h:143}},{glyph:265,frame:{x:2,y:2,w:55,h:126},packed:{x:1109,y:287,w:59,h:130}},{glyph:266,frame:{x:2,y:2,w:47,h:143},packed:{x:473,y:0,w:51,h:147}},{glyph:267,frame:{x:2,y:2,w:74,h:133},packed:{x:1226,y:0,w:78,h:137}},{glyph:268,frame:{x:2,y:2,w:62,h:147},packed:{x:71,y:0,w:66,h:151}},{glyph:269,frame:{x:2,y:2,w:62,h:75},packed:{x:841,y:1322,w:66,h:79}},{glyph:270,frame:{x:2,y:2,w:54,h:125},packed:{x:972,y:418,w:58,h:129}},{glyph:271,frame:{x:2,y:2,w:36,h:127},packed:{x:1312,y:151,w:40,h:131}},{glyph:272,frame:{x:2,y:2,w:54,h:132},packed:{x:1304,y:0,w:58,h:136}},{glyph:273,frame:{x:2,y:2,w:30,h:147},packed:{x:137,y:0,w:34,h:151}},{glyph:274,frame:{x:2,y:2,w:54,h:97},packed:{x:101,y:1121,w:58,h:101}},{glyph:275,frame:{x:2,y:2,w:43,h:114},packed:{x:1023,y:547,w:47,h:118}},{glyph:276,frame:{x:2,y:2,w:55,h:96},packed:{x:606,y:1222,w:59,h:100}},{glyph:277,frame:{x:2,y:2,w:56,h:113},packed:{x:1397,y:547,w:60,h:117}},{glyph:278,frame:{x:2,y:2,w:64,h:96},packed:{x:665,y:1222,w:68,h:100}},{glyph:279,frame:{x:2,y:2,w:41,h:113},packed:{x:1454,y:418,w:45,h:117}},{glyph:280,frame:{x:2,y:2,w:77,h:125},packed:{x:1030,y:418,w:81,h:129}},{glyph:281,frame:{x:2,y:2,w:63,h:108},packed:{x:778,y:791,w:67,h:112}},{glyph:282,frame:{x:2,y:2,w:77,h:132},packed:{x:1362,y:0,w:81,h:136}},{glyph:283,frame:{x:2,y:2,w:63,h:109},packed:{x:388,y:791,w:67,h:113}},{glyph:284,frame:{x:2,y:2,w:77,h:124},packed:{x:149,y:547,w:81,h:128}},{glyph:285,frame:{x:2,y:2,w:63,h:107},packed:{x:964,y:791,w:67,h:111}},{glyph:286,frame:{x:2,y:2,w:77,h:132},packed:{x:0,y:151,w:81,h:136}},{glyph:287,frame:{x:2,y:2,w:63,h:109},packed:{x:455,y:791,w:67,h:113}},{glyph:288,frame:{x:2,y:2,w:93,h:123},packed:{x:230,y:547,w:97,h:127}},{glyph:289,frame:{x:2,y:2,w:71,h:101},packed:{x:561,y:1014,w:75,h:105}},{glyph:290,frame:{x:2,y:2,w:93,h:127},packed:{x:1352,y:151,w:97,h:131}},{glyph:291,frame:{x:2,y:2,w:71,h:106},packed:{x:166,y:904,w:75,h:110}},{glyph:292,frame:{x:2,y:2,w:93,h:127},packed:{x:0,y:287,w:97,h:131}},{glyph:293,frame:{x:2,y:2,w:73,h:110},packed:{x:1183,y:675,w:77,h:114}},{glyph:294,frame:{x:2,y:2,w:123,h:100},packed:{x:967,y:1014,w:127,h:104}},{glyph:295,frame:{x:2,y:2,w:114,h:75},packed:{x:907,y:1322,w:118,h:79}},{glyph:296,frame:{x:2,y:2,w:76,h:127},packed:{x:97,y:287,w:80,h:131}},{glyph:297,frame:{x:2,y:2,w:45,h:108},packed:{x:845,y:791,w:49,h:112}},{glyph:298,frame:{x:2,y:2,w:76,h:132},packed:{x:81,y:151,w:80,h:136}},{glyph:299,frame:{x:2,y:2,w:45,h:109},packed:{x:522,y:791,w:49,h:113}},{glyph:300,frame:{x:2,y:2,w:76,h:127},packed:{x:177,y:287,w:80,h:131}},{glyph:301,frame:{x:2,y:2,w:46,h:107},packed:{x:1031,y:791,w:50,h:111}},{glyph:302,frame:{x:2,y:2,w:63,h:127},packed:{x:257,y:287,w:67,h:131}},{glyph:303,frame:{x:2,y:2,w:51,h:110},packed:{x:1260,y:675,w:55,h:114}},{glyph:304,frame:{x:2,y:2,w:63,h:126},packed:{x:1168,y:287,w:67,h:130}},{glyph:305,frame:{x:2,y:2,w:51,h:109},packed:{x:571,y:791,w:55,h:113}},{glyph:306,frame:{x:2,y:2,w:63,h:128},packed:{x:316,y:151,w:67,h:132}},{glyph:307,frame:{x:2,y:2,w:51,h:103},packed:{x:198,y:1014,w:55,h:107}},{glyph:308,frame:{x:2,y:2,w:63,h:127},packed:{x:324,y:287,w:67,h:131}},{glyph:309,frame:{x:2,y:2,w:51,h:109},packed:{x:626,y:791,w:55,h:113}},{glyph:310,frame:{x:2,y:2,w:70,h:132},packed:{x:161,y:151,w:74,h:136}}],Hs={kernings:Ls,meta:Is,chars:$s,glyphs:Bs,colors:js};function pa(t){return new Promise(a=>{let e=new Image;e.onload=()=>a(e),e.src=t})}const ot=class ot{constructor(){o(this,"load",async()=>{let[a,e]=await Promise.all([pa(Os),pa(Ps)]),s=Me.from_image(a);this.sprites=[],this.nine_slice=[],Ns.sprites.forEach(h=>{let{name:r,packs:l,tags:p}=h;if(r.match(/nine_slice/)){this.nine_slice.push(ot.make_nine_slice(s,h));return}let d=n.zero,g=[];p.forEach(m=>{let u=[];for(let A=m.from;A<=m.to;A++){let P=l[A],U=P.meta.duration/1e3,bt=x.make(P.frame.x,P.frame.y,P.frame.w,P.frame.h),Et=x.make(P.packed.x,P.packed.y,P.packed.w,P.packed.h),Tt=new ca(je.make(s,Et,bt),U);u.push(Tt)}let k=new Rs(m.name,u);g.push(k)});let f=new Cs(r,d,g);this.sprites.push(f)});let i={...Hs,size:128};this.sp_font=Lt.make(i,e)});o(this,"sp_font");o(this,"sprites");o(this,"nine_slice")}find_sprite(a){return this.sprites.find(e=>e.name===a)}find_nine(a){return this.nine_slice.find(e=>e.name===a)}};o(ot,"make_nine_slice",(a,e)=>{let{name:s,packs:i,_tags:h}=e,r=[];for(let l=0;l<3;l++)for(let p=0;p<3;p++){let d=i[0],g=1,f=l*d.frame.w/3,m=p*d.frame.h/3,u=x.make(d.frame.x,d.frame.y,d.frame.w/3,d.frame.h/3),k=x.make(f+d.packed.x,m+d.packed.y,4+400/3,4+400/3),A=new ca(je.make(a,k,u),g);r.push(A)}return new Us(s,r)});let It=ot;const Se=new It;function Xs(t){var a;return t.clientX!==void 0&&t.clientY!==void 0?[t.clientX,t.clientY]:(a=t.targetTouches)!=null&&a[0]?[t.targetTouches[0].clientX,t.targetTouches[0].clientY]:[0,0]}class Va{}o(Va,"init",(a,e=document)=>{const s=k=>{let A=Xs(k);return A?n.make(A[0],A[1]):n.zero};let{_onDragStart:i,_onDragMove:h,_onDragEnd:r,_onContextMenu:l,_onWheel:p}=a;const d=k=>{var A;k.preventDefault(),!(((A=k.touches)==null?void 0:A.length)>1)&&(i==null||i(s(k),k.buttons===2||k.button===2))},g=k=>{h==null||h(s(k))},f=k=>{r==null||r(s(k))},m=k=>{l&&(k.preventDefault(),l())},u=k=>{p&&(p(Math.sign(k.deltaY),s(k)),k.preventDefault())};return e.addEventListener("wheel",u,{passive:!1}),e.addEventListener("touchstart",d,{capture:!0,passive:!1}),e.addEventListener("mousedown",d,{capture:!0,passive:!1}),e.addEventListener("contextmenu",m),document.addEventListener("mousemove",g),document.addEventListener("mouseup",f),document.addEventListener("touchmove",g),document.addEventListener("touchend",f),()=>{e.removeEventListener("wheel",u),e.removeEventListener("touchstart",d),e.removeEventListener("mousedown",d),e.removeEventListener("contextmenu",m),document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",f),document.removeEventListener("touchmove",g),document.removeEventListener("touchend",f)}});class Vs{constructor(){o(this,"_on_update");o(this,"_hooks",[])}register(a){return this._hooks.push(a),()=>{this._hooks.splice(this._hooks.indexOf(a),1)}}get hooks(){return this._hooks}_sort_hooks(){this._hooks.sort((a,e)=>(e.priority??0)-(a.priority??0))}_on_hover(a){var i,h;let e=this.hooks,s=e.findIndex(r=>{var l;return(l=r.on_hover)==null?void 0:l.call(r,a)});if(s!==-1)for(let r=s+1;r{var h;return(h=i.on_up)==null?void 0:h.call(i,a,e,s)})}_on_click(a,e){this.hooks.find(s=>{var i;return(i=s.on_click)==null?void 0:i.call(s,a,e)})}_on_click_begin(a,e){this.hooks.find(s=>{var i;return(i=s.on_click_begin)==null?void 0:i.call(s,a,e)})}_on_drag(a,e){this.hooks.find(s=>{var i;return(i=s.on_drag)==null?void 0:i.call(s,a,e)})}_on_context(){this.hooks.find(a=>{var e;return(e=a.on_context)==null?void 0:e.call(a)})}_on_wheel(a,e){this.hooks.find(s=>{var i;return(i=s.on_wheel)==null?void 0:i.call(s,a,e)})}listen(a){let e;const s=()=>{e=a.getBoundingClientRect()};s();const i=g=>{let f=n.make(e.x,e.y),m=n.make(e.width,e.height);return g.sub(f).div(m)};let h=g=>g&&{...g},r,l,p,d=this;Va.init({_onDragStart(g,f){if(f)return;let m=i(g);l=h(r),r={e:m,_right:f},d._on_update=()=>{r?((r.m||p&&r.e.distance(p)>16/1080)&&(r.m=p),d._on_drag(r,l),l=h(r)):d._on_update=void 0},d._on_click_begin(m,f)},_onDragMove(g){let f=i(g);p=f,r||d._on_hover(f)},_onDragEnd(){r&&(r.m||d._on_click(r.e,r._right),d._on_up(r.e,r._right,r.m),d._on_update=void 0,r=void 0,p=void 0)},_onWheel(g,f){var m;(m=d._on_wheel)==null||m.call(d,g,i(f))},_onContextMenu(){}},a),document.addEventListener("scroll",()=>{s()},{capture:!0,passive:!0}),window.addEventListener("resize",()=>{s()},{passive:!0})}update(){var a;(a=this._on_update)==null||a.call(this)}}const ht=new Vs;var qs=`#version 300 es uniform mat4 u_matrix; layout(location=0) in vec2 a_position; layout(location=1) in vec2 a_tex; @@ -95,7 +95,7 @@ void main(void) { vec4 color = texture(u_texture, v_tex); o_color = color; -}`;let St;const ga=new Vt([ne.make(0,O.Float2,!1),ne.make(1,O.Float2,!1)]),ui="u_texture",xi="u_matrix";let Y=x.make(0,0,1,1);const wi=Y.x,ki=Y.y,vi=Y.x+Y.w,bi=Y.y,Ei=Y.x+Y.w,Ti=Y.x+Y.h,Ai=Y.x,Mi=Y.x+Y.h,[Si,zi,Fi,Ri,Ci,Ui,Oi,Di]=[0,0,1,0,1,1,0,1];class Ni{constructor(){o(this,"texture");o(this,"mesh");o(this,"material");o(this,"indices",[0,1,2,0,2,3]);o(this,"vertices",[]);o(this,"matrix");o(this,"sampler",ye.get_default)}set_matrix(a){this.matrix=a,this.vertices=[],this.PUSH_VERTEX(wi,ki,Si,zi),this.PUSH_VERTEX(vi,bi,Fi,Ri),this.PUSH_VERTEX(Ei,Ti,Ci,Ui),this.PUSH_VERTEX(Ai,Mi,Oi,Di)}PUSH_VERTEX(a,e,s,i){let h=this.matrix;this.vertices.push(new Pi(n.make(a*h.m11+e*h.m21+h.m31,a*h.m12+e*h.m22+h.m32),n.make(s,1-i)))}render(a=c.backbuffer){this.render_with_m(a,ie.create_ortho_offcenter(0,a.width,a.height,0,.01,1e3))}render_with_m(a,e){St||(St=qe.create([mi,yi])),this.mesh||(this.mesh=Ve.create()),this.material||(this.material=gt.create(St));let s=ga.stride,i=new ArrayBuffer(s*this.vertices.length),h=new DataView(i);this.vertices.reduce((l,p)=>p.push_to(h,l),0),this.mesh.index_data(this.indices),this.mesh.vertex_data(ga,i);let r=new Kt;r.target=a,r.mesh=this.mesh,r.has_viewport=!1,r.viewport=x.make(0,0,0,0),r.instance_count=0,r.material=this.material,r.material.set_texture(ui,this.texture),r.material.set_sampler_at_location(0,this.sampler),r.material.set_matrix(xi,e),r.index_start=0,r.index_count=this.indices.length,r.perform()}}class Pi{constructor(a,e){this.pos=a,this.tex=e}push_to(a,e){let{pos:s,tex:i}=this;return a.setFloat32(e+0,s.x,!0),a.setFloat32(e+4,s.y,!0),a.setFloat32(e+8,i.x,!0),a.setFloat32(e+12,i.y,!0),e+16}}const zt=new Ni;function Li(t,a,e){return a+(e-a)*t}function he(t,a,e){return t+(a-t)*e}function $t(t,a,e){return t=e.length-1&&(this.loop===1?(this._i=0,this._values.reverse(),this._durations.reverse()):this._completed=!0))}init(){return this._i=0,this._t=0,this._completed=!1,this._value=this._values[0],this}};o(lt,"make",(a,e,s=!1)=>new lt(a.slice(0),[e],s?1:0).init());let Bt=lt;y.hex(2106417);const Bi=y.hex(4895437),_t=class _t{constructor(){o(this,"_render_order",0);o(this,"visible",!0);o(this,"g_position");o(this,"position");o(this,"rotation");o(this,"origin",n.zero);o(this,"scale",n.one);o(this,"coroutines",[]);o(this,"_data");o(this,"_disposes");o(this,"objects");o(this,"parent");o(this,"g_scissor");o(this,"_tweens",[]);o(this,"_tween")}routine(a){this.coroutines.push(a)}*wait_for(a){let e=0;for(;ee[0]!==a)}tween_single(a,e,s,i,h=0,r){return a&&this.cancel(a),this.tween(e,s,i,h,r)}make(a,e,s){let i=this._make(a,e,s);return this._add_object(i),i}init(){return this._disposes=[],this.objects=[],this._init(),this}update(){this.coroutines=this.coroutines.filter(a=>!a.next().done),this.objects.forEach(a=>a.update()),this._tweens=this._tweens.filter(([a,e,s])=>(a.update(b.delta),e(a.value),a.completed&&s&&s(),!a.completed)),this._update()}draw(a){this.visible&&(this._render_order=_t.next_render_order++,this._draw(a))}_draw_children(a){this.objects.forEach(e=>e.draw(a))}dispose(){this.objects.slice(0).forEach(a=>a.dispose()),this._dispose(),this._disposes.forEach(a=>a()),this.parent&&this.parent.objects.splice(this.parent.objects.indexOf(this),1)}_init(){}_update(){}_draw(a){a.push_matrix(v.create_transform(this.position,this.origin,this.scale,this.rotation)),this.g_position=n.transform(n.zero,a.m_matrix),this._draw_children(a),a.pop_matrix()}_dispose(){}};o(_t,"next_render_order",0);let w=_t;class Ke extends w{get data(){return this._data}get nine(){return Se.find_nine(this.data.name)}_draw(a){let{frames:e}=this.nine,s=400/3,i=(this.data.h-s*2)/s,h=(this.data.w-s*2)/s;a.push_matrix(v.create_transform(this.position,n.zero,n.one,0)),this.g_position=n.transform(n.zero,a.m_matrix),a.stex(e[0].image,n.make(0,0),y.white),a.stex_o(e[1].image,n.make(0,s),n.zero,n.make(1,i),0,y.white),a.stex(e[2].image,n.make(0,s+i*s),y.white),a.stex_o(e[3].image,n.make(s,0),n.zero,n.make(h,1),0,y.white),a.stex_o(e[4].image,n.make(s,s),n.zero,n.make(h,i),0,y.white),a.stex_o(e[5].image,n.make(s,s+i*s),n.zero,n.make(h,1),0,y.white),a.stex(e[6].image,n.make(s+h*s,0),y.white),a.stex_o(e[7].image,n.make(s+h*s,s),n.zero,n.make(1,i),0,y.white),a.stex(e[8].image,n.make(s+h*s,s+i*s),y.white),a.pop_matrix()}}class R extends w{constructor(){super(...arguments);o(this,"alpha",255);o(this,"_animation","idle");o(this,"_frame_counter",0);o(this,"_frame",0);o(this,"_loop",!1);o(this,"_reverse",!1);o(this,"_on_complete");o(this,"will_play")}get data(){return this._data}get sprite(){return Se.find_sprite(this.data.name)}get alpha_color(){return new y(this.alpha,this.alpha,this.alpha,this.alpha)}get animation(){return this.sprite.get(this._animation)}get frame(){var e;return(e=this.animation)==null?void 0:e.frames[this._frame]}get subtexture(){var e;return(e=this.frame)==null?void 0:e.image}get duration(){var e;return(e=this.frame)==null?void 0:e.duration}play_now(e,s,i=!1){var h;if(this._on_complete=s,this._animation=e,this._frame=0,i){let r=((h=this.animation)==null?void 0:h.frames.length)||0;this._frame=r-1}this._reverse=i}play(e,s,i=!1){this.will_play=()=>this.play_now(e,s,i)}play_o(e,s){this._loop=s.loop??!1,this.play_now(e)}_update(){var i,h;const e=(i=this.animation)==null?void 0:i.frames.length,s=(h=this.frame)==null?void 0:h.duration;e&&s&&(this._frame_counter+=b.delta,this._frame_counter>=s&&(this._frame_counter-=s,this._reverse?(this._frame--,this._frame<0&&(this._loop?this._frame=e-1:this._frame=0,this._on_complete&&this._on_complete(),this.will_play&&(this.will_play(),this.will_play=void 0))):(this._frame++,this._frame>=e&&(this._loop?this._frame=0:this._frame=e-1,this._on_complete&&this._on_complete(),this.will_play&&(this.will_play(),this.will_play=void 0)))))}_draw(e){this.subtexture&&(e.push_matrix(v.create_transform(this.position,this.origin,this.scale,this.rotation)),this.g_position=n.transform(n.zero,e.m_matrix),e.stex(this.subtexture,n.zero,this.alpha_color),e.pop_matrix())}}const ji=t=>t!==void 0,Hi=t=>{const a={get:e=>t.getItem(e),set:(e,s)=>t.setItem(e,s),remove:e=>t.removeItem(e),make:e=>({get:()=>a.get(e),set:s=>a.set(e,s),remove:()=>a.remove(e)}),makeBoolean:e=>({get:()=>a.get(e)=="1",set:s=>a.set(e,s?"1":"0"),toggle:()=>a.set(e,a.get(e)=="1"?"0":"1")})};return a},ma=Hi(window.localStorage),be=(t,a)=>e=>{if(ji(e))return ma.set(t,JSON.stringify(e)),e;const s=JSON.parse(ma.get(t));return s!==null?s:a()},ya={threecards:1,onecard:1.5,nolimit:1,threepass:1.5,onepass:2.2},le=class le{constructor(a,e,s,i){this.win=a,this.score=e,this.turning_cards=s,this.turning_limit=i}get turning_cards_multiplier(){return ya[this.turning_cards]}get turning_limit_multiplier(){return ya[this.turning_limit]}get multiplied_score(){return this.score*(this.turning_cards_multiplier+this.turning_limit_multiplier)}get fen(){return[this.win,this.score,this.turning_cards,this.turning_limit].join("/")}};o(le,"from_fen",a=>{let[e,s,i,h]=a.split("/");return new le(e==="true",parseInt(s),i,h)}),o(le,"from_win",(a,e)=>new le(!0,e,a.cards,a.limit)),o(le,"from_loss",(a,e)=>new le(!1,e,a.cards,a.limit));let He=le;const dt=class dt{constructor(a){this.list=a}get fen(){return this.list.map(a=>a.fen).join("$")}push(a){this.list.push(a)}clear(){this.list.length=0}get total_wins(){return this.list.filter(a=>a.win).length}get total_played(){return this.list.length}get top_5_highscores(){return this.list.sort((a,e)=>e.multiplied_score-a.multiplied_score).slice(0,5)}};o(dt,"from_fen",(a,e)=>new dt(a===""?[]:a.split("$").map(s=>e(s))));let ze=dt;class Xi{constructor(a,e,s){this.solitaire=a,this.freecell=e,this.spider=s}get total_wins(){return this.freecell_total_wins+this.spider_total_wins+this.solitaire_total_wins}get total_played(){return this.freecell_total_played+this.spider_total_played+this.solitaire_total_played}get top_5_highscores(){return[...this.freecell_top_5_highscores,...this.spider_top_5_highscores,...this.solitaire_top_5_highscores].sort((a,e)=>e.multiplied_score-a.multiplied_score).slice(0,5)}get freecell_total_wins(){return this.freecell.total_wins}get freecell_total_played(){return this.freecell.total_played}get freecell_top_5_highscores(){return this.freecell.top_5_highscores}get spider_total_wins(){return this.spider.total_wins}get spider_total_played(){return this.spider.total_played}get spider_top_5_highscores(){return this.spider.top_5_highscores}get solitaire_total_wins(){return this.solitaire.total_wins}get solitaire_total_played(){return this.solitaire.total_played}get solitaire_top_5_highscores(){return this.solitaire.top_5_highscores}}let ua=["nolimit","threepass","onepass"],xa=["threecards","onecard"];class Vi{constructor(){o(this,"_cards");o(this,"_limit");let a="threecards";this._cards=be("cards",()=>a);let e="nolimit";this._limit=be("limit",()=>e)}get cards(){return this._cards()}set cards(a){this._cards(a)}get limit(){return this._limit()}set limit(a){this._limit(a)}get general_settings(){let{limit:a,cards:e}=this;return{limit:a,cards:e}}}class qi{constructor(){o(this,"_music");o(this,"_sound");o(this,"_language");let a="en";this._language=be("language",()=>a),this._sound=be("sound",()=>!0),this._music=be("music",()=>!0)}get music(){return this._music()}set music(a){this._music(a)}get sound(){return this._sound()}set sound(a){this._sound(a)}get language(){return this._language()}set language(a){this._language(a)}}let De=new Vi,ee=new qi;class Ki{constructor(){o(this,"_results");this._results=be("solitaire_results",()=>new ze([]).fen)}set results(a){this._results(a.fen)}get results(){return ze.from_fen(this._results(),He.from_fen)}add_result(a){let e=this.results;e.push(a),this.results=e}clear_results(){let a=this.results;a.clear(),this.results=a}}let mt=new Ki;function wa(t){return new Audio(t)}let Gi=["Win","new_game","auto_flip","drag1","drag2","drag3","cancel","drop","hit","recycle","undo2"];class Wi{constructor(){o(this,"audios");o(this,"musics");o(this,"load",async()=>{this.audios={},Gi.forEach(a=>this.audios[a]=[...Array(4).keys()].map(()=>wa(`./audio/${a}.wav`))),this.musics={},this.musics.main=wa("./music/SoundBox-music.wav")})}play(a){if(!ee.sound)return;let e=this.audios[a],s=e.pop();e.unshift(s),s.play()}stop_music(){this.musics.main.pause()}music(a){if(!ee.music)return;let e=this.musics[a];e.loop=!0,e.play()}}const $=new Wi,oe=1/60,E={seconds:60*oe,half:30*oe,thirds:20*oe,lengths:15*oe,sixth:10*oe,five:5*oe,three:3*oe,one:1*oe},L=n.make(1920,1080),Yi=(t=1)=>()=>{var a=Math.sin(t++)*1e4;return a-Math.floor(a)},ue=Yi();function qa(t,a=ue){return Math.floor(a()*t)}function ka(t=ue){return t()*2-1}function Qi(t,a=ue){return t[qa(t.length,a)]}const N=(t=ue)=>n.make(t(),t()),va=(t=ue)=>n.make(ka(t),ka(t));class Ji extends w{get data(){return this._data}_init(){let a=this.make(R,n.make(0,0),{name:"button_bg"});a.origin=n.make(366,200).scale(1/2),this.make(T,n.make(0,-30),{width:360,height:100,key:this.data.text,center:!0});let e=this;this.make(D,n.make(-366+80,-200+80).scale(1/2),{rect:x.make(0,0,366-80,200-80),on_hover(){a.play_o("hover",{loop:!1})},on_hover_end(){a.play("hover",()=>{a.play("idle")},!0)},on_click_begin(){a.play_o("click",{loop:!1})},on_click(){e.data.on_click()}})}}var Zi=Object.defineProperty,eh=(t,a,e)=>a in t?Zi(t,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[a]=e,M=(t,a,e)=>(eh(t,typeof a!="symbol"?a+"":a,e),e),Yt=["d","c","h","s"],Ka=["A","K","Q","J","T","9","8","7","6","5","4","3","2"],jt=["A","2","3","4","5","6","7","8","9","T","J","Q","K"],th=Yt.flatMap(t=>Ka.map(a=>`${t}${a}`)),ah=t=>{let a=Yt.indexOf(t[0]),e=Ka.indexOf(t[1]);return a*100+e};function ba(t){switch(t[0]){case"d":case"h":return"red";default:return"black"}}function sh(t,a){return jt[jt.indexOf(a[1])-1]===t[1]}function ih(t,a){return ba(t)!=ba(a)}function hh(t){return t[1]==="K"}function rh(t){return t[1]==="A"}var Ga=class{static get deck(){return th.slice(0)}};function nh(t){let a=[];for(let e=0;e=0;a--)this.cards.unshift(t[a])}remove_cards(t){return this.cards.splice(-t)}remove_all(){return this.remove_cards(this.cards.length)}},K=Xe;M(K,"take_n",(t,a)=>new Xe(t.splice(0,a)));M(K,"from_fen",t=>new Xe(nh(t)));var Qt="??",yt=class{constructor(t){this.cards=t}get fen(){return this.cards.join(" ")}get clone(){return new yt(this.cards.slice(0))}get length(){return this.cards.length}get top_card(){return this.cards[this.cards.length-1]}unshift_cards(t){for(let a=t.length-1;a>=0;a--)this.cards.push(t[a])}shift_cards(t){return this.cards.splice(0,t)}add_cards(t){this.cards.push(...t)}remove_cards(t){return this.cards.splice(-t)}remove_all(){return this.remove_cards(this.cards.length)}},rt=yt;M(rt,"from_fen",t=>new yt(t===""?[]:t.split(" ")));M(rt,"backs",t=>new yt([...Array(t).keys()].map(a=>Qt)));var xe=class{constructor(t){o(this,"_data");this.game=t}_set_data(t){return this._data=t,this}},Wa=class{constructor(t,a,e){this.game=t,this.stats=a,this.history=e}get nb_moves(){return this.stats.nb_moves}set nb_moves(t){this.stats.nb_moves=t}get score(){return this.stats.score}set score(t){this.stats.score=t}get pov(){return new Qa(this.game.pov,this.stats,this.history.length)}apply(t,a){let e=new t(this.game)._set_data(a);if(!t.can(this.game.pov,a))return;let s=e.apply();return this.score+=s,this.nb_moves++,this.history.push(e),e}get can_undo(){return this.history.length>0}undo(){if(!this.can_undo)return;let t=this.history.pop(),a=t.undo();return this.score+=a,this.nb_moves++,t}},Ya=Wa;M(Ya,"make",t=>new Wa(t,{score:0,nb_moves:0},[]));var Qa=class{constructor(t,a,e){o(this,"history");this.game=t,this.stats=a,this.history=e}finalize_apply_pov(t){this.game.finalize_apply_pov(t)}get clone(){let t=this.game.clone;return new Qa(t,{...this.stats},this.history)}get nb_moves(){return this.stats.nb_moves}set nb_moves(t){this.stats.nb_moves=t}get score(){return this.stats.score}set score(t){this.stats.score=t}get can_undo(){return this.history>0}apply(t,a){t.apply(this.game,a),this.nb_moves++,this.history++}undo_pov(){this.nb_moves++,this.history--}undo(t){t.undo_pov(this.game)}},B={Recycle:-10,HitStock:0,WasteToTableu:10,WasteToFoundation:30,TableuToFoundation:20,FoundationToTableu:-30,Undo:-80,TableuToTableuFlip:10,TableuToTableuNoFlip:0};function oh(t){let[a,e]=t.split("$");return{cards:a,limit:e}}function lh(t){return[t.cards,t.limit].join("$")}var Jt=class{constructor(t,a,e){this.stock=t,this.waste=a,this.hidden=e}get fen(){return[this.stock.fen,this.waste.fen,this.hidden.fen].join("$")}get pov(){return new es(this.stock.hidden_pov,this.waste,this.hidden.hidden_pov)}get can_hit(){return this.stock.length>0}get can_recycle(){return this.stock.length===0&&this.waste.length+this.hidden.length>0}from_waste(){return{cards:this.waste.remove_cards(1)}}undo_from_waste(t){this.waste.add_cards(t)}hit(t){let a=this.stock.remove_cards(t),e=this.waste.remove_all();return this.hidden.unshift_cards(e),this.waste.add_cards(a),{waste:e,cards:a}}undo_hit(t){let{cards:a,waste:e}=t,s=this.waste.remove_cards(a.length),i=this.hidden.shift_cards(e.length);this.waste.add_cards(i),this.stock.add_cards(s)}recycle(){let t=this.waste.remove_all();return this.hidden.unshift_cards(t),this.stock.add_cards(this.hidden.remove_all()),{waste:t}}undo_recycle(t){let{waste:a}=t;this.hidden.add_cards(this.stock.remove_all());let e=this.hidden.shift_cards(a.length);this.waste.add_cards(e)}},ut=Jt;M(ut,"from_fen",t=>{let[a,e,s]=t.split("$"),i=K.from_fen(a),h=K.from_fen(e),r=K.from_fen(s);return new Jt(i,h,r)});M(ut,"make",t=>new Jt(K.take_n(t,t.length),K.empty,K.empty));var Zt=class{constructor(t,a){this.back=t,this.front=a}get fen(){return[this.back.fen,this.front.fen].join("$")}get pov(){return new ts(this.back.hidden_pov,this.front)}from_tableu(t){let a=this.front.remove_cards(t);if(this.front.length===0){let[e]=this.back.remove_cards(1);return e?(this.front.add_cards([e]),{flip:e,cards:a}):{cards:a}}return{cards:a}}undo_from_tableu(t){if(t.flip){let a=this.front.remove_cards(1);this.back.add_cards(a)}this.front.add_cards(t.cards)}to_tableu(t){this.front.add_cards(t)}undo_to_tableu(t){this.front.remove_cards(t.length)}},xt=Zt;M(xt,"from_fen",t=>{let[a,e]=t.split("$");return new Zt(K.from_fen(a),K.from_fen(e))});M(xt,"make",(t,a)=>new Zt(K.take_n(t,a),K.take_n(t,1)));var wt=class{constructor(t){this.foundation=t}get fen(){return this.foundation.fen}get clone(){return new wt(this.foundation.clone)}get suit(){var t;return(t=this.foundation.top_card)==null?void 0:t[0]}get is_finished(){return this.foundation.length===13}get next_top(){if(!this.suit)return;let t=this.suit,a=jt[this.foundation.length];return`${t}${a}`}get can_from(){let{top_card:t}=this.foundation;if(t)return{cards:[t]}}can_to(t){let[a]=t;return t.length===1&&(this.next_top?a===this.next_top:rh(a))}to_foundation(t){this.foundation.add_cards(t)}undo_to_foundation(t){this.foundation.remove_cards(t.length)}from_foundation(){return{cards:this.foundation.remove_cards(1)}}undo_from_foundation(t){this.foundation.add_cards(t)}},kt=wt;M(kt,"from_fen",t=>{let a=t;return new wt(K.from_fen(a))});M(kt,"make",()=>new wt(K.empty));var st=[...Array(7).keys()],Ea=[...Array(4).keys()],ea=class{constructor(t,a,e,s,i){this.settings=t,this.nb_recycles=a,this.stock=e,this.tableus=s,this.foundations=i}get fen(){let t=lh(this.settings),a=this.stock.fen,e=this.tableus.map(h=>h.fen).join("/"),s=this.foundations.map(h=>h.fen).join("/"),i=this.nb_recycles;return[t,i,a,e,s].join(" ")}get hit_n(){return this.settings.cards==="threecards"?3:1}get pov(){return new as(this.settings,this.nb_recycles,this.stock.pov,this.tableus.map(t=>t.pov),this.foundations)}get recycle_n(){return this.settings.limit==="nolimit"?9999:this.settings.limit==="threepass"?3:1}get can_hit(){return this.stock.can_hit}get can_recycle(){return this.has_recycle_limit&&this.stock.can_recycle}get has_recycle_limit(){return this.recycle_n-this.nb_recycles>0}hit_stock(){return this.stock.hit(this.hit_n)}undo_hit_stock(t){this.stock.undo_hit(t)}recycle(){return this.nb_recycles++,this.stock.recycle()}undo_recycle(t){this.nb_recycles--,this.stock.undo_recycle(t)}tableu_to_tableu(t){let{from:a,to:e,i:s}=t,i=this.tableus[a].from_tableu(s);return this.tableus[e].to_tableu(i.cards),i}undo_tableu_to_tableu(t,a){let{from:e,to:s,i}=t;this.tableus[s].undo_to_tableu(a.cards),this.tableus[e].undo_from_tableu(a)}waste_to_tableu(t){let{to:a}=t,e=this.stock.from_waste();return this.tableus[a].to_tableu(e.cards),e}undo_waste_to_tableu(t,a){let{to:e}=t;this.tableus[e].undo_to_tableu(a.cards),this.stock.undo_from_waste(a.cards)}waste_to_foundation(t){let{to:a}=t,e=this.stock.from_waste();return this.foundations[a].to_foundation(e.cards),e}undo_waste_to_foundation(t,a){let{to:e}=t;this.foundations[e].undo_to_foundation(a.cards),this.stock.undo_from_waste(a.cards)}tableu_to_foundation(t){let{from:a,to:e}=t,s=this.tableus[a].from_tableu(1);return this.foundations[e].to_foundation(s.cards),s}undo_tableu_to_foundation(t,a){let{from:e,to:s}=t;this.foundations[s].undo_to_foundation(a.cards),this.tableus[e].undo_from_tableu(a)}foundation_to_tableu(t){let{from:a,to:e}=t,s=this.foundations[a].from_foundation();return this.tableus[e].to_tableu(s.cards),s}undo_foundation_to_tableu(t,a){let{from:e,to:s}=t;this.tableus[s].undo_to_tableu(a.cards),this.foundations[e].undo_from_foundation(a.cards)}},ta=ea;M(ta,"from_fen",t=>{let[a,e,s,i,h]=t.split(" "),r=oh(a),l=parseInt(e),p=ut.from_fen(s),d=i.split("/").map(f=>xt.from_fen(f)),g=h.split("/").map(f=>kt.from_fen(f));return new ea(r,l,p,d,g)});M(ta,"make",(t,a)=>{let e=st.map(h=>xt.make(a,h)),s=ut.make(a),i=0;return new ea(t,i,s,e,Yt.map(h=>kt.make()))});var Ee=class extends xe{constructor(){super(...arguments);o(this,"data")}get solitaire(){return this.game}apply(){return this.data=this.solitaire.hit_stock(),B.HitStock}undo(){return this.solitaire.undo_hit_stock(this.data),B.Undo}undo_pov(a){a.undo_hit_stock(this.data)}};M(Ee,"can",t=>t.can_hit);M(Ee,"apply",t=>{t.hit_stock()});var Ie=class extends xe{constructor(){super(...arguments);o(this,"data")}get solitaire(){return this.game}apply(){return this.data=this.solitaire.recycle(),B.Recycle}undo(){return this.solitaire.undo_recycle(this.data),B.Undo}undo_pov(a){a.undo_recycle(this.data)}};M(Ie,"can",t=>t.can_recycle);M(Ie,"apply",t=>{t.recycle()});var ce=class extends xe{constructor(){super(...arguments);o(this,"res")}get solitaire(){return this.game}get data(){return this._data}apply(){return this.res=this.solitaire.tableu_to_tableu(this.data),this.res.flip?B.TableuToTableuFlip:B.TableuToTableuNoFlip}undo(){return this.solitaire.undo_tableu_to_tableu(this.data,this.res),B.Undo}undo_pov(a){a.undo_tableu_to_tableu(this.data,this.res)}};M(ce,"can",(t,a)=>{let e=a,s=t.can_drag_tableu(e);return s?t.can_drop_tableu({...a,...s}):!1});M(ce,"apply",(t,a)=>{t.tableu_to_tableu(a)});var pe=class extends xe{constructor(){super(...arguments);o(this,"res")}get solitaire(){return this.game}get data(){return this._data}apply(){return this.res=this.solitaire.waste_to_tableu(this.data),B.WasteToTableu}undo(){return this.solitaire.undo_waste_to_tableu(this.data,this.res),B.Undo}undo_pov(a){a.undo_waste_to_tableu(this.data,this.res)}};M(pe,"can",(t,a)=>{const e=t.can_drag_waste;return e?t.can_drop_tableu({...a,...e}):!1});M(pe,"apply",(t,a)=>{t.waste_to_tableu(a)});var Ja=class extends xe{constructor(){super(...arguments);o(this,"res")}get solitaire(){return this.game}get data(){return this._data}apply(){return this.res=this.solitaire.waste_to_foundation(this.data),B.WasteToFoundation}undo(){return this.solitaire.undo_waste_to_foundation(this.data,this.res),B.Undo}undo_pov(a){a.undo_waste_to_foundation(this.data,this.res)}},H=Ja;M(H,"auto_can",t=>{for(let a=0;a<4;a++)if(Ja.can(t,{to:a}))return{to:a}});M(H,"can",(t,a)=>{const e=t.can_drag_waste;return e?t.can_drop_foundation({...a,...e}):!1});M(H,"apply",(t,a)=>{t.waste_to_foundation(a)});var Za=class extends xe{constructor(){super(...arguments);o(this,"res")}get solitaire(){return this.game}get data(){return this._data}apply(){return this.res=this.solitaire.tableu_to_foundation(this.data),B.TableuToFoundation}undo(){return this.solitaire.undo_tableu_to_foundation(this.data,this.res),B.Undo}undo_pov(a){a.undo_tableu_to_foundation(this.data,this.res)}},X=Za;M(X,"auto_can",(t,a)=>{let{tableu:e}=a;for(let s=0;s<4;s++)if(Za.can(t,{from:e,to:s}))return{from:e,to:s}});M(X,"can",(t,a)=>{const e=t.can_drag_tableu({...a,i:1});return e?t.can_drop_foundation({...a,...e}):!1});M(X,"apply",(t,a)=>{t.tableu_to_foundation(a)});var ke=class extends xe{constructor(){super(...arguments);o(this,"res")}get solitaire(){return this.game}get data(){return this._data}apply(){return this.res=this.solitaire.foundation_to_tableu(this.data),B.FoundationToTableu}undo(){return this.solitaire.undo_foundation_to_tableu(this.data,this.res),B.Undo}undo_pov(a){a.undo_foundation_to_tableu(this.data,this.res)}};M(ke,"can",(t,a)=>{const e=t.can_drag_foundation(a);return e?t.can_drop_tableu({...a,...e}):!1});M(ke,"apply",(t,a)=>{t.foundation_to_tableu(a)});var es=class{constructor(t,a,e){this.stock=t,this.waste=a,this.hidden=e}pov_hit_stock(t){this.waste.remove_cards(t.length),this.waste.add_cards(t)}get can_hit(){return this.stock.length>0}get can_recycle(){return this.stock.length===0&&this.waste.length+this.hidden.length>0}get can_from_waste(){let{top_card:t}=this.waste;if(t)return{cards:[t]}}get clone(){return new es(this.stock.clone,this.waste.clone,this.hidden.clone)}from_waste(){return{cards:this.waste.remove_cards(1)}}undo_from_waste(t){this.waste.add_cards(t)}hit(t){let a=this.stock.remove_cards(t),e=this.waste.remove_all();this.hidden.unshift_cards(e),this.waste.add_cards(a)}undo_hit(t){let{cards:a,waste:e}=t;this.waste.remove_cards(a.length),this.hidden.shift_cards(e.length),this.waste.add_cards(e),this.stock.add_cards(a)}recycle(){let t=this.waste.remove_all();return this.hidden.unshift_cards(t),this.stock.add_cards(this.hidden.remove_all()),{waste:t}}undo_recycle(t){let{waste:a}=t;this.hidden.add_cards(this.stock.remove_all());let e=this.hidden.shift_cards(a.length);this.waste.add_cards(e)}},ts=class{constructor(t,a){this.back=t,this.front=a}pov_flip(t){this.front.remove_cards(1),this.front.add_cards([t])}get clone(){return new ts(this.back.clone,this.front.clone)}can_from(t){let a=this.front.clone;this.back.clone;let e=a.remove_cards(t);if(e.length===t)return{cards:e}}can_to(t){let a=t[0];return a?this.front.length>0?ih(a,this.front.top_card)&&sh(a,this.front.top_card):hh(a):!1}from_tableu(t){let a=this.front.remove_cards(t);if(this.front.length===0){let[e]=this.back.remove_cards(1);return e?(this.front.add_cards([e]),{flip:e,cards:a}):{cards:a}}return{cards:a}}undo_from_tableu(t){if(t.flip){let a=this.front.remove_cards(1);this.back.add_cards(a)}this.front.add_cards(t.cards)}to_tableu(t){this.front.add_cards(t)}undo_to_tableu(t){this.front.remove_cards(t.length)}},as=class{constructor(t,a,e,s,i){this.settings=t,this.nb_recycles=a,this.stock=e,this.tableus=s,this.foundations=i}get clone(){return new as(this.settings,this.nb_recycles,this.stock.clone,this.tableus.map(t=>t.clone),this.foundations.map(t=>t.clone))}get recycle_n(){return this.settings.limit==="nolimit"?9999:this.settings.limit==="threepass"?3:1}get hit_n(){return this.settings.cards==="threecards"?3:1}get has_recycle_limit(){return this.recycle_n-this.nb_recycles>0}get can_hit(){return this.stock.can_hit}get can_recycle(){return this.has_recycle_limit&&this.stock.can_recycle}get is_finished(){return this.foundations.every(t=>t.is_finished)}can_drag_tableu(t){let{from:a,i:e}=t;return this.tableus[a].can_from(e)}can_drop_tableu(t){let{to:a,cards:e}=t;return this.tableus[a].can_to(e)}can_drop_foundation(t){let{to:a,cards:e}=t;return this.foundations[a].can_to(e)}get can_drag_waste(){return this.stock.can_from_waste}can_drag_foundation(t){let{from:a}=t;return this.foundations[a].can_from}hit_stock(){return this.stock.hit(this.hit_n)}undo_hit_stock(t){this.stock.undo_hit(t)}recycle(){return this.nb_recycles++,this.stock.recycle()}undo_recycle(t){this.nb_recycles--,this.stock.undo_recycle(t)}finalize_apply_pov(t){if(t instanceof ce&&t.res.flip){let{from:a}=t.data;this.tableus[a].pov_flip(t.res.flip)}if(t instanceof X&&t.res.flip){let{from:a}=t.data;this.tableus[a].pov_flip(t.res.flip)}t instanceof Ee&&this.stock.pov_hit_stock(t.data.cards)}tableu_to_tableu(t){let{from:a,to:e,i:s}=t,i=this.tableus[a].from_tableu(s);return this.tableus[e].to_tableu(i.cards),i}undo_tableu_to_tableu(t,a){let{from:e,to:s,i}=t;this.tableus[s].undo_to_tableu(a.cards),this.tableus[e].undo_from_tableu(a)}waste_to_tableu(t){let{to:a}=t,e=this.stock.from_waste();return this.tableus[a].to_tableu(e.cards),e}undo_waste_to_tableu(t,a){let{to:e}=t;this.tableus[e].undo_to_tableu(a.cards),this.stock.undo_from_waste(a.cards)}waste_to_foundation(t){let{to:a}=t,e=this.stock.from_waste();return this.foundations[a].to_foundation(e.cards),e}undo_waste_to_foundation(t,a){let{to:e}=t;this.foundations[e].undo_to_foundation(a.cards),this.stock.undo_from_waste(a.cards)}tableu_to_foundation(t){let{from:a,to:e}=t,s=this.tableus[a].from_tableu(1);return this.foundations[e].to_foundation(s.cards),s}undo_tableu_to_foundation(t,a){let{from:e,to:s}=t;this.foundations[s].undo_to_foundation(a.cards),this.tableus[e].undo_from_tableu(a)}foundation_to_tableu(t){let{from:a,to:e}=t,s=this.foundations[a].from_foundation();return this.tableus[e].to_tableu(s.cards),s}undo_foundation_to_tableu(t,a){let{from:e,to:s}=t;this.tableus[s].undo_to_tableu(a.cards),this.foundations[e].undo_from_foundation(a.cards)}};const Ft={s:"spades",d:"diamonds",h:"hearts",c:"clubs"},_h={A:"a",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",T:"t",J:"j",Q:"q",K:"k"};class dh extends w{constructor(){super(...arguments);o(this,"_card");o(this,"rank");o(this,"rsuit");o(this,"suit");o(this,"decsuit")}get waiting(){return this._card===Qt}get card(){return this._card}set card(e){this._card=e,this.rank.play_now(_h[e[1]]),this.suit.play_now(Ft[e[0]]),this.rsuit.play_now(Ft[e[0]]),this.decsuit.forEach(s=>s.play_now(Ft[e[0]]))}_init(){let e=n.make(40,50);this.decsuit=[...Array(3).keys()].map(()=>e=e.add(N().mul(n.make(4,30)).add(n.make(0,30)))).map(i=>{let h=this.make(R,i,{name:"suit"});return h.origin=n.make(32,32),h.play_now("spades"),h.scale=n.one.scale(N().x*.2).add(n.make(.2,.2)),h});let s=[...Array(2).keys()].map(()=>e=e.sub(N().mul(n.make(24,20)).add(n.make(0,30)))).map(i=>{i.x+=120;let h=this.make(R,i,{name:"suit"});return h.origin=n.make(32,32),h.play_now("spades"),h.scale=n.one.scale(N().x*.2).add(n.make(.2,.2)),h});this.decsuit.push(...s),this.rank=this.make(R,n.make(140,32),{name:"rank_2"}),this.rank.origin=n.make(32,32),this.rank.play_now("a"),this.rank.scale=n.make(.6,.6),this.suit=this.make(R,n.make(30,32),{name:"suit"}),this.suit.origin=n.make(32,32),this.suit.play_now("spades"),this.suit.scale=n.make(.6,.6),this.rsuit=this.make(R,n.make(150,210),{name:"suit"}),this.rsuit.origin=n.make(32,32),this.rsuit.rotation=Math.PI,this.rsuit.play_now("spades"),this.rsuit.scale=n.make(.6,.6)}}class ch extends w{constructor(){super(...arguments);o(this,"decoration");o(this,"_will_lerp_t");o(this,"_will_lerp_position");o(this,"_dragging");o(this,"_drag_decay",n.zero);o(this,"_on_drag");o(this,"_on_drop");o(this,"_on_hover");o(this,"_on_click");o(this,"facing");o(this,"anim");o(this,"shadow");o(this,"highlight");o(this,"_will_hover");o(this,"_will_hover_end");o(this,"_will_flip_back");o(this,"_will_flip_front");o(this,"lerp_hover_y");o(this,"_lerp_drag_shadow");o(this,"_tr");o(this,"_tx");o(this,"_ty");o(this,"_target_speed");o(this,"_speed");o(this,"_hover_time");o(this,"_after_ease")}release(){this.lerp_position(),this.unset_dragging(),this.set_highlight(!1),this.bind_click(void 0),this.bind_drag(void 0),this.bind_drop(void 0),this.bind_hover(void 0),this._after_ease=void 0}lerp_release(){this.lerp_position(),this.unset_dragging()}get waiting(){return this.decoration.waiting}get card(){return this.decoration.card}set card(e){this.decoration.card=e,this.waiting?this.anim._animation==="idle"&&(this.anim.play_now("wait"),this.decoration.visible=!1):this.anim._animation==="wait"&&(this.anim.play_now("idle"),this.decoration.visible=!0)}get flipping(){return this.anim._animation==="flip"||this.anim._animation==="back_flip"}get easing(){return!!this._tx||!!this._ty||!!this._tr}lerp_position(e,s){this._tx&&(this.cancel(this._tx),this._tx=void 0),this._ty&&(this.cancel(this._ty),this._ty=void 0),this._will_lerp_position=e,this._will_lerp_t=s,e?this._target_speed=(1-(s||.5))*.2:this._target_speed=0}get drag_decay(){return this._drag_decay}bind_drag(e){this._on_drag=e}bind_drop(e){this._on_drop=e}bind_hover(e){this._on_hover=e}bind_click(e){this._on_click=e}get hover_time(){return this._hover_time??0}ease_rotation(e,s=E.half){this._tr=this.tween_single(this._tr,[this.rotation,e],i=>{this.rotation=i},s,0,()=>{this._tr=void 0})}ease_position(e,s=E.half){e.equals(this.position)||(this._target_speed=s/E.half*.2,this._tx=this.tween_single(this._tx,[this.position.x,e.x],i=>{this.position.x=i},s,0,()=>{this._tx=void 0,this._target_speed=0}),this._ty=this.tween_single(this._ty,[this.position.y,e.y],i=>{this.position.y=i},s,0,()=>{this._ty=void 0}))}set_highlight(e){this.highlight.visible=e}set_dragging(){this._lerp_drag_shadow=0,this._dragging=!0}unset_dragging(){this._dragging=!1}after_ease(e){this._after_ease=e}_init(){this.shadow=this._make(R,n.make(0,0),{name:"card"}),this.shadow.origin=n.make(88,120),this.shadow.play_now("shadow"),this.anim=this.make(R,n.make(0,0),{name:"card"}),this.anim.origin=n.make(88,120),this.facing=-1,this.anim.play_now("back_idle"),this.highlight=this.make(R,n.make(0,0),{name:"card"}),this.highlight.origin=n.make(88,120),this.highlight.play_now("highlight"),this.highlight.visible=!1,this.decoration=this.make(dh,n.make(-80,-120),{}),this.decoration.visible=!1,this.decoration.card=Qt,this._will_hover=!1,this._will_hover_end=!1,this._will_flip_back=!1,this._will_flip_front=!1,this.lerp_hover_y=0,this._dragging=!1,this._speed=0,this._target_speed=0;let e=this;this.make(D,n.make(16,16).sub(this.anim.origin),{rect:x.make(0,0,170,210),on_click(){if(e._on_click)return e._on_click()},on_hover(){return e._on_hover&&e._on_hover[0](),e._on_drag?(e._will_hover=!0,!0):!1},on_hover_end(){e._on_hover&&e._on_hover[1](),e._will_hover_end=!0},on_drag_begin(s){return e._on_drag?(e._lerp_drag_shadow=0,e._dragging=!0,e._drag_decay=s.sub(e.position),!0):!1},on_drag_end(){e._dragging=!1},on_drag(s){return e._on_drag?(e._on_drag(s),!0):!1},on_drop(){e._on_drop&&e._on_drop()}})}_update(){this._speed=he(this._speed,this._target_speed,.2);let e=$i(Math.abs(Math.sin(b.seconds*3)))*this._speed;if(this.scale=n.make(1-e,1+e),this._will_lerp_position&&(this.position=n.lerp(this.position,this._will_lerp_position,this._will_lerp_t??.5)),this._lerp_drag_shadow!==void 0&&(this._dragging?this._lerp_drag_shadow=he(this._lerp_drag_shadow,1,.2):(this._lerp_drag_shadow=he(this._lerp_drag_shadow,0,.2),this._lerp_drag_shadow<.001&&(this._lerp_drag_shadow=void 0))),this._lerp_drag_shadow!==void 0){let s=this._lerp_drag_shadow*.05;this.shadow.scale=n.one.add(n.one.scale(s)),this.shadow.alpha=(1-this._lerp_drag_shadow)*100+155}if(this._after_ease&&!this.easing&&(this._after_ease(),this._after_ease=void 0),this.easing||(this.anim.position.y=he(this.anim.position.y,this.lerp_hover_y,.2),this.decoration.position.y=he(this.decoration.position.y,this.lerp_hover_y-120,.16),this.highlight.position.y=he(this.highlight.position.y,this.lerp_hover_y,.16)),this._will_hover&&(this._will_hover=!1,!this.easing&&!this.flipping&&this._will_flip_back&&this._will_flip_front&&this.anim.play(this.facing===1?"hover":"back_hover"),this.lerp_hover_y=-6,this._hover_time=0),this._will_hover_end){this._will_hover_end=!1;let s=this.waiting?"wait":"idle";!this.easing&&!this.flipping&&this._will_flip_back&&this._will_flip_front&&this.anim.play(this.facing===1?s:"back_idle"),this.lerp_hover_y=0,this._hover_time=void 0}this._hover_time!==void 0&&this._hover_time>=0&&(this.easing&&(this._hover_time=0),this._hover_time+=b.delta),this._will_flip_back&&(this.easing||(this._will_flip_back=!1,this.shadow.visible=!1,this.decoration.visible=!1,this.anim.play_now("flip",()=>{this.facing=-1,this.anim.play("back_idle"),this.shadow.visible=!0}))),this._will_flip_front&&(this.easing||(this._will_flip_front=!1,this.shadow.visible=!1,this.decoration.visible=!1,this.anim.play_now("back_flip",()=>{this.facing=1,this.anim.play(this.waiting?"wait":"idle"),this.shadow.visible=!0,this.waiting||(this.decoration.visible=!0)})))}flip_back(){this._will_flip_front=!1,this._will_flip_back=this.facing!==-1||this.anim._animation==="back_flip"}flip_front(){this._will_flip_back=!1,this._will_flip_front=this.facing!==1||this.anim._animation==="flip"}_draw_shadow(e){e.push_matrix(v.create_transform(this.position,this.origin,this.scale,this.rotation)),this.g_position=n.transform(n.zero,e.m_matrix),this.shadow.draw(e),e.pop_matrix()}}class ss extends w{constructor(){super(...arguments);o(this,"_on_click");o(this,"_on_drop");o(this,"_will_hover");o(this,"_will_hover_end");o(this,"anim")}bind_click(e){this._on_click=e}bind_drop(e){this._on_drop=e}_init(){this.anim=this._make(R,n.make(0,0),{name:"card"}),this.anim.origin=n.make(88,120);let e=this;this.make(D,n.make(16,16).sub(this.anim.origin),{rect:x.make(0,0,170,210),on_hover(){return e._on_drop?(e._will_hover=!0,!0):!1},on_hover_end(){e._will_hover_end=!0},on_drop(){e._on_drop&&e._on_drop()},on_click(){return e._on_click?(e._on_click(),!0):!1}})}_update(){this._will_hover&&(this._will_hover=!1),this._will_hover_end&&(this._will_hover_end=!1)}}class ph extends w{constructor(){super(...arguments);o(this,"frees");o(this,"used");o(this,"_shadow_group")}borrow(){let e=this.frees.shift();return this.used.push(e),e.visible=!0,e}release(e){e.visible=!1,this.used.splice(this.used.indexOf(e),1),e.release(),this.frees.push(e)}set shadow_group(e){this._shadow_group=e}_init(){this.frees=Ga.deck.map(e=>{let s=this.make(ch,n.zero,{});return s.visible=!1,s}),this.used=[]}_draw(e){var s,i;e.push_matrix(v.create_transform(this.position,this.origin,this.scale,this.rotation)),this.g_position=n.transform(n.zero,e.m_matrix),this._draw_children(e),(s=this._shadow_group)==null||s.forEach(h=>{h._draw_shadow(e)}),(i=this._shadow_group)==null||i.forEach(h=>{h.draw(e)}),e.pop_matrix()}}class Te extends w{constructor(){super(...arguments);o(this,"_i_gap");o(this,"cards")}get data(){return this._data}get length(){return this.cards.length}get top_card(){return this.cards[this.cards.length-1]}get h(){let e=55*(1-this.cards.length/50);return this.data.h??e}get top_position(){return this.position.add(n.make(0,this.cards.length*this.h))}set_highlight(e,s){this.cards.slice(this.cards.length-e,this.cards.length).forEach(h=>h.set_highlight(s))}add_cards(e){e.forEach(s=>s.send_front()),this.cards.push(...e),this._reposition()}remove_cards(e){let s=this.cards.splice(this.cards.length-e,this.cards.length);return this._reposition(),s}set i_gap(e){this._i_gap!==e&&(this._i_gap=e,this._reposition())}_reposition(){this.cards.forEach((e,s)=>{let i=this._i_gap!==void 0&&s>this._i_gap?s+.5:s;e.ease_position(this.p_position.add(n.make(0,i*this.h)))})}ease_position(e){this.position=e,this._reposition()}_init(){this.cards=[]}}function fh(t){return 1/(1+Math.exp(-t))}class Rt extends w{constructor(){super(...arguments);o(this,"_waiting",!1);o(this,"_cards")}get waiting(){return this._waiting}wait_drop(){this._waiting=!0}set cards(e){this._cards=e.slice(0),this._cards.forEach(s=>s.send_front()),this._cards.forEach(s=>s.set_dragging())}get drag_decay(){return this._cards[0].drag_decay}get h(){return 50}drag(e){this._cards.forEach((s,i)=>{let h=e.add(n.make(0,this.h*i).sub(this.drag_decay)),r=1-fh(i/this._cards.length*2);s.lerp_position(h,r)})}lerp_release(){let e=this._cards.splice(0);return e.forEach(s=>s.lerp_release()),e}_init(){this._cards=[]}}class gh extends w{constructor(){super(...arguments);o(this,"backs");o(this,"fronts");o(this,"drop_target")}get data(){return this._data}get top_front_position(){return this.fronts.top_position}get top_back_position(){return this.backs.top_position}release_all(){return this.free()}free(){return[...this.backs.remove_cards(this.backs.length),...this.fronts.remove_cards(this.fronts.length)]}add_backs(e){e.forEach(s=>s.flip_back()),this.backs.add_cards(e),this.fronts.ease_position(this.top_back_position)}add_fronts(e){var h;this.fronts.add_cards(e),e.forEach(r=>r.flip_front());let s=this,i=this.fronts.cards.length;this.fronts.cards.forEach((r,l)=>{r.bind_drop(void 0),r.bind_drag(p=>{s.data.on_front_drag(i-l,p)}),r.bind_click(()=>(s.data.on_front_click(i-l),!0))}),(h=this.fronts.top_card)==null||h.bind_drop(()=>{s.data.on_front_drop()}),this.open_drop_target()}remove_fronts(e){var r;let s=this.fronts.remove_cards(e);s.forEach(l=>{l.bind_drop(void 0)});let i=this,h=this.fronts.cards.length;return this.fronts.cards.forEach((l,p)=>{l.bind_drop(void 0),l.bind_drag(d=>{i.data.on_front_drag(h-p,d)}),l.bind_click(()=>(i.data.on_front_click(h-p),!0))}),(r=this.fronts.top_card)==null||r.bind_drop(()=>{i.data.on_front_drop()}),this.open_drop_target(),s}flip_front(e){var h;let[s]=this.backs.remove_cards(1);s.card=e,s.flip_front(),this.fronts.ease_position(this.top_back_position),(h=this.fronts.top_card)==null||h.bind_drop(void 0),this.fronts.add_cards([s]);let i=this;this.fronts.top_card.bind_drag(r=>{i.data.on_front_drag(1,r)}),this.fronts.top_card.bind_drop(()=>{i.data.on_front_drop()}),this.fronts.top_card.bind_click(()=>(i.data.on_front_click(1),!0))}get empty(){return this.fronts.length===0&&this.backs.length===0}open_drop_target(){this.drop_target.visible=this.empty}flip_back(){let[e]=this.fronts.remove_cards(1);e.flip_back(),this.backs.add_cards([e]),this.fronts.ease_position(this.top_back_position),e.bind_drop(void 0)}_init(){this.drop_target=this.make(ss,n.make(0,0),{}),this.drop_target.bind_drop(()=>{this.data.on_front_drop()}),this.drop_target.bind_click(()=>(this.data.on_front_click(1),!0)),this.backs=this.make(Te,n.make(0,0),{h:33}),this.fronts=this.make(Te,n.make(0,0),{}),this.open_drop_target()}_update(){let e=this.fronts.cards.findIndex(s=>s.hover_time>E.thirds);e!==-1?this.fronts.i_gap=e:this.fronts.i_gap=void 0}}const Ct=t=>typeof t=="object"&&t.foundation!==void 0,mh=t=>typeof t=="object"&&typeof t.tableu=="number";class yh extends w{constructor(){super(...arguments);o(this,"anim")}get data(){return this._data}disable(){this.anim.play("disabled")}enable(){this.anim.play("idle")}_init(){let e=this.make(R,n.make(0,0),{name:"recycle"});this.anim=e;let s=this;this.make(D,n.make(20,20),{rect:x.make(0,0,140,160),on_hover(){e._animation!=="disabled"&&e.play("hover")},on_hover_end(){e._animation!=="disabled"&&e.play("idle")},on_click(){s.data.on_recycle()}})}}const uh=(t,a)=>{for(let e=t.length-1;e>=0;e--)a(t[e])};class xh extends w{constructor(){super(...arguments);o(this,"stock");o(this,"waste");o(this,"waste_hidden")}get data(){return this._data}get can_recycle(){return this.stock.length===0}release_all(){return this.free()}free(){return[...this.stock.remove_cards(this.stock.length),...this.waste.remove_cards(this.waste.length),...this.waste_hidden.remove_cards(this.waste_hidden.length)]}add_waste_hidden(e){e.forEach(s=>s.flip_back()),this.waste_hidden.add_cards(e)}add_waste(e){e.forEach(s=>{s.bind_drop(void 0),s.bind_drag(void 0),s.bind_click(void 0)}),this.waste.add_cards(e),e.forEach((s,i)=>s.flip_front()),this.bind_new_front()}add_stocks(e){e.forEach(s=>s.flip_back()),this.stock.add_cards(e)}remove_waste(e){return this.waste.remove_cards(e)}bind_new_front(){var e,s;this.waste.cards.forEach(i=>{i.bind_drag(void 0),i.bind_click(void 0)}),(e=this.waste.top_card)==null||e.bind_drag(i=>{this.data.on_front_drag(i)}),(s=this.waste.top_card)==null||s.bind_click(()=>(this.data.on_waste_click(),!0))}undo_hit(e,s){let i=this.waste.remove_cards(e.length),h=this.waste_hidden.remove_cards(s.length);this.waste.add_cards(h),h.forEach((r,l)=>{r.card=s[l],r.flip_front()}),i.forEach(r=>{r.flip_back(),r.bind_click(void 0),r.bind_drag(void 0)}),this.stock.add_cards(i),this.bind_new_front()}hit(e){let s=this.stock.remove_cards(e.length);s.forEach((h,r)=>h.card=e[r]),s.forEach((h,r)=>h.flip_front());let i=this.waste.remove_cards(this.waste.cards.length);i.forEach(h=>{h.flip_back(),h.bind_drag(void 0),h.bind_click(void 0)}),this.waste_hidden.add_cards(i),this.waste.add_cards(s),uh(this.waste_hidden.cards,h=>h.send_back()),this.bind_new_front(),$.play("hit")}recycle(){let e=this.waste.remove_cards(this.waste.length);this.waste_hidden.add_cards(e);let s=this.waste_hidden.remove_cards(this.waste_hidden.length);s.forEach(i=>{i.bind_drag(void 0),i.bind_click(void 0)}),s.forEach(i=>i.flip_back()),s.forEach(i=>i.send_front()),this.stock.add_cards(s),$.play("recycle")}undo_recycle(e){let s=this.stock.remove_cards(this.stock.length);this.waste_hidden.add_cards(s);let i=this.waste_hidden.remove_cards(e);s.forEach(h=>h.flip_front()),i.forEach(h=>h.flip_front()),this.waste.add_cards(i)}_init(){this.stock=this.make(Te,n.make(0,0),{h:1}),this.waste=this.make(Te,n.make(0,260),{}),this.waste_hidden=this.make(Te,n.make(0,300),{h:0});let e=this;this.make(D,n.make(-64,-80),{rect:x.make(0,0,160,210),on_click(){e.stock.length>0&&e.data.on_hit()}})}}class wh extends w{constructor(){super(...arguments);o(this,"foundation");o(this,"drop_target")}get data(){return this._data}release_all(){return this.free()}free(){return this.remove_cards(this.foundation.length)}add_cards(e){var s,i;this.foundation.add_cards(e),(s=this.foundation.top_card)==null||s.bind_drag(h=>this.data.on_front_drag(h)),(i=this.foundation.top_card)==null||i.bind_click(()=>this.data.on_front_click())}remove_cards(e){return this.foundation.remove_cards(e)}_init(){this.drop_target=this.make(ss,n.make(0,0),{}),this.drop_target.bind_drop(()=>{this.data.on_front_drop()}),this.drop_target.bind_click(()=>(this.data.on_front_click(),!0)),this.foundation=this.make(Te,n.make(0,0),{h:0})}}class kh extends w{constructor(){super(...arguments);o(this,"recycle_view");o(this,"cards");o(this,"dealer");o(this,"stock");o(this,"tableus");o(this,"foundations");o(this,"dragging");o(this,"drag_source");o(this,"click_source");o(this,"back_res");o(this,"trigger_auto",-2)}get game_pov(){return this.back_res.game_pov}get pov(){return this.game_pov.game}get cmd(){return this.back_res.cmd}_init(){let e=this;this.make(D,n.zero,{rect:x.make(0,0,1920,1080),on_up(){e.dragging&&!e.dragging.waiting&&e._release_cancel_drag()},on_click(){e.click_source&&e._release_cancel_highlight()}}),this.recycle_view=this.make(yh,n.make(40,200),{on_recycle(){e.stock.can_recycle&&e.cmd(Ie)}}),this.cards=this.make(ph,n.zero,{});let s=120,i=320;this.stock=this.make(xh,n.make(s,i),{on_waste_click(){if(e.click_source==="waste"){e._release_cancel_highlight();let f=H.auto_can(e.pov);f&&(e.trigger_auto=-1,e.cmd(H,f));return}e._release_cancel_highlight(),e.stock.waste.top_card.set_highlight(!0),e.click_source="waste"},on_hit(){e.cmd(Ee)},on_front_drag(f){if(e._release_cancel_highlight(),e.dragging)e.dragging.drag(f);else{if(e.trigger_auto!==-2)return;if(e.pov.can_drag_waste){let m=e.stock.remove_waste(1);e.dragging=e.make(Rt,n.zero,{}),e.dragging.cards=m,e.cards.shadow_group=m,e.drag_source="waste",$.play("drag1")}}}});let h=350,r=180,l=200;this.tableus=st.map(f=>this.make(gh,n.make(h+l*f,r),{on_front_click(m){if(!e.click_source)e._release_cancel_highlight(),e.tableus[f].fronts.set_highlight(m,!0),e.click_source={tableu:f,i:m};else if(e.click_source==="waste")e.cmd(pe,{to:f});else{let{tableu:u,i:k}=e.click_source;if(u===f){if(m===1){e._release_cancel_highlight();let z=X.auto_can(e.pov,{tableu:u});z&&(e.trigger_auto=-1,e.cmd(X,z));return}e._release_cancel_highlight(),e.tableus[f].fronts.set_highlight(m,!0),e.click_source={tableu:f,i:m};return}e.cmd(ce,{from:u,to:f,i:k})}},on_front_drag(m,u){if(e.dragging)e.dragging.drag(u);else{if(e._release_cancel_highlight(),e.trigger_auto!==-2)return;if(e.pov.can_drag_tableu({from:f,i:m})){let k=e.tableus[f].remove_fronts(m);e.dragging=e.make(Rt,n.zero,{}),e.dragging.cards=k,e.cards.shadow_group=k,e.drag_source={tableu:f,i:m};let z=Math.min(3,Math.floor(m/3)+1);$.play(`drag${z}`)}}},on_front_drop(){if(e.drag_source==="waste")e.dragging.wait_drop(),e.cmd(pe,{to:f});else if(Ct(e.drag_source)){let{foundation:m}=e.drag_source;e.dragging.wait_drop(),e.cmd(ke,{from:m,to:f})}else if(e.drag_source){let{tableu:m,i:u}=e.drag_source;e.dragging.wait_drop(),e.cmd(ce,{from:m,to:f,i:u})}}}));let p=1790,d=166,g=240;this.foundations=Ea.map(f=>this.make(wh,n.make(p,d+g*f),{on_front_click(){if(e.click_source==="waste")e.cmd(H,{to:f});else if(e.click_source){let{tableu:m,i:u}=e.click_source;u===1&&e.cmd(X,{from:m,to:f,i:1})}},on_front_drag(m){if(e._release_cancel_highlight(),e.dragging)e.dragging.drag(m);else{if(e.trigger_auto!==-2)return;if(e.pov.can_drag_foundation({from:f})){let u=e.foundations[f].remove_cards(1);e.dragging=e.make(Rt,n.zero,{}),e.dragging.cards=u,e.cards.shadow_group=u,e.drag_source={foundation:f},$.play("drag1")}}},on_front_drop(){if(e.drag_source==="waste")e.dragging.wait_drop(),e.cmd(H,{to:f});else if(!Ct(e.drag_source)){if(e.drag_source){let{tableu:m,i:u}=e.drag_source;u===1&&(e.dragging.wait_drop(),e.cmd(X,{from:m,to:f,i:1}))}}}})),this.dealer=this.make(zh,n.zero,{on_shuffle(){e.dealer.cards.forEach(f=>e.cards.release(f))}})}_release_cancel_highlight(){if(this.click_source)if(this.click_source==="waste")this.stock.waste.top_card.set_highlight(!1),this.click_source=void 0;else{let{tableu:e,i:s}=this.click_source;this.tableus[e].fronts.set_highlight(s,!1),this.click_source=void 0}else return}_release_cancel_drag(){if(!this.dragging){this._release_cancel_highlight();return}let e=this.dragging.lerp_release();if(this.drag_source==="waste")this.stock.add_waste(e);else if(Ct(this.drag_source)){let{foundation:s}=this.drag_source;this.foundations[s].add_cards(e)}else{let{tableu:s,i}=this.drag_source;this.tableus[s].add_fronts(e)}this.dragging.dispose(),this.dragging=void 0,this.drag_source=void 0,$.play("cancel"),e[0].after_ease(()=>{this.cards.shadow_group=void 0})}_collect_pov(){this._init_pov()}_init_pov(){let{pov:e,stock:s,tableus:i,foundations:h}=this;st.map(r=>{i[r].release_all().forEach(p=>this.cards.release(p))}),s.release_all().forEach(r=>this.cards.release(r)),Ea.map(r=>{h[r].release_all().forEach(p=>this.cards.release(p))}),this.drag_source=void 0,this.click_source=void 0,this._refresh_recycle(),s.add_waste_hidden(e.stock.hidden.cards.map(r=>this.cards.borrow())),s.add_stocks(e.stock.stock.cards.map(r=>this.cards.borrow())),s.add_waste(e.stock.waste.cards.map(r=>{let l=this.cards.borrow();return l.card=r,l})),st.map(r=>{let l=i[r],p=e.tableus[r];l.add_backs(p.back.cards.map(d=>this.cards.borrow())),l.add_fronts(p.front.cards.map(d=>{let g=this.cards.borrow();return g.card=d,g}))})}_refresh_recycle(){this.pov.can_hit?this.recycle_view.visible=!1:this.recycle_view.visible=!0,this.pov.can_recycle?this.recycle_view.enable():this.recycle_view.disable()}new_game(){this._collect_pov()}undo(e){if($.play("undo2"),e instanceof Ee)this.stock.undo_hit(e.data.cards,e.data.waste),this._refresh_recycle();else if(e instanceof Ie)this.stock.undo_recycle(e.data.waste.length),this._refresh_recycle();else if(e instanceof ce){let{flip:s}=e.res,{from:i,to:h,i:r}=e.data;s&&this.tableus[i].flip_back();let l=this.tableus[h].remove_fronts(r);this.tableus[i].add_fronts(l)}else if(e instanceof pe){let{to:s}=e.data,i=this.tableus[s].remove_fronts(1);this.stock.add_waste(i)}else if(e instanceof X){let{flip:s}=e.res,{from:i,to:h}=e.data;s&&this.tableus[i].flip_back();let r=this.foundations[h].remove_cards(1);this.tableus[i].add_fronts(r)}else if(e instanceof H){let{to:s}=e.data,i=this.foundations[s].remove_cards(1);this.stock.add_waste(i)}else if(e instanceof ke){let{from:s,to:i}=e.data,h=this.tableus[i].remove_fronts(1);this.foundations[s].add_cards(h)}}apply(e){let s;if(e instanceof Ee)this._release_cancel_highlight(),this.stock.hit(e.data.cards),this._refresh_recycle();else if(e instanceof Ie)this.stock.recycle(),this._refresh_recycle();else if(e instanceof ce){let{flip:i}=e.res,{from:h,to:r,i:l}=e.data,p;if(this.dragging){let d=this.dragging.lerp_release();this.tableus[r].add_fronts(d),s=d}else if(this.click_source&&mh(this.click_source)){let{tableu:d,i:g}=this.click_source;this._release_cancel_highlight();let f=this.tableus[d].remove_fronts(g);this.tableus[r].add_fronts(f),p=f}i&&(this.tableus[h].flip_front(i),p&&p.forEach(d=>d.send_front()))}else if(e instanceof pe){let{to:i}=e.data;if(this.dragging){let h=this.dragging.lerp_release();this.tableus[i].add_fronts(h),this.stock.bind_new_front(),s=h}else{this._release_cancel_highlight();let h=this.stock.remove_waste(1);this.tableus[i].add_fronts(h),this.stock.bind_new_front()}}else if(e instanceof X){let{flip:i}=e.res,{from:h,to:r}=e.data;if(this.dragging){let l=this.dragging.lerp_release();this.foundations[r].add_cards(l),s=l}else{this._release_cancel_highlight();let l=this.tableus[h].remove_fronts(1);this.foundations[r].add_cards(l)}i&&this.tableus[h].flip_front(i)}else if(e instanceof H){let{to:i}=e.data;if(this.dragging){let h=this.dragging.lerp_release();this.foundations[i].add_cards(h),s=h}else{this._release_cancel_highlight();let h=this.stock.remove_waste(1);this.foundations[i].add_cards(h)}this.stock.bind_new_front()}else if(e instanceof ke){let{from:i,to:h}=e.data,r=this.dragging.lerp_release();this.tableus[h].add_fronts(r),this.stock.bind_new_front(),s=r}s&&(this.dragging.dispose(),this.dragging=void 0,this.drag_source=void 0,s[0].after_ease(()=>{this.cards.shadow_group=void 0})),(e instanceof X||e instanceof H)&&(this.trigger_auto===-1&&$.play("auto_flip"),this.trigger_auto===-3&&($.play("auto_flip"),this.trigger_auto=-1))}apply_pov(e,s){}cant(e,s){e===ke?this._release_cancel_drag():e===pe?this._release_cancel_drag():e===H?this._release_cancel_drag():e===ce?this._release_cancel_drag():e===X?this._release_cancel_drag():e===H?this._release_cancel_drag():console.log("cant",e)}cant_undo(){}request_undo(){this.back_res.undo()}request_new_game(){this.back_res.new_game()}_update(){if(this.trigger_auto===-1)this.trigger_auto=E.thirds;else if(this.trigger_auto>0)this.trigger_auto=$t(this.trigger_auto,0,b.delta);else if(this.trigger_auto===0){this.trigger_auto=-2;let e=H.auto_can(this.pov);if(e)this.cmd(H,e),this.trigger_auto=-3;else for(let s=0;s<7;s++){let i=X.auto_can(this.pov,{tableu:s});if(i){this.cmd(X,i),this.trigger_auto=-3;break}}}}}const vh=async(t,a,e,s)=>{let i=Je,h=await i.get_pov();return{get game_pov(){return h},cmd(r,l){r.can(h.game,l)?(h.apply(r,l),t.apply_pov(r,l),i.apply(r,l).then(p=>{p?(t.apply(p),h.finalize_apply_pov(p),i.get_pov().then(d=>a(d.score)),i.get_pov().then(d=>{d.game.is_finished&&s(d.game.settings,d.score)})):t.cant(r,l)})):t.cant(r,l)},undo(){h.can_undo?(h.undo_pov(),i.undo().then(r=>{r?(h.undo(r),t.undo(r),i.get_pov().then(l=>a(l.score))):t.cant_undo()})):t.cant_undo()},async new_game(){i.get_pov().then(r=>{let l=r.score;l>0&&(r.game.is_finished||mt.add_result(He.from_loss(r.game.settings,l)))}),Je=new nt,i=Je,h=await Je.get_pov(),t.new_game(),i.get_pov().then(r=>a(r.score)),i.get_pov().then(r=>e(r.game.settings))}}},ct=class ct{constructor(){o(this,"game");let a=ta.make(De.general_settings,bh(Ga.deck));this.game=Ya.make(a)}async get_pov(){return this.game.pov.clone}async apply(a,e){return await this.game.apply(a,e)}async undo(){return await this.game.undo()}};o(ct,"resume",()=>new ct);let nt=ct,Je=new nt;function bh(t){for(var a=t.length-1;a>0;a--){var e=Math.floor(Math.random()*(a+1)),s=t[a];t[a]=t[e],t[e]=s}return t}let Eh=[...Array(50).keys()].map(()=>N().mul(L.scale(.8)));class Th extends w{constructor(){super(...arguments);o(this,"_timer");o(this,"_cards",[]);o(this,"end_on_final_ease")}get data(){return this._data}set cards(e){this._cards=e,e.length>0&&(this._timer=E.seconds*.5)}_update(){if(this.end_on_final_ease&&this._cards.every(e=>!e.easing)&&(this.end_on_final_ease=void 0,this.data.on_end()),b.on_interval(E.three)&&this._timer)if(this._timer-=b.delta,this._timer<0)this._timer=void 0,this.end_on_final_ease=!0,this._cards.forEach((e,s)=>{e.ease_position(n.make(L.x/2,L.y*.8),E.half+E.half*(s/this._cards.length))});else{let e=Qi(Eh),s=va(),i=n.max(n.min(e.add(s.scale(100)),L),n.zero);for(let h=0;h<3;h++)this._cards.filter(r=>!r.easing).sort((r,l)=>r.position.distance(e)-l.position.distance(e)).slice(0,2+qa(2)).forEach((r,l)=>{r.ease_position(i.add(va().scale(l*5)),E.half+ue()*3*E.sixth)})}this._cards.forEach(e=>e.update())}_draw(e){this._cards.forEach(s=>s.draw(e))}}function Ta(t,a=ue){let e,s,i;for(s=t.length;s;)e=a()*s--|0,i=t[s],t[s]=t[e],t[e]=i;return t}function*Ah(t){let a=t.length,e=1;for(;e0;){e=Math.floor(e/3);for(let s=1;s<=e;s++)yield*Mh(t,s,e)}}function*Mh(t,a,e){let s=t.length;for(let i=a+e;i=e&&t[h]{let e=t/(a-1)*Math.PI;e=Li(e/Math.PI,-Math.PI*.2,Math.PI*.2)-Math.PI*.5;let s=L.scale(1/2).sub(n.up.scale(1200)),i=s.add(n.from_angle(e,1400)),h=i.sub(s).normal.angle+Math.PI/2;return[i,h]};class Sh extends w{constructor(){super(...arguments);o(this,"_cards",[]);o(this,"layer");o(this,"_sort_shot");o(this,"flip_i");o(this,"final");o(this,"end_on_final_ease")}get data(){return this._data}set cards(e){this._cards=e,e.length>0&&this._begin_lay()}_begin_lay(){Ta(this._cards),this.layer=[0,Ta(this._cards.map((e,s)=>s))]}_begin_sort(){let e=this._cards.map(l=>l.card?ah(l.card):-1);this._sort_shot=[];let s=Ah(e),i=Math.floor(e.length/3),h=0,r=this._cards.slice(0);for(let l of s){let[p,d]=l,g=r[p];r[p]=r[d],r[d]=g,h++>3&&h%i===0&&this._sort_shot.unshift(r.slice(0))}this._sort_shot.unshift(r)}_begin_flip(){this.flip_i=0}_update(){if(this.layer){let[e,s]=this.layer;for(let i=0;i<1;i++){if(e>=s.length){this._cards.every(h=>!h.easing)&&(this.layer=void 0,this._begin_sort());break}if(b.on_interval(E.three)){let[h,r]=Ut(e,this._cards.length);this._cards[e].ease_position(h),this._cards[e].ease_rotation(r),e++}}this.layer&&(this.layer[0]=e)}if(this._sort_shot){if(this._sort_shot.length===0)this._sort_shot=void 0,this._begin_flip();else if(b.on_interval(E.sixth)){let e=this._sort_shot.pop();this._cards.forEach((s,i)=>{let h=e.findIndex(r=>r===s);if(i!==h){let[r,l]=Ut(h,this._cards.length);this._cards[i].ease_position(r),this._cards[i].ease_rotation(l)}}),this._cards=e}}this.flip_i!==void 0&&b.on_interval(E.three)&&(this._cards[this.flip_i].flip_back(),this.flip_i++,this.flip_i>=this._cards.length&&(this.flip_i=void 0,this.final=!0)),this.final&&(this.final=void 0,this.end_on_final_ease=!0,this._cards.forEach(e=>{let[s,i]=Ut(2,5);e.ease_position(s),e.ease_rotation(i)})),this.end_on_final_ease&&this._cards.every(e=>!e.easing)&&(this.end_on_final_ease=void 0,this.data.on_layout()),this._cards.forEach(e=>e.update())}_draw(e){this._cards.forEach(s=>s.draw(e))}}class zh extends w{constructor(){super(...arguments);o(this,"_cards");o(this,"shuffler");o(this,"laydeck")}get data(){return this._data}get cards(){return this._cards}set cards(e){this._cards=e}_init(){let e=this;this.laydeck=this.make(Sh,n.make(0,0),{on_layout(){e.laydeck.cards=[],e.begin_shuffle()}}),this.shuffler=this.make(Th,n.make(0,0),{on_end(){e.shuffler.cards=[],e.data.on_shuffle()}})}begin_laydeck(){this.laydeck.cards=this._cards}begin_shuffle(){this.shuffler.cards=this._cards}}class Fh extends w{constructor(){super(...arguments);o(this,"_score");o(this,"score_text");o(this,"score_text_shadow")}set score(e){this._score=e,this.score_text.text=`${e}`,this.score_text_shadow.text=`${e}`}get score(){return this._score}_init(){this._score=0,this.make(T,n.make(0,25),{key:"score",width:80,height:100}),this.score_text_shadow=this.make(T,n.make(100,6),{no_trans:!0,key:`${this.score}`,width:180,height:100,color:y.black}),this.score_text=this.make(T,n.make(100,0),{no_trans:!0,key:`${this.score}`,width:180,height:100})}}class Rh extends w{get data(){return this._data}_init(){[N().mul(L),N().mul(L),N().mul(L),N().mul(L),N().mul(L),N().mul(L),N().mul(L),N().mul(L),N().mul(L),N().mul(L),N().mul(L)].forEach(e=>{let s=this.make(R,e,{name:"swiggle"});s.origin=n.make(600,400),s.scale=n.one.scale(.5+N().x),N().y<.5&&s.play("small"),s.rotation=N().y*Math.PI});let a=this;this.make(D,n.zero,{rect:x.make(0,0,1920,1080),on_hover(){return!0},on_drag(){return!0},on_click(){return a.data.on_close(),!0}})}}class Ch extends w{constructor(){super(...arguments);o(this,"cards");o(this,"limit")}set settings(e){this.cards.text=e.cards,this.limit.text=e.limit}_init(){this.make(T,n.make(0,0),{no_trans:!0,key:"Solitaire",width:350,height:64,color:y.white}),this.cards=this.make(T,n.make(350,5),{key:"one_pass",width:350,height:40,color:y.white}),this.limit=this.make(T,n.make(550,5),{key:"no_limit",width:350,height:40,color:y.white})}}class Uh extends w{constructor(){super(...arguments);o(this,"ax",0);o(this,"ay",0);o(this,"vx",0);o(this,"vy",0)}get data(){return this._data}_init(){let e=Math.random()<.3?"2":"",s=this.make(R,n.make(0,0),{name:"confetti"+e});s.play_o("idle",{loop:!0});let i=.5+Math.random()*.8;s.scale=n.make(i,i),s.rotation=Math.PI*Math.random(),this.vx=100+Math.random()*100,this.vy=-100+Math.random()*100,this.vx*=this.data.sign,this.ax=this.vx*10,this.ay=this.vy*10}_update(){this.position.x+=this.vx*b.delta,this.position.y+=this.vy*b.delta,this.position.x+=this.ax*b.delta,this.position.y+=this.ay*b.delta,this.ax=$t(this.ax,0,b.delta*1e3),this.ay=$t(this.ay,0,b.delta*1e3),this.position.x>2e3&&this.dispose()}}class Aa extends w{constructor(){super(...arguments);o(this,"life",0)}get data(){return this._data}_init(){if(this.pop_confetti(),this.data.sign<0){let e=this.make(R,n.make(0,700),{name:"confbar"});this.tween([Math.PI,0,Math.PI*.3,Math.PI*.16,0],s=>e.rotation=s,[E.half,E.lengths,E.thirds,E.thirds])}else{let e=this.make(R,n.make(1920,700),{name:"confbar"});e.scale=n.make(-1,1),this.tween([-Math.PI,0,-Math.PI*.3,-Math.PI*.16,0],s=>e.rotation=s,[E.half,E.lengths,E.thirds,E.thirds])}}_update(){this.life<6&&b.on_interval(E.seconds*2)&&(this.pop_confetti(),this.life++)}pop_confetti(){for(let e=0;e<6;e++)this.make(Uh,n.make(this.data.sign>0?-500+e*100:1920-e*100,1080-e*300*Math.random()),{sign:this.data.sign})}}class Ma extends w{pop(){$.play("Win"),this.make(Aa,n.make(0,0),{sign:1}),this.make(Aa,n.make(0,0),{sign:-1})}}class Oh extends w{get data(){return this._data}_init(){let a=1200,e=300;this.make(Ke,n.make(1920/2-a/2,520),{name:"panel_bg_nine_slice",w:a,h:e}),this.make(T,n.make(1920/2,590),{key:"congratz",width:450,height:100,color:y.white,center:!0}),this.make(T,n.make(1920/2,700),{key:`you_finished_with_score%${this.data.score}%`,width:650,height:60,color:y.white,center:!0})}}class it extends w{constructor(){super(...arguments);o(this,"hamburger");o(this,"sidebar");o(this,"overlay");o(this,"over_confetties",[])}set sidebar_open(e){this.sidebar.open=e,this.overlay.visible=e,this.hamburger.open=e}_init(){let e;this.make(Vh,n.zero,void 0),this.over_confetties.push(this.make(Ma,n.make(0,0),{}));let s=this.make(kh,n.make(0,0),{});this.over_confetties.push(this.make(Ma,n.make(0,0),{})),this.make(Ji,n.make(160,1e3),{text:"undo",on_click(){s.request_undo()}});let i=this.make(Ch,n.make(640,16),{}),h=this.make(Fh,n.make(16,860),{});const r=u=>{h.score=u};let l;vh(s,r,u=>{i.settings=u,l&&(l.dispose(),l=void 0),$.play("new_game")},(u,k)=>{this.game_over_confetti_pop(),l=this.make(Oh,n.make(0,0),{score:k}),mt.add_result(He.from_win(u,k))}).then(u=>{s.back_res=u,s._collect_pov(),$.music("main"),i.settings=u.game_pov.game.settings});let g=this,f=this.make(Rh,n.zero,{on_close(){g.sidebar_open=!1,g.hamburger.open=!1}}),m=this.make(Nh,n.make(2,2),{on_open:u=>{g.sidebar_open=u}});e=this.make(Dh,n.make(-600,180),{on_new_game(){s.request_new_game(),g.sidebar_open=!1}}),this.sidebar=e,this.overlay=f,this.hamburger=m,this.sidebar_open=!1}game_over_confetti_pop(){this.over_confetties.forEach(e=>e.pop())}}class Dh extends w{constructor(){super(...arguments);o(this,"_t_x");o(this,"_open")}get data(){return this._data}set open(e){this._open=e,this._t_x&&this.cancel(this._t_x),e?this._t_x=this.tween([this.position.x,0],s=>{this.position.x=s},E.sixth,0,()=>{this._t_x=void 0}):this._t_x=this.tween([this.position.x,-600],s=>{this.position.x=s},E.sixth,0,()=>{this._t_x=void 0})}_init(){this._open=!1;let e=this,s=this.make(R,n.make(0,-100),{name:"side_menu_bg"});s.scale=n.make(1.4,1.4);let i=20,h=60,r=160;this.make(Ce,n.make(i,h),{text:"main_menu",on_click(){q.next(Fe)}}),this.make(Ce,n.make(i,h+r),{text:"new_game",on_click(){e.data.on_new_game()}}),this.make(Ce,n.make(i,h+r*2),{text:"settings",on_click(){q.next(ls,n.zero,{selected_index:1,on_back:it})}}),this.make(Ce,n.make(i,h+r*3),{text:"how_to_play",on_click(){q.next(ns,n.zero,{selected_index:0,on_back:it})}}),this.make(Ce,n.make(i,h+r*4),{text:"about",on_click(){q.next(rs,n.zero,{on_back:it})}})}}class Ce extends w{constructor(){super(...arguments);o(this,"_t_color");o(this,"_i_color");o(this,"bg");o(this,"fg")}get data(){return this._data}get i_color(){return this._i_color}set i_color(e){this._i_color=e,this.bg.color=y.lerp(y.white,y.hex(2106417),this._i_color),this.fg.color=y.lerp(y.white,y.hex(2106417),1-this._i_color)}set hover(e){this._t_color&&this.cancel(this._t_color),e?this._t_color=this.tween([this.i_color,0],s=>{this.i_color=s},E.sixth,0,()=>{this._t_color=void 0}):this._t_color=this.tween([this.i_color,1],s=>{this.i_color=s},E.sixth,0,()=>{this._t_color=void 0})}_init(){this._i_color=0,this.bg=this.make(j,n.make(-20,-40),{w:412,h:120,color:y.hex(2106417)}),this.fg=this.make(T,n.make(0,0),{key:this.data.text,width:350,height:100,color:y.white});let e=360,s=120,i=this;this.make(D,n.make(-20,-40),{rect:x.make(0,0,e,s),on_hover(){i.hover=!0},on_hover_end(){i.hover=!1},on_click(){return i.data.on_click(),!0}})}}class Nh extends w{constructor(){super(...arguments);o(this,"_open");o(this,"anim")}get data(){return this._data}set open(e){this._open=e,this._open?this.anim.play("open"):this.anim.play("idle")}_init(){this._open=!1;let e=this.make(R,n.make(0,0),{name:"hmg_bg"});this.anim=e;let s=200,i=100,h=this;this.make(D,n.make(20,20),{rect:x.make(0,0,s,i),on_hover(){e.play(h._open?"open_hover":"hover")},on_hover_end(){e.play(h._open?"open":"idle")},on_click(){return h.open=!h._open,h.data.on_open(h._open),!0}})}}const Ph=`en=english +}`;let St;const ga=new Vt([ne.make(0,O.Float2,!1),ne.make(1,O.Float2,!1)]),ui="u_texture",xi="u_matrix";let Y=x.make(0,0,1,1);const wi=Y.x,ki=Y.y,vi=Y.x+Y.w,bi=Y.y,Ei=Y.x+Y.w,Ti=Y.x+Y.h,Ai=Y.x,Mi=Y.x+Y.h,[Si,zi,Fi,Ri,Ci,Ui,Oi,Di]=[0,0,1,0,1,1,0,1];class Ni{constructor(){o(this,"texture");o(this,"mesh");o(this,"material");o(this,"indices",[0,1,2,0,2,3]);o(this,"vertices",[]);o(this,"matrix");o(this,"sampler",ye.get_default)}set_matrix(a){this.matrix=a,this.vertices=[],this.PUSH_VERTEX(wi,ki,Si,zi),this.PUSH_VERTEX(vi,bi,Fi,Ri),this.PUSH_VERTEX(Ei,Ti,Ci,Ui),this.PUSH_VERTEX(Ai,Mi,Oi,Di)}PUSH_VERTEX(a,e,s,i){let h=this.matrix;this.vertices.push(new Pi(n.make(a*h.m11+e*h.m21+h.m31,a*h.m12+e*h.m22+h.m32),n.make(s,1-i)))}render(a=c.backbuffer){this.render_with_m(a,ie.create_ortho_offcenter(0,a.width,a.height,0,.01,1e3))}render_with_m(a,e){St||(St=qe.create([mi,yi])),this.mesh||(this.mesh=Ve.create()),this.material||(this.material=gt.create(St));let s=ga.stride,i=new ArrayBuffer(s*this.vertices.length),h=new DataView(i);this.vertices.reduce((l,p)=>p.push_to(h,l),0),this.mesh.index_data(this.indices),this.mesh.vertex_data(ga,i);let r=new Kt;r.target=a,r.mesh=this.mesh,r.has_viewport=!1,r.viewport=x.make(0,0,0,0),r.instance_count=0,r.material=this.material,r.material.set_texture(ui,this.texture),r.material.set_sampler_at_location(0,this.sampler),r.material.set_matrix(xi,e),r.index_start=0,r.index_count=this.indices.length,r.perform()}}class Pi{constructor(a,e){this.pos=a,this.tex=e}push_to(a,e){let{pos:s,tex:i}=this;return a.setFloat32(e+0,s.x,!0),a.setFloat32(e+4,s.y,!0),a.setFloat32(e+8,i.x,!0),a.setFloat32(e+12,i.y,!0),e+16}}const zt=new Ni;function Li(t,a,e){return a+(e-a)*t}function he(t,a,e){return t+(a-t)*e}function $t(t,a,e){return t=e.length-1&&(this.loop===1?(this._i=0,this._values.reverse(),this._durations.reverse()):this._completed=!0))}init(){return this._i=0,this._t=0,this._completed=!1,this._value=this._values[0],this}};o(lt,"make",(a,e,s=!1)=>new lt(a.slice(0),[e],s?1:0).init());let Bt=lt;y.hex(2106417);const Bi=y.hex(4895437),_t=class _t{constructor(){o(this,"_render_order",0);o(this,"visible",!0);o(this,"g_position");o(this,"position");o(this,"rotation");o(this,"origin",n.zero);o(this,"scale",n.one);o(this,"coroutines",[]);o(this,"_data");o(this,"_disposes");o(this,"objects");o(this,"parent");o(this,"g_scissor");o(this,"_tweens",[]);o(this,"_tween")}routine(a){this.coroutines.push(a)}*wait_for(a){let e=0;for(;ee[0]!==a)}tween_single(a,e,s,i,h=0,r){return a&&this.cancel(a),this.tween(e,s,i,h,r)}make(a,e,s){let i=this._make(a,e,s);return this._add_object(i),i}init(){return this._disposes=[],this.objects=[],this._init(),this}update(){this.coroutines=this.coroutines.filter(a=>!a.next().done),this.objects.forEach(a=>a.update()),this._tweens=this._tweens.filter(([a,e,s])=>(a.update(b.delta),e(a.value),a.completed&&s&&s(),!a.completed)),this._update()}draw(a){this.visible&&(this._render_order=_t.next_render_order++,this._draw(a))}_draw_children(a){this.objects.forEach(e=>e.draw(a))}dispose(){this.objects.slice(0).forEach(a=>a.dispose()),this._dispose(),this._disposes.forEach(a=>a()),this.parent&&this.parent.objects.splice(this.parent.objects.indexOf(this),1)}_init(){}_update(){}_draw(a){a.push_matrix(v.create_transform(this.position,this.origin,this.scale,this.rotation)),this.g_position=n.transform(n.zero,a.m_matrix),this._draw_children(a),a.pop_matrix()}_dispose(){}};o(_t,"next_render_order",0);let w=_t;class Ke extends w{get data(){return this._data}get nine(){return Se.find_nine(this.data.name)}_draw(a){let{frames:e}=this.nine,s=400/3,i=(this.data.h-s*2)/s,h=(this.data.w-s*2)/s;a.push_matrix(v.create_transform(this.position,n.zero,n.one,0)),this.g_position=n.transform(n.zero,a.m_matrix),a.stex(e[0].image,n.make(0,0),y.white),a.stex_o(e[1].image,n.make(0,s),n.zero,n.make(1,i),0,y.white),a.stex(e[2].image,n.make(0,s+i*s),y.white),a.stex_o(e[3].image,n.make(s,0),n.zero,n.make(h,1),0,y.white),a.stex_o(e[4].image,n.make(s,s),n.zero,n.make(h,i),0,y.white),a.stex_o(e[5].image,n.make(s,s+i*s),n.zero,n.make(h,1),0,y.white),a.stex(e[6].image,n.make(s+h*s,0),y.white),a.stex_o(e[7].image,n.make(s+h*s,s),n.zero,n.make(1,i),0,y.white),a.stex(e[8].image,n.make(s+h*s,s+i*s),y.white),a.pop_matrix()}}class R extends w{constructor(){super(...arguments);o(this,"alpha",255);o(this,"_animation","idle");o(this,"_frame_counter",0);o(this,"_frame",0);o(this,"_loop",!1);o(this,"_reverse",!1);o(this,"_on_complete");o(this,"will_play")}get data(){return this._data}get sprite(){return Se.find_sprite(this.data.name)}get alpha_color(){return new y(this.alpha,this.alpha,this.alpha,this.alpha)}get animation(){return this.sprite.get(this._animation)}get frame(){var e;return(e=this.animation)==null?void 0:e.frames[this._frame]}get subtexture(){var e;return(e=this.frame)==null?void 0:e.image}get duration(){var e;return(e=this.frame)==null?void 0:e.duration}play_now(e,s,i=!1){var h;if(this._on_complete=s,this._animation=e,this._frame=0,i){let r=((h=this.animation)==null?void 0:h.frames.length)||0;this._frame=r-1}this._reverse=i}play(e,s,i=!1){this.will_play=()=>this.play_now(e,s,i)}play_o(e,s){this._loop=s.loop??!1,this.play_now(e)}_update(){var i,h;const e=(i=this.animation)==null?void 0:i.frames.length,s=(h=this.frame)==null?void 0:h.duration;e&&s&&(this._frame_counter+=b.delta,this._frame_counter>=s&&(this._frame_counter-=s,this._reverse?(this._frame--,this._frame<0&&(this._loop?this._frame=e-1:this._frame=0,this._on_complete&&this._on_complete(),this.will_play&&(this.will_play(),this.will_play=void 0))):(this._frame++,this._frame>=e&&(this._loop?this._frame=0:this._frame=e-1,this._on_complete&&this._on_complete(),this.will_play&&(this.will_play(),this.will_play=void 0)))))}_draw(e){this.subtexture&&(e.push_matrix(v.create_transform(this.position,this.origin,this.scale,this.rotation)),this.g_position=n.transform(n.zero,e.m_matrix),e.stex(this.subtexture,n.zero,this.alpha_color),e.pop_matrix())}}const ji=t=>t!==void 0,Hi=t=>{const a={get:e=>t.getItem(e),set:(e,s)=>t.setItem(e,s),remove:e=>t.removeItem(e),make:e=>({get:()=>a.get(e),set:s=>a.set(e,s),remove:()=>a.remove(e)}),makeBoolean:e=>({get:()=>a.get(e)=="1",set:s=>a.set(e,s?"1":"0"),toggle:()=>a.set(e,a.get(e)=="1"?"0":"1")})};return a},ma=Hi(window.localStorage),be=(t,a)=>e=>{if(ji(e))return ma.set(t,JSON.stringify(e)),e;const s=JSON.parse(ma.get(t));return s!==null?s:a()},ya={threecards:1,onecard:1.5,nolimit:1,threepass:1.5,onepass:2.2},le=class le{constructor(a,e,s,i){this.win=a,this.score=e,this.turning_cards=s,this.turning_limit=i}get turning_cards_multiplier(){return ya[this.turning_cards]}get turning_limit_multiplier(){return ya[this.turning_limit]}get multiplied_score(){return this.score*(this.turning_cards_multiplier+this.turning_limit_multiplier)}get fen(){return[this.win,this.score,this.turning_cards,this.turning_limit].join("/")}};o(le,"from_fen",a=>{let[e,s,i,h]=a.split("/");return new le(e==="true",parseInt(s),i,h)}),o(le,"from_win",(a,e)=>new le(!0,e,a.cards,a.limit)),o(le,"from_loss",(a,e)=>new le(!1,e,a.cards,a.limit));let He=le;const dt=class dt{constructor(a){this.list=a}get fen(){return this.list.map(a=>a.fen).join("$")}push(a){this.list.push(a)}clear(){this.list.length=0}get total_wins(){return this.list.filter(a=>a.win).length}get total_played(){return this.list.length}get top_5_highscores(){return this.list.sort((a,e)=>e.multiplied_score-a.multiplied_score).slice(0,5)}};o(dt,"from_fen",(a,e)=>new dt(a===""?[]:a.split("$").map(s=>e(s))));let ze=dt;class Xi{constructor(a,e,s){this.solitaire=a,this.freecell=e,this.spider=s}get total_wins(){return this.freecell_total_wins+this.spider_total_wins+this.solitaire_total_wins}get total_played(){return this.freecell_total_played+this.spider_total_played+this.solitaire_total_played}get top_5_highscores(){return[...this.freecell_top_5_highscores,...this.spider_top_5_highscores,...this.solitaire_top_5_highscores].sort((a,e)=>e.multiplied_score-a.multiplied_score).slice(0,5)}get freecell_total_wins(){return this.freecell.total_wins}get freecell_total_played(){return this.freecell.total_played}get freecell_top_5_highscores(){return this.freecell.top_5_highscores}get spider_total_wins(){return this.spider.total_wins}get spider_total_played(){return this.spider.total_played}get spider_top_5_highscores(){return this.spider.top_5_highscores}get solitaire_total_wins(){return this.solitaire.total_wins}get solitaire_total_played(){return this.solitaire.total_played}get solitaire_top_5_highscores(){return this.solitaire.top_5_highscores}}let ua=["nolimit","threepass","onepass"],xa=["threecards","onecard"];class Vi{constructor(){o(this,"_cards");o(this,"_limit");let a="threecards";this._cards=be("cards",()=>a);let e="nolimit";this._limit=be("limit",()=>e)}get cards(){return this._cards()}set cards(a){this._cards(a)}get limit(){return this._limit()}set limit(a){this._limit(a)}get general_settings(){let{limit:a,cards:e}=this;return{limit:a,cards:e}}}class qi{constructor(){o(this,"_music");o(this,"_sound");o(this,"_language");let a="en";this._language=be("language",()=>a),this._sound=be("sound",()=>!0),this._music=be("music",()=>!0)}get music(){return this._music()}set music(a){this._music(a)}get sound(){return this._sound()}set sound(a){this._sound(a)}get language(){return this._language()}set language(a){this._language(a)}}let De=new Vi,ee=new qi;class Ki{constructor(){o(this,"_results");this._results=be("solitaire_results",()=>new ze([]).fen)}set results(a){this._results(a.fen)}get results(){return ze.from_fen(this._results(),He.from_fen)}add_result(a){let e=this.results;e.push(a),this.results=e}clear_results(){let a=this.results;a.clear(),this.results=a}}let mt=new Ki;function wa(t){return new Audio(t)}let Gi=["Win","new_game","auto_flip","drag1","drag2","drag3","cancel","drop","hit","recycle","undo2"];class Wi{constructor(){o(this,"audios");o(this,"musics");o(this,"load",async()=>{this.audios={},Gi.forEach(a=>this.audios[a]=[...Array(4).keys()].map(()=>wa(`./audio/${a}.wav`))),this.musics={},this.musics.main=wa("./music/SoundBox-music.wav")})}play(a){if(!ee.sound)return;let e=this.audios[a],s=e.pop();e.unshift(s),s.play()}stop_music(){this.musics.main.pause()}music(a){if(!ee.music)return;let e=this.musics[a];e.loop=!0,e.play()}}const $=new Wi,oe=1/60,E={seconds:60*oe,half:30*oe,thirds:20*oe,lengths:15*oe,sixth:10*oe,five:5*oe,three:3*oe,one:1*oe},L=n.make(1920,1080),Yi=(t=1)=>()=>{var a=Math.sin(t++)*1e4;return a-Math.floor(a)},ue=Yi();function qa(t,a=ue){return Math.floor(a()*t)}function ka(t=ue){return t()*2-1}function Qi(t,a=ue){return t[qa(t.length,a)]}const N=(t=ue)=>n.make(t(),t()),va=(t=ue)=>n.make(ka(t),ka(t));class Ji extends w{get data(){return this._data}_init(){let a=this.make(R,n.make(0,0),{name:"button_bg"});a.origin=n.make(366,200).scale(1/2),this.make(T,n.make(0,-30),{width:360,height:100,key:this.data.text,center:!0});let e=this;this.make(D,n.make(-366+80,-200+80).scale(1/2),{rect:x.make(0,0,366-80,200-80),on_hover(){a.play_o("hover",{loop:!1})},on_hover_end(){a.play("hover",()=>{a.play("idle")},!0)},on_click_begin(){a.play_o("click",{loop:!1})},on_click(){e.data.on_click()}})}}var Zi=Object.defineProperty,eh=(t,a,e)=>a in t?Zi(t,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[a]=e,S=(t,a,e)=>(eh(t,typeof a!="symbol"?a+"":a,e),e),Yt=["d","c","h","s"],Ka=["A","K","Q","J","T","9","8","7","6","5","4","3","2"],jt=["A","2","3","4","5","6","7","8","9","T","J","Q","K"],th=Yt.flatMap(t=>Ka.map(a=>`${t}${a}`)),ah=t=>{let a=Yt.indexOf(t[0]),e=Ka.indexOf(t[1]);return a*100+e};function ba(t){switch(t[0]){case"d":case"h":return"red";default:return"black"}}function sh(t,a){return jt[jt.indexOf(a[1])-1]===t[1]}function ih(t,a){return ba(t)!=ba(a)}function hh(t){return t[1]==="K"}function rh(t){return t[1]==="A"}var Ga=class{static get deck(){return th.slice(0)}};function nh(t){let a=[];for(let e=0;e=0;a--)this.cards.unshift(t[a])}remove_cards(t){return this.cards.splice(-t)}remove_all(){return this.remove_cards(this.cards.length)}},K=Xe;S(K,"take_n",(t,a)=>new Xe(t.splice(0,a)));S(K,"from_fen",t=>new Xe(nh(t)));var Qt="??",yt=class{constructor(t){this.cards=t}get fen(){return this.cards.join(" ")}get clone(){return new yt(this.cards.slice(0))}get length(){return this.cards.length}get top_card(){return this.cards[this.cards.length-1]}unshift_cards(t){for(let a=t.length-1;a>=0;a--)this.cards.push(t[a])}shift_cards(t){return this.cards.splice(0,t)}add_cards(t){this.cards.push(...t)}remove_cards(t){return this.cards.splice(-t)}remove_all(){return this.remove_cards(this.cards.length)}},rt=yt;S(rt,"from_fen",t=>new yt(t===""?[]:t.split(" ")));S(rt,"backs",t=>new yt([...Array(t).keys()].map(a=>Qt)));var xe=class{constructor(t){o(this,"_data");this.game=t}_set_data(t){return this._data=t,this}},Wa=class{constructor(t,a,e){this.game=t,this.stats=a,this.history=e}get nb_moves(){return this.stats.nb_moves}set nb_moves(t){this.stats.nb_moves=t}get score(){return this.stats.score}set score(t){this.stats.score=t}get pov(){return new Qa(this.game.pov,this.stats,this.history.length)}apply(t,a){let e=new t(this.game)._set_data(a);if(!t.can(this.game.pov,a))return;let s=e.apply();return this.score+=s,this.nb_moves++,this.history.push(e),e}get can_undo(){return this.history.length>0}undo(){if(!this.can_undo)return;let t=this.history.pop(),a=t.undo();return this.score+=a,this.nb_moves++,t}},Ya=Wa;S(Ya,"make",t=>new Wa(t,{score:0,nb_moves:0},[]));var Qa=class{constructor(t,a,e){o(this,"history");this.game=t,this.stats=a,this.history=e}finalize_apply_pov(t){this.game.finalize_apply_pov(t)}get clone(){let t=this.game.clone;return new Qa(t,{...this.stats},this.history)}get nb_moves(){return this.stats.nb_moves}set nb_moves(t){this.stats.nb_moves=t}get score(){return this.stats.score}set score(t){this.stats.score=t}get can_undo(){return this.history>0}apply(t,a){t.apply(this.game,a),this.nb_moves++,this.history++}undo_pov(){this.nb_moves++,this.history--}undo(t){t.undo_pov(this.game)}},B={Recycle:-10,HitStock:0,WasteToTableu:10,WasteToFoundation:30,TableuToFoundation:20,FoundationToTableu:-30,Undo:-80,TableuToTableuFlip:10,TableuToTableuNoFlip:0};function oh(t){let[a,e]=t.split("$");return{cards:a,limit:e}}function lh(t){return[t.cards,t.limit].join("$")}var Jt=class{constructor(t,a,e){this.stock=t,this.waste=a,this.hidden=e}get fen(){return[this.stock.fen,this.waste.fen,this.hidden.fen].join("$")}get pov(){return new es(this.stock.hidden_pov,this.waste,this.hidden.hidden_pov)}get can_hit(){return this.stock.length>0}get can_recycle(){return this.stock.length===0&&this.waste.length+this.hidden.length>0}from_waste(){return{cards:this.waste.remove_cards(1)}}undo_from_waste(t){this.waste.add_cards(t)}hit(t){let a=this.stock.remove_cards(t),e=this.waste.remove_all();return this.hidden.unshift_cards(e),this.waste.add_cards(a),{waste:e,cards:a}}undo_hit(t){let{cards:a,waste:e}=t,s=this.waste.remove_cards(a.length),i=this.hidden.shift_cards(e.length);this.waste.add_cards(i),this.stock.add_cards(s)}recycle(){let t=this.waste.remove_all();return this.hidden.unshift_cards(t),this.stock.add_cards(this.hidden.remove_all()),{waste:t}}undo_recycle(t){let{waste:a}=t;this.hidden.add_cards(this.stock.remove_all());let e=this.hidden.shift_cards(a.length);this.waste.add_cards(e)}},ut=Jt;S(ut,"from_fen",t=>{let[a,e,s]=t.split("$"),i=K.from_fen(a),h=K.from_fen(e),r=K.from_fen(s);return new Jt(i,h,r)});S(ut,"make",t=>new Jt(K.take_n(t,t.length),K.empty,K.empty));var Zt=class{constructor(t,a){this.back=t,this.front=a}get fen(){return[this.back.fen,this.front.fen].join("$")}get pov(){return new ts(this.back.hidden_pov,this.front)}from_tableu(t){let a=this.front.remove_cards(t);if(this.front.length===0){let[e]=this.back.remove_cards(1);return e?(this.front.add_cards([e]),{flip:e,cards:a}):{cards:a}}return{cards:a}}undo_from_tableu(t){if(t.flip){let a=this.front.remove_cards(1);this.back.add_cards(a)}this.front.add_cards(t.cards)}to_tableu(t){this.front.add_cards(t)}undo_to_tableu(t){this.front.remove_cards(t.length)}},xt=Zt;S(xt,"from_fen",t=>{let[a,e]=t.split("$");return new Zt(K.from_fen(a),K.from_fen(e))});S(xt,"make",(t,a)=>new Zt(K.take_n(t,a),K.take_n(t,1)));var wt=class{constructor(t){this.foundation=t}get fen(){return this.foundation.fen}get clone(){return new wt(this.foundation.clone)}get suit(){var t;return(t=this.foundation.top_card)==null?void 0:t[0]}get is_finished(){return this.foundation.length===13}get next_top(){if(!this.suit)return;let t=this.suit,a=jt[this.foundation.length];return`${t}${a}`}get can_from(){let{top_card:t}=this.foundation;if(t)return{cards:[t]}}can_to(t){let[a]=t;return t.length===1&&(this.next_top?a===this.next_top:rh(a))}to_foundation(t){this.foundation.add_cards(t)}undo_to_foundation(t){this.foundation.remove_cards(t.length)}from_foundation(){return{cards:this.foundation.remove_cards(1)}}undo_from_foundation(t){this.foundation.add_cards(t)}},kt=wt;S(kt,"from_fen",t=>{let a=t;return new wt(K.from_fen(a))});S(kt,"make",()=>new wt(K.empty));var st=[...Array(7).keys()],Ea=[...Array(4).keys()],ea=class{constructor(t,a,e,s,i){this.settings=t,this.nb_recycles=a,this.stock=e,this.tableus=s,this.foundations=i}get fen(){let t=lh(this.settings),a=this.stock.fen,e=this.tableus.map(h=>h.fen).join("/"),s=this.foundations.map(h=>h.fen).join("/"),i=this.nb_recycles;return[t,i,a,e,s].join(" ")}get hit_n(){return this.settings.cards==="threecards"?3:1}get pov(){return new as(this.settings,this.nb_recycles,this.stock.pov,this.tableus.map(t=>t.pov),this.foundations)}get recycle_n(){return this.settings.limit==="nolimit"?9999:this.settings.limit==="threepass"?3:1}get can_hit(){return this.stock.can_hit}get can_recycle(){return this.has_recycle_limit&&this.stock.can_recycle}get has_recycle_limit(){return this.recycle_n-this.nb_recycles>0}hit_stock(){return this.stock.hit(this.hit_n)}undo_hit_stock(t){this.stock.undo_hit(t)}recycle(){return this.nb_recycles++,this.stock.recycle()}undo_recycle(t){this.nb_recycles--,this.stock.undo_recycle(t)}tableu_to_tableu(t){let{from:a,to:e,i:s}=t,i=this.tableus[a].from_tableu(s);return this.tableus[e].to_tableu(i.cards),i}undo_tableu_to_tableu(t,a){let{from:e,to:s,i}=t;this.tableus[s].undo_to_tableu(a.cards),this.tableus[e].undo_from_tableu(a)}waste_to_tableu(t){let{to:a}=t,e=this.stock.from_waste();return this.tableus[a].to_tableu(e.cards),e}undo_waste_to_tableu(t,a){let{to:e}=t;this.tableus[e].undo_to_tableu(a.cards),this.stock.undo_from_waste(a.cards)}waste_to_foundation(t){let{to:a}=t,e=this.stock.from_waste();return this.foundations[a].to_foundation(e.cards),e}undo_waste_to_foundation(t,a){let{to:e}=t;this.foundations[e].undo_to_foundation(a.cards),this.stock.undo_from_waste(a.cards)}tableu_to_foundation(t){let{from:a,to:e}=t,s=this.tableus[a].from_tableu(1);return this.foundations[e].to_foundation(s.cards),s}undo_tableu_to_foundation(t,a){let{from:e,to:s}=t;this.foundations[s].undo_to_foundation(a.cards),this.tableus[e].undo_from_tableu(a)}foundation_to_tableu(t){let{from:a,to:e}=t,s=this.foundations[a].from_foundation();return this.tableus[e].to_tableu(s.cards),s}undo_foundation_to_tableu(t,a){let{from:e,to:s}=t;this.tableus[s].undo_to_tableu(a.cards),this.foundations[e].undo_from_foundation(a.cards)}},ta=ea;S(ta,"from_fen",t=>{let[a,e,s,i,h]=t.split(" "),r=oh(a),l=parseInt(e),p=ut.from_fen(s),d=i.split("/").map(f=>xt.from_fen(f)),g=h.split("/").map(f=>kt.from_fen(f));return new ea(r,l,p,d,g)});S(ta,"make",(t,a)=>{let e=st.map(h=>xt.make(a,h)),s=ut.make(a),i=0;return new ea(t,i,s,e,Yt.map(h=>kt.make()))});var Ee=class extends xe{constructor(){super(...arguments);o(this,"data")}get solitaire(){return this.game}apply(){return this.data=this.solitaire.hit_stock(),B.HitStock}undo(){return this.solitaire.undo_hit_stock(this.data),B.Undo}undo_pov(a){a.undo_hit_stock(this.data)}};S(Ee,"can",t=>t.can_hit);S(Ee,"apply",t=>{t.hit_stock()});var Ie=class extends xe{constructor(){super(...arguments);o(this,"data")}get solitaire(){return this.game}apply(){return this.data=this.solitaire.recycle(),B.Recycle}undo(){return this.solitaire.undo_recycle(this.data),B.Undo}undo_pov(a){a.undo_recycle(this.data)}};S(Ie,"can",t=>t.can_recycle);S(Ie,"apply",t=>{t.recycle()});var ce=class extends xe{constructor(){super(...arguments);o(this,"res")}get solitaire(){return this.game}get data(){return this._data}apply(){return this.res=this.solitaire.tableu_to_tableu(this.data),this.res.flip?B.TableuToTableuFlip:B.TableuToTableuNoFlip}undo(){return this.solitaire.undo_tableu_to_tableu(this.data,this.res),B.Undo}undo_pov(a){a.undo_tableu_to_tableu(this.data,this.res)}};S(ce,"can",(t,a)=>{let e=a,s=t.can_drag_tableu(e);return s?t.can_drop_tableu({...a,...s}):!1});S(ce,"apply",(t,a)=>{t.tableu_to_tableu(a)});var pe=class extends xe{constructor(){super(...arguments);o(this,"res")}get solitaire(){return this.game}get data(){return this._data}apply(){return this.res=this.solitaire.waste_to_tableu(this.data),B.WasteToTableu}undo(){return this.solitaire.undo_waste_to_tableu(this.data,this.res),B.Undo}undo_pov(a){a.undo_waste_to_tableu(this.data,this.res)}};S(pe,"can",(t,a)=>{const e=t.can_drag_waste;return e?t.can_drop_tableu({...a,...e}):!1});S(pe,"apply",(t,a)=>{t.waste_to_tableu(a)});var Ja=class extends xe{constructor(){super(...arguments);o(this,"res")}get solitaire(){return this.game}get data(){return this._data}apply(){return this.res=this.solitaire.waste_to_foundation(this.data),B.WasteToFoundation}undo(){return this.solitaire.undo_waste_to_foundation(this.data,this.res),B.Undo}undo_pov(a){a.undo_waste_to_foundation(this.data,this.res)}},H=Ja;S(H,"auto_can",t=>{for(let a=0;a<4;a++)if(Ja.can(t,{to:a}))return{to:a}});S(H,"can",(t,a)=>{const e=t.can_drag_waste;return e?t.can_drop_foundation({...a,...e}):!1});S(H,"apply",(t,a)=>{t.waste_to_foundation(a)});var Za=class extends xe{constructor(){super(...arguments);o(this,"res")}get solitaire(){return this.game}get data(){return this._data}apply(){return this.res=this.solitaire.tableu_to_foundation(this.data),B.TableuToFoundation}undo(){return this.solitaire.undo_tableu_to_foundation(this.data,this.res),B.Undo}undo_pov(a){a.undo_tableu_to_foundation(this.data,this.res)}},X=Za;S(X,"auto_can",(t,a)=>{let{tableu:e}=a;for(let s=0;s<4;s++)if(Za.can(t,{from:e,to:s}))return{from:e,to:s}});S(X,"can",(t,a)=>{const e=t.can_drag_tableu({...a,i:1});return e?t.can_drop_foundation({...a,...e}):!1});S(X,"apply",(t,a)=>{t.tableu_to_foundation(a)});var ke=class extends xe{constructor(){super(...arguments);o(this,"res")}get solitaire(){return this.game}get data(){return this._data}apply(){return this.res=this.solitaire.foundation_to_tableu(this.data),B.FoundationToTableu}undo(){return this.solitaire.undo_foundation_to_tableu(this.data,this.res),B.Undo}undo_pov(a){a.undo_foundation_to_tableu(this.data,this.res)}};S(ke,"can",(t,a)=>{const e=t.can_drag_foundation(a);return e?t.can_drop_tableu({...a,...e}):!1});S(ke,"apply",(t,a)=>{t.foundation_to_tableu(a)});var es=class{constructor(t,a,e){this.stock=t,this.waste=a,this.hidden=e}pov_hit_stock(t){this.waste.remove_cards(t.length),this.waste.add_cards(t)}get can_hit(){return this.stock.length>0}get can_recycle(){return this.stock.length===0&&this.waste.length+this.hidden.length>0}get can_from_waste(){let{top_card:t}=this.waste;if(t)return{cards:[t]}}get clone(){return new es(this.stock.clone,this.waste.clone,this.hidden.clone)}from_waste(){return{cards:this.waste.remove_cards(1)}}undo_from_waste(t){this.waste.add_cards(t)}hit(t){let a=this.stock.remove_cards(t),e=this.waste.remove_all();this.hidden.unshift_cards(e),this.waste.add_cards(a)}undo_hit(t){let{cards:a,waste:e}=t;this.waste.remove_cards(a.length),this.hidden.shift_cards(e.length),this.waste.add_cards(e),this.stock.add_cards(a)}recycle(){let t=this.waste.remove_all();return this.hidden.unshift_cards(t),this.stock.add_cards(this.hidden.remove_all()),{waste:t}}undo_recycle(t){let{waste:a}=t;this.hidden.add_cards(this.stock.remove_all());let e=this.hidden.shift_cards(a.length);this.waste.add_cards(e)}},ts=class{constructor(t,a){this.back=t,this.front=a}pov_flip(t){this.front.remove_cards(1),this.front.add_cards([t])}get clone(){return new ts(this.back.clone,this.front.clone)}can_from(t){let a=this.front.clone;this.back.clone;let e=a.remove_cards(t);if(e.length===t)return{cards:e}}can_to(t){let a=t[0];return a?this.front.length>0?ih(a,this.front.top_card)&&sh(a,this.front.top_card):hh(a):!1}from_tableu(t){let a=this.front.remove_cards(t);if(this.front.length===0){let[e]=this.back.remove_cards(1);return e?(this.front.add_cards([e]),{flip:e,cards:a}):{cards:a}}return{cards:a}}undo_from_tableu(t){if(t.flip){let a=this.front.remove_cards(1);this.back.add_cards(a)}this.front.add_cards(t.cards)}to_tableu(t){this.front.add_cards(t)}undo_to_tableu(t){this.front.remove_cards(t.length)}},as=class{constructor(t,a,e,s,i){this.settings=t,this.nb_recycles=a,this.stock=e,this.tableus=s,this.foundations=i}get clone(){return new as(this.settings,this.nb_recycles,this.stock.clone,this.tableus.map(t=>t.clone),this.foundations.map(t=>t.clone))}get recycle_n(){return this.settings.limit==="nolimit"?9999:this.settings.limit==="threepass"?3:1}get hit_n(){return this.settings.cards==="threecards"?3:1}get has_recycle_limit(){return this.recycle_n-this.nb_recycles>0}get can_hit(){return this.stock.can_hit}get can_recycle(){return this.has_recycle_limit&&this.stock.can_recycle}get is_finished(){return this.foundations.every(t=>t.is_finished)}can_drag_tableu(t){let{from:a,i:e}=t;return this.tableus[a].can_from(e)}can_drop_tableu(t){let{to:a,cards:e}=t;return this.tableus[a].can_to(e)}can_drop_foundation(t){let{to:a,cards:e}=t;return this.foundations[a].can_to(e)}get can_drag_waste(){return this.stock.can_from_waste}can_drag_foundation(t){let{from:a}=t;return this.foundations[a].can_from}hit_stock(){return this.stock.hit(this.hit_n)}undo_hit_stock(t){this.stock.undo_hit(t)}recycle(){return this.nb_recycles++,this.stock.recycle()}undo_recycle(t){this.nb_recycles--,this.stock.undo_recycle(t)}finalize_apply_pov(t){if(t instanceof ce&&t.res.flip){let{from:a}=t.data;this.tableus[a].pov_flip(t.res.flip)}if(t instanceof X&&t.res.flip){let{from:a}=t.data;this.tableus[a].pov_flip(t.res.flip)}t instanceof Ee&&this.stock.pov_hit_stock(t.data.cards)}tableu_to_tableu(t){let{from:a,to:e,i:s}=t,i=this.tableus[a].from_tableu(s);return this.tableus[e].to_tableu(i.cards),i}undo_tableu_to_tableu(t,a){let{from:e,to:s,i}=t;this.tableus[s].undo_to_tableu(a.cards),this.tableus[e].undo_from_tableu(a)}waste_to_tableu(t){let{to:a}=t,e=this.stock.from_waste();return this.tableus[a].to_tableu(e.cards),e}undo_waste_to_tableu(t,a){let{to:e}=t;this.tableus[e].undo_to_tableu(a.cards),this.stock.undo_from_waste(a.cards)}waste_to_foundation(t){let{to:a}=t,e=this.stock.from_waste();return this.foundations[a].to_foundation(e.cards),e}undo_waste_to_foundation(t,a){let{to:e}=t;this.foundations[e].undo_to_foundation(a.cards),this.stock.undo_from_waste(a.cards)}tableu_to_foundation(t){let{from:a,to:e}=t,s=this.tableus[a].from_tableu(1);return this.foundations[e].to_foundation(s.cards),s}undo_tableu_to_foundation(t,a){let{from:e,to:s}=t;this.foundations[s].undo_to_foundation(a.cards),this.tableus[e].undo_from_tableu(a)}foundation_to_tableu(t){let{from:a,to:e}=t,s=this.foundations[a].from_foundation();return this.tableus[e].to_tableu(s.cards),s}undo_foundation_to_tableu(t,a){let{from:e,to:s}=t;this.tableus[s].undo_to_tableu(a.cards),this.foundations[e].undo_from_foundation(a.cards)}};const Ft={s:"spades",d:"diamonds",h:"hearts",c:"clubs"},_h={A:"a",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",T:"t",J:"j",Q:"q",K:"k"};class dh extends w{constructor(){super(...arguments);o(this,"_card");o(this,"rank");o(this,"rsuit");o(this,"suit");o(this,"decsuit")}get waiting(){return this._card===Qt}get card(){return this._card}set card(e){this._card=e,this.rank.play_now(_h[e[1]]),this.suit.play_now(Ft[e[0]]),this.rsuit.play_now(Ft[e[0]]),this.decsuit.forEach(s=>s.play_now(Ft[e[0]]))}_init(){let e=n.make(40,50);this.decsuit=[...Array(3).keys()].map(()=>e=e.add(N().mul(n.make(4,30)).add(n.make(0,30)))).map(i=>{let h=this.make(R,i,{name:"suit"});return h.origin=n.make(32,32),h.play_now("spades"),h.scale=n.one.scale(N().x*.2).add(n.make(.2,.2)),h});let s=[...Array(2).keys()].map(()=>e=e.sub(N().mul(n.make(24,20)).add(n.make(0,30)))).map(i=>{i.x+=120;let h=this.make(R,i,{name:"suit"});return h.origin=n.make(32,32),h.play_now("spades"),h.scale=n.one.scale(N().x*.2).add(n.make(.2,.2)),h});this.decsuit.push(...s),this.rank=this.make(R,n.make(140,32),{name:"rank_2"}),this.rank.origin=n.make(32,32),this.rank.play_now("a"),this.rank.scale=n.make(.6,.6),this.suit=this.make(R,n.make(30,32),{name:"suit"}),this.suit.origin=n.make(32,32),this.suit.play_now("spades"),this.suit.scale=n.make(.6,.6),this.rsuit=this.make(R,n.make(150,210),{name:"suit"}),this.rsuit.origin=n.make(32,32),this.rsuit.rotation=Math.PI,this.rsuit.play_now("spades"),this.rsuit.scale=n.make(.6,.6)}}class ch extends w{constructor(){super(...arguments);o(this,"decoration");o(this,"_will_lerp_t");o(this,"_will_lerp_position");o(this,"_dragging");o(this,"_drag_decay",n.zero);o(this,"_on_drag");o(this,"_on_drop");o(this,"_on_hover");o(this,"_on_click");o(this,"facing");o(this,"anim");o(this,"shadow");o(this,"highlight");o(this,"_will_hover");o(this,"_will_hover_end");o(this,"_will_flip_back");o(this,"_will_flip_front");o(this,"lerp_hover_y");o(this,"_lerp_drag_shadow");o(this,"_tr");o(this,"_tx");o(this,"_ty");o(this,"_target_speed");o(this,"_speed");o(this,"_hover_time");o(this,"_after_ease")}release(){this.lerp_position(),this.unset_dragging(),this.set_highlight(!1),this.bind_click(void 0),this.bind_drag(void 0),this.bind_drop(void 0),this.bind_hover(void 0),this._after_ease=void 0}lerp_release(){this.lerp_position(),this.unset_dragging()}get waiting(){return this.decoration.waiting}get card(){return this.decoration.card}set card(e){this.decoration.card=e,this.waiting?this.anim._animation==="idle"&&(this.anim.play_now("wait"),this.decoration.visible=!1):this.anim._animation==="wait"&&(this.anim.play_now("idle"),this.decoration.visible=!0)}get flipping(){return this.anim._animation==="flip"||this.anim._animation==="back_flip"}get easing(){return!!this._tx||!!this._ty||!!this._tr}lerp_position(e,s){this._tx&&(this.cancel(this._tx),this._tx=void 0),this._ty&&(this.cancel(this._ty),this._ty=void 0),this._will_lerp_position=e,this._will_lerp_t=s,e?this._target_speed=(1-(s||.5))*.2:this._target_speed=0}get drag_decay(){return this._drag_decay}bind_drag(e){this._on_drag=e}bind_drop(e){this._on_drop=e}bind_hover(e){this._on_hover=e}bind_click(e){this._on_click=e}get hover_time(){return this._hover_time??0}ease_rotation(e,s=E.half){this._tr=this.tween_single(this._tr,[this.rotation,e],i=>{this.rotation=i},s,0,()=>{this._tr=void 0})}ease_position(e,s=E.half){e.equals(this.position)||(this._target_speed=s/E.half*.2,this._tx=this.tween_single(this._tx,[this.position.x,e.x],i=>{this.position.x=i},s,0,()=>{this._tx=void 0,this._target_speed=0}),this._ty=this.tween_single(this._ty,[this.position.y,e.y],i=>{this.position.y=i},s,0,()=>{this._ty=void 0}))}set_highlight(e){this.highlight.visible=e}set_dragging(){this._lerp_drag_shadow=0,this._dragging=!0}unset_dragging(){this._dragging=!1}after_ease(e){this._after_ease=e}_init(){this.shadow=this._make(R,n.make(0,0),{name:"card"}),this.shadow.origin=n.make(88,120),this.shadow.play_now("shadow"),this.anim=this.make(R,n.make(0,0),{name:"card"}),this.anim.origin=n.make(88,120),this.facing=-1,this.anim.play_now("back_idle"),this.highlight=this.make(R,n.make(0,0),{name:"card"}),this.highlight.origin=n.make(88,120),this.highlight.play_now("highlight"),this.highlight.visible=!1,this.decoration=this.make(dh,n.make(-80,-120),{}),this.decoration.visible=!1,this.decoration.card=Qt,this._will_hover=!1,this._will_hover_end=!1,this._will_flip_back=!1,this._will_flip_front=!1,this.lerp_hover_y=0,this._dragging=!1,this._speed=0,this._target_speed=0;let e=this;this.make(D,n.make(16,16).sub(this.anim.origin),{rect:x.make(0,0,170,210),on_click(){if(e._on_click)return e._on_click()},on_hover(){return e._on_hover&&e._on_hover[0](),e._on_drag?(e._will_hover=!0,!0):!1},on_hover_end(){e._on_hover&&e._on_hover[1](),e._will_hover_end=!0},on_drag_begin(s){return e._on_drag?(e._lerp_drag_shadow=0,e._dragging=!0,e._drag_decay=s.sub(e.position),!0):!1},on_drag_end(){e._dragging=!1},on_drag(s){return e._on_drag?(e._on_drag(s),!0):!1},on_drop(){e._on_drop&&e._on_drop()}})}_update(){this._speed=he(this._speed,this._target_speed,.2);let e=$i(Math.abs(Math.sin(b.seconds*3)))*this._speed;if(this.scale=n.make(1-e,1+e),this._will_lerp_position&&(this.position=n.lerp(this.position,this._will_lerp_position,this._will_lerp_t??.5)),this._lerp_drag_shadow!==void 0&&(this._dragging?this._lerp_drag_shadow=he(this._lerp_drag_shadow,1,.2):(this._lerp_drag_shadow=he(this._lerp_drag_shadow,0,.2),this._lerp_drag_shadow<.001&&(this._lerp_drag_shadow=void 0))),this._lerp_drag_shadow!==void 0){let s=this._lerp_drag_shadow*.05;this.shadow.scale=n.one.add(n.one.scale(s)),this.shadow.alpha=(1-this._lerp_drag_shadow)*100+155}if(this._after_ease&&!this.easing&&(this._after_ease(),this._after_ease=void 0),this.easing||(this.anim.position.y=he(this.anim.position.y,this.lerp_hover_y,.2),this.decoration.position.y=he(this.decoration.position.y,this.lerp_hover_y-120,.16),this.highlight.position.y=he(this.highlight.position.y,this.lerp_hover_y,.16)),this._will_hover&&(this._will_hover=!1,!this.easing&&!this.flipping&&this._will_flip_back&&this._will_flip_front&&this.anim.play(this.facing===1?"hover":"back_hover"),this.lerp_hover_y=-6,this._hover_time=0),this._will_hover_end){this._will_hover_end=!1;let s=this.waiting?"wait":"idle";!this.easing&&!this.flipping&&this._will_flip_back&&this._will_flip_front&&this.anim.play(this.facing===1?s:"back_idle"),this.lerp_hover_y=0,this._hover_time=void 0}this._hover_time!==void 0&&this._hover_time>=0&&(this.easing&&(this._hover_time=0),this._hover_time+=b.delta),this._will_flip_back&&(this.easing||(this._will_flip_back=!1,this.shadow.visible=!1,this.decoration.visible=!1,this.anim.play_now("flip",()=>{this.facing=-1,this.anim.play("back_idle"),this.shadow.visible=!0}))),this._will_flip_front&&(this.easing||(this._will_flip_front=!1,this.shadow.visible=!1,this.decoration.visible=!1,this.anim.play_now("back_flip",()=>{this.facing=1,this.anim.play(this.waiting?"wait":"idle"),this.shadow.visible=!0,this.waiting||(this.decoration.visible=!0)})))}flip_back(){this._will_flip_front=!1,this._will_flip_back=this.facing!==-1||this.anim._animation==="back_flip"}flip_front(){this._will_flip_back=!1,this._will_flip_front=this.facing!==1||this.anim._animation==="flip"}_draw_shadow(e){e.push_matrix(v.create_transform(this.position,this.origin,this.scale,this.rotation)),this.g_position=n.transform(n.zero,e.m_matrix),this.shadow.draw(e),e.pop_matrix()}}class ss extends w{constructor(){super(...arguments);o(this,"_on_click");o(this,"_on_drop");o(this,"_will_hover");o(this,"_will_hover_end");o(this,"anim")}bind_click(e){this._on_click=e}bind_drop(e){this._on_drop=e}_init(){this.anim=this._make(R,n.make(0,0),{name:"card"}),this.anim.origin=n.make(88,120);let e=this;this.make(D,n.make(16,16).sub(this.anim.origin),{rect:x.make(0,0,170,210),on_hover(){return e._on_drop?(e._will_hover=!0,!0):!1},on_hover_end(){e._will_hover_end=!0},on_drop(){e._on_drop&&e._on_drop()},on_click(){return e._on_click?(e._on_click(),!0):!1}})}_update(){this._will_hover&&(this._will_hover=!1),this._will_hover_end&&(this._will_hover_end=!1)}}class ph extends w{constructor(){super(...arguments);o(this,"frees");o(this,"used");o(this,"_shadow_group")}borrow(){let e=this.frees.shift();return this.used.push(e),e.visible=!0,e}release(e){e.visible=!1,this.used.splice(this.used.indexOf(e),1),e.release(),this.frees.push(e)}set shadow_group(e){this._shadow_group=e}_init(){this.frees=Ga.deck.map(e=>{let s=this.make(ch,n.zero,{});return s.visible=!1,s}),this.used=[]}_draw(e){var s,i;e.push_matrix(v.create_transform(this.position,this.origin,this.scale,this.rotation)),this.g_position=n.transform(n.zero,e.m_matrix),this._draw_children(e),(s=this._shadow_group)==null||s.forEach(h=>{h._draw_shadow(e)}),(i=this._shadow_group)==null||i.forEach(h=>{h.draw(e)}),e.pop_matrix()}}class Te extends w{constructor(){super(...arguments);o(this,"_i_gap");o(this,"cards")}get data(){return this._data}get length(){return this.cards.length}get top_card(){return this.cards[this.cards.length-1]}get h(){let e=55*(1-this.cards.length/50);return this.data.h??e}get top_position(){return this.position.add(n.make(0,this.cards.length*this.h))}set_highlight(e,s){this.cards.slice(this.cards.length-e,this.cards.length).forEach(h=>h.set_highlight(s))}add_cards(e){e.forEach(s=>s.send_front()),this.cards.push(...e),this._reposition()}remove_cards(e){let s=this.cards.splice(this.cards.length-e,this.cards.length);return this._reposition(),s}set i_gap(e){this._i_gap!==e&&(this._i_gap=e,this._reposition())}_reposition(){this.cards.forEach((e,s)=>{let i=this._i_gap!==void 0&&s>this._i_gap?s+.5:s;e.ease_position(this.p_position.add(n.make(0,i*this.h)))})}ease_position(e){this.position=e,this._reposition()}_init(){this.cards=[]}}function fh(t){return 1/(1+Math.exp(-t))}class Rt extends w{constructor(){super(...arguments);o(this,"_waiting",!1);o(this,"_cards")}get waiting(){return this._waiting}wait_drop(){this._waiting=!0}set cards(e){this._cards=e.slice(0),this._cards.forEach(s=>s.send_front()),this._cards.forEach(s=>s.set_dragging())}get drag_decay(){return this._cards[0].drag_decay}get h(){return 50}drag(e){this._cards.forEach((s,i)=>{let h=e.add(n.make(0,this.h*i).sub(this.drag_decay)),r=1-fh(i/this._cards.length*2);s.lerp_position(h,r)})}lerp_release(){let e=this._cards.splice(0);return e.forEach(s=>s.lerp_release()),e}_init(){this._cards=[]}}class gh extends w{constructor(){super(...arguments);o(this,"backs");o(this,"fronts");o(this,"drop_target")}get data(){return this._data}get top_front_position(){return this.fronts.top_position}get top_back_position(){return this.backs.top_position}release_all(){return this.free()}free(){return[...this.backs.remove_cards(this.backs.length),...this.fronts.remove_cards(this.fronts.length)]}add_backs(e){e.forEach(s=>s.flip_back()),this.backs.add_cards(e),this.fronts.ease_position(this.top_back_position)}add_fronts(e){var h;this.fronts.add_cards(e),e.forEach(r=>r.flip_front());let s=this,i=this.fronts.cards.length;this.fronts.cards.forEach((r,l)=>{r.bind_drop(void 0),r.bind_drag(p=>{s.data.on_front_drag(i-l,p)}),r.bind_click(()=>(s.data.on_front_click(i-l),!0))}),(h=this.fronts.top_card)==null||h.bind_drop(()=>{s.data.on_front_drop()}),this.open_drop_target()}remove_fronts(e){var r;let s=this.fronts.remove_cards(e);s.forEach(l=>{l.bind_drop(void 0)});let i=this,h=this.fronts.cards.length;return this.fronts.cards.forEach((l,p)=>{l.bind_drop(void 0),l.bind_drag(d=>{i.data.on_front_drag(h-p,d)}),l.bind_click(()=>(i.data.on_front_click(h-p),!0))}),(r=this.fronts.top_card)==null||r.bind_drop(()=>{i.data.on_front_drop()}),this.open_drop_target(),s}flip_front(e){var h;let[s]=this.backs.remove_cards(1);s.card=e,s.flip_front(),this.fronts.ease_position(this.top_back_position),(h=this.fronts.top_card)==null||h.bind_drop(void 0),this.fronts.add_cards([s]);let i=this;this.fronts.top_card.bind_drag(r=>{i.data.on_front_drag(1,r)}),this.fronts.top_card.bind_drop(()=>{i.data.on_front_drop()}),this.fronts.top_card.bind_click(()=>(i.data.on_front_click(1),!0))}get empty(){return this.fronts.length===0&&this.backs.length===0}open_drop_target(){this.drop_target.visible=this.empty}flip_back(){let[e]=this.fronts.remove_cards(1);e.flip_back(),this.backs.add_cards([e]),this.fronts.ease_position(this.top_back_position),e.bind_drop(void 0)}_init(){this.drop_target=this.make(ss,n.make(0,0),{}),this.drop_target.bind_drop(()=>{this.data.on_front_drop()}),this.drop_target.bind_click(()=>(this.data.on_front_click(1),!0)),this.backs=this.make(Te,n.make(0,0),{h:33}),this.fronts=this.make(Te,n.make(0,0),{}),this.open_drop_target()}_update(){let e=this.fronts.cards.findIndex(s=>s.hover_time>E.thirds);e!==-1?this.fronts.i_gap=e:this.fronts.i_gap=void 0}}const Ct=t=>typeof t=="object"&&t.foundation!==void 0,mh=t=>typeof t=="object"&&typeof t.tableu=="number";class yh extends w{constructor(){super(...arguments);o(this,"anim")}get data(){return this._data}disable(){this.anim.play("disabled")}enable(){this.anim.play("idle")}_init(){let e=this.make(R,n.make(0,0),{name:"recycle"});this.anim=e;let s=this;this.make(D,n.make(20,20),{rect:x.make(0,0,140,160),on_hover(){e._animation!=="disabled"&&e.play("hover")},on_hover_end(){e._animation!=="disabled"&&e.play("idle")},on_click(){s.data.on_recycle()}})}}const uh=(t,a)=>{for(let e=t.length-1;e>=0;e--)a(t[e])};class xh extends w{constructor(){super(...arguments);o(this,"stock");o(this,"waste");o(this,"waste_hidden")}get data(){return this._data}get can_recycle(){return this.stock.length===0}release_all(){return this.free()}free(){return[...this.stock.remove_cards(this.stock.length),...this.waste.remove_cards(this.waste.length),...this.waste_hidden.remove_cards(this.waste_hidden.length)]}add_waste_hidden(e){e.forEach(s=>s.flip_back()),this.waste_hidden.add_cards(e)}add_waste(e){e.forEach(s=>{s.bind_drop(void 0),s.bind_drag(void 0),s.bind_click(void 0)}),this.waste.add_cards(e),e.forEach((s,i)=>s.flip_front()),this.bind_new_front()}add_stocks(e){e.forEach(s=>s.flip_back()),this.stock.add_cards(e)}remove_waste(e){return this.waste.remove_cards(e)}bind_new_front(){var e,s;this.waste.cards.forEach(i=>{i.bind_drag(void 0),i.bind_click(void 0)}),(e=this.waste.top_card)==null||e.bind_drag(i=>{this.data.on_front_drag(i)}),(s=this.waste.top_card)==null||s.bind_click(()=>(this.data.on_waste_click(),!0))}undo_hit(e,s){let i=this.waste.remove_cards(e.length),h=this.waste_hidden.remove_cards(s.length);this.waste.add_cards(h),h.forEach((r,l)=>{r.card=s[l],r.flip_front()}),i.forEach(r=>{r.flip_back(),r.bind_click(void 0),r.bind_drag(void 0)}),this.stock.add_cards(i),this.bind_new_front()}hit(e){let s=this.stock.remove_cards(e.length);s.forEach((h,r)=>h.card=e[r]),s.forEach((h,r)=>h.flip_front());let i=this.waste.remove_cards(this.waste.cards.length);i.forEach(h=>{h.flip_back(),h.bind_drag(void 0),h.bind_click(void 0)}),this.waste_hidden.add_cards(i),this.waste.add_cards(s),uh(this.waste_hidden.cards,h=>h.send_back()),this.bind_new_front(),$.play("hit")}recycle(){let e=this.waste.remove_cards(this.waste.length);this.waste_hidden.add_cards(e);let s=this.waste_hidden.remove_cards(this.waste_hidden.length);s.forEach(i=>{i.bind_drag(void 0),i.bind_click(void 0)}),s.forEach(i=>i.flip_back()),s.forEach(i=>i.send_front()),this.stock.add_cards(s),$.play("recycle")}undo_recycle(e){let s=this.stock.remove_cards(this.stock.length);this.waste_hidden.add_cards(s);let i=this.waste_hidden.remove_cards(e);s.forEach(h=>h.flip_front()),i.forEach(h=>h.flip_front()),this.waste.add_cards(i)}_init(){this.stock=this.make(Te,n.make(0,0),{h:1}),this.waste=this.make(Te,n.make(0,260),{}),this.waste_hidden=this.make(Te,n.make(0,300),{h:0});let e=this;this.make(D,n.make(-64,-80),{rect:x.make(0,0,160,210),on_click(){e.stock.length>0&&e.data.on_hit()}})}}class wh extends w{constructor(){super(...arguments);o(this,"foundation");o(this,"drop_target")}get data(){return this._data}release_all(){return this.free()}free(){return this.remove_cards(this.foundation.length)}add_cards(e){var s,i;this.foundation.add_cards(e),(s=this.foundation.top_card)==null||s.bind_drag(h=>this.data.on_front_drag(h)),(i=this.foundation.top_card)==null||i.bind_click(()=>this.data.on_front_click())}remove_cards(e){return this.foundation.remove_cards(e)}_init(){this.drop_target=this.make(ss,n.make(0,0),{}),this.drop_target.bind_drop(()=>{this.data.on_front_drop()}),this.drop_target.bind_click(()=>(this.data.on_front_click(),!0)),this.foundation=this.make(Te,n.make(0,0),{h:0})}}class kh extends w{constructor(){super(...arguments);o(this,"recycle_view");o(this,"cards");o(this,"dealer");o(this,"stock");o(this,"tableus");o(this,"foundations");o(this,"dragging");o(this,"drag_source");o(this,"click_source");o(this,"back_res");o(this,"trigger_auto",-2)}get game_pov(){return this.back_res.game_pov}get pov(){return this.game_pov.game}get cmd(){return this.back_res.cmd}_init(){let e=this;this.make(D,n.zero,{rect:x.make(0,0,1920,1080),on_up(){e.dragging&&!e.dragging.waiting&&e._release_cancel_drag()},on_click(){e.click_source&&e._release_cancel_highlight()}}),this.recycle_view=this.make(yh,n.make(40,200),{on_recycle(){e.stock.can_recycle&&e.cmd(Ie)}}),this.cards=this.make(ph,n.zero,{});let s=120,i=320;this.stock=this.make(xh,n.make(s,i),{on_waste_click(){if(e.click_source==="waste"){e._release_cancel_highlight();let f=H.auto_can(e.pov);f&&(e.trigger_auto=-1,e.cmd(H,f));return}e._release_cancel_highlight(),e.stock.waste.top_card.set_highlight(!0),e.click_source="waste"},on_hit(){e.cmd(Ee)},on_front_drag(f){if(e._release_cancel_highlight(),e.dragging)e.dragging.drag(f);else{if(e.trigger_auto!==-2)return;if(e.pov.can_drag_waste){let m=e.stock.remove_waste(1);e.dragging=e.make(Rt,n.zero,{}),e.dragging.cards=m,e.cards.shadow_group=m,e.drag_source="waste",$.play("drag1")}}}});let h=350,r=180,l=200;this.tableus=st.map(f=>this.make(gh,n.make(h+l*f,r),{on_front_click(m){if(!e.click_source)e._release_cancel_highlight(),e.tableus[f].fronts.set_highlight(m,!0),e.click_source={tableu:f,i:m};else if(e.click_source==="waste")e.cmd(pe,{to:f});else{let{tableu:u,i:k}=e.click_source;if(u===f){if(m===1){e._release_cancel_highlight();let A=X.auto_can(e.pov,{tableu:u});A&&(e.trigger_auto=-1,e.cmd(X,A));return}e._release_cancel_highlight(),e.tableus[f].fronts.set_highlight(m,!0),e.click_source={tableu:f,i:m};return}e.cmd(ce,{from:u,to:f,i:k})}},on_front_drag(m,u){if(e.dragging)e.dragging.drag(u);else{if(e._release_cancel_highlight(),e.trigger_auto!==-2)return;if(e.pov.can_drag_tableu({from:f,i:m})){let k=e.tableus[f].remove_fronts(m);e.dragging=e.make(Rt,n.zero,{}),e.dragging.cards=k,e.cards.shadow_group=k,e.drag_source={tableu:f,i:m};let A=Math.min(3,Math.floor(m/3)+1);$.play(`drag${A}`)}}},on_front_drop(){if(e.drag_source==="waste")e.dragging.wait_drop(),e.cmd(pe,{to:f});else if(Ct(e.drag_source)){let{foundation:m}=e.drag_source;e.dragging.wait_drop(),e.cmd(ke,{from:m,to:f})}else if(e.drag_source){let{tableu:m,i:u}=e.drag_source;e.dragging.wait_drop(),e.cmd(ce,{from:m,to:f,i:u})}}}));let p=1790,d=166,g=240;this.foundations=Ea.map(f=>this.make(wh,n.make(p,d+g*f),{on_front_click(){if(e.click_source==="waste")e.cmd(H,{to:f});else if(e.click_source){let{tableu:m,i:u}=e.click_source;u===1&&e.cmd(X,{from:m,to:f,i:1})}},on_front_drag(m){if(e._release_cancel_highlight(),e.dragging)e.dragging.drag(m);else{if(e.trigger_auto!==-2)return;if(e.pov.can_drag_foundation({from:f})){let u=e.foundations[f].remove_cards(1);e.dragging=e.make(Rt,n.zero,{}),e.dragging.cards=u,e.cards.shadow_group=u,e.drag_source={foundation:f},$.play("drag1")}}},on_front_drop(){if(e.drag_source==="waste")e.dragging.wait_drop(),e.cmd(H,{to:f});else if(!Ct(e.drag_source)){if(e.drag_source){let{tableu:m,i:u}=e.drag_source;u===1&&(e.dragging.wait_drop(),e.cmd(X,{from:m,to:f,i:1}))}}}})),this.dealer=this.make(zh,n.zero,{on_shuffle(){e.dealer.cards.forEach(f=>e.cards.release(f))}})}_release_cancel_highlight(){if(this.click_source)if(this.click_source==="waste")this.stock.waste.top_card.set_highlight(!1),this.click_source=void 0;else{let{tableu:e,i:s}=this.click_source;this.tableus[e].fronts.set_highlight(s,!1),this.click_source=void 0}else return}_release_cancel_drag(){if(!this.dragging){this._release_cancel_highlight();return}let e=this.dragging.lerp_release();if(this.drag_source==="waste")this.stock.add_waste(e);else if(Ct(this.drag_source)){let{foundation:s}=this.drag_source;this.foundations[s].add_cards(e)}else{let{tableu:s,i}=this.drag_source;this.tableus[s].add_fronts(e)}this.dragging.dispose(),this.dragging=void 0,this.drag_source=void 0,$.play("cancel"),e[0].after_ease(()=>{this.cards.shadow_group=void 0})}_collect_pov(){this._init_pov()}_init_pov(){let{pov:e,stock:s,tableus:i,foundations:h}=this;st.map(r=>{i[r].release_all().forEach(p=>this.cards.release(p))}),s.release_all().forEach(r=>this.cards.release(r)),Ea.map(r=>{h[r].release_all().forEach(p=>this.cards.release(p))}),this.drag_source=void 0,this.click_source=void 0,this._refresh_recycle(),s.add_waste_hidden(e.stock.hidden.cards.map(r=>this.cards.borrow())),s.add_stocks(e.stock.stock.cards.map(r=>this.cards.borrow())),s.add_waste(e.stock.waste.cards.map(r=>{let l=this.cards.borrow();return l.card=r,l})),st.map(r=>{let l=i[r],p=e.tableus[r];l.add_backs(p.back.cards.map(d=>this.cards.borrow())),l.add_fronts(p.front.cards.map(d=>{let g=this.cards.borrow();return g.card=d,g}))})}_refresh_recycle(){this.pov.can_hit?this.recycle_view.visible=!1:this.recycle_view.visible=!0,this.pov.can_recycle?this.recycle_view.enable():this.recycle_view.disable()}new_game(){this._collect_pov()}undo(e){if($.play("undo2"),e instanceof Ee)this.stock.undo_hit(e.data.cards,e.data.waste),this._refresh_recycle();else if(e instanceof Ie)this.stock.undo_recycle(e.data.waste.length),this._refresh_recycle();else if(e instanceof ce){let{flip:s}=e.res,{from:i,to:h,i:r}=e.data;s&&this.tableus[i].flip_back();let l=this.tableus[h].remove_fronts(r);this.tableus[i].add_fronts(l)}else if(e instanceof pe){let{to:s}=e.data,i=this.tableus[s].remove_fronts(1);this.stock.add_waste(i)}else if(e instanceof X){let{flip:s}=e.res,{from:i,to:h}=e.data;s&&this.tableus[i].flip_back();let r=this.foundations[h].remove_cards(1);this.tableus[i].add_fronts(r)}else if(e instanceof H){let{to:s}=e.data,i=this.foundations[s].remove_cards(1);this.stock.add_waste(i)}else if(e instanceof ke){let{from:s,to:i}=e.data,h=this.tableus[i].remove_fronts(1);this.foundations[s].add_cards(h)}}apply(e){let s;if(e instanceof Ee)this._release_cancel_highlight(),this.stock.hit(e.data.cards),this._refresh_recycle();else if(e instanceof Ie)this.stock.recycle(),this._refresh_recycle();else if(e instanceof ce){let{flip:i}=e.res,{from:h,to:r,i:l}=e.data,p;if(this.dragging){let d=this.dragging.lerp_release();this.tableus[r].add_fronts(d),s=d}else if(this.click_source&&mh(this.click_source)){let{tableu:d,i:g}=this.click_source;this._release_cancel_highlight();let f=this.tableus[d].remove_fronts(g);this.tableus[r].add_fronts(f),p=f}i&&(this.tableus[h].flip_front(i),p&&p.forEach(d=>d.send_front()))}else if(e instanceof pe){let{to:i}=e.data;if(this.dragging){let h=this.dragging.lerp_release();this.tableus[i].add_fronts(h),this.stock.bind_new_front(),s=h}else{this._release_cancel_highlight();let h=this.stock.remove_waste(1);this.tableus[i].add_fronts(h),this.stock.bind_new_front()}}else if(e instanceof X){let{flip:i}=e.res,{from:h,to:r}=e.data;if(this.dragging){let l=this.dragging.lerp_release();this.foundations[r].add_cards(l),s=l}else{this._release_cancel_highlight();let l=this.tableus[h].remove_fronts(1);this.foundations[r].add_cards(l)}i&&this.tableus[h].flip_front(i)}else if(e instanceof H){let{to:i}=e.data;if(this.dragging){let h=this.dragging.lerp_release();this.foundations[i].add_cards(h),s=h}else{this._release_cancel_highlight();let h=this.stock.remove_waste(1);this.foundations[i].add_cards(h)}this.stock.bind_new_front()}else if(e instanceof ke){let{from:i,to:h}=e.data,r=this.dragging.lerp_release();this.tableus[h].add_fronts(r),this.stock.bind_new_front(),s=r}s&&(this.dragging.dispose(),this.dragging=void 0,this.drag_source=void 0,s[0].after_ease(()=>{this.cards.shadow_group=void 0})),(e instanceof X||e instanceof H)&&(this.trigger_auto===-1&&$.play("auto_flip"),this.trigger_auto===-3&&($.play("auto_flip"),this.trigger_auto=-1))}apply_pov(e,s){}cant(e,s){e===ke?this._release_cancel_drag():e===pe?this._release_cancel_drag():e===H?this._release_cancel_drag():e===ce?this._release_cancel_drag():e===X?this._release_cancel_drag():e===H?this._release_cancel_drag():console.log("cant",e)}cant_undo(){}request_undo(){this.back_res.undo()}request_new_game(){this.back_res.new_game()}_update(){if(this.trigger_auto===-1)this.trigger_auto=E.thirds;else if(this.trigger_auto>0)this.trigger_auto=$t(this.trigger_auto,0,b.delta);else if(this.trigger_auto===0){this.trigger_auto=-2;let e=H.auto_can(this.pov);if(e)this.cmd(H,e),this.trigger_auto=-3;else for(let s=0;s<7;s++){let i=X.auto_can(this.pov,{tableu:s});if(i){this.cmd(X,i),this.trigger_auto=-3;break}}}}}const vh=async(t,a,e,s)=>{let i=Je,h=await i.get_pov();return{get game_pov(){return h},cmd(r,l){r.can(h.game,l)?(h.apply(r,l),t.apply_pov(r,l),i.apply(r,l).then(p=>{p?(t.apply(p),h.finalize_apply_pov(p),i.get_pov().then(d=>a(d.score)),i.get_pov().then(d=>{d.game.is_finished&&s(d.game.settings,d.score)})):t.cant(r,l)})):t.cant(r,l)},undo(){h.can_undo?(h.undo_pov(),i.undo().then(r=>{r?(h.undo(r),t.undo(r),i.get_pov().then(l=>a(l.score))):t.cant_undo()})):t.cant_undo()},async new_game(){i.get_pov().then(r=>{let l=r.score;l>0&&(r.game.is_finished||mt.add_result(He.from_loss(r.game.settings,l)))}),Je=new nt,i=Je,h=await Je.get_pov(),t.new_game(),i.get_pov().then(r=>a(r.score)),i.get_pov().then(r=>e(r.game.settings))}}},ct=class ct{constructor(){o(this,"game");let a=ta.make(De.general_settings,bh(Ga.deck));this.game=Ya.make(a)}async get_pov(){return this.game.pov.clone}async apply(a,e){return await this.game.apply(a,e)}async undo(){return await this.game.undo()}};o(ct,"resume",()=>new ct);let nt=ct,Je=new nt;function bh(t){for(var a=t.length-1;a>0;a--){var e=Math.floor(Math.random()*(a+1)),s=t[a];t[a]=t[e],t[e]=s}return t}let Eh=[...Array(50).keys()].map(()=>N().mul(L.scale(.8)));class Th extends w{constructor(){super(...arguments);o(this,"_timer");o(this,"_cards",[]);o(this,"end_on_final_ease")}get data(){return this._data}set cards(e){this._cards=e,e.length>0&&(this._timer=E.seconds*.5)}_update(){if(this.end_on_final_ease&&this._cards.every(e=>!e.easing)&&(this.end_on_final_ease=void 0,this.data.on_end()),b.on_interval(E.three)&&this._timer)if(this._timer-=b.delta,this._timer<0)this._timer=void 0,this.end_on_final_ease=!0,this._cards.forEach((e,s)=>{e.ease_position(n.make(L.x/2,L.y*.8),E.half+E.half*(s/this._cards.length))});else{let e=Qi(Eh),s=va(),i=n.max(n.min(e.add(s.scale(100)),L),n.zero);for(let h=0;h<3;h++)this._cards.filter(r=>!r.easing).sort((r,l)=>r.position.distance(e)-l.position.distance(e)).slice(0,2+qa(2)).forEach((r,l)=>{r.ease_position(i.add(va().scale(l*5)),E.half+ue()*3*E.sixth)})}this._cards.forEach(e=>e.update())}_draw(e){this._cards.forEach(s=>s.draw(e))}}function Ta(t,a=ue){let e,s,i;for(s=t.length;s;)e=a()*s--|0,i=t[s],t[s]=t[e],t[e]=i;return t}function*Ah(t){let a=t.length,e=1;for(;e0;){e=Math.floor(e/3);for(let s=1;s<=e;s++)yield*Mh(t,s,e)}}function*Mh(t,a,e){let s=t.length;for(let i=a+e;i=e&&t[h]{let e=t/(a-1)*Math.PI;e=Li(e/Math.PI,-Math.PI*.2,Math.PI*.2)-Math.PI*.5;let s=L.scale(1/2).sub(n.up.scale(1200)),i=s.add(n.from_angle(e,1400)),h=i.sub(s).normal.angle+Math.PI/2;return[i,h]};class Sh extends w{constructor(){super(...arguments);o(this,"_cards",[]);o(this,"layer");o(this,"_sort_shot");o(this,"flip_i");o(this,"final");o(this,"end_on_final_ease")}get data(){return this._data}set cards(e){this._cards=e,e.length>0&&this._begin_lay()}_begin_lay(){Ta(this._cards),this.layer=[0,Ta(this._cards.map((e,s)=>s))]}_begin_sort(){let e=this._cards.map(l=>l.card?ah(l.card):-1);this._sort_shot=[];let s=Ah(e),i=Math.floor(e.length/3),h=0,r=this._cards.slice(0);for(let l of s){let[p,d]=l,g=r[p];r[p]=r[d],r[d]=g,h++>3&&h%i===0&&this._sort_shot.unshift(r.slice(0))}this._sort_shot.unshift(r)}_begin_flip(){this.flip_i=0}_update(){if(this.layer){let[e,s]=this.layer;for(let i=0;i<1;i++){if(e>=s.length){this._cards.every(h=>!h.easing)&&(this.layer=void 0,this._begin_sort());break}if(b.on_interval(E.three)){let[h,r]=Ut(e,this._cards.length);this._cards[e].ease_position(h),this._cards[e].ease_rotation(r),e++}}this.layer&&(this.layer[0]=e)}if(this._sort_shot){if(this._sort_shot.length===0)this._sort_shot=void 0,this._begin_flip();else if(b.on_interval(E.sixth)){let e=this._sort_shot.pop();this._cards.forEach((s,i)=>{let h=e.findIndex(r=>r===s);if(i!==h){let[r,l]=Ut(h,this._cards.length);this._cards[i].ease_position(r),this._cards[i].ease_rotation(l)}}),this._cards=e}}this.flip_i!==void 0&&b.on_interval(E.three)&&(this._cards[this.flip_i].flip_back(),this.flip_i++,this.flip_i>=this._cards.length&&(this.flip_i=void 0,this.final=!0)),this.final&&(this.final=void 0,this.end_on_final_ease=!0,this._cards.forEach(e=>{let[s,i]=Ut(2,5);e.ease_position(s),e.ease_rotation(i)})),this.end_on_final_ease&&this._cards.every(e=>!e.easing)&&(this.end_on_final_ease=void 0,this.data.on_layout()),this._cards.forEach(e=>e.update())}_draw(e){this._cards.forEach(s=>s.draw(e))}}class zh extends w{constructor(){super(...arguments);o(this,"_cards");o(this,"shuffler");o(this,"laydeck")}get data(){return this._data}get cards(){return this._cards}set cards(e){this._cards=e}_init(){let e=this;this.laydeck=this.make(Sh,n.make(0,0),{on_layout(){e.laydeck.cards=[],e.begin_shuffle()}}),this.shuffler=this.make(Th,n.make(0,0),{on_end(){e.shuffler.cards=[],e.data.on_shuffle()}})}begin_laydeck(){this.laydeck.cards=this._cards}begin_shuffle(){this.shuffler.cards=this._cards}}class Fh extends w{constructor(){super(...arguments);o(this,"_score");o(this,"score_text");o(this,"score_text_shadow")}set score(e){this._score=e,this.score_text.text=`${e}`,this.score_text_shadow.text=`${e}`}get score(){return this._score}_init(){this._score=0,this.make(T,n.make(0,25),{key:"score",width:80,height:100}),this.score_text_shadow=this.make(T,n.make(100,6),{no_trans:!0,key:`${this.score}`,width:180,height:100,color:y.black}),this.score_text=this.make(T,n.make(100,0),{no_trans:!0,key:`${this.score}`,width:180,height:100})}}class Rh extends w{get data(){return this._data}_init(){[N().mul(L),N().mul(L),N().mul(L),N().mul(L),N().mul(L),N().mul(L),N().mul(L),N().mul(L),N().mul(L),N().mul(L),N().mul(L)].forEach(e=>{let s=this.make(R,e,{name:"swiggle"});s.origin=n.make(600,400),s.scale=n.one.scale(.5+N().x),N().y<.5&&s.play("small"),s.rotation=N().y*Math.PI});let a=this;this.make(D,n.zero,{rect:x.make(0,0,1920,1080),on_hover(){return!0},on_drag(){return!0},on_click(){return a.data.on_close(),!0}})}}class Ch extends w{constructor(){super(...arguments);o(this,"cards");o(this,"limit")}set settings(e){this.cards.text=e.cards,this.limit.text=e.limit}_init(){this.make(T,n.make(0,0),{no_trans:!0,key:"Solitaire",width:350,height:64,color:y.white}),this.cards=this.make(T,n.make(350,5),{key:"one_pass",width:350,height:40,color:y.white}),this.limit=this.make(T,n.make(550,5),{key:"no_limit",width:350,height:40,color:y.white})}}class Uh extends w{constructor(){super(...arguments);o(this,"ax",0);o(this,"ay",0);o(this,"vx",0);o(this,"vy",0)}get data(){return this._data}_init(){let e=Math.random()<.3?"2":"",s=this.make(R,n.make(0,0),{name:"confetti"+e});s.play_o("idle",{loop:!0});let i=.5+Math.random()*.8;s.scale=n.make(i,i),s.rotation=Math.PI*Math.random(),this.vx=100+Math.random()*100,this.vy=-100+Math.random()*100,this.vx*=this.data.sign,this.ax=this.vx*10,this.ay=this.vy*10}_update(){this.position.x+=this.vx*b.delta,this.position.y+=this.vy*b.delta,this.position.x+=this.ax*b.delta,this.position.y+=this.ay*b.delta,this.ax=$t(this.ax,0,b.delta*1e3),this.ay=$t(this.ay,0,b.delta*1e3),this.position.x>2e3&&this.dispose()}}class Aa extends w{constructor(){super(...arguments);o(this,"life",0)}get data(){return this._data}_init(){if(this.pop_confetti(),this.data.sign<0){let e=this.make(R,n.make(0,700),{name:"confbar"});this.tween([Math.PI,0,Math.PI*.3,Math.PI*.16,0],s=>e.rotation=s,[E.half,E.lengths,E.thirds,E.thirds])}else{let e=this.make(R,n.make(1920,700),{name:"confbar"});e.scale=n.make(-1,1),this.tween([-Math.PI,0,-Math.PI*.3,-Math.PI*.16,0],s=>e.rotation=s,[E.half,E.lengths,E.thirds,E.thirds])}}_update(){this.life<6&&b.on_interval(E.seconds*2)&&(this.pop_confetti(),this.life++)}pop_confetti(){for(let e=0;e<6;e++)this.make(Uh,n.make(this.data.sign>0?-500+e*100:1920-e*100,1080-e*300*Math.random()),{sign:this.data.sign})}}class Ma extends w{pop(){$.play("Win"),this.make(Aa,n.make(0,0),{sign:1}),this.make(Aa,n.make(0,0),{sign:-1})}}class Oh extends w{get data(){return this._data}_init(){let a=1200,e=300;this.make(Ke,n.make(1920/2-a/2,520),{name:"panel_bg_nine_slice",w:a,h:e}),this.make(T,n.make(1920/2,590),{key:"congratz",width:450,height:100,color:y.white,center:!0}),this.make(T,n.make(1920/2,700),{key:`you_finished_with_score%${this.data.score}%`,width:650,height:60,color:y.white,center:!0})}}class it extends w{constructor(){super(...arguments);o(this,"hamburger");o(this,"sidebar");o(this,"overlay");o(this,"over_confetties",[])}set sidebar_open(e){this.sidebar.open=e,this.overlay.visible=e,this.hamburger.open=e}_init(){let e;this.make(Vh,n.zero,void 0),this.over_confetties.push(this.make(Ma,n.make(0,0),{}));let s=this.make(kh,n.make(0,0),{});this.over_confetties.push(this.make(Ma,n.make(0,0),{})),this.make(Ji,n.make(160,1e3),{text:"undo",on_click(){s.request_undo()}});let i=this.make(Ch,n.make(640,16),{}),h=this.make(Fh,n.make(16,860),{});const r=u=>{h.score=u};let l;vh(s,r,u=>{i.settings=u,l&&(l.dispose(),l=void 0),$.play("new_game")},(u,k)=>{this.game_over_confetti_pop(),l=this.make(Oh,n.make(0,0),{score:k}),mt.add_result(He.from_win(u,k))}).then(u=>{s.back_res=u,s._collect_pov(),$.music("main"),i.settings=u.game_pov.game.settings});let g=this,f=this.make(Rh,n.zero,{on_close(){g.sidebar_open=!1,g.hamburger.open=!1}}),m=this.make(Nh,n.make(2,2),{on_open:u=>{g.sidebar_open=u}});e=this.make(Dh,n.make(-600,180),{on_new_game(){s.request_new_game(),g.sidebar_open=!1}}),this.sidebar=e,this.overlay=f,this.hamburger=m,this.sidebar_open=!1}game_over_confetti_pop(){this.over_confetties.forEach(e=>e.pop())}}class Dh extends w{constructor(){super(...arguments);o(this,"_t_x");o(this,"_open")}get data(){return this._data}set open(e){this._open=e,this._t_x&&this.cancel(this._t_x),e?this._t_x=this.tween([this.position.x,0],s=>{this.position.x=s},E.sixth,0,()=>{this._t_x=void 0}):this._t_x=this.tween([this.position.x,-600],s=>{this.position.x=s},E.sixth,0,()=>{this._t_x=void 0})}_init(){this._open=!1;let e=this,s=this.make(R,n.make(0,-100),{name:"side_menu_bg"});s.scale=n.make(1.4,1.4);let i=20,h=60,r=160;this.make(Ce,n.make(i,h),{text:"main_menu",on_click(){q.next(Fe)}}),this.make(Ce,n.make(i,h+r),{text:"new_game",on_click(){e.data.on_new_game()}}),this.make(Ce,n.make(i,h+r*2),{text:"settings",on_click(){q.next(ls,n.zero,{selected_index:1,on_back:it})}}),this.make(Ce,n.make(i,h+r*3),{text:"how_to_play",on_click(){q.next(ns,n.zero,{selected_index:0,on_back:it})}}),this.make(Ce,n.make(i,h+r*4),{text:"about",on_click(){q.next(rs,n.zero,{on_back:it})}})}}class Ce extends w{constructor(){super(...arguments);o(this,"_t_color");o(this,"_i_color");o(this,"bg");o(this,"fg")}get data(){return this._data}get i_color(){return this._i_color}set i_color(e){this._i_color=e,this.bg.color=y.lerp(y.white,y.hex(2106417),this._i_color),this.fg.color=y.lerp(y.white,y.hex(2106417),1-this._i_color)}set hover(e){this._t_color&&this.cancel(this._t_color),e?this._t_color=this.tween([this.i_color,0],s=>{this.i_color=s},E.sixth,0,()=>{this._t_color=void 0}):this._t_color=this.tween([this.i_color,1],s=>{this.i_color=s},E.sixth,0,()=>{this._t_color=void 0})}_init(){this._i_color=0,this.bg=this.make(j,n.make(-20,-40),{w:412,h:120,color:y.hex(2106417)}),this.fg=this.make(T,n.make(0,0),{key:this.data.text,width:350,height:100,color:y.white});let e=360,s=120,i=this;this.make(D,n.make(-20,-40),{rect:x.make(0,0,e,s),on_hover(){i.hover=!0},on_hover_end(){i.hover=!1},on_click(){return i.data.on_click(),!0}})}}class Nh extends w{constructor(){super(...arguments);o(this,"_open");o(this,"anim")}get data(){return this._data}set open(e){this._open=e,this._open?this.anim.play("open"):this.anim.play("idle")}_init(){this._open=!1;let e=this.make(R,n.make(0,0),{name:"hmg_bg"});this.anim=e;let s=200,i=100,h=this;this.make(D,n.make(20,20),{rect:x.make(0,0,s,i),on_hover(){e.play(h._open?"open_hover":"hover")},on_hover_end(){e.play(h._open?"open":"idle")},on_click(){return h.open=!h._open,h.data.on_open(h._open),!0}})}}const Ph=`en=english how_to_play=how to play statistics=statistics settings=settings @@ -401,5 +401,5 @@ Eğlenceli bir şekilde zaman geçirmek için 3 solitaire oyunu. [Solitaire]"htt `;let is={en:$h,tr:Bh},hs={en:Ph,tr:Lh,fr:Ih};const Ne=Object.keys(hs),jh=Object.keys(is);let Pe={},Ht={};Ne.forEach(t=>Pe[t]=Hh(hs[t]));jh.forEach(t=>Ht[t]=Xh(is[t]));function Hh(t){let a={};return t.trim().split(` `).map(e=>{let[s,i]=e.split("=");a[s]=i}),a}function Xh(t){let a={},e,s="";return t.split(` `).forEach(i=>{let h=i.match(/^# (.*)/);h?(e&&(a[e]=s,s=""),e=h[1]):s+=i+` -`}),a[e]=s,a}const fe=class fe{constructor(){o(this,"_language",fe.default_language);o(this,"hooks",[])}get default_language(){return fe.default_language}get language(){return this._language}set language(a){this._language=a,this.hooks.forEach(e=>e())}get default_trans2_map(){return Ht[fe.default_language]}get trans2_map(){return Ht[this.language]}get default_trans_map(){return Pe[fe.default_language]}get trans_map(){return Pe[this.language]}lang_key(a){return Pe[a][a]}key(a,e){let s=a.match(/([^%]*)%([^%]*)%$/);if(s!==null){let[i,h,r]=s;return this.trans_map_with_key(h,e).replace("%d",r)}else return this.trans_map_with_key(a,e)}trans_map_with_key(a,e){return e?Pe[e][a]||this.default_trans_map[a]:this.trans_map[a]||this.default_trans_map[a]}key2(a){var e;return((e=this.trans2_map)==null?void 0:e[a])||this.default_trans2_map[a]}register(a){return this.hooks.push(a),()=>{this.hooks.splice(this.hooks.indexOf(a),1)}}};o(fe,"default_language","en");let Xt=fe;const te=new Xt;class j extends w{constructor(){super(...arguments);o(this,"_color")}get data(){return this._data}set color(e){this._color=e}get color(){return this._color}set height(e){this.data.h=e}_init(){this.color=this.data.color??y.white}_draw(e){e.rect(x.make(this.position.x,this.position.y,this.data.w,this.data.h),this.color)}}class Vh extends w{_init(){this.make(j,n.make(0,0),{w:S.width,h:S.height,color:y.hex(2236962)})}_update(){b.on_interval(E.seconds*3)}}class D extends w{constructor(){super(...arguments);o(this,"_scaled_rect")}get data(){return this._data}get width(){return this._scaled_rect.w}get height(){return this._scaled_rect.h}get _rect(){return this.data.abs?x.make(this.position.x,this.position.y,this.width,this.height):this._scaled_rect}get rect(){let{p_scissor:e}=this;return e?this._rect.overlaps_rect(e):this._rect}_init(){this._scaled_rect=this.data.rect;let e=!1,s=!1,i=this;this.unbindable_input({on_click_begin(h,r){var g,f;if(r||!i.p_visible)return!1;let l=h.mul(S.v_screen),p=x.make(l.x-4,l.y-4,8,8);return i.rect.overlaps(p)?((f=(g=i.data).on_click_begin)==null?void 0:f.call(g))??!1:!1},on_drag(h,r){var l,p,d,g;if(h._right||!i.p_visible)return!1;if(e){let f=h.m.mul(S.v_screen);return((p=(l=i.data).on_drag)==null?void 0:p.call(l,f))??!1}if(h.m&&(!r||!r.m)){let f=h.e.mul(S.v_screen),m=x.make(f.x-4,f.y-4,8,8);return i.rect.overlaps(m)?(e=!0,((g=(d=i.data).on_drag_begin)==null?void 0:g.call(d,f))??!1):!1}return!1},on_up(h,r,l){var d,g,f,m,u,k;if(r||!i.p_visible)return!1;let p=h.mul(S.v_screen);if(e&&(e=!1,(g=(d=i.data).on_drag_end)==null||g.call(d,p)),(m=(f=i.data).on_up)==null||m.call(f,h,r),l){let z=l.mul(S.v_screen),P=x.make(z.x-4,z.y-4,8,8);i.rect.overlaps(P)&&((k=(u=i.data).on_drop)==null||k.call(u,l))}return!1},on_hover(h){var d,g,f,m;if(!i.data.on_hover||!i.p_visible)return!1;let r=h.mul(S.v_screen),l=x.make(r.x-4,r.y-4,8,8);if(i.rect.overlaps(l)){if(!s)return s=!0,((g=(d=i.data).on_hover)==null?void 0:g.call(d))??!1}else s&&(s=!1,(m=(f=i.data).on_hover_end)==null||m.call(f));return s},on_hover_clear(){var h,r;return i.data.on_hover_end?s?(s=!1,(r=(h=i.data).on_hover_end)==null?void 0:r.call(h)):(i.p_visible,!1):!1},on_click(h,r){var g,f;if(!i.p_visible)return!1;let l=h.mul(S.v_screen),p=x.make(l.x-4,l.y-4,8,8);return i.rect.overlaps(p)?((f=(g=i.data).on_click)==null?void 0:f.call(g))??!1:!1},on_wheel(h,r){var g,f;if(!i.p_visible)return!1;let l=r.mul(S.v_screen),p=x.make(l.x-4,l.y-4,8,8);return i.rect.overlaps(p)?((f=(g=i.data).on_wheel)==null?void 0:f.call(g,h))??!1:!1}})}_draw(){de.push_matrix(v.create_translation(this.position)),this.g_position=n.transform(n.zero,de.m_matrix),this._scaled_rect=x.transform(this.data.rect,de.m_matrix),this.data.debug&&de.rect(x.make(0,0,this.width,this.height),y.hex(65280)),de.pop_matrix()}}class rs extends w{get data(){return this._data}_init(){this.make(j,n.zero,{w:1920,h:1080,color:y.hex(11845300)});let a=this;this.make(vt,n.zero,{key:"about",on_back(){q.next(a.data.on_back??Fe)}});let e=1880,s=940;this.make(Ke,n.make(20,120),{name:"panel_bg_nine_slice",w:e,h:s});let i=this._make(Ae,n.make(0,0),{width:1880-100,content:te.key2("about")});this.make(G,n.make(60,160),{w:e-100,h:s-80,content:i})}}const pt=class pt extends w{constructor(){super(...arguments);o(this,"height")}get data(){return this._data}_init(){let e=60,s=this._make(re,n.zero,{size:e,text:" "}),i=s.width,h=s.height,r=0,l=0;this.data.content.trim().split(` -`).forEach(p=>{pt.parse(p).forEach(d=>{let g;d.link?g=this.make(qh,n.zero,{size:e,text:d.text,color:Bi,on_click(){window.open(d.link,"_blank")}}):g=this.make(re,n.zero,{size:e,text:d.text}),r+g.width>this.data.width&&(r=0,l+=g.height),g.position=n.make(r,l),r+=g.width+i}),r=0,l+=h}),this.height=l+h}};o(pt,"parse",e=>{let s=/\[([^\]]*)\]\"([^\"]*)\"/g,i=0,h=[],r;for(;(r=s.exec(e))!==null;){let[l,p,d]=r,g=r.index,f=g+l.length;g>i&&e.slice(i,g).split(" ").filter(m=>!!m).forEach(m=>h.push({text:m})),h.push({text:p,link:d}),i=f}return i!!l).forEach(l=>h.push({text:l})),h});let Ae=pt;class aa extends w{constructor(){super(...arguments);o(this,"_selected_index")}get data(){return this._data}on_click(e){this.selected_index=this.data.tabs.indexOf(e)}get selected_index(){return this._selected_index}set selected_index(e){this._selected_index=e,this.data.tabs.forEach((s,i)=>s.set_active(e===i)),this.data.on_selected_index(e)}_init(){this._selected_index=this.data.selected_index,this.data.tabs.forEach((i,h)=>i.set_active(this._selected_index===h));let e=this.data.tabs.length===4?.63:1,s=this.data.tabs.reduce((i,h)=>i+h.width*e,0);this.make(j,n.make(10,130),{w:s,h:10,color:y.hex(1052737)}),this.data.tabs.forEach(i=>i.parent=this),this.data.tabs.forEach(i=>{this.data.tabs.length===4&&(i.scale=n.one.scale(.6),i.position.y+=50)})}_update(){this.data.tabs.forEach(e=>e.update())}_draw(e){e.push_matrix(v.create_translation(this.position)),this._draw_children(e),this.data.tabs.forEach(s=>s.draw(e)),e.pop_matrix()}_dispose(){this.data.tabs.forEach(e=>e.dispose())}}class T extends w{constructor(){super(...arguments);o(this,"_text");o(this,"_text_view");o(this,"dispose_trans")}get data(){return this._data}set color(e){this._text_view.color=e}get height(){return this._text_view.height}set text(e){this._text=e,this._text_view.text=this.text,this._text_view.size=this.size}get text(){return this.data.no_trans?this._text:te.key(this._text)}get size(){let e=Se.sp_font.width_of(this.text),s=128,i=s*this.data.width/e,h=Se.sp_font.height_of(this.text),r=s*this.data.height/h;return Math.min(i,r)}_init(){let e=this.data.center,s=this.data.color;this._text=this.data.key,this._text_view=this.make(re,n.make(0,0),{size:this.size,text:this.text,center:e,color:s}),this.data.no_trans||(this.dispose_trans=te.register(()=>{this._text_view.text=te.key(this._text),this._text_view.size=this.size}))}_dispose(){var e;(e=this.dispose_trans)==null||e.call(this)}}class re extends w{constructor(){super(...arguments);o(this,"_color");o(this,"_size")}get data(){return this._data}get justify(){return this.data.center?n.make(0,0):n.zero}get color(){return this._color}set color(e){this._color=e}get text(){return this.data.text}set text(e){this.data.text=e}get size(){return this._size}set size(e){this._size=e}get width(){return this.font.width_of(this.text)/this.font.size*this.size}get height(){return this.font.height_of(this.text)/this.font.size*this.size}_init(){this.color=this.data.color??y.white,this._size=this.data.size??128,this.rotation=this.data.rotation??0,this.origin=this.data.center?n.make(this.width/2,0):n.zero}_draw(e){e.push_matrix(v.create_transform(this.position,this.origin,n.one,this.rotation)),this.g_position=n.transform(n.zero,e.m_matrix),e.str_j(this.font,this.text,n.zero,this.justify,this.size,this.color),e.pop_matrix()}}class qh extends w{constructor(){super(...arguments);o(this,"text_view")}get data(){return this._data}set color(e){this.text_view.color=e}get width(){return this.text_view.width}get height(){return this.text_view.height}_init(){this.text_view=this.make(re,n.zero,this.data);let e=this;this.make(D,n.make(0,-this.text_view.height/3),{rect:x.make(0,0,this.text_view.width,this.text_view.height),on_hover(){e.color=y.red},on_hover_end(){e.color=e.data.color??y.white},on_click(){e.data.on_click()}})}}class Z extends w{constructor(){super(...arguments);o(this,"_active");o(this,"anim")}get data(){return this._data}get width(){return this.data.w}get height(){return 32+64}set_active(e){this._active=e,e?this.anim.play("active"):this.anim.play("idle")}_init(){let e=this.make(R,n.zero,{name:"tab3_bg"});this.anim=e,this.make(T,n.make(this.width/2,this.height/2),{no_trans:this.data.no_trans,width:this.width-80,height:this.height,key:this.data.text,center:!0});let s=this;this.make(D,n.make(32,32),{rect:x.make(0,0,360,90),on_hover(){s._active||e.play("hover")},on_hover_end(){e.play(s._active?"active":"idle")},on_click(){s.parent.on_click(s)}})}}class sa extends w{constructor(){super(...arguments);o(this,"_selected_index")}get data(){return this._data}get selected_index(){return this._selected_index}set selected_index(e){this._selected_index=e,this.data.panels.forEach((s,i)=>s.visible=e===i)}get active_panel(){return this.data.panels[this.selected_index]}_init(){this.selected_index=this.data.selected_index}_update(){this.active_panel.update()}_draw(e){e.push_matrix(v.create_translation(this.position)),this._draw_children(e),this.active_panel.draw(e),e.pop_matrix()}_dispose(){this.data.panels.forEach(e=>e.dispose())}}class G extends w{constructor(){super(...arguments);o(this,"scroll_y");o(this,"scroll_off");o(this,"scroll_edge_off");o(this,"target_scroll_y");o(this,"thumb");o(this,"content_base_position")}get data(){return this._data}get content(){return this.data.content}get width(){return this.data.w}get height(){return this.data.h}_init(){this.data.content.parent=this,this.content_base_position=n.copy(this.data.content.position),this.scroll_y=0,this.scroll_off=0,this.scroll_edge_off=0,this.target_scroll_y=0,this.make(j,n.make(this.data.w-20-8,8),{w:20,h:this.data.h-16,color:y.black});let e=this.height*(this.height/this.content.height);this.thumb=this._make(j,n.make(this.data.w-20-8+4,8+4),{w:20-8,h:e,color:y.white});let s,i=this;this.make(D,n.zero,{rect:x.make(0,0,this.width,this.height),on_drag_begin(h){var r,l;return(l=(r=i.data).on_scroll)==null||l.call(r),s=h,!0},on_drag(h){return i.scroll_off=h.y-s.y,!0},on_up(h,r){if(i.scroll_y+=i.scroll_off,i.scroll_off=0,i.target_scroll_y=i.scroll_y,i.scroll_y>0)i.scroll_edge_off=i.scroll_y,i.scroll_y=0;else{let l=-i.content.height+i.data.h;i.content.height{this.t=e},E.half,0,()=>{this._t=void 0})}get done(){return!this._t}_draw(e){e.push_matrix(v.create_transform(n.make(this.t,S.height/2),n.make(160,90),n.make(13,13),Math.PI*.25)),e.rect(x.make(0,0,320,180),y.hex(65280)),e.pop_matrix(),e.push_matrix(v.create_transform(n.make(this.t-1820,S.height/2),n.make(80,10),n.make(13,13),Math.PI*.25)),e.rect(x.make(0,0,160,10),y.hex(0)),e.pop_matrix()}}class Ze extends w{get data(){return this._data}_init(){let a=this.make(R,n.zero,{name:"main_settings_bg"});this.make(T,n.make(320,86),{key:this.data.text,center:!0,width:400,height:100,color:y.black});let e=this.make(T,n.make(320,86),{key:this.data.text,center:!0,width:400,height:100}),s=e.position.y,i=this;this.make(D,n.make(100,50),{rect:x.make(0,0,440,120),on_hover(){a.play("hover"),i.tween([e.position.y,s-2],h=>{e.position.y=h},E.lengths)},on_hover_end(){a.play("idle"),i.tween([e.position.y,s+2],h=>{e.position.y=h},E.lengths)},on_click(){i.data.on_click()}})}}class Gh extends w{get data(){return this._data}_init(){let a=this.make(R,n.zero,{name:this.data.name}),e=this;this.make(D,n.make(this.data.rect.x,this.data.rect.y),{debug:this.data.debug,rect:x.make(0,0,this.data.rect.w,this.data.rect.h),on_hover(){a.play("hover")},on_hover_end(){a.play("idle")},on_click(){e.data.on_click()}})}}class vt extends w{get data(){return this._data}_init(){let a=this;this.make(Gh,n.zero,{name:"navigation_bg",rect:x.make(30,30,540,100),on_click(){a.data.on_back()}}),this.make(T,n.make(112,54),{key:this.data.key,width:400,height:96})}}class ns extends w{get data(){return this._data}_init(){let a=this.data.selected_index??0;this.make(j,n.zero,{w:1920,h:1080,color:y.hex(11845300)});let e=this;this.make(vt,n.zero,{key:"how_to_play",on_back(){q.next(e.data.on_back??Fe)}}),this.make(Ke,n.make(20,180),{name:"panel_bg_nine_slice",w:1860,h:860});let s=410,i=[this._make(Z,n.make(2,2),{no_trans:!0,text:"solitaire",w:s}),this._make(Z,n.make(2+s+4,2),{no_trans:!0,text:"fourtimes",w:s}),this._make(Z,n.make(2+(s+4)*2,2),{no_trans:!0,text:"octopus",w:s})],h=40,r=780,l=this._make(Ae,n.make(0,0),{width:1800-80,content:te.key2("solitaire")}),p=this._make(G,n.make(20,h),{w:1800,h:r,content:l});l=this._make(Ae,n.make(0,0),{width:1800-80,content:te.key2("fourtimes")});let d=this._make(G,n.make(20,h),{w:1800,h:r,content:l});l=this._make(Ae,n.make(0,0),{width:1800-80,content:te.key2("octopus")});let g=this._make(G,n.make(20,h),{w:1800,h:r,content:l}),f=[p,d,g],m=this.make(sa,n.make(20,180),{w:1860,h:860,panels:f,selected_index:a});this.make(aa,n.make(600,8),{tabs:i,selected_index:a,on_selected_index(u){m.selected_index=u}})}}class Wh extends w{constructor(){super(...arguments);o(this,"box");o(this,"selected_text")}get data(){return this._data}set selected_index(e){this.box.selected_index=e,this.selected_text.text=this.data.items[e]}_init(){let e=this.make(R,n.zero,{name:"dropdown_bg"});this.selected_text=this.make(T,n.make(32,60),{no_trans:this.data.no_trans,key:this.data.items[this.data.selected_index],width:250,height:100});let s=this;this.make(D,n.make(0,0),{abs:!0,rect:x.make(0,0,1920,1080),on_click(){let i=s.box.visible;return s.box.visible=!1,i},on_drag_begin(){return s.box.visible=!1,!1}}),this.make(D,n.make(16,32),{rect:x.make(0,0,480,112),on_hover(){e.play("hover")},on_hover_end(){e.play("idle")},on_click(){return s.box.visible?!1:(s.box.visible=!0,!0)}})}}class os extends w{constructor(){super(...arguments);o(this,"dropdown_list")}get data(){return this._data}set selected_index(e){this.dropdown_list.selected_index=e}_init(){let e=this.make(j,n.make(0,0),{w:500,h:500,color:y.hex(3233172)}),s=this,i=this._make(Yh,n.make(0,0),{no_trans:this.data.no_trans,items:this.data.items,selected_index:this.data.selected_index,on_selected(h){s.data.on_selected(h)}});e.height=Math.min(500,i.height),this.dropdown_list=i,this.make(G,n.make(0,0),{w:500,h:Math.min(500,i.height),content:i})}}class Yh extends w{constructor(){super(...arguments);o(this,"height");o(this,"_selected_index");o(this,"items")}get data(){return this._data}set selected_index(e){this._selected_index=e,this._color_items(),this.data.on_selected(e)}get selected_index(){return this._selected_index}_init(){let e=140,s=0,i=this;this.items=this.data.items.map((h,r)=>{let l=this.make(Qh,n.make(0,s),{no_trans:this.data.no_trans,item:h,on_selected(){i.selected_index=r}});return s+=e,l}),this.height=s+30,this._selected_index=this.data.selected_index}_color_items(){this.items.forEach((e,s)=>{e.selected=this.selected_index===s})}}class Qh extends w{constructor(){super(...arguments);o(this,"bg");o(this,"text")}get data(){return this._data}set selected(e){e?(this.bg.color=y.white,this.text.color=y.hex(3233172)):(this.text.color=y.white,this.bg.color=y.hex(3233172))}_init(){this.bg=this.make(j,n.make(-40,-30),{w:470,h:140,color:y.hex(3233172)}),this.text=this.make(T,n.make(0,0),{no_trans:this.data.no_trans,width:340,height:140,key:this.data.item});let e=this;this.make(D,n.make(-40,-30),{rect:x.make(0,0,470,140),on_click(){return e.data.on_selected(),!0}})}}class Jh extends w{constructor(){super(...arguments);o(this,"height")}_init(){this.make(T,n.make(280,20),{key:"solitaire_settings",width:820,height:200});let e=220,s=this.make($e,n.make(40,e),{name:"turning_cards",items:["three_cards","one_card"],selected_index:xa.indexOf(De.cards),on_selected(h){De.cards=xa[h]}}),i=this.make($e,n.make(40,e*2),{name:"turning_limit",items:["no_limit","three_passes","one_pass"],selected_index:ua.indexOf(De.limit),on_selected(h){De.limit=ua[h]}});this.make_box(s),this.make_box(i),this.height=e*3+500}make_box(e,s){let i=this.make(os,n.make(e.position.x+e.dropdown.position.x,e.position.y+e.dropdown.position.y+160),{no_trans:s,items:e.data.items,selected_index:e.data.selected_index,on_selected(h){i.visible=!1,e.dropdown.data.on_selected(h),e.dropdown.selected_text.text=e.data.items[h]}});e.dropdown.box=i,i.visible=!1}}class Ot extends w{constructor(){super(...arguments);o(this,"height")}_init(){this.make(T,n.make(280,20),{key:"general_settings",width:820,height:200});let e=220,s=this.make($e,n.make(40,e*1),{no_trans:!0,name:"language",items:Ne.map(p=>te.lang_key(p)),selected_index:Ne.indexOf(ee.language),on_selected(p){te.language=Ne[p],ee.language=Ne[p]}}),i=["on","off"],h=this.make($e,n.make(40,e*2),{name:"sounds",items:["on","off"],selected_index:ee.sound?0:1,on_selected(p){ee.sound=i[p]==="on"}}),r=["on","off"],l=this.make($e,n.make(40,e*3),{name:"music",items:["on","off"],selected_index:ee.music?0:1,on_selected(p){ee.music=r[p]==="on",ee.music||$.stop_music()}});this.make_box(s,!0),this.make_box(h),this.make_box(l),this.height=e*3+500}make_box(e,s){let i=this.make(os,n.make(e.position.x+e.dropdown.position.x,e.position.y+e.dropdown.position.y+160),{no_trans:s,items:e.data.items,selected_index:e.data.selected_index,on_selected(h){i.visible=!1,e.dropdown.data.on_selected(h),e.dropdown.selected_text.text=e.data.items[h]}});e.dropdown.box=i,i.visible=!1}}class $e extends w{constructor(){super(...arguments);o(this,"dropdown")}get data(){return this._data}_init(){this.make(j,n.make(0,0),{w:1300,h:200,color:y.hex(2106433)}),this.make(T,n.make(50,60),{key:this.data.name,width:420,height:200});let e=this;this.dropdown=this.make(Wh,n.make(720,8),{no_trans:this.data.no_trans,items:this.data.items,selected_index:this.data.selected_index,on_selected(s){e.data.on_selected(s)}})}}class Dt extends w{constructor(){super(...arguments);o(this,"height")}_init(){this.make(T,n.make(700,0),{key:"overall_statistics",width:820,height:200,center:!0});let e=new Xi(mt.results,new ze([]),new ze([])),s=100;this.make(T,n.make(700,200),{key:`total_games_played%${e.total_played}%`,width:820,height:200,center:!0}),this.make(T,n.make(700,200+s*1.2),{key:`games_won%${e.total_wins}%`,width:820,height:200,center:!0}),this.make(T,n.make(700,200+s*3),{key:"top5_highscores",width:820,height:200,center:!0}),e.top_5_highscores.forEach((h,r)=>{this.make(T,n.make(200,200+s*4+s*r*1.5+80),{key:`${r+1}.`,width:80,height:100,no_trans:!0}),this.make(T,n.make(700,200+s*4+s*r*1.5+80),{key:`${h.multiplied_score}`,width:80,height:100,no_trans:!0,center:!0}),this.make(j,n.make(200,100+200+s*4+s*r*1.5+80),{w:1e3,h:20,color:y.white})}),this.height=2e3}}class Zh extends w{constructor(){super(...arguments);o(this,"height")}_init(){this.make(T,n.make(700,0),{key:"solitaire_statistics",width:820,height:200,center:!0});let e=mt.results,s=100;this.make(T,n.make(700,200),{key:`total_games_played%${e.total_played}%`,width:820,height:200,center:!0}),this.make(T,n.make(700,200+s*1.2),{key:`games_won%${e.total_wins}%`,width:820,height:200,center:!0}),this.make(T,n.make(700,200+s*3),{key:"top5_highscores",width:820,height:200,center:!0}),e.top_5_highscores.forEach((h,r)=>{this.make(T,n.make(200,200+s*4+s*r*1.5+80),{key:`${r+1}.`,width:80,height:100,no_trans:!0}),this.make(T,n.make(700,200+s*4+s*r*1.5+80),{key:`${h.multiplied_score}`,width:80,height:100,no_trans:!0,center:!0}),this.make(j,n.make(200,100+200+s*4+s*r*1.5+80),{w:1e3,h:20,color:y.white})}),this.height=2e3}}class er extends w{get data(){return this._data}_init(){let a=this.data.selected_index??0;this.make(j,n.zero,{w:1920,h:1080,color:y.hex(11845300)});let e=this;this.make(vt,n.zero,{key:"statistics",on_back(){q.next(e.data.on_back??Fe)}}),this.make(Ke,n.make(220,150),{name:"panel_bg_nine_slice",w:1480,h:910});let s=1e3/4,i=s*1.6,h=[this._make(Z,n.make(2,2),{text:"overall",w:i}),this._make(Z,n.make(2+s+4,2),{no_trans:!0,text:"solitaire",w:i}),this._make(Z,n.make(2+(s+4)*2,2),{no_trans:!0,text:"fourtimes",w:i}),this._make(Z,n.make(2+(s+4)*3,2),{no_trans:!0,text:"octopus",w:i})],r;this.make(aa,n.make(600,8),{tabs:h,selected_index:a,on_selected_index(u){r.selected_index=u}});let l=this._make(Dt,n.make(0,0),{}),p=this._make(G,n.make(0,0),{w:1450,h:850,content:l});l=this._make(Zh,n.make(0,0),{});let d=this._make(G,n.make(0,0),{w:1450,h:850,content:l});l=this._make(Dt,n.make(0,0),{});let g=this._make(G,n.make(0,0),{w:1450,h:850,content:l});l=this._make(Dt,n.make(0,0),{});let f=this._make(G,n.make(0,0),{w:1450,h:850,content:l}),m=[p,d,g,f];r=this.make(sa,n.make(220,180),{w:1050,h:850,panels:m,selected_index:a})}}class ls extends w{get data(){return this._data}_init(){let a=this.data.selected_index??0;this.make(j,n.zero,{w:1920,h:1080,color:y.hex(11845300)});let e=this;this.make(vt,n.zero,{key:"settings",on_back(){q.next(e.data.on_back??Fe)}}),this.make(Ke,n.make(220,150),{name:"panel_bg_nine_slice",w:1480,h:910});let s=1e3/4,i=s*1.6,h=[this._make(Z,n.make(2,2),{text:"general",w:i}),this._make(Z,n.make(2+s+4,2),{no_trans:!0,text:"solitaire",w:i}),this._make(Z,n.make(2+(s+4)*2,2),{no_trans:!0,text:"fourtimes",w:i}),this._make(Z,n.make(2+(s+4)*3,2),{no_trans:!0,text:"octopus",w:i})],r;this.make(aa,n.make(600,8),{tabs:h,selected_index:a,on_selected_index(u){r.selected_index=u}});let l=this._make(Ot,n.make(0,0),{}),p=this._make(G,n.make(0,0),{w:1450,h:850,content:l});l=this._make(Jh,n.make(0,0),{});let d=this._make(G,n.make(0,0),{w:1450,h:850,content:l});l=this._make(Ot,n.make(0,0),{});let g=this._make(G,n.make(0,0),{w:1450,h:850,content:l});l=this._make(Ot,n.make(0,0),{});let f=this._make(G,n.make(0,0),{w:1450,h:850,content:l}),m=[p,d,g,f];r=this.make(sa,n.make(220,180),{w:1050,h:850,panels:m,selected_index:a})}}class Fe extends w{_init(){this.make(j,n.zero,{w:1920,h:1080,color:y.hex(11845300)});let a=this.make(R,n.zero,{name:"main_title_bg"});a.scale=n.make(2,2),a=this.make(R,n.make(200,150),{name:"main_bg"});let e=this.make(re,n.make(16,32),{text:"sofo",color:y.hex(2106417)});this.make(re,n.make(16+e.width,32),{text:".demo",color:y.hex(11845300)});let s=200,i=320,h=this.make(R,n.make(s,250),{name:"main_card_bg"});h.play_now("solitaire"),this.make(D,n.make(s+120,350),{rect:x.make(0,0,220,500),on_hover(){h.play("solitaire_hover")},on_hover_end(){h.play("solitaire")},on_click(){q.next(it)}});let r=this.make(re,n.make(s+120+140,350+250),{text:"solitaire",center:!0,size:98});r.rotation=Math.PI/2;let l=this.make(R,n.make(s+i,250),{name:"main_card_bg"});l.play_now("fourtimes"),this.make(D,n.make(s+i+120,350),{rect:x.make(0,0,220,500),on_hover(){l.play("fourtimes_hover")},on_hover_end(){l.play("fourtimes")},on_click(){}});let p=this.make(re,n.make(s+i+120+140,350+250),{text:"fourtimes",center:!0,size:82});p.rotation=Math.PI/2;let d=this.make(R,n.make(s+i*2,250),{name:"main_card_bg"});d.play_now("octopus"),this.make(D,n.make(s+i*2+120,350),{rect:x.make(0,0,220,500),on_hover(){d.play("octopus_hover")},on_hover_end(){d.play("octopus")},on_click(){}});let g=this.make(re,n.make(s+i*2+120+140,350+250),{text:"octopus",center:!0,size:96});g.rotation=Math.PI/2;let f=180,m=200;this.make(Ze,n.make(1300,m),{text:"how_to_play",on_click(){q.next(ns)}}),this.make(Ze,n.make(1300,m+f),{text:"statistics",on_click(){q.next(er)}}),this.make(Ze,n.make(1300,m+f*2),{text:"settings",on_click(){q.next(ls)}}),this.make(Ze,n.make(1300,m+f*3),{text:"about",on_click(){q.next(rs)}})}}class tr extends w{constructor(){super(...arguments);o(this,"theme_target");o(this,"mask_target");o(this,"target");o(this,"target2");o(this,"mask");o(this,"current");o(this,"_next")}next(e,s=n.zero,i={}){this._next||(this._next=this._make(e,s,i),this.mask=this._make(Kh,n.zero,{}))}_init(){this.target2=me.create(S.width,S.height),this.target=me.create(S.width,S.height),this.mask_target=me.create(S.width,S.height),this.theme_target=me.create(S.width,S.height),this.current=this._make(Fe,n.zero,{}),Re.set_matrix(v.create_scale_v(S.v_screen)),zt.set_matrix(v.create_scale_v(S.v_screen))}_update(){var e,s,i;(e=this._next)==null||e.update(),this.current.update(),(s=this.mask)==null||s.update(),(i=this.mask)!=null&&i.done&&(this.current.dispose(),this.mask.dispose(),this.mask=void 0,this.current=this._next,this._next=void 0)}_draw(e){var s;this._next?(this.current.draw(e),e.render(this.target),e.clear(),this._next.draw(e),e.render(this.target2),e.clear(),this.mask_target.clear(y.hex(16711680)),(s=this.mask)==null||s.draw(e),e.render(this.mask_target),e.clear(),Re.texture=this.target.texture(0),Re.texture2=this.target2.texture(0),Re.mask_texture=this.mask_target.texture(0),Re.render(this.theme_target)):(this.current.draw(e),e.render(this.theme_target),e.clear()),zt.texture=this.theme_target.texture(0),zt.render()}}let q;const ge=class ge extends w{_init(){de.default_sampler=ye.make(Le.Linear),this.objects=[],$.load().then(()=>{console.log($)}),Se.load().then(()=>{te.language=ee.language,q=this.make(tr,n.zero,{})})}_update(){}_draw(){w.next_render_order=0,c.backbuffer.clear(y.black),this._draw_children(de),ht._sort_hooks()}};o(ge,"width",1920),o(ge,"height",1080),o(ge,"v_screen",n.make(ge.width,ge.height));let S=ge;const ar=t=>{let a=new S;c.run({name:"solitaire23",width:1920,height:1080,on_startup(){a.init()},on_update(){ht.update(),a.update()},on_render(){a.draw(de)}}),c.canvas&&t.appendChild(c.canvas),ht.listen(t)};ar(document.getElementById("app")); +`}),a[e]=s,a}const fe=class fe{constructor(){o(this,"_language",fe.default_language);o(this,"hooks",[])}get default_language(){return fe.default_language}get language(){return this._language}set language(a){this._language=a,this.hooks.forEach(e=>e())}get default_trans2_map(){return Ht[fe.default_language]}get trans2_map(){return Ht[this.language]}get default_trans_map(){return Pe[fe.default_language]}get trans_map(){return Pe[this.language]}lang_key(a){return Pe[a][a]}key(a,e){let s=a.match(/([^%]*)%([^%]*)%$/);if(s!==null){let[i,h,r]=s;return this.trans_map_with_key(h,e).replace("%d",r)}else return this.trans_map_with_key(a,e)}trans_map_with_key(a,e){return e?Pe[e][a]||this.default_trans_map[a]:this.trans_map[a]||this.default_trans_map[a]}key2(a){var e;return((e=this.trans2_map)==null?void 0:e[a])||this.default_trans2_map[a]}register(a){return this.hooks.push(a),()=>{this.hooks.splice(this.hooks.indexOf(a),1)}}};o(fe,"default_language","en");let Xt=fe;const te=new Xt;class j extends w{constructor(){super(...arguments);o(this,"_color")}get data(){return this._data}set color(e){this._color=e}get color(){return this._color}set height(e){this.data.h=e}_init(){this.color=this.data.color??y.white}_draw(e){e.rect(x.make(this.position.x,this.position.y,this.data.w,this.data.h),this.color)}}class Vh extends w{_init(){this.make(j,n.make(0,0),{w:z.width,h:z.height,color:y.hex(2236962)})}_update(){b.on_interval(E.seconds*3)}}class D extends w{constructor(){super(...arguments);o(this,"_scaled_rect")}get data(){return this._data}get width(){return this._scaled_rect.w}get height(){return this._scaled_rect.h}get _rect(){return this.data.abs?x.make(this.position.x,this.position.y,this.width,this.height):this._scaled_rect}get rect(){let{p_scissor:e}=this;return e?this._rect.overlaps_rect(e):this._rect}_init(){this._scaled_rect=this.data.rect;let e=!1,s=!1,i=this;this.unbindable_input({on_click_begin(h,r){var g,f;if(r||!i.p_visible)return!1;let l=h.mul(z.v_screen),p=x.make(l.x-4,l.y-4,8,8);return i.rect.overlaps(p)?((f=(g=i.data).on_click_begin)==null?void 0:f.call(g))??!1:!1},on_drag(h,r){var l,p,d,g;if(h._right||!i.p_visible)return!1;if(e){let f=h.m.mul(z.v_screen);return((p=(l=i.data).on_drag)==null?void 0:p.call(l,f))??!1}if(h.m&&(!r||!r.m)){let f=h.e.mul(z.v_screen),m=x.make(f.x-4,f.y-4,8,8);return i.rect.overlaps(m)?(e=!0,((g=(d=i.data).on_drag_begin)==null?void 0:g.call(d,f))??!1):!1}return!1},on_up(h,r,l){var d,g,f,m,u,k;if(r||!i.p_visible)return!1;let p=h.mul(z.v_screen);if(e&&(e=!1,(g=(d=i.data).on_drag_end)==null||g.call(d,p)),(m=(f=i.data).on_up)==null||m.call(f,h,r),l){let A=l.mul(z.v_screen),P=x.make(A.x-4,A.y-4,8,8);i.rect.overlaps(P)&&((k=(u=i.data).on_drop)==null||k.call(u,l))}return!1},on_hover(h){var d,g,f,m;if(!i.data.on_hover||!i.p_visible)return!1;let r=h.mul(z.v_screen),l=x.make(r.x-4,r.y-4,8,8);if(i.rect.overlaps(l)){if(!s)return s=!0,((g=(d=i.data).on_hover)==null?void 0:g.call(d))??!1}else s&&(s=!1,(m=(f=i.data).on_hover_end)==null||m.call(f));return s},on_hover_clear(){var h,r;return i.data.on_hover_end?s?(s=!1,(r=(h=i.data).on_hover_end)==null?void 0:r.call(h)):(i.p_visible,!1):!1},on_click(h,r){var g,f;if(!i.p_visible)return!1;let l=h.mul(z.v_screen),p=x.make(l.x-4,l.y-4,8,8);return i.rect.overlaps(p)?((f=(g=i.data).on_click)==null?void 0:f.call(g))??!1:!1},on_wheel(h,r){var g,f;if(!i.p_visible)return!1;let l=r.mul(z.v_screen),p=x.make(l.x-4,l.y-4,8,8);return i.rect.overlaps(p)?((f=(g=i.data).on_wheel)==null?void 0:f.call(g,h))??!1:!1}})}_draw(){de.push_matrix(v.create_translation(this.position)),this.g_position=n.transform(n.zero,de.m_matrix),this._scaled_rect=x.transform(this.data.rect,de.m_matrix),this.data.debug&&de.rect(x.make(0,0,this.width,this.height),y.hex(65280)),de.pop_matrix()}}class rs extends w{get data(){return this._data}_init(){this.make(j,n.zero,{w:1920,h:1080,color:y.hex(11845300)});let a=this;this.make(vt,n.zero,{key:"about",on_back(){q.next(a.data.on_back??Fe)}});let e=1880,s=940;this.make(Ke,n.make(20,120),{name:"panel_bg_nine_slice",w:e,h:s});let i=this._make(Ae,n.make(0,0),{width:1880-100,content:te.key2("about")});this.make(G,n.make(60,160),{w:e-100,h:s-80,content:i})}}const pt=class pt extends w{constructor(){super(...arguments);o(this,"height")}get data(){return this._data}_init(){let e=60,s=this._make(re,n.zero,{size:e,text:" "}),i=s.width,h=s.height,r=0,l=0;this.data.content.trim().split(` +`).forEach(p=>{pt.parse(p).forEach(d=>{let g;d.link?g=this.make(qh,n.zero,{size:e,text:d.text,color:Bi,on_click(){window.open(d.link,"_blank")}}):g=this.make(re,n.zero,{size:e,text:d.text}),r+g.width>this.data.width&&(r=0,l+=g.height),g.position=n.make(r,l),r+=g.width+i}),r=0,l+=h}),this.height=l+h}};o(pt,"parse",e=>{let s=/\[([^\]]*)\]\"([^\"]*)\"/g,i=0,h=[],r;for(;(r=s.exec(e))!==null;){let[l,p,d]=r,g=r.index,f=g+l.length;g>i&&e.slice(i,g).split(" ").filter(m=>!!m).forEach(m=>h.push({text:m})),h.push({text:p,link:d}),i=f}return i!!l).forEach(l=>h.push({text:l})),h});let Ae=pt;class aa extends w{constructor(){super(...arguments);o(this,"_selected_index")}get data(){return this._data}on_click(e){this.selected_index=this.data.tabs.indexOf(e)}get selected_index(){return this._selected_index}set selected_index(e){this._selected_index=e,this.data.tabs.forEach((s,i)=>s.set_active(e===i)),this.data.on_selected_index(e)}_init(){this._selected_index=this.data.selected_index,this.data.tabs.forEach((i,h)=>i.set_active(this._selected_index===h));let e=this.data.tabs.length===4?.63:1,s=this.data.tabs.reduce((i,h)=>i+h.width*e,0);this.make(j,n.make(10,130),{w:s,h:10,color:y.hex(1052737)}),this.data.tabs.forEach(i=>i.parent=this),this.data.tabs.forEach(i=>{this.data.tabs.length===4&&(i.scale=n.one.scale(.6),i.position.y+=50)})}_update(){this.data.tabs.forEach(e=>e.update())}_draw(e){e.push_matrix(v.create_translation(this.position)),this._draw_children(e),this.data.tabs.forEach(s=>s.draw(e)),e.pop_matrix()}_dispose(){this.data.tabs.forEach(e=>e.dispose())}}class T extends w{constructor(){super(...arguments);o(this,"_text");o(this,"_text_view");o(this,"dispose_trans")}get data(){return this._data}set color(e){this._text_view.color=e}get height(){return this._text_view.height}set text(e){this._text=e,this._text_view.text=this.text,this._text_view.size=this.size}get text(){return this.data.no_trans?this._text:te.key(this._text)}get size(){let e=Se.sp_font.width_of(this.text),s=128,i=s*this.data.width/e,h=Se.sp_font.height_of(this.text),r=s*this.data.height/h;return Math.min(i,r)}_init(){let e=this.data.center,s=this.data.color;this._text=this.data.key,this._text_view=this.make(re,n.make(0,0),{size:this.size,text:this.text,center:e,color:s}),this.data.no_trans||(this.dispose_trans=te.register(()=>{this._text_view.text=te.key(this._text),this._text_view.size=this.size}))}_dispose(){var e;(e=this.dispose_trans)==null||e.call(this)}}class re extends w{constructor(){super(...arguments);o(this,"_color");o(this,"_size")}get data(){return this._data}get justify(){return this.data.center?n.make(0,0):n.zero}get color(){return this._color}set color(e){this._color=e}get text(){return this.data.text}set text(e){this.data.text=e}get size(){return this._size}set size(e){this._size=e}get width(){return this.font.width_of(this.text)/this.font.size*this.size}get height(){return this.font.height_of(this.text)/this.font.size*this.size}_init(){this.color=this.data.color??y.white,this._size=this.data.size??128,this.rotation=this.data.rotation??0,this.origin=this.data.center?n.make(this.width/2,0):n.zero}_draw(e){e.push_matrix(v.create_transform(this.position,this.origin,n.one,this.rotation)),this.g_position=n.transform(n.zero,e.m_matrix),e.str_j(this.font,this.text,n.zero,this.justify,this.size,this.color),e.pop_matrix()}}class qh extends w{constructor(){super(...arguments);o(this,"text_view")}get data(){return this._data}set color(e){this.text_view.color=e}get width(){return this.text_view.width}get height(){return this.text_view.height}_init(){this.text_view=this.make(re,n.zero,this.data);let e=this;this.make(D,n.make(0,-this.text_view.height/3),{rect:x.make(0,0,this.text_view.width,this.text_view.height),on_hover(){e.color=y.red},on_hover_end(){e.color=e.data.color??y.white},on_click(){e.data.on_click()}})}}class Z extends w{constructor(){super(...arguments);o(this,"_active");o(this,"anim")}get data(){return this._data}get width(){return this.data.w}get height(){return 32+64}set_active(e){this._active=e,e?this.anim.play("active"):this.anim.play("idle")}_init(){let e=this.make(R,n.zero,{name:"tab3_bg"});this.anim=e,this.make(T,n.make(this.width/2,this.height/2),{no_trans:this.data.no_trans,width:this.width-80,height:this.height,key:this.data.text,center:!0});let s=this;this.make(D,n.make(32,32),{rect:x.make(0,0,360,90),on_hover(){s._active||e.play("hover")},on_hover_end(){e.play(s._active?"active":"idle")},on_click(){s.parent.on_click(s)}})}}class sa extends w{constructor(){super(...arguments);o(this,"_selected_index")}get data(){return this._data}get selected_index(){return this._selected_index}set selected_index(e){this._selected_index=e,this.data.panels.forEach((s,i)=>s.visible=e===i)}get active_panel(){return this.data.panels[this.selected_index]}_init(){this.selected_index=this.data.selected_index}_update(){this.active_panel.update()}_draw(e){e.push_matrix(v.create_translation(this.position)),this._draw_children(e),this.active_panel.draw(e),e.pop_matrix()}_dispose(){this.data.panels.forEach(e=>e.dispose())}}class G extends w{constructor(){super(...arguments);o(this,"scroll_y");o(this,"scroll_off");o(this,"scroll_edge_off");o(this,"target_scroll_y");o(this,"thumb");o(this,"content_base_position")}get data(){return this._data}get content(){return this.data.content}get width(){return this.data.w}get height(){return this.data.h}_init(){this.data.content.parent=this,this.content_base_position=n.copy(this.data.content.position),this.scroll_y=0,this.scroll_off=0,this.scroll_edge_off=0,this.target_scroll_y=0,this.make(j,n.make(this.data.w-20-8,8),{w:20,h:this.data.h-16,color:y.black});let e=this.height*(this.height/this.content.height);this.thumb=this._make(j,n.make(this.data.w-20-8+4,8+4),{w:20-8,h:e,color:y.white});let s,i=this;this.make(D,n.zero,{rect:x.make(0,0,this.width,this.height),on_drag_begin(h){var r,l;return(l=(r=i.data).on_scroll)==null||l.call(r),s=h,!0},on_drag(h){return i.scroll_off=h.y-s.y,!0},on_up(h,r){if(i.scroll_y+=i.scroll_off,i.scroll_off=0,i.target_scroll_y=i.scroll_y,i.scroll_y>0)i.scroll_edge_off=i.scroll_y,i.scroll_y=0;else{let l=-i.content.height+i.data.h;i.content.height{this.t=e},E.half,0,()=>{this._t=void 0})}get done(){return!this._t}_draw(e){e.push_matrix(v.create_transform(n.make(this.t,z.height/2),n.make(160,90),n.make(13,13),Math.PI*.25)),e.rect(x.make(0,0,320,180),y.hex(65280)),e.pop_matrix(),e.push_matrix(v.create_transform(n.make(this.t-1820,z.height/2),n.make(80,10),n.make(13,13),Math.PI*.25)),e.rect(x.make(0,0,160,10),y.hex(0)),e.pop_matrix()}}class Ze extends w{get data(){return this._data}_init(){let a=this.make(R,n.zero,{name:"main_settings_bg"});this.make(T,n.make(320,86),{key:this.data.text,center:!0,width:400,height:100,color:y.black});let e=this.make(T,n.make(320,86),{key:this.data.text,center:!0,width:400,height:100}),s=e.position.y,i=this;this.make(D,n.make(100,50),{rect:x.make(0,0,440,120),on_hover(){a.play("hover"),i.tween([e.position.y,s-2],h=>{e.position.y=h},E.lengths)},on_hover_end(){a.play("idle"),i.tween([e.position.y,s+2],h=>{e.position.y=h},E.lengths)},on_click(){i.data.on_click()}})}}class Gh extends w{get data(){return this._data}_init(){let a=this.make(R,n.zero,{name:this.data.name}),e=this;this.make(D,n.make(this.data.rect.x,this.data.rect.y),{debug:this.data.debug,rect:x.make(0,0,this.data.rect.w,this.data.rect.h),on_hover(){a.play("hover")},on_hover_end(){a.play("idle")},on_click(){e.data.on_click()}})}}class vt extends w{get data(){return this._data}_init(){let a=this;this.make(Gh,n.zero,{name:"navigation_bg",rect:x.make(30,30,540,100),on_click(){a.data.on_back()}}),this.make(T,n.make(112,54),{key:this.data.key,width:400,height:96})}}class ns extends w{get data(){return this._data}_init(){let a=this.data.selected_index??0;this.make(j,n.zero,{w:1920,h:1080,color:y.hex(11845300)});let e=this;this.make(vt,n.zero,{key:"how_to_play",on_back(){q.next(e.data.on_back??Fe)}}),this.make(Ke,n.make(20,180),{name:"panel_bg_nine_slice",w:1860,h:860});let s=410,i=[this._make(Z,n.make(2,2),{no_trans:!0,text:"solitaire",w:s}),this._make(Z,n.make(2+s+4,2),{no_trans:!0,text:"fourtimes",w:s}),this._make(Z,n.make(2+(s+4)*2,2),{no_trans:!0,text:"octopus",w:s})],h=40,r=780,l=this._make(Ae,n.make(0,0),{width:1800-80,content:te.key2("solitaire")}),p=this._make(G,n.make(20,h),{w:1800,h:r,content:l});l=this._make(Ae,n.make(0,0),{width:1800-80,content:te.key2("fourtimes")});let d=this._make(G,n.make(20,h),{w:1800,h:r,content:l});l=this._make(Ae,n.make(0,0),{width:1800-80,content:te.key2("octopus")});let g=this._make(G,n.make(20,h),{w:1800,h:r,content:l}),f=[p,d,g],m=this.make(sa,n.make(20,180),{w:1860,h:860,panels:f,selected_index:a});this.make(aa,n.make(600,8),{tabs:i,selected_index:a,on_selected_index(u){m.selected_index=u}})}}class Wh extends w{constructor(){super(...arguments);o(this,"box");o(this,"selected_text")}get data(){return this._data}set selected_index(e){this.box.selected_index=e,this.selected_text.text=this.data.items[e]}_init(){let e=this.make(R,n.zero,{name:"dropdown_bg"});this.selected_text=this.make(T,n.make(32,60),{no_trans:this.data.no_trans,key:this.data.items[this.data.selected_index],width:250,height:100});let s=this;this.make(D,n.make(0,0),{abs:!0,rect:x.make(0,0,1920,1080),on_click(){let i=s.box.visible;return s.box.visible=!1,i},on_drag_begin(){return s.box.visible=!1,!1}}),this.make(D,n.make(16,32),{rect:x.make(0,0,480,112),on_hover(){e.play("hover")},on_hover_end(){e.play("idle")},on_click(){return s.box.visible?!1:(s.box.visible=!0,!0)}})}}class os extends w{constructor(){super(...arguments);o(this,"dropdown_list")}get data(){return this._data}set selected_index(e){this.dropdown_list.selected_index=e}_init(){let e=this.make(j,n.make(0,0),{w:500,h:500,color:y.hex(3233172)}),s=this,i=this._make(Yh,n.make(0,0),{no_trans:this.data.no_trans,items:this.data.items,selected_index:this.data.selected_index,on_selected(h){s.data.on_selected(h)}});e.height=Math.min(500,i.height),this.dropdown_list=i,this.make(G,n.make(0,0),{w:500,h:Math.min(500,i.height),content:i})}}class Yh extends w{constructor(){super(...arguments);o(this,"height");o(this,"_selected_index");o(this,"items")}get data(){return this._data}set selected_index(e){this._selected_index=e,this._color_items(),this.data.on_selected(e)}get selected_index(){return this._selected_index}_init(){let e=140,s=0,i=this;this.items=this.data.items.map((h,r)=>{let l=this.make(Qh,n.make(0,s),{no_trans:this.data.no_trans,item:h,on_selected(){i.selected_index=r}});return s+=e,l}),this.height=s+30,this._selected_index=this.data.selected_index}_color_items(){this.items.forEach((e,s)=>{e.selected=this.selected_index===s})}}class Qh extends w{constructor(){super(...arguments);o(this,"bg");o(this,"text")}get data(){return this._data}set selected(e){e?(this.bg.color=y.white,this.text.color=y.hex(3233172)):(this.text.color=y.white,this.bg.color=y.hex(3233172))}_init(){this.bg=this.make(j,n.make(-40,-30),{w:470,h:140,color:y.hex(3233172)}),this.text=this.make(T,n.make(0,0),{no_trans:this.data.no_trans,width:340,height:140,key:this.data.item});let e=this;this.make(D,n.make(-40,-30),{rect:x.make(0,0,470,140),on_click(){return e.data.on_selected(),!0}})}}class Jh extends w{constructor(){super(...arguments);o(this,"height")}_init(){this.make(T,n.make(280,20),{key:"solitaire_settings",width:820,height:200});let e=220,s=this.make($e,n.make(40,e),{name:"turning_cards",items:["three_cards","one_card"],selected_index:xa.indexOf(De.cards),on_selected(h){De.cards=xa[h]}}),i=this.make($e,n.make(40,e*2),{name:"turning_limit",items:["no_limit","three_passes","one_pass"],selected_index:ua.indexOf(De.limit),on_selected(h){De.limit=ua[h]}});this.make_box(s),this.make_box(i),this.height=e*3+500}make_box(e,s){let i=this.make(os,n.make(e.position.x+e.dropdown.position.x,e.position.y+e.dropdown.position.y+160),{no_trans:s,items:e.data.items,selected_index:e.data.selected_index,on_selected(h){i.visible=!1,e.dropdown.data.on_selected(h),e.dropdown.selected_text.text=e.data.items[h]}});e.dropdown.box=i,i.visible=!1}}class Ot extends w{constructor(){super(...arguments);o(this,"height")}_init(){this.make(T,n.make(280,20),{key:"general_settings",width:820,height:200});let e=220,s=this.make($e,n.make(40,e*1),{no_trans:!0,name:"language",items:Ne.map(p=>te.lang_key(p)),selected_index:Ne.indexOf(ee.language),on_selected(p){te.language=Ne[p],ee.language=Ne[p]}}),i=["on","off"],h=this.make($e,n.make(40,e*2),{name:"sounds",items:["on","off"],selected_index:ee.sound?0:1,on_selected(p){ee.sound=i[p]==="on"}}),r=["on","off"],l=this.make($e,n.make(40,e*3),{name:"music",items:["on","off"],selected_index:ee.music?0:1,on_selected(p){ee.music=r[p]==="on",ee.music||$.stop_music()}});this.make_box(s,!0),this.make_box(h),this.make_box(l),this.height=e*3+500}make_box(e,s){let i=this.make(os,n.make(e.position.x+e.dropdown.position.x,e.position.y+e.dropdown.position.y+160),{no_trans:s,items:e.data.items,selected_index:e.data.selected_index,on_selected(h){i.visible=!1,e.dropdown.data.on_selected(h),e.dropdown.selected_text.text=e.data.items[h]}});e.dropdown.box=i,i.visible=!1}}class $e extends w{constructor(){super(...arguments);o(this,"dropdown")}get data(){return this._data}_init(){this.make(j,n.make(0,0),{w:1300,h:200,color:y.hex(2106433)}),this.make(T,n.make(50,60),{key:this.data.name,width:420,height:200});let e=this;this.dropdown=this.make(Wh,n.make(720,8),{no_trans:this.data.no_trans,items:this.data.items,selected_index:this.data.selected_index,on_selected(s){e.data.on_selected(s)}})}}class Dt extends w{constructor(){super(...arguments);o(this,"height")}_init(){this.make(T,n.make(700,0),{key:"overall_statistics",width:820,height:200,center:!0});let e=new Xi(mt.results,new ze([]),new ze([])),s=100;this.make(T,n.make(700,200),{key:`total_games_played%${e.total_played}%`,width:820,height:200,center:!0}),this.make(T,n.make(700,200+s*1.2),{key:`games_won%${e.total_wins}%`,width:820,height:200,center:!0}),this.make(T,n.make(700,200+s*3),{key:"top5_highscores",width:820,height:200,center:!0}),e.top_5_highscores.forEach((h,r)=>{this.make(T,n.make(200,200+s*4+s*r*1.5+80),{key:`${r+1}.`,width:80,height:100,no_trans:!0}),this.make(T,n.make(700,200+s*4+s*r*1.5+80),{key:`${h.multiplied_score}`,width:80,height:100,no_trans:!0,center:!0}),this.make(j,n.make(200,100+200+s*4+s*r*1.5+80),{w:1e3,h:20,color:y.white})}),this.height=2e3}}class Zh extends w{constructor(){super(...arguments);o(this,"height")}_init(){this.make(T,n.make(700,0),{key:"solitaire_statistics",width:820,height:200,center:!0});let e=mt.results,s=100;this.make(T,n.make(700,200),{key:`total_games_played%${e.total_played}%`,width:820,height:200,center:!0}),this.make(T,n.make(700,200+s*1.2),{key:`games_won%${e.total_wins}%`,width:820,height:200,center:!0}),this.make(T,n.make(700,200+s*3),{key:"top5_highscores",width:820,height:200,center:!0}),e.top_5_highscores.forEach((h,r)=>{this.make(T,n.make(200,200+s*4+s*r*1.5+80),{key:`${r+1}.`,width:80,height:100,no_trans:!0}),this.make(T,n.make(700,200+s*4+s*r*1.5+80),{key:`${h.multiplied_score}`,width:80,height:100,no_trans:!0,center:!0}),this.make(j,n.make(200,100+200+s*4+s*r*1.5+80),{w:1e3,h:20,color:y.white})}),this.height=2e3}}class er extends w{get data(){return this._data}_init(){let a=this.data.selected_index??0;this.make(j,n.zero,{w:1920,h:1080,color:y.hex(11845300)});let e=this;this.make(vt,n.zero,{key:"statistics",on_back(){q.next(e.data.on_back??Fe)}}),this.make(Ke,n.make(220,150),{name:"panel_bg_nine_slice",w:1480,h:910});let s=1e3/4,i=s*1.6,h=[this._make(Z,n.make(2,2),{text:"overall",w:i}),this._make(Z,n.make(2+s+4,2),{no_trans:!0,text:"solitaire",w:i}),this._make(Z,n.make(2+(s+4)*2,2),{no_trans:!0,text:"fourtimes",w:i}),this._make(Z,n.make(2+(s+4)*3,2),{no_trans:!0,text:"octopus",w:i})],r;this.make(aa,n.make(600,8),{tabs:h,selected_index:a,on_selected_index(u){r.selected_index=u}});let l=this._make(Dt,n.make(0,0),{}),p=this._make(G,n.make(0,0),{w:1450,h:850,content:l});l=this._make(Zh,n.make(0,0),{});let d=this._make(G,n.make(0,0),{w:1450,h:850,content:l});l=this._make(Dt,n.make(0,0),{});let g=this._make(G,n.make(0,0),{w:1450,h:850,content:l});l=this._make(Dt,n.make(0,0),{});let f=this._make(G,n.make(0,0),{w:1450,h:850,content:l}),m=[p,d,g,f];r=this.make(sa,n.make(220,180),{w:1050,h:850,panels:m,selected_index:a})}}class ls extends w{get data(){return this._data}_init(){let a=this.data.selected_index??0;this.make(j,n.zero,{w:1920,h:1080,color:y.hex(11845300)});let e=this;this.make(vt,n.zero,{key:"settings",on_back(){q.next(e.data.on_back??Fe)}}),this.make(Ke,n.make(220,150),{name:"panel_bg_nine_slice",w:1480,h:910});let s=1e3/4,i=s*1.6,h=[this._make(Z,n.make(2,2),{text:"general",w:i}),this._make(Z,n.make(2+s+4,2),{no_trans:!0,text:"solitaire",w:i}),this._make(Z,n.make(2+(s+4)*2,2),{no_trans:!0,text:"fourtimes",w:i}),this._make(Z,n.make(2+(s+4)*3,2),{no_trans:!0,text:"octopus",w:i})],r;this.make(aa,n.make(600,8),{tabs:h,selected_index:a,on_selected_index(u){r.selected_index=u}});let l=this._make(Ot,n.make(0,0),{}),p=this._make(G,n.make(0,0),{w:1450,h:850,content:l});l=this._make(Jh,n.make(0,0),{});let d=this._make(G,n.make(0,0),{w:1450,h:850,content:l});l=this._make(Ot,n.make(0,0),{});let g=this._make(G,n.make(0,0),{w:1450,h:850,content:l});l=this._make(Ot,n.make(0,0),{});let f=this._make(G,n.make(0,0),{w:1450,h:850,content:l}),m=[p,d,g,f];r=this.make(sa,n.make(220,180),{w:1050,h:850,panels:m,selected_index:a})}}class Fe extends w{_init(){this.make(j,n.zero,{w:1920,h:1080,color:y.hex(11845300)});let a=this.make(R,n.zero,{name:"main_title_bg"});a.scale=n.make(2,2),a=this.make(R,n.make(200,150),{name:"main_bg"});let e=this.make(re,n.make(16,32),{text:"sofo",color:y.hex(2106417)});this.make(re,n.make(16+e.width,32),{text:".demo",color:y.hex(11845300)});let s=200,i=320,h=this.make(R,n.make(s,250),{name:"main_card_bg"});h.play_now("solitaire"),this.make(D,n.make(s+120,350),{rect:x.make(0,0,220,500),on_hover(){h.play("solitaire_hover")},on_hover_end(){h.play("solitaire")},on_click(){q.next(it)}});let r=this.make(re,n.make(s+120+140,350+250),{text:"solitaire",center:!0,size:98});r.rotation=Math.PI/2;let l=this.make(R,n.make(s+i,250),{name:"main_card_bg"});l.play_now("fourtimes"),this.make(D,n.make(s+i+120,350),{rect:x.make(0,0,220,500),on_hover(){l.play("fourtimes_hover")},on_hover_end(){l.play("fourtimes")},on_click(){}});let p=this.make(re,n.make(s+i+120+140,350+250),{text:"fourtimes",center:!0,size:82});p.rotation=Math.PI/2;let d=this.make(R,n.make(s+i*2,250),{name:"main_card_bg"});d.play_now("octopus"),this.make(D,n.make(s+i*2+120,350),{rect:x.make(0,0,220,500),on_hover(){d.play("octopus_hover")},on_hover_end(){d.play("octopus")},on_click(){}});let g=this.make(re,n.make(s+i*2+120+140,350+250),{text:"octopus",center:!0,size:96});g.rotation=Math.PI/2;let f=180,m=200;this.make(Ze,n.make(1300,m),{text:"how_to_play",on_click(){q.next(ns)}}),this.make(Ze,n.make(1300,m+f),{text:"statistics",on_click(){q.next(er)}}),this.make(Ze,n.make(1300,m+f*2),{text:"settings",on_click(){q.next(ls)}}),this.make(Ze,n.make(1300,m+f*3),{text:"about",on_click(){q.next(rs)}})}}class tr extends w{constructor(){super(...arguments);o(this,"theme_target");o(this,"mask_target");o(this,"target");o(this,"target2");o(this,"mask");o(this,"current");o(this,"_next")}next(e,s=n.zero,i={}){this._next||(this._next=this._make(e,s,i),this.mask=this._make(Kh,n.zero,{}))}_init(){this.target2=me.create(z.width,z.height),this.target=me.create(z.width,z.height),this.mask_target=me.create(z.width,z.height),this.theme_target=me.create(z.width,z.height),this.current=this._make(Fe,n.zero,{}),Re.set_matrix(v.create_scale_v(z.v_screen)),zt.set_matrix(v.create_scale_v(z.v_screen))}_update(){var e,s,i;(e=this._next)==null||e.update(),this.current.update(),(s=this.mask)==null||s.update(),(i=this.mask)!=null&&i.done&&(this.current.dispose(),this.mask.dispose(),this.mask=void 0,this.current=this._next,this._next=void 0)}_draw(e){var s;this._next?(this.current.draw(e),e.render(this.target),e.clear(),this._next.draw(e),e.render(this.target2),e.clear(),this.mask_target.clear(y.hex(16711680)),(s=this.mask)==null||s.draw(e),e.render(this.mask_target),e.clear(),Re.texture=this.target.texture(0),Re.texture2=this.target2.texture(0),Re.mask_texture=this.mask_target.texture(0),Re.render(this.theme_target)):(this.current.draw(e),e.render(this.theme_target),e.clear()),zt.texture=this.theme_target.texture(0),zt.render()}}let q;const ge=class ge extends w{_init(){de.default_sampler=ye.make(Le.Linear),this.objects=[],$.load().then(()=>{console.log($)}),Se.load().then(()=>{te.language=ee.language,q=this.make(tr,n.zero,{})})}_update(){}_draw(){w.next_render_order=0,c.backbuffer.clear(y.black),this._draw_children(de),ht._sort_hooks()}};o(ge,"width",1920),o(ge,"height",1080),o(ge,"v_screen",n.make(ge.width,ge.height));let z=ge;const ar=t=>{let a=new z;c.run({name:"solitaire23",width:1920,height:1080,on_startup(){a.init()},on_update(){ht.update(),a.update()},on_render(){a.draw(de)}}),c.canvas&&t.appendChild(c.canvas),ht.listen(t)};ar(document.getElementById("app")); diff --git a/index.html b/index.html index cefa69c..e37d0a2 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ - + lisotaire.com - +