diff --git a/Align.html b/Align.html deleted file mode 100644 index 12a682b..0000000 --- a/Align.html +++ /dev/null @@ -1,2293 +0,0 @@ - - - - - - - - - - - - - - Align - - - - -
- - -
- -
-
-
-
-

Align

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
- -
- -
-
-
-

- Methods: -

-
-
- -
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/Align2.html b/Align2.html deleted file mode 100644 index 6e4cd17..0000000 --- a/Align2.html +++ /dev/null @@ -1,2293 +0,0 @@ - - - - - - - - - - - - - - Align2 - - - - -
- - -
- -
-
-
-
-

Align2

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
- -
- -
-
-
-

- Methods: -

-
-
- -
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/CircleShape.html b/CircleShape.html deleted file mode 100644 index a07b1b4..0000000 --- a/CircleShape.html +++ /dev/null @@ -1,2339 +0,0 @@ - - - - - - - - - - - - - - CircleShape - - - - -
- - -
- -
-
-
-
-

CircleShape

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
-
-
-
-

center: Pos2

-
- -
- -
-
-

radius: number

-
- -
- -
-
-

fill: Color32

-
- -
- -
-
-

stroke: Stroke

-
- -
-
-
- -
-
-
-

- Methods: -

-
-
-
-
-
-

visual_bounding_rect: function(CircleShape):(Rect)

-
- -
-
-
-

filled: function((Pos2),(number),(Color32)):(CircleShape)

-
- -
-
-
-

stroke: function((Pos2),(number),(Stroke)):(CircleShape)

-
- -
-
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/ClippedPrimitive.html b/ClippedPrimitive.html deleted file mode 100644 index 934921c..0000000 --- a/ClippedPrimitive.html +++ /dev/null @@ -1,2313 +0,0 @@ - - - - - - - - - - - - - - ClippedPrimitive - - - - -
- - -
- -
-
-
-
-

ClippedPrimitive

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
-
-
-
-

clip_rect: Rect

-
- -
- -
-
-

primitive: Primitive

-
- -
-
-
- -
-
-
-

- Methods: -

-
-
-
-
-
-

new: function((Rect),(Primitive)):(ClippedPrimitive)

-
- -
-
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/ClippedShape.html b/ClippedShape.html deleted file mode 100644 index 6042f36..0000000 --- a/ClippedShape.html +++ /dev/null @@ -1,2313 +0,0 @@ - - - - - - - - - - - - - - ClippedShape - - - - -
- - -
- -
-
-
-
-

ClippedShape

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
-
-
-
-

rect: Rect

-
- -
- -
-
-

shape: Shape

-
- -
-
-
- -
-
-
-

- Methods: -

-
-
-
-
-
-

new: function((Rect),(Shape)):(ClippedShape)

-
- -
-
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/Color32.html b/Color32.html deleted file mode 100644 index 1648c00..0000000 --- a/Color32.html +++ /dev/null @@ -1,2327 +0,0 @@ - - - - - - - - - - - - - - Color32 - - - - -
- - -
- -
-
-
-
-

Color32

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
-
-
-
-

r: integer

-
- -
- -
-
-

g: integer

-
- -
- -
-
-

b: integer

-
- -
- -
-
-

a: integer

-
- -
-
-
- -
-
-
-

- Methods: -

-
-
-
-
-
-

default: function():(Color32)

-
- -
-
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/Context.html b/Context.html deleted file mode 100644 index 6f578c4..0000000 --- a/Context.html +++ /dev/null @@ -1,2318 +0,0 @@ - - - - - - - - - - - - - - Context - - - - -
- - -
- -
-
-
-
-

Context

-
-
-
-
-
-

- Type doc: -

-
-
-
-

This is the Egui Context

-

this will be given to the gui function, and can be used to create windows or other containers

-

The containers will take a callback which will be given a Ui struct. that can be used by the callback to actually draw the user interface

- -
-
-
-
-
-

- Fields: -

-
-
- -
- -
-
-
-

- Methods: -

-
-
-
-
-
-

request_repaint: function(Context):()

-
- -
-
-
-

is_using_pointer: function(Context):(boolean)

-
- -
-
-
-

help: function(string):(string)

-
- -
-
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/CubicBezierShape.html b/CubicBezierShape.html deleted file mode 100644 index 885b495..0000000 --- a/CubicBezierShape.html +++ /dev/null @@ -1,2393 +0,0 @@ - - - - - - - - - - - - - - CubicBezierShape - - - - -
- - -
- -
-
-
-
-

CubicBezierShape

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
-
-
-
-

closed: boolean

-
- -
- -
-
-

fill: Color32

-
- -
- -
-
-

stroke: Stroke

-
- -
- -
-
-

points: {Pos2}

-
- -
-
-
- -
-
-
-

- Methods: -

-
-
-
-
-
-

transform: function(CubicBezierShape,RectTransform):(CubicBezierShape)

-
- -
-
-
-

to_path_shapes: function(CubicBezierShape,(number),(number)):({PathShape})

-
- -
-
-
-

visual_bounding_rect: function(CubicBezierShape):(Rect)

-
- -
-
-
-

logical_bounding_rect: function(CubicBezierShape):(Rect)

-
- -
-
-
-

split_range: function(CubicBezierShape,(number),(number)):(CubicBezierShape)

-
- -
-
-
-

num_quadratics: function(CubicBezierShape,number):(integer)

-
- -
-
-
-

find_cross_t: function(CubicBezierShape,number):(number)

-
- -
-
-
-

sample: function(CubicBezierShape,number):(Pos2)

-
- -
-
-
-

flatten: function(CubicBezierShape,number):({Pos2})

-
- -
-
-
-

flatten_closed: function(CubicBezierShape,(number),(number)):({{Pos2}})

-
- -
-
-
-

for_each_flattened_with_t: function(CubicBezierShape,(number),(function(...any):any...)):()

-
- -
-
-
-

from_points_stroke: function(({Pos2}),(boolean),(Color32),(Stroke)):(CubicBezierShape)

-
- -
-
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/CursorIcon.html b/CursorIcon.html deleted file mode 100644 index d082045..0000000 --- a/CursorIcon.html +++ /dev/null @@ -1,2293 +0,0 @@ - - - - - - - - - - - - - - CursorIcon - - - - -
- - -
- -
-
-
-
-

CursorIcon

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
- -
- -
-
-
-

- Methods: -

-
-
- -
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/FontFamily.html b/FontFamily.html deleted file mode 100644 index d8b341e..0000000 --- a/FontFamily.html +++ /dev/null @@ -1,2299 +0,0 @@ - - - - - - - - - - - - - - FontFamily - - - - -
- - -
- -
-
-
-
-

FontFamily

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
- -
- -
-
-
-

- Methods: -

-
-
-
-
-
-

default: function():(FontFamily)

-
- -
-
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/FontId.html b/FontId.html deleted file mode 100644 index aebfbb0..0000000 --- a/FontId.html +++ /dev/null @@ -1,2325 +0,0 @@ - - - - - - - - - - - - - - FontId - - - - -
- - -
- -
-
-
-
-

FontId

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
-
-
-
-

size: number

-
- -
- -
-
-

family: FontFamily

-
- -
-
-
- -
-
-
-

- Methods: -

-
-
-
-
-
-

new: function((number),(FontFamily)):(FontId)

-
- -
-
-
-

proportional: function(number):(FontId)

-
- -
-
-
-

monospace: function(number):(FontId)

-
- -
-
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/Frame.html b/Frame.html deleted file mode 100644 index 2ba449c..0000000 --- a/Frame.html +++ /dev/null @@ -1,2293 +0,0 @@ - - - - - - - - - - - - - - Frame - - - - -
- - -
- -
-
-
-
-

Frame

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
- -
- -
-
-
-

- Methods: -

-
-
- -
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/Galley.html b/Galley.html deleted file mode 100644 index 7b3e0f1..0000000 --- a/Galley.html +++ /dev/null @@ -1,2293 +0,0 @@ - - - - - - - - - - - - - - Galley - - - - -
- - -
- -
-
-
-
-

Galley

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
- -
- -
-
-
-

- Methods: -

-
-
- -
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/Id.html b/Id.html deleted file mode 100644 index 66273d2..0000000 --- a/Id.html +++ /dev/null @@ -1,2293 +0,0 @@ - - - - - - - - - - - - - - Id - - - - -
- - -
- -
-
-
-
-

Id

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
- -
- -
-
-
-

- Methods: -

-
-
- -
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/Interaction.html b/Interaction.html deleted file mode 100644 index d51c27e..0000000 --- a/Interaction.html +++ /dev/null @@ -1,2314 +0,0 @@ - - - - - - - - - - - - - - Interaction - - - - -
- - -
- -
-
-
-
-

Interaction

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
-
-
-
-

resize_grab_radius_side: number

-
- -
- -
-
-

resize_grab_radius_corner: number

-
- -
- -
-
-

show_tooltips_only_when_still: boolean

-
- -
-
-
- -
-
-
-

- Methods: -

-
-
- -
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/LayerId.html b/LayerId.html deleted file mode 100644 index bcf7ad3..0000000 --- a/LayerId.html +++ /dev/null @@ -1,2293 +0,0 @@ - - - - - - - - - - - - - - LayerId - - - - -
- - -
- -
-
-
-
-

LayerId

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
- -
- -
-
-
-

- Methods: -

-
-
- -
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/Layout.html b/Layout.html deleted file mode 100644 index 938ab92..0000000 --- a/Layout.html +++ /dev/null @@ -1,2293 +0,0 @@ - - - - - - - - - - - - - - Layout - - - - -
- - -
- -
-
-
-
-

Layout

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
- -
- -
-
-
-

- Methods: -

-
-
- -
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/Margin.html b/Margin.html deleted file mode 100644 index 39f1bb6..0000000 --- a/Margin.html +++ /dev/null @@ -1,2350 +0,0 @@ - - - - - - - - - - - - - - Margin - - - - -
- - -
- -
-
-
-
-

Margin

-
-
-
-
-
-

- Type doc: -

-
-
-
-

egui docs link: https://docs.rs/egui/latest/egui/style/struct.Margin.html

- -
-
-
-
-
-

- Fields: -

-
-
-
-
-
-

left: number

-
- -
- -
- - -
- -
-
-

top: number

-
- -
- -
-
-

bottom: number

-
- -
-
-
- -
-
-
-

- Methods: -

-
-
-
-
-
-

sum: function(Margin):(Vec2)

-
- -
-
-
-

left_top: function(Margin):(Vec2)

-
- -
-
-
-

right_bottom: function(Margin):(Vec2)

-
- -
-
-
-

same: function(number):(Margin)

-
- -
-
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/Mesh.html b/Mesh.html deleted file mode 100644 index cb8681c..0000000 --- a/Mesh.html +++ /dev/null @@ -1,2293 +0,0 @@ - - - - - - - - - - - - - - Mesh - - - - -
- - -
- -
-
-
-
-

Mesh

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
- -
- -
-
-
-

- Methods: -

-
-
- -
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/Painter.html b/Painter.html deleted file mode 100644 index 3a57fb5..0000000 --- a/Painter.html +++ /dev/null @@ -1,2293 +0,0 @@ - - - - - - - - - - - - - - Painter - - - - -
- - -
- -
-
-
-
-

Painter

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
- -
- -
-
-
-

- Methods: -

-
-
- -
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/PathShape.html b/PathShape.html deleted file mode 100644 index 2b53148..0000000 --- a/PathShape.html +++ /dev/null @@ -1,2327 +0,0 @@ - - - - - - - - - - - - - - PathShape - - - - -
- - -
- -
-
-
-
-

PathShape

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
-
-
-
-

closed: boolean

-
- -
- -
-
-

fill: Color32

-
- -
- -
-
-

stroke: Stroke

-
- -
- -
-
-

points: {Pos2}

-
- -
-
-
- -
-
-
-

- Methods: -

-
-
-
-
-
-

visual_bounding_rect: function(PathShape):(Rect)

-
- -
-
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/PointerButton.html b/PointerButton.html deleted file mode 100644 index 780efff..0000000 --- a/PointerButton.html +++ /dev/null @@ -1,2293 +0,0 @@ - - - - - - - - - - - - - - PointerButton - - - - -
- - -
- -
-
-
-
-

PointerButton

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
- -
- -
-
-
-

- Methods: -

-
-
- -
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/Pos2.html b/Pos2.html deleted file mode 100644 index c60def4..0000000 --- a/Pos2.html +++ /dev/null @@ -1,2359 +0,0 @@ - - - - - - - - - - - - - - Pos2 - - - - -
- - -
- -
-
-
-
-

Pos2

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
- -
- -
-
-
-

- Methods: -

-
-
-
-
-
-

to_vec2: function(Pos2):(Vec2)

-
- -
-
-
-

distance: function(Pos2,Pos2):(number)

-
- -
-
-
-

distance_sq: function(Pos2,Pos2):(number)

-
- -
-
-
-

floor: function(Pos2):(Pos2)

-
- -
-
-
-

round: function(Pos2):(Pos2)

-
- -
-
-
-

ceil: function(Pos2):(Pos2)

-
- -
-
-
-

is_finite: function(Pos2):(boolean)

-
- -
-
-
-

any_nan: function(Pos2):(boolean)

-
- -
-
-
-

min: function(Pos2,Pos2):(Pos2)

-
- -
-
-
-

max: function(Pos2,Pos2):(Pos2)

-
- -
-
-
-

clamp: function(Pos2,(Pos2),(Pos2)):(Pos2)

-
- -
-
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/Primitive.html b/Primitive.html deleted file mode 100644 index 1d7d7b8..0000000 --- a/Primitive.html +++ /dev/null @@ -1,2293 +0,0 @@ - - - - - - - - - - - - - - Primitive - - - - -
- - -
- -
-
-
-
-

Primitive

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
- -
- -
-
-
-

- Methods: -

-
-
- -
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/Rect.html b/Rect.html deleted file mode 100644 index 7a3c66b..0000000 --- a/Rect.html +++ /dev/null @@ -1,2293 +0,0 @@ - - - - - - - - - - - - - - Rect - - - - -
- - -
- -
-
-
-
-

Rect

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
- -
- -
-
-
-

- Methods: -

-
-
- -
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/RectShape.html b/RectShape.html deleted file mode 100644 index fcfd11c..0000000 --- a/RectShape.html +++ /dev/null @@ -1,2321 +0,0 @@ - - - - - - - - - - - - - - RectShape - - - - -
- - -
- -
-
-
-
-

RectShape

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
-
-
-
-

rect: Rect

-
- -
- -
-
-

rounding: Rounding

-
- -
- -
-
-

fill: Color32

-
- -
- -
-
-

stroke: Stroke

-
- -
-
-
- -
-
-
-

- Methods: -

-
-
- -
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/RectTransform.html b/RectTransform.html deleted file mode 100644 index 1a97700..0000000 --- a/RectTransform.html +++ /dev/null @@ -1,2347 +0,0 @@ - - - - - - - - - - - - - - RectTransform - - - - -
- - -
- -
-
-
-
-

RectTransform

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
- -
- -
-
-
-

- Methods: -

-
-
-
-
-
-

from: function(RectTransform):(Rect)

-
- -
-
-
-

to: function(RectTransform):(Rect)

-
- -
-
-
-

scale: function(RectTransform):(Vec2)

-
- -
-
-
-

inverse: function(RectTransform):(RectTransform)

-
- -
-
-
-

transform_pos: function(RectTransform,Pos2):(Pos2)

-
- -
-
-
-

transform_rect: function(RectTransform,Rect):(Rect)

-
- -
-
-
-

transform_pos_clamped: function(RectTransform,Pos2):(Pos2)

-
- -
-
-
-

identity: function(Rect):(RectTransform)

-
- -
-
-
-

from_to: function((Rect),(Rect)):(RectTransform)

-
- -
-
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/Response.html b/Response.html deleted file mode 100644 index fa63205..0000000 --- a/Response.html +++ /dev/null @@ -1,2520 +0,0 @@ - - - - - - - - - - - - - - Response - - - - -
- - -
- -
-
-
-
-

Response

-
-
-
-
-
-

- Type doc: -

-
-
-
-

This is the Egui Response

- -
-
-
-
-
-

- Fields: -

-
-
- -
- -
-
-
-

- Methods: -

-
-
-
-
-
-

clicked: function(Response):(boolean)

-
- -
-
-
-

clicked_by: function(Response,PointerButton):(boolean)

-
- -
-
-
-

secondary_clicked: function(Response):(boolean)

-
- -
-
-
-

middle_clicked: function(Response):(boolean)

-
- -
-
-
-

double_clicked: function(Response):(boolean)

-
- -
-
-
-

triple_clicked: function(Response):(boolean)

-
- -
-
-
-

double_clicked_by: function(Response,PointerButton):(boolean)

-
- -
-
-
-

triple_clicked_by: function(Response,PointerButton):(boolean)

-
- -
-
-
-

clicked_elsewhere: function(Response):(boolean)

-
- -
-
-
-

enabled: function(Response):(boolean)

-
- -
-
-
-

hovered: function(Response):(boolean)

-
- -
-
-
-

has_focus: function(Response):(boolean)

-
- -
-
-
-

gained_focus: function(Response):(boolean)

-
- -
-
-
-

lost_focus: function(Response):(boolean)

-
- -
-
-
-

request_focus: function(Response):()

-
- -
-
-
-

surrender_focus: function(Response):()

-
- -
-
-
-

dragged: function(Response):(boolean)

-
- -
-
-
-

dragged_by: function(Response,PointerButton):(boolean)

-
- -
-
-
-

drag_started: function(Response):(boolean)

-
- -
-
-
-

drag_released: function(Response):(boolean)

-
- -
-
-
-

drag_delta: function(Response):(Vec2)

-
- -
-
-
-

interact_pointer_pos: function(Response):(Pos2)

-
- -
-
-
-

hover_pos: function(Response):(Pos2)

-
- -
-
-
-

is_pointer_button_down_on: function(Response):(boolean)

-
- -
-
-
-

changed: function(Response):(boolean)

-
- -
-
-
-

on_hover_ui: function(Response,function(...any):any...):(Response)

-
- -
-
-
-

on_disabled_hover_ui: function(Response,function(...any):any...):(Response)

-
- -
-
-
-

on_hover_ui_at_pointer: function(Response,function(...any):any...):(Response)

-
- -
-
-
-

on_hover_text_at_pointer: function(Response,string | RichText | WidgetText | Galley):(Response)

-
- -
-
-
-

on_hover_text: function(Response,string | RichText | WidgetText | Galley):(Response)

-
- -
-
-
-

on_disabled_hover_text: function(Response,string | RichText | WidgetText | Galley):(Response)

-
- -
-
-
-

on_hover_cursor: function(Response,CursorIcon):(Response)

-
- -
-
-
-

interact: function(Response,Sense):(Response)

-
- -
-
-
-

scroll_to_me: function(Response,Align):()

-
- -
-
-
-

context_menu: function(Response,function(...any):any...):(Response)

-
- -
-
-
-

union: function(Response,Response):(Response)

-
- -
-
-
-

mark_changed: function(Response):()

-
- -
-
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/RichText.html b/RichText.html deleted file mode 100644 index 1a294ed..0000000 --- a/RichText.html +++ /dev/null @@ -1,2293 +0,0 @@ - - - - - - - - - - - - - - RichText - - - - -
- - -
- -
-
-
-
-

RichText

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
- -
- -
-
-
-

- Methods: -

-
-
- -
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/Rounding.html b/Rounding.html deleted file mode 100644 index ee861ee..0000000 --- a/Rounding.html +++ /dev/null @@ -1,2356 +0,0 @@ - - - - - - - - - - - - - - Rounding - - - - -
- - -
- -
-
-
-
-

Rounding

-
-
-
-
-
-

- Type doc: -

-
-
-
-

egui docs link: https://docs.rs/egui/latest/egui/struct.Stroke.html

- -
-
-
-
-
-

- Fields: -

-
-
-
-
-
-

nw: number

-
- -
- -
-
-

ne: number

-
- -
- -
-
-

sw: number

-
- -
- -
-
-

se: number

-
- -
-
-
- -
-
-
-

- Methods: -

-
-
-
-
-
-

is_same: function(Rounding):(boolean)

-
- -
-
-
-

at_least: function(Rounding,number):(Rounding)

-
- -
-
-
-

at_most: function(Rounding,number):(Rounding)

-
- -
-
-
-

same: function(number):(Rounding)

-
- -
-
-
-

none: function():(Rounding)

-
- -
-
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/Selection.html b/Selection.html deleted file mode 100644 index 1fb1bfe..0000000 --- a/Selection.html +++ /dev/null @@ -1,2307 +0,0 @@ - - - - - - - - - - - - - - Selection - - - - -
- - -
- -
-
-
-
-

Selection

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
-
-
-
-

bg_fill: Color32

-
- -
- -
-
-

stroke: Stroke

-
- -
-
-
- -
-
-
-

- Methods: -

-
-
- -
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/Sense.html b/Sense.html deleted file mode 100644 index 7803ce6..0000000 --- a/Sense.html +++ /dev/null @@ -1,2320 +0,0 @@ - - - - - - - - - - - - - - Sense - - - - -
- - -
- -
-
-
-
-

Sense

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
-
-
-
-

click: boolean

-
- -
- -
-
-

drag: boolean

-
- -
- -
-
-

focusable: boolean

-
- -
-
-
- -
-
-
-

- Methods: -

-
-
-
-
-
-

interactive: function(Sense):(boolean)

-
- -
-
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/Shadow.html b/Shadow.html deleted file mode 100644 index bc3b45f..0000000 --- a/Shadow.html +++ /dev/null @@ -1,2307 +0,0 @@ - - - - - - - - - - - - - - Shadow - - - - -
- - -
- -
-
-
-
-

Shadow

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
-
-
-
-

extrusion: number

-
- -
- -
-
-

color: Color32

-
- -
-
-
- -
-
-
-

- Methods: -

-
-
- -
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/Shape.html b/Shape.html deleted file mode 100644 index bc228d7..0000000 --- a/Shape.html +++ /dev/null @@ -1,2395 +0,0 @@ - - - - - - - - - - - - - - Shape - - - - -
- - -
- -
-
-
-
-

Shape

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
- -
- -
-
-
-

- Methods: -

-
-
-
-
-
-

visual_bounding_rect: function(Shape):(Rect)

-
- -
-
-
-

texture_id: function(Shape):(TextureId)

-
- -
-
-
-

translate: function(Shape,Vec2):()

-
- -
-
-
-

line_segment: function(({Pos2}),(Stroke)):(Shape)

-
- -
-
-
-

line: function(({Pos2}),(Stroke)):(Shape)

-
- -
-
-
-

closed_line: function(({Pos2}),(Stroke)):(Shape)

-
- -
-
-
-

dotted_line: function(({Pos2}),(Stroke)):(Shape)

-
- -
-
-
-

dashed_line: function(({Pos2}),(Stroke),(number),(number)):({Shape})

-
- -
-
-
-

convex_polygon: function(({Pos2}),(Color32),(Stroke)):(Shape)

-
- -
-
-
-

circle_filled: function((Pos2),(number),(Color32)):(Shape)

-
- -
-
-
-

circle_stroke: function((Pos2),(number),(Stroke)):(Shape)

-
- -
-
-
-

rect_filled: function((Rect),(Rounding),(Color32)):(Shape)

-
- -
-
-
-

rect_stroke: function((Rect),(Rounding),(Stroke)):(Shape)

-
- -
-
-
-

galley: function((Pos2),(Galley)):(Shape)

-
- -
-
-
-

galley_with_color: function((Pos2),(Galley),(Color32)):(Shape)

-
- -
-
-
-

mesh: function(Mesh):(Shape)

-
- -
-
-
-

image: function((TextureId),(Rect),(Rect),(Color32)):(Shape)

-
- -
-
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/Spacing.html b/Spacing.html deleted file mode 100644 index fdd57d1..0000000 --- a/Spacing.html +++ /dev/null @@ -1,2402 +0,0 @@ - - - - - - - - - - - - - - Spacing - - - - -
- - -
- -
-
-
-
-

Spacing

-
-
-
-
-
-

- Type doc: -

-
-
-
-

egui docs link: https://docs.rs/egui/latest/egui/style/struct.Spacing.html

- -
-
-
-
-
-

- Fields: -

-
-
-
-
-
-

item_spacing: Vec2

-
- -
- -
-
-

window_margin: Margin

-
- -
- -
-
-

button_padding: Vec2

-
- -
- -
-
-

indent: number

-
- -
- -
-
-

interact_size: Vec2

-
- -
- -
-
-

slider_width: number

-
- -
- -
-
-

text_edit_width: number

-
- -
- -
-
-

icon_width: number

-
- -
- -
-
-

icon_width_inner: number

-
- -
- -
-
-

icon_spacing: number

-
- -
- -
-
-

tooltip_width: number

-
- -
- -
-
-

indent_ends_with_horizontal_line: boolean

-
- -
- -
-
-

combo_height: number

-
- -
- -
-
-

scroll_bar_width: number

-
- -
-
-
- -
-
-
-

- Methods: -

-
-
-
-
-
-

icon_rectangles: function(Spacing,Rect):((Rect),(Rect))

-
- -
-
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/Stroke.html b/Stroke.html deleted file mode 100644 index 900c8bb..0000000 --- a/Stroke.html +++ /dev/null @@ -1,2330 +0,0 @@ - - - - - - - - - - - - - - Stroke - - - - -
- - -
- -
-
-
-
-

Stroke

-
-
-
-
-
-

- Type doc: -

-
-
-
-

egui docs link: https://docs.rs/egui/latest/egui/struct.Stroke.html

- -
-
-
-
-
-

- Fields: -

-
-
-
-
-
-

width: number

-
- -
- -
-
-

color: Color32

-
- -
-
-
- -
-
-
-

- Methods: -

-
-
-
-
-
-

is_empty: function(Stroke):(boolean)

-
- -
-
-
-

none: function():(Stroke)

-
- -
-
-
-

new: function((number),(Color32)):(Stroke)

-
- -
-
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/Style.html b/Style.html deleted file mode 100644 index 4691bcd..0000000 --- a/Style.html +++ /dev/null @@ -1,2293 +0,0 @@ - - - - - - - - - - - - - - Style - - - - -
- - -
- -
-
-
-
-

Style

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
- -
- -
-
-
-

- Methods: -

-
-
- -
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/TextShape.html b/TextShape.html deleted file mode 100644 index dbd4daa..0000000 --- a/TextShape.html +++ /dev/null @@ -1,2345 +0,0 @@ - - - - - - - - - - - - - - TextShape - - - - -
- - -
- -
-
-
-
-

TextShape

-
-
-
-
-
-

- Type doc: -

-
-
-
-

egui docs link: https://docs.rs/epaint/latest/epaint/struct.TextShape.html#

- -
-
-
-
-
-

- Fields: -

-
-
-
-
-
-

pos: Pos2

-
- -
- -
-
-

underline: Stroke

-
- -
- -
-
-

angle: number

-
- -
- -
-
-

galley: Galley

-
- -
- -
-
-

override_text_color: Color32

-
- -
-
-
- -
-
-
-

- Methods: -

-
-
-
-
-
-

visual_bounding_rect: function(TextShape):(Rect)

-
- -
-
-
-

new: function((Pos2),(Galley)):(TextShape)

-
- -
-
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/TextStyle.html b/TextStyle.html deleted file mode 100644 index c244afb..0000000 --- a/TextStyle.html +++ /dev/null @@ -1,2293 +0,0 @@ - - - - - - - - - - - - - - TextStyle - - - - -
- - -
- -
-
-
-
-

TextStyle

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
- -
- -
-
-
-

- Methods: -

-
-
- -
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/TextureHandle.html b/TextureHandle.html deleted file mode 100644 index 2a245c6..0000000 --- a/TextureHandle.html +++ /dev/null @@ -1,2317 +0,0 @@ - - - - - - - - - - - - - - TextureHandle - - - - -
- - -
- -
-
-
-
-

TextureHandle

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
- -
- -
-
-
-

- Methods: -

-
-
-
-
-
-

name: function(TextureHandle):(string)

-
- -
-
-
-

aspect_ratio: function(TextureHandle):(number)

-
- -
-
-
-

size: function(TextureHandle):({integer})

-
- -
-
-
-

id: function(TextureHandle):(TextureId)

-
- -
-
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/TextureId.html b/TextureId.html deleted file mode 100644 index 305a5ad..0000000 --- a/TextureId.html +++ /dev/null @@ -1,2293 +0,0 @@ - - - - - - - - - - - - - - TextureId - - - - -
- - -
- -
-
-
-
-

TextureId

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
- -
- -
-
-
-

- Methods: -

-
-
- -
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/Ui.html b/Ui.html deleted file mode 100644 index dc1d0a7..0000000 --- a/Ui.html +++ /dev/null @@ -1,3034 +0,0 @@ - - - - - - - - - - - - - - Ui - - - - -
- - -
- -
-
-
-
-

Ui

-
-
-
-
-
-

- Type doc: -

-
-
-
-

This is the egui::Ui wrapper type

- -
-
-
-
-
-

- Fields: -

-
-
- -
- -
-
-
-

- Methods: -

-
-
-
-
-
-

id: function(Ui):(Id)

-
- -
-
-
-

style: function(Ui):(Style)

-
- -
-
-
-

spacing: function(Ui):(Spacing)

-
- -
-
-
-

visuals: function(Ui):(Visuals)

-
- -
-
-
-

ctx: function(Ui):(Context)

-
- -
-
-
-

painter: function(Ui):(Painter)

-
- -
-
-
-

is_enabled: function(Ui):(boolean)

-
- -
-
-
-

is_visible: function(Ui):(boolean)

-
- -
-
-
-

layout: function(Ui):(Layout)

-
- -
-
-
-

wrap_text: function(Ui):(boolean)

-
- -
-
-
-

painter_at: function(Ui,Rect):(Painter)

-
- -
-
-
-

layer_id: function(Ui):(LayerId)

-
- -
-
-
-

text_style_height: function(Ui,TextStyle):(number)

-
- -
-
-
-

clip_rect: function(Ui):(Rect)

-
- -
-
-
-

min_rect: function(Ui):(Rect)

-
- -
-
-
-

min_size: function(Ui):(Vec2)

-
- -
-
-
-

max_rect: function(Ui):(Rect)

-
- -
-
-
-

available_size: function(Ui):(Vec2)

-
- -
-
-
-

available_width: function(Ui):(number)

-
- -
-
-
-

available_height: function(Ui):(number)

-
- -
-
-
-

available_size_before_wrap: function(Ui):(Vec2)

-
- -
-
-
-

available_rect_before_wrap: function(Ui):(Rect)

-
- -
-
-
-

make_persistent_id: function(Ui,string | integer | boolean):(Id)

-
-

use this function to get a unique ID for your widget. you need to provide something that will remain unique for your widget. maybe its name or its position or whatever. but completely unique to this widget

-
-
-
-
-

interact: function(Ui,(Rect),(Id),(Sense)):(Response)

-
- -
-
-
-

rect_contains_pointer: function(Ui,Rect):(boolean)

-
- -
-
-
-

ui_contains_pointer: function(Ui):(boolean)

-
- -
-
-
-

cursor: function(Ui):(Rect)

-
- -
-
-
-

next_widget_position: function(Ui):(Vec2)

-
- -
-
-
-

scroll_to_rect: function(Ui,(Rect),(Align)):()

-
- -
-
-
-

scroll_to_cursor: function(Ui,Align):()

-
- -
-
-
-

scroll_with_delta: function(Ui,Vec2):()

-
- -
-
-
-

debug_paint_cursor: function(Ui):()

-
- -
-
-
-

child_ui: function(Ui,(Rect),(Layout),(function(...any):any...)):(MultiValue)

-
- -
-
-
-

child_ui_with_source: function(Ui,(Rect),(Layout),(string | integer | boolean),(function(...any):any...)):(MultiValue)

-
- -
-
-
-

set_style: function(Ui,Style):()

-
- -
-
-
-

reset_style: function(Ui):()

-
- -
-
-
-

set_enabled: function(Ui,boolean):()

-
- -
-
-
-

set_visible: function(Ui,boolean):()

-
- -
-
-
-

set_clip_rect: function(Ui,Rect):()

-
- -
-
-
-

is_rect_visible: function(Ui,Rect):(boolean)

-
- -
-
-
-

set_max_size: function(Ui,Vec2):()

-
- -
-
-
-

set_max_width: function(Ui,number):()

-
- -
-
-
-

set_max_height: function(Ui,number):()

-
- -
-
-
-

set_min_size: function(Ui,Vec2):()

-
- -
-
-
-

set_min_width: function(Ui,number):()

-
- -
-
-
-

set_min_height: function(Ui,number):()

-
- -
-
-
-

shrink_width_to_current: function(Ui):()

-
- -
-
-
-

shrink_height_to_current: function(Ui):()

-
- -
-
-
-

expand_to_include_rect: function(Ui,Rect):()

-
- -
-
-
-

set_width_range: function(Ui,(number),(number)):()

-
- -
-
-
-

set_height_range: function(Ui,(number),(number)):()

-
- -
-
-
-

set_width: function(Ui,number):()

-
- -
-
-
-

set_height: function(Ui,number):()

-
- -
-
-
-

expand_to_include_x: function(Ui,number):()

-
- -
-
-
-

expand_to_include_y: function(Ui,number):()

-
- -
-
-
-

allocate_response: function(Ui,(Vec2),(Sense)):(Response)

-
- -
-
-
-

allocate_exact_size: function(Ui,(Vec2),(Sense)):((Rect),(Response))

-
- -
-
-
-

allocate_at_least: function(Ui,(Vec2),(Sense)):((Rect),(Response))

-
- -
-
-
-

allocate_space: function(Ui,Vec2):((Id),(Rect))

-
- -
-
-
-

allocate_rect: function(Ui,(Rect),(Sense)):(Response)

-
- -
-
-
-

allocate_ui: function(Ui,(Vec2),(function(...any):any...)):((Response),(MultiValue))

-
- -
-
-
-

allocate_ui_with_layout: function(Ui,(Vec2),(Layout),(function(...any):any...)):((Response),(MultiValue))

-
- -
-
-
-

allocate_ui_at_rect: function(Ui,(Rect),(function(...any):any...)):((Response),(MultiValue))

-
- -
-
-
-

allocate_painter: function(Ui,(Vec2),(Sense)):((Response),(Painter))

-
- -
-
-
-

add: function(Ui,{any : any } ):(Response)

-
-
    This is a generic function that takes and adds a specific widget to the Ui.
-    This takes a table as argument. below, you can see how the table will be used.
-    The table represents a generic widget and what the fields mean will be decided by the widget itself. 
-    The table must have a field called "widget_type" representing the type of widget with any of the following values:
-        button, custom
-    custom is a widget which is created inside lua itself to help addon makers reuse widgets. 
-    all widgets will basically use this table and Ui to draw themselves. different widgets need different data.
-    
-    Button:
-        text: string. the text to show inside the button.
-        wrap: bool.   whether the button should wrap the inside text.
-
-
-
-
-
-

add_sized: function(Ui,(Vec2),({any : any } )):(Response)

-
- -
-
-
-

put: function(Ui,(Rect),({any : any } )):(Response)

-
- -
-
-
-

add_enabled: function(Ui,(boolean),({any : any } )):(Response)

-
- -
-
-
-

add_enabled_ui: function(Ui,(boolean),(function(...any):any...)):((Response),(MultiValue))

-
-

will create a new scope and add the ui after setting whether it should be enabled or not. won't affect other Ui after this

-
-
-
-
-

add_visible: function(Ui,(boolean),({any : any } )):(Response)

-
- -
-
-
-

add_visible_ui: function(Ui,(boolean),(function(...any):any...)):((Response),(MultiValue))

-
- -
-
-
-

add_space: function(Ui,number):()

-
- -
-
-
-

button: function(Ui,string | RichText | WidgetText | Galley):(Response)

-
- -
-
-
-

checkbox: function(Ui,(boolean),(string | RichText | WidgetText | Galley)):((Response),(boolean))

-
- -
-
-
-

code: function(Ui,string | RichText):(Response)

-
- -
-
-
-

code_editor: function(Ui,string):((Response),(string))

-
- -
-
-
-

colored_label: function(Ui,(Color32),(string | RichText)):(Response)

-
- -
-
-
-

drag_angle: function(Ui,number):((Response),(number))

-
- -
-
-
-

drag_angle_tau: function(Ui,number):((Response),(number))

-
- -
-
-
-

heading: function(Ui,string | RichText):(Response)

-
- -
-
- - -
-
- - -
-
-
-

image: function(Ui,(TextureId | TextureHandle),(Vec2)):(Response)

-
- -
-
-
-

label: function(Ui,string | RichText | WidgetText | Galley):(Response)

-
- -
-
- - -
-
-
-

monospace: function(Ui,string | RichText):(Response)

-
- -
-
-
-

radio: function(Ui,(boolean),(string | RichText | WidgetText | Galley)):(Response)

-
- -
-
-
-

selectable_label: function(Ui,(boolean),(string | RichText | WidgetText | Galley)):(Response)

-
- -
-
-
-

separator: function(Ui):(Response)

-
- -
-
-
-

small: function(Ui,string | RichText):(Response)

-
- -
-
-
-

small_button: function(Ui,string | RichText | WidgetText | Galley):(Response)

-
- -
-
-
-

spinner: function(Ui):(Response)

-
- -
-
-
-

strong: function(Ui,string | RichText):(Response)

-
- -
-
-
-

text_edit_singleline: function(Ui,string):((Response),(string))

-
- -
-
-
-

text_edit_multiline: function(Ui,string):((Response),(string))

-
- -
-
-
-

toggle_value: function(Ui,(boolean),(string | RichText | WidgetText | Galley)):((Response),(boolean))

-
- -
-
-
-

weak: function(Ui,string | RichText):(Response)

-
- -
-
-
-

color_edit_button_srgba: function(Ui,Color32):((Response),(Color32))

-
- -
-
-
-

group: function(Ui,function(...any):any...):((Response),(MultiValue))

-
- -
-
-
-

push_id: function(Ui,(string | integer | boolean),(function(...any):any...)):((Response),(MultiValue))

-
- -
-
-
-

scope: function(Ui,function(...any):any...):((Response),(MultiValue))

-
-

new scope to make some localized changes without affect the rest of the Ui after this

-
-
-
-
-

with_layer_id: function(Ui,(LayerId),(function(...any):any...)):((Response),(MultiValue))

-
- -
-
-
-

collapsing: function(Ui,(string | RichText | WidgetText | Galley),(function(...any):any...)):(MultiValue)

-
-

this is one of the functions with a complicated return type

-

this returns multiple values in the order of: Response of header, Response of body or nil, inner returns of body, openness (float)

-
-
-
-
-

indent: function(Ui,(string | integer | boolean),(function(...any):any...)):((Response),(MultiValue))

-
- -
-
-
-

horizontal: function(Ui,function(...any):any...):((Response),(MultiValue))

-
- -
-
-
-

horizontal_centered: function(Ui,function(...any):any...):((Response),(MultiValue))

-
- -
-
-
-

horizontal_top: function(Ui,function(...any):any...):((Response),(MultiValue))

-
- -
-
-
-

horizontal_wrapped: function(Ui,function(...any):any...):((Response),(MultiValue))

-
- -
-
-
-

vertical: function(Ui,function(...any):any...):((Response),(MultiValue))

-
- -
-
-
-

vertical_centered: function(Ui,function(...any):any...):((Response),(MultiValue))

-
- -
-
-
-

vertical_centered_justified: function(Ui,function(...any):any...):((Response),(MultiValue))

-
- -
-
-
-

with_layout: function(Ui,(Layout),(function(...any):any...)):((Response),(MultiValue))

-
- -
-
-
-

centered_and_justified: function(Ui,function(...any):any...):((Response),(MultiValue))

-
- -
-
-
-

end_row: function(Ui):()

-
- -
-
-
-

set_row_height: function(Ui,number):()

-
- -
-
-
-

columns: function(Ui,(integer),(function(...any):any...)):(MultiValue)

-
-

unlike other ui callbacks, this callback is given an array (table) of Ui objects

-

the ui objects can be indexed by the column number, and used to fill up each column

-
-
-
-
-

close_menu: function(Ui):()

-
- -
-
- - -
-
-
-

new: function((Context),(LayerId),(Id),(Rect),(Rect),(function(...any):any...)):(MultiValue)

-
-

WARNING: rust versions of these following three functionsreturn Ui

-

but the lua versions instead take a function as an extra last argument which will be provide a UiMutRef as the other callbacks

-

we never actually return the Ui struct anywhere. instead we will return whatever the provided callback functions return as is.

-
-
-
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/Vec2.html b/Vec2.html deleted file mode 100644 index dd58f00..0000000 --- a/Vec2.html +++ /dev/null @@ -1,2433 +0,0 @@ - - - - - - - - - - - - - - Vec2 - - - - -
- - -
- -
-
-
-
-

Vec2

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
-
-
-
-

x: number

-
- -
- -
-
-

y: number

-
- -
-
-
- -
-
-
-

- Methods: -

-
-
-
-
-
-

normalized: function(Vec2):(Vec2)

-
- -
-
-
-

rot90: function(Vec2):(Vec2)

-
- -
-
-
-

length: function(Vec2):(number)

-
- -
-
-
-

length_sq: function(Vec2):(number)

-
- -
-
-
-

angle: function(Vec2):(number)

-
- -
-
-
-

floor: function(Vec2):(Vec2)

-
- -
-
-
-

round: function(Vec2):(Vec2)

-
- -
-
-
-

ceil: function(Vec2):(Vec2)

-
- -
-
-
-

abs: function(Vec2):(Vec2)

-
- -
-
-
-

is_finite: function(Vec2):(boolean)

-
- -
-
-
-

any_nan: function(Vec2):(boolean)

-
- -
-
-
-

min: function(Vec2,Vec2):(Vec2)

-
- -
-
-
-

max: function(Vec2,Vec2):(Vec2)

-
- -
-
-
-

dot: function(Vec2,Vec2):(number)

-
- -
-
-
-

min_elem: function(Vec2):(number)

-
- -
-
-
-

max_elem: function(Vec2):(number)

-
- -
-
-
-

clamp: function(Vec2,(Vec2),(Vec2)):(Vec2)

-
- -
-
-
-

default: function():(Vec2)

-
- -
-
-
-

new: function((number),(number)):(Vec2)

-
- -
-
-
-

splat: function(number):(Vec2)

-
- -
-
-
-

angled: function(number):(Vec2)

-
- -
-
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/Visuals.html b/Visuals.html deleted file mode 100644 index 027873c..0000000 --- a/Visuals.html +++ /dev/null @@ -1,2448 +0,0 @@ - - - - - - - - - - - - - - Visuals - - - - -
- - -
- -
-
-
-
-

Visuals

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
-
-
-
-

override_text_color: Color32

-
- -
- -
-
-

widgets: Widgets

-
- -
- -
-
-

dark_mode: boolean

-
- -
- -
-
-

selection: Selection

-
- -
- -
- - -
- -
-
-

faint_bg_color: Color32

-
- -
- -
-
-

extreme_bg_color: Color32

-
- -
- -
-
-

code_bg_color: Color32

-
- -
- -
-
-

window_rounding: Rounding

-
- -
- -
-
-

window_shadow: Shadow

-
- -
- -
- - -
- -
-
-

resize_corner_size: number

-
- -
- -
-
-

text_cursor_width: number

-
- -
- -
-
-

text_cursor_preview: boolean

-
- -
- -
-
-

clip_rect_margin: number

-
- -
- -
-
-

button_frame: boolean

-
- -
- -
-
-

collapsing_header_frame: boolean

-
- -
-
-
- -
-
-
-

- Methods: -

-
-
-
-
-
-

noninteractive: function(Visuals):(WidgetVisuals)

-
- -
-
-
-

text_color: function(Visuals):(Color32)

-
- -
-
-
-

weak_text_color: function(Visuals):(Color32)

-
- -
-
-
-

strong_text_color: function(Visuals):(Color32)

-
- -
-
-
-

window_fill: function(Visuals):(Color32)

-
- -
-
-
-

window_stroke: function(Visuals):(Stroke)

-
- -
-
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/WidgetText.html b/WidgetText.html deleted file mode 100644 index a794b96..0000000 --- a/WidgetText.html +++ /dev/null @@ -1,2305 +0,0 @@ - - - - - - - - - - - - - - WidgetText - - - - -
- - -
- -
-
-
-
-

WidgetText

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
- -
- -
-
-
-

- Methods: -

-
-
-
-
-
-

is_empty: function(WidgetText):(boolean)

-
- -
-
-
-

text: function(WidgetText):(string)

-
- -
-
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/WidgetVisuals.html b/WidgetVisuals.html deleted file mode 100644 index 64d206b..0000000 --- a/WidgetVisuals.html +++ /dev/null @@ -1,2334 +0,0 @@ - - - - - - - - - - - - - - WidgetVisuals - - - - -
- - -
- -
-
-
-
-

WidgetVisuals

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
-
-
-
-

bg_fill: Color32

-
- -
- -
-
-

bg_stroke: Stroke

-
- -
- -
-
-

rounding: Rounding

-
- -
- -
-
-

fg_stroke: Stroke

-
- -
- -
-
-

expansion: number

-
- -
-
-
- -
-
-
-

- Methods: -

-
-
-
-
-
-

text_color: function(WidgetVisuals):(Color32)

-
- -
-
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/Window.html b/Window.html deleted file mode 100644 index 9181f3b..0000000 --- a/Window.html +++ /dev/null @@ -1,2457 +0,0 @@ - - - - - - - - - - - - - - Window - - - - -
- - -
- -
-
-
-
-

Window

-
-
-
-
-
-

- Type doc: -

-
- -
-
-
-

- Fields: -

-
-
- -
- -
-
-
-

- Methods: -

-
-
-
-
-
-

id: function(Window,Id):()

-
- -
-
-
-

open: function(Window,boolean):()

-
-

whether window should be open. when you call the show function, it will return the new status of the window.

-
-
-
-
-

enabled: function(Window,boolean):()

-
- -
-
-
-

resize: function(Window,function(...any):any...):()

-
-

the function callback will be given a Resize object. it can use any resizing methods it wants, BUT it must return the resize object at the end of the function callback

-
-
-
-
-

frame: function(Window,Frame):()

-
- -
-
-
-

min_width: function(Window,number):()

-
- -
-
-
-

min_height: function(Window,number):()

-
- -
-
-
-

current_pos: function(Window,Pos2):()

-
- -
-
-
-

default_pos: function(Window,Pos2):()

-
- -
-
-
-

anchor: function(Window,(Align2),(Vec2)):()

-
- -
-
-
-

default_size: function(Window,Vec2):()

-
- -
-
-
-

default_width: function(Window,number):()

-
- -
-
-
-

default_height: function(Window,number):()

-
- -
-
-
-

default_rect: function(Window,Rect):()

-
- -
-
-
-

resizable: function(Window,boolean):()

-
- -
-
-
-

collapsible: function(Window,boolean):()

-
- -
-
-
-

title_bar: function(Window,boolean):()

-
- -
-
-
-

auto_sized: function(Window):()

-
- -
-
-
-

scroll2: function(Window,{boolean}):()

-
- -
-
-
-

hscroll: function(Window,boolean):()

-
- -
-
-
-

vscroll: function(Window,boolean):()

-
- -
-
-
-

drag_bounds: function(Window,Rect):()

-
- -
-
-
-

show: function(Window,(Context),(function(...any):any...)):(MultiValue)

-
-
    This function will consume the window and using the settings from that, display the window. 
-    it will take the Context as the first argument and the Ui callback function. that callback will be given the temporary Ui Object.
-    The callback WILL NOT BE called if the window is collapsed as there's no reason to show anything.
-    the return values can vary based on the status of the Window and will be in the following order.
-    1. bool. this will always be the first return value, and represents the status of the Window.
-    2. if the window is not OPEN (closed completely). then, this will be a nil value. if the window is open, this will contain the response form the window.
-    3. if the window is collapsed, this will be null because Ui callback is not run. otherwise, the return values will be from the result of running Ui callback. 
-
-
-
-
-
-

new: function((string | RichText | WidgetText | Galley),(Context),(function(...any):any...)):()

-
-

This is the function you use to create a new window. -This function will need three arguments; -1. Title of the window. -2. The egui Context that is provided to the OnGui function -3. A function callback. this function will be called with two arguments. -1. The Context which was provided to us. this needs to be passed the "show" function of the Window. -2. The temporary Window object. just like Ui, you can call functions on it. but you can only call "show" function once on this. -Read the show function docs for other details.

-
    Windows are temporary much like Ui objects. so, you cannot store them.  
-
-
-
-
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/basic.js b/basic.js new file mode 100644 index 0000000..a722ff3 --- /dev/null +++ b/basic.js @@ -0,0 +1 @@ +var Module=typeof Module!="undefined"?Module:{};var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;if(ENVIRONMENT_IS_NODE){var fs=require("fs");var nodePath=require("path");if(ENVIRONMENT_IS_WORKER){scriptDirectory=nodePath.dirname(scriptDirectory)+"/"}else{scriptDirectory=__dirname+"/"}read_=(filename,binary)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);return fs.readFileSync(filename,binary?undefined:"utf8")};readBinary=filename=>{var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}return ret};readAsync=(filename,onload,onerror,binary=true)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);fs.readFile(filename,binary?undefined:"utf8",(err,data)=>{if(err)onerror(err);else onload(binary?data.buffer:data)})};if(!Module["thisProgram"]&&process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}arguments_=process.argv.slice(2);if(typeof module!="undefined"){module["exports"]=Module}process.on("uncaughtException",ex=>{if(ex!=="unwind"&&!(ex instanceof ExitStatus)&&!(ex.context instanceof ExitStatus)){throw ex}});var nodeMajor=process.versions.node.split(".")[0];if(nodeMajor<15){process.on("unhandledRejection",reason=>{throw reason})}quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow};Module["inspect"]=()=>"[Emscripten Module object]"}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=title=>document.title=title}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.error.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime=Module["noExitRuntime"]||true;if(typeof WebAssembly!="object"){abort("no native wasm support detected")}var wasmMemory;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort(text)}}var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateMemoryViews(){var b=wasmMemory.buffer;Module["HEAP8"]=HEAP8=new Int8Array(b);Module["HEAP16"]=HEAP16=new Int16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU16"]=HEAPU16=new Uint16Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);Module["HEAPF32"]=HEAPF32=new Float32Array(b);Module["HEAPF64"]=HEAPF64=new Float64Array(b)}var wasmTable;var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeKeepaliveCounter=0;function keepRuntimeAlive(){return noExitRuntime||runtimeKeepaliveCounter>0}function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;if(!Module["noFSInit"]&&!FS.init.initialized)FS.init();FS.ignorePermissions=false;TTY.init();callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what="Aborted("+what+")";err(what);ABORT=true;EXITSTATUS=1;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);throw e}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return filename.startsWith(dataURIPrefix)}function isFileURI(filename){return filename.startsWith("file://")}var wasmBinaryFile;wasmBinaryFile="basic.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}catch(err){abort(err)}}function getBinaryPromise(binaryFile){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"&&!isFileURI(binaryFile)){return fetch(binaryFile,{credentials:"same-origin"}).then(response=>{if(!response["ok"]){throw"failed to load wasm binary file at '"+binaryFile+"'"}return response["arrayBuffer"]()}).catch(()=>getBinary(binaryFile))}else{if(readAsync){return new Promise((resolve,reject)=>{readAsync(binaryFile,response=>resolve(new Uint8Array(response)),reject)})}}}return Promise.resolve().then(()=>getBinary(binaryFile))}function instantiateArrayBuffer(binaryFile,imports,receiver){return getBinaryPromise(binaryFile).then(binary=>{return WebAssembly.instantiate(binary,imports)}).then(instance=>{return instance}).then(receiver,reason=>{err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}function instantiateAsync(binary,binaryFile,imports,callback){if(!binary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(binaryFile)&&!isFileURI(binaryFile)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"){return fetch(binaryFile,{credentials:"same-origin"}).then(response=>{var result=WebAssembly.instantiateStreaming(response,imports);return result.then(callback,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(binaryFile,imports,callback)})})}else{return instantiateArrayBuffer(binaryFile,imports,callback)}}function createWasm(){var info={"a":wasmImports};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;wasmMemory=Module["asm"]["mh"];updateMemoryViews();wasmTable=Module["asm"]["oh"];addOnInit(Module["asm"]["nh"]);removeRunDependency("wasm-instantiate");return exports}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"])}if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err("Module.instantiateWasm callback failed with error: "+e);return false}}instantiateAsync(wasmBinary,wasmBinaryFile,info,receiveInstantiationResult);return{}}var tempDouble;var tempI64;function ExitStatus(status){this.name="ExitStatus";this.message=`Program terminated with exit(${status})`;this.status=status}function callRuntimeCallbacks(callbacks){while(callbacks.length>0){callbacks.shift()(Module)}}var wasmTableMirror=[];function getWasmTableEntry(funcPtr){var func=wasmTableMirror[funcPtr];if(!func){if(funcPtr>=wasmTableMirror.length)wasmTableMirror.length=funcPtr+1;wasmTableMirror[funcPtr]=func=wasmTable.get(funcPtr)}return func}var exceptionCaught=[];var uncaughtExceptionCount=0;function ___cxa_begin_catch(ptr){var info=new ExceptionInfo(ptr);if(!info.get_caught()){info.set_caught(true);uncaughtExceptionCount--}info.set_rethrown(false);exceptionCaught.push(info);___cxa_increment_exception_refcount(info.excPtr);return info.get_exception_ptr()}var exceptionLast=0;function ___cxa_end_catch(){_setThrew(0);var info=exceptionCaught.pop();___cxa_decrement_exception_refcount(info.excPtr);exceptionLast=0}function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24;this.set_type=function(type){HEAPU32[this.ptr+4>>2]=type};this.get_type=function(){return HEAPU32[this.ptr+4>>2]};this.set_destructor=function(destructor){HEAPU32[this.ptr+8>>2]=destructor};this.get_destructor=function(){return HEAPU32[this.ptr+8>>2]};this.set_caught=function(caught){caught=caught?1:0;HEAP8[this.ptr+12>>0]=caught};this.get_caught=function(){return HEAP8[this.ptr+12>>0]!=0};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13>>0]=rethrown};this.get_rethrown=function(){return HEAP8[this.ptr+13>>0]!=0};this.init=function(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor)};this.set_adjusted_ptr=function(adjustedPtr){HEAPU32[this.ptr+16>>2]=adjustedPtr};this.get_adjusted_ptr=function(){return HEAPU32[this.ptr+16>>2]};this.get_exception_ptr=function(){var isPointer=___cxa_is_pointer_type(this.get_type());if(isPointer){return HEAPU32[this.excPtr>>2]}var adjusted=this.get_adjusted_ptr();if(adjusted!==0)return adjusted;return this.excPtr}}function ___resumeException(ptr){if(!exceptionLast){exceptionLast=ptr}throw exceptionLast}function ___cxa_find_matching_catch(){var thrown=exceptionLast;if(!thrown){setTempRet0(0);return 0}var info=new ExceptionInfo(thrown);info.set_adjusted_ptr(thrown);var thrownType=info.get_type();if(!thrownType){setTempRet0(0);return thrown}for(var i=0;ipath.charAt(0)==="/",splitPath:filename=>{var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:(parts,allowAboveRoot)=>{var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:path=>{var isAbsolute=PATH.isAbs(path),trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(p=>!!p),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:path=>{var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:path=>{if(path==="/")return"/";path=PATH.normalize(path);path=path.replace(/\/$/,"");var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},join:function(){var paths=Array.prototype.slice.call(arguments);return PATH.normalize(paths.join("/"))},join2:(l,r)=>{return PATH.normalize(l+"/"+r)}};function initRandomFill(){if(typeof crypto=="object"&&typeof crypto["getRandomValues"]=="function"){return view=>crypto.getRandomValues(view)}else if(ENVIRONMENT_IS_NODE){try{var crypto_module=require("crypto");var randomFillSync=crypto_module["randomFillSync"];if(randomFillSync){return view=>crypto_module["randomFillSync"](view)}var randomBytes=crypto_module["randomBytes"];return view=>(view.set(randomBytes(view.byteLength)),view)}catch(e){}}abort("initRandomDevice")}function randomFill(view){return(randomFill=initRandomFill())(view)}var PATH_FS={resolve:function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=PATH.isAbs(path)}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(p=>!!p),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."},relative:(from,to)=>{from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx}function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(heapOrArray,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx>10,56320|ch&1023)}}return str}var TTY={ttys:[],init:function(){},shutdown:function(){},register:function(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops)},stream_ops:{open:function(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(43)}stream.tty=tty;stream.seekable=false},close:function(stream){stream.tty.ops.fsync(stream.tty)},fsync:function(stream){stream.tty.ops.fsync(stream.tty)},read:function(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.get_char){throw new FS.ErrnoError(60)}var bytesRead=0;for(var i=0;i0){result=buf.slice(0,bytesRead).toString("utf-8")}else{result=null}}else if(typeof window!="undefined"&&typeof window.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else if(typeof readline=="function"){result=readline();if(result!==null){result+="\n"}}if(!result){return null}tty.input=intArrayFromString(result,true)}return tty.input.shift()},put_char:function(tty,val){if(val===null||val===10){out(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},fsync:function(tty){if(tty.output&&tty.output.length>0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}}},default_tty1_ops:{put_char:function(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},fsync:function(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};function mmapAlloc(size){abort()}var MEMFS={ops_table:null,mount:function(mount){return MEMFS.createNode(null,"/",16384|511,0)},createNode:function(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(63)}if(!MEMFS.ops_table){MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}}}var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={}}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream}node.timestamp=Date.now();if(parent){parent.contents[name]=node;parent.timestamp=node.timestamp}return node},getFileDataAsTypedArray:function(node){if(!node.contents)return new Uint8Array(0);if(node.contents.subarray)return node.contents.subarray(0,node.usedBytes);return new Uint8Array(node.contents)},expandFileStorage:function(node,newCapacity){var prevCapacity=node.contents?node.contents.length:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity>>0);if(prevCapacity!=0)newCapacity=Math.max(newCapacity,256);var oldContents=node.contents;node.contents=new Uint8Array(newCapacity);if(node.usedBytes>0)node.contents.set(oldContents.subarray(0,node.usedBytes),0)},resizeFileStorage:function(node,newSize){if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0}else{var oldContents=node.contents;node.contents=new Uint8Array(newSize);if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)))}node.usedBytes=newSize}},node_ops:{getattr:function(node){var attr={};attr.dev=FS.isChrdev(node.mode)?node.id:1;attr.ino=node.id;attr.mode=node.mode;attr.nlink=1;attr.uid=0;attr.gid=0;attr.rdev=node.rdev;if(FS.isDir(node.mode)){attr.size=4096}else if(FS.isFile(node.mode)){attr.size=node.usedBytes}else if(FS.isLink(node.mode)){attr.size=node.link.length}else{attr.size=0}attr.atime=new Date(node.timestamp);attr.mtime=new Date(node.timestamp);attr.ctime=new Date(node.timestamp);attr.blksize=4096;attr.blocks=Math.ceil(attr.size/attr.blksize);return attr},setattr:function(node,attr){if(attr.mode!==undefined){node.mode=attr.mode}if(attr.timestamp!==undefined){node.timestamp=attr.timestamp}if(attr.size!==undefined){MEMFS.resizeFileStorage(node,attr.size)}},lookup:function(parent,name){throw FS.genericErrors[44]},mknod:function(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev)},rename:function(old_node,new_dir,new_name){if(FS.isDir(old_node.mode)){var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(new_node){for(var i in new_node.contents){throw new FS.ErrnoError(55)}}}delete old_node.parent.contents[old_node.name];old_node.parent.timestamp=Date.now();old_node.name=new_name;new_dir.contents[new_name]=old_node;new_dir.timestamp=old_node.parent.timestamp;old_node.parent=new_dir},unlink:function(parent,name){delete parent.contents[name];parent.timestamp=Date.now()},rmdir:function(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(55)}delete parent.contents[name];parent.timestamp=Date.now()},readdir:function(node){var entries=[".",".."];for(var key in node.contents){if(!node.contents.hasOwnProperty(key)){continue}entries.push(key)}return entries},symlink:function(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node},readlink:function(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(28)}return node.link}},stream_ops:{read:function(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+length{assert(arrayBuffer,`Loading data file "${url}" failed (no arrayBuffer).`);onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},event=>{if(onerror){onerror()}else{throw`Loading data file "${url}" failed.`}});if(dep)addRunDependency(dep)}var preloadPlugins=Module["preloadPlugins"]||[];function FS_handledByPreloadPlugin(byteArray,fullname,finish,onerror){if(typeof Browser!="undefined")Browser.init();var handled=false;preloadPlugins.forEach(function(plugin){if(handled)return;if(plugin["canHandle"](fullname)){plugin["handle"](byteArray,fullname,finish,onerror);handled=true}});return handled}function FS_createPreloadedFile(parent,name,url,canRead,canWrite,onload,onerror,dontCreateFile,canOwn,preFinish){var fullname=name?PATH_FS.resolve(PATH.join2(parent,name)):parent;var dep=getUniqueRunDependency(`cp ${fullname}`);function processData(byteArray){function finish(byteArray){if(preFinish)preFinish();if(!dontCreateFile){FS.createDataFile(parent,name,byteArray,canRead,canWrite,canOwn)}if(onload)onload();removeRunDependency(dep)}if(FS_handledByPreloadPlugin(byteArray,fullname,finish,()=>{if(onerror)onerror();removeRunDependency(dep)})){return}finish(byteArray)}addRunDependency(dep);if(typeof url=="string"){asyncLoad(url,byteArray=>processData(byteArray),onerror)}else{processData(url)}}function FS_modeStringToFlags(str){var flagModes={"r":0,"r+":2,"w":512|64|1,"w+":512|64|2,"a":1024|64|1,"a+":1024|64|2};var flags=flagModes[str];if(typeof flags=="undefined"){throw new Error(`Unknown file open mode: ${str}`)}return flags}function FS_getMode(canRead,canWrite){var mode=0;if(canRead)mode|=292|73;if(canWrite)mode|=146;return mode}var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(path,opts={})=>{path=PATH_FS.resolve(path);if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};opts=Object.assign(defaults,opts);if(opts.recurse_count>8){throw new FS.ErrnoError(32)}var parts=path.split("/").filter(p=>!!p);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(32)}}}}return{path:current_path,node:current}},getPath:node=>{var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?`${mount}/${path}`:mount+path}path=path?`${node.name}/${path}`:node.name;node=node.parent}},hashName:(parentid,name)=>{var hash=0;for(var i=0;i>>0)%FS.nameTable.length},hashAddNode:node=>{var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode:node=>{var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}},lookupNode:(parent,name)=>{var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode,parent)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)},createNode:(parent,name,mode,rdev)=>{var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode:node=>{FS.hashRemoveNode(node)},isRoot:node=>{return node===node.parent},isMountpoint:node=>{return!!node.mounted},isFile:mode=>{return(mode&61440)===32768},isDir:mode=>{return(mode&61440)===16384},isLink:mode=>{return(mode&61440)===40960},isChrdev:mode=>{return(mode&61440)===8192},isBlkdev:mode=>{return(mode&61440)===24576},isFIFO:mode=>{return(mode&61440)===4096},isSocket:mode=>{return(mode&49152)===49152},flagsToPermissionString:flag=>{var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms},nodePermissions:(node,perms)=>{if(FS.ignorePermissions){return 0}if(perms.includes("r")&&!(node.mode&292)){return 2}else if(perms.includes("w")&&!(node.mode&146)){return 2}else if(perms.includes("x")&&!(node.mode&73)){return 2}return 0},mayLookup:dir=>{var errCode=FS.nodePermissions(dir,"x");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0},mayCreate:(dir,name)=>{try{var node=FS.lookupNode(dir,name);return 20}catch(e){}return FS.nodePermissions(dir,"wx")},mayDelete:(dir,name,isdir)=>{var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var errCode=FS.nodePermissions(dir,"wx");if(errCode){return errCode}if(isdir){if(!FS.isDir(node.mode)){return 54}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 10}}else{if(FS.isDir(node.mode)){return 31}}return 0},mayOpen:(node,flags)=>{if(!node){return 44}if(FS.isLink(node.mode)){return 32}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return 31}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd:()=>{for(var fd=0;fd<=FS.MAX_OPEN_FDS;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(33)},getStream:fd=>FS.streams[fd],createStream:(stream,fd=-1)=>{if(!FS.FSStream){FS.FSStream=function(){this.shared={}};FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get:function(){return this.node},set:function(val){this.node=val}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}},flags:{get:function(){return this.shared.flags},set:function(val){this.shared.flags=val}},position:{get:function(){return this.shared.position},set:function(val){this.shared.position=val}}})}stream=Object.assign(new FS.FSStream,stream);if(fd==-1){fd=FS.nextfd()}stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream:fd=>{FS.streams[fd]=null},chrdev_stream_ops:{open:stream=>{var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}},llseek:()=>{throw new FS.ErrnoError(70)}},major:dev=>dev>>8,minor:dev=>dev&255,makedev:(ma,mi)=>ma<<8|mi,registerDevice:(dev,ops)=>{FS.devices[dev]={stream_ops:ops}},getDevice:dev=>FS.devices[dev],getMounts:mount=>{var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts},syncfs:(populate,callback)=>{if(typeof populate=="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){err(`warning: ${FS.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`)}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(errCode){FS.syncFSRequests--;return callback(errCode)}function done(errCode){if(errCode){if(!done.errored){done.errored=true;return doCallback(errCode)}return}if(++completed>=mounts.length){doCallback(null)}}mounts.forEach(mount=>{if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount:(type,opts,mountpoint)=>{var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(10)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot},unmount:mountpoint=>{var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(28)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(hash=>{var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.includes(current.mount)){FS.destroyNode(current)}current=next}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);node.mount.mounts.splice(idx,1)},lookup:(parent,name)=>{return parent.node_ops.lookup(parent,name)},mknod:(path,mode,dev)=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(28)}var errCode=FS.mayCreate(parent,name);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(63)}return parent.node_ops.mknod(parent,name,mode,dev)},create:(path,mode)=>{mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir:(path,mode)=>{mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree:(path,mode)=>{var dirs=path.split("/");var d="";for(var i=0;i{if(typeof dev=="undefined"){dev=mode;mode=438}mode|=8192;return FS.mknod(path,mode,dev)},symlink:(oldpath,newpath)=>{if(!PATH_FS.resolve(oldpath)){throw new FS.ErrnoError(44)}var lookup=FS.lookupPath(newpath,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(44)}var newname=PATH.basename(newpath);var errCode=FS.mayCreate(parent,newname);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.symlink){throw new FS.ErrnoError(63)}return parent.node_ops.symlink(parent,newname,oldpath)},rename:(old_path,new_path)=>{var old_dirname=PATH.dirname(old_path);var new_dirname=PATH.dirname(new_path);var old_name=PATH.basename(old_path);var new_name=PATH.basename(new_path);var lookup,old_dir,new_dir;lookup=FS.lookupPath(old_path,{parent:true});old_dir=lookup.node;lookup=FS.lookupPath(new_path,{parent:true});new_dir=lookup.node;if(!old_dir||!new_dir)throw new FS.ErrnoError(44);if(old_dir.mount!==new_dir.mount){throw new FS.ErrnoError(75)}var old_node=FS.lookupNode(old_dir,old_name);var relative=PATH_FS.relative(old_path,new_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(28)}relative=PATH_FS.relative(new_path,old_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(55)}var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(old_node===new_node){return}var isdir=FS.isDir(old_node.mode);var errCode=FS.mayDelete(old_dir,old_name,isdir);if(errCode){throw new FS.ErrnoError(errCode)}errCode=new_node?FS.mayDelete(new_dir,new_name,isdir):FS.mayCreate(new_dir,new_name);if(errCode){throw new FS.ErrnoError(errCode)}if(!old_dir.node_ops.rename){throw new FS.ErrnoError(63)}if(FS.isMountpoint(old_node)||new_node&&FS.isMountpoint(new_node)){throw new FS.ErrnoError(10)}if(new_dir!==old_dir){errCode=FS.nodePermissions(old_dir,"w");if(errCode){throw new FS.ErrnoError(errCode)}}FS.hashRemoveNode(old_node);try{old_dir.node_ops.rename(old_node,new_dir,new_name)}catch(e){throw e}finally{FS.hashAddNode(old_node)}},rmdir:path=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,true);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.rmdir){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}parent.node_ops.rmdir(parent,name);FS.destroyNode(node)},readdir:path=>{var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node.node_ops.readdir){throw new FS.ErrnoError(54)}return node.node_ops.readdir(node)},unlink:path=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(44)}var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,false);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.unlink){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}parent.node_ops.unlink(parent,name);FS.destroyNode(node)},readlink:path=>{var lookup=FS.lookupPath(path);var link=lookup.node;if(!link){throw new FS.ErrnoError(44)}if(!link.node_ops.readlink){throw new FS.ErrnoError(28)}return PATH_FS.resolve(FS.getPath(link.parent),link.node_ops.readlink(link))},stat:(path,dontFollow)=>{var lookup=FS.lookupPath(path,{follow:!dontFollow});var node=lookup.node;if(!node){throw new FS.ErrnoError(44)}if(!node.node_ops.getattr){throw new FS.ErrnoError(63)}return node.node_ops.getattr(node)},lstat:path=>{return FS.stat(path,true)},chmod:(path,mode,dontFollow)=>{var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{mode:mode&4095|node.mode&~4095,timestamp:Date.now()})},lchmod:(path,mode)=>{FS.chmod(path,mode,true)},fchmod:(fd,mode)=>{var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}FS.chmod(stream.node,mode)},chown:(path,uid,gid,dontFollow)=>{var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{timestamp:Date.now()})},lchown:(path,uid,gid)=>{FS.chown(path,uid,gid,true)},fchown:(fd,uid,gid)=>{var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}FS.chown(stream.node,uid,gid)},truncate:(path,len)=>{if(len<0){throw new FS.ErrnoError(28)}var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:true});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}if(FS.isDir(node.mode)){throw new FS.ErrnoError(31)}if(!FS.isFile(node.mode)){throw new FS.ErrnoError(28)}var errCode=FS.nodePermissions(node,"w");if(errCode){throw new FS.ErrnoError(errCode)}node.node_ops.setattr(node,{size:len,timestamp:Date.now()})},ftruncate:(fd,len)=>{var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(28)}FS.truncate(stream.node,len)},utime:(path,atime,mtime)=>{var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;node.node_ops.setattr(node,{timestamp:Math.max(atime,mtime)})},open:(path,flags,mode)=>{if(path===""){throw new FS.ErrnoError(44)}flags=typeof flags=="string"?FS_modeStringToFlags(flags):flags;mode=typeof mode=="undefined"?438:mode;if(flags&64){mode=mode&4095|32768}else{mode=0}var node;if(typeof path=="object"){node=path}else{path=PATH.normalize(path);try{var lookup=FS.lookupPath(path,{follow:!(flags&131072)});node=lookup.node}catch(e){}}var created=false;if(flags&64){if(node){if(flags&128){throw new FS.ErrnoError(20)}}else{node=FS.mknod(path,mode,0);created=true}}if(!node){throw new FS.ErrnoError(44)}if(FS.isChrdev(node.mode)){flags&=~512}if(flags&65536&&!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}if(!created){var errCode=FS.mayOpen(node,flags);if(errCode){throw new FS.ErrnoError(errCode)}}if(flags&512&&!created){FS.truncate(node,0)}flags&=~(128|512|131072);var stream=FS.createStream({node:node,path:FS.getPath(node),flags:flags,seekable:true,position:0,stream_ops:node.stream_ops,ungotten:[],error:false});if(stream.stream_ops.open){stream.stream_ops.open(stream)}if(Module["logReadFiles"]&&!(flags&1)){if(!FS.readFiles)FS.readFiles={};if(!(path in FS.readFiles)){FS.readFiles[path]=1}}return stream},close:stream=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(stream.getdents)stream.getdents=null;try{if(stream.stream_ops.close){stream.stream_ops.close(stream)}}catch(e){throw e}finally{FS.closeStream(stream.fd)}stream.fd=null},isClosed:stream=>{return stream.fd===null},llseek:(stream,offset,whence)=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(!stream.seekable||!stream.stream_ops.llseek){throw new FS.ErrnoError(70)}if(whence!=0&&whence!=1&&whence!=2){throw new FS.ErrnoError(28)}stream.position=stream.stream_ops.llseek(stream,offset,whence);stream.ungotten=[];return stream.position},read:(stream,buffer,offset,length,position)=>{if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.read){throw new FS.ErrnoError(28)}var seeking=typeof position!="undefined";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead},write:(stream,buffer,offset,length,position,canOwn)=>{if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.write){throw new FS.ErrnoError(28)}if(stream.seekable&&stream.flags&1024){FS.llseek(stream,0,2)}var seeking=typeof position!="undefined";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;return bytesWritten},allocate:(stream,offset,length)=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(offset<0||length<=0){throw new FS.ErrnoError(28)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(!FS.isFile(stream.node.mode)&&!FS.isDir(stream.node.mode)){throw new FS.ErrnoError(43)}if(!stream.stream_ops.allocate){throw new FS.ErrnoError(138)}stream.stream_ops.allocate(stream,offset,length)},mmap:(stream,length,position,prot,flags)=>{if((prot&2)!==0&&(flags&2)===0&&(stream.flags&2097155)!==2){throw new FS.ErrnoError(2)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(2)}if(!stream.stream_ops.mmap){throw new FS.ErrnoError(43)}return stream.stream_ops.mmap(stream,length,position,prot,flags)},msync:(stream,buffer,offset,length,mmapFlags)=>{if(!stream.stream_ops.msync){return 0}return stream.stream_ops.msync(stream,buffer,offset,length,mmapFlags)},munmap:stream=>0,ioctl:(stream,cmd,arg)=>{if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(59)}return stream.stream_ops.ioctl(stream,cmd,arg)},readFile:(path,opts={})=>{opts.flags=opts.flags||0;opts.encoding=opts.encoding||"binary";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error(`Invalid encoding type "${opts.encoding}"`)}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding==="utf8"){ret=UTF8ArrayToString(buf,0)}else if(opts.encoding==="binary"){ret=buf}FS.close(stream);return ret},writeFile:(path,data,opts={})=>{opts.flags=opts.flags||577;var stream=FS.open(path,opts.flags,opts.mode);if(typeof data=="string"){var buf=new Uint8Array(lengthBytesUTF8(data)+1);var actualNumBytes=stringToUTF8Array(data,buf,0,buf.length);FS.write(stream,buf,0,actualNumBytes,undefined,opts.canOwn)}else if(ArrayBuffer.isView(data)){FS.write(stream,data,0,data.byteLength,undefined,opts.canOwn)}else{throw new Error("Unsupported data type")}FS.close(stream)},cwd:()=>FS.currentPath,chdir:path=>{var lookup=FS.lookupPath(path,{follow:true});if(lookup.node===null){throw new FS.ErrnoError(44)}if(!FS.isDir(lookup.node.mode)){throw new FS.ErrnoError(54)}var errCode=FS.nodePermissions(lookup.node,"x");if(errCode){throw new FS.ErrnoError(errCode)}FS.currentPath=lookup.path},createDefaultDirectories:()=>{FS.mkdir("/tmp");FS.mkdir("/home");FS.mkdir("/home/web_user")},createDefaultDevices:()=>{FS.mkdir("/dev");FS.registerDevice(FS.makedev(1,3),{read:()=>0,write:(stream,buffer,offset,length,pos)=>length});FS.mkdev("/dev/null",FS.makedev(1,3));TTY.register(FS.makedev(5,0),TTY.default_tty_ops);TTY.register(FS.makedev(6,0),TTY.default_tty1_ops);FS.mkdev("/dev/tty",FS.makedev(5,0));FS.mkdev("/dev/tty1",FS.makedev(6,0));var randomBuffer=new Uint8Array(1024),randomLeft=0;var randomByte=()=>{if(randomLeft===0){randomLeft=randomFill(randomBuffer).byteLength}return randomBuffer[--randomLeft]};FS.createDevice("/dev","random",randomByte);FS.createDevice("/dev","urandom",randomByte);FS.mkdir("/dev/shm");FS.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{FS.mkdir("/proc");var proc_self=FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd");FS.mount({mount:()=>{var node=FS.createNode(proc_self,"fd",16384|511,73);node.node_ops={lookup:(parent,name)=>{var fd=+name;var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);var ret={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>stream.path}};ret.parent=ret;return ret}};return node}},{},"/proc/self/fd")},createStandardStreams:()=>{if(Module["stdin"]){FS.createDevice("/dev","stdin",Module["stdin"])}else{FS.symlink("/dev/tty","/dev/stdin")}if(Module["stdout"]){FS.createDevice("/dev","stdout",null,Module["stdout"])}else{FS.symlink("/dev/tty","/dev/stdout")}if(Module["stderr"]){FS.createDevice("/dev","stderr",null,Module["stderr"])}else{FS.symlink("/dev/tty1","/dev/stderr")}var stdin=FS.open("/dev/stdin",0);var stdout=FS.open("/dev/stdout",1);var stderr=FS.open("/dev/stderr",1)},ensureErrnoError:()=>{if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno,node){this.name="ErrnoError";this.node=node;this.setErrno=function(errno){this.errno=errno};this.setErrno(errno);this.message="FS error"};FS.ErrnoError.prototype=new Error;FS.ErrnoError.prototype.constructor=FS.ErrnoError;[44].forEach(code=>{FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack=""})},staticInit:()=>{FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={"MEMFS":MEMFS}},init:(input,output,error)=>{FS.init.initialized=true;FS.ensureErrnoError();Module["stdin"]=input||Module["stdin"];Module["stdout"]=output||Module["stdout"];Module["stderr"]=error||Module["stderr"];FS.createStandardStreams()},quit:()=>{FS.init.initialized=false;for(var i=0;i{var ret=FS.analyzePath(path,dontResolveLastLink);if(!ret.exists){return null}return ret.object},analyzePath:(path,dontResolveLastLink)=>{try{var lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});path=lookup.path}catch(e){}var ret={isRoot:false,exists:false,error:0,name:null,path:null,object:null,parentExists:false,parentPath:null,parentObject:null};try{var lookup=FS.lookupPath(path,{parent:true});ret.parentExists=true;ret.parentPath=lookup.path;ret.parentObject=lookup.node;ret.name=PATH.basename(path);lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});ret.exists=true;ret.path=lookup.path;ret.object=lookup.node;ret.name=lookup.node.name;ret.isRoot=lookup.path==="/"}catch(e){ret.error=e.errno}return ret},createPath:(parent,path,canRead,canWrite)=>{parent=typeof parent=="string"?parent:FS.getPath(parent);var parts=path.split("/").reverse();while(parts.length){var part=parts.pop();if(!part)continue;var current=PATH.join2(parent,part);try{FS.mkdir(current)}catch(e){}parent=current}return current},createFile:(parent,name,properties,canRead,canWrite)=>{var path=PATH.join2(typeof parent=="string"?parent:FS.getPath(parent),name);var mode=FS_getMode(canRead,canWrite);return FS.create(path,mode)},createDataFile:(parent,name,data,canRead,canWrite,canOwn)=>{var path=name;if(parent){parent=typeof parent=="string"?parent:FS.getPath(parent);path=name?PATH.join2(parent,name):parent}var mode=FS_getMode(canRead,canWrite);var node=FS.create(path,mode);if(data){if(typeof data=="string"){var arr=new Array(data.length);for(var i=0,len=data.length;i{var path=PATH.join2(typeof parent=="string"?parent:FS.getPath(parent),name);var mode=FS_getMode(!!input,!!output);if(!FS.createDevice.major)FS.createDevice.major=64;var dev=FS.makedev(FS.createDevice.major++,0);FS.registerDevice(dev,{open:stream=>{stream.seekable=false},close:stream=>{if(output&&output.buffer&&output.buffer.length){output(10)}},read:(stream,buffer,offset,length,pos)=>{var bytesRead=0;for(var i=0;i{for(var i=0;i{if(obj.isDevice||obj.isFolder||obj.link||obj.contents)return true;if(typeof XMLHttpRequest!="undefined"){throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.")}else if(read_){try{obj.contents=intArrayFromString(read_(obj.url),true);obj.usedBytes=obj.contents.length}catch(e){throw new FS.ErrnoError(29)}}else{throw new Error("Cannot load without read() or XMLHttpRequest.")}},createLazyFile:(parent,name,url,canRead,canWrite)=>{function LazyUint8Array(){this.lengthKnown=false;this.chunks=[]}LazyUint8Array.prototype.get=function LazyUint8Array_get(idx){if(idx>this.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=(from,to)=>{if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}return intArrayFromString(xhr.responseText||"",true)};var lazyArray=this;lazyArray.setDataGetter(chunkNum=>{var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]=="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]=="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;out("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true};if(typeof XMLHttpRequest!="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperties(lazyArray,{length:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}},chunkSize:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:function(){return this.contents.length}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(key=>{var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){FS.forceLoadFile(node);return fn.apply(null,arguments)}});function writeChunks(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);if(contents.slice){for(var i=0;i{FS.forceLoadFile(node);return writeChunks(stream,buffer,offset,length,position)};stream_ops.mmap=(stream,length,position,prot,flags)=>{FS.forceLoadFile(node);var ptr=mmapAlloc(length);if(!ptr){throw new FS.ErrnoError(48)}writeChunks(stream,HEAP8,ptr,length,position);return{ptr:ptr,allocated:true}};node.stream_ops=stream_ops;return node}};function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}var SYSCALLS={DEFAULT_POLLMASK:5,calculateAt:function(dirfd,path,allowEmpty){if(PATH.isAbs(path)){return path}var dir;if(dirfd===-100){dir=FS.cwd()}else{var dirstream=SYSCALLS.getStreamFromFD(dirfd);dir=dirstream.path}if(path.length==0){if(!allowEmpty){throw new FS.ErrnoError(44)}return dir}return PATH.join2(dir,path)},doStat:function(func,path,buf){try{var stat=func(path)}catch(e){if(e&&e.node&&PATH.normalize(path)!==PATH.normalize(FS.getPath(e.node))){return-54}throw e}HEAP32[buf>>2]=stat.dev;HEAP32[buf+8>>2]=stat.ino;HEAP32[buf+12>>2]=stat.mode;HEAPU32[buf+16>>2]=stat.nlink;HEAP32[buf+20>>2]=stat.uid;HEAP32[buf+24>>2]=stat.gid;HEAP32[buf+28>>2]=stat.rdev;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>2]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAP32[buf+48>>2]=4096;HEAP32[buf+52>>2]=stat.blocks;var atime=stat.atime.getTime();var mtime=stat.mtime.getTime();var ctime=stat.ctime.getTime();tempI64=[Math.floor(atime/1e3)>>>0,(tempDouble=Math.floor(atime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+56>>2]=tempI64[0],HEAP32[buf+60>>2]=tempI64[1];HEAPU32[buf+64>>2]=atime%1e3*1e3;tempI64=[Math.floor(mtime/1e3)>>>0,(tempDouble=Math.floor(mtime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+72>>2]=tempI64[0],HEAP32[buf+76>>2]=tempI64[1];HEAPU32[buf+80>>2]=mtime%1e3*1e3;tempI64=[Math.floor(ctime/1e3)>>>0,(tempDouble=Math.floor(ctime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+88>>2]=tempI64[0],HEAP32[buf+92>>2]=tempI64[1];HEAPU32[buf+96>>2]=ctime%1e3*1e3;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+104>>2]=tempI64[0],HEAP32[buf+108>>2]=tempI64[1];return 0},doMsync:function(addr,stream,len,flags,offset){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}if(flags&2){return 0}var buffer=HEAPU8.slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags)},varargs:undefined,get:function(){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(ptr){var ret=UTF8ToString(ptr);return ret},getStreamFromFD:function(fd){var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);return stream}};function ___syscall_fstat64(fd,buf){try{var stream=SYSCALLS.getStreamFromFD(fd);return SYSCALLS.doStat(FS.stat,stream.path,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function ___syscall_getcwd(buf,size){try{if(size===0)return-28;var cwd=FS.cwd();var cwdLengthInBytes=lengthBytesUTF8(cwd)+1;if(size>2]+HEAP32[ptr+4>>2]*4294967296}function __gmtime_js(time,tmPtr){var date=new Date(readI53FromI64(time)*1e3);HEAP32[tmPtr>>2]=date.getUTCSeconds();HEAP32[tmPtr+4>>2]=date.getUTCMinutes();HEAP32[tmPtr+8>>2]=date.getUTCHours();HEAP32[tmPtr+12>>2]=date.getUTCDate();HEAP32[tmPtr+16>>2]=date.getUTCMonth();HEAP32[tmPtr+20>>2]=date.getUTCFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getUTCDay();var start=Date.UTC(date.getUTCFullYear(),0,1,0,0,0,0);var yday=(date.getTime()-start)/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday}function isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}var MONTH_DAYS_LEAP_CUMULATIVE=[0,31,60,91,121,152,182,213,244,274,305,335];var MONTH_DAYS_REGULAR_CUMULATIVE=[0,31,59,90,120,151,181,212,243,273,304,334];function ydayFromDate(date){var leap=isLeapYear(date.getFullYear());var monthDaysCumulative=leap?MONTH_DAYS_LEAP_CUMULATIVE:MONTH_DAYS_REGULAR_CUMULATIVE;var yday=monthDaysCumulative[date.getMonth()]+date.getDate()-1;return yday}function __localtime_js(time,tmPtr){var date=new Date(readI53FromI64(time)*1e3);HEAP32[tmPtr>>2]=date.getSeconds();HEAP32[tmPtr+4>>2]=date.getMinutes();HEAP32[tmPtr+8>>2]=date.getHours();HEAP32[tmPtr+12>>2]=date.getDate();HEAP32[tmPtr+16>>2]=date.getMonth();HEAP32[tmPtr+20>>2]=date.getFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getDay();var yday=ydayFromDate(date)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr+36>>2]=-(date.getTimezoneOffset()*60);var start=new Date(date.getFullYear(),0,1);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dst=(summerOffset!=winterOffset&&date.getTimezoneOffset()==Math.min(winterOffset,summerOffset))|0;HEAP32[tmPtr+32>>2]=dst}function __timegm_js(tmPtr){var time=Date.UTC(HEAP32[tmPtr+20>>2]+1900,HEAP32[tmPtr+16>>2],HEAP32[tmPtr+12>>2],HEAP32[tmPtr+8>>2],HEAP32[tmPtr+4>>2],HEAP32[tmPtr>>2],0);var date=new Date(time);HEAP32[tmPtr+24>>2]=date.getUTCDay();var start=Date.UTC(date.getUTCFullYear(),0,1,0,0,0,0);var yday=(date.getTime()-start)/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday;return date.getTime()/1e3|0}function stringToNewUTF8(str){var size=lengthBytesUTF8(str)+1;var ret=_malloc(size);if(ret)stringToUTF8(str,ret,size);return ret}function __tzset_js(timezone,daylight,tzname){var currentYear=(new Date).getFullYear();var winter=new Date(currentYear,0,1);var summer=new Date(currentYear,6,1);var winterOffset=winter.getTimezoneOffset();var summerOffset=summer.getTimezoneOffset();var stdTimezoneOffset=Math.max(winterOffset,summerOffset);HEAPU32[timezone>>2]=stdTimezoneOffset*60;HEAP32[daylight>>2]=Number(winterOffset!=summerOffset);function extractZone(date){var match=date.toTimeString().match(/\(([A-Za-z ]+)\)$/);return match?match[1]:"GMT"}var winterName=extractZone(winter);var summerName=extractZone(summer);var winterNamePtr=stringToNewUTF8(winterName);var summerNamePtr=stringToNewUTF8(summerName);if(summerOffset>2]=winterNamePtr;HEAPU32[tzname+4>>2]=summerNamePtr}else{HEAPU32[tzname>>2]=summerNamePtr;HEAPU32[tzname+4>>2]=winterNamePtr}}function _abort(){abort("")}function _emscripten_date_now(){return Date.now()}function _emscripten_get_device_pixel_ratio(){return typeof devicePixelRatio=="number"&&devicePixelRatio||1}var JSEvents={inEventHandler:0,removeAllEventListeners:function(){for(var i=JSEvents.eventHandlers.length-1;i>=0;--i){JSEvents._removeHandler(i)}JSEvents.eventHandlers=[];JSEvents.deferredCalls=[]},registerRemoveEventListeners:function(){if(!JSEvents.removeEventListenersRegistered){__ATEXIT__.push(JSEvents.removeAllEventListeners);JSEvents.removeEventListenersRegistered=true}},deferredCalls:[],deferCall:function(targetFunction,precedence,argsList){function arraysHaveEqualContent(arrA,arrB){if(arrA.length!=arrB.length)return false;for(var i in arrA){if(arrA[i]!=arrB[i])return false}return true}for(var i in JSEvents.deferredCalls){var call=JSEvents.deferredCalls[i];if(call.targetFunction==targetFunction&&arraysHaveEqualContent(call.argsList,argsList)){return}}JSEvents.deferredCalls.push({targetFunction:targetFunction,precedence:precedence,argsList:argsList});JSEvents.deferredCalls.sort(function(x,y){return x.precedence2?UTF8ToString(cString):cString}var specialHTMLTargets=[0,typeof document!="undefined"?document:0,typeof window!="undefined"?window:0];function findEventTarget(target){target=maybeCStringToJsString(target);var domElement=specialHTMLTargets[target]||(typeof document!="undefined"?document.querySelector(target):undefined);return domElement}function getBoundingClientRect(e){return specialHTMLTargets.indexOf(e)<0?e.getBoundingClientRect():{"left":0,"top":0}}function _emscripten_get_element_css_size(target,width,height){target=findEventTarget(target);if(!target)return-4;var rect=getBoundingClientRect(target);HEAPF64[width>>3]=rect.width;HEAPF64[height>>3]=rect.height;return 0}var _emscripten_get_now;if(ENVIRONMENT_IS_NODE){global.performance=require("perf_hooks").performance}_emscripten_get_now=()=>performance.now();function webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(ctx){return!!(ctx.dibvbi=ctx.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"))}function webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(ctx){return!!(ctx.mdibvbi=ctx.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"))}function webgl_enable_WEBGL_multi_draw(ctx){return!!(ctx.multiDrawWebgl=ctx.getExtension("WEBGL_multi_draw"))}var GL={counter:1,buffers:[],mappedBuffers:{},programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],samplers:[],transformFeedbacks:[],syncs:[],byteSizeByTypeRoot:5120,byteSizeByType:[1,1,2,2,4,4,4,2,3,4,8],stringCache:{},stringiCache:{},unpackAlignment:4,recordError:function recordError(errorCode){if(!GL.lastError){GL.lastError=errorCode}},getNewId:function(table){var ret=GL.counter++;for(var i=table.length;i>1;var quadIndexes=new Uint16Array(numIndexes);var i=0,v=0;while(1){quadIndexes[i++]=v;if(i>=numIndexes)break;quadIndexes[i++]=v+1;if(i>=numIndexes)break;quadIndexes[i++]=v+2;if(i>=numIndexes)break;quadIndexes[i++]=v;if(i>=numIndexes)break;quadIndexes[i++]=v+2;if(i>=numIndexes)break;quadIndexes[i++]=v+3;if(i>=numIndexes)break;v+=4}context.GLctx.bufferData(34963,quadIndexes,35044);context.GLctx.bindBuffer(34963,null)}},getTempVertexBuffer:function getTempVertexBuffer(sizeBytes){var idx=GL.log2ceilLookup(sizeBytes);var ringbuffer=GL.currentContext.tempVertexBuffers1[idx];var nextFreeBufferIndex=GL.currentContext.tempVertexBufferCounters1[idx];GL.currentContext.tempVertexBufferCounters1[idx]=GL.currentContext.tempVertexBufferCounters1[idx]+1&GL.numTempVertexBuffersPerSize-1;var vbo=ringbuffer[nextFreeBufferIndex];if(vbo){return vbo}var prevVBO=GLctx.getParameter(34964);ringbuffer[nextFreeBufferIndex]=GLctx.createBuffer();GLctx.bindBuffer(34962,ringbuffer[nextFreeBufferIndex]);GLctx.bufferData(34962,1<>2]:-1;source+=UTF8ToString(HEAP32[string+i*4>>2],len<0?undefined:len)}return source},calcBufLength:function calcBufLength(size,type,stride,count){if(stride>0){return count*stride}var typeSize=GL.byteSizeByType[type-GL.byteSizeByTypeRoot];return size*typeSize*count},usedTempBuffers:[],preDrawHandleClientVertexAttribBindings:function preDrawHandleClientVertexAttribBindings(count){GL.resetBufferBinding=false;for(var i=0;i=2){GLctx.disjointTimerQueryExt=GLctx.getExtension("EXT_disjoint_timer_query_webgl2")}if(context.version<2||!GLctx.disjointTimerQueryExt){GLctx.disjointTimerQueryExt=GLctx.getExtension("EXT_disjoint_timer_query")}webgl_enable_WEBGL_multi_draw(GLctx);var exts=GLctx.getSupportedExtensions()||[];exts.forEach(function(ext){if(!ext.includes("lose_context")&&!ext.includes("debug")){GLctx.getExtension(ext)}})}};function _glActiveTexture(x0){GLctx.activeTexture(x0)}var _emscripten_glActiveTexture=_glActiveTexture;function _glAttachShader(program,shader){GLctx.attachShader(GL.programs[program],GL.shaders[shader])}var _emscripten_glAttachShader=_glAttachShader;function _glBeginQuery(target,id){GLctx.beginQuery(target,GL.queries[id])}var _emscripten_glBeginQuery=_glBeginQuery;function _glBeginQueryEXT(target,id){GLctx.disjointTimerQueryExt["beginQueryEXT"](target,GL.queries[id])}var _emscripten_glBeginQueryEXT=_glBeginQueryEXT;function _glBeginTransformFeedback(x0){GLctx.beginTransformFeedback(x0)}var _emscripten_glBeginTransformFeedback=_glBeginTransformFeedback;function _glBindAttribLocation(program,index,name){GLctx.bindAttribLocation(GL.programs[program],index,UTF8ToString(name))}var _emscripten_glBindAttribLocation=_glBindAttribLocation;function _glBindBuffer(target,buffer){if(target==34962){GLctx.currentArrayBufferBinding=buffer}else if(target==34963){GLctx.currentElementArrayBufferBinding=buffer}if(target==35051){GLctx.currentPixelPackBufferBinding=buffer}else if(target==35052){GLctx.currentPixelUnpackBufferBinding=buffer}GLctx.bindBuffer(target,GL.buffers[buffer])}var _emscripten_glBindBuffer=_glBindBuffer;function _glBindBufferBase(target,index,buffer){GLctx.bindBufferBase(target,index,GL.buffers[buffer])}var _emscripten_glBindBufferBase=_glBindBufferBase;function _glBindBufferRange(target,index,buffer,offset,ptrsize){GLctx.bindBufferRange(target,index,GL.buffers[buffer],offset,ptrsize)}var _emscripten_glBindBufferRange=_glBindBufferRange;function _glBindFramebuffer(target,framebuffer){GLctx.bindFramebuffer(target,GL.framebuffers[framebuffer])}var _emscripten_glBindFramebuffer=_glBindFramebuffer;function _glBindRenderbuffer(target,renderbuffer){GLctx.bindRenderbuffer(target,GL.renderbuffers[renderbuffer])}var _emscripten_glBindRenderbuffer=_glBindRenderbuffer;function _glBindSampler(unit,sampler){GLctx.bindSampler(unit,GL.samplers[sampler])}var _emscripten_glBindSampler=_glBindSampler;function _glBindTexture(target,texture){GLctx.bindTexture(target,GL.textures[texture])}var _emscripten_glBindTexture=_glBindTexture;function _glBindTransformFeedback(target,id){GLctx.bindTransformFeedback(target,GL.transformFeedbacks[id])}var _emscripten_glBindTransformFeedback=_glBindTransformFeedback;function _glBindVertexArray(vao){GLctx.bindVertexArray(GL.vaos[vao]);var ibo=GLctx.getParameter(34965);GLctx.currentElementArrayBufferBinding=ibo?ibo.name|0:0}var _emscripten_glBindVertexArray=_glBindVertexArray;var _glBindVertexArrayOES=_glBindVertexArray;var _emscripten_glBindVertexArrayOES=_glBindVertexArrayOES;function _glBlendColor(x0,x1,x2,x3){GLctx.blendColor(x0,x1,x2,x3)}var _emscripten_glBlendColor=_glBlendColor;function _glBlendEquation(x0){GLctx.blendEquation(x0)}var _emscripten_glBlendEquation=_glBlendEquation;function _glBlendEquationSeparate(x0,x1){GLctx.blendEquationSeparate(x0,x1)}var _emscripten_glBlendEquationSeparate=_glBlendEquationSeparate;function _glBlendFunc(x0,x1){GLctx.blendFunc(x0,x1)}var _emscripten_glBlendFunc=_glBlendFunc;function _glBlendFuncSeparate(x0,x1,x2,x3){GLctx.blendFuncSeparate(x0,x1,x2,x3)}var _emscripten_glBlendFuncSeparate=_glBlendFuncSeparate;function _glBlitFramebuffer(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9){GLctx.blitFramebuffer(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9)}var _emscripten_glBlitFramebuffer=_glBlitFramebuffer;function _glBufferData(target,size,data,usage){if(true){if(data&&size){GLctx.bufferData(target,HEAPU8,usage,data,size)}else{GLctx.bufferData(target,size,usage)}}else{GLctx.bufferData(target,data?HEAPU8.subarray(data,data+size):size,usage)}}var _emscripten_glBufferData=_glBufferData;function _glBufferSubData(target,offset,size,data){if(true){size&&GLctx.bufferSubData(target,offset,HEAPU8,data,size);return}GLctx.bufferSubData(target,offset,HEAPU8.subarray(data,data+size))}var _emscripten_glBufferSubData=_glBufferSubData;function _glCheckFramebufferStatus(x0){return GLctx.checkFramebufferStatus(x0)}var _emscripten_glCheckFramebufferStatus=_glCheckFramebufferStatus;function _glClear(x0){GLctx.clear(x0)}var _emscripten_glClear=_glClear;function _glClearBufferfi(x0,x1,x2,x3){GLctx.clearBufferfi(x0,x1,x2,x3)}var _emscripten_glClearBufferfi=_glClearBufferfi;function _glClearBufferfv(buffer,drawbuffer,value){GLctx.clearBufferfv(buffer,drawbuffer,HEAPF32,value>>2)}var _emscripten_glClearBufferfv=_glClearBufferfv;function _glClearBufferiv(buffer,drawbuffer,value){GLctx.clearBufferiv(buffer,drawbuffer,HEAP32,value>>2)}var _emscripten_glClearBufferiv=_glClearBufferiv;function _glClearBufferuiv(buffer,drawbuffer,value){GLctx.clearBufferuiv(buffer,drawbuffer,HEAPU32,value>>2)}var _emscripten_glClearBufferuiv=_glClearBufferuiv;function _glClearColor(x0,x1,x2,x3){GLctx.clearColor(x0,x1,x2,x3)}var _emscripten_glClearColor=_glClearColor;function _glClearDepthf(x0){GLctx.clearDepth(x0)}var _emscripten_glClearDepthf=_glClearDepthf;function _glClearStencil(x0){GLctx.clearStencil(x0)}var _emscripten_glClearStencil=_glClearStencil;function convertI32PairToI53(lo,hi){return(lo>>>0)+hi*4294967296}function _glClientWaitSync(sync,flags,timeout_low,timeout_high){var timeout=convertI32PairToI53(timeout_low,timeout_high);return GLctx.clientWaitSync(GL.syncs[sync],flags,timeout)}var _emscripten_glClientWaitSync=_glClientWaitSync;function _glColorMask(red,green,blue,alpha){GLctx.colorMask(!!red,!!green,!!blue,!!alpha)}var _emscripten_glColorMask=_glColorMask;function _glCompileShader(shader){GLctx.compileShader(GL.shaders[shader])}var _emscripten_glCompileShader=_glCompileShader;function _glCompressedTexImage2D(target,level,internalFormat,width,height,border,imageSize,data){if(true){if(GLctx.currentPixelUnpackBufferBinding||!imageSize){GLctx.compressedTexImage2D(target,level,internalFormat,width,height,border,imageSize,data)}else{GLctx.compressedTexImage2D(target,level,internalFormat,width,height,border,HEAPU8,data,imageSize)}return}GLctx.compressedTexImage2D(target,level,internalFormat,width,height,border,data?HEAPU8.subarray(data,data+imageSize):null)}var _emscripten_glCompressedTexImage2D=_glCompressedTexImage2D;function _glCompressedTexImage3D(target,level,internalFormat,width,height,depth,border,imageSize,data){if(GLctx.currentPixelUnpackBufferBinding){GLctx.compressedTexImage3D(target,level,internalFormat,width,height,depth,border,imageSize,data)}else{GLctx.compressedTexImage3D(target,level,internalFormat,width,height,depth,border,HEAPU8,data,imageSize)}}var _emscripten_glCompressedTexImage3D=_glCompressedTexImage3D;function _glCompressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,imageSize,data){if(true){if(GLctx.currentPixelUnpackBufferBinding||!imageSize){GLctx.compressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,imageSize,data)}else{GLctx.compressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,HEAPU8,data,imageSize)}return}GLctx.compressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,data?HEAPU8.subarray(data,data+imageSize):null)}var _emscripten_glCompressedTexSubImage2D=_glCompressedTexSubImage2D;function _glCompressedTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data){if(GLctx.currentPixelUnpackBufferBinding){GLctx.compressedTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data)}else{GLctx.compressedTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,HEAPU8,data,imageSize)}}var _emscripten_glCompressedTexSubImage3D=_glCompressedTexSubImage3D;function _glCopyBufferSubData(x0,x1,x2,x3,x4){GLctx.copyBufferSubData(x0,x1,x2,x3,x4)}var _emscripten_glCopyBufferSubData=_glCopyBufferSubData;function _glCopyTexImage2D(x0,x1,x2,x3,x4,x5,x6,x7){GLctx.copyTexImage2D(x0,x1,x2,x3,x4,x5,x6,x7)}var _emscripten_glCopyTexImage2D=_glCopyTexImage2D;function _glCopyTexSubImage2D(x0,x1,x2,x3,x4,x5,x6,x7){GLctx.copyTexSubImage2D(x0,x1,x2,x3,x4,x5,x6,x7)}var _emscripten_glCopyTexSubImage2D=_glCopyTexSubImage2D;function _glCopyTexSubImage3D(x0,x1,x2,x3,x4,x5,x6,x7,x8){GLctx.copyTexSubImage3D(x0,x1,x2,x3,x4,x5,x6,x7,x8)}var _emscripten_glCopyTexSubImage3D=_glCopyTexSubImage3D;function _glCreateProgram(){var id=GL.getNewId(GL.programs);var program=GLctx.createProgram();program.name=id;program.maxUniformLength=program.maxAttributeLength=program.maxUniformBlockNameLength=0;program.uniformIdCounter=1;GL.programs[id]=program;return id}var _emscripten_glCreateProgram=_glCreateProgram;function _glCreateShader(shaderType){var id=GL.getNewId(GL.shaders);GL.shaders[id]=GLctx.createShader(shaderType);return id}var _emscripten_glCreateShader=_glCreateShader;function _glCullFace(x0){GLctx.cullFace(x0)}var _emscripten_glCullFace=_glCullFace;function _glDeleteBuffers(n,buffers){for(var i=0;i>2];var buffer=GL.buffers[id];if(!buffer)continue;GLctx.deleteBuffer(buffer);buffer.name=0;GL.buffers[id]=null;if(id==GLctx.currentArrayBufferBinding)GLctx.currentArrayBufferBinding=0;if(id==GLctx.currentElementArrayBufferBinding)GLctx.currentElementArrayBufferBinding=0;if(id==GLctx.currentPixelPackBufferBinding)GLctx.currentPixelPackBufferBinding=0;if(id==GLctx.currentPixelUnpackBufferBinding)GLctx.currentPixelUnpackBufferBinding=0}}var _emscripten_glDeleteBuffers=_glDeleteBuffers;function _glDeleteFramebuffers(n,framebuffers){for(var i=0;i>2];var framebuffer=GL.framebuffers[id];if(!framebuffer)continue;GLctx.deleteFramebuffer(framebuffer);framebuffer.name=0;GL.framebuffers[id]=null}}var _emscripten_glDeleteFramebuffers=_glDeleteFramebuffers;function _glDeleteProgram(id){if(!id)return;var program=GL.programs[id];if(!program){GL.recordError(1281);return}GLctx.deleteProgram(program);program.name=0;GL.programs[id]=null}var _emscripten_glDeleteProgram=_glDeleteProgram;function _glDeleteQueries(n,ids){for(var i=0;i>2];var query=GL.queries[id];if(!query)continue;GLctx.deleteQuery(query);GL.queries[id]=null}}var _emscripten_glDeleteQueries=_glDeleteQueries;function _glDeleteQueriesEXT(n,ids){for(var i=0;i>2];var query=GL.queries[id];if(!query)continue;GLctx.disjointTimerQueryExt["deleteQueryEXT"](query);GL.queries[id]=null}}var _emscripten_glDeleteQueriesEXT=_glDeleteQueriesEXT;function _glDeleteRenderbuffers(n,renderbuffers){for(var i=0;i>2];var renderbuffer=GL.renderbuffers[id];if(!renderbuffer)continue;GLctx.deleteRenderbuffer(renderbuffer);renderbuffer.name=0;GL.renderbuffers[id]=null}}var _emscripten_glDeleteRenderbuffers=_glDeleteRenderbuffers;function _glDeleteSamplers(n,samplers){for(var i=0;i>2];var sampler=GL.samplers[id];if(!sampler)continue;GLctx.deleteSampler(sampler);sampler.name=0;GL.samplers[id]=null}}var _emscripten_glDeleteSamplers=_glDeleteSamplers;function _glDeleteShader(id){if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null}var _emscripten_glDeleteShader=_glDeleteShader;function _glDeleteSync(id){if(!id)return;var sync=GL.syncs[id];if(!sync){GL.recordError(1281);return}GLctx.deleteSync(sync);sync.name=0;GL.syncs[id]=null}var _emscripten_glDeleteSync=_glDeleteSync;function _glDeleteTextures(n,textures){for(var i=0;i>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}}var _emscripten_glDeleteTextures=_glDeleteTextures;function _glDeleteTransformFeedbacks(n,ids){for(var i=0;i>2];var transformFeedback=GL.transformFeedbacks[id];if(!transformFeedback)continue;GLctx.deleteTransformFeedback(transformFeedback);transformFeedback.name=0;GL.transformFeedbacks[id]=null}}var _emscripten_glDeleteTransformFeedbacks=_glDeleteTransformFeedbacks;function _glDeleteVertexArrays(n,vaos){for(var i=0;i>2];GLctx.deleteVertexArray(GL.vaos[id]);GL.vaos[id]=null}}var _emscripten_glDeleteVertexArrays=_glDeleteVertexArrays;var _glDeleteVertexArraysOES=_glDeleteVertexArrays;var _emscripten_glDeleteVertexArraysOES=_glDeleteVertexArraysOES;function _glDepthFunc(x0){GLctx.depthFunc(x0)}var _emscripten_glDepthFunc=_glDepthFunc;function _glDepthMask(flag){GLctx.depthMask(!!flag)}var _emscripten_glDepthMask=_glDepthMask;function _glDepthRangef(x0,x1){GLctx.depthRange(x0,x1)}var _emscripten_glDepthRangef=_glDepthRangef;function _glDetachShader(program,shader){GLctx.detachShader(GL.programs[program],GL.shaders[shader])}var _emscripten_glDetachShader=_glDetachShader;function _glDisable(x0){GLctx.disable(x0)}var _emscripten_glDisable=_glDisable;function _glDisableVertexAttribArray(index){var cb=GL.currentContext.clientBuffers[index];cb.enabled=false;GLctx.disableVertexAttribArray(index)}var _emscripten_glDisableVertexAttribArray=_glDisableVertexAttribArray;function _glDrawArrays(mode,first,count){GL.preDrawHandleClientVertexAttribBindings(first+count);GLctx.drawArrays(mode,first,count);GL.postDrawHandleClientVertexAttribBindings()}var _emscripten_glDrawArrays=_glDrawArrays;function _glDrawArraysInstanced(mode,first,count,primcount){GLctx.drawArraysInstanced(mode,first,count,primcount)}var _emscripten_glDrawArraysInstanced=_glDrawArraysInstanced;var _glDrawArraysInstancedANGLE=_glDrawArraysInstanced;var _emscripten_glDrawArraysInstancedANGLE=_glDrawArraysInstancedANGLE;var _glDrawArraysInstancedARB=_glDrawArraysInstanced;var _emscripten_glDrawArraysInstancedARB=_glDrawArraysInstancedARB;var _glDrawArraysInstancedEXT=_glDrawArraysInstanced;var _emscripten_glDrawArraysInstancedEXT=_glDrawArraysInstancedEXT;var _glDrawArraysInstancedNV=_glDrawArraysInstanced;var _emscripten_glDrawArraysInstancedNV=_glDrawArraysInstancedNV;var tempFixedLengthArray=[];function _glDrawBuffers(n,bufs){var bufArray=tempFixedLengthArray[n];for(var i=0;i>2]}GLctx.drawBuffers(bufArray)}var _emscripten_glDrawBuffers=_glDrawBuffers;var _glDrawBuffersEXT=_glDrawBuffers;var _emscripten_glDrawBuffersEXT=_glDrawBuffersEXT;var _glDrawBuffersWEBGL=_glDrawBuffers;var _emscripten_glDrawBuffersWEBGL=_glDrawBuffersWEBGL;function _glDrawElements(mode,count,type,indices){var buf;if(!GLctx.currentElementArrayBufferBinding){var size=GL.calcBufLength(1,type,0,count);buf=GL.getTempIndexBuffer(size);GLctx.bindBuffer(34963,buf);GLctx.bufferSubData(34963,0,HEAPU8.subarray(indices,indices+size));indices=0}GL.preDrawHandleClientVertexAttribBindings(count);GLctx.drawElements(mode,count,type,indices);GL.postDrawHandleClientVertexAttribBindings(count);if(!GLctx.currentElementArrayBufferBinding){GLctx.bindBuffer(34963,null)}}var _emscripten_glDrawElements=_glDrawElements;function _glDrawElementsInstanced(mode,count,type,indices,primcount){GLctx.drawElementsInstanced(mode,count,type,indices,primcount)}var _emscripten_glDrawElementsInstanced=_glDrawElementsInstanced;var _glDrawElementsInstancedANGLE=_glDrawElementsInstanced;var _emscripten_glDrawElementsInstancedANGLE=_glDrawElementsInstancedANGLE;var _glDrawElementsInstancedARB=_glDrawElementsInstanced;var _emscripten_glDrawElementsInstancedARB=_glDrawElementsInstancedARB;var _glDrawElementsInstancedEXT=_glDrawElementsInstanced;var _emscripten_glDrawElementsInstancedEXT=_glDrawElementsInstancedEXT;var _glDrawElementsInstancedNV=_glDrawElementsInstanced;var _emscripten_glDrawElementsInstancedNV=_glDrawElementsInstancedNV;function _glDrawRangeElements(mode,start,end,count,type,indices){_glDrawElements(mode,count,type,indices)}var _emscripten_glDrawRangeElements=_glDrawRangeElements;function _glEnable(x0){GLctx.enable(x0)}var _emscripten_glEnable=_glEnable;function _glEnableVertexAttribArray(index){var cb=GL.currentContext.clientBuffers[index];cb.enabled=true;GLctx.enableVertexAttribArray(index)}var _emscripten_glEnableVertexAttribArray=_glEnableVertexAttribArray;function _glEndQuery(x0){GLctx.endQuery(x0)}var _emscripten_glEndQuery=_glEndQuery;function _glEndQueryEXT(target){GLctx.disjointTimerQueryExt["endQueryEXT"](target)}var _emscripten_glEndQueryEXT=_glEndQueryEXT;function _glEndTransformFeedback(){GLctx.endTransformFeedback()}var _emscripten_glEndTransformFeedback=_glEndTransformFeedback;function _glFenceSync(condition,flags){var sync=GLctx.fenceSync(condition,flags);if(sync){var id=GL.getNewId(GL.syncs);sync.name=id;GL.syncs[id]=sync;return id}return 0}var _emscripten_glFenceSync=_glFenceSync;function _glFinish(){GLctx.finish()}var _emscripten_glFinish=_glFinish;function _glFlush(){GLctx.flush()}var _emscripten_glFlush=_glFlush;function emscriptenWebGLGetBufferBinding(target){switch(target){case 34962:target=34964;break;case 34963:target=34965;break;case 35051:target=35053;break;case 35052:target=35055;break;case 35982:target=35983;break;case 36662:target=36662;break;case 36663:target=36663;break;case 35345:target=35368;break}var buffer=GLctx.getParameter(target);if(buffer)return buffer.name|0;else return 0}function emscriptenWebGLValidateMapBufferTarget(target){switch(target){case 34962:case 34963:case 36662:case 36663:case 35051:case 35052:case 35882:case 35982:case 35345:return true;default:return false}}function _glFlushMappedBufferRange(target,offset,length){if(!emscriptenWebGLValidateMapBufferTarget(target)){GL.recordError(1280);err("GL_INVALID_ENUM in glFlushMappedBufferRange");return}var mapping=GL.mappedBuffers[emscriptenWebGLGetBufferBinding(target)];if(!mapping){GL.recordError(1282);err("buffer was never mapped in glFlushMappedBufferRange");return}if(!(mapping.access&16)){GL.recordError(1282);err("buffer was not mapped with GL_MAP_FLUSH_EXPLICIT_BIT in glFlushMappedBufferRange");return}if(offset<0||length<0||offset+length>mapping.length){GL.recordError(1281);err("invalid range in glFlushMappedBufferRange");return}GLctx.bufferSubData(target,mapping.offset,HEAPU8.subarray(mapping.mem+offset,mapping.mem+offset+length))}var _emscripten_glFlushMappedBufferRange=_glFlushMappedBufferRange;function _glFramebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer){GLctx.framebufferRenderbuffer(target,attachment,renderbuffertarget,GL.renderbuffers[renderbuffer])}var _emscripten_glFramebufferRenderbuffer=_glFramebufferRenderbuffer;function _glFramebufferTexture2D(target,attachment,textarget,texture,level){GLctx.framebufferTexture2D(target,attachment,textarget,GL.textures[texture],level)}var _emscripten_glFramebufferTexture2D=_glFramebufferTexture2D;function _glFramebufferTextureLayer(target,attachment,texture,level,layer){GLctx.framebufferTextureLayer(target,attachment,GL.textures[texture],level,layer)}var _emscripten_glFramebufferTextureLayer=_glFramebufferTextureLayer;function _glFrontFace(x0){GLctx.frontFace(x0)}var _emscripten_glFrontFace=_glFrontFace;function __glGenObject(n,buffers,createFunction,objectTable){for(var i=0;i>2]=id}}function _glGenBuffers(n,buffers){__glGenObject(n,buffers,"createBuffer",GL.buffers)}var _emscripten_glGenBuffers=_glGenBuffers;function _glGenFramebuffers(n,ids){__glGenObject(n,ids,"createFramebuffer",GL.framebuffers)}var _emscripten_glGenFramebuffers=_glGenFramebuffers;function _glGenQueries(n,ids){__glGenObject(n,ids,"createQuery",GL.queries)}var _emscripten_glGenQueries=_glGenQueries;function _glGenQueriesEXT(n,ids){for(var i=0;i>2]=0;return}var id=GL.getNewId(GL.queries);query.name=id;GL.queries[id]=query;HEAP32[ids+i*4>>2]=id}}var _emscripten_glGenQueriesEXT=_glGenQueriesEXT;function _glGenRenderbuffers(n,renderbuffers){__glGenObject(n,renderbuffers,"createRenderbuffer",GL.renderbuffers)}var _emscripten_glGenRenderbuffers=_glGenRenderbuffers;function _glGenSamplers(n,samplers){__glGenObject(n,samplers,"createSampler",GL.samplers)}var _emscripten_glGenSamplers=_glGenSamplers;function _glGenTextures(n,textures){__glGenObject(n,textures,"createTexture",GL.textures)}var _emscripten_glGenTextures=_glGenTextures;function _glGenTransformFeedbacks(n,ids){__glGenObject(n,ids,"createTransformFeedback",GL.transformFeedbacks)}var _emscripten_glGenTransformFeedbacks=_glGenTransformFeedbacks;function _glGenVertexArrays(n,arrays){__glGenObject(n,arrays,"createVertexArray",GL.vaos)}var _emscripten_glGenVertexArrays=_glGenVertexArrays;var _glGenVertexArraysOES=_glGenVertexArrays;var _emscripten_glGenVertexArraysOES=_glGenVertexArraysOES;function _glGenerateMipmap(x0){GLctx.generateMipmap(x0)}var _emscripten_glGenerateMipmap=_glGenerateMipmap;function __glGetActiveAttribOrUniform(funcName,program,index,bufSize,length,size,type,name){program=GL.programs[program];var info=GLctx[funcName](program,index);if(info){var numBytesWrittenExclNull=name&&stringToUTF8(info.name,name,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull;if(size)HEAP32[size>>2]=info.size;if(type)HEAP32[type>>2]=info.type}}function _glGetActiveAttrib(program,index,bufSize,length,size,type,name){__glGetActiveAttribOrUniform("getActiveAttrib",program,index,bufSize,length,size,type,name)}var _emscripten_glGetActiveAttrib=_glGetActiveAttrib;function _glGetActiveUniform(program,index,bufSize,length,size,type,name){__glGetActiveAttribOrUniform("getActiveUniform",program,index,bufSize,length,size,type,name)}var _emscripten_glGetActiveUniform=_glGetActiveUniform;function _glGetActiveUniformBlockName(program,uniformBlockIndex,bufSize,length,uniformBlockName){program=GL.programs[program];var result=GLctx.getActiveUniformBlockName(program,uniformBlockIndex);if(!result)return;if(uniformBlockName&&bufSize>0){var numBytesWrittenExclNull=stringToUTF8(result,uniformBlockName,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}}var _emscripten_glGetActiveUniformBlockName=_glGetActiveUniformBlockName;function _glGetActiveUniformBlockiv(program,uniformBlockIndex,pname,params){if(!params){GL.recordError(1281);return}program=GL.programs[program];if(pname==35393){var name=GLctx.getActiveUniformBlockName(program,uniformBlockIndex);HEAP32[params>>2]=name.length+1;return}var result=GLctx.getActiveUniformBlockParameter(program,uniformBlockIndex,pname);if(result===null)return;if(pname==35395){for(var i=0;i>2]=result[i]}}else{HEAP32[params>>2]=result}}var _emscripten_glGetActiveUniformBlockiv=_glGetActiveUniformBlockiv;function _glGetActiveUniformsiv(program,uniformCount,uniformIndices,pname,params){if(!params){GL.recordError(1281);return}if(uniformCount>0&&uniformIndices==0){GL.recordError(1281);return}program=GL.programs[program];var ids=[];for(var i=0;i>2])}var result=GLctx.getActiveUniforms(program,ids,pname);if(!result)return;var len=result.length;for(var i=0;i>2]=result[i]}}var _emscripten_glGetActiveUniformsiv=_glGetActiveUniformsiv;function _glGetAttachedShaders(program,maxCount,count,shaders){var result=GLctx.getAttachedShaders(GL.programs[program]);var len=result.length;if(len>maxCount){len=maxCount}HEAP32[count>>2]=len;for(var i=0;i>2]=id}}var _emscripten_glGetAttachedShaders=_glGetAttachedShaders;function _glGetAttribLocation(program,name){return GLctx.getAttribLocation(GL.programs[program],UTF8ToString(name))}var _emscripten_glGetAttribLocation=_glGetAttribLocation;function writeI53ToI64(ptr,num){HEAPU32[ptr>>2]=num;HEAPU32[ptr+4>>2]=(num-HEAPU32[ptr>>2])/4294967296}function emscriptenWebGLGet(name_,p,type){if(!p){GL.recordError(1281);return}var ret=undefined;switch(name_){case 36346:ret=1;break;case 36344:if(type!=0&&type!=1){GL.recordError(1280)}return;case 34814:case 36345:ret=0;break;case 34466:var formats=GLctx.getParameter(34467);ret=formats?formats.length:0;break;case 33309:if(GL.currentContext.version<2){GL.recordError(1282);return}var exts=GLctx.getSupportedExtensions()||[];ret=2*exts.length;break;case 33307:case 33308:if(GL.currentContext.version<2){GL.recordError(1280);return}ret=name_==33307?3:0;break}if(ret===undefined){var result=GLctx.getParameter(name_);switch(typeof result){case"number":ret=result;break;case"boolean":ret=result?1:0;break;case"string":GL.recordError(1280);return;case"object":if(result===null){switch(name_){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:{ret=0;break}default:{GL.recordError(1280);return}}}else if(result instanceof Float32Array||result instanceof Uint32Array||result instanceof Int32Array||result instanceof Array){for(var i=0;i>2]=result[i];break;case 2:HEAPF32[p+i*4>>2]=result[i];break;case 4:HEAP8[p+i>>0]=result[i]?1:0;break}}return}else{try{ret=result.name|0}catch(e){GL.recordError(1280);err("GL_INVALID_ENUM in glGet"+type+"v: Unknown object returned from WebGL getParameter("+name_+")! (error: "+e+")");return}}break;default:GL.recordError(1280);err("GL_INVALID_ENUM in glGet"+type+"v: Native code calling glGet"+type+"v("+name_+") and it returns "+result+" of type "+typeof result+"!");return}}switch(type){case 1:writeI53ToI64(p,ret);break;case 0:HEAP32[p>>2]=ret;break;case 2:HEAPF32[p>>2]=ret;break;case 4:HEAP8[p>>0]=ret?1:0;break}}function _glGetBooleanv(name_,p){emscriptenWebGLGet(name_,p,4)}var _emscripten_glGetBooleanv=_glGetBooleanv;function _glGetBufferParameteri64v(target,value,data){if(!data){GL.recordError(1281);return}writeI53ToI64(data,GLctx.getBufferParameter(target,value))}var _emscripten_glGetBufferParameteri64v=_glGetBufferParameteri64v;function _glGetBufferParameteriv(target,value,data){if(!data){GL.recordError(1281);return}HEAP32[data>>2]=GLctx.getBufferParameter(target,value)}var _emscripten_glGetBufferParameteriv=_glGetBufferParameteriv;function _glGetBufferPointerv(target,pname,params){if(pname==35005){var ptr=0;var mappedBuffer=GL.mappedBuffers[emscriptenWebGLGetBufferBinding(target)];if(mappedBuffer){ptr=mappedBuffer.mem}HEAP32[params>>2]=ptr}else{GL.recordError(1280);err("GL_INVALID_ENUM in glGetBufferPointerv")}}var _emscripten_glGetBufferPointerv=_glGetBufferPointerv;function _glGetError(){var error=GLctx.getError()||GL.lastError;GL.lastError=0;return error}var _emscripten_glGetError=_glGetError;function _glGetFloatv(name_,p){emscriptenWebGLGet(name_,p,2)}var _emscripten_glGetFloatv=_glGetFloatv;function _glGetFragDataLocation(program,name){return GLctx.getFragDataLocation(GL.programs[program],UTF8ToString(name))}var _emscripten_glGetFragDataLocation=_glGetFragDataLocation;function _glGetFramebufferAttachmentParameteriv(target,attachment,pname,params){var result=GLctx.getFramebufferAttachmentParameter(target,attachment,pname);if(result instanceof WebGLRenderbuffer||result instanceof WebGLTexture){result=result.name|0}HEAP32[params>>2]=result}var _emscripten_glGetFramebufferAttachmentParameteriv=_glGetFramebufferAttachmentParameteriv;function emscriptenWebGLGetIndexed(target,index,data,type){if(!data){GL.recordError(1281);return}var result=GLctx.getIndexedParameter(target,index);var ret;switch(typeof result){case"boolean":ret=result?1:0;break;case"number":ret=result;break;case"object":if(result===null){switch(target){case 35983:case 35368:ret=0;break;default:{GL.recordError(1280);return}}}else if(result instanceof WebGLBuffer){ret=result.name|0}else{GL.recordError(1280);return}break;default:GL.recordError(1280);return}switch(type){case 1:writeI53ToI64(data,ret);break;case 0:HEAP32[data>>2]=ret;break;case 2:HEAPF32[data>>2]=ret;break;case 4:HEAP8[data>>0]=ret?1:0;break;default:throw"internal emscriptenWebGLGetIndexed() error, bad type: "+type}}function _glGetInteger64i_v(target,index,data){emscriptenWebGLGetIndexed(target,index,data,1)}var _emscripten_glGetInteger64i_v=_glGetInteger64i_v;function _glGetInteger64v(name_,p){emscriptenWebGLGet(name_,p,1)}var _emscripten_glGetInteger64v=_glGetInteger64v;function _glGetIntegeri_v(target,index,data){emscriptenWebGLGetIndexed(target,index,data,0)}var _emscripten_glGetIntegeri_v=_glGetIntegeri_v;function _glGetIntegerv(name_,p){emscriptenWebGLGet(name_,p,0)}var _emscripten_glGetIntegerv=_glGetIntegerv;function _glGetInternalformativ(target,internalformat,pname,bufSize,params){if(bufSize<0){GL.recordError(1281);return}if(!params){GL.recordError(1281);return}var ret=GLctx.getInternalformatParameter(target,internalformat,pname);if(ret===null)return;for(var i=0;i>2]=ret[i]}}var _emscripten_glGetInternalformativ=_glGetInternalformativ;function _glGetProgramBinary(program,bufSize,length,binaryFormat,binary){GL.recordError(1282)}var _emscripten_glGetProgramBinary=_glGetProgramBinary;function _glGetProgramInfoLog(program,maxLength,length,infoLog){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}var _emscripten_glGetProgramInfoLog=_glGetProgramInfoLog;function _glGetProgramiv(program,pname,p){if(!p){GL.recordError(1281);return}if(program>=GL.counter){GL.recordError(1281);return}program=GL.programs[program];if(pname==35716){var log=GLctx.getProgramInfoLog(program);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35719){if(!program.maxUniformLength){for(var i=0;i>2]=program.maxUniformLength}else if(pname==35722){if(!program.maxAttributeLength){for(var i=0;i>2]=program.maxAttributeLength}else if(pname==35381){if(!program.maxUniformBlockNameLength){for(var i=0;i>2]=program.maxUniformBlockNameLength}else{HEAP32[p>>2]=GLctx.getProgramParameter(program,pname)}}var _emscripten_glGetProgramiv=_glGetProgramiv;function _glGetQueryObjecti64vEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.queries[id];var param;if(GL.currentContext.version<2){param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname)}else{param=GLctx.getQueryParameter(query,pname)}var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}writeI53ToI64(params,ret)}var _emscripten_glGetQueryObjecti64vEXT=_glGetQueryObjecti64vEXT;function _glGetQueryObjectivEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.queries[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret}var _emscripten_glGetQueryObjectivEXT=_glGetQueryObjectivEXT;var _glGetQueryObjectui64vEXT=_glGetQueryObjecti64vEXT;var _emscripten_glGetQueryObjectui64vEXT=_glGetQueryObjectui64vEXT;function _glGetQueryObjectuiv(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.queries[id];var param=GLctx.getQueryParameter(query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret}var _emscripten_glGetQueryObjectuiv=_glGetQueryObjectuiv;var _glGetQueryObjectuivEXT=_glGetQueryObjectivEXT;var _emscripten_glGetQueryObjectuivEXT=_glGetQueryObjectuivEXT;function _glGetQueryiv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getQuery(target,pname)}var _emscripten_glGetQueryiv=_glGetQueryiv;function _glGetQueryivEXT(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.disjointTimerQueryExt["getQueryEXT"](target,pname)}var _emscripten_glGetQueryivEXT=_glGetQueryivEXT;function _glGetRenderbufferParameteriv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getRenderbufferParameter(target,pname)}var _emscripten_glGetRenderbufferParameteriv=_glGetRenderbufferParameteriv;function _glGetSamplerParameterfv(sampler,pname,params){if(!params){GL.recordError(1281);return}HEAPF32[params>>2]=GLctx.getSamplerParameter(GL.samplers[sampler],pname)}var _emscripten_glGetSamplerParameterfv=_glGetSamplerParameterfv;function _glGetSamplerParameteriv(sampler,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getSamplerParameter(GL.samplers[sampler],pname)}var _emscripten_glGetSamplerParameteriv=_glGetSamplerParameteriv;function _glGetShaderInfoLog(shader,maxLength,length,infoLog){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}var _emscripten_glGetShaderInfoLog=_glGetShaderInfoLog;function _glGetShaderPrecisionFormat(shaderType,precisionType,range,precision){var result=GLctx.getShaderPrecisionFormat(shaderType,precisionType);HEAP32[range>>2]=result.rangeMin;HEAP32[range+4>>2]=result.rangeMax;HEAP32[precision>>2]=result.precision}var _emscripten_glGetShaderPrecisionFormat=_glGetShaderPrecisionFormat;function _glGetShaderSource(shader,bufSize,length,source){var result=GLctx.getShaderSource(GL.shaders[shader]);if(!result)return;var numBytesWrittenExclNull=bufSize>0&&source?stringToUTF8(result,source,bufSize):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}var _emscripten_glGetShaderSource=_glGetShaderSource;function _glGetShaderiv(shader,pname,p){if(!p){GL.recordError(1281);return}if(pname==35716){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";var logLength=log?log.length+1:0;HEAP32[p>>2]=logLength}else if(pname==35720){var source=GLctx.getShaderSource(GL.shaders[shader]);var sourceLength=source?source.length+1:0;HEAP32[p>>2]=sourceLength}else{HEAP32[p>>2]=GLctx.getShaderParameter(GL.shaders[shader],pname)}}var _emscripten_glGetShaderiv=_glGetShaderiv;function _glGetString(name_){var ret=GL.stringCache[name_];if(!ret){switch(name_){case 7939:var exts=GLctx.getSupportedExtensions()||[];exts=exts.concat(exts.map(function(e){return"GL_"+e}));ret=stringToNewUTF8(exts.join(" "));break;case 7936:case 7937:case 37445:case 37446:var s=GLctx.getParameter(name_);if(!s){GL.recordError(1280)}ret=s&&stringToNewUTF8(s);break;case 7938:var glVersion=GLctx.getParameter(7938);if(true)glVersion="OpenGL ES 3.0 ("+glVersion+")";else{glVersion="OpenGL ES 2.0 ("+glVersion+")"}ret=stringToNewUTF8(glVersion);break;case 35724:var glslVersion=GLctx.getParameter(35724);var ver_re=/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/;var ver_num=glslVersion.match(ver_re);if(ver_num!==null){if(ver_num[1].length==3)ver_num[1]=ver_num[1]+"0";glslVersion="OpenGL ES GLSL ES "+ver_num[1]+" ("+glslVersion+")"}ret=stringToNewUTF8(glslVersion);break;default:GL.recordError(1280)}GL.stringCache[name_]=ret}return ret}var _emscripten_glGetString=_glGetString;function _glGetStringi(name,index){if(GL.currentContext.version<2){GL.recordError(1282);return 0}var stringiCache=GL.stringiCache[name];if(stringiCache){if(index<0||index>=stringiCache.length){GL.recordError(1281);return 0}return stringiCache[index]}switch(name){case 7939:var exts=GLctx.getSupportedExtensions()||[];exts=exts.concat(exts.map(function(e){return"GL_"+e}));exts=exts.map(function(e){return stringToNewUTF8(e)});stringiCache=GL.stringiCache[name]=exts;if(index<0||index>=stringiCache.length){GL.recordError(1281);return 0}return stringiCache[index];default:GL.recordError(1280);return 0}}var _emscripten_glGetStringi=_glGetStringi;function _glGetSynciv(sync,pname,bufSize,length,values){if(bufSize<0){GL.recordError(1281);return}if(!values){GL.recordError(1281);return}var ret=GLctx.getSyncParameter(GL.syncs[sync],pname);if(ret!==null){HEAP32[values>>2]=ret;if(length)HEAP32[length>>2]=1}}var _emscripten_glGetSynciv=_glGetSynciv;function _glGetTexParameterfv(target,pname,params){if(!params){GL.recordError(1281);return}HEAPF32[params>>2]=GLctx.getTexParameter(target,pname)}var _emscripten_glGetTexParameterfv=_glGetTexParameterfv;function _glGetTexParameteriv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getTexParameter(target,pname)}var _emscripten_glGetTexParameteriv=_glGetTexParameteriv;function _glGetTransformFeedbackVarying(program,index,bufSize,length,size,type,name){program=GL.programs[program];var info=GLctx.getTransformFeedbackVarying(program,index);if(!info)return;if(name&&bufSize>0){var numBytesWrittenExclNull=stringToUTF8(info.name,name,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}if(size)HEAP32[size>>2]=info.size;if(type)HEAP32[type>>2]=info.type}var _emscripten_glGetTransformFeedbackVarying=_glGetTransformFeedbackVarying;function _glGetUniformBlockIndex(program,uniformBlockName){return GLctx.getUniformBlockIndex(GL.programs[program],UTF8ToString(uniformBlockName))}var _emscripten_glGetUniformBlockIndex=_glGetUniformBlockIndex;function _glGetUniformIndices(program,uniformCount,uniformNames,uniformIndices){if(!uniformIndices){GL.recordError(1281);return}if(uniformCount>0&&(uniformNames==0||uniformIndices==0)){GL.recordError(1281);return}program=GL.programs[program];var names=[];for(var i=0;i>2]));var result=GLctx.getUniformIndices(program,names);if(!result)return;var len=result.length;for(var i=0;i>2]=result[i]}}var _emscripten_glGetUniformIndices=_glGetUniformIndices;function jstoi_q(str){return parseInt(str)}function webglGetLeftBracePos(name){return name.slice(-1)=="]"&&name.lastIndexOf("[")}function webglPrepareUniformLocationsBeforeFirstUse(program){var uniformLocsById=program.uniformLocsById,uniformSizeAndIdsByName=program.uniformSizeAndIdsByName,i,j;if(!uniformLocsById){program.uniformLocsById=uniformLocsById={};program.uniformArrayNamesById={};for(i=0;i0?nm.slice(0,lb):nm;var id=program.uniformIdCounter;program.uniformIdCounter+=sz;uniformSizeAndIdsByName[arrayName]=[sz,id];for(j=0;j0){arrayIndex=jstoi_q(name.slice(leftBrace+1))>>>0;uniformBaseName=name.slice(0,leftBrace)}var sizeAndId=program.uniformSizeAndIdsByName[uniformBaseName];if(sizeAndId&&arrayIndex0?"["+webglLoc+"]":""))}return webglLoc}else{GL.recordError(1282)}}function emscriptenWebGLGetUniform(program,location,params,type){if(!params){GL.recordError(1281);return}program=GL.programs[program];webglPrepareUniformLocationsBeforeFirstUse(program);var data=GLctx.getUniform(program,webglGetUniformLocation(location));if(typeof data=="number"||typeof data=="boolean"){switch(type){case 0:HEAP32[params>>2]=data;break;case 2:HEAPF32[params>>2]=data;break}}else{for(var i=0;i>2]=data[i];break;case 2:HEAPF32[params+i*4>>2]=data[i];break}}}}function _glGetUniformfv(program,location,params){emscriptenWebGLGetUniform(program,location,params,2)}var _emscripten_glGetUniformfv=_glGetUniformfv;function _glGetUniformiv(program,location,params){emscriptenWebGLGetUniform(program,location,params,0)}var _emscripten_glGetUniformiv=_glGetUniformiv;function _glGetUniformuiv(program,location,params){emscriptenWebGLGetUniform(program,location,params,0)}var _emscripten_glGetUniformuiv=_glGetUniformuiv;function emscriptenWebGLGetVertexAttrib(index,pname,params,type){if(!params){GL.recordError(1281);return}if(GL.currentContext.clientBuffers[index].enabled){err("glGetVertexAttrib*v on client-side array: not supported, bad data returned")}var data=GLctx.getVertexAttrib(index,pname);if(pname==34975){HEAP32[params>>2]=data&&data["name"]}else if(typeof data=="number"||typeof data=="boolean"){switch(type){case 0:HEAP32[params>>2]=data;break;case 2:HEAPF32[params>>2]=data;break;case 5:HEAP32[params>>2]=Math.fround(data);break}}else{for(var i=0;i>2]=data[i];break;case 2:HEAPF32[params+i*4>>2]=data[i];break;case 5:HEAP32[params+i*4>>2]=Math.fround(data[i]);break}}}}function _glGetVertexAttribIiv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,0)}var _emscripten_glGetVertexAttribIiv=_glGetVertexAttribIiv;var _glGetVertexAttribIuiv=_glGetVertexAttribIiv;var _emscripten_glGetVertexAttribIuiv=_glGetVertexAttribIuiv;function _glGetVertexAttribPointerv(index,pname,pointer){if(!pointer){GL.recordError(1281);return}if(GL.currentContext.clientBuffers[index].enabled){err("glGetVertexAttribPointer on client-side array: not supported, bad data returned")}HEAP32[pointer>>2]=GLctx.getVertexAttribOffset(index,pname)}var _emscripten_glGetVertexAttribPointerv=_glGetVertexAttribPointerv;function _glGetVertexAttribfv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,2)}var _emscripten_glGetVertexAttribfv=_glGetVertexAttribfv;function _glGetVertexAttribiv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,5)}var _emscripten_glGetVertexAttribiv=_glGetVertexAttribiv;function _glHint(x0,x1){GLctx.hint(x0,x1)}var _emscripten_glHint=_glHint;function _glInvalidateFramebuffer(target,numAttachments,attachments){var list=tempFixedLengthArray[numAttachments];for(var i=0;i>2]}GLctx.invalidateFramebuffer(target,list)}var _emscripten_glInvalidateFramebuffer=_glInvalidateFramebuffer;function _glInvalidateSubFramebuffer(target,numAttachments,attachments,x,y,width,height){var list=tempFixedLengthArray[numAttachments];for(var i=0;i>2]}GLctx.invalidateSubFramebuffer(target,list,x,y,width,height)}var _emscripten_glInvalidateSubFramebuffer=_glInvalidateSubFramebuffer;function _glIsBuffer(buffer){var b=GL.buffers[buffer];if(!b)return 0;return GLctx.isBuffer(b)}var _emscripten_glIsBuffer=_glIsBuffer;function _glIsEnabled(x0){return GLctx.isEnabled(x0)}var _emscripten_glIsEnabled=_glIsEnabled;function _glIsFramebuffer(framebuffer){var fb=GL.framebuffers[framebuffer];if(!fb)return 0;return GLctx.isFramebuffer(fb)}var _emscripten_glIsFramebuffer=_glIsFramebuffer;function _glIsProgram(program){program=GL.programs[program];if(!program)return 0;return GLctx.isProgram(program)}var _emscripten_glIsProgram=_glIsProgram;function _glIsQuery(id){var query=GL.queries[id];if(!query)return 0;return GLctx.isQuery(query)}var _emscripten_glIsQuery=_glIsQuery;function _glIsQueryEXT(id){var query=GL.queries[id];if(!query)return 0;return GLctx.disjointTimerQueryExt["isQueryEXT"](query)}var _emscripten_glIsQueryEXT=_glIsQueryEXT;function _glIsRenderbuffer(renderbuffer){var rb=GL.renderbuffers[renderbuffer];if(!rb)return 0;return GLctx.isRenderbuffer(rb)}var _emscripten_glIsRenderbuffer=_glIsRenderbuffer;function _glIsSampler(id){var sampler=GL.samplers[id];if(!sampler)return 0;return GLctx.isSampler(sampler)}var _emscripten_glIsSampler=_glIsSampler;function _glIsShader(shader){var s=GL.shaders[shader];if(!s)return 0;return GLctx.isShader(s)}var _emscripten_glIsShader=_glIsShader;function _glIsSync(sync){return GLctx.isSync(GL.syncs[sync])}var _emscripten_glIsSync=_glIsSync;function _glIsTexture(id){var texture=GL.textures[id];if(!texture)return 0;return GLctx.isTexture(texture)}var _emscripten_glIsTexture=_glIsTexture;function _glIsTransformFeedback(id){return GLctx.isTransformFeedback(GL.transformFeedbacks[id])}var _emscripten_glIsTransformFeedback=_glIsTransformFeedback;function _glIsVertexArray(array){var vao=GL.vaos[array];if(!vao)return 0;return GLctx.isVertexArray(vao)}var _emscripten_glIsVertexArray=_glIsVertexArray;var _glIsVertexArrayOES=_glIsVertexArray;var _emscripten_glIsVertexArrayOES=_glIsVertexArrayOES;function _glLineWidth(x0){GLctx.lineWidth(x0)}var _emscripten_glLineWidth=_glLineWidth;function _glLinkProgram(program){program=GL.programs[program];GLctx.linkProgram(program);program.uniformLocsById=0;program.uniformSizeAndIdsByName={}}var _emscripten_glLinkProgram=_glLinkProgram;function _glMapBufferRange(target,offset,length,access){if((access&(1|32))!=0){err("glMapBufferRange access does not support MAP_READ or MAP_UNSYNCHRONIZED");return 0}if((access&2)==0){err("glMapBufferRange access must include MAP_WRITE");return 0}if((access&(4|8))==0){err("glMapBufferRange access must include INVALIDATE_BUFFER or INVALIDATE_RANGE");return 0}if(!emscriptenWebGLValidateMapBufferTarget(target)){GL.recordError(1280);err("GL_INVALID_ENUM in glMapBufferRange");return 0}var mem=_malloc(length);if(!mem)return 0;GL.mappedBuffers[emscriptenWebGLGetBufferBinding(target)]={offset:offset,length:length,mem:mem,access:access};return mem}var _emscripten_glMapBufferRange=_glMapBufferRange;function _glPauseTransformFeedback(){GLctx.pauseTransformFeedback()}var _emscripten_glPauseTransformFeedback=_glPauseTransformFeedback;function _glPixelStorei(pname,param){if(pname==3317){GL.unpackAlignment=param}GLctx.pixelStorei(pname,param)}var _emscripten_glPixelStorei=_glPixelStorei;function _glPolygonOffset(x0,x1){GLctx.polygonOffset(x0,x1)}var _emscripten_glPolygonOffset=_glPolygonOffset;function _glProgramBinary(program,binaryFormat,binary,length){GL.recordError(1280)}var _emscripten_glProgramBinary=_glProgramBinary;function _glProgramParameteri(program,pname,value){GL.recordError(1280)}var _emscripten_glProgramParameteri=_glProgramParameteri;function _glQueryCounterEXT(id,target){GLctx.disjointTimerQueryExt["queryCounterEXT"](GL.queries[id],target)}var _emscripten_glQueryCounterEXT=_glQueryCounterEXT;function _glReadBuffer(x0){GLctx.readBuffer(x0)}var _emscripten_glReadBuffer=_glReadBuffer;function computeUnpackAlignedImageSize(width,height,sizePerPixel,alignment){function roundedToNextMultipleOf(x,y){return x+y-1&-y}var plainRowSize=width*sizePerPixel;var alignedRowSize=roundedToNextMultipleOf(plainRowSize,alignment);return height*alignedRowSize}function colorChannelsInGlTextureFormat(format){var colorChannels={5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4};return colorChannels[format-6402]||1}function heapObjectForWebGLType(type){type-=5120;if(type==0)return HEAP8;if(type==1)return HEAPU8;if(type==2)return HEAP16;if(type==4)return HEAP32;if(type==6)return HEAPF32;if(type==5||type==28922||type==28520||type==30779||type==30782)return HEAPU32;return HEAPU16}function heapAccessShiftForWebGLHeap(heap){return 31-Math.clz32(heap.BYTES_PER_ELEMENT)}function emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat){var heap=heapObjectForWebGLType(type);var shift=heapAccessShiftForWebGLHeap(heap);var byteSize=1<>shift,pixels+bytes>>shift)}function _glReadPixels(x,y,width,height,format,type,pixels){if(true){if(GLctx.currentPixelPackBufferBinding){GLctx.readPixels(x,y,width,height,format,type,pixels)}else{var heap=heapObjectForWebGLType(type);GLctx.readPixels(x,y,width,height,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}return}var pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,format);if(!pixelData){GL.recordError(1280);return}GLctx.readPixels(x,y,width,height,format,type,pixelData)}var _emscripten_glReadPixels=_glReadPixels;function _glReleaseShaderCompiler(){}var _emscripten_glReleaseShaderCompiler=_glReleaseShaderCompiler;function _glRenderbufferStorage(x0,x1,x2,x3){GLctx.renderbufferStorage(x0,x1,x2,x3)}var _emscripten_glRenderbufferStorage=_glRenderbufferStorage;function _glRenderbufferStorageMultisample(x0,x1,x2,x3,x4){GLctx.renderbufferStorageMultisample(x0,x1,x2,x3,x4)}var _emscripten_glRenderbufferStorageMultisample=_glRenderbufferStorageMultisample;function _glResumeTransformFeedback(){GLctx.resumeTransformFeedback()}var _emscripten_glResumeTransformFeedback=_glResumeTransformFeedback;function _glSampleCoverage(value,invert){GLctx.sampleCoverage(value,!!invert)}var _emscripten_glSampleCoverage=_glSampleCoverage;function _glSamplerParameterf(sampler,pname,param){GLctx.samplerParameterf(GL.samplers[sampler],pname,param)}var _emscripten_glSamplerParameterf=_glSamplerParameterf;function _glSamplerParameterfv(sampler,pname,params){var param=HEAPF32[params>>2];GLctx.samplerParameterf(GL.samplers[sampler],pname,param)}var _emscripten_glSamplerParameterfv=_glSamplerParameterfv;function _glSamplerParameteri(sampler,pname,param){GLctx.samplerParameteri(GL.samplers[sampler],pname,param)}var _emscripten_glSamplerParameteri=_glSamplerParameteri;function _glSamplerParameteriv(sampler,pname,params){var param=HEAP32[params>>2];GLctx.samplerParameteri(GL.samplers[sampler],pname,param)}var _emscripten_glSamplerParameteriv=_glSamplerParameteriv;function _glScissor(x0,x1,x2,x3){GLctx.scissor(x0,x1,x2,x3)}var _emscripten_glScissor=_glScissor;function _glShaderBinary(count,shaders,binaryformat,binary,length){GL.recordError(1280)}var _emscripten_glShaderBinary=_glShaderBinary;function _glShaderSource(shader,count,string,length){var source=GL.getSource(shader,count,string,length);GLctx.shaderSource(GL.shaders[shader],source)}var _emscripten_glShaderSource=_glShaderSource;function _glStencilFunc(x0,x1,x2){GLctx.stencilFunc(x0,x1,x2)}var _emscripten_glStencilFunc=_glStencilFunc;function _glStencilFuncSeparate(x0,x1,x2,x3){GLctx.stencilFuncSeparate(x0,x1,x2,x3)}var _emscripten_glStencilFuncSeparate=_glStencilFuncSeparate;function _glStencilMask(x0){GLctx.stencilMask(x0)}var _emscripten_glStencilMask=_glStencilMask;function _glStencilMaskSeparate(x0,x1){GLctx.stencilMaskSeparate(x0,x1)}var _emscripten_glStencilMaskSeparate=_glStencilMaskSeparate;function _glStencilOp(x0,x1,x2){GLctx.stencilOp(x0,x1,x2)}var _emscripten_glStencilOp=_glStencilOp;function _glStencilOpSeparate(x0,x1,x2,x3){GLctx.stencilOpSeparate(x0,x1,x2,x3)}var _emscripten_glStencilOpSeparate=_glStencilOpSeparate;function _glTexImage2D(target,level,internalFormat,width,height,border,format,type,pixels){if(true){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,null)}return}GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels?emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat):null)}var _emscripten_glTexImage2D=_glTexImage2D;function _glTexImage3D(target,level,internalFormat,width,height,depth,border,format,type,pixels){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texImage3D(target,level,internalFormat,width,height,depth,border,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texImage3D(target,level,internalFormat,width,height,depth,border,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx.texImage3D(target,level,internalFormat,width,height,depth,border,format,type,null)}}var _emscripten_glTexImage3D=_glTexImage3D;function _glTexParameterf(x0,x1,x2){GLctx.texParameterf(x0,x1,x2)}var _emscripten_glTexParameterf=_glTexParameterf;function _glTexParameterfv(target,pname,params){var param=HEAPF32[params>>2];GLctx.texParameterf(target,pname,param)}var _emscripten_glTexParameterfv=_glTexParameterfv;function _glTexParameteri(x0,x1,x2){GLctx.texParameteri(x0,x1,x2)}var _emscripten_glTexParameteri=_glTexParameteri;function _glTexParameteriv(target,pname,params){var param=HEAP32[params>>2];GLctx.texParameteri(target,pname,param)}var _emscripten_glTexParameteriv=_glTexParameteriv;function _glTexStorage2D(x0,x1,x2,x3,x4){GLctx.texStorage2D(x0,x1,x2,x3,x4)}var _emscripten_glTexStorage2D=_glTexStorage2D;function _glTexStorage3D(x0,x1,x2,x3,x4,x5){GLctx.texStorage3D(x0,x1,x2,x3,x4,x5)}var _emscripten_glTexStorage3D=_glTexStorage3D;function _glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels){if(true){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,null)}return}var pixelData=null;if(pixels)pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,0);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixelData)}var _emscripten_glTexSubImage2D=_glTexSubImage2D;function _glTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx.texSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,null)}}var _emscripten_glTexSubImage3D=_glTexSubImage3D;function _glTransformFeedbackVaryings(program,count,varyings,bufferMode){program=GL.programs[program];var vars=[];for(var i=0;i>2]));GLctx.transformFeedbackVaryings(program,vars,bufferMode)}var _emscripten_glTransformFeedbackVaryings=_glTransformFeedbackVaryings;function _glUniform1f(location,v0){GLctx.uniform1f(webglGetUniformLocation(location),v0)}var _emscripten_glUniform1f=_glUniform1f;function _glUniform1fv(location,count,value){count&&GLctx.uniform1fv(webglGetUniformLocation(location),HEAPF32,value>>2,count)}var _emscripten_glUniform1fv=_glUniform1fv;function _glUniform1i(location,v0){GLctx.uniform1i(webglGetUniformLocation(location),v0)}var _emscripten_glUniform1i=_glUniform1i;function _glUniform1iv(location,count,value){count&&GLctx.uniform1iv(webglGetUniformLocation(location),HEAP32,value>>2,count)}var _emscripten_glUniform1iv=_glUniform1iv;function _glUniform1ui(location,v0){GLctx.uniform1ui(webglGetUniformLocation(location),v0)}var _emscripten_glUniform1ui=_glUniform1ui;function _glUniform1uiv(location,count,value){count&&GLctx.uniform1uiv(webglGetUniformLocation(location),HEAPU32,value>>2,count)}var _emscripten_glUniform1uiv=_glUniform1uiv;function _glUniform2f(location,v0,v1){GLctx.uniform2f(webglGetUniformLocation(location),v0,v1)}var _emscripten_glUniform2f=_glUniform2f;function _glUniform2fv(location,count,value){count&&GLctx.uniform2fv(webglGetUniformLocation(location),HEAPF32,value>>2,count*2)}var _emscripten_glUniform2fv=_glUniform2fv;function _glUniform2i(location,v0,v1){GLctx.uniform2i(webglGetUniformLocation(location),v0,v1)}var _emscripten_glUniform2i=_glUniform2i;function _glUniform2iv(location,count,value){count&&GLctx.uniform2iv(webglGetUniformLocation(location),HEAP32,value>>2,count*2)}var _emscripten_glUniform2iv=_glUniform2iv;function _glUniform2ui(location,v0,v1){GLctx.uniform2ui(webglGetUniformLocation(location),v0,v1)}var _emscripten_glUniform2ui=_glUniform2ui;function _glUniform2uiv(location,count,value){count&&GLctx.uniform2uiv(webglGetUniformLocation(location),HEAPU32,value>>2,count*2)}var _emscripten_glUniform2uiv=_glUniform2uiv;function _glUniform3f(location,v0,v1,v2){GLctx.uniform3f(webglGetUniformLocation(location),v0,v1,v2)}var _emscripten_glUniform3f=_glUniform3f;function _glUniform3fv(location,count,value){count&&GLctx.uniform3fv(webglGetUniformLocation(location),HEAPF32,value>>2,count*3)}var _emscripten_glUniform3fv=_glUniform3fv;function _glUniform3i(location,v0,v1,v2){GLctx.uniform3i(webglGetUniformLocation(location),v0,v1,v2)}var _emscripten_glUniform3i=_glUniform3i;function _glUniform3iv(location,count,value){count&&GLctx.uniform3iv(webglGetUniformLocation(location),HEAP32,value>>2,count*3)}var _emscripten_glUniform3iv=_glUniform3iv;function _glUniform3ui(location,v0,v1,v2){GLctx.uniform3ui(webglGetUniformLocation(location),v0,v1,v2)}var _emscripten_glUniform3ui=_glUniform3ui;function _glUniform3uiv(location,count,value){count&&GLctx.uniform3uiv(webglGetUniformLocation(location),HEAPU32,value>>2,count*3)}var _emscripten_glUniform3uiv=_glUniform3uiv;function _glUniform4f(location,v0,v1,v2,v3){GLctx.uniform4f(webglGetUniformLocation(location),v0,v1,v2,v3)}var _emscripten_glUniform4f=_glUniform4f;function _glUniform4fv(location,count,value){count&&GLctx.uniform4fv(webglGetUniformLocation(location),HEAPF32,value>>2,count*4)}var _emscripten_glUniform4fv=_glUniform4fv;function _glUniform4i(location,v0,v1,v2,v3){GLctx.uniform4i(webglGetUniformLocation(location),v0,v1,v2,v3)}var _emscripten_glUniform4i=_glUniform4i;function _glUniform4iv(location,count,value){count&&GLctx.uniform4iv(webglGetUniformLocation(location),HEAP32,value>>2,count*4)}var _emscripten_glUniform4iv=_glUniform4iv;function _glUniform4ui(location,v0,v1,v2,v3){GLctx.uniform4ui(webglGetUniformLocation(location),v0,v1,v2,v3)}var _emscripten_glUniform4ui=_glUniform4ui;function _glUniform4uiv(location,count,value){count&&GLctx.uniform4uiv(webglGetUniformLocation(location),HEAPU32,value>>2,count*4)}var _emscripten_glUniform4uiv=_glUniform4uiv;function _glUniformBlockBinding(program,uniformBlockIndex,uniformBlockBinding){program=GL.programs[program];GLctx.uniformBlockBinding(program,uniformBlockIndex,uniformBlockBinding)}var _emscripten_glUniformBlockBinding=_glUniformBlockBinding;function _glUniformMatrix2fv(location,count,transpose,value){count&&GLctx.uniformMatrix2fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*4)}var _emscripten_glUniformMatrix2fv=_glUniformMatrix2fv;function _glUniformMatrix2x3fv(location,count,transpose,value){count&&GLctx.uniformMatrix2x3fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*6)}var _emscripten_glUniformMatrix2x3fv=_glUniformMatrix2x3fv;function _glUniformMatrix2x4fv(location,count,transpose,value){count&&GLctx.uniformMatrix2x4fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*8)}var _emscripten_glUniformMatrix2x4fv=_glUniformMatrix2x4fv;function _glUniformMatrix3fv(location,count,transpose,value){count&&GLctx.uniformMatrix3fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*9)}var _emscripten_glUniformMatrix3fv=_glUniformMatrix3fv;function _glUniformMatrix3x2fv(location,count,transpose,value){count&&GLctx.uniformMatrix3x2fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*6)}var _emscripten_glUniformMatrix3x2fv=_glUniformMatrix3x2fv;function _glUniformMatrix3x4fv(location,count,transpose,value){count&&GLctx.uniformMatrix3x4fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*12)}var _emscripten_glUniformMatrix3x4fv=_glUniformMatrix3x4fv;function _glUniformMatrix4fv(location,count,transpose,value){count&&GLctx.uniformMatrix4fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*16)}var _emscripten_glUniformMatrix4fv=_glUniformMatrix4fv;function _glUniformMatrix4x2fv(location,count,transpose,value){count&&GLctx.uniformMatrix4x2fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*8)}var _emscripten_glUniformMatrix4x2fv=_glUniformMatrix4x2fv;function _glUniformMatrix4x3fv(location,count,transpose,value){count&&GLctx.uniformMatrix4x3fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*12)}var _emscripten_glUniformMatrix4x3fv=_glUniformMatrix4x3fv;function _glUnmapBuffer(target){if(!emscriptenWebGLValidateMapBufferTarget(target)){GL.recordError(1280);err("GL_INVALID_ENUM in glUnmapBuffer");return 0}var buffer=emscriptenWebGLGetBufferBinding(target);var mapping=GL.mappedBuffers[buffer];if(!mapping){GL.recordError(1282);err("buffer was never mapped in glUnmapBuffer");return 0}GL.mappedBuffers[buffer]=null;if(!(mapping.access&16))if(true){GLctx.bufferSubData(target,mapping.offset,HEAPU8,mapping.mem,mapping.length)}else{GLctx.bufferSubData(target,mapping.offset,HEAPU8.subarray(mapping.mem,mapping.mem+mapping.length))}_free(mapping.mem);return 1}var _emscripten_glUnmapBuffer=_glUnmapBuffer;function _glUseProgram(program){program=GL.programs[program];GLctx.useProgram(program);GLctx.currentProgram=program}var _emscripten_glUseProgram=_glUseProgram;function _glValidateProgram(program){GLctx.validateProgram(GL.programs[program])}var _emscripten_glValidateProgram=_glValidateProgram;function _glVertexAttrib1f(x0,x1){GLctx.vertexAttrib1f(x0,x1)}var _emscripten_glVertexAttrib1f=_glVertexAttrib1f;function _glVertexAttrib1fv(index,v){GLctx.vertexAttrib1f(index,HEAPF32[v>>2])}var _emscripten_glVertexAttrib1fv=_glVertexAttrib1fv;function _glVertexAttrib2f(x0,x1,x2){GLctx.vertexAttrib2f(x0,x1,x2)}var _emscripten_glVertexAttrib2f=_glVertexAttrib2f;function _glVertexAttrib2fv(index,v){GLctx.vertexAttrib2f(index,HEAPF32[v>>2],HEAPF32[v+4>>2])}var _emscripten_glVertexAttrib2fv=_glVertexAttrib2fv;function _glVertexAttrib3f(x0,x1,x2,x3){GLctx.vertexAttrib3f(x0,x1,x2,x3)}var _emscripten_glVertexAttrib3f=_glVertexAttrib3f;function _glVertexAttrib3fv(index,v){GLctx.vertexAttrib3f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2])}var _emscripten_glVertexAttrib3fv=_glVertexAttrib3fv;function _glVertexAttrib4f(x0,x1,x2,x3,x4){GLctx.vertexAttrib4f(x0,x1,x2,x3,x4)}var _emscripten_glVertexAttrib4f=_glVertexAttrib4f;function _glVertexAttrib4fv(index,v){GLctx.vertexAttrib4f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2],HEAPF32[v+12>>2])}var _emscripten_glVertexAttrib4fv=_glVertexAttrib4fv;function _glVertexAttribDivisor(index,divisor){GLctx.vertexAttribDivisor(index,divisor)}var _emscripten_glVertexAttribDivisor=_glVertexAttribDivisor;var _glVertexAttribDivisorANGLE=_glVertexAttribDivisor;var _emscripten_glVertexAttribDivisorANGLE=_glVertexAttribDivisorANGLE;var _glVertexAttribDivisorARB=_glVertexAttribDivisor;var _emscripten_glVertexAttribDivisorARB=_glVertexAttribDivisorARB;var _glVertexAttribDivisorEXT=_glVertexAttribDivisor;var _emscripten_glVertexAttribDivisorEXT=_glVertexAttribDivisorEXT;var _glVertexAttribDivisorNV=_glVertexAttribDivisor;var _emscripten_glVertexAttribDivisorNV=_glVertexAttribDivisorNV;function _glVertexAttribI4i(x0,x1,x2,x3,x4){GLctx.vertexAttribI4i(x0,x1,x2,x3,x4)}var _emscripten_glVertexAttribI4i=_glVertexAttribI4i;function _glVertexAttribI4iv(index,v){GLctx.vertexAttribI4i(index,HEAP32[v>>2],HEAP32[v+4>>2],HEAP32[v+8>>2],HEAP32[v+12>>2])}var _emscripten_glVertexAttribI4iv=_glVertexAttribI4iv;function _glVertexAttribI4ui(x0,x1,x2,x3,x4){GLctx.vertexAttribI4ui(x0,x1,x2,x3,x4)}var _emscripten_glVertexAttribI4ui=_glVertexAttribI4ui;function _glVertexAttribI4uiv(index,v){GLctx.vertexAttribI4ui(index,HEAPU32[v>>2],HEAPU32[v+4>>2],HEAPU32[v+8>>2],HEAPU32[v+12>>2])}var _emscripten_glVertexAttribI4uiv=_glVertexAttribI4uiv;function _glVertexAttribIPointer(index,size,type,stride,ptr){var cb=GL.currentContext.clientBuffers[index];if(!GLctx.currentArrayBufferBinding){cb.size=size;cb.type=type;cb.normalized=false;cb.stride=stride;cb.ptr=ptr;cb.clientside=true;cb.vertexAttribPointerAdaptor=function(index,size,type,normalized,stride,ptr){this.vertexAttribIPointer(index,size,type,stride,ptr)};return}cb.clientside=false;GLctx.vertexAttribIPointer(index,size,type,stride,ptr)}var _emscripten_glVertexAttribIPointer=_glVertexAttribIPointer;function _glVertexAttribPointer(index,size,type,normalized,stride,ptr){var cb=GL.currentContext.clientBuffers[index];if(!GLctx.currentArrayBufferBinding){cb.size=size;cb.type=type;cb.normalized=normalized;cb.stride=stride;cb.ptr=ptr;cb.clientside=true;cb.vertexAttribPointerAdaptor=function(index,size,type,normalized,stride,ptr){this.vertexAttribPointer(index,size,type,normalized,stride,ptr)};return}cb.clientside=false;GLctx.vertexAttribPointer(index,size,type,!!normalized,stride,ptr)}var _emscripten_glVertexAttribPointer=_glVertexAttribPointer;function _glViewport(x0,x1,x2,x3){GLctx.viewport(x0,x1,x2,x3)}var _emscripten_glViewport=_glViewport;function _glWaitSync(sync,flags,timeout_low,timeout_high){var timeout=convertI32PairToI53(timeout_low,timeout_high);GLctx.waitSync(GL.syncs[sync],flags,timeout)}var _emscripten_glWaitSync=_glWaitSync;function _emscripten_memcpy_big(dest,src,num){HEAPU8.copyWithin(dest,src,src+num)}function _emscripten_resize_heap(requestedSize){var oldSize=HEAPU8.length;requestedSize=requestedSize>>>0;return false}function _emscripten_set_element_css_size(target,width,height){target=findEventTarget(target);if(!target)return-4;target.style.width=width+"px";target.style.height=height+"px";return 0}function handleException(e){if(e instanceof ExitStatus||e=="unwind"){return EXITSTATUS}quit_(1,e)}function _proc_exit(code){EXITSTATUS=code;if(!keepRuntimeAlive()){if(Module["onExit"])Module["onExit"](code);ABORT=true}quit_(code,new ExitStatus(code))}function exitJS(status,implicit){EXITSTATUS=status;_proc_exit(status)}var _exit=exitJS;function maybeExit(){if(!keepRuntimeAlive()){try{_exit(EXITSTATUS)}catch(e){handleException(e)}}}function callUserCallback(func){if(ABORT){return}try{func();maybeExit()}catch(e){handleException(e)}}function safeSetTimeout(func,timeout){return setTimeout(()=>{callUserCallback(func)},timeout)}var Browser={mainLoop:{running:false,scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null;Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var timingMode=Browser.mainLoop.timingMode;var timingValue=Browser.mainLoop.timingValue;var func=Browser.mainLoop.func;Browser.mainLoop.func=null;setMainLoop(func,0,false,Browser.mainLoop.arg,true);_emscripten_set_main_loop_timing(timingMode,timingValue);Browser.mainLoop.scheduler()},updateStatus:function(){if(Module["setStatus"]){var message=Module["statusMessage"]||"Please wait...";var remaining=Browser.mainLoop.remainingBlockers;var expected=Browser.mainLoop.expectedBlockers;if(remaining){if(remaining{assert(img.complete,"Image "+name+" could not be decoded");var canvas=document.createElement("canvas");canvas.width=img.width;canvas.height=img.height;var ctx=canvas.getContext("2d");ctx.drawImage(img,0,0);preloadedImages[name]=canvas;URL.revokeObjectURL(url);if(onload)onload(byteArray)};img.onerror=event=>{out("Image "+url+" could not be decoded");if(onerror)onerror()};img.src=url};preloadPlugins.push(imagePlugin);var audioPlugin={};audioPlugin["canHandle"]=function audioPlugin_canHandle(name){return!Module.noAudioDecoding&&name.substr(-4)in{".ogg":1,".wav":1,".mp3":1}};audioPlugin["handle"]=function audioPlugin_handle(byteArray,name,onload,onerror){var done=false;function finish(audio){if(done)return;done=true;preloadedAudios[name]=audio;if(onload)onload(byteArray)}var b=new Blob([byteArray],{type:Browser.getMimetype(name)});var url=URL.createObjectURL(b);var audio=new Audio;audio.addEventListener("canplaythrough",()=>finish(audio),false);audio.onerror=function audio_onerror(event){if(done)return;err("warning: browser could not fully decode audio "+name+", trying slower base64 approach");function encode64(data){var BASE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var PAD="=";var ret="";var leftchar=0;var leftbits=0;for(var i=0;i=6){var curr=leftchar>>leftbits-6&63;leftbits-=6;ret+=BASE[curr]}}if(leftbits==2){ret+=BASE[(leftchar&3)<<4];ret+=PAD+PAD}else if(leftbits==4){ret+=BASE[(leftchar&15)<<2];ret+=PAD}return ret}audio.src="data:audio/x-"+name.substr(-3)+";base64,"+encode64(byteArray);finish(audio)};audio.src=url;safeSetTimeout(()=>{finish(audio)},1e4)};preloadPlugins.push(audioPlugin);function pointerLockChange(){Browser.pointerLock=document["pointerLockElement"]===Module["canvas"]||document["mozPointerLockElement"]===Module["canvas"]||document["webkitPointerLockElement"]===Module["canvas"]||document["msPointerLockElement"]===Module["canvas"]}var canvas=Module["canvas"];if(canvas){canvas.requestPointerLock=canvas["requestPointerLock"]||canvas["mozRequestPointerLock"]||canvas["webkitRequestPointerLock"]||canvas["msRequestPointerLock"]||(()=>{});canvas.exitPointerLock=document["exitPointerLock"]||document["mozExitPointerLock"]||document["webkitExitPointerLock"]||document["msExitPointerLock"]||(()=>{});canvas.exitPointerLock=canvas.exitPointerLock.bind(document);document.addEventListener("pointerlockchange",pointerLockChange,false);document.addEventListener("mozpointerlockchange",pointerLockChange,false);document.addEventListener("webkitpointerlockchange",pointerLockChange,false);document.addEventListener("mspointerlockchange",pointerLockChange,false);if(Module["elementPointerLock"]){canvas.addEventListener("click",ev=>{if(!Browser.pointerLock&&Module["canvas"].requestPointerLock){Module["canvas"].requestPointerLock();ev.preventDefault()}},false)}}},createContext:function(canvas,useWebGL,setInModule,webGLContextAttributes){if(useWebGL&&Module.ctx&&canvas==Module.canvas)return Module.ctx;var ctx;var contextHandle;if(useWebGL){var contextAttributes={antialias:false,alpha:false,majorVersion:2};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute]}}if(typeof GL!="undefined"){contextHandle=GL.createContext(canvas,contextAttributes);if(contextHandle){ctx=GL.getContext(contextHandle).GLctx}}}else{ctx=canvas.getContext("2d")}if(!ctx)return null;if(setInModule){if(!useWebGL)assert(typeof GLctx=="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it");Module.ctx=ctx;if(useWebGL)GL.makeContextCurrent(contextHandle);Module.useWebGL=useWebGL;Browser.moduleContextCreatedCallbacks.forEach(callback=>callback());Browser.init()}return ctx},destroyContext:function(canvas,useWebGL,setInModule){},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen:function(lockPointer,resizeCanvas){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;if(typeof Browser.lockPointer=="undefined")Browser.lockPointer=true;if(typeof Browser.resizeCanvas=="undefined")Browser.resizeCanvas=false;var canvas=Module["canvas"];function fullscreenChange(){Browser.isFullscreen=false;var canvasContainer=canvas.parentNode;if((document["fullscreenElement"]||document["mozFullScreenElement"]||document["msFullscreenElement"]||document["webkitFullscreenElement"]||document["webkitCurrentFullScreenElement"])===canvasContainer){canvas.exitFullscreen=Browser.exitFullscreen;if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullscreen=true;if(Browser.resizeCanvas){Browser.setFullscreenCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas){Browser.setWindowedCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}if(Module["onFullScreen"])Module["onFullScreen"](Browser.isFullscreen);if(Module["onFullscreen"])Module["onFullscreen"](Browser.isFullscreen)}if(!Browser.fullscreenHandlersInstalled){Browser.fullscreenHandlersInstalled=true;document.addEventListener("fullscreenchange",fullscreenChange,false);document.addEventListener("mozfullscreenchange",fullscreenChange,false);document.addEventListener("webkitfullscreenchange",fullscreenChange,false);document.addEventListener("MSFullscreenChange",fullscreenChange,false)}var canvasContainer=document.createElement("div");canvas.parentNode.insertBefore(canvasContainer,canvas);canvasContainer.appendChild(canvas);canvasContainer.requestFullscreen=canvasContainer["requestFullscreen"]||canvasContainer["mozRequestFullScreen"]||canvasContainer["msRequestFullscreen"]||(canvasContainer["webkitRequestFullscreen"]?()=>canvasContainer["webkitRequestFullscreen"](Element["ALLOW_KEYBOARD_INPUT"]):null)||(canvasContainer["webkitRequestFullScreen"]?()=>canvasContainer["webkitRequestFullScreen"](Element["ALLOW_KEYBOARD_INPUT"]):null);canvasContainer.requestFullscreen()},exitFullscreen:function(){if(!Browser.isFullscreen){return false}var CFS=document["exitFullscreen"]||document["cancelFullScreen"]||document["mozCancelFullScreen"]||document["msExitFullscreen"]||document["webkitCancelFullScreen"]||(()=>{});CFS.apply(document,[]);return true},nextRAF:0,fakeRequestAnimationFrame:function(func){var now=Date.now();if(Browser.nextRAF===0){Browser.nextRAF=now+1e3/60}else{while(now+2>=Browser.nextRAF){Browser.nextRAF+=1e3/60}}var delay=Math.max(Browser.nextRAF-now,0);setTimeout(func,delay)},requestAnimationFrame:function(func){if(typeof requestAnimationFrame=="function"){requestAnimationFrame(func);return}var RAF=Browser.fakeRequestAnimationFrame;RAF(func)},safeSetTimeout:function(func,timeout){return safeSetTimeout(func,timeout)},safeRequestAnimationFrame:function(func){return Browser.requestAnimationFrame(()=>{callUserCallback(func)})},getMimetype:function(name){return{"jpg":"image/jpeg","jpeg":"image/jpeg","png":"image/png","bmp":"image/bmp","ogg":"audio/ogg","wav":"audio/wav","mp3":"audio/mpeg"}[name.substr(name.lastIndexOf(".")+1)]},getUserMedia:function(func){if(!window.getUserMedia){window.getUserMedia=navigator["getUserMedia"]||navigator["mozGetUserMedia"]}window.getUserMedia(func)},getMovementX:function(event){return event["movementX"]||event["mozMovementX"]||event["webkitMovementX"]||0},getMovementY:function(event){return event["movementY"]||event["mozMovementY"]||event["webkitMovementY"]||0},getMouseWheelDelta:function(event){var delta=0;switch(event.type){case"DOMMouseScroll":delta=event.detail/3;break;case"mousewheel":delta=event.wheelDelta/120;break;case"wheel":delta=event.deltaY;switch(event.deltaMode){case 0:delta/=100;break;case 1:delta/=3;break;case 2:delta*=80;break;default:throw"unrecognized mouse wheel delta mode: "+event.deltaMode}break;default:throw"unrecognized mouse wheel event: "+event.type}return delta},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(event){if(Browser.pointerLock){if(event.type!="mousemove"&&"mozMovementX"in event){Browser.mouseMovementX=Browser.mouseMovementY=0}else{Browser.mouseMovementX=Browser.getMovementX(event);Browser.mouseMovementY=Browser.getMovementY(event)}if(typeof SDL!="undefined"){Browser.mouseX=SDL.mouseX+Browser.mouseMovementX;Browser.mouseY=SDL.mouseY+Browser.mouseMovementY}else{Browser.mouseX+=Browser.mouseMovementX;Browser.mouseY+=Browser.mouseMovementY}}else{var rect=Module["canvas"].getBoundingClientRect();var cw=Module["canvas"].width;var ch=Module["canvas"].height;var scrollX=typeof window.scrollX!="undefined"?window.scrollX:window.pageXOffset;var scrollY=typeof window.scrollY!="undefined"?window.scrollY:window.pageYOffset;if(event.type==="touchstart"||event.type==="touchend"||event.type==="touchmove"){var touch=event.touch;if(touch===undefined){return}var adjustedX=touch.pageX-(scrollX+rect.left);var adjustedY=touch.pageY-(scrollY+rect.top);adjustedX=adjustedX*(cw/rect.width);adjustedY=adjustedY*(ch/rect.height);var coords={x:adjustedX,y:adjustedY};if(event.type==="touchstart"){Browser.lastTouches[touch.identifier]=coords;Browser.touches[touch.identifier]=coords}else if(event.type==="touchend"||event.type==="touchmove"){var last=Browser.touches[touch.identifier];if(!last)last=coords;Browser.lastTouches[touch.identifier]=last;Browser.touches[touch.identifier]=coords}return}var x=event.pageX-(scrollX+rect.left);var y=event.pageY-(scrollY+rect.top);x=x*(cw/rect.width);y=y*(ch/rect.height);Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y}},resizeListeners:[],updateResizeListeners:function(){var canvas=Module["canvas"];Browser.resizeListeners.forEach(listener=>listener(canvas.width,canvas.height))},setCanvasSize:function(width,height,noUpdates){var canvas=Module["canvas"];Browser.updateCanvasDimensions(canvas,width,height);if(!noUpdates)Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>2];flags=flags|8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>2];flags=flags&~8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},updateCanvasDimensions:function(canvas,wNative,hNative){if(wNative&&hNative){canvas.widthNative=wNative;canvas.heightNative=hNative}else{wNative=canvas.widthNative;hNative=canvas.heightNative}var w=wNative;var h=hNative;if(Module["forcedAspectRatio"]&&Module["forcedAspectRatio"]>0){if(w/h{if(event.data===emscriptenMainLoopMessageId||event.data.target===emscriptenMainLoopMessageId){event.stopPropagation();setImmediates.shift()()}};addEventListener("message",Browser_setImmediate_messageHandler,true);setImmediate=function Browser_emulated_setImmediate(func){setImmediates.push(func);if(ENVIRONMENT_IS_WORKER){if(Module["setImmediates"]===undefined)Module["setImmediates"]=[];Module["setImmediates"].push(func);postMessage({target:emscriptenMainLoopMessageId})}else postMessage(emscriptenMainLoopMessageId,"*")}}Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setImmediate(){setImmediate(Browser.mainLoop.runner)};Browser.mainLoop.method="immediate"}return 0}function setMainLoop(browserIterationFunc,fps,simulateInfiniteLoop,arg,noSetTiming){assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.");Browser.mainLoop.func=browserIterationFunc;Browser.mainLoop.arg=arg;var thisMainLoopId=Browser.mainLoop.currentlyRunningMainloop;function checkIsRunning(){if(thisMainLoopId0){var start=Date.now();var blocker=Browser.mainLoop.queue.shift();blocker.func(blocker.arg);if(Browser.mainLoop.remainingBlockers){var remaining=Browser.mainLoop.remainingBlockers;var next=remaining%1==0?remaining-1:Math.floor(remaining);if(blocker.counted){Browser.mainLoop.remainingBlockers=next}else{next=next+.5;Browser.mainLoop.remainingBlockers=(8*remaining+next)/9}}out('main loop blocker "'+blocker.name+'" took '+(Date.now()-start)+" ms");Browser.mainLoop.updateStatus();if(!checkIsRunning())return;setTimeout(Browser.mainLoop.runner,0);return}if(!checkIsRunning())return;Browser.mainLoop.currentFrameNumber=Browser.mainLoop.currentFrameNumber+1|0;if(Browser.mainLoop.timingMode==1&&Browser.mainLoop.timingValue>1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else if(Browser.mainLoop.timingMode==0){Browser.mainLoop.tickStartTime=_emscripten_get_now()}GL.newRenderingFrameStarted();Browser.mainLoop.runIter(browserIterationFunc);if(!checkIsRunning())return;if(typeof SDL=="object"&&SDL.audio&&SDL.audio.queueNewAudioData)SDL.audio.queueNewAudioData();Browser.mainLoop.scheduler()};if(!noSetTiming){if(fps&&fps>0){_emscripten_set_main_loop_timing(0,1e3/fps)}else{_emscripten_set_main_loop_timing(1,1)}Browser.mainLoop.scheduler()}if(simulateInfiniteLoop){throw"unwind"}}function _emscripten_set_main_loop(func,fps,simulateInfiniteLoop){var browserIterationFunc=getWasmTableEntry(func);setMainLoop(browserIterationFunc,fps,simulateInfiniteLoop)}var ENV={};function getExecutableName(){return thisProgram||"./this.program"}function getEnvStrings(){if(!getEnvStrings.strings){var lang=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8";var env={"USER":"web_user","LOGNAME":"web_user","PATH":"/","PWD":"/","HOME":"/home/web_user","LANG":lang,"_":getExecutableName()};for(var x in ENV){if(ENV[x]===undefined)delete env[x];else env[x]=ENV[x]}var strings=[];for(var x in env){strings.push(`${x}=${env[x]}`)}getEnvStrings.strings=strings}return getEnvStrings.strings}function stringToAscii(str,buffer){for(var i=0;i>0]=str.charCodeAt(i)}HEAP8[buffer>>0]=0}function _environ_get(__environ,environ_buf){var bufSize=0;getEnvStrings().forEach(function(string,i){var ptr=environ_buf+bufSize;HEAPU32[__environ+i*4>>2]=ptr;stringToAscii(string,ptr);bufSize+=string.length+1});return 0}function _environ_sizes_get(penviron_count,penviron_buf_size){var strings=getEnvStrings();HEAPU32[penviron_count>>2]=strings.length;var bufSize=0;strings.forEach(function(string){bufSize+=string.length+1});HEAPU32[penviron_buf_size>>2]=bufSize;return 0}function _fd_close(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);FS.close(stream);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function doReadv(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function doWritev(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(typeof offset!=="undefined"){offset+=curr}}return ret}function _fd_write(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=doWritev(stream,iov,iovcnt);HEAPU32[pnum>>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _getentropy(buffer,size){randomFill(HEAPU8.subarray(buffer,buffer+size));return 0}function GLFW_Window(id,width,height,title,monitor,share){this.id=id;this.x=0;this.y=0;this.fullscreen=false;this.storedX=0;this.storedY=0;this.width=width;this.height=height;this.storedWidth=width;this.storedHeight=height;this.title=title;this.monitor=monitor;this.share=share;this.attributes=GLFW.hints;this.inputModes={208897:212993,208898:0,208899:0};this.buttons=0;this.keys=new Array;this.domKeys=new Array;this.shouldClose=0;this.title=null;this.windowPosFunc=null;this.windowSizeFunc=null;this.windowCloseFunc=null;this.windowRefreshFunc=null;this.windowFocusFunc=null;this.windowIconifyFunc=null;this.windowMaximizeFunc=null;this.framebufferSizeFunc=null;this.windowContentScaleFunc=null;this.mouseButtonFunc=null;this.cursorPosFunc=null;this.cursorEnterFunc=null;this.scrollFunc=null;this.dropFunc=null;this.keyFunc=null;this.charFunc=null;this.userptr=null}var GLFW={WindowFromId:function(id){if(id<=0||!GLFW.windows)return null;return GLFW.windows[id-1]},joystickFunc:null,errorFunc:null,monitorFunc:null,active:null,scale:null,windows:null,monitors:null,monitorString:null,versionString:null,initialTime:null,extensions:null,hints:null,defaultHints:{131073:0,131074:0,131075:1,131076:1,131077:1,131082:0,135169:8,135170:8,135171:8,135172:8,135173:24,135174:8,135175:0,135176:0,135177:0,135178:0,135179:0,135180:0,135181:0,135182:0,135183:0,139265:196609,139266:1,139267:0,139268:0,139269:0,139270:0,139271:0,139272:0,139276:0},DOMToGLFWKeyCode:function(keycode){switch(keycode){case 32:return 32;case 222:return 39;case 188:return 44;case 173:return 45;case 189:return 45;case 190:return 46;case 191:return 47;case 48:return 48;case 49:return 49;case 50:return 50;case 51:return 51;case 52:return 52;case 53:return 53;case 54:return 54;case 55:return 55;case 56:return 56;case 57:return 57;case 59:return 59;case 61:return 61;case 187:return 61;case 65:return 65;case 66:return 66;case 67:return 67;case 68:return 68;case 69:return 69;case 70:return 70;case 71:return 71;case 72:return 72;case 73:return 73;case 74:return 74;case 75:return 75;case 76:return 76;case 77:return 77;case 78:return 78;case 79:return 79;case 80:return 80;case 81:return 81;case 82:return 82;case 83:return 83;case 84:return 84;case 85:return 85;case 86:return 86;case 87:return 87;case 88:return 88;case 89:return 89;case 90:return 90;case 219:return 91;case 220:return 92;case 221:return 93;case 192:return 96;case 27:return 256;case 13:return 257;case 9:return 258;case 8:return 259;case 45:return 260;case 46:return 261;case 39:return 262;case 37:return 263;case 40:return 264;case 38:return 265;case 33:return 266;case 34:return 267;case 36:return 268;case 35:return 269;case 20:return 280;case 145:return 281;case 144:return 282;case 44:return 283;case 19:return 284;case 112:return 290;case 113:return 291;case 114:return 292;case 115:return 293;case 116:return 294;case 117:return 295;case 118:return 296;case 119:return 297;case 120:return 298;case 121:return 299;case 122:return 300;case 123:return 301;case 124:return 302;case 125:return 303;case 126:return 304;case 127:return 305;case 128:return 306;case 129:return 307;case 130:return 308;case 131:return 309;case 132:return 310;case 133:return 311;case 134:return 312;case 135:return 313;case 136:return 314;case 96:return 320;case 97:return 321;case 98:return 322;case 99:return 323;case 100:return 324;case 101:return 325;case 102:return 326;case 103:return 327;case 104:return 328;case 105:return 329;case 110:return 330;case 111:return 331;case 106:return 332;case 109:return 333;case 107:return 334;case 16:return 340;case 17:return 341;case 18:return 342;case 91:return 343;case 93:return 348;default:return-1}},getModBits:function(win){var mod=0;if(win.keys[340])mod|=1;if(win.keys[341])mod|=2;if(win.keys[342])mod|=4;if(win.keys[343])mod|=8;return mod},onKeyPress:function(event){if(!GLFW.active||!GLFW.active.charFunc)return;if(event.ctrlKey||event.metaKey)return;var charCode=event.charCode;if(charCode==0||charCode>=0&&charCode<=31)return;getWasmTableEntry(GLFW.active.charFunc)(GLFW.active.id,charCode)},onKeyChanged:function(keyCode,status){if(!GLFW.active)return;var key=GLFW.DOMToGLFWKeyCode(keyCode);if(key==-1)return;var repeat=status&&GLFW.active.keys[key];GLFW.active.keys[key]=status;GLFW.active.domKeys[keyCode]=status;if(GLFW.active.keyFunc){if(repeat)status=2;getWasmTableEntry(GLFW.active.keyFunc)(GLFW.active.id,key,keyCode,status,GLFW.getModBits(GLFW.active))}},onGamepadConnected:function(event){GLFW.refreshJoysticks()},onGamepadDisconnected:function(event){GLFW.refreshJoysticks()},onKeydown:function(event){GLFW.onKeyChanged(event.keyCode,1);if(event.keyCode===8||event.keyCode===9){event.preventDefault()}},onKeyup:function(event){GLFW.onKeyChanged(event.keyCode,0)},onBlur:function(event){if(!GLFW.active)return;for(var i=0;i0){if(eventButton==1){eventButton=2}else{eventButton=1}}return eventButton},onMouseenter:function(event){if(!GLFW.active)return;if(event.target!=Module["canvas"])return;if(GLFW.active.cursorEnterFunc){getWasmTableEntry(GLFW.active.cursorEnterFunc)(GLFW.active.id,1)}},onMouseleave:function(event){if(!GLFW.active)return;if(event.target!=Module["canvas"])return;if(GLFW.active.cursorEnterFunc){getWasmTableEntry(GLFW.active.cursorEnterFunc)(GLFW.active.id,0)}},onMouseButtonChanged:function(event,status){if(!GLFW.active)return;Browser.calculateMouseEvent(event);if(event.target!=Module["canvas"])return;var eventButton=GLFW.DOMToGLFWMouseButton(event);if(status==1){GLFW.active.buttons|=1<0?Math.max(delta,1):Math.min(delta,-1);GLFW.wheelPos+=delta;if(!GLFW.active||!GLFW.active.scrollFunc||event.target!=Module["canvas"])return;var sx=0;var sy=delta;if(event.type=="mousewheel"){sx=event.wheelDeltaX}else{sx=event.deltaX}getWasmTableEntry(GLFW.active.scrollFunc)(GLFW.active.id,sx,sy);event.preventDefault()},onCanvasResize:function(width,height){if(!GLFW.active)return;var resizeNeeded=true;if(document["fullscreen"]||document["fullScreen"]||document["mozFullScreen"]||document["webkitIsFullScreen"]){GLFW.active.storedX=GLFW.active.x;GLFW.active.storedY=GLFW.active.y;GLFW.active.storedWidth=GLFW.active.width;GLFW.active.storedHeight=GLFW.active.height;GLFW.active.x=GLFW.active.y=0;GLFW.active.width=screen.width;GLFW.active.height=screen.height;GLFW.active.fullscreen=true}else if(GLFW.active.fullscreen==true){GLFW.active.x=GLFW.active.storedX;GLFW.active.y=GLFW.active.storedY;GLFW.active.width=GLFW.active.storedWidth;GLFW.active.height=GLFW.active.storedHeight;GLFW.active.fullscreen=false}else if(GLFW.active.width!=width||GLFW.active.height!=height){GLFW.active.width=width;GLFW.active.height=height}else{resizeNeeded=false}if(resizeNeeded){Browser.setCanvasSize(GLFW.active.width,GLFW.active.height,true);GLFW.onWindowSizeChanged();GLFW.onFramebufferSizeChanged()}},onWindowSizeChanged:function(){if(!GLFW.active)return;if(GLFW.active.windowSizeFunc){getWasmTableEntry(GLFW.active.windowSizeFunc)(GLFW.active.id,GLFW.active.width,GLFW.active.height)}},onFramebufferSizeChanged:function(){if(!GLFW.active)return;if(GLFW.active.framebufferSizeFunc){getWasmTableEntry(GLFW.active.framebufferSizeFunc)(GLFW.active.id,GLFW.active.width,GLFW.active.height)}},onWindowContentScaleChanged:function(scale){GLFW.scale=scale;if(!GLFW.active)return;if(GLFW.active.windowContentScaleFunc){getWasmTableEntry(GLFW.active.windowContentScaleFunc)(GLFW.active.id,GLFW.scale,GLFW.scale)}},getTime:function(){return _emscripten_get_now()/1e3},setWindowTitle:function(winid,title){var win=GLFW.WindowFromId(winid);if(!win)return;win.title=UTF8ToString(title);if(GLFW.active.id==win.id){document.title=win.title}},setJoystickCallback:function(cbfun){GLFW.joystickFunc=cbfun;GLFW.refreshJoysticks()},joys:{},lastGamepadState:[],lastGamepadStateFrame:null,refreshJoysticks:function(){if(Browser.mainLoop.currentFrameNumber!==GLFW.lastGamepadStateFrame||!Browser.mainLoop.currentFrameNumber){GLFW.lastGamepadState=navigator.getGamepads?navigator.getGamepads():navigator.webkitGetGamepads?navigator.webkitGetGamepads:[];GLFW.lastGamepadStateFrame=Browser.mainLoop.currentFrameNumber;for(var joy=0;joy>0]=gamepad.buttons[i].pressed}for(var i=0;i>2]=gamepad.axes[i]}}else{if(GLFW.joys[joy]){out("glfw joystick disconnected",joy);if(GLFW.joystickFunc){getWasmTableEntry(GLFW.joystickFunc)(joy,262146)}_free(GLFW.joys[joy].id);_free(GLFW.joys[joy].buttons);_free(GLFW.joys[joy].axes);delete GLFW.joys[joy]}}}}},setKeyCallback:function(winid,cbfun){var win=GLFW.WindowFromId(winid);if(!win)return null;var prevcbfun=win.keyFunc;win.keyFunc=cbfun;return prevcbfun},setCharCallback:function(winid,cbfun){var win=GLFW.WindowFromId(winid);if(!win)return null;var prevcbfun=win.charFunc;win.charFunc=cbfun;return prevcbfun},setMouseButtonCallback:function(winid,cbfun){var win=GLFW.WindowFromId(winid);if(!win)return null;var prevcbfun=win.mouseButtonFunc;win.mouseButtonFunc=cbfun;return prevcbfun},setCursorPosCallback:function(winid,cbfun){var win=GLFW.WindowFromId(winid);if(!win)return null;var prevcbfun=win.cursorPosFunc;win.cursorPosFunc=cbfun;return prevcbfun},setScrollCallback:function(winid,cbfun){var win=GLFW.WindowFromId(winid);if(!win)return null;var prevcbfun=win.scrollFunc;win.scrollFunc=cbfun;return prevcbfun},setDropCallback:function(winid,cbfun){var win=GLFW.WindowFromId(winid);if(!win)return null;var prevcbfun=win.dropFunc;win.dropFunc=cbfun;return prevcbfun},onDrop:function(event){if(!GLFW.active||!GLFW.active.dropFunc)return;if(!event.dataTransfer||!event.dataTransfer.files||event.dataTransfer.files.length==0)return;event.preventDefault();var filenames=_malloc(event.dataTransfer.files.length*4);var filenamesArray=[];var count=event.dataTransfer.files.length;var written=0;var drop_dir=".glfw_dropped_files";FS.createPath("/",drop_dir);function save(file){var path="/"+drop_dir+"/"+file.name.replace(/\//g,"_");var reader=new FileReader;reader.onloadend=e=>{if(reader.readyState!=2){++written;out("failed to read dropped file: "+file.name+": "+reader.error);return}var data=e.target.result;FS.writeFile(path,new Uint8Array(data));if(++written===count){getWasmTableEntry(GLFW.active.dropFunc)(GLFW.active.id,count,filenames);for(var i=0;i>2]=filename}for(var i=0;i0},getCursorPos:function(winid,x,y){HEAPF64[x>>3]=Browser.mouseX;HEAPF64[y>>3]=Browser.mouseY},getMousePos:function(winid,x,y){HEAP32[x>>2]=Browser.mouseX;HEAP32[y>>2]=Browser.mouseY},setCursorPos:function(winid,x,y){},getWindowPos:function(winid,x,y){var wx=0;var wy=0;var win=GLFW.WindowFromId(winid);if(win){wx=win.x;wy=win.y}if(x){HEAP32[x>>2]=wx}if(y){HEAP32[y>>2]=wy}},setWindowPos:function(winid,x,y){var win=GLFW.WindowFromId(winid);if(!win)return;win.x=x;win.y=y},getWindowSize:function(winid,width,height){var ww=0;var wh=0;var win=GLFW.WindowFromId(winid);if(win){ww=win.width;wh=win.height}if(width){HEAP32[width>>2]=ww}if(height){HEAP32[height>>2]=wh}},setWindowSize:function(winid,width,height){var win=GLFW.WindowFromId(winid);if(!win)return;if(GLFW.active.id==win.id){if(width==screen.width&&height==screen.height){Browser.requestFullscreen()}else{Browser.exitFullscreen();Browser.setCanvasSize(width,height);win.width=width;win.height=height}}if(win.windowSizeFunc){getWasmTableEntry(win.windowSizeFunc)(win.id,width,height)}},createWindow:function(width,height,title,monitor,share){var i,id;for(i=0;i0)throw"glfwCreateWindow only supports one window at time currently";id=i+1;if(width<=0||height<=0)return 0;if(monitor){Browser.requestFullscreen()}else{Browser.setCanvasSize(width,height)}for(i=0;i0;if(i==GLFW.windows.length){if(useWebGL){var contextAttributes={antialias:GLFW.hints[135181]>1,depth:GLFW.hints[135173]>0,stencil:GLFW.hints[135174]>0,alpha:GLFW.hints[135172]>0};Module.ctx=Browser.createContext(Module["canvas"],true,true,contextAttributes)}else{Browser.init()}}if(!Module.ctx&&useWebGL)return 0;var win=new GLFW_Window(id,width,height,title,monitor,share);if(id-1==GLFW.windows.length){GLFW.windows.push(win)}else{GLFW.windows[id-1]=win}GLFW.active=win;return win.id},destroyWindow:function(winid){var win=GLFW.WindowFromId(winid);if(!win)return;if(win.windowCloseFunc){getWasmTableEntry(win.windowCloseFunc)(win.id)}GLFW.windows[win.id-1]=null;if(GLFW.active.id==win.id)GLFW.active=null;for(var i=0;i>2]=ww}if(height){HEAP32[height>>2]=wh}}function _glfwGetTime(){return GLFW.getTime()-GLFW.initialTime}function _glfwGetWindowAttrib(winid,attrib){var win=GLFW.WindowFromId(winid);if(!win)return 0;return win.attributes[attrib]}function _glfwGetWindowUserPointer(winid){var win=GLFW.WindowFromId(winid);if(!win)return 0;return win.userptr}function _glfwInit(){if(GLFW.windows)return 1;GLFW.initialTime=GLFW.getTime();GLFW.hints=GLFW.defaultHints;GLFW.windows=new Array;GLFW.active=null;GLFW.scale=_emscripten_get_device_pixel_ratio();window.addEventListener("gamepadconnected",GLFW.onGamepadConnected,true);window.addEventListener("gamepaddisconnected",GLFW.onGamepadDisconnected,true);window.addEventListener("keydown",GLFW.onKeydown,true);window.addEventListener("keypress",GLFW.onKeyPress,true);window.addEventListener("keyup",GLFW.onKeyup,true);window.addEventListener("blur",GLFW.onBlur,true);(function updatePixelRatio(){window.matchMedia("(resolution: "+window.devicePixelRatio+"dppx)").addEventListener("change",updatePixelRatio,{once:true});GLFW.onWindowContentScaleChanged(_emscripten_get_device_pixel_ratio())})();Module["canvas"].addEventListener("touchmove",GLFW.onMousemove,true);Module["canvas"].addEventListener("touchstart",GLFW.onMouseButtonDown,true);Module["canvas"].addEventListener("touchcancel",GLFW.onMouseButtonUp,true);Module["canvas"].addEventListener("touchend",GLFW.onMouseButtonUp,true);Module["canvas"].addEventListener("mousemove",GLFW.onMousemove,true);Module["canvas"].addEventListener("mousedown",GLFW.onMouseButtonDown,true);Module["canvas"].addEventListener("mouseup",GLFW.onMouseButtonUp,true);Module["canvas"].addEventListener("wheel",GLFW.onMouseWheel,true);Module["canvas"].addEventListener("mousewheel",GLFW.onMouseWheel,true);Module["canvas"].addEventListener("mouseenter",GLFW.onMouseenter,true);Module["canvas"].addEventListener("mouseleave",GLFW.onMouseleave,true);Module["canvas"].addEventListener("drop",GLFW.onDrop,true);Module["canvas"].addEventListener("dragover",GLFW.onDragover,true);Browser.resizeListeners.push((width,height)=>{GLFW.onCanvasResize(width,height)});return 1}function _glfwMakeContextCurrent(winid){}function _glfwSetCharCallback(winid,cbfun){return GLFW.setCharCallback(winid,cbfun)}function _glfwSetClipboardString(win,string){}function _glfwSetCursor(winid,cursor){}function _glfwSetCursorEnterCallback(winid,cbfun){var win=GLFW.WindowFromId(winid);if(!win)return null;var prevcbfun=win.cursorEnterFunc;win.cursorEnterFunc=cbfun;return prevcbfun}function _glfwSetCursorPosCallback(winid,cbfun){return GLFW.setCursorPosCallback(winid,cbfun)}function _glfwSetDropCallback(winid,cbfun){return GLFW.setDropCallback(winid,cbfun)}function _glfwSetErrorCallback(cbfun){var prevcbfun=GLFW.errorFunc;GLFW.errorFunc=cbfun;return prevcbfun}function _glfwSetFramebufferSizeCallback(winid,cbfun){var win=GLFW.WindowFromId(winid);if(!win)return null;var prevcbfun=win.framebufferSizeFunc;win.framebufferSizeFunc=cbfun;return prevcbfun}function _glfwSetKeyCallback(winid,cbfun){return GLFW.setKeyCallback(winid,cbfun)}function _glfwSetMouseButtonCallback(winid,cbfun){return GLFW.setMouseButtonCallback(winid,cbfun)}function _glfwSetScrollCallback(winid,cbfun){return GLFW.setScrollCallback(winid,cbfun)}function _glfwSetWindowCloseCallback(winid,cbfun){return GLFW.setWindowCloseCallback(winid,cbfun)}function _glfwSetWindowFocusCallback(winid,cbfun){var win=GLFW.WindowFromId(winid);if(!win)return null;var prevcbfun=win.windowFocusFunc;win.windowFocusFunc=cbfun;return prevcbfun}function _glfwSetWindowIconifyCallback(winid,cbfun){var win=GLFW.WindowFromId(winid);if(!win)return null;var prevcbfun=win.windowIconifyFunc;win.windowIconifyFunc=cbfun;return prevcbfun}function _glfwSetWindowPosCallback(winid,cbfun){var win=GLFW.WindowFromId(winid);if(!win)return null;var prevcbfun=win.windowPosFunc;win.windowPosFunc=cbfun;return prevcbfun}function _glfwSetWindowRefreshCallback(winid,cbfun){return GLFW.setWindowRefreshCallback(winid,cbfun)}function _glfwSetWindowShouldClose(winid,value){var win=GLFW.WindowFromId(winid);if(!win)return;win.shouldClose=value}function _glfwSetWindowSize(winid,width,height){GLFW.setWindowSize(winid,width,height)}function _glfwSetWindowSizeCallback(winid,cbfun){return GLFW.setWindowSizeCallback(winid,cbfun)}function _glfwSetWindowUserPointer(winid,ptr){var win=GLFW.WindowFromId(winid);if(!win)return;win.userptr=ptr}function _glfwSwapBuffers(winid){GLFW.swapBuffers(winid)}function _glfwTerminate(){window.removeEventListener("gamepadconnected",GLFW.onGamepadConnected,true);window.removeEventListener("gamepaddisconnected",GLFW.onGamepadDisconnected,true);window.removeEventListener("keydown",GLFW.onKeydown,true);window.removeEventListener("keypress",GLFW.onKeyPress,true);window.removeEventListener("keyup",GLFW.onKeyup,true);window.removeEventListener("blur",GLFW.onBlur,true);Module["canvas"].removeEventListener("touchmove",GLFW.onMousemove,true);Module["canvas"].removeEventListener("touchstart",GLFW.onMouseButtonDown,true);Module["canvas"].removeEventListener("touchcancel",GLFW.onMouseButtonUp,true);Module["canvas"].removeEventListener("touchend",GLFW.onMouseButtonUp,true);Module["canvas"].removeEventListener("mousemove",GLFW.onMousemove,true);Module["canvas"].removeEventListener("mousedown",GLFW.onMouseButtonDown,true);Module["canvas"].removeEventListener("mouseup",GLFW.onMouseButtonUp,true);Module["canvas"].removeEventListener("wheel",GLFW.onMouseWheel,true);Module["canvas"].removeEventListener("mousewheel",GLFW.onMouseWheel,true);Module["canvas"].removeEventListener("mouseenter",GLFW.onMouseenter,true);Module["canvas"].removeEventListener("mouseleave",GLFW.onMouseleave,true);Module["canvas"].removeEventListener("drop",GLFW.onDrop,true);Module["canvas"].removeEventListener("dragover",GLFW.onDragover,true);Module["canvas"].width=Module["canvas"].height=1;GLFW.windows=null;GLFW.active=null}function _glfwWaitEventsTimeout(timeout){}function _glfwWindowHint(target,hint){GLFW.hints[target]=hint}function _llvm_eh_typeid_for(type){return type}function arraySum(array,index){var sum=0;for(var i=0;i<=index;sum+=array[i++]){}return sum}var MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];var MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function addDays(date,days){var newDate=new Date(date.getTime());while(days>0){var leap=isLeapYear(newDate.getFullYear());var currentMonth=newDate.getMonth();var daysInCurrentMonth=(leap?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR)[currentMonth];if(days>daysInCurrentMonth-newDate.getDate()){days-=daysInCurrentMonth-newDate.getDate()+1;newDate.setDate(1);if(currentMonth<11){newDate.setMonth(currentMonth+1)}else{newDate.setMonth(0);newDate.setFullYear(newDate.getFullYear()+1)}}else{newDate.setDate(newDate.getDate()+days);return newDate}}return newDate}function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}function _strftime(s,maxsize,format,tm){var tm_zone=HEAP32[tm+40>>2];var date={tm_sec:HEAP32[tm>>2],tm_min:HEAP32[tm+4>>2],tm_hour:HEAP32[tm+8>>2],tm_mday:HEAP32[tm+12>>2],tm_mon:HEAP32[tm+16>>2],tm_year:HEAP32[tm+20>>2],tm_wday:HEAP32[tm+24>>2],tm_yday:HEAP32[tm+28>>2],tm_isdst:HEAP32[tm+32>>2],tm_gmtoff:HEAP32[tm+36>>2],tm_zone:tm_zone?UTF8ToString(tm_zone):""};var pattern=UTF8ToString(format);var EXPANSION_RULES_1={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var rule in EXPANSION_RULES_1){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_1[rule])}var WEEKDAYS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];function leadingSomething(value,digits,character){var str=typeof value=="number"?value.toString():value||"";while(str.length0?1:0}var compare;if((compare=sgn(date1.getFullYear()-date2.getFullYear()))===0){if((compare=sgn(date1.getMonth()-date2.getMonth()))===0){compare=sgn(date1.getDate()-date2.getDate())}}return compare}function getFirstWeekStartDate(janFourth){switch(janFourth.getDay()){case 0:return new Date(janFourth.getFullYear()-1,11,29);case 1:return janFourth;case 2:return new Date(janFourth.getFullYear(),0,3);case 3:return new Date(janFourth.getFullYear(),0,2);case 4:return new Date(janFourth.getFullYear(),0,1);case 5:return new Date(janFourth.getFullYear()-1,11,31);case 6:return new Date(janFourth.getFullYear()-1,11,30)}}function getWeekBasedYear(date){var thisDate=addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);var janFourthThisYear=new Date(thisDate.getFullYear(),0,4);var janFourthNextYear=new Date(thisDate.getFullYear()+1,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);if(compareByDay(firstWeekStartThisYear,thisDate)<=0){if(compareByDay(firstWeekStartNextYear,thisDate)<=0){return thisDate.getFullYear()+1}return thisDate.getFullYear()}return thisDate.getFullYear()-1}var EXPANSION_RULES_2={"%a":function(date){return WEEKDAYS[date.tm_wday].substring(0,3)},"%A":function(date){return WEEKDAYS[date.tm_wday]},"%b":function(date){return MONTHS[date.tm_mon].substring(0,3)},"%B":function(date){return MONTHS[date.tm_mon]},"%C":function(date){var year=date.tm_year+1900;return leadingNulls(year/100|0,2)},"%d":function(date){return leadingNulls(date.tm_mday,2)},"%e":function(date){return leadingSomething(date.tm_mday,2," ")},"%g":function(date){return getWeekBasedYear(date).toString().substring(2)},"%G":function(date){return getWeekBasedYear(date)},"%H":function(date){return leadingNulls(date.tm_hour,2)},"%I":function(date){var twelveHour=date.tm_hour;if(twelveHour==0)twelveHour=12;else if(twelveHour>12)twelveHour-=12;return leadingNulls(twelveHour,2)},"%j":function(date){return leadingNulls(date.tm_mday+arraySum(isLeapYear(date.tm_year+1900)?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR,date.tm_mon-1),3)},"%m":function(date){return leadingNulls(date.tm_mon+1,2)},"%M":function(date){return leadingNulls(date.tm_min,2)},"%n":function(){return"\n"},"%p":function(date){if(date.tm_hour>=0&&date.tm_hour<12){return"AM"}return"PM"},"%S":function(date){return leadingNulls(date.tm_sec,2)},"%t":function(){return"\t"},"%u":function(date){return date.tm_wday||7},"%U":function(date){var days=date.tm_yday+7-date.tm_wday;return leadingNulls(Math.floor(days/7),2)},"%V":function(date){var val=Math.floor((date.tm_yday+7-(date.tm_wday+6)%7)/7);if((date.tm_wday+371-date.tm_yday-2)%7<=2){val++}if(!val){val=52;var dec31=(date.tm_wday+7-date.tm_yday-1)%7;if(dec31==4||dec31==5&&isLeapYear(date.tm_year%400-1)){val++}}else if(val==53){var jan1=(date.tm_wday+371-date.tm_yday)%7;if(jan1!=4&&(jan1!=3||!isLeapYear(date.tm_year)))val=1}return leadingNulls(val,2)},"%w":function(date){return date.tm_wday},"%W":function(date){var days=date.tm_yday+7-(date.tm_wday+6)%7;return leadingNulls(Math.floor(days/7),2)},"%y":function(date){return(date.tm_year+1900).toString().substring(2)},"%Y":function(date){return date.tm_year+1900},"%z":function(date){var off=date.tm_gmtoff;var ahead=off>=0;off=Math.abs(off)/60;off=off/60*100+off%60;return(ahead?"+":"-")+String("0000"+off).slice(-4)},"%Z":function(date){return date.tm_zone},"%%":function(){return"%"}};pattern=pattern.replace(/%%/g,"\0\0");for(var rule in EXPANSION_RULES_2){if(pattern.includes(rule)){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_2[rule](date))}}pattern=pattern.replace(/\0\0/g,"%");var bytes=intArrayFromString(pattern,false);if(bytes.length>maxsize){return 0}writeArrayToMemory(bytes,s);return bytes.length-1}function stringToUTF8OnStack(str){var size=lengthBytesUTF8(str)+1;var ret=stackAlloc(size);stringToUTF8(str,ret,size);return ret}var FSNode=function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev};var readMode=292|73;var writeMode=146;Object.defineProperties(FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(val){val?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(val){val?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}});FS.FSNode=FSNode;FS.createPreloadedFile=FS_createPreloadedFile;FS.staticInit();var GLctx;for(var i=0;i<32;++i)tempFixedLengthArray.push(new Array(i));Module["requestFullscreen"]=function Module_requestFullscreen(lockPointer,resizeCanvas){Browser.requestFullscreen(lockPointer,resizeCanvas)};Module["requestAnimationFrame"]=function Module_requestAnimationFrame(func){Browser.requestAnimationFrame(func)};Module["setCanvasSize"]=function Module_setCanvasSize(width,height,noUpdates){Browser.setCanvasSize(width,height,noUpdates)};Module["pauseMainLoop"]=function Module_pauseMainLoop(){Browser.mainLoop.pause()};Module["resumeMainLoop"]=function Module_resumeMainLoop(){Browser.mainLoop.resume()};Module["getUserMedia"]=function Module_getUserMedia(){Browser.getUserMedia()};Module["createContext"]=function Module_createContext(canvas,useWebGL,setInModule,webGLContextAttributes){return Browser.createContext(canvas,useWebGL,setInModule,webGLContextAttributes)};var preloadedImages={};var preloadedAudios={};var wasmImports={"_":___cxa_begin_catch,"wa":___cxa_end_catch,"b":___cxa_find_matching_catch_2,"z":___cxa_find_matching_catch_3,"v":___cxa_find_matching_catch_4,"D":___cxa_throw,"f":___resumeException,"ah":___syscall_fstat64,"Zg":___syscall_getcwd,"_g":___syscall_newfstatat,"Vg":___syscall_openat,"$g":___syscall_stat64,"bh":__emscripten_get_now_is_monotonic,"Wg":__gmtime_js,"Xg":__localtime_js,"Yg":__timegm_js,"Tg":__tzset_js,"$":_abort,"Q":_emscripten_date_now,"Pb":_emscripten_get_device_pixel_ratio,"Wa":_emscripten_get_element_css_size,"t":_emscripten_get_now,"zg":_emscripten_glActiveTexture,"yg":_emscripten_glAttachShader,"Cd":_emscripten_glBeginQuery,"Pg":_emscripten_glBeginQueryEXT,"dd":_emscripten_glBeginTransformFeedback,"xg":_emscripten_glBindAttribLocation,"wg":_emscripten_glBindBuffer,"ad":_emscripten_glBindBufferBase,"bd":_emscripten_glBindBufferRange,"vg":_emscripten_glBindFramebuffer,"ug":_emscripten_glBindRenderbuffer,"gc":_emscripten_glBindSampler,"tg":_emscripten_glBindTexture,"_b":_emscripten_glBindTransformFeedback,"jd":_emscripten_glBindVertexArray,"Hg":_emscripten_glBindVertexArrayOES,"sg":_emscripten_glBlendColor,"rg":_emscripten_glBlendEquation,"qg":_emscripten_glBlendEquationSeparate,"pg":_emscripten_glBlendFunc,"og":_emscripten_glBlendFuncSeparate,"od":_emscripten_glBlitFramebuffer,"ng":_emscripten_glBufferData,"mg":_emscripten_glBufferSubData,"lg":_emscripten_glCheckFramebufferStatus,"kg":_emscripten_glClear,"Fc":_emscripten_glClearBufferfi,"Gc":_emscripten_glClearBufferfv,"Ic":_emscripten_glClearBufferiv,"Hc":_emscripten_glClearBufferuiv,"jg":_emscripten_glClearColor,"ig":_emscripten_glClearDepthf,"hg":_emscripten_glClearStencil,"qc":_emscripten_glClientWaitSync,"gg":_emscripten_glColorMask,"fg":_emscripten_glCompileShader,"eg":_emscripten_glCompressedTexImage2D,"Hd":_emscripten_glCompressedTexImage3D,"dg":_emscripten_glCompressedTexSubImage2D,"Gd":_emscripten_glCompressedTexSubImage3D,"Dc":_emscripten_glCopyBufferSubData,"cg":_emscripten_glCopyTexImage2D,"bg":_emscripten_glCopyTexSubImage2D,"Id":_emscripten_glCopyTexSubImage3D,"ag":_emscripten_glCreateProgram,"$f":_emscripten_glCreateShader,"_f":_emscripten_glCullFace,"Zf":_emscripten_glDeleteBuffers,"Yf":_emscripten_glDeleteFramebuffers,"Xf":_emscripten_glDeleteProgram,"Ed":_emscripten_glDeleteQueries,"Rg":_emscripten_glDeleteQueriesEXT,"Wf":_emscripten_glDeleteRenderbuffers,"jc":_emscripten_glDeleteSamplers,"Vf":_emscripten_glDeleteShader,"rc":_emscripten_glDeleteSync,"Uf":_emscripten_glDeleteTextures,"Zb":_emscripten_glDeleteTransformFeedbacks,"id":_emscripten_glDeleteVertexArrays,"Gg":_emscripten_glDeleteVertexArraysOES,"Tf":_emscripten_glDepthFunc,"Sf":_emscripten_glDepthMask,"Rf":_emscripten_glDepthRangef,"Pf":_emscripten_glDetachShader,"Of":_emscripten_glDisable,"Nf":_emscripten_glDisableVertexAttribArray,"Mf":_emscripten_glDrawArrays,"wc":_emscripten_glDrawArraysInstanced,"Cg":_emscripten_glDrawArraysInstancedANGLE,"Ib":_emscripten_glDrawArraysInstancedARB,"Pd":_emscripten_glDrawArraysInstancedEXT,"Jb":_emscripten_glDrawArraysInstancedNV,"wd":_emscripten_glDrawBuffers,"Nd":_emscripten_glDrawBuffersEXT,"Dg":_emscripten_glDrawBuffersWEBGL,"Lf":_emscripten_glDrawElements,"vc":_emscripten_glDrawElementsInstanced,"Bg":_emscripten_glDrawElementsInstancedANGLE,"Gb":_emscripten_glDrawElementsInstancedARB,"Hb":_emscripten_glDrawElementsInstancedEXT,"Od":_emscripten_glDrawElementsInstancedNV,"Ld":_emscripten_glDrawRangeElements,"Kf":_emscripten_glEnable,"Jf":_emscripten_glEnableVertexAttribArray,"Bd":_emscripten_glEndQuery,"Og":_emscripten_glEndQueryEXT,"cd":_emscripten_glEndTransformFeedback,"uc":_emscripten_glFenceSync,"If":_emscripten_glFinish,"Hf":_emscripten_glFlush,"kd":_emscripten_glFlushMappedBufferRange,"Gf":_emscripten_glFramebufferRenderbuffer,"Ff":_emscripten_glFramebufferTexture2D,"md":_emscripten_glFramebufferTextureLayer,"Ef":_emscripten_glFrontFace,"Df":_emscripten_glGenBuffers,"Bf":_emscripten_glGenFramebuffers,"Fd":_emscripten_glGenQueries,"Sg":_emscripten_glGenQueriesEXT,"Af":_emscripten_glGenRenderbuffers,"kc":_emscripten_glGenSamplers,"zf":_emscripten_glGenTextures,"Yb":_emscripten_glGenTransformFeedbacks,"hd":_emscripten_glGenVertexArrays,"Fg":_emscripten_glGenVertexArraysOES,"Cf":_emscripten_glGenerateMipmap,"yf":_emscripten_glGetActiveAttrib,"xf":_emscripten_glGetActiveUniform,"yc":_emscripten_glGetActiveUniformBlockName,"zc":_emscripten_glGetActiveUniformBlockiv,"Bc":_emscripten_glGetActiveUniformsiv,"wf":_emscripten_glGetAttachedShaders,"vf":_emscripten_glGetAttribLocation,"uf":_emscripten_glGetBooleanv,"lc":_emscripten_glGetBufferParameteri64v,"tf":_emscripten_glGetBufferParameteriv,"xd":_emscripten_glGetBufferPointerv,"sf":_emscripten_glGetError,"rf":_emscripten_glGetFloatv,"Rc":_emscripten_glGetFragDataLocation,"qf":_emscripten_glGetFramebufferAttachmentParameteriv,"mc":_emscripten_glGetInteger64i_v,"oc":_emscripten_glGetInteger64v,"ed":_emscripten_glGetIntegeri_v,"pf":_emscripten_glGetIntegerv,"Mb":_emscripten_glGetInternalformativ,"Ub":_emscripten_glGetProgramBinary,"nf":_emscripten_glGetProgramInfoLog,"of":_emscripten_glGetProgramiv,"Jg":_emscripten_glGetQueryObjecti64vEXT,"Lg":_emscripten_glGetQueryObjectivEXT,"Ig":_emscripten_glGetQueryObjectui64vEXT,"zd":_emscripten_glGetQueryObjectuiv,"Kg":_emscripten_glGetQueryObjectuivEXT,"Ad":_emscripten_glGetQueryiv,"Mg":_emscripten_glGetQueryivEXT,"mf":_emscripten_glGetRenderbufferParameteriv,"ac":_emscripten_glGetSamplerParameterfv,"bc":_emscripten_glGetSamplerParameteriv,"kf":_emscripten_glGetShaderInfoLog,"jf":_emscripten_glGetShaderPrecisionFormat,"hf":_emscripten_glGetShaderSource,"lf":_emscripten_glGetShaderiv,"gf":_emscripten_glGetString,"Ec":_emscripten_glGetStringi,"nc":_emscripten_glGetSynciv,"ff":_emscripten_glGetTexParameterfv,"ef":_emscripten_glGetTexParameteriv,"_c":_emscripten_glGetTransformFeedbackVarying,"Ac":_emscripten_glGetUniformBlockIndex,"Cc":_emscripten_glGetUniformIndices,"bf":_emscripten_glGetUniformLocation,"df":_emscripten_glGetUniformfv,"cf":_emscripten_glGetUniformiv,"Sc":_emscripten_glGetUniformuiv,"Yc":_emscripten_glGetVertexAttribIiv,"Xc":_emscripten_glGetVertexAttribIuiv,"_e":_emscripten_glGetVertexAttribPointerv,"af":_emscripten_glGetVertexAttribfv,"$e":_emscripten_glGetVertexAttribiv,"Ze":_emscripten_glHint,"Rb":_emscripten_glInvalidateFramebuffer,"Qb":_emscripten_glInvalidateSubFramebuffer,"Ye":_emscripten_glIsBuffer,"Xe":_emscripten_glIsEnabled,"We":_emscripten_glIsFramebuffer,"Ve":_emscripten_glIsProgram,"Dd":_emscripten_glIsQuery,"Qg":_emscripten_glIsQueryEXT,"Ue":_emscripten_glIsRenderbuffer,"hc":_emscripten_glIsSampler,"Te":_emscripten_glIsShader,"sc":_emscripten_glIsSync,"Re":_emscripten_glIsTexture,"Xb":_emscripten_glIsTransformFeedback,"fd":_emscripten_glIsVertexArray,"Eg":_emscripten_glIsVertexArrayOES,"Qe":_emscripten_glLineWidth,"Pe":_emscripten_glLinkProgram,"ld":_emscripten_glMapBufferRange,"Wb":_emscripten_glPauseTransformFeedback,"Oe":_emscripten_glPixelStorei,"Ne":_emscripten_glPolygonOffset,"Tb":_emscripten_glProgramBinary,"Sb":_emscripten_glProgramParameteri,"Ng":_emscripten_glQueryCounterEXT,"Md":_emscripten_glReadBuffer,"Me":_emscripten_glReadPixels,"Le":_emscripten_glReleaseShaderCompiler,"Ke":_emscripten_glRenderbufferStorage,"nd":_emscripten_glRenderbufferStorageMultisample,"Vb":_emscripten_glResumeTransformFeedback,"Je":_emscripten_glSampleCoverage,"dc":_emscripten_glSamplerParameterf,"cc":_emscripten_glSamplerParameterfv,"fc":_emscripten_glSamplerParameteri,"ec":_emscripten_glSamplerParameteriv,"Ie":_emscripten_glScissor,"He":_emscripten_glShaderBinary,"Ge":_emscripten_glShaderSource,"Fe":_emscripten_glStencilFunc,"Ee":_emscripten_glStencilFuncSeparate,"De":_emscripten_glStencilMask,"Ce":_emscripten_glStencilMaskSeparate,"Be":_emscripten_glStencilOp,"Ae":_emscripten_glStencilOpSeparate,"ze":_emscripten_glTexImage2D,"Kd":_emscripten_glTexImage3D,"ye":_emscripten_glTexParameterf,"xe":_emscripten_glTexParameterfv,"we":_emscripten_glTexParameteri,"ve":_emscripten_glTexParameteriv,"Ob":_emscripten_glTexStorage2D,"Nb":_emscripten_glTexStorage3D,"ue":_emscripten_glTexSubImage2D,"Jd":_emscripten_glTexSubImage3D,"$c":_emscripten_glTransformFeedbackVaryings,"te":_emscripten_glUniform1f,"se":_emscripten_glUniform1fv,"re":_emscripten_glUniform1i,"qe":_emscripten_glUniform1iv,"Qc":_emscripten_glUniform1ui,"Mc":_emscripten_glUniform1uiv,"pe":_emscripten_glUniform2f,"oe":_emscripten_glUniform2fv,"ne":_emscripten_glUniform2i,"me":_emscripten_glUniform2iv,"Pc":_emscripten_glUniform2ui,"Lc":_emscripten_glUniform2uiv,"le":_emscripten_glUniform3f,"ke":_emscripten_glUniform3fv,"je":_emscripten_glUniform3i,"ie":_emscripten_glUniform3iv,"Oc":_emscripten_glUniform3ui,"Kc":_emscripten_glUniform3uiv,"he":_emscripten_glUniform4f,"ge":_emscripten_glUniform4fv,"fe":_emscripten_glUniform4i,"ee":_emscripten_glUniform4iv,"Nc":_emscripten_glUniform4ui,"Jc":_emscripten_glUniform4uiv,"xc":_emscripten_glUniformBlockBinding,"de":_emscripten_glUniformMatrix2fv,"vd":_emscripten_glUniformMatrix2x3fv,"td":_emscripten_glUniformMatrix2x4fv,"ce":_emscripten_glUniformMatrix3fv,"ud":_emscripten_glUniformMatrix3x2fv,"qd":_emscripten_glUniformMatrix3x4fv,"be":_emscripten_glUniformMatrix4fv,"sd":_emscripten_glUniformMatrix4x2fv,"pd":_emscripten_glUniformMatrix4x3fv,"yd":_emscripten_glUnmapBuffer,"ae":_emscripten_glUseProgram,"$d":_emscripten_glValidateProgram,"_d":_emscripten_glVertexAttrib1f,"Zd":_emscripten_glVertexAttrib1fv,"Yd":_emscripten_glVertexAttrib2f,"Xd":_emscripten_glVertexAttrib2fv,"Wd":_emscripten_glVertexAttrib3f,"Vd":_emscripten_glVertexAttrib3fv,"Ud":_emscripten_glVertexAttrib4f,"Td":_emscripten_glVertexAttrib4fv,"$b":_emscripten_glVertexAttribDivisor,"Ag":_emscripten_glVertexAttribDivisorANGLE,"Kb":_emscripten_glVertexAttribDivisorARB,"Qd":_emscripten_glVertexAttribDivisorEXT,"Lb":_emscripten_glVertexAttribDivisorNV,"Wc":_emscripten_glVertexAttribI4i,"Uc":_emscripten_glVertexAttribI4iv,"Vc":_emscripten_glVertexAttribI4ui,"Tc":_emscripten_glVertexAttribI4uiv,"Zc":_emscripten_glVertexAttribIPointer,"Sd":_emscripten_glVertexAttribPointer,"Rd":_emscripten_glViewport,"pc":_emscripten_glWaitSync,"ch":_emscripten_memcpy_big,"Fb":_emscripten_resize_heap,"ub":_emscripten_set_element_css_size,"Qf":_emscripten_set_main_loop,"eh":_environ_get,"fh":_environ_sizes_get,"dh":_fd_close,"Ug":_fd_read,"P":_fd_write,"gh":_getentropy,"Ua":_glfwCreateStandardCursor,"Ta":_glfwCreateWindow,"ta":_glfwDestroyCursor,"Ha":_glfwDestroyWindow,"Ia":_glfwGetClipboardString,"Qa":_glfwGetCurrentContext,"Ka":_glfwGetCursorPos,"Na":_glfwGetFramebufferSize,"w":_glfwGetTime,"Ma":_glfwGetWindowAttrib,"ea":_glfwGetWindowUserPointer,"ic":_glfwInit,"va":_glfwMakeContextCurrent,"ka":_glfwSetCharCallback,"Ja":_glfwSetClipboardString,"La":_glfwSetCursor,"ha":_glfwSetCursorEnterCallback,"ia":_glfwSetCursorPosCallback,"fa":_glfwSetDropCallback,"ua":_glfwSetErrorCallback,"ma":_glfwSetFramebufferSizeCallback,"la":_glfwSetKeyCallback,"ja":_glfwSetMouseButtonCallback,"ga":_glfwSetScrollCallback,"qa":_glfwSetWindowCloseCallback,"oa":_glfwSetWindowFocusCallback,"na":_glfwSetWindowIconifyCallback,"sa":_glfwSetWindowPosCallback,"pa":_glfwSetWindowRefreshCallback,"Pa":_glfwSetWindowShouldClose,"Oa":_glfwSetWindowSize,"ra":_glfwSetWindowSizeCallback,"Sa":_glfwSetWindowUserPointer,"_a":_glfwSwapBuffers,"Va":_glfwTerminate,"Ra":_glfwWaitEventsTimeout,"o":_glfwWindowHint,"Eb":invoke_d,"T":invoke_ddd,"H":invoke_ddddi,"ca":invoke_ddi,"S":invoke_ddii,"Ba":invoke_dii,"rd":invoke_diii,"bb":invoke_dijd,"ya":invoke_fff,"q":invoke_fi,"B":invoke_fii,"eb":invoke_fiifji,"E":invoke_fiii,"db":invoke_fiji,"n":invoke_i,"Da":invoke_if,"da":invoke_ifii,"i":invoke_ii,"jb":invoke_iidd,"L":invoke_iif,"kh":invoke_iifii,"g":invoke_iii,"k":invoke_iiii,"C":invoke_iiiii,"M":invoke_iiiiif,"X":invoke_iiiiii,"kb":invoke_iij,"vb":invoke_iiji,"pb":invoke_iijii,"$a":invoke_iijiii,"ab":invoke_iijiiii,"fb":invoke_iijji,"ob":invoke_iijjii,"tb":invoke_j,"nb":invoke_ji,"Db":invoke_jii,"qb":invoke_jji,"l":invoke_v,"O":invoke_vfiiiii,"Ya":invoke_vfiji,"a":invoke_vi,"ba":invoke_vid,"lh":invoke_vidff,"U":invoke_vidi,"za":invoke_vidii,"x":invoke_vif,"Y":invoke_viff,"R":invoke_vifff,"y":invoke_viffff,"ih":invoke_viffffff,"jh":invoke_viffffffff,"xa":invoke_viffi,"W":invoke_vifi,"aa":invoke_vifii,"Ca":invoke_vifiiii,"c":invoke_vii,"Aa":invoke_viidi,"m":invoke_viif,"p":invoke_viiff,"V":invoke_viifff,"J":invoke_viiffff,"r":invoke_viiffi,"G":invoke_viiffiii,"Se":invoke_viiffiiii,"I":invoke_viifi,"hh":invoke_viifiiifi,"e":invoke_viii,"Ga":invoke_viiif,"u":invoke_viiiff,"F":invoke_viiiffi,"zb":invoke_viiiffjiij,"cb":invoke_viiiffjijiii,"d":invoke_viiii,"A":invoke_viiiif,"K":invoke_viiiifi,"h":invoke_viiiii,"j":invoke_viiiiii,"Z":invoke_viiiiiii,"gd":invoke_viiiiiiii,"s":invoke_viiiiiiiii,"Fa":invoke_viiiiiiiiii,"Ea":invoke_viiiiiiiiiii,"rb":invoke_viiiij,"sb":invoke_viiiiji,"wb":invoke_viiiji,"yb":invoke_viiijii,"Ab":invoke_viiijiji,"xb":invoke_viiijj,"Bb":invoke_viij,"Cb":invoke_viiji,"Xa":invoke_viijj,"Za":invoke_vij,"ib":invoke_vijii,"hb":invoke_vijiii,"mb":invoke_vijiji,"gb":invoke_vijji,"lb":invoke_vji,"N":_llvm_eh_typeid_for,"tc":_strftime};var asm=createWasm();var ___wasm_call_ctors=function(){return(___wasm_call_ctors=Module["asm"]["nh"]).apply(null,arguments)};var _main=Module["_main"]=function(){return(_main=Module["_main"]=Module["asm"]["ph"]).apply(null,arguments)};var _free=function(){return(_free=Module["asm"]["qh"]).apply(null,arguments)};var _malloc=function(){return(_malloc=Module["asm"]["rh"]).apply(null,arguments)};var ___errno_location=function(){return(___errno_location=Module["asm"]["__errno_location"]).apply(null,arguments)};var _htonl=function(){return(_htonl=Module["asm"]["htonl"]).apply(null,arguments)};var _htons=function(){return(_htons=Module["asm"]["htons"]).apply(null,arguments)};var _ntohs=function(){return(_ntohs=Module["asm"]["ntohs"]).apply(null,arguments)};var _setThrew=function(){return(_setThrew=Module["asm"]["sh"]).apply(null,arguments)};var setTempRet0=function(){return(setTempRet0=Module["asm"]["th"]).apply(null,arguments)};var stackSave=function(){return(stackSave=Module["asm"]["uh"]).apply(null,arguments)};var stackRestore=function(){return(stackRestore=Module["asm"]["vh"]).apply(null,arguments)};var stackAlloc=function(){return(stackAlloc=Module["asm"]["wh"]).apply(null,arguments)};var ___cxa_free_exception=function(){return(___cxa_free_exception=Module["asm"]["__cxa_free_exception"]).apply(null,arguments)};var ___cxa_increment_exception_refcount=function(){return(___cxa_increment_exception_refcount=Module["asm"]["xh"]).apply(null,arguments)};var ___cxa_decrement_exception_refcount=function(){return(___cxa_decrement_exception_refcount=Module["asm"]["yh"]).apply(null,arguments)};var ___cxa_can_catch=function(){return(___cxa_can_catch=Module["asm"]["zh"]).apply(null,arguments)};var ___cxa_is_pointer_type=function(){return(___cxa_is_pointer_type=Module["asm"]["Ah"]).apply(null,arguments)};var dynCall_jii=Module["dynCall_jii"]=function(){return(dynCall_jii=Module["dynCall_jii"]=Module["asm"]["Bh"]).apply(null,arguments)};var dynCall_viiji=Module["dynCall_viiji"]=function(){return(dynCall_viiji=Module["dynCall_viiji"]=Module["asm"]["Ch"]).apply(null,arguments)};var dynCall_viij=Module["dynCall_viij"]=function(){return(dynCall_viij=Module["dynCall_viij"]=Module["asm"]["Dh"]).apply(null,arguments)};var dynCall_viiijiji=Module["dynCall_viiijiji"]=function(){return(dynCall_viiijiji=Module["dynCall_viiijiji"]=Module["asm"]["Eh"]).apply(null,arguments)};var dynCall_viiiffjiij=Module["dynCall_viiiffjiij"]=function(){return(dynCall_viiiffjiij=Module["dynCall_viiiffjiij"]=Module["asm"]["Fh"]).apply(null,arguments)};var dynCall_viiijii=Module["dynCall_viiijii"]=function(){return(dynCall_viiijii=Module["dynCall_viiijii"]=Module["asm"]["Gh"]).apply(null,arguments)};var dynCall_viiijj=Module["dynCall_viiijj"]=function(){return(dynCall_viiijj=Module["dynCall_viiijj"]=Module["asm"]["Hh"]).apply(null,arguments)};var dynCall_viiiji=Module["dynCall_viiiji"]=function(){return(dynCall_viiiji=Module["dynCall_viiiji"]=Module["asm"]["Ih"]).apply(null,arguments)};var dynCall_iiji=Module["dynCall_iiji"]=function(){return(dynCall_iiji=Module["dynCall_iiji"]=Module["asm"]["Jh"]).apply(null,arguments)};var dynCall_j=Module["dynCall_j"]=function(){return(dynCall_j=Module["dynCall_j"]=Module["asm"]["Kh"]).apply(null,arguments)};var dynCall_viiiiji=Module["dynCall_viiiiji"]=function(){return(dynCall_viiiiji=Module["dynCall_viiiiji"]=Module["asm"]["Lh"]).apply(null,arguments)};var dynCall_viiiij=Module["dynCall_viiiij"]=function(){return(dynCall_viiiij=Module["dynCall_viiiij"]=Module["asm"]["Mh"]).apply(null,arguments)};var dynCall_jji=Module["dynCall_jji"]=function(){return(dynCall_jji=Module["dynCall_jji"]=Module["asm"]["Nh"]).apply(null,arguments)};var dynCall_ji=Module["dynCall_ji"]=function(){return(dynCall_ji=Module["dynCall_ji"]=Module["asm"]["Oh"]).apply(null,arguments)};var dynCall_iijii=Module["dynCall_iijii"]=function(){return(dynCall_iijii=Module["dynCall_iijii"]=Module["asm"]["Ph"]).apply(null,arguments)};var dynCall_iijjii=Module["dynCall_iijjii"]=function(){return(dynCall_iijjii=Module["dynCall_iijjii"]=Module["asm"]["Qh"]).apply(null,arguments)};var dynCall_vijiji=Module["dynCall_vijiji"]=function(){return(dynCall_vijiji=Module["dynCall_vijiji"]=Module["asm"]["Rh"]).apply(null,arguments)};var dynCall_vji=Module["dynCall_vji"]=function(){return(dynCall_vji=Module["dynCall_vji"]=Module["asm"]["Sh"]).apply(null,arguments)};var dynCall_vij=Module["dynCall_vij"]=function(){return(dynCall_vij=Module["dynCall_vij"]=Module["asm"]["Th"]).apply(null,arguments)};var dynCall_iij=Module["dynCall_iij"]=function(){return(dynCall_iij=Module["dynCall_iij"]=Module["asm"]["Uh"]).apply(null,arguments)};var dynCall_vijii=Module["dynCall_vijii"]=function(){return(dynCall_vijii=Module["dynCall_vijii"]=Module["asm"]["Vh"]).apply(null,arguments)};var dynCall_vijiii=Module["dynCall_vijiii"]=function(){return(dynCall_vijiii=Module["dynCall_vijiii"]=Module["asm"]["Wh"]).apply(null,arguments)};var dynCall_vijji=Module["dynCall_vijji"]=function(){return(dynCall_vijji=Module["dynCall_vijji"]=Module["asm"]["Xh"]).apply(null,arguments)};var dynCall_iijji=Module["dynCall_iijji"]=function(){return(dynCall_iijji=Module["dynCall_iijji"]=Module["asm"]["Yh"]).apply(null,arguments)};var dynCall_fiifji=Module["dynCall_fiifji"]=function(){return(dynCall_fiifji=Module["dynCall_fiifji"]=Module["asm"]["Zh"]).apply(null,arguments)};var dynCall_fiji=Module["dynCall_fiji"]=function(){return(dynCall_fiji=Module["dynCall_fiji"]=Module["asm"]["_h"]).apply(null,arguments)};var dynCall_viiiffjijiii=Module["dynCall_viiiffjijiii"]=function(){return(dynCall_viiiffjijiii=Module["dynCall_viiiffjijiii"]=Module["asm"]["$h"]).apply(null,arguments)};var dynCall_dijd=Module["dynCall_dijd"]=function(){return(dynCall_dijd=Module["dynCall_dijd"]=Module["asm"]["ai"]).apply(null,arguments)};var dynCall_iijiiii=Module["dynCall_iijiiii"]=function(){return(dynCall_iijiiii=Module["dynCall_iijiiii"]=Module["asm"]["bi"]).apply(null,arguments)};var dynCall_iijiii=Module["dynCall_iijiii"]=function(){return(dynCall_iijiii=Module["dynCall_iijiii"]=Module["asm"]["ci"]).apply(null,arguments)};var dynCall_vfiji=Module["dynCall_vfiji"]=function(){return(dynCall_vfiji=Module["dynCall_vfiji"]=Module["asm"]["di"]).apply(null,arguments)};var dynCall_viijj=Module["dynCall_viijj"]=function(){return(dynCall_viijj=Module["dynCall_viijj"]=Module["asm"]["ei"]).apply(null,arguments)};function invoke_vi(index,a1){var sp=stackSave();try{getWasmTableEntry(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiii(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viii(index,a1,a2,a3){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_ii(index,a1){var sp=stackSave();try{return getWasmTableEntry(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiii(index,a1,a2,a3,a4){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iii(index,a1,a2){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vii(index,a1,a2){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_i(index){var sp=stackSave();try{return getWasmTableEntry(index)()}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viif(index,a1,a2,a3){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vif(index,a1,a2){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_fiii(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viff(index,a1,a2,a3){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiii(index,a1,a2,a3,a4){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_fii(index,a1,a2){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiffff(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiff(index,a1,a2,a3,a4,a5){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viifi(index,a1,a2,a3,a4){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiffiiii(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiif(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_v(index){var sp=stackSave();try{getWasmTableEntry(index)()}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiff(index,a1,a2,a3,a4){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiffiii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiif(index,a1,a2,a3,a4,a5){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_fi(index,a1){var sp=stackSave();try{return getWasmTableEntry(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_diii(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_d(index){var sp=stackSave();try{return getWasmTableEntry(index)()}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iidd(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiif(index,a1,a2,a3,a4){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_if(index,a1){var sp=stackSave();try{return getWasmTableEntry(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_ifii(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vifi(index,a1,a2,a3){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiffi(index,a1,a2,a3,a4,a5){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iif(index,a1,a2){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vifiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viifff(index,a1,a2,a3,a4,a5){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viffff(index,a1,a2,a3,a4,a5){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiifi(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiffi(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_dii(index,a1,a2){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_ddi(index,a1,a2){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vidi(index,a1,a2,a3){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viidi(index,a1,a2,a3,a4){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_ddd(index,a1,a2){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vidii(index,a1,a2,a3,a4){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_fff(index,a1,a2){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vidff(index,a1,a2,a3,a4){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viffi(index,a1,a2,a3,a4){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_ddddi(index,a1,a2,a3,a4){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vid(index,a1,a2){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_ddii(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iifii(index,a1,a2,a3,a4){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viffffffff(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viffffff(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vifii(index,a1,a2,a3,a4){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vfiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vifff(index,a1,a2,a3,a4){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viifiiifi(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_jii(index,a1,a2){var sp=stackSave();try{return dynCall_jii(index,a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiji(index,a1,a2,a3,a4,a5){var sp=stackSave();try{dynCall_viiji(index,a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viij(index,a1,a2,a3,a4){var sp=stackSave();try{dynCall_viij(index,a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiijiji(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{dynCall_viiijiji(index,a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiffjiij(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11){var sp=stackSave();try{dynCall_viiiffjiij(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiijii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{dynCall_viiijii(index,a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiijj(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{dynCall_viiijj(index,a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiji(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{dynCall_viiiji(index,a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiji(index,a1,a2,a3,a4){var sp=stackSave();try{return dynCall_iiji(index,a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_j(index){var sp=stackSave();try{return dynCall_j(index)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiji(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{dynCall_viiiiji(index,a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiij(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{dynCall_viiiij(index,a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_jji(index,a1,a2,a3){var sp=stackSave();try{return dynCall_jji(index,a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iijii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return dynCall_iijii(index,a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iijjii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{return dynCall_iijjii(index,a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_ji(index,a1){var sp=stackSave();try{return dynCall_ji(index,a1)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vijiji(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{dynCall_vijiji(index,a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vji(index,a1,a2,a3){var sp=stackSave();try{dynCall_vji(index,a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iij(index,a1,a2,a3){var sp=stackSave();try{return dynCall_iij(index,a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vijii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{dynCall_vijii(index,a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vijiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{dynCall_vijiii(index,a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vijji(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{dynCall_vijji(index,a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iijji(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{return dynCall_iijji(index,a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_fiifji(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{return dynCall_fiifji(index,a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_fiji(index,a1,a2,a3,a4){var sp=stackSave();try{return dynCall_fiji(index,a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiffjijiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13){var sp=stackSave();try{dynCall_viiiffjijiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_dijd(index,a1,a2,a3,a4){var sp=stackSave();try{return dynCall_dijd(index,a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iijiiii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{return dynCall_iijiiii(index,a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iijiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{return dynCall_iijiii(index,a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vij(index,a1,a2,a3){var sp=stackSave();try{dynCall_vij(index,a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vfiji(index,a1,a2,a3,a4,a5){var sp=stackSave();try{dynCall_vfiji(index,a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viijj(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{dynCall_viijj(index,a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function callMain(args=[]){var entryFunction=_main;args.unshift(thisProgram);var argc=args.length;var argv=stackAlloc((argc+1)*4);var argv_ptr=argv>>2;args.forEach(arg=>{HEAP32[argv_ptr++]=stringToUTF8OnStack(arg)});HEAP32[argv_ptr]=0;try{var ret=entryFunction(argc,argv);exitJS(ret,true);return ret}catch(e){return handleException(e)}}function run(args=arguments_){if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();if(shouldRunNow)callMain(args);postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}var shouldRunNow=true;if(Module["noInitialRun"])shouldRunNow=false;run(); diff --git a/basic.wasm b/basic.wasm new file mode 100755 index 0000000..88ae781 Binary files /dev/null and b/basic.wasm differ diff --git a/index.html b/index.html index 35e9378..2172e2c 100644 --- a/index.html +++ b/index.html @@ -1,2288 +1,17 @@ - - - - - - - - - - - - luaegui - - - - -
- - -
- -
-
- - - - + + + \ No newline at end of file