Working project
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
**/.direnv/**
|
64
README.md
Normal file
|
@ -0,0 +1,64 @@
|
|||
# URL Shortener Take-Home Exercise (Fullstack)
|
||||
|
||||
## Instructions
|
||||
|
||||
Your task is to create a URL shortener web application (similar to [bitly](https://bitly.com/) or [TinyURL](https://tinyurl.com/)). This exercise is intentionally open-ended, and you are welcome to implement your solution using the language and tech stack of your choice. If you are familiar with React & Next.js, please use those for your submission. The core functionality of the application should be expressed through your own original code.
|
||||
|
||||
You should aim to spend no more than 2 hours on this project. If you don't complete everything in 2 hours, please submit what you have - we value your time and want to see your prioritization skills.
|
||||
|
||||
### Application Description
|
||||
|
||||
At the root path (e.g., http://localhost:8080/), a user should be presented with a form that allows them to input a URL. When a user submits that form, it should convert the input URL to a shortened version and present that to the user.
|
||||
|
||||
The shortened URL should be in the format: http://localhost:8080/{slug}, where `{slug}` is a unique identifier for the original URL.
|
||||
|
||||
When a user navigates to the shortened URL, they should be redirected to the original URL that was used to generate this shortened URL.
|
||||
|
||||
### Minimum Requirements
|
||||
|
||||
* Format and method of generating slugs for shortened URLs are up to you
|
||||
* Shortened URLs do not need to persist across server shutdown/startup (i.e., setting up a DB isn't necessary - server memory should suffice)
|
||||
* Only allow valid http(s) URLs
|
||||
|
||||
If you have additional time, consider spending it on testing or UI improvements as opposed to supplemental features.
|
||||
|
||||
## Evaluation Criteria
|
||||
|
||||
We will be evaluating your submission based on the following:
|
||||
|
||||
1. Functionality: Does the application work as described?
|
||||
2. Code quality: Is the code clean, well-organized, and following best practices?
|
||||
3. Error handling: How does the application handle invalid inputs or errors?
|
||||
4. Technical choices: Are the chosen technologies appropriate for the task?
|
||||
5. Documentation: Is the code well-commented and the README clear?
|
||||
|
||||
## Deliverables
|
||||
|
||||
Please fill out the sections below in the _README.md_ of your project and submit according to the instructions you received with this project. Your code can be sent as a zip file or a link to a repository containing your project.
|
||||
|
||||
---
|
||||
|
||||
## Implementation Details
|
||||
|
||||
<!-- Provide a short description of your implementation (technologies used, brief overview of project architecture, etc.) -->
|
||||
|
||||
## How to Run
|
||||
|
||||
<!--
|
||||
- Include instructions on how to run your implementation locally. Be sure to include any necessary setup steps, such as installing dependencies, as well as the commands to start the application.
|
||||
-->
|
||||
|
||||
## Testing
|
||||
|
||||
<!-- Describe how you tested your solution (automated testing, manual testing process, screenshots, etc.) -->
|
||||
|
||||
## Tools Used
|
||||
|
||||
<!--
|
||||
- Describe any tools you used in developing your solution (e.g. ChatGPT for generating ideas and styles)
|
||||
- Note: The use of AI tools is not discouraged, but they should be used judiciously.
|
||||
-->
|
||||
|
||||
---
|
||||
|
||||
Good luck, and we look forward to reviewing your submission!
|
61
flake.lock
Normal file
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1719848872,
|
||||
"narHash": "sha256-H3+EC5cYuq+gQW8y0lSrrDZfH71LB4DAf+TDFyvwCNA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "00d80d13810dbfea8ab4ed1009b09100cca86ba8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
29
flake.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
description = "An example project using flutter";
|
||||
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
outputs = {
|
||||
flake-utils,
|
||||
nixpkgs,
|
||||
...
|
||||
} :
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
in {
|
||||
devShell = pkgs.mkShell {
|
||||
CHROME_EXECUTABLE = "${pkgs.chromium}/bin/chromium";
|
||||
FLUTTER_ROOT = "${pkgs.flutter}";
|
||||
buildInputs = with pkgs; [
|
||||
flutter
|
||||
chromium
|
||||
];
|
||||
shellHook = ''
|
||||
export PATH="$PATH":"$HOME/.pub-cache/bin"
|
||||
'';
|
||||
};
|
||||
});
|
||||
}
|
43
frontend/.gitignore
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
# Miscellaneous
|
||||
*.class
|
||||
*.log
|
||||
*.pyc
|
||||
*.swp
|
||||
.DS_Store
|
||||
.atom/
|
||||
.buildlog/
|
||||
.history
|
||||
.svn/
|
||||
migrate_working_dir/
|
||||
|
||||
# IntelliJ related
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
.idea/
|
||||
|
||||
# The .vscode folder contains launch configuration and tasks you configure in
|
||||
# VS Code which you may wish to be included in version control, so this line
|
||||
# is commented out by default.
|
||||
#.vscode/
|
||||
|
||||
# Flutter/Dart/Pub related
|
||||
**/doc/api/
|
||||
**/ios/Flutter/.last_build_id
|
||||
.dart_tool/
|
||||
.flutter-plugins
|
||||
.flutter-plugins-dependencies
|
||||
.pub-cache/
|
||||
.pub/
|
||||
/build/
|
||||
|
||||
# Symbolication related
|
||||
app.*.symbols
|
||||
|
||||
# Obfuscation related
|
||||
app.*.map.json
|
||||
|
||||
# Android Studio will place build artifacts here
|
||||
/android/app/debug
|
||||
/android/app/profile
|
||||
/android/app/release
|
30
frontend/.metadata
Normal file
|
@ -0,0 +1,30 @@
|
|||
# This file tracks properties of this Flutter project.
|
||||
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
||||
#
|
||||
# This file should be version controlled and should not be manually edited.
|
||||
|
||||
version:
|
||||
revision: "nixpkgs000000000000000000000000000000000"
|
||||
channel: "stable"
|
||||
|
||||
project_type: app
|
||||
|
||||
# Tracks metadata for the flutter migrate command
|
||||
migration:
|
||||
platforms:
|
||||
- platform: root
|
||||
create_revision: nixpkgs000000000000000000000000000000000
|
||||
base_revision: nixpkgs000000000000000000000000000000000
|
||||
- platform: linux
|
||||
create_revision: nixpkgs000000000000000000000000000000000
|
||||
base_revision: nixpkgs000000000000000000000000000000000
|
||||
|
||||
# User provided section
|
||||
|
||||
# List of Local paths (relative to this file) that should be
|
||||
# ignored by the migrate tool.
|
||||
#
|
||||
# Files that are not part of the templates will be ignored by default.
|
||||
unmanaged_files:
|
||||
- 'lib/main.dart'
|
||||
- 'ios/Runner.xcodeproj/project.pbxproj'
|
16
frontend/README.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
# frontend
|
||||
|
||||
A new Flutter project.
|
||||
|
||||
## Getting Started
|
||||
|
||||
This project is a starting point for a Flutter application.
|
||||
|
||||
A few resources to get you started if this is your first Flutter project:
|
||||
|
||||
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
|
||||
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
|
||||
|
||||
For help getting started with Flutter development, view the
|
||||
[online documentation](https://docs.flutter.dev/), which offers tutorials,
|
||||
samples, guidance on mobile development, and a full API reference.
|
261
frontend/analysis_options.yaml
Normal file
|
@ -0,0 +1,261 @@
|
|||
# Specify analysis options.
|
||||
#
|
||||
# For a list of lints, see: https://dart.dev/tools/linter-rules
|
||||
# For guidelines on configuring static analysis, see:
|
||||
# https://dart.dev/tools/analysis
|
||||
#
|
||||
# There are other similar analysis options files in the flutter repos,
|
||||
# which should be kept in sync with this file:
|
||||
#
|
||||
# - analysis_options.yaml (this file)
|
||||
# - https://github.com/flutter/engine/blob/main/analysis_options.yaml
|
||||
# - https://github.com/flutter/packages/blob/main/analysis_options.yaml
|
||||
#
|
||||
# This file contains the analysis options used for code in the flutter/flutter
|
||||
# repository.
|
||||
|
||||
analyzer:
|
||||
language:
|
||||
strict-casts: true
|
||||
strict-inference: true
|
||||
strict-raw-types: true
|
||||
errors:
|
||||
# allow deprecated members (we do this because otherwise we have to annotate
|
||||
# every member in every test, assert, etc, when we or the Dart SDK deprecates
|
||||
# something (https://github.com/flutter/flutter/issues/143312)
|
||||
deprecated_member_use: ignore
|
||||
deprecated_member_use_from_same_package: ignore
|
||||
exclude:
|
||||
- "bin/cache/**"
|
||||
# Ignore protoc generated files
|
||||
- "dev/conductor/lib/proto/*"
|
||||
|
||||
linter:
|
||||
rules:
|
||||
# This list is derived from the list of all available lints located at
|
||||
# https://github.com/dart-lang/sdk/blob/main/pkg/linter/example/all.yaml
|
||||
- always_declare_return_types
|
||||
- always_put_control_body_on_new_line
|
||||
# - always_put_required_named_parameters_first # we prefer having parameters in the same order as fields https://github.com/flutter/flutter/issues/10219
|
||||
- always_specify_types
|
||||
# - always_use_package_imports # we do this commonly
|
||||
- annotate_overrides
|
||||
- annotate_redeclares
|
||||
# - avoid_annotating_with_dynamic # conflicts with always_specify_types
|
||||
- avoid_bool_literals_in_conditional_expressions
|
||||
# - avoid_catches_without_on_clauses # blocked on https://github.com/dart-lang/linter/issues/3023
|
||||
# - avoid_catching_errors # blocked on https://github.com/dart-lang/linter/issues/4998
|
||||
# - avoid_classes_with_only_static_members # we do this commonly for `abstract final class`es
|
||||
- avoid_double_and_int_checks
|
||||
- avoid_dynamic_calls
|
||||
- avoid_empty_else
|
||||
- avoid_equals_and_hash_code_on_mutable_classes
|
||||
- avoid_escaping_inner_quotes
|
||||
- avoid_field_initializers_in_const_classes
|
||||
# - avoid_final_parameters # incompatible with prefer_final_parameters
|
||||
- avoid_function_literals_in_foreach_calls
|
||||
# - avoid_implementing_value_types # see https://github.com/dart-lang/linter/issues/4558
|
||||
- avoid_init_to_null
|
||||
- avoid_js_rounded_ints
|
||||
# - avoid_multiple_declarations_per_line # seems to be a stylistic choice we don't subscribe to
|
||||
- avoid_null_checks_in_equality_operators
|
||||
# - avoid_positional_boolean_parameters # would have been nice to enable this but by now there's too many places that break it
|
||||
- avoid_print
|
||||
# - avoid_private_typedef_functions # we prefer having typedef (discussion in https://github.com/flutter/flutter/pull/16356)
|
||||
- avoid_redundant_argument_values
|
||||
- avoid_relative_lib_imports
|
||||
- avoid_renaming_method_parameters
|
||||
- avoid_return_types_on_setters
|
||||
- avoid_returning_null_for_void
|
||||
# - avoid_returning_this # there are enough valid reasons to return `this` that this lint ends up with too many false positives
|
||||
- avoid_setters_without_getters
|
||||
- avoid_shadowing_type_parameters
|
||||
- avoid_single_cascade_in_expression_statements
|
||||
- avoid_slow_async_io
|
||||
- avoid_type_to_string
|
||||
- avoid_types_as_parameter_names
|
||||
# - avoid_types_on_closure_parameters # conflicts with always_specify_types
|
||||
- avoid_unnecessary_containers
|
||||
- avoid_unused_constructor_parameters
|
||||
- avoid_void_async
|
||||
# - avoid_web_libraries_in_flutter # we use web libraries in web-specific code, and our tests prevent us from using them elsewhere
|
||||
- await_only_futures
|
||||
- camel_case_extensions
|
||||
- camel_case_types
|
||||
- cancel_subscriptions
|
||||
# - cascade_invocations # doesn't match the typical style of this repo
|
||||
- cast_nullable_to_non_nullable
|
||||
# - close_sinks # not reliable enough
|
||||
- collection_methods_unrelated_type
|
||||
- combinators_ordering
|
||||
# - comment_references # blocked on https://github.com/dart-lang/linter/issues/1142
|
||||
- conditional_uri_does_not_exist
|
||||
# - constant_identifier_names # needs an opt-out https://github.com/dart-lang/linter/issues/204
|
||||
- control_flow_in_finally
|
||||
- curly_braces_in_flow_control_structures
|
||||
- dangling_library_doc_comments
|
||||
- depend_on_referenced_packages
|
||||
- deprecated_consistency
|
||||
# - deprecated_member_use_from_same_package # we allow self-references to deprecated members
|
||||
# - diagnostic_describe_all_properties # enabled only at the framework level (packages/flutter/lib)
|
||||
- directives_ordering
|
||||
# - discarded_futures # too many false positives, similar to unawaited_futures
|
||||
# - do_not_use_environment # there are appropriate times to use the environment, especially in our tests and build logic
|
||||
# - document_ignores # not yet tested
|
||||
- empty_catches
|
||||
- empty_constructor_bodies
|
||||
- empty_statements
|
||||
- eol_at_end_of_file
|
||||
- exhaustive_cases
|
||||
- file_names
|
||||
- flutter_style_todos
|
||||
- hash_and_equals
|
||||
- implementation_imports
|
||||
- implicit_call_tearoffs
|
||||
- implicit_reopen
|
||||
- invalid_case_patterns
|
||||
- invalid_runtime_check_with_js_interop_types
|
||||
# - join_return_with_assignment # not required by flutter style
|
||||
- leading_newlines_in_multiline_strings
|
||||
- library_annotations
|
||||
- library_names
|
||||
- library_prefixes
|
||||
- library_private_types_in_public_api
|
||||
# - lines_longer_than_80_chars # not required by flutter style
|
||||
- literal_only_boolean_expressions
|
||||
# - matching_super_parameters # blocked on https://github.com/dart-lang/language/issues/2509
|
||||
- missing_code_block_language_in_doc_comment
|
||||
- missing_whitespace_between_adjacent_strings
|
||||
- no_adjacent_strings_in_list
|
||||
- no_default_cases
|
||||
- no_duplicate_case_values
|
||||
- no_leading_underscores_for_library_prefixes
|
||||
- no_leading_underscores_for_local_identifiers
|
||||
- no_literal_bool_comparisons
|
||||
- no_logic_in_create_state
|
||||
# - no_runtimeType_toString # ok in tests; we enable this only in packages/
|
||||
- no_self_assignments
|
||||
- no_wildcard_variable_uses
|
||||
- non_constant_identifier_names
|
||||
- noop_primitive_operations
|
||||
- null_check_on_nullable_type_parameter
|
||||
- null_closures
|
||||
# - omit_local_variable_types # opposite of always_specify_types
|
||||
# - omit_obvious_local_variable_types # not yet tested
|
||||
# - one_member_abstracts # too many false positives
|
||||
- only_throw_errors # this does get disabled in a few places where we have legacy code that uses strings et al
|
||||
- overridden_fields
|
||||
- package_api_docs
|
||||
- package_names
|
||||
- package_prefixed_library_names
|
||||
# - parameter_assignments # we do this commonly
|
||||
- prefer_adjacent_string_concatenation
|
||||
- prefer_asserts_in_initializer_lists
|
||||
# - prefer_asserts_with_message # not required by flutter style
|
||||
- prefer_collection_literals
|
||||
- prefer_conditional_assignment
|
||||
- prefer_const_constructors
|
||||
- prefer_const_constructors_in_immutables
|
||||
- prefer_const_declarations
|
||||
- prefer_const_literals_to_create_immutables
|
||||
# - prefer_constructors_over_static_methods # far too many false positives
|
||||
- prefer_contains
|
||||
# - prefer_double_quotes # opposite of prefer_single_quotes
|
||||
# - prefer_expression_function_bodies # conflicts with ./docs/contributing/Style-guide-for-Flutter-repo.md#consider-using--for-short-functions-and-methods
|
||||
- prefer_final_fields
|
||||
- prefer_final_in_for_each
|
||||
- prefer_final_locals
|
||||
# - prefer_final_parameters # adds too much verbosity
|
||||
- prefer_for_elements_to_map_fromIterable
|
||||
- prefer_foreach
|
||||
- prefer_function_declarations_over_variables
|
||||
- prefer_generic_function_type_aliases
|
||||
- prefer_if_elements_to_conditional_expressions
|
||||
- prefer_if_null_operators
|
||||
- prefer_initializing_formals
|
||||
- prefer_inlined_adds
|
||||
# - prefer_int_literals # conflicts with ./docs/contributing/Style-guide-for-Flutter-repo.md#use-double-literals-for-double-constants
|
||||
- prefer_interpolation_to_compose_strings
|
||||
- prefer_is_empty
|
||||
- prefer_is_not_empty
|
||||
- prefer_is_not_operator
|
||||
- prefer_iterable_whereType
|
||||
- prefer_mixin
|
||||
# - prefer_null_aware_method_calls # "call()" is confusing to people new to the language since it's not documented anywhere
|
||||
- prefer_null_aware_operators
|
||||
- prefer_relative_imports
|
||||
- prefer_single_quotes
|
||||
- prefer_spread_collections
|
||||
- prefer_typing_uninitialized_variables
|
||||
- prefer_void_to_null
|
||||
- provide_deprecation_message
|
||||
# - public_member_api_docs # enabled on a case-by-case basis; see e.g. packages/analysis_options.yaml
|
||||
- recursive_getters
|
||||
# - require_trailing_commas # would be nice, but requires a lot of manual work: 10,000+ code locations would need to be reformatted by hand after bulk fix is applied
|
||||
- secure_pubspec_urls
|
||||
- sized_box_for_whitespace
|
||||
- sized_box_shrink_expand
|
||||
- slash_for_doc_comments
|
||||
- sort_child_properties_last
|
||||
- sort_constructors_first
|
||||
# - sort_pub_dependencies # prevents separating pinned transitive dependencies
|
||||
- sort_unnamed_constructors_first
|
||||
# - specify_nonobvious_local_variable_types # not yet tested
|
||||
- test_types_in_equals
|
||||
- throw_in_finally
|
||||
- tighten_type_of_initializing_formals
|
||||
# - type_annotate_public_apis # subset of always_specify_types
|
||||
- type_init_formals
|
||||
- type_literal_in_constant_pattern
|
||||
# - unawaited_futures # too many false positives, especially with the way AnimationController works
|
||||
# - unintended_html_in_doc_comment # blocked on https://github.com/dart-lang/linter/issues/5065
|
||||
- unnecessary_await_in_return
|
||||
- unnecessary_brace_in_string_interps
|
||||
- unnecessary_breaks
|
||||
- unnecessary_const
|
||||
- unnecessary_constructor_name
|
||||
# - unnecessary_final # conflicts with prefer_final_locals
|
||||
- unnecessary_getters_setters
|
||||
# - unnecessary_lambdas # has false positives: https://github.com/dart-lang/linter/issues/498
|
||||
- unnecessary_late
|
||||
- unnecessary_library_directive
|
||||
# - unnecessary_library_name # blocked on https://github.com/dart-lang/lints/issues/181#issuecomment-2018919034
|
||||
- unnecessary_new
|
||||
- unnecessary_null_aware_assignments
|
||||
- unnecessary_null_aware_operator_on_extension_on_nullable
|
||||
- unnecessary_null_checks
|
||||
- unnecessary_null_in_if_null_operators
|
||||
- unnecessary_nullable_for_final_variable_declarations
|
||||
- unnecessary_overrides
|
||||
- unnecessary_parenthesis
|
||||
# - unnecessary_raw_strings # what's "necessary" is a matter of opinion; consistency across strings can help readability more than this lint
|
||||
- unnecessary_statements
|
||||
- unnecessary_string_escapes
|
||||
- unnecessary_string_interpolations
|
||||
- unnecessary_this
|
||||
- unnecessary_to_list_in_spreads
|
||||
- unreachable_from_main
|
||||
- unrelated_type_equality_checks
|
||||
- unsafe_html
|
||||
- use_build_context_synchronously
|
||||
- use_colored_box
|
||||
# - use_decorated_box # leads to bugs: DecoratedBox and Container are not equivalent (Container inserts extra padding)
|
||||
- use_enums
|
||||
- use_full_hex_values_for_flutter_colors
|
||||
- use_function_type_syntax_for_parameters
|
||||
- use_if_null_to_convert_nulls_to_bools
|
||||
- use_is_even_rather_than_modulo
|
||||
- use_key_in_widget_constructors
|
||||
- use_late_for_private_fields_and_variables
|
||||
- use_named_constants
|
||||
- use_raw_strings
|
||||
- use_rethrow_when_possible
|
||||
- use_setters_to_change_properties
|
||||
# - use_string_buffers # has false positives: https://github.com/dart-lang/sdk/issues/34182
|
||||
- use_string_in_part_of_directives
|
||||
- use_super_parameters
|
||||
- use_test_throws_matchers
|
||||
# - use_to_and_as_if_applicable # has false positives, so we prefer to catch this by code-review
|
||||
- use_truncating_division
|
||||
- valid_regexps
|
||||
- void_checks
|
165
frontend/lib/main.dart
Normal file
|
@ -0,0 +1,165 @@
|
|||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import 'shorten_service.dart';
|
||||
|
||||
void main() {
|
||||
runApp(const MyApp());
|
||||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const MaterialApp(
|
||||
debugShowCheckedModeBanner: false,
|
||||
home: Home(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class Home extends StatefulWidget {
|
||||
const Home({super.key});
|
||||
|
||||
@override
|
||||
State<Home> createState() => _HomeState();
|
||||
}
|
||||
|
||||
class _HomeState extends State<Home> {
|
||||
late final TextEditingController controller;
|
||||
final GlobalKey<FormState> formKey = GlobalKey<FormState>();
|
||||
String? shortenedUrl;
|
||||
bool loading = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
controller = TextEditingController();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
controller.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: Center(
|
||||
child: Stack(
|
||||
children: <Widget>[
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
const Text(
|
||||
'Url shortner',
|
||||
style: TextStyle(fontSize: 24),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
const SizedBox(width: 30),
|
||||
ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: 300),
|
||||
child: Form(
|
||||
key: formKey,
|
||||
child: TextFormField(
|
||||
controller: controller,
|
||||
onFieldSubmitted: loading ? null : (_) => processUrl(),
|
||||
validator: (String? url) {
|
||||
try {
|
||||
if (url == null || url.isEmpty) {
|
||||
return 'No url entered.';
|
||||
}
|
||||
final Uri uri = Uri.parse(url);
|
||||
if (!uri.hasScheme || (!uri.isScheme('HTTP') && !uri.isScheme('HTTPS'))) {
|
||||
throw const FormatException();
|
||||
}
|
||||
return null;
|
||||
} on FormatException {
|
||||
return 'Bad URL';
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.arrow_circle_right_rounded),
|
||||
onPressed: loading ? null : () => processUrl(),
|
||||
),
|
||||
],
|
||||
),
|
||||
AnimatedOpacity(
|
||||
opacity: shortenedUrl == null ? 0.0 : 1.0,
|
||||
duration: const Duration(milliseconds: 200),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 14.0),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
const Text('Short URL:'),
|
||||
InkWell(
|
||||
onTap: shortenedUrl == null ? null : () => launchUrl(Uri.parse(shortenedUrl!)),
|
||||
child: Text(
|
||||
shortenedUrl ?? '',
|
||||
style: const TextStyle(color: Colors.blue, fontSize: 24),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Center(
|
||||
child: AnimatedOpacity(
|
||||
opacity: loading ? 1.0 : 0.0,
|
||||
duration: const Duration(milliseconds: 200),
|
||||
child: const CircularProgressIndicator(),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> processUrl() async {
|
||||
try {
|
||||
assert(formKey.currentState != null, 'Could not validate form, formKey currentState is null');
|
||||
|
||||
if (loading) {
|
||||
return;
|
||||
}
|
||||
setState(() => loading = true);
|
||||
final bool isValid = formKey.currentState!.validate();
|
||||
|
||||
if (!isValid) {
|
||||
setState(() => loading = false);
|
||||
return;
|
||||
}
|
||||
|
||||
final String? shortUrl = await shortenUrl(controller.text);
|
||||
if (shortUrl != null) {
|
||||
setState(() {
|
||||
shortenedUrl = shortUrl;
|
||||
loading = false;
|
||||
});
|
||||
} else {
|
||||
// show error
|
||||
setState(() {
|
||||
shortenedUrl = null;
|
||||
loading = false;
|
||||
});
|
||||
}
|
||||
} catch (err, st) {
|
||||
if (kDebugMode) {
|
||||
print(st);
|
||||
print('An error occurred trying to shorten the url: $err');
|
||||
}
|
||||
setState(() => loading = false);
|
||||
}
|
||||
}
|
||||
}
|
23
frontend/lib/shorten_service.dart
Normal file
|
@ -0,0 +1,23 @@
|
|||
import 'dart:convert';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
BaseOptions dioOptions = BaseOptions(baseUrl: 'http://localhost:8080');
|
||||
|
||||
Future<String?> shortenUrl(String url) async {
|
||||
try {
|
||||
assert(url.isNotEmpty);
|
||||
final Response<String> res = await Dio(dioOptions).post('/', data: <String, String>{'url': url});
|
||||
final Map<String, dynamic> json = jsonDecode(res.data ?? '') as Map<String, dynamic>;
|
||||
print(json);
|
||||
return json['url'] as String?;
|
||||
} catch (err, st) {
|
||||
if (kDebugMode) {
|
||||
print('Encountered an error:');
|
||||
print(st);
|
||||
print(err);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
1
frontend/lib/shrink_ray.dart
Normal file
|
@ -0,0 +1 @@
|
|||
class ShrinkRay {}
|
1
frontend/linux/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
flutter/ephemeral
|
145
frontend/linux/CMakeLists.txt
Normal file
|
@ -0,0 +1,145 @@
|
|||
# Project-level configuration.
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(runner LANGUAGES CXX)
|
||||
|
||||
# The name of the executable created for the application. Change this to change
|
||||
# the on-disk name of your application.
|
||||
set(BINARY_NAME "frontend")
|
||||
# The unique GTK application identifier for this application. See:
|
||||
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
|
||||
set(APPLICATION_ID "com.example.frontend")
|
||||
|
||||
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
|
||||
# versions of CMake.
|
||||
cmake_policy(SET CMP0063 NEW)
|
||||
|
||||
# Load bundled libraries from the lib/ directory relative to the binary.
|
||||
set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
|
||||
|
||||
# Root filesystem for cross-building.
|
||||
if(FLUTTER_TARGET_PLATFORM_SYSROOT)
|
||||
set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT})
|
||||
set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
endif()
|
||||
|
||||
# Define build configuration options.
|
||||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
set(CMAKE_BUILD_TYPE "Debug" CACHE
|
||||
STRING "Flutter build mode" FORCE)
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
|
||||
"Debug" "Profile" "Release")
|
||||
endif()
|
||||
|
||||
# Compilation settings that should be applied to most targets.
|
||||
#
|
||||
# Be cautious about adding new options here, as plugins use this function by
|
||||
# default. In most cases, you should add new options to specific targets instead
|
||||
# of modifying this function.
|
||||
function(APPLY_STANDARD_SETTINGS TARGET)
|
||||
target_compile_features(${TARGET} PUBLIC cxx_std_14)
|
||||
target_compile_options(${TARGET} PRIVATE -Wall -Werror)
|
||||
target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>")
|
||||
target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
|
||||
endfunction()
|
||||
|
||||
# Flutter library and tool build rules.
|
||||
set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
|
||||
add_subdirectory(${FLUTTER_MANAGED_DIR})
|
||||
|
||||
# System-level dependencies.
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
|
||||
|
||||
add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}")
|
||||
|
||||
# Define the application target. To change its name, change BINARY_NAME above,
|
||||
# not the value here, or `flutter run` will no longer work.
|
||||
#
|
||||
# Any new source files that you add to the application should be added here.
|
||||
add_executable(${BINARY_NAME}
|
||||
"main.cc"
|
||||
"my_application.cc"
|
||||
"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
|
||||
)
|
||||
|
||||
# Apply the standard set of build settings. This can be removed for applications
|
||||
# that need different build settings.
|
||||
apply_standard_settings(${BINARY_NAME})
|
||||
|
||||
# Add dependency libraries. Add any application-specific dependencies here.
|
||||
target_link_libraries(${BINARY_NAME} PRIVATE flutter)
|
||||
target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
|
||||
|
||||
# Run the Flutter tool portions of the build. This must not be removed.
|
||||
add_dependencies(${BINARY_NAME} flutter_assemble)
|
||||
|
||||
# Only the install-generated bundle's copy of the executable will launch
|
||||
# correctly, since the resources must in the right relative locations. To avoid
|
||||
# people trying to run the unbundled copy, put it in a subdirectory instead of
|
||||
# the default top-level location.
|
||||
set_target_properties(${BINARY_NAME}
|
||||
PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run"
|
||||
)
|
||||
|
||||
|
||||
# Generated plugin build rules, which manage building the plugins and adding
|
||||
# them to the application.
|
||||
include(flutter/generated_plugins.cmake)
|
||||
|
||||
|
||||
# === Installation ===
|
||||
# By default, "installing" just makes a relocatable bundle in the build
|
||||
# directory.
|
||||
set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")
|
||||
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
|
||||
endif()
|
||||
|
||||
# Start with a clean build bundle directory every time.
|
||||
install(CODE "
|
||||
file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\")
|
||||
" COMPONENT Runtime)
|
||||
|
||||
set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
|
||||
set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
|
||||
install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
|
||||
COMPONENT Runtime)
|
||||
|
||||
install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
|
||||
COMPONENT Runtime)
|
||||
|
||||
install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
||||
COMPONENT Runtime)
|
||||
|
||||
foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})
|
||||
install(FILES "${bundled_library}"
|
||||
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
||||
COMPONENT Runtime)
|
||||
endforeach(bundled_library)
|
||||
|
||||
# Copy the native assets provided by the build.dart from all packages.
|
||||
set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/")
|
||||
install(DIRECTORY "${NATIVE_ASSETS_DIR}"
|
||||
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
||||
COMPONENT Runtime)
|
||||
|
||||
# Fully re-copy the assets directory on each build to avoid having stale files
|
||||
# from a previous install.
|
||||
set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
|
||||
install(CODE "
|
||||
file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
|
||||
" COMPONENT Runtime)
|
||||
install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
|
||||
DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
|
||||
|
||||
# Install the AOT library on non-Debug builds only.
|
||||
if(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
||||
COMPONENT Runtime)
|
||||
endif()
|
88
frontend/linux/flutter/CMakeLists.txt
Normal file
|
@ -0,0 +1,88 @@
|
|||
# This file controls Flutter-level build steps. It should not be edited.
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
|
||||
|
||||
# Configuration provided via flutter tool.
|
||||
include(${EPHEMERAL_DIR}/generated_config.cmake)
|
||||
|
||||
# TODO: Move the rest of this into files in ephemeral. See
|
||||
# https://github.com/flutter/flutter/issues/57146.
|
||||
|
||||
# Serves the same purpose as list(TRANSFORM ... PREPEND ...),
|
||||
# which isn't available in 3.10.
|
||||
function(list_prepend LIST_NAME PREFIX)
|
||||
set(NEW_LIST "")
|
||||
foreach(element ${${LIST_NAME}})
|
||||
list(APPEND NEW_LIST "${PREFIX}${element}")
|
||||
endforeach(element)
|
||||
set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# === Flutter Library ===
|
||||
# System-level dependencies.
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
|
||||
pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
|
||||
pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
|
||||
|
||||
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so")
|
||||
|
||||
# Published to parent scope for install step.
|
||||
set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
|
||||
set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
|
||||
set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
|
||||
set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE)
|
||||
|
||||
list(APPEND FLUTTER_LIBRARY_HEADERS
|
||||
"fl_basic_message_channel.h"
|
||||
"fl_binary_codec.h"
|
||||
"fl_binary_messenger.h"
|
||||
"fl_dart_project.h"
|
||||
"fl_engine.h"
|
||||
"fl_json_message_codec.h"
|
||||
"fl_json_method_codec.h"
|
||||
"fl_message_codec.h"
|
||||
"fl_method_call.h"
|
||||
"fl_method_channel.h"
|
||||
"fl_method_codec.h"
|
||||
"fl_method_response.h"
|
||||
"fl_plugin_registrar.h"
|
||||
"fl_plugin_registry.h"
|
||||
"fl_standard_message_codec.h"
|
||||
"fl_standard_method_codec.h"
|
||||
"fl_string_codec.h"
|
||||
"fl_value.h"
|
||||
"fl_view.h"
|
||||
"flutter_linux.h"
|
||||
)
|
||||
list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/")
|
||||
add_library(flutter INTERFACE)
|
||||
target_include_directories(flutter INTERFACE
|
||||
"${EPHEMERAL_DIR}"
|
||||
)
|
||||
target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}")
|
||||
target_link_libraries(flutter INTERFACE
|
||||
PkgConfig::GTK
|
||||
PkgConfig::GLIB
|
||||
PkgConfig::GIO
|
||||
)
|
||||
add_dependencies(flutter flutter_assemble)
|
||||
|
||||
# === Flutter tool backend ===
|
||||
# _phony_ is a non-existent file to force this command to run every time,
|
||||
# since currently there's no way to get a full input/output list from the
|
||||
# flutter tool.
|
||||
add_custom_command(
|
||||
OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/_phony_
|
||||
COMMAND ${CMAKE_COMMAND} -E env
|
||||
${FLUTTER_TOOL_ENVIRONMENT}
|
||||
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
|
||||
${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(flutter_assemble DEPENDS
|
||||
"${FLUTTER_LIBRARY}"
|
||||
${FLUTTER_LIBRARY_HEADERS}
|
||||
)
|
15
frontend/linux/flutter/generated_plugin_registrant.cc
Normal file
|
@ -0,0 +1,15 @@
|
|||
//
|
||||
// Generated file. Do not edit.
|
||||
//
|
||||
|
||||
// clang-format off
|
||||
|
||||
#include "generated_plugin_registrant.h"
|
||||
|
||||
#include <url_launcher_linux/url_launcher_plugin.h>
|
||||
|
||||
void fl_register_plugins(FlPluginRegistry* registry) {
|
||||
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
|
||||
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
|
||||
}
|
15
frontend/linux/flutter/generated_plugin_registrant.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
//
|
||||
// Generated file. Do not edit.
|
||||
//
|
||||
|
||||
// clang-format off
|
||||
|
||||
#ifndef GENERATED_PLUGIN_REGISTRANT_
|
||||
#define GENERATED_PLUGIN_REGISTRANT_
|
||||
|
||||
#include <flutter_linux/flutter_linux.h>
|
||||
|
||||
// Registers Flutter plugins.
|
||||
void fl_register_plugins(FlPluginRegistry* registry);
|
||||
|
||||
#endif // GENERATED_PLUGIN_REGISTRANT_
|
24
frontend/linux/flutter/generated_plugins.cmake
Normal file
|
@ -0,0 +1,24 @@
|
|||
#
|
||||
# Generated file, do not edit.
|
||||
#
|
||||
|
||||
list(APPEND FLUTTER_PLUGIN_LIST
|
||||
url_launcher_linux
|
||||
)
|
||||
|
||||
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||
)
|
||||
|
||||
set(PLUGIN_BUNDLED_LIBRARIES)
|
||||
|
||||
foreach(plugin ${FLUTTER_PLUGIN_LIST})
|
||||
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})
|
||||
target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
|
||||
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
|
||||
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
|
||||
endforeach(plugin)
|
||||
|
||||
foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
|
||||
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
|
||||
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
|
||||
endforeach(ffi_plugin)
|
6
frontend/linux/main.cc
Normal file
|
@ -0,0 +1,6 @@
|
|||
#include "my_application.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
g_autoptr(MyApplication) app = my_application_new();
|
||||
return g_application_run(G_APPLICATION(app), argc, argv);
|
||||
}
|
124
frontend/linux/my_application.cc
Normal file
|
@ -0,0 +1,124 @@
|
|||
#include "my_application.h"
|
||||
|
||||
#include <flutter_linux/flutter_linux.h>
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
#include <gdk/gdkx.h>
|
||||
#endif
|
||||
|
||||
#include "flutter/generated_plugin_registrant.h"
|
||||
|
||||
struct _MyApplication {
|
||||
GtkApplication parent_instance;
|
||||
char** dart_entrypoint_arguments;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)
|
||||
|
||||
// Implements GApplication::activate.
|
||||
static void my_application_activate(GApplication* application) {
|
||||
MyApplication* self = MY_APPLICATION(application);
|
||||
GtkWindow* window =
|
||||
GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));
|
||||
|
||||
// Use a header bar when running in GNOME as this is the common style used
|
||||
// by applications and is the setup most users will be using (e.g. Ubuntu
|
||||
// desktop).
|
||||
// If running on X and not using GNOME then just use a traditional title bar
|
||||
// in case the window manager does more exotic layout, e.g. tiling.
|
||||
// If running on Wayland assume the header bar will work (may need changing
|
||||
// if future cases occur).
|
||||
gboolean use_header_bar = TRUE;
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
GdkScreen* screen = gtk_window_get_screen(window);
|
||||
if (GDK_IS_X11_SCREEN(screen)) {
|
||||
const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen);
|
||||
if (g_strcmp0(wm_name, "GNOME Shell") != 0) {
|
||||
use_header_bar = FALSE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (use_header_bar) {
|
||||
GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
|
||||
gtk_widget_show(GTK_WIDGET(header_bar));
|
||||
gtk_header_bar_set_title(header_bar, "frontend");
|
||||
gtk_header_bar_set_show_close_button(header_bar, TRUE);
|
||||
gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
|
||||
} else {
|
||||
gtk_window_set_title(window, "frontend");
|
||||
}
|
||||
|
||||
gtk_window_set_default_size(window, 1280, 720);
|
||||
gtk_widget_show(GTK_WIDGET(window));
|
||||
|
||||
g_autoptr(FlDartProject) project = fl_dart_project_new();
|
||||
fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);
|
||||
|
||||
FlView* view = fl_view_new(project);
|
||||
gtk_widget_show(GTK_WIDGET(view));
|
||||
gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));
|
||||
|
||||
fl_register_plugins(FL_PLUGIN_REGISTRY(view));
|
||||
|
||||
gtk_widget_grab_focus(GTK_WIDGET(view));
|
||||
}
|
||||
|
||||
// Implements GApplication::local_command_line.
|
||||
static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) {
|
||||
MyApplication* self = MY_APPLICATION(application);
|
||||
// Strip out the first argument as it is the binary name.
|
||||
self->dart_entrypoint_arguments = g_strdupv(*arguments + 1);
|
||||
|
||||
g_autoptr(GError) error = nullptr;
|
||||
if (!g_application_register(application, nullptr, &error)) {
|
||||
g_warning("Failed to register: %s", error->message);
|
||||
*exit_status = 1;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
g_application_activate(application);
|
||||
*exit_status = 0;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// Implements GApplication::startup.
|
||||
static void my_application_startup(GApplication* application) {
|
||||
//MyApplication* self = MY_APPLICATION(object);
|
||||
|
||||
// Perform any actions required at application startup.
|
||||
|
||||
G_APPLICATION_CLASS(my_application_parent_class)->startup(application);
|
||||
}
|
||||
|
||||
// Implements GApplication::shutdown.
|
||||
static void my_application_shutdown(GApplication* application) {
|
||||
//MyApplication* self = MY_APPLICATION(object);
|
||||
|
||||
// Perform any actions required at application shutdown.
|
||||
|
||||
G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application);
|
||||
}
|
||||
|
||||
// Implements GObject::dispose.
|
||||
static void my_application_dispose(GObject* object) {
|
||||
MyApplication* self = MY_APPLICATION(object);
|
||||
g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev);
|
||||
G_OBJECT_CLASS(my_application_parent_class)->dispose(object);
|
||||
}
|
||||
|
||||
static void my_application_class_init(MyApplicationClass* klass) {
|
||||
G_APPLICATION_CLASS(klass)->activate = my_application_activate;
|
||||
G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line;
|
||||
G_APPLICATION_CLASS(klass)->startup = my_application_startup;
|
||||
G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown;
|
||||
G_OBJECT_CLASS(klass)->dispose = my_application_dispose;
|
||||
}
|
||||
|
||||
static void my_application_init(MyApplication* self) {}
|
||||
|
||||
MyApplication* my_application_new() {
|
||||
return MY_APPLICATION(g_object_new(my_application_get_type(),
|
||||
"application-id", APPLICATION_ID,
|
||||
"flags", G_APPLICATION_NON_UNIQUE,
|
||||
nullptr));
|
||||
}
|
18
frontend/linux/my_application.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
#ifndef FLUTTER_MY_APPLICATION_H_
|
||||
#define FLUTTER_MY_APPLICATION_H_
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION,
|
||||
GtkApplication)
|
||||
|
||||
/**
|
||||
* my_application_new:
|
||||
*
|
||||
* Creates a new Flutter-based application.
|
||||
*
|
||||
* Returns: a new #MyApplication.
|
||||
*/
|
||||
MyApplication* my_application_new();
|
||||
|
||||
#endif // FLUTTER_MY_APPLICATION_H_
|
322
frontend/pubspec.lock
Normal file
|
@ -0,0 +1,322 @@
|
|||
# Generated by pub
|
||||
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||
packages:
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: async
|
||||
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.11.0"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: boolean_selector
|
||||
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
characters:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: characters
|
||||
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
clock:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: clock
|
||||
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: collection
|
||||
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.18.0"
|
||||
dio:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: dio
|
||||
sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.7.0"
|
||||
dio_web_adapter:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: dio_web_adapter
|
||||
sha256: "33259a9276d6cea88774a0000cfae0d861003497755969c92faa223108620dc8"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
fake_async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: fake_async
|
||||
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.1"
|
||||
flutter:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_lints:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: flutter_lints
|
||||
sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.2"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_web_plugins:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
http_parser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http_parser
|
||||
sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.0.2"
|
||||
leak_tracker:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker
|
||||
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "10.0.4"
|
||||
leak_tracker_flutter_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker_flutter_testing
|
||||
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.3"
|
||||
leak_tracker_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker_testing
|
||||
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.1"
|
||||
lints:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: lints
|
||||
sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.12.16+1"
|
||||
material_color_utilities:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: material_color_utilities
|
||||
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.8.0"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.12.0"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path
|
||||
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.9.0"
|
||||
plugin_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: plugin_platform_interface
|
||||
sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.8"
|
||||
sky_engine:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.99"
|
||||
source_span:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_span
|
||||
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.10.0"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stack_trace
|
||||
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.11.1"
|
||||
stream_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stream_channel
|
||||
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: string_scanner
|
||||
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: term_glyph
|
||||
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.1"
|
||||
test_api:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.7.0"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: typed_data
|
||||
sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.2"
|
||||
url_launcher:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: url_launcher
|
||||
sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.3.1"
|
||||
url_launcher_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_android
|
||||
sha256: f0c73347dfcfa5b3db8bc06e1502668265d39c08f310c29bff4e28eea9699f79
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.3.9"
|
||||
url_launcher_ios:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_ios
|
||||
sha256: e43b677296fadce447e987a2f519dcf5f6d1e527dc35d01ffab4fff5b8a7063e
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.3.1"
|
||||
url_launcher_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_linux
|
||||
sha256: e2b9622b4007f97f504cd64c0128309dfb978ae66adbe944125ed9e1750f06af
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.2.0"
|
||||
url_launcher_macos:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_macos
|
||||
sha256: "769549c999acdb42b8bcfa7c43d72bf79a382ca7441ab18a808e101149daf672"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.2.1"
|
||||
url_launcher_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_platform_interface
|
||||
sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.2"
|
||||
url_launcher_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_web
|
||||
sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.3"
|
||||
url_launcher_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_windows
|
||||
sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.2"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vector_math
|
||||
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
vm_service:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vm_service
|
||||
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "14.2.1"
|
||||
web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: web
|
||||
sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
sdks:
|
||||
dart: ">=3.4.3 <4.0.0"
|
||||
flutter: ">=3.22.0"
|
22
frontend/pubspec.yaml
Normal file
|
@ -0,0 +1,22 @@
|
|||
name: frontend
|
||||
description: "Url Shortner"
|
||||
publish_to: 'none'
|
||||
|
||||
version: 1.0.0+1
|
||||
|
||||
environment:
|
||||
sdk: '>=3.4.3 <4.0.0'
|
||||
|
||||
dependencies:
|
||||
dio: ^5.7.0
|
||||
flutter:
|
||||
sdk: flutter
|
||||
url_launcher: ^6.3.1
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
flutter_lints: ^3.0.0
|
||||
|
||||
flutter:
|
||||
uses-material-design: true
|
30
frontend/test/widget_test.dart
Normal file
|
@ -0,0 +1,30 @@
|
|||
// This is a basic Flutter widget test.
|
||||
//
|
||||
// To perform an interaction with a widget in your test, use the WidgetTester
|
||||
// utility in the flutter_test package. For example, you can send tap and scroll
|
||||
// gestures. You can also use WidgetTester to find child widgets in the widget
|
||||
// tree, read text, and verify that the values of widget properties are correct.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import 'package:frontend/main.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
|
||||
// Build our app and trigger a frame.
|
||||
await tester.pumpWidget(const MyApp());
|
||||
|
||||
// Verify that our counter starts at 0.
|
||||
expect(find.text('0'), findsOneWidget);
|
||||
expect(find.text('1'), findsNothing);
|
||||
|
||||
// Tap the '+' icon and trigger a frame.
|
||||
await tester.tap(find.byIcon(Icons.add));
|
||||
await tester.pump();
|
||||
|
||||
// Verify that our counter has incremented.
|
||||
expect(find.text('0'), findsNothing);
|
||||
expect(find.text('1'), findsOneWidget);
|
||||
});
|
||||
}
|
BIN
frontend/web/favicon.png
Normal file
After Width: | Height: | Size: 917 B |
BIN
frontend/web/icons/Icon-192.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
frontend/web/icons/Icon-512.png
Normal file
After Width: | Height: | Size: 8.1 KiB |
BIN
frontend/web/icons/Icon-maskable-192.png
Normal file
After Width: | Height: | Size: 5.5 KiB |
BIN
frontend/web/icons/Icon-maskable-512.png
Normal file
After Width: | Height: | Size: 20 KiB |
38
frontend/web/index.html
Normal file
|
@ -0,0 +1,38 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!--
|
||||
If you are serving your web app in a path other than the root, change the
|
||||
href value below to reflect the base path you are serving from.
|
||||
|
||||
The path provided below has to start and end with a slash "/" in order for
|
||||
it to work correctly.
|
||||
|
||||
For more details:
|
||||
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
|
||||
|
||||
This is a placeholder for base href that will be replaced by the value of
|
||||
the `--base-href` argument provided to `flutter build`.
|
||||
-->
|
||||
<base href="$FLUTTER_BASE_HREF">
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
|
||||
<meta name="description" content="A new Flutter project.">
|
||||
|
||||
<!-- iOS meta tags & icons -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-title" content="frontend">
|
||||
<link rel="apple-touch-icon" href="icons/Icon-192.png">
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" type="image/png" href="favicon.png"/>
|
||||
|
||||
<title>frontend</title>
|
||||
<link rel="manifest" href="manifest.json">
|
||||
</head>
|
||||
<body>
|
||||
<script src="flutter_bootstrap.js" async></script>
|
||||
</body>
|
||||
</html>
|
35
frontend/web/manifest.json
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"name": "frontend",
|
||||
"short_name": "frontend",
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"background_color": "#0175C2",
|
||||
"theme_color": "#0175C2",
|
||||
"description": "A new Flutter project.",
|
||||
"orientation": "portrait-primary",
|
||||
"prefer_related_applications": false,
|
||||
"icons": [
|
||||
{
|
||||
"src": "icons/Icon-192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "icons/Icon-512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "icons/Icon-maskable-192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "icons/Icon-maskable-512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
}
|
||||
]
|
||||
}
|
16
new_backend/.gitignore
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
# See https://www.dartlang.org/guides/libraries/private-files
|
||||
|
||||
# Files and directories created by the Operating System
|
||||
.DS_Store
|
||||
|
||||
# Files and directories created by pub
|
||||
.dart_tool/
|
||||
.packages
|
||||
pubspec.lock
|
||||
|
||||
# Files and directories created by dart_frog
|
||||
build/
|
||||
.dart_frog
|
||||
|
||||
# Test related files
|
||||
coverage/
|
12
new_backend/README.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
# new_backend
|
||||
|
||||
[![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link]
|
||||
[![License: MIT][license_badge]][license_link]
|
||||
[![Powered by Dart Frog](https://img.shields.io/endpoint?url=https://tinyurl.com/dartfrog-badge)](https://dartfrog.vgv.dev)
|
||||
|
||||
An example application built with dart_frog
|
||||
|
||||
[license_badge]: https://img.shields.io/badge/license-MIT-blue.svg
|
||||
[license_link]: https://opensource.org/licenses/MIT
|
||||
[very_good_analysis_badge]: https://img.shields.io/badge/style-very_good_analysis-B22C89.svg
|
||||
[very_good_analysis_link]: https://pub.dev/packages/very_good_analysis
|
7
new_backend/analysis_options.yaml
Normal file
|
@ -0,0 +1,7 @@
|
|||
include: package:very_good_analysis/analysis_options.5.1.0.yaml
|
||||
analyzer:
|
||||
exclude:
|
||||
- build/**
|
||||
linter:
|
||||
rules:
|
||||
file_names: false
|
36
new_backend/lib/shrink_ray.dart
Normal file
|
@ -0,0 +1,36 @@
|
|||
// ignore_for_file: public_member_api_docs
|
||||
|
||||
enum Status { ok, error }
|
||||
|
||||
class ShrinkRay {
|
||||
static const shrinkLength = 6;
|
||||
static const String shrinkChars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._';
|
||||
|
||||
static ({Status status, String content}) shrinkUrl(String urlStr) {
|
||||
try {
|
||||
final uri = Uri.parse(urlStr);
|
||||
if (!uri.isScheme('HTTP') && !uri.isScheme('HTTPS') || uri.hasPort) {
|
||||
throw const FormatException();
|
||||
}
|
||||
|
||||
final hash = uri.hashCode;
|
||||
return (status: Status.ok, content: _translate(hash));
|
||||
} on FormatException {
|
||||
return (status: Status.error, content: 'Invalid Uri');
|
||||
} catch (err, st) {
|
||||
print('Unknown error occurred: $err');
|
||||
print(st);
|
||||
return (status: Status.error, content: 'Unknown error occurred');
|
||||
}
|
||||
}
|
||||
|
||||
static String _translate(int hash, {String builtTranslation = ''}) {
|
||||
if (builtTranslation.length == shrinkLength) return builtTranslation;
|
||||
final index = hash % shrinkChars.length;
|
||||
final translation = builtTranslation + shrinkChars.substring(index, index + 1);
|
||||
final shiftedHash = hash << 1;
|
||||
return _translate(shiftedHash, builtTranslation: translation);
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, String> shrunkUrls = {};
|
1
new_backend/public/.last_build_id
Normal file
|
@ -0,0 +1 @@
|
|||
5389598c2a36d064db55a8edf57e320f
|
BIN
new_backend/public/assets/AssetManifest.bin
Normal file
1
new_backend/public/assets/AssetManifest.bin.json
Normal file
|
@ -0,0 +1 @@
|
|||
"DQA="
|
1
new_backend/public/assets/AssetManifest.json
Normal file
|
@ -0,0 +1 @@
|
|||
{}
|
1
new_backend/public/assets/FontManifest.json
Normal file
|
@ -0,0 +1 @@
|
|||
[{"family":"MaterialIcons","fonts":[{"asset":"fonts/MaterialIcons-Regular.otf"}]}]
|
34366
new_backend/public/assets/NOTICES
Normal file
BIN
new_backend/public/assets/fonts/MaterialIcons-Regular.otf
Normal file
126
new_backend/public/assets/shaders/ink_sparkle.frag
Normal file
217
new_backend/public/canvaskit/canvaskit.js
Normal file
|
@ -0,0 +1,217 @@
|
|||
|
||||
var CanvasKitInit = (() => {
|
||||
var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
|
||||
if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename;
|
||||
return (
|
||||
function(moduleArg = {}) {
|
||||
|
||||
var r=moduleArg,aa,ba;r.ready=new Promise((a,b)=>{aa=a;ba=b});
|
||||
(function(a){a.Md=a.Md||[];a.Md.push(function(){a.MakeSWCanvasSurface=function(b){var c=b,d="undefined"!==typeof OffscreenCanvas&&c instanceof OffscreenCanvas;if(!("undefined"!==typeof HTMLCanvasElement&&c instanceof HTMLCanvasElement||d||(c=document.getElementById(b),c)))throw"Canvas with id "+b+" was not found";if(b=a.MakeSurface(c.width,c.height))b.me=c;return b};a.MakeCanvasSurface||(a.MakeCanvasSurface=a.MakeSWCanvasSurface);a.MakeSurface=function(b,c){var d={width:b,height:c,colorType:a.ColorType.RGBA_8888,
|
||||
alphaType:a.AlphaType.Unpremul,colorSpace:a.ColorSpace.SRGB},f=b*c*4,k=a._malloc(f);if(d=a.Surface._makeRasterDirect(d,k,4*b))d.me=null,d.Ue=b,d.Re=c,d.Se=f,d.xe=k,d.getCanvas().clear(a.TRANSPARENT);return d};a.MakeRasterDirectSurface=function(b,c,d){return a.Surface._makeRasterDirect(b,c.byteOffset,d)};a.Surface.prototype.flush=function(b){a.Jd(this.Id);this._flush();if(this.me){var c=new Uint8ClampedArray(a.HEAPU8.buffer,this.xe,this.Se);c=new ImageData(c,this.Ue,this.Re);b?this.me.getContext("2d").putImageData(c,
|
||||
0,0,b[0],b[1],b[2]-b[0],b[3]-b[1]):this.me.getContext("2d").putImageData(c,0,0)}};a.Surface.prototype.dispose=function(){this.xe&&a._free(this.xe);this.delete()};a.Jd=a.Jd||function(){};a.ne=a.ne||function(){return null}})})(r);
|
||||
(function(a){a.Md=a.Md||[];a.Md.push(function(){function b(m,p,w){return m&&m.hasOwnProperty(p)?m[p]:w}function c(m){var p=da(ea);ea[p]=m;return p}function d(m){return m.naturalHeight||m.videoHeight||m.displayHeight||m.height}function f(m){return m.naturalWidth||m.videoWidth||m.displayWidth||m.width}function k(m,p,w,y){m.bindTexture(m.TEXTURE_2D,p);y||w.alphaType!==a.AlphaType.Premul||m.pixelStorei(m.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);return p}function l(m,p,w){w||p.alphaType!==a.AlphaType.Premul||
|
||||
m.pixelStorei(m.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1);m.bindTexture(m.TEXTURE_2D,null)}a.GetWebGLContext=function(m,p){if(!m)throw"null canvas passed into makeWebGLContext";var w={alpha:b(p,"alpha",1),depth:b(p,"depth",1),stencil:b(p,"stencil",8),antialias:b(p,"antialias",0),premultipliedAlpha:b(p,"premultipliedAlpha",1),preserveDrawingBuffer:b(p,"preserveDrawingBuffer",0),preferLowPowerToHighPerformance:b(p,"preferLowPowerToHighPerformance",0),failIfMajorPerformanceCaveat:b(p,"failIfMajorPerformanceCaveat",
|
||||
0),enableExtensionsByDefault:b(p,"enableExtensionsByDefault",1),explicitSwapControl:b(p,"explicitSwapControl",0),renderViaOffscreenBackBuffer:b(p,"renderViaOffscreenBackBuffer",0)};w.majorVersion=p&&p.majorVersion?p.majorVersion:"undefined"!==typeof WebGL2RenderingContext?2:1;if(w.explicitSwapControl)throw"explicitSwapControl is not supported";m=fa(m,w);if(!m)return 0;ha(m);v.Ud.getExtension("WEBGL_debug_renderer_info");return m};a.deleteContext=function(m){v===ia[m]&&(v=null);"object"==typeof JSEvents&&
|
||||
JSEvents.yf(ia[m].Ud.canvas);ia[m]&&ia[m].Ud.canvas&&(ia[m].Ud.canvas.Oe=void 0);ia[m]=null};a._setTextureCleanup({deleteTexture:function(m,p){var w=ea[p];w&&ia[m].Ud.deleteTexture(w);ea[p]=null}});a.MakeWebGLContext=function(m){if(!this.Jd(m))return null;var p=this._MakeGrContext();if(!p)return null;p.Id=m;var w=p.delete.bind(p);p["delete"]=function(){a.Jd(this.Id);w()}.bind(p);return v.ze=p};a.MakeGrContext=a.MakeWebGLContext;a.GrDirectContext.prototype.getResourceCacheLimitBytes=function(){a.Jd(this.Id);
|
||||
this._getResourceCacheLimitBytes()};a.GrDirectContext.prototype.getResourceCacheUsageBytes=function(){a.Jd(this.Id);this._getResourceCacheUsageBytes()};a.GrDirectContext.prototype.releaseResourcesAndAbandonContext=function(){a.Jd(this.Id);this._releaseResourcesAndAbandonContext()};a.GrDirectContext.prototype.setResourceCacheLimitBytes=function(m){a.Jd(this.Id);this._setResourceCacheLimitBytes(m)};a.MakeOnScreenGLSurface=function(m,p,w,y,B,D){if(!this.Jd(m.Id))return null;p=void 0===B||void 0===D?
|
||||
this._MakeOnScreenGLSurface(m,p,w,y):this._MakeOnScreenGLSurface(m,p,w,y,B,D);if(!p)return null;p.Id=m.Id;return p};a.MakeRenderTarget=function(){var m=arguments[0];if(!this.Jd(m.Id))return null;if(3===arguments.length){var p=this._MakeRenderTargetWH(m,arguments[1],arguments[2]);if(!p)return null}else if(2===arguments.length){if(p=this._MakeRenderTargetII(m,arguments[1]),!p)return null}else return null;p.Id=m.Id;return p};a.MakeWebGLCanvasSurface=function(m,p,w){p=p||null;var y=m,B="undefined"!==
|
||||
typeof OffscreenCanvas&&y instanceof OffscreenCanvas;if(!("undefined"!==typeof HTMLCanvasElement&&y instanceof HTMLCanvasElement||B||(y=document.getElementById(m),y)))throw"Canvas with id "+m+" was not found";m=this.GetWebGLContext(y,w);if(!m||0>m)throw"failed to create webgl context: err "+m;m=this.MakeWebGLContext(m);p=this.MakeOnScreenGLSurface(m,y.width,y.height,p);return p?p:(p=y.cloneNode(!0),y.parentNode.replaceChild(p,y),p.classList.add("ck-replaced"),a.MakeSWCanvasSurface(p))};a.MakeCanvasSurface=
|
||||
a.MakeWebGLCanvasSurface;a.Surface.prototype.makeImageFromTexture=function(m,p){a.Jd(this.Id);m=c(m);if(p=this._makeImageFromTexture(this.Id,m,p))p.he=m;return p};a.Surface.prototype.makeImageFromTextureSource=function(m,p,w){p||(p={height:d(m),width:f(m),colorType:a.ColorType.RGBA_8888,alphaType:w?a.AlphaType.Premul:a.AlphaType.Unpremul});p.colorSpace||(p.colorSpace=a.ColorSpace.SRGB);a.Jd(this.Id);var y=v.Ud;w=k(y,y.createTexture(),p,w);2===v.version?y.texImage2D(y.TEXTURE_2D,0,y.RGBA,p.width,p.height,
|
||||
0,y.RGBA,y.UNSIGNED_BYTE,m):y.texImage2D(y.TEXTURE_2D,0,y.RGBA,y.RGBA,y.UNSIGNED_BYTE,m);l(y,p);this._resetContext();return this.makeImageFromTexture(w,p)};a.Surface.prototype.updateTextureFromSource=function(m,p,w){if(m.he){a.Jd(this.Id);var y=m.getImageInfo(),B=v.Ud,D=k(B,ea[m.he],y,w);2===v.version?B.texImage2D(B.TEXTURE_2D,0,B.RGBA,f(p),d(p),0,B.RGBA,B.UNSIGNED_BYTE,p):B.texImage2D(B.TEXTURE_2D,0,B.RGBA,B.RGBA,B.UNSIGNED_BYTE,p);l(B,y,w);this._resetContext();ea[m.he]=null;m.he=c(D);y.colorSpace=
|
||||
m.getColorSpace();p=this._makeImageFromTexture(this.Id,m.he,y);w=m.kd.Kd;B=m.kd.Pd;m.kd.Kd=p.kd.Kd;m.kd.Pd=p.kd.Pd;p.kd.Kd=w;p.kd.Pd=B;p.delete();y.colorSpace.delete()}};a.MakeLazyImageFromTextureSource=function(m,p,w){p||(p={height:d(m),width:f(m),colorType:a.ColorType.RGBA_8888,alphaType:w?a.AlphaType.Premul:a.AlphaType.Unpremul});p.colorSpace||(p.colorSpace=a.ColorSpace.SRGB);var y={makeTexture:function(){var B=v,D=B.Ud,u=k(D,D.createTexture(),p,w);2===B.version?D.texImage2D(D.TEXTURE_2D,0,D.RGBA,
|
||||
p.width,p.height,0,D.RGBA,D.UNSIGNED_BYTE,m):D.texImage2D(D.TEXTURE_2D,0,D.RGBA,D.RGBA,D.UNSIGNED_BYTE,m);l(D,p,w);return c(u)},freeSrc:function(){}};"VideoFrame"===m.constructor.name&&(y.freeSrc=function(){m.close()});return a.Image._makeFromGenerator(p,y)};a.Jd=function(m){return m?ha(m):!1};a.ne=function(){return v&&v.ze&&!v.ze.isDeleted()?v.ze:null}})})(r);
|
||||
(function(a){function b(g){return(f(255*g[3])<<24|f(255*g[0])<<16|f(255*g[1])<<8|f(255*g[2])<<0)>>>0}function c(g){if(g&&g._ck)return g;if(g instanceof Float32Array){for(var e=Math.floor(g.length/4),h=new Uint32Array(e),n=0;n<e;n++)h[n]=b(g.slice(4*n,4*(n+1)));return h}if(g instanceof Uint32Array)return g;if(g instanceof Array&&g[0]instanceof Float32Array)return g.map(b)}function d(g){if(void 0===g)return 1;var e=parseFloat(g);return g&&-1!==g.indexOf("%")?e/100:e}function f(g){return Math.round(Math.max(0,
|
||||
Math.min(g||0,255)))}function k(g,e){e&&e._ck||a._free(g)}function l(g,e,h){if(!g||!g.length)return M;if(g&&g._ck)return g.byteOffset;var n=a[e].BYTES_PER_ELEMENT;h||(h=a._malloc(g.length*n));a[e].set(g,h/n);return h}function m(g){var e={Rd:M,count:g.length,colorType:a.ColorType.RGBA_F32};if(g instanceof Float32Array)e.Rd=l(g,"HEAPF32"),e.count=g.length/4;else if(g instanceof Uint32Array)e.Rd=l(g,"HEAPU32"),e.colorType=a.ColorType.RGBA_8888;else if(g instanceof Array){if(g&&g.length){for(var h=a._malloc(16*
|
||||
g.length),n=0,t=h/4,x=0;x<g.length;x++)for(var z=0;4>z;z++)a.HEAPF32[t+n]=g[x][z],n++;g=h}else g=M;e.Rd=g}else throw"Invalid argument to copyFlexibleColorArray, Not a color array "+typeof g;return e}function p(g){if(!g)return M;var e=T.toTypedArray();if(g.length){if(6===g.length||9===g.length)return l(g,"HEAPF32",H),6===g.length&&a.HEAPF32.set(fd,6+H/4),H;if(16===g.length)return e[0]=g[0],e[1]=g[1],e[2]=g[3],e[3]=g[4],e[4]=g[5],e[5]=g[7],e[6]=g[12],e[7]=g[13],e[8]=g[15],H;throw"invalid matrix size";
|
||||
}if(void 0===g.m11)throw"invalid matrix argument";e[0]=g.m11;e[1]=g.m21;e[2]=g.m41;e[3]=g.m12;e[4]=g.m22;e[5]=g.m42;e[6]=g.m14;e[7]=g.m24;e[8]=g.m44;return H}function w(g){if(!g)return M;var e=Y.toTypedArray();if(g.length){if(16!==g.length&&6!==g.length&&9!==g.length)throw"invalid matrix size";if(16===g.length)return l(g,"HEAPF32",ca);e.fill(0);e[0]=g[0];e[1]=g[1];e[3]=g[2];e[4]=g[3];e[5]=g[4];e[7]=g[5];e[10]=1;e[12]=g[6];e[13]=g[7];e[15]=g[8];6===g.length&&(e[12]=0,e[13]=0,e[15]=1);return ca}if(void 0===
|
||||
g.m11)throw"invalid matrix argument";e[0]=g.m11;e[1]=g.m21;e[2]=g.m31;e[3]=g.m41;e[4]=g.m12;e[5]=g.m22;e[6]=g.m32;e[7]=g.m42;e[8]=g.m13;e[9]=g.m23;e[10]=g.m33;e[11]=g.m43;e[12]=g.m14;e[13]=g.m24;e[14]=g.m34;e[15]=g.m44;return ca}function y(g,e){return l(g,"HEAPF32",e||va)}function B(g,e,h,n){var t=Ma.toTypedArray();t[0]=g;t[1]=e;t[2]=h;t[3]=n;return va}function D(g){for(var e=new Float32Array(4),h=0;4>h;h++)e[h]=a.HEAPF32[g/4+h];return e}function u(g,e){return l(g,"HEAPF32",e||X)}function F(g,e){return l(g,
|
||||
"HEAPF32",e||Eb)}a.Color=function(g,e,h,n){void 0===n&&(n=1);return a.Color4f(f(g)/255,f(e)/255,f(h)/255,n)};a.ColorAsInt=function(g,e,h,n){void 0===n&&(n=255);return(f(n)<<24|f(g)<<16|f(e)<<8|f(h)<<0&268435455)>>>0};a.Color4f=function(g,e,h,n){void 0===n&&(n=1);return Float32Array.of(g,e,h,n)};Object.defineProperty(a,"TRANSPARENT",{get:function(){return a.Color4f(0,0,0,0)}});Object.defineProperty(a,"BLACK",{get:function(){return a.Color4f(0,0,0,1)}});Object.defineProperty(a,"WHITE",{get:function(){return a.Color4f(1,
|
||||
1,1,1)}});Object.defineProperty(a,"RED",{get:function(){return a.Color4f(1,0,0,1)}});Object.defineProperty(a,"GREEN",{get:function(){return a.Color4f(0,1,0,1)}});Object.defineProperty(a,"BLUE",{get:function(){return a.Color4f(0,0,1,1)}});Object.defineProperty(a,"YELLOW",{get:function(){return a.Color4f(1,1,0,1)}});Object.defineProperty(a,"CYAN",{get:function(){return a.Color4f(0,1,1,1)}});Object.defineProperty(a,"MAGENTA",{get:function(){return a.Color4f(1,0,1,1)}});a.getColorComponents=function(g){return[Math.floor(255*
|
||||
g[0]),Math.floor(255*g[1]),Math.floor(255*g[2]),g[3]]};a.parseColorString=function(g,e){g=g.toLowerCase();if(g.startsWith("#")){e=255;switch(g.length){case 9:e=parseInt(g.slice(7,9),16);case 7:var h=parseInt(g.slice(1,3),16);var n=parseInt(g.slice(3,5),16);var t=parseInt(g.slice(5,7),16);break;case 5:e=17*parseInt(g.slice(4,5),16);case 4:h=17*parseInt(g.slice(1,2),16),n=17*parseInt(g.slice(2,3),16),t=17*parseInt(g.slice(3,4),16)}return a.Color(h,n,t,e/255)}return g.startsWith("rgba")?(g=g.slice(5,
|
||||
-1),g=g.split(","),a.Color(+g[0],+g[1],+g[2],d(g[3]))):g.startsWith("rgb")?(g=g.slice(4,-1),g=g.split(","),a.Color(+g[0],+g[1],+g[2],d(g[3]))):g.startsWith("gray(")||g.startsWith("hsl")||!e||(g=e[g],void 0===g)?a.BLACK:g};a.multiplyByAlpha=function(g,e){g=g.slice();g[3]=Math.max(0,Math.min(g[3]*e,1));return g};a.Malloc=function(g,e){var h=a._malloc(e*g.BYTES_PER_ELEMENT);return{_ck:!0,length:e,byteOffset:h,be:null,subarray:function(n,t){n=this.toTypedArray().subarray(n,t);n._ck=!0;return n},toTypedArray:function(){if(this.be&&
|
||||
this.be.length)return this.be;this.be=new g(a.HEAPU8.buffer,h,e);this.be._ck=!0;return this.be}}};a.Free=function(g){a._free(g.byteOffset);g.byteOffset=M;g.toTypedArray=null;g.be=null};var H=M,T,ca=M,Y,va=M,Ma,na,X=M,fc,Ba=M,gc,Fb=M,hc,Gb=M,hb,Sa=M,ic,Eb=M,jc,kc=M,fd=Float32Array.of(0,0,1),M=0;a.onRuntimeInitialized=function(){function g(e,h,n,t,x,z,E){z||(z=4*t.width,t.colorType===a.ColorType.RGBA_F16?z*=2:t.colorType===a.ColorType.RGBA_F32&&(z*=4));var J=z*t.height;var I=x?x.byteOffset:a._malloc(J);
|
||||
if(E?!e._readPixels(t,I,z,h,n,E):!e._readPixels(t,I,z,h,n))return x||a._free(I),null;if(x)return x.toTypedArray();switch(t.colorType){case a.ColorType.RGBA_8888:case a.ColorType.RGBA_F16:e=(new Uint8Array(a.HEAPU8.buffer,I,J)).slice();break;case a.ColorType.RGBA_F32:e=(new Float32Array(a.HEAPU8.buffer,I,J)).slice();break;default:return null}a._free(I);return e}Ma=a.Malloc(Float32Array,4);va=Ma.byteOffset;Y=a.Malloc(Float32Array,16);ca=Y.byteOffset;T=a.Malloc(Float32Array,9);H=T.byteOffset;ic=a.Malloc(Float32Array,
|
||||
12);Eb=ic.byteOffset;jc=a.Malloc(Float32Array,12);kc=jc.byteOffset;na=a.Malloc(Float32Array,4);X=na.byteOffset;fc=a.Malloc(Float32Array,4);Ba=fc.byteOffset;gc=a.Malloc(Float32Array,3);Fb=gc.byteOffset;hc=a.Malloc(Float32Array,3);Gb=hc.byteOffset;hb=a.Malloc(Int32Array,4);Sa=hb.byteOffset;a.ColorSpace.SRGB=a.ColorSpace._MakeSRGB();a.ColorSpace.DISPLAY_P3=a.ColorSpace._MakeDisplayP3();a.ColorSpace.ADOBE_RGB=a.ColorSpace._MakeAdobeRGB();a.GlyphRunFlags={IsWhiteSpace:a._GlyphRunFlags_isWhiteSpace};a.Path.MakeFromCmds=
|
||||
function(e){var h=l(e,"HEAPF32"),n=a.Path._MakeFromCmds(h,e.length);k(h,e);return n};a.Path.MakeFromVerbsPointsWeights=function(e,h,n){var t=l(e,"HEAPU8"),x=l(h,"HEAPF32"),z=l(n,"HEAPF32"),E=a.Path._MakeFromVerbsPointsWeights(t,e.length,x,h.length,z,n&&n.length||0);k(t,e);k(x,h);k(z,n);return E};a.Path.prototype.addArc=function(e,h,n){e=u(e);this._addArc(e,h,n);return this};a.Path.prototype.addCircle=function(e,h,n,t){this._addCircle(e,h,n,!!t);return this};a.Path.prototype.addOval=function(e,h,n){void 0===
|
||||
n&&(n=1);e=u(e);this._addOval(e,!!h,n);return this};a.Path.prototype.addPath=function(){var e=Array.prototype.slice.call(arguments),h=e[0],n=!1;"boolean"===typeof e[e.length-1]&&(n=e.pop());if(1===e.length)this._addPath(h,1,0,0,0,1,0,0,0,1,n);else if(2===e.length)e=e[1],this._addPath(h,e[0],e[1],e[2],e[3],e[4],e[5],e[6]||0,e[7]||0,e[8]||1,n);else if(7===e.length||10===e.length)this._addPath(h,e[1],e[2],e[3],e[4],e[5],e[6],e[7]||0,e[8]||0,e[9]||1,n);else return null;return this};a.Path.prototype.addPoly=
|
||||
function(e,h){var n=l(e,"HEAPF32");this._addPoly(n,e.length/2,h);k(n,e);return this};a.Path.prototype.addRect=function(e,h){e=u(e);this._addRect(e,!!h);return this};a.Path.prototype.addRRect=function(e,h){e=F(e);this._addRRect(e,!!h);return this};a.Path.prototype.addVerbsPointsWeights=function(e,h,n){var t=l(e,"HEAPU8"),x=l(h,"HEAPF32"),z=l(n,"HEAPF32");this._addVerbsPointsWeights(t,e.length,x,h.length,z,n&&n.length||0);k(t,e);k(x,h);k(z,n)};a.Path.prototype.arc=function(e,h,n,t,x,z){e=a.LTRBRect(e-
|
||||
n,h-n,e+n,h+n);x=(x-t)/Math.PI*180-360*!!z;z=new a.Path;z.addArc(e,t/Math.PI*180,x);this.addPath(z,!0);z.delete();return this};a.Path.prototype.arcToOval=function(e,h,n,t){e=u(e);this._arcToOval(e,h,n,t);return this};a.Path.prototype.arcToRotated=function(e,h,n,t,x,z,E){this._arcToRotated(e,h,n,!!t,!!x,z,E);return this};a.Path.prototype.arcToTangent=function(e,h,n,t,x){this._arcToTangent(e,h,n,t,x);return this};a.Path.prototype.close=function(){this._close();return this};a.Path.prototype.conicTo=
|
||||
function(e,h,n,t,x){this._conicTo(e,h,n,t,x);return this};a.Path.prototype.computeTightBounds=function(e){this._computeTightBounds(X);var h=na.toTypedArray();return e?(e.set(h),e):h.slice()};a.Path.prototype.cubicTo=function(e,h,n,t,x,z){this._cubicTo(e,h,n,t,x,z);return this};a.Path.prototype.dash=function(e,h,n){return this._dash(e,h,n)?this:null};a.Path.prototype.getBounds=function(e){this._getBounds(X);var h=na.toTypedArray();return e?(e.set(h),e):h.slice()};a.Path.prototype.lineTo=function(e,
|
||||
h){this._lineTo(e,h);return this};a.Path.prototype.moveTo=function(e,h){this._moveTo(e,h);return this};a.Path.prototype.offset=function(e,h){this._transform(1,0,e,0,1,h,0,0,1);return this};a.Path.prototype.quadTo=function(e,h,n,t){this._quadTo(e,h,n,t);return this};a.Path.prototype.rArcTo=function(e,h,n,t,x,z,E){this._rArcTo(e,h,n,t,x,z,E);return this};a.Path.prototype.rConicTo=function(e,h,n,t,x){this._rConicTo(e,h,n,t,x);return this};a.Path.prototype.rCubicTo=function(e,h,n,t,x,z){this._rCubicTo(e,
|
||||
h,n,t,x,z);return this};a.Path.prototype.rLineTo=function(e,h){this._rLineTo(e,h);return this};a.Path.prototype.rMoveTo=function(e,h){this._rMoveTo(e,h);return this};a.Path.prototype.rQuadTo=function(e,h,n,t){this._rQuadTo(e,h,n,t);return this};a.Path.prototype.stroke=function(e){e=e||{};e.width=e.width||1;e.miter_limit=e.miter_limit||4;e.cap=e.cap||a.StrokeCap.Butt;e.join=e.join||a.StrokeJoin.Miter;e.precision=e.precision||1;return this._stroke(e)?this:null};a.Path.prototype.transform=function(){if(1===
|
||||
arguments.length){var e=arguments[0];this._transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6]||0,e[7]||0,e[8]||1)}else if(6===arguments.length||9===arguments.length)e=arguments,this._transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6]||0,e[7]||0,e[8]||1);else throw"transform expected to take 1 or 9 arguments. Got "+arguments.length;return this};a.Path.prototype.trim=function(e,h,n){return this._trim(e,h,!!n)?this:null};a.Image.prototype.encodeToBytes=function(e,h){var n=a.ne();e=e||a.ImageFormat.PNG;h=h||100;
|
||||
return n?this._encodeToBytes(e,h,n):this._encodeToBytes(e,h)};a.Image.prototype.makeShaderCubic=function(e,h,n,t,x){x=p(x);return this._makeShaderCubic(e,h,n,t,x)};a.Image.prototype.makeShaderOptions=function(e,h,n,t,x){x=p(x);return this._makeShaderOptions(e,h,n,t,x)};a.Image.prototype.readPixels=function(e,h,n,t,x){var z=a.ne();return g(this,e,h,n,t,x,z)};a.Canvas.prototype.clear=function(e){a.Jd(this.Id);e=y(e);this._clear(e)};a.Canvas.prototype.clipRRect=function(e,h,n){a.Jd(this.Id);e=F(e);this._clipRRect(e,
|
||||
h,n)};a.Canvas.prototype.clipRect=function(e,h,n){a.Jd(this.Id);e=u(e);this._clipRect(e,h,n)};a.Canvas.prototype.concat=function(e){a.Jd(this.Id);e=w(e);this._concat(e)};a.Canvas.prototype.drawArc=function(e,h,n,t,x){a.Jd(this.Id);e=u(e);this._drawArc(e,h,n,t,x)};a.Canvas.prototype.drawAtlas=function(e,h,n,t,x,z,E){if(e&&t&&h&&n&&h.length===n.length){a.Jd(this.Id);x||(x=a.BlendMode.SrcOver);var J=l(h,"HEAPF32"),I=l(n,"HEAPF32"),U=n.length/4,V=l(c(z),"HEAPU32");if(E&&"B"in E&&"C"in E)this._drawAtlasCubic(e,
|
||||
I,J,V,U,x,E.B,E.C,t);else{let q=a.FilterMode.Linear,A=a.MipmapMode.None;E&&(q=E.filter,"mipmap"in E&&(A=E.mipmap));this._drawAtlasOptions(e,I,J,V,U,x,q,A,t)}k(J,h);k(I,n);k(V,z)}};a.Canvas.prototype.drawCircle=function(e,h,n,t){a.Jd(this.Id);this._drawCircle(e,h,n,t)};a.Canvas.prototype.drawColor=function(e,h){a.Jd(this.Id);e=y(e);void 0!==h?this._drawColor(e,h):this._drawColor(e)};a.Canvas.prototype.drawColorInt=function(e,h){a.Jd(this.Id);this._drawColorInt(e,h||a.BlendMode.SrcOver)};a.Canvas.prototype.drawColorComponents=
|
||||
function(e,h,n,t,x){a.Jd(this.Id);e=B(e,h,n,t);void 0!==x?this._drawColor(e,x):this._drawColor(e)};a.Canvas.prototype.drawDRRect=function(e,h,n){a.Jd(this.Id);e=F(e,Eb);h=F(h,kc);this._drawDRRect(e,h,n)};a.Canvas.prototype.drawImage=function(e,h,n,t){a.Jd(this.Id);this._drawImage(e,h,n,t||null)};a.Canvas.prototype.drawImageCubic=function(e,h,n,t,x,z){a.Jd(this.Id);this._drawImageCubic(e,h,n,t,x,z||null)};a.Canvas.prototype.drawImageOptions=function(e,h,n,t,x,z){a.Jd(this.Id);this._drawImageOptions(e,
|
||||
h,n,t,x,z||null)};a.Canvas.prototype.drawImageNine=function(e,h,n,t,x){a.Jd(this.Id);h=l(h,"HEAP32",Sa);n=u(n);this._drawImageNine(e,h,n,t,x||null)};a.Canvas.prototype.drawImageRect=function(e,h,n,t,x){a.Jd(this.Id);u(h,X);u(n,Ba);this._drawImageRect(e,X,Ba,t,!!x)};a.Canvas.prototype.drawImageRectCubic=function(e,h,n,t,x,z){a.Jd(this.Id);u(h,X);u(n,Ba);this._drawImageRectCubic(e,X,Ba,t,x,z||null)};a.Canvas.prototype.drawImageRectOptions=function(e,h,n,t,x,z){a.Jd(this.Id);u(h,X);u(n,Ba);this._drawImageRectOptions(e,
|
||||
X,Ba,t,x,z||null)};a.Canvas.prototype.drawLine=function(e,h,n,t,x){a.Jd(this.Id);this._drawLine(e,h,n,t,x)};a.Canvas.prototype.drawOval=function(e,h){a.Jd(this.Id);e=u(e);this._drawOval(e,h)};a.Canvas.prototype.drawPaint=function(e){a.Jd(this.Id);this._drawPaint(e)};a.Canvas.prototype.drawParagraph=function(e,h,n){a.Jd(this.Id);this._drawParagraph(e,h,n)};a.Canvas.prototype.drawPatch=function(e,h,n,t,x){if(24>e.length)throw"Need 12 cubic points";if(h&&4>h.length)throw"Need 4 colors";if(n&&8>n.length)throw"Need 4 shader coordinates";
|
||||
a.Jd(this.Id);const z=l(e,"HEAPF32"),E=h?l(c(h),"HEAPU32"):M,J=n?l(n,"HEAPF32"):M;t||(t=a.BlendMode.Modulate);this._drawPatch(z,E,J,t,x);k(J,n);k(E,h);k(z,e)};a.Canvas.prototype.drawPath=function(e,h){a.Jd(this.Id);this._drawPath(e,h)};a.Canvas.prototype.drawPicture=function(e){a.Jd(this.Id);this._drawPicture(e)};a.Canvas.prototype.drawPoints=function(e,h,n){a.Jd(this.Id);var t=l(h,"HEAPF32");this._drawPoints(e,t,h.length/2,n);k(t,h)};a.Canvas.prototype.drawRRect=function(e,h){a.Jd(this.Id);e=F(e);
|
||||
this._drawRRect(e,h)};a.Canvas.prototype.drawRect=function(e,h){a.Jd(this.Id);e=u(e);this._drawRect(e,h)};a.Canvas.prototype.drawRect4f=function(e,h,n,t,x){a.Jd(this.Id);this._drawRect4f(e,h,n,t,x)};a.Canvas.prototype.drawShadow=function(e,h,n,t,x,z,E){a.Jd(this.Id);var J=l(x,"HEAPF32"),I=l(z,"HEAPF32");h=l(h,"HEAPF32",Fb);n=l(n,"HEAPF32",Gb);this._drawShadow(e,h,n,t,J,I,E);k(J,x);k(I,z)};a.getShadowLocalBounds=function(e,h,n,t,x,z,E){e=p(e);n=l(n,"HEAPF32",Fb);t=l(t,"HEAPF32",Gb);if(!this._getShadowLocalBounds(e,
|
||||
h,n,t,x,z,X))return null;h=na.toTypedArray();return E?(E.set(h),E):h.slice()};a.Canvas.prototype.drawTextBlob=function(e,h,n,t){a.Jd(this.Id);this._drawTextBlob(e,h,n,t)};a.Canvas.prototype.drawVertices=function(e,h,n){a.Jd(this.Id);this._drawVertices(e,h,n)};a.Canvas.prototype.getDeviceClipBounds=function(e){this._getDeviceClipBounds(Sa);var h=hb.toTypedArray();e?e.set(h):e=h.slice();return e};a.Canvas.prototype.getLocalToDevice=function(){this._getLocalToDevice(ca);for(var e=ca,h=Array(16),n=0;16>
|
||||
n;n++)h[n]=a.HEAPF32[e/4+n];return h};a.Canvas.prototype.getTotalMatrix=function(){this._getTotalMatrix(H);for(var e=Array(9),h=0;9>h;h++)e[h]=a.HEAPF32[H/4+h];return e};a.Canvas.prototype.makeSurface=function(e){e=this._makeSurface(e);e.Id=this.Id;return e};a.Canvas.prototype.readPixels=function(e,h,n,t,x){a.Jd(this.Id);return g(this,e,h,n,t,x)};a.Canvas.prototype.saveLayer=function(e,h,n,t){h=u(h);return this._saveLayer(e||null,h,n||null,t||0)};a.Canvas.prototype.writePixels=function(e,h,n,t,x,
|
||||
z,E,J){if(e.byteLength%(h*n))throw"pixels length must be a multiple of the srcWidth * srcHeight";a.Jd(this.Id);var I=e.byteLength/(h*n);z=z||a.AlphaType.Unpremul;E=E||a.ColorType.RGBA_8888;J=J||a.ColorSpace.SRGB;var U=I*h;I=l(e,"HEAPU8");h=this._writePixels({width:h,height:n,colorType:E,alphaType:z,colorSpace:J},I,U,t,x);k(I,e);return h};a.ColorFilter.MakeBlend=function(e,h,n){e=y(e);n=n||a.ColorSpace.SRGB;return a.ColorFilter._MakeBlend(e,h,n)};a.ColorFilter.MakeMatrix=function(e){if(!e||20!==e.length)throw"invalid color matrix";
|
||||
var h=l(e,"HEAPF32"),n=a.ColorFilter._makeMatrix(h);k(h,e);return n};a.ContourMeasure.prototype.getPosTan=function(e,h){this._getPosTan(e,X);e=na.toTypedArray();return h?(h.set(e),h):e.slice()};a.ImageFilter.prototype.getOutputBounds=function(e,h,n){e=u(e,X);h=p(h);this._getOutputBounds(e,h,Sa);h=hb.toTypedArray();return n?(n.set(h),n):h.slice()};a.ImageFilter.MakeDropShadow=function(e,h,n,t,x,z){x=y(x,va);return a.ImageFilter._MakeDropShadow(e,h,n,t,x,z)};a.ImageFilter.MakeDropShadowOnly=function(e,
|
||||
h,n,t,x,z){x=y(x,va);return a.ImageFilter._MakeDropShadowOnly(e,h,n,t,x,z)};a.ImageFilter.MakeImage=function(e,h,n,t){n=u(n,X);t=u(t,Ba);if("B"in h&&"C"in h)return a.ImageFilter._MakeImageCubic(e,h.B,h.C,n,t);const x=h.filter;let z=a.MipmapMode.None;"mipmap"in h&&(z=h.mipmap);return a.ImageFilter._MakeImageOptions(e,x,z,n,t)};a.ImageFilter.MakeMatrixTransform=function(e,h,n){e=p(e);if("B"in h&&"C"in h)return a.ImageFilter._MakeMatrixTransformCubic(e,h.B,h.C,n);const t=h.filter;let x=a.MipmapMode.None;
|
||||
"mipmap"in h&&(x=h.mipmap);return a.ImageFilter._MakeMatrixTransformOptions(e,t,x,n)};a.Paint.prototype.getColor=function(){this._getColor(va);return D(va)};a.Paint.prototype.setColor=function(e,h){h=h||null;e=y(e);this._setColor(e,h)};a.Paint.prototype.setColorComponents=function(e,h,n,t,x){x=x||null;e=B(e,h,n,t);this._setColor(e,x)};a.Path.prototype.getPoint=function(e,h){this._getPoint(e,X);e=na.toTypedArray();return h?(h[0]=e[0],h[1]=e[1],h):e.slice(0,2)};a.Picture.prototype.makeShader=function(e,
|
||||
h,n,t,x){t=p(t);x=u(x);return this._makeShader(e,h,n,t,x)};a.Picture.prototype.cullRect=function(e){this._cullRect(X);var h=na.toTypedArray();return e?(e.set(h),e):h.slice()};a.PictureRecorder.prototype.beginRecording=function(e,h){e=u(e);return this._beginRecording(e,!!h)};a.Surface.prototype.getCanvas=function(){var e=this._getCanvas();e.Id=this.Id;return e};a.Surface.prototype.makeImageSnapshot=function(e){a.Jd(this.Id);e=l(e,"HEAP32",Sa);return this._makeImageSnapshot(e)};a.Surface.prototype.makeSurface=
|
||||
function(e){a.Jd(this.Id);e=this._makeSurface(e);e.Id=this.Id;return e};a.Surface.prototype.Te=function(e,h){this.ge||(this.ge=this.getCanvas());return requestAnimationFrame(function(){a.Jd(this.Id);e(this.ge);this.flush(h)}.bind(this))};a.Surface.prototype.requestAnimationFrame||(a.Surface.prototype.requestAnimationFrame=a.Surface.prototype.Te);a.Surface.prototype.Qe=function(e,h){this.ge||(this.ge=this.getCanvas());requestAnimationFrame(function(){a.Jd(this.Id);e(this.ge);this.flush(h);this.dispose()}.bind(this))};
|
||||
a.Surface.prototype.drawOnce||(a.Surface.prototype.drawOnce=a.Surface.prototype.Qe);a.PathEffect.MakeDash=function(e,h){h||(h=0);if(!e.length||1===e.length%2)throw"Intervals array must have even length";var n=l(e,"HEAPF32");h=a.PathEffect._MakeDash(n,e.length,h);k(n,e);return h};a.PathEffect.MakeLine2D=function(e,h){h=p(h);return a.PathEffect._MakeLine2D(e,h)};a.PathEffect.MakePath2D=function(e,h){e=p(e);return a.PathEffect._MakePath2D(e,h)};a.Shader.MakeColor=function(e,h){h=h||null;e=y(e);return a.Shader._MakeColor(e,
|
||||
h)};a.Shader.Blend=a.Shader.MakeBlend;a.Shader.Color=a.Shader.MakeColor;a.Shader.MakeLinearGradient=function(e,h,n,t,x,z,E,J){J=J||null;var I=m(n),U=l(t,"HEAPF32");E=E||0;z=p(z);var V=na.toTypedArray();V.set(e);V.set(h,2);e=a.Shader._MakeLinearGradient(X,I.Rd,I.colorType,U,I.count,x,E,z,J);k(I.Rd,n);t&&k(U,t);return e};a.Shader.MakeRadialGradient=function(e,h,n,t,x,z,E,J){J=J||null;var I=m(n),U=l(t,"HEAPF32");E=E||0;z=p(z);e=a.Shader._MakeRadialGradient(e[0],e[1],h,I.Rd,I.colorType,U,I.count,x,E,
|
||||
z,J);k(I.Rd,n);t&&k(U,t);return e};a.Shader.MakeSweepGradient=function(e,h,n,t,x,z,E,J,I,U){U=U||null;var V=m(n),q=l(t,"HEAPF32");E=E||0;J=J||0;I=I||360;z=p(z);e=a.Shader._MakeSweepGradient(e,h,V.Rd,V.colorType,q,V.count,x,J,I,E,z,U);k(V.Rd,n);t&&k(q,t);return e};a.Shader.MakeTwoPointConicalGradient=function(e,h,n,t,x,z,E,J,I,U){U=U||null;var V=m(x),q=l(z,"HEAPF32");I=I||0;J=p(J);var A=na.toTypedArray();A.set(e);A.set(n,2);e=a.Shader._MakeTwoPointConicalGradient(X,h,t,V.Rd,V.colorType,q,V.count,E,
|
||||
I,J,U);k(V.Rd,x);z&&k(q,z);return e};a.Vertices.prototype.bounds=function(e){this._bounds(X);var h=na.toTypedArray();return e?(e.set(h),e):h.slice()};a.Md&&a.Md.forEach(function(e){e()})};a.computeTonalColors=function(g){var e=l(g.ambient,"HEAPF32"),h=l(g.spot,"HEAPF32");this._computeTonalColors(e,h);var n={ambient:D(e),spot:D(h)};k(e,g.ambient);k(h,g.spot);return n};a.LTRBRect=function(g,e,h,n){return Float32Array.of(g,e,h,n)};a.XYWHRect=function(g,e,h,n){return Float32Array.of(g,e,g+h,e+n)};a.LTRBiRect=
|
||||
function(g,e,h,n){return Int32Array.of(g,e,h,n)};a.XYWHiRect=function(g,e,h,n){return Int32Array.of(g,e,g+h,e+n)};a.RRectXY=function(g,e,h){return Float32Array.of(g[0],g[1],g[2],g[3],e,h,e,h,e,h,e,h)};a.MakeAnimatedImageFromEncoded=function(g){g=new Uint8Array(g);var e=a._malloc(g.byteLength);a.HEAPU8.set(g,e);return(g=a._decodeAnimatedImage(e,g.byteLength))?g:null};a.MakeImageFromEncoded=function(g){g=new Uint8Array(g);var e=a._malloc(g.byteLength);a.HEAPU8.set(g,e);return(g=a._decodeImage(e,g.byteLength))?
|
||||
g:null};var Ta=null;a.MakeImageFromCanvasImageSource=function(g){var e=g.width,h=g.height;Ta||(Ta=document.createElement("canvas"));Ta.width=e;Ta.height=h;var n=Ta.getContext("2d",{willReadFrequently:!0});n.drawImage(g,0,0);g=n.getImageData(0,0,e,h);return a.MakeImage({width:e,height:h,alphaType:a.AlphaType.Unpremul,colorType:a.ColorType.RGBA_8888,colorSpace:a.ColorSpace.SRGB},g.data,4*e)};a.MakeImage=function(g,e,h){var n=a._malloc(e.length);a.HEAPU8.set(e,n);return a._MakeImage(g,n,e.length,h)};
|
||||
a.MakeVertices=function(g,e,h,n,t,x){var z=t&&t.length||0,E=0;h&&h.length&&(E|=1);n&&n.length&&(E|=2);void 0===x||x||(E|=4);g=new a._VerticesBuilder(g,e.length/2,z,E);l(e,"HEAPF32",g.positions());g.texCoords()&&l(h,"HEAPF32",g.texCoords());g.colors()&&l(c(n),"HEAPU32",g.colors());g.indices()&&l(t,"HEAPU16",g.indices());return g.detach()};(function(g){g.Md=g.Md||[];g.Md.push(function(){function e(q){q&&(q.dir=0===q.dir?g.TextDirection.RTL:g.TextDirection.LTR);return q}function h(q){if(!q||!q.length)return[];
|
||||
for(var A=[],P=0;P<q.length;P+=5){var Z=g.LTRBRect(q[P],q[P+1],q[P+2],q[P+3]),za=g.TextDirection.LTR;0===q[P+4]&&(za=g.TextDirection.RTL);A.push({rect:Z,dir:za})}g._free(q.byteOffset);return A}function n(q){q=q||{};void 0===q.weight&&(q.weight=g.FontWeight.Normal);q.width=q.width||g.FontWidth.Normal;q.slant=q.slant||g.FontSlant.Upright;return q}function t(q){if(!q||!q.length)return M;for(var A=[],P=0;P<q.length;P++){var Z=x(q[P]);A.push(Z)}return l(A,"HEAPU32")}function x(q){if(J[q])return J[q];var A=
|
||||
ja(q)+1,P=g._malloc(A);ka(q,C,P,A);return J[q]=P}function z(q){q._colorPtr=y(q.color);q._foregroundColorPtr=M;q._backgroundColorPtr=M;q._decorationColorPtr=M;q.foregroundColor&&(q._foregroundColorPtr=y(q.foregroundColor,I));q.backgroundColor&&(q._backgroundColorPtr=y(q.backgroundColor,U));q.decorationColor&&(q._decorationColorPtr=y(q.decorationColor,V));Array.isArray(q.fontFamilies)&&q.fontFamilies.length?(q._fontFamiliesPtr=t(q.fontFamilies),q._fontFamiliesLen=q.fontFamilies.length):(q._fontFamiliesPtr=
|
||||
M,q._fontFamiliesLen=0);if(q.locale){var A=q.locale;q._localePtr=x(A);q._localeLen=ja(A)}else q._localePtr=M,q._localeLen=0;if(Array.isArray(q.shadows)&&q.shadows.length){A=q.shadows;var P=A.map(function(qa){return qa.color||g.BLACK}),Z=A.map(function(qa){return qa.blurRadius||0});q._shadowLen=A.length;for(var za=g._malloc(8*A.length),Hb=za/4,Ib=0;Ib<A.length;Ib++){var lc=A[Ib].offset||[0,0];g.HEAPF32[Hb]=lc[0];g.HEAPF32[Hb+1]=lc[1];Hb+=2}q._shadowColorsPtr=m(P).Rd;q._shadowOffsetsPtr=za;q._shadowBlurRadiiPtr=
|
||||
l(Z,"HEAPF32")}else q._shadowLen=0,q._shadowColorsPtr=M,q._shadowOffsetsPtr=M,q._shadowBlurRadiiPtr=M;Array.isArray(q.fontFeatures)&&q.fontFeatures.length?(A=q.fontFeatures,P=A.map(function(qa){return qa.name}),Z=A.map(function(qa){return qa.value}),q._fontFeatureLen=A.length,q._fontFeatureNamesPtr=t(P),q._fontFeatureValuesPtr=l(Z,"HEAPU32")):(q._fontFeatureLen=0,q._fontFeatureNamesPtr=M,q._fontFeatureValuesPtr=M);Array.isArray(q.fontVariations)&&q.fontVariations.length?(A=q.fontVariations,P=A.map(function(qa){return qa.axis}),
|
||||
Z=A.map(function(qa){return qa.value}),q._fontVariationLen=A.length,q._fontVariationAxesPtr=t(P),q._fontVariationValuesPtr=l(Z,"HEAPF32")):(q._fontVariationLen=0,q._fontVariationAxesPtr=M,q._fontVariationValuesPtr=M)}function E(q){g._free(q._fontFamiliesPtr);g._free(q._shadowColorsPtr);g._free(q._shadowOffsetsPtr);g._free(q._shadowBlurRadiiPtr);g._free(q._fontFeatureNamesPtr);g._free(q._fontFeatureValuesPtr);g._free(q._fontVariationAxesPtr);g._free(q._fontVariationValuesPtr)}g.Paragraph.prototype.getRectsForRange=
|
||||
function(q,A,P,Z){q=this._getRectsForRange(q,A,P,Z);return h(q)};g.Paragraph.prototype.getRectsForPlaceholders=function(){var q=this._getRectsForPlaceholders();return h(q)};g.Paragraph.prototype.getGlyphInfoAt=function(q){return e(this._getGlyphInfoAt(q))};g.Paragraph.prototype.getClosestGlyphInfoAtCoordinate=function(q,A){return e(this._getClosestGlyphInfoAtCoordinate(q,A))};g.TypefaceFontProvider.prototype.registerFont=function(q,A){q=g.Typeface.MakeTypefaceFromData(q);if(!q)return null;A=x(A);
|
||||
this._registerFont(q,A)};g.ParagraphStyle=function(q){q.disableHinting=q.disableHinting||!1;if(q.ellipsis){var A=q.ellipsis;q._ellipsisPtr=x(A);q._ellipsisLen=ja(A)}else q._ellipsisPtr=M,q._ellipsisLen=0;null==q.heightMultiplier&&(q.heightMultiplier=-1);q.maxLines=q.maxLines||0;q.replaceTabCharacters=q.replaceTabCharacters||!1;A=(A=q.strutStyle)||{};A.strutEnabled=A.strutEnabled||!1;A.strutEnabled&&Array.isArray(A.fontFamilies)&&A.fontFamilies.length?(A._fontFamiliesPtr=t(A.fontFamilies),A._fontFamiliesLen=
|
||||
A.fontFamilies.length):(A._fontFamiliesPtr=M,A._fontFamiliesLen=0);A.fontStyle=n(A.fontStyle);null==A.fontSize&&(A.fontSize=-1);null==A.heightMultiplier&&(A.heightMultiplier=-1);A.halfLeading=A.halfLeading||!1;A.leading=A.leading||0;A.forceStrutHeight=A.forceStrutHeight||!1;q.strutStyle=A;q.textAlign=q.textAlign||g.TextAlign.Start;q.textDirection=q.textDirection||g.TextDirection.LTR;q.textHeightBehavior=q.textHeightBehavior||g.TextHeightBehavior.All;q.textStyle=g.TextStyle(q.textStyle);q.applyRoundingHack=
|
||||
!1!==q.applyRoundingHack;return q};g.TextStyle=function(q){q.color||(q.color=g.BLACK);q.decoration=q.decoration||0;q.decorationThickness=q.decorationThickness||0;q.decorationStyle=q.decorationStyle||g.DecorationStyle.Solid;q.textBaseline=q.textBaseline||g.TextBaseline.Alphabetic;null==q.fontSize&&(q.fontSize=-1);q.letterSpacing=q.letterSpacing||0;q.wordSpacing=q.wordSpacing||0;null==q.heightMultiplier&&(q.heightMultiplier=-1);q.halfLeading=q.halfLeading||!1;q.fontStyle=n(q.fontStyle);return q};var J=
|
||||
{},I=g._malloc(16),U=g._malloc(16),V=g._malloc(16);g.ParagraphBuilder.Make=function(q,A){z(q.textStyle);A=g.ParagraphBuilder._Make(q,A);E(q.textStyle);return A};g.ParagraphBuilder.MakeFromFontProvider=function(q,A){z(q.textStyle);A=g.ParagraphBuilder._MakeFromFontProvider(q,A);E(q.textStyle);return A};g.ParagraphBuilder.MakeFromFontCollection=function(q,A){z(q.textStyle);A=g.ParagraphBuilder._MakeFromFontCollection(q,A);E(q.textStyle);return A};g.ParagraphBuilder.ShapeText=function(q,A,P){let Z=0;
|
||||
for(const za of A)Z+=za.length;if(Z!==q.length)throw"Accumulated block lengths must equal text.length";return g.ParagraphBuilder._ShapeText(q,A,P)};g.ParagraphBuilder.prototype.pushStyle=function(q){z(q);this._pushStyle(q);E(q)};g.ParagraphBuilder.prototype.pushPaintStyle=function(q,A,P){z(q);this._pushPaintStyle(q,A,P);E(q)};g.ParagraphBuilder.prototype.addPlaceholder=function(q,A,P,Z,za){P=P||g.PlaceholderAlignment.Baseline;Z=Z||g.TextBaseline.Alphabetic;this._addPlaceholder(q||0,A||0,P,Z,za||0)};
|
||||
g.ParagraphBuilder.prototype.setWordsUtf8=function(q){var A=l(q,"HEAPU32");this._setWordsUtf8(A,q&&q.length||0);k(A,q)};g.ParagraphBuilder.prototype.setWordsUtf16=function(q){var A=l(q,"HEAPU32");this._setWordsUtf16(A,q&&q.length||0);k(A,q)};g.ParagraphBuilder.prototype.setGraphemeBreaksUtf8=function(q){var A=l(q,"HEAPU32");this._setGraphemeBreaksUtf8(A,q&&q.length||0);k(A,q)};g.ParagraphBuilder.prototype.setGraphemeBreaksUtf16=function(q){var A=l(q,"HEAPU32");this._setGraphemeBreaksUtf16(A,q&&q.length||
|
||||
0);k(A,q)};g.ParagraphBuilder.prototype.setLineBreaksUtf8=function(q){var A=l(q,"HEAPU32");this._setLineBreaksUtf8(A,q&&q.length||0);k(A,q)};g.ParagraphBuilder.prototype.setLineBreaksUtf16=function(q){var A=l(q,"HEAPU32");this._setLineBreaksUtf16(A,q&&q.length||0);k(A,q)}})})(r);a.Md=a.Md||[];a.Md.push(function(){a.Path.prototype.op=function(g,e){return this._op(g,e)?this:null};a.Path.prototype.simplify=function(){return this._simplify()?this:null}});a.Md=a.Md||[];a.Md.push(function(){a.Canvas.prototype.drawText=
|
||||
function(g,e,h,n,t){var x=ja(g),z=a._malloc(x+1);ka(g,C,z,x+1);this._drawSimpleText(z,x,e,h,t,n);a._free(z)};a.Canvas.prototype.drawGlyphs=function(g,e,h,n,t,x){if(!(2*g.length<=e.length))throw"Not enough positions for the array of gyphs";a.Jd(this.Id);const z=l(g,"HEAPU16"),E=l(e,"HEAPF32");this._drawGlyphs(g.length,z,E,h,n,t,x);k(E,e);k(z,g)};a.Font.prototype.getGlyphBounds=function(g,e,h){var n=l(g,"HEAPU16"),t=a._malloc(16*g.length);this._getGlyphWidthBounds(n,g.length,M,t,e||null);e=new Float32Array(a.HEAPU8.buffer,
|
||||
t,4*g.length);k(n,g);if(h)return h.set(e),a._free(t),h;g=Float32Array.from(e);a._free(t);return g};a.Font.prototype.getGlyphIDs=function(g,e,h){e||(e=g.length);var n=ja(g)+1,t=a._malloc(n);ka(g,C,t,n);g=a._malloc(2*e);e=this._getGlyphIDs(t,n-1,e,g);a._free(t);if(0>e)return a._free(g),null;t=new Uint16Array(a.HEAPU8.buffer,g,e);if(h)return h.set(t),a._free(g),h;h=Uint16Array.from(t);a._free(g);return h};a.Font.prototype.getGlyphIntercepts=function(g,e,h,n){var t=l(g,"HEAPU16"),x=l(e,"HEAPF32");return this._getGlyphIntercepts(t,
|
||||
g.length,!(g&&g._ck),x,e.length,!(e&&e._ck),h,n)};a.Font.prototype.getGlyphWidths=function(g,e,h){var n=l(g,"HEAPU16"),t=a._malloc(4*g.length);this._getGlyphWidthBounds(n,g.length,t,M,e||null);e=new Float32Array(a.HEAPU8.buffer,t,g.length);k(n,g);if(h)return h.set(e),a._free(t),h;g=Float32Array.from(e);a._free(t);return g};a.FontMgr.FromData=function(){if(!arguments.length)return null;var g=arguments;1===g.length&&Array.isArray(g[0])&&(g=arguments[0]);if(!g.length)return null;for(var e=[],h=[],n=
|
||||
0;n<g.length;n++){var t=new Uint8Array(g[n]),x=l(t,"HEAPU8");e.push(x);h.push(t.byteLength)}e=l(e,"HEAPU32");h=l(h,"HEAPU32");g=a.FontMgr._fromData(e,h,g.length);a._free(e);a._free(h);return g};a.Typeface.MakeTypefaceFromData=function(g){g=new Uint8Array(g);var e=l(g,"HEAPU8");return(g=a.Typeface._MakeTypefaceFromData(e,g.byteLength))?g:null};a.Typeface.MakeFreeTypeFaceFromData=a.Typeface.MakeTypefaceFromData;a.Typeface.prototype.getGlyphIDs=function(g,e,h){e||(e=g.length);var n=ja(g)+1,t=a._malloc(n);
|
||||
ka(g,C,t,n);g=a._malloc(2*e);e=this._getGlyphIDs(t,n-1,e,g);a._free(t);if(0>e)return a._free(g),null;t=new Uint16Array(a.HEAPU8.buffer,g,e);if(h)return h.set(t),a._free(g),h;h=Uint16Array.from(t);a._free(g);return h};a.TextBlob.MakeOnPath=function(g,e,h,n){if(g&&g.length&&e&&e.countPoints()){if(1===e.countPoints())return this.MakeFromText(g,h);n||(n=0);var t=h.getGlyphIDs(g);t=h.getGlyphWidths(t);var x=[];e=new a.ContourMeasureIter(e,!1,1);for(var z=e.next(),E=new Float32Array(4),J=0;J<g.length&&
|
||||
z;J++){var I=t[J];n+=I/2;if(n>z.length()){z.delete();z=e.next();if(!z){g=g.substring(0,J);break}n=I/2}z.getPosTan(n,E);var U=E[2],V=E[3];x.push(U,V,E[0]-I/2*U,E[1]-I/2*V);n+=I/2}g=this.MakeFromRSXform(g,x,h);z&&z.delete();e.delete();return g}};a.TextBlob.MakeFromRSXform=function(g,e,h){var n=ja(g)+1,t=a._malloc(n);ka(g,C,t,n);g=l(e,"HEAPF32");h=a.TextBlob._MakeFromRSXform(t,n-1,g,h);a._free(t);return h?h:null};a.TextBlob.MakeFromRSXformGlyphs=function(g,e,h){var n=l(g,"HEAPU16");e=l(e,"HEAPF32");
|
||||
h=a.TextBlob._MakeFromRSXformGlyphs(n,2*g.length,e,h);k(n,g);return h?h:null};a.TextBlob.MakeFromGlyphs=function(g,e){var h=l(g,"HEAPU16");e=a.TextBlob._MakeFromGlyphs(h,2*g.length,e);k(h,g);return e?e:null};a.TextBlob.MakeFromText=function(g,e){var h=ja(g)+1,n=a._malloc(h);ka(g,C,n,h);g=a.TextBlob._MakeFromText(n,h-1,e);a._free(n);return g?g:null};a.MallocGlyphIDs=function(g){return a.Malloc(Uint16Array,g)}});a.Md=a.Md||[];a.Md.push(function(){a.MakePicture=function(g){g=new Uint8Array(g);var e=
|
||||
a._malloc(g.byteLength);a.HEAPU8.set(g,e);return(g=a._MakePicture(e,g.byteLength))?g:null}});a.Md=a.Md||[];a.Md.push(function(){a.RuntimeEffect.Make=function(g,e){return a.RuntimeEffect._Make(g,{onError:e||function(h){console.log("RuntimeEffect error",h)}})};a.RuntimeEffect.MakeForBlender=function(g,e){return a.RuntimeEffect._MakeForBlender(g,{onError:e||function(h){console.log("RuntimeEffect error",h)}})};a.RuntimeEffect.prototype.makeShader=function(g,e){var h=!g._ck,n=l(g,"HEAPF32");e=p(e);return this._makeShader(n,
|
||||
4*g.length,h,e)};a.RuntimeEffect.prototype.makeShaderWithChildren=function(g,e,h){var n=!g._ck,t=l(g,"HEAPF32");h=p(h);for(var x=[],z=0;z<e.length;z++)x.push(e[z].kd.Kd);e=l(x,"HEAPU32");return this._makeShaderWithChildren(t,4*g.length,n,e,x.length,h)};a.RuntimeEffect.prototype.makeBlender=function(g){var e=!g._ck,h=l(g,"HEAPF32");return this._makeBlender(h,4*g.length,e)}})})(r);
|
||||
var la=Object.assign({},r),ma="./this.program",oa=(a,b)=>{throw b;},pa="object"==typeof window,ra="function"==typeof importScripts,sa="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,ta="",ua,wa,xa;
|
||||
if(sa){var fs=require("fs"),ya=require("path");ta=ra?ya.dirname(ta)+"/":__dirname+"/";ua=(a,b)=>{a=a.startsWith("file://")?new URL(a):ya.normalize(a);return fs.readFileSync(a,b?void 0:"utf8")};xa=a=>{a=ua(a,!0);a.buffer||(a=new Uint8Array(a));return a};wa=(a,b,c,d=!0)=>{a=a.startsWith("file://")?new URL(a):ya.normalize(a);fs.readFile(a,d?void 0:"utf8",(f,k)=>{f?c(f):b(d?k.buffer:k)})};!r.thisProgram&&1<process.argv.length&&(ma=process.argv[1].replace(/\\/g,"/"));process.argv.slice(2);oa=(a,b)=>{process.exitCode=
|
||||
a;throw b;};r.inspect=()=>"[Emscripten Module object]"}else if(pa||ra)ra?ta=self.location.href:"undefined"!=typeof document&&document.currentScript&&(ta=document.currentScript.src),_scriptDir&&(ta=_scriptDir),0!==ta.indexOf("blob:")?ta=ta.substr(0,ta.replace(/[?#].*/,"").lastIndexOf("/")+1):ta="",ua=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},ra&&(xa=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),
|
||||
wa=(a,b,c)=>{var d=new XMLHttpRequest;d.open("GET",a,!0);d.responseType="arraybuffer";d.onload=()=>{200==d.status||0==d.status&&d.response?b(d.response):c()};d.onerror=c;d.send(null)};var Aa=r.print||console.log.bind(console),Ca=r.printErr||console.error.bind(console);Object.assign(r,la);la=null;r.thisProgram&&(ma=r.thisProgram);r.quit&&(oa=r.quit);var Da;r.wasmBinary&&(Da=r.wasmBinary);var noExitRuntime=r.noExitRuntime||!0;"object"!=typeof WebAssembly&&Ea("no native wasm support detected");
|
||||
var Fa,G,Ga=!1,Ha,C,Ia,Ja,K,L,N,Ka;function La(){var a=Fa.buffer;r.HEAP8=Ha=new Int8Array(a);r.HEAP16=Ia=new Int16Array(a);r.HEAP32=K=new Int32Array(a);r.HEAPU8=C=new Uint8Array(a);r.HEAPU16=Ja=new Uint16Array(a);r.HEAPU32=L=new Uint32Array(a);r.HEAPF32=N=new Float32Array(a);r.HEAPF64=Ka=new Float64Array(a)}var Na,Oa=[],Pa=[],Qa=[];function Ra(){var a=r.preRun.shift();Oa.unshift(a)}var Ua=0,Va=null,Wa=null;
|
||||
function Ea(a){if(r.onAbort)r.onAbort(a);a="Aborted("+a+")";Ca(a);Ga=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ba(a);throw a;}function Xa(a){return a.startsWith("data:application/octet-stream;base64,")}var Ya;Ya="canvaskit.wasm";if(!Xa(Ya)){var Za=Ya;Ya=r.locateFile?r.locateFile(Za,ta):ta+Za}function $a(a){if(a==Ya&&Da)return new Uint8Array(Da);if(xa)return xa(a);throw"both async and sync fetching of the wasm failed";}
|
||||
function ab(a){if(!Da&&(pa||ra)){if("function"==typeof fetch&&!a.startsWith("file://"))return fetch(a,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw"failed to load wasm binary file at '"+a+"'";return b.arrayBuffer()}).catch(()=>$a(a));if(wa)return new Promise((b,c)=>{wa(a,d=>b(new Uint8Array(d)),c)})}return Promise.resolve().then(()=>$a(a))}function bb(a,b,c){return ab(a).then(d=>WebAssembly.instantiate(d,b)).then(d=>d).then(c,d=>{Ca("failed to asynchronously prepare wasm: "+d);Ea(d)})}
|
||||
function cb(a,b){var c=Ya;return Da||"function"!=typeof WebAssembly.instantiateStreaming||Xa(c)||c.startsWith("file://")||sa||"function"!=typeof fetch?bb(c,a,b):fetch(c,{credentials:"same-origin"}).then(d=>WebAssembly.instantiateStreaming(d,a).then(b,function(f){Ca("wasm streaming compile failed: "+f);Ca("falling back to ArrayBuffer instantiation");return bb(c,a,b)}))}function db(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a}var eb=a=>{for(;0<a.length;)a.shift()(r)};
|
||||
function fb(a){this.Kd=a-24;this.Pe=function(b){L[this.Kd+4>>2]=b};this.we=function(b){L[this.Kd+8>>2]=b};this.Zd=function(b,c){this.ve();this.Pe(b);this.we(c)};this.ve=function(){L[this.Kd+16>>2]=0}}
|
||||
var gb=0,ib=0,jb="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,kb=(a,b,c)=>{var d=b+c;for(c=b;a[c]&&!(c>=d);)++c;if(16<c-b&&a.buffer&&jb)return jb.decode(a.subarray(b,c));for(d="";b<c;){var f=a[b++];if(f&128){var k=a[b++]&63;if(192==(f&224))d+=String.fromCharCode((f&31)<<6|k);else{var l=a[b++]&63;f=224==(f&240)?(f&15)<<12|k<<6|l:(f&7)<<18|k<<12|l<<6|a[b++]&63;65536>f?d+=String.fromCharCode(f):(f-=65536,d+=String.fromCharCode(55296|f>>10,56320|f&1023))}}else d+=String.fromCharCode(f)}return d},
|
||||
lb={};function mb(a){for(;a.length;){var b=a.pop();a.pop()(b)}}function nb(a){return this.fromWireType(K[a>>2])}var ob={},pb={},qb={},rb=void 0;function sb(a){throw new rb(a);}
|
||||
function tb(a,b,c){function d(m){m=c(m);m.length!==a.length&&sb("Mismatched type converter count");for(var p=0;p<a.length;++p)ub(a[p],m[p])}a.forEach(function(m){qb[m]=b});var f=Array(b.length),k=[],l=0;b.forEach((m,p)=>{pb.hasOwnProperty(m)?f[p]=pb[m]:(k.push(m),ob.hasOwnProperty(m)||(ob[m]=[]),ob[m].push(()=>{f[p]=pb[m];++l;l===k.length&&d(f)}))});0===k.length&&d(f)}
|
||||
function vb(a){switch(a){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(`Unknown type size: ${a}`);}}var wb=void 0;function O(a){for(var b="";C[a];)b+=wb[C[a++]];return b}var xb=void 0;function Q(a){throw new xb(a);}
|
||||
function yb(a,b,c={}){var d=b.name;a||Q(`type "${d}" must have a positive integer typeid pointer`);if(pb.hasOwnProperty(a)){if(c.ff)return;Q(`Cannot register type '${d}' twice`)}pb[a]=b;delete qb[a];ob.hasOwnProperty(a)&&(b=ob[a],delete ob[a],b.forEach(f=>f()))}function ub(a,b,c={}){if(!("argPackAdvance"in b))throw new TypeError("registerType registeredInstance requires argPackAdvance");yb(a,b,c)}function zb(a){Q(a.kd.Nd.Ld.name+" instance already deleted")}var Ab=!1;function Bb(){}
|
||||
function Cb(a){--a.count.value;0===a.count.value&&(a.Pd?a.Td.Xd(a.Pd):a.Nd.Ld.Xd(a.Kd))}function Db(a,b,c){if(b===c)return a;if(void 0===c.Qd)return null;a=Db(a,b,c.Qd);return null===a?null:c.Ye(a)}var Jb={},Kb=[];function Lb(){for(;Kb.length;){var a=Kb.pop();a.kd.ee=!1;a["delete"]()}}var Mb=void 0,Nb={};function Ob(a,b){for(void 0===b&&Q("ptr should not be undefined");a.Qd;)b=a.ke(b),a=a.Qd;return Nb[b]}
|
||||
function Pb(a,b){b.Nd&&b.Kd||sb("makeClassHandle requires ptr and ptrType");!!b.Td!==!!b.Pd&&sb("Both smartPtrType and smartPtr must be specified");b.count={value:1};return Qb(Object.create(a,{kd:{value:b}}))}function Qb(a){if("undefined"===typeof FinalizationRegistry)return Qb=b=>b,a;Ab=new FinalizationRegistry(b=>{Cb(b.kd)});Qb=b=>{var c=b.kd;c.Pd&&Ab.register(b,{kd:c},b);return b};Bb=b=>{Ab.unregister(b)};return Qb(a)}function Rb(){}
|
||||
function Sb(a){if(void 0===a)return"_unknown";a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?`_${a}`:a}function Tb(a,b){a=Sb(a);return{[a]:function(){return b.apply(this,arguments)}}[a]}
|
||||
function Ub(a,b,c){if(void 0===a[b].Od){var d=a[b];a[b]=function(){a[b].Od.hasOwnProperty(arguments.length)||Q(`Function '${c}' called with an invalid number of arguments (${arguments.length}) - expects one of (${a[b].Od})!`);return a[b].Od[arguments.length].apply(this,arguments)};a[b].Od=[];a[b].Od[d.ce]=d}}
|
||||
function Vb(a,b,c){r.hasOwnProperty(a)?((void 0===c||void 0!==r[a].Od&&void 0!==r[a].Od[c])&&Q(`Cannot register public name '${a}' twice`),Ub(r,a,a),r.hasOwnProperty(c)&&Q(`Cannot register multiple overloads of a function with the same number of arguments (${c})!`),r[a].Od[c]=b):(r[a]=b,void 0!==c&&(r[a].xf=c))}function Wb(a,b,c,d,f,k,l,m){this.name=a;this.constructor=b;this.fe=c;this.Xd=d;this.Qd=f;this.af=k;this.ke=l;this.Ye=m;this.kf=[]}
|
||||
function Xb(a,b,c){for(;b!==c;)b.ke||Q(`Expected null or instance of ${c.name}, got an instance of ${b.name}`),a=b.ke(a),b=b.Qd;return a}function Yb(a,b){if(null===b)return this.Ae&&Q(`null is not a valid ${this.name}`),0;b.kd||Q(`Cannot pass "${Zb(b)}" as a ${this.name}`);b.kd.Kd||Q(`Cannot pass deleted object as a pointer of type ${this.name}`);return Xb(b.kd.Kd,b.kd.Nd.Ld,this.Ld)}
|
||||
function $b(a,b){if(null===b){this.Ae&&Q(`null is not a valid ${this.name}`);if(this.pe){var c=this.Be();null!==a&&a.push(this.Xd,c);return c}return 0}b.kd||Q(`Cannot pass "${Zb(b)}" as a ${this.name}`);b.kd.Kd||Q(`Cannot pass deleted object as a pointer of type ${this.name}`);!this.oe&&b.kd.Nd.oe&&Q(`Cannot convert argument of type ${b.kd.Td?b.kd.Td.name:b.kd.Nd.name} to parameter type ${this.name}`);c=Xb(b.kd.Kd,b.kd.Nd.Ld,this.Ld);if(this.pe)switch(void 0===b.kd.Pd&&Q("Passing raw pointer to smart pointer is illegal"),
|
||||
this.qf){case 0:b.kd.Td===this?c=b.kd.Pd:Q(`Cannot convert argument of type ${b.kd.Td?b.kd.Td.name:b.kd.Nd.name} to parameter type ${this.name}`);break;case 1:c=b.kd.Pd;break;case 2:if(b.kd.Td===this)c=b.kd.Pd;else{var d=b.clone();c=this.lf(c,ac(function(){d["delete"]()}));null!==a&&a.push(this.Xd,c)}break;default:Q("Unsupporting sharing policy")}return c}
|
||||
function bc(a,b){if(null===b)return this.Ae&&Q(`null is not a valid ${this.name}`),0;b.kd||Q(`Cannot pass "${Zb(b)}" as a ${this.name}`);b.kd.Kd||Q(`Cannot pass deleted object as a pointer of type ${this.name}`);b.kd.Nd.oe&&Q(`Cannot convert argument of type ${b.kd.Nd.name} to parameter type ${this.name}`);return Xb(b.kd.Kd,b.kd.Nd.Ld,this.Ld)}
|
||||
function cc(a,b,c,d,f,k,l,m,p,w,y){this.name=a;this.Ld=b;this.Ae=c;this.oe=d;this.pe=f;this.jf=k;this.qf=l;this.Ke=m;this.Be=p;this.lf=w;this.Xd=y;f||void 0!==b.Qd?this.toWireType=$b:(this.toWireType=d?Yb:bc,this.Sd=null)}function dc(a,b,c){r.hasOwnProperty(a)||sb("Replacing nonexistant public symbol");void 0!==r[a].Od&&void 0!==c?r[a].Od[c]=b:(r[a]=b,r[a].ce=c)}
|
||||
var ec=(a,b)=>{var c=[];return function(){c.length=0;Object.assign(c,arguments);if(a.includes("j")){var d=r["dynCall_"+a];d=c&&c.length?d.apply(null,[b].concat(c)):d.call(null,b)}else d=Na.get(b).apply(null,c);return d}};function mc(a,b){a=O(a);var c=a.includes("j")?ec(a,b):Na.get(b);"function"!=typeof c&&Q(`unknown function pointer with signature ${a}: ${b}`);return c}var nc=void 0;function oc(a){a=pc(a);var b=O(a);qc(a);return b}
|
||||
function rc(a,b){function c(k){f[k]||pb[k]||(qb[k]?qb[k].forEach(c):(d.push(k),f[k]=!0))}var d=[],f={};b.forEach(c);throw new nc(`${a}: `+d.map(oc).join([", "]));}
|
||||
function sc(a,b,c,d,f){var k=b.length;2>k&&Q("argTypes array size mismatch! Must at least get return value and 'this' types!");var l=null!==b[1]&&null!==c,m=!1;for(c=1;c<b.length;++c)if(null!==b[c]&&void 0===b[c].Sd){m=!0;break}var p="void"!==b[0].name,w=k-2,y=Array(w),B=[],D=[];return function(){arguments.length!==w&&Q(`function ${a} called with ${arguments.length} arguments, expected ${w} args!`);D.length=0;B.length=l?2:1;B[0]=f;if(l){var u=b[1].toWireType(D,this);B[1]=u}for(var F=0;F<w;++F)y[F]=
|
||||
b[F+2].toWireType(D,arguments[F]),B.push(y[F]);F=d.apply(null,B);if(m)mb(D);else for(var H=l?1:2;H<b.length;H++){var T=1===H?u:y[H-2];null!==b[H].Sd&&b[H].Sd(T)}u=p?b[0].fromWireType(F):void 0;return u}}function tc(a,b){for(var c=[],d=0;d<a;d++)c.push(L[b+4*d>>2]);return c}function uc(){this.Wd=[void 0];this.Ie=[]}var vc=new uc;function wc(a){a>=vc.Zd&&0===--vc.get(a).Le&&vc.we(a)}
|
||||
var xc=a=>{a||Q("Cannot use deleted val. handle = "+a);return vc.get(a).value},ac=a=>{switch(a){case void 0:return 1;case null:return 2;case !0:return 3;case !1:return 4;default:return vc.ve({Le:1,value:a})}};function yc(a,b,c){switch(b){case 0:return function(d){return this.fromWireType((c?Ha:C)[d])};case 1:return function(d){return this.fromWireType((c?Ia:Ja)[d>>1])};case 2:return function(d){return this.fromWireType((c?K:L)[d>>2])};default:throw new TypeError("Unknown integer type: "+a);}}
|
||||
function zc(a,b){var c=pb[a];void 0===c&&Q(b+" has unknown type "+oc(a));return c}function Zb(a){if(null===a)return"null";var b=typeof a;return"object"===b||"array"===b||"function"===b?a.toString():""+a}function Ac(a,b){switch(b){case 2:return function(c){return this.fromWireType(N[c>>2])};case 3:return function(c){return this.fromWireType(Ka[c>>3])};default:throw new TypeError("Unknown float type: "+a);}}
|
||||
function Bc(a,b,c){switch(b){case 0:return c?function(d){return Ha[d]}:function(d){return C[d]};case 1:return c?function(d){return Ia[d>>1]}:function(d){return Ja[d>>1]};case 2:return c?function(d){return K[d>>2]}:function(d){return L[d>>2]};default:throw new TypeError("Unknown integer type: "+a);}}
|
||||
var ka=(a,b,c,d)=>{if(!(0<d))return 0;var f=c;d=c+d-1;for(var k=0;k<a.length;++k){var l=a.charCodeAt(k);if(55296<=l&&57343>=l){var m=a.charCodeAt(++k);l=65536+((l&1023)<<10)|m&1023}if(127>=l){if(c>=d)break;b[c++]=l}else{if(2047>=l){if(c+1>=d)break;b[c++]=192|l>>6}else{if(65535>=l){if(c+2>=d)break;b[c++]=224|l>>12}else{if(c+3>=d)break;b[c++]=240|l>>18;b[c++]=128|l>>12&63}b[c++]=128|l>>6&63}b[c++]=128|l&63}}b[c]=0;return c-f},ja=a=>{for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);127>=d?b++:2047>=
|
||||
d?b+=2:55296<=d&&57343>=d?(b+=4,++c):b+=3}return b},Cc="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Dc=(a,b)=>{var c=a>>1;for(var d=c+b/2;!(c>=d)&&Ja[c];)++c;c<<=1;if(32<c-a&&Cc)return Cc.decode(C.subarray(a,c));c="";for(d=0;!(d>=b/2);++d){var f=Ia[a+2*d>>1];if(0==f)break;c+=String.fromCharCode(f)}return c},Ec=(a,b,c)=>{void 0===c&&(c=2147483647);if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var f=0;f<c;++f)Ia[b>>1]=a.charCodeAt(f),b+=2;Ia[b>>1]=0;return b-d},
|
||||
Fc=a=>2*a.length,Gc=(a,b)=>{for(var c=0,d="";!(c>=b/4);){var f=K[a+4*c>>2];if(0==f)break;++c;65536<=f?(f-=65536,d+=String.fromCharCode(55296|f>>10,56320|f&1023)):d+=String.fromCharCode(f)}return d},Hc=(a,b,c)=>{void 0===c&&(c=2147483647);if(4>c)return 0;var d=b;c=d+c-4;for(var f=0;f<a.length;++f){var k=a.charCodeAt(f);if(55296<=k&&57343>=k){var l=a.charCodeAt(++f);k=65536+((k&1023)<<10)|l&1023}K[b>>2]=k;b+=4;if(b+4>c)break}K[b>>2]=0;return b-d},Ic=a=>{for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);
|
||||
55296<=d&&57343>=d&&++c;b+=4}return b},Jc={};function Kc(a){var b=Jc[a];return void 0===b?O(a):b}var Lc=[];
|
||||
function Mc(){function a(b){b.$$$embind_global$$$=b;var c="object"==typeof $$$embind_global$$$&&b.$$$embind_global$$$==b;c||delete b.$$$embind_global$$$;return c}if("object"==typeof globalThis)return globalThis;if("object"==typeof $$$embind_global$$$)return $$$embind_global$$$;"object"==typeof global&&a(global)?$$$embind_global$$$=global:"object"==typeof self&&a(self)&&($$$embind_global$$$=self);if("object"==typeof $$$embind_global$$$)return $$$embind_global$$$;throw Error("unable to get global object.");
|
||||
}function Nc(a){var b=Lc.length;Lc.push(a);return b}function Oc(a,b){for(var c=Array(a),d=0;d<a;++d)c[d]=zc(L[b+4*d>>2],"parameter "+d);return c}var Pc=[];function Qc(a){var b=Array(a+1);return function(c,d,f){b[0]=c;for(var k=0;k<a;++k){var l=zc(L[d+4*k>>2],"parameter "+k);b[k+1]=l.readValueFromPointer(f);f+=l.argPackAdvance}c=new (c.bind.apply(c,b));return ac(c)}}var Rc={};
|
||||
function Sc(a){var b=a.getExtension("ANGLE_instanced_arrays");b&&(a.vertexAttribDivisor=function(c,d){b.vertexAttribDivisorANGLE(c,d)},a.drawArraysInstanced=function(c,d,f,k){b.drawArraysInstancedANGLE(c,d,f,k)},a.drawElementsInstanced=function(c,d,f,k,l){b.drawElementsInstancedANGLE(c,d,f,k,l)})}
|
||||
function Tc(a){var b=a.getExtension("OES_vertex_array_object");b&&(a.createVertexArray=function(){return b.createVertexArrayOES()},a.deleteVertexArray=function(c){b.deleteVertexArrayOES(c)},a.bindVertexArray=function(c){b.bindVertexArrayOES(c)},a.isVertexArray=function(c){return b.isVertexArrayOES(c)})}function Uc(a){var b=a.getExtension("WEBGL_draw_buffers");b&&(a.drawBuffers=function(c,d){b.drawBuffersWEBGL(c,d)})}
|
||||
var Vc=1,Wc=[],Xc=[],Yc=[],Zc=[],ea=[],$c=[],ad=[],ia=[],bd=[],cd=[],dd={},ed={},gd=4;function R(a){hd||(hd=a)}function da(a){for(var b=Vc++,c=a.length;c<b;c++)a[c]=null;return b}function fa(a,b){a.Zd||(a.Zd=a.getContext,a.getContext=function(d,f){f=a.Zd(d,f);return"webgl"==d==f instanceof WebGLRenderingContext?f:null});var c=1<b.majorVersion?a.getContext("webgl2",b):a.getContext("webgl",b);return c?jd(c,b):0}
|
||||
function jd(a,b){var c=da(ia),d={handle:c,attributes:b,version:b.majorVersion,Ud:a};a.canvas&&(a.canvas.Oe=d);ia[c]=d;("undefined"==typeof b.Ze||b.Ze)&&kd(d);return c}function ha(a){v=ia[a];r.vf=S=v&&v.Ud;return!(a&&!S)}
|
||||
function kd(a){a||(a=v);if(!a.gf){a.gf=!0;var b=a.Ud;Sc(b);Tc(b);Uc(b);b.Fe=b.getExtension("WEBGL_draw_instanced_base_vertex_base_instance");b.Je=b.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance");2<=a.version&&(b.Ge=b.getExtension("EXT_disjoint_timer_query_webgl2"));if(2>a.version||!b.Ge)b.Ge=b.getExtension("EXT_disjoint_timer_query");b.wf=b.getExtension("WEBGL_multi_draw");(b.getSupportedExtensions()||[]).forEach(function(c){c.includes("lose_context")||c.includes("debug")||b.getExtension(c)})}}
|
||||
var v,hd,ld={},nd=()=>{if(!md){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:ma||"./this.program"},b;for(b in ld)void 0===ld[b]?delete a[b]:a[b]=ld[b];var c=[];for(b in a)c.push(`${b}=${a[b]}`);md=c}return md},md,od=[null,[],[]];function pd(a){S.bindVertexArray(ad[a])}
|
||||
function qd(a,b){for(var c=0;c<a;c++){var d=K[b+4*c>>2];S.deleteVertexArray(ad[d]);ad[d]=null}}var rd=[];function sd(a,b,c,d){S.drawElements(a,b,c,d)}function td(a,b,c,d){for(var f=0;f<a;f++){var k=S[c](),l=k&&da(d);k?(k.name=l,d[l]=k):R(1282);K[b+4*f>>2]=l}}function ud(a,b){td(a,b,"createVertexArray",ad)}
|
||||
function vd(a,b,c){if(b){var d=void 0;switch(a){case 36346:d=1;break;case 36344:0!=c&&1!=c&&R(1280);return;case 34814:case 36345:d=0;break;case 34466:var f=S.getParameter(34467);d=f?f.length:0;break;case 33309:if(2>v.version){R(1282);return}d=2*(S.getSupportedExtensions()||[]).length;break;case 33307:case 33308:if(2>v.version){R(1280);return}d=33307==a?3:0}if(void 0===d)switch(f=S.getParameter(a),typeof f){case "number":d=f;break;case "boolean":d=f?1:0;break;case "string":R(1280);return;case "object":if(null===
|
||||
f)switch(a){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:d=0;break;default:R(1280);return}else{if(f instanceof Float32Array||f instanceof Uint32Array||f instanceof Int32Array||f instanceof Array){for(a=0;a<f.length;++a)switch(c){case 0:K[b+4*a>>2]=f[a];break;case 2:N[b+4*a>>2]=f[a];break;case 4:Ha[b+a>>0]=f[a]?1:0}return}try{d=f.name|0}catch(k){R(1280);
|
||||
Ca("GL_INVALID_ENUM in glGet"+c+"v: Unknown object returned from WebGL getParameter("+a+")! (error: "+k+")");return}}break;default:R(1280);Ca("GL_INVALID_ENUM in glGet"+c+"v: Native code calling glGet"+c+"v("+a+") and it returns "+f+" of type "+typeof f+"!");return}switch(c){case 1:c=d;L[b>>2]=c;L[b+4>>2]=(c-L[b>>2])/4294967296;break;case 0:K[b>>2]=d;break;case 2:N[b>>2]=d;break;case 4:Ha[b>>0]=d?1:0}}else R(1281)}var xd=a=>{var b=ja(a)+1,c=wd(b);c&&ka(a,C,c,b);return c};
|
||||
function yd(a){return"]"==a.slice(-1)&&a.lastIndexOf("[")}function zd(a){a-=5120;return 0==a?Ha:1==a?C:2==a?Ia:4==a?K:6==a?N:5==a||28922==a||28520==a||30779==a||30782==a?L:Ja}function Ad(a,b,c,d,f){a=zd(a);var k=31-Math.clz32(a.BYTES_PER_ELEMENT),l=gd;return a.subarray(f>>k,f+d*(c*({5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[b-6402]||1)*(1<<k)+l-1&-l)>>k)}
|
||||
function W(a){var b=S.We;if(b){var c=b.je[a];"number"==typeof c&&(b.je[a]=c=S.getUniformLocation(b,b.Me[a]+(0<c?"["+c+"]":"")));return c}R(1282)}var Bd=[],Cd=[],Dd=a=>0===a%4&&(0!==a%100||0===a%400),Ed=[31,29,31,30,31,30,31,31,30,31,30,31],Fd=[31,28,31,30,31,30,31,31,30,31,30,31];function Gd(a){var b=Array(ja(a)+1);ka(a,b,0,b.length);return b}
|
||||
var Hd=(a,b,c,d)=>{function f(u,F,H){for(u="number"==typeof u?u.toString():u||"";u.length<F;)u=H[0]+u;return u}function k(u,F){return f(u,F,"0")}function l(u,F){function H(ca){return 0>ca?-1:0<ca?1:0}var T;0===(T=H(u.getFullYear()-F.getFullYear()))&&0===(T=H(u.getMonth()-F.getMonth()))&&(T=H(u.getDate()-F.getDate()));return T}function m(u){switch(u.getDay()){case 0:return new Date(u.getFullYear()-1,11,29);case 1:return u;case 2:return new Date(u.getFullYear(),0,3);case 3:return new Date(u.getFullYear(),
|
||||
0,2);case 4:return new Date(u.getFullYear(),0,1);case 5:return new Date(u.getFullYear()-1,11,31);case 6:return new Date(u.getFullYear()-1,11,30)}}function p(u){var F=u.$d;for(u=new Date((new Date(u.ae+1900,0,1)).getTime());0<F;){var H=u.getMonth(),T=(Dd(u.getFullYear())?Ed:Fd)[H];if(F>T-u.getDate())F-=T-u.getDate()+1,u.setDate(1),11>H?u.setMonth(H+1):(u.setMonth(0),u.setFullYear(u.getFullYear()+1));else{u.setDate(u.getDate()+F);break}}H=new Date(u.getFullYear()+1,0,4);F=m(new Date(u.getFullYear(),
|
||||
0,4));H=m(H);return 0>=l(F,u)?0>=l(H,u)?u.getFullYear()+1:u.getFullYear():u.getFullYear()-1}var w=K[d+40>>2];d={tf:K[d>>2],sf:K[d+4>>2],te:K[d+8>>2],Ce:K[d+12>>2],ue:K[d+16>>2],ae:K[d+20>>2],Vd:K[d+24>>2],$d:K[d+28>>2],zf:K[d+32>>2],rf:K[d+36>>2],uf:w?w?kb(C,w):"":""};c=c?kb(C,c):"";w={"%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 y in w)c=c.replace(new RegExp(y,"g"),w[y]);var B="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),D="January February March April May June July August September October November December".split(" ");w={"%a":u=>B[u.Vd].substring(0,3),"%A":u=>B[u.Vd],"%b":u=>D[u.ue].substring(0,3),"%B":u=>D[u.ue],"%C":u=>k((u.ae+1900)/
|
||||
100|0,2),"%d":u=>k(u.Ce,2),"%e":u=>f(u.Ce,2," "),"%g":u=>p(u).toString().substring(2),"%G":u=>p(u),"%H":u=>k(u.te,2),"%I":u=>{u=u.te;0==u?u=12:12<u&&(u-=12);return k(u,2)},"%j":u=>{for(var F=0,H=0;H<=u.ue-1;F+=(Dd(u.ae+1900)?Ed:Fd)[H++]);return k(u.Ce+F,3)},"%m":u=>k(u.ue+1,2),"%M":u=>k(u.sf,2),"%n":()=>"\n","%p":u=>0<=u.te&&12>u.te?"AM":"PM","%S":u=>k(u.tf,2),"%t":()=>"\t","%u":u=>u.Vd||7,"%U":u=>k(Math.floor((u.$d+7-u.Vd)/7),2),"%V":u=>{var F=Math.floor((u.$d+7-(u.Vd+6)%7)/7);2>=(u.Vd+371-u.$d-
|
||||
2)%7&&F++;if(F)53==F&&(H=(u.Vd+371-u.$d)%7,4==H||3==H&&Dd(u.ae)||(F=1));else{F=52;var H=(u.Vd+7-u.$d-1)%7;(4==H||5==H&&Dd(u.ae%400-1))&&F++}return k(F,2)},"%w":u=>u.Vd,"%W":u=>k(Math.floor((u.$d+7-(u.Vd+6)%7)/7),2),"%y":u=>(u.ae+1900).toString().substring(2),"%Y":u=>u.ae+1900,"%z":u=>{u=u.rf;var F=0<=u;u=Math.abs(u)/60;return(F?"+":"-")+String("0000"+(u/60*100+u%60)).slice(-4)},"%Z":u=>u.uf,"%%":()=>"%"};c=c.replace(/%%/g,"\x00\x00");for(y in w)c.includes(y)&&(c=c.replace(new RegExp(y,"g"),w[y](d)));
|
||||
c=c.replace(/\0\0/g,"%");y=Gd(c);if(y.length>b)return 0;Ha.set(y,a);return y.length-1};rb=r.InternalError=class extends Error{constructor(a){super(a);this.name="InternalError"}};for(var Id=Array(256),Jd=0;256>Jd;++Jd)Id[Jd]=String.fromCharCode(Jd);wb=Id;xb=r.BindingError=class extends Error{constructor(a){super(a);this.name="BindingError"}};
|
||||
Rb.prototype.isAliasOf=function(a){if(!(this instanceof Rb&&a instanceof Rb))return!1;var b=this.kd.Nd.Ld,c=this.kd.Kd,d=a.kd.Nd.Ld;for(a=a.kd.Kd;b.Qd;)c=b.ke(c),b=b.Qd;for(;d.Qd;)a=d.ke(a),d=d.Qd;return b===d&&c===a};
|
||||
Rb.prototype.clone=function(){this.kd.Kd||zb(this);if(this.kd.ie)return this.kd.count.value+=1,this;var a=Qb,b=Object,c=b.create,d=Object.getPrototypeOf(this),f=this.kd;a=a(c.call(b,d,{kd:{value:{count:f.count,ee:f.ee,ie:f.ie,Kd:f.Kd,Nd:f.Nd,Pd:f.Pd,Td:f.Td}}}));a.kd.count.value+=1;a.kd.ee=!1;return a};Rb.prototype["delete"]=function(){this.kd.Kd||zb(this);this.kd.ee&&!this.kd.ie&&Q("Object already scheduled for deletion");Bb(this);Cb(this.kd);this.kd.ie||(this.kd.Pd=void 0,this.kd.Kd=void 0)};
|
||||
Rb.prototype.isDeleted=function(){return!this.kd.Kd};Rb.prototype.deleteLater=function(){this.kd.Kd||zb(this);this.kd.ee&&!this.kd.ie&&Q("Object already scheduled for deletion");Kb.push(this);1===Kb.length&&Mb&&Mb(Lb);this.kd.ee=!0;return this};r.getInheritedInstanceCount=function(){return Object.keys(Nb).length};r.getLiveInheritedInstances=function(){var a=[],b;for(b in Nb)Nb.hasOwnProperty(b)&&a.push(Nb[b]);return a};r.flushPendingDeletes=Lb;r.setDelayFunction=function(a){Mb=a;Kb.length&&Mb&&Mb(Lb)};
|
||||
cc.prototype.bf=function(a){this.Ke&&(a=this.Ke(a));return a};cc.prototype.Ee=function(a){this.Xd&&this.Xd(a)};cc.prototype.argPackAdvance=8;cc.prototype.readValueFromPointer=nb;cc.prototype.deleteObject=function(a){if(null!==a)a["delete"]()};
|
||||
cc.prototype.fromWireType=function(a){function b(){return this.pe?Pb(this.Ld.fe,{Nd:this.jf,Kd:c,Td:this,Pd:a}):Pb(this.Ld.fe,{Nd:this,Kd:a})}var c=this.bf(a);if(!c)return this.Ee(a),null;var d=Ob(this.Ld,c);if(void 0!==d){if(0===d.kd.count.value)return d.kd.Kd=c,d.kd.Pd=a,d.clone();d=d.clone();this.Ee(a);return d}d=this.Ld.af(c);d=Jb[d];if(!d)return b.call(this);d=this.oe?d.Ve:d.pointerType;var f=Db(c,this.Ld,d.Ld);return null===f?b.call(this):this.pe?Pb(d.Ld.fe,{Nd:d,Kd:f,Td:this,Pd:a}):Pb(d.Ld.fe,
|
||||
{Nd:d,Kd:f})};nc=r.UnboundTypeError=function(a,b){var c=Tb(b,function(d){this.name=b;this.message=d;d=Error(d).stack;void 0!==d&&(this.stack=this.toString()+"\n"+d.replace(/^Error(:[^\n]*)?\n/,""))});c.prototype=Object.create(a.prototype);c.prototype.constructor=c;c.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`};return c}(Error,"UnboundTypeError");
|
||||
Object.assign(uc.prototype,{get(a){return this.Wd[a]},has(a){return void 0!==this.Wd[a]},ve(a){var b=this.Ie.pop()||this.Wd.length;this.Wd[b]=a;return b},we(a){this.Wd[a]=void 0;this.Ie.push(a)}});vc.Wd.push({value:void 0},{value:null},{value:!0},{value:!1});vc.Zd=vc.Wd.length;r.count_emval_handles=function(){for(var a=0,b=vc.Zd;b<vc.Wd.length;++b)void 0!==vc.Wd[b]&&++a;return a};for(var S,Kd=0;32>Kd;++Kd)rd.push(Array(Kd));var Ld=new Float32Array(288);
|
||||
for(Kd=0;288>Kd;++Kd)Bd[Kd]=Ld.subarray(0,Kd+1);var Md=new Int32Array(288);for(Kd=0;288>Kd;++Kd)Cd[Kd]=Md.subarray(0,Kd+1);
|
||||
var $d={H:function(a,b,c){(new fb(a)).Zd(b,c);gb=a;ib++;throw gb;},$:function(){return 0},$c:()=>{},_c:function(){return 0},Zc:()=>{},Yc:()=>{},_:function(){},Xc:()=>{},D:function(a){var b=lb[a];delete lb[a];var c=b.Be,d=b.Xd,f=b.He,k=f.map(l=>l.ef).concat(f.map(l=>l.nf));tb([a],k,l=>{var m={};f.forEach((p,w)=>{var y=l[w],B=p.cf,D=p.df,u=l[w+f.length],F=p.mf,H=p.pf;m[p.$e]={read:T=>y.fromWireType(B(D,T)),write:(T,ca)=>{var Y=[];F(H,T,u.toWireType(Y,ca));mb(Y)}}});return[{name:b.name,fromWireType:function(p){var w=
|
||||
{},y;for(y in m)w[y]=m[y].read(p);d(p);return w},toWireType:function(p,w){for(var y in m)if(!(y in w))throw new TypeError(`Missing field: "${y}"`);var B=c();for(y in m)m[y].write(B,w[y]);null!==p&&p.push(d,B);return B},argPackAdvance:8,readValueFromPointer:nb,Sd:d}]})},fa:function(){},Tc:function(a,b,c,d,f){var k=vb(c);b=O(b);ub(a,{name:b,fromWireType:function(l){return!!l},toWireType:function(l,m){return m?d:f},argPackAdvance:8,readValueFromPointer:function(l){if(1===c)var m=Ha;else if(2===c)m=Ia;
|
||||
else if(4===c)m=K;else throw new TypeError("Unknown boolean type size: "+b);return this.fromWireType(m[l>>k])},Sd:null})},l:function(a,b,c,d,f,k,l,m,p,w,y,B,D){y=O(y);k=mc(f,k);m&&(m=mc(l,m));w&&(w=mc(p,w));D=mc(B,D);var u=Sb(y);Vb(u,function(){rc(`Cannot construct ${y} due to unbound types`,[d])});tb([a,b,c],d?[d]:[],function(F){F=F[0];if(d){var H=F.Ld;var T=H.fe}else T=Rb.prototype;F=Tb(u,function(){if(Object.getPrototypeOf(this)!==ca)throw new xb("Use 'new' to construct "+y);if(void 0===Y.Yd)throw new xb(y+
|
||||
" has no accessible constructor");var Ma=Y.Yd[arguments.length];if(void 0===Ma)throw new xb(`Tried to invoke ctor of ${y} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(Y.Yd).toString()}) parameters instead!`);return Ma.apply(this,arguments)});var ca=Object.create(T,{constructor:{value:F}});F.prototype=ca;var Y=new Wb(y,F,ca,D,H,k,m,w);Y.Qd&&(void 0===Y.Qd.le&&(Y.Qd.le=[]),Y.Qd.le.push(Y));H=new cc(y,Y,!0,!1,!1);T=new cc(y+"*",Y,!1,!1,!1);var va=new cc(y+" const*",
|
||||
Y,!1,!0,!1);Jb[a]={pointerType:T,Ve:va};dc(u,F);return[H,T,va]})},e:function(a,b,c,d,f,k,l){var m=tc(c,d);b=O(b);k=mc(f,k);tb([],[a],function(p){function w(){rc(`Cannot call ${y} due to unbound types`,m)}p=p[0];var y=`${p.name}.${b}`;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);var B=p.Ld.constructor;void 0===B[b]?(w.ce=c-1,B[b]=w):(Ub(B,b,y),B[b].Od[c-1]=w);tb([],m,function(D){D=[D[0],null].concat(D.slice(1));D=sc(y,D,null,k,l);void 0===B[b].Od?(D.ce=c-1,B[b]=D):B[b].Od[c-1]=D;if(p.Ld.le)for(const u of p.Ld.le)u.constructor.hasOwnProperty(b)||
|
||||
(u.constructor[b]=D);return[]});return[]})},B:function(a,b,c,d,f,k){var l=tc(b,c);f=mc(d,f);tb([],[a],function(m){m=m[0];var p=`constructor ${m.name}`;void 0===m.Ld.Yd&&(m.Ld.Yd=[]);if(void 0!==m.Ld.Yd[b-1])throw new xb(`Cannot register multiple constructors with identical number of parameters (${b-1}) for class '${m.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);m.Ld.Yd[b-1]=()=>{rc(`Cannot construct ${m.name} due to unbound types`,l)};
|
||||
tb([],l,function(w){w.splice(1,0,null);m.Ld.Yd[b-1]=sc(p,w,null,f,k);return[]});return[]})},a:function(a,b,c,d,f,k,l,m){var p=tc(c,d);b=O(b);k=mc(f,k);tb([],[a],function(w){function y(){rc(`Cannot call ${B} due to unbound types`,p)}w=w[0];var B=`${w.name}.${b}`;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);m&&w.Ld.kf.push(b);var D=w.Ld.fe,u=D[b];void 0===u||void 0===u.Od&&u.className!==w.name&&u.ce===c-2?(y.ce=c-2,y.className=w.name,D[b]=y):(Ub(D,b,B),D[b].Od[c-2]=y);tb([],p,function(F){F=sc(B,F,
|
||||
w,k,l);void 0===D[b].Od?(F.ce=c-2,D[b]=F):D[b].Od[c-2]=F;return[]});return[]})},s:function(a,b,c){a=O(a);tb([],[b],function(d){d=d[0];r[a]=d.fromWireType(c);return[]})},Sc:function(a,b){b=O(b);ub(a,{name:b,fromWireType:function(c){var d=xc(c);wc(c);return d},toWireType:function(c,d){return ac(d)},argPackAdvance:8,readValueFromPointer:nb,Sd:null})},j:function(a,b,c,d){function f(){}c=vb(c);b=O(b);f.values={};ub(a,{name:b,constructor:f,fromWireType:function(k){return this.constructor.values[k]},toWireType:function(k,
|
||||
l){return l.value},argPackAdvance:8,readValueFromPointer:yc(b,c,d),Sd:null});Vb(b,f)},b:function(a,b,c){var d=zc(a,"enum");b=O(b);a=d.constructor;d=Object.create(d.constructor.prototype,{value:{value:c},constructor:{value:Tb(`${d.name}_${b}`,function(){})}});a.values[c]=d;a[b]=d},Y:function(a,b,c){c=vb(c);b=O(b);ub(a,{name:b,fromWireType:function(d){return d},toWireType:function(d,f){return f},argPackAdvance:8,readValueFromPointer:Ac(b,c),Sd:null})},v:function(a,b,c,d,f,k){var l=tc(b,c);a=O(a);f=
|
||||
mc(d,f);Vb(a,function(){rc(`Cannot call ${a} due to unbound types`,l)},b-1);tb([],l,function(m){m=[m[0],null].concat(m.slice(1));dc(a,sc(a,m,null,f,k),b-1);return[]})},E:function(a,b,c,d,f){b=O(b);-1===f&&(f=4294967295);f=vb(c);var k=m=>m;if(0===d){var l=32-8*c;k=m=>m<<l>>>l}c=b.includes("unsigned")?function(m,p){return p>>>0}:function(m,p){return p};ub(a,{name:b,fromWireType:k,toWireType:c,argPackAdvance:8,readValueFromPointer:Bc(b,f,0!==d),Sd:null})},r:function(a,b,c){function d(k){k>>=2;var l=
|
||||
L;return new f(l.buffer,l[k+1],l[k])}var f=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][b];c=O(c);ub(a,{name:c,fromWireType:d,argPackAdvance:8,readValueFromPointer:d},{ff:!0})},p:function(a,b,c,d,f,k,l,m,p,w,y,B){c=O(c);k=mc(f,k);m=mc(l,m);w=mc(p,w);B=mc(y,B);tb([a],[b],function(D){D=D[0];return[new cc(c,D.Ld,!1,!1,!0,D,d,k,m,w,B)]})},X:function(a,b){b=O(b);var c="std::string"===b;ub(a,{name:b,fromWireType:function(d){var f=L[d>>2],k=d+4;if(c)for(var l=
|
||||
k,m=0;m<=f;++m){var p=k+m;if(m==f||0==C[p]){l=l?kb(C,l,p-l):"";if(void 0===w)var w=l;else w+=String.fromCharCode(0),w+=l;l=p+1}}else{w=Array(f);for(m=0;m<f;++m)w[m]=String.fromCharCode(C[k+m]);w=w.join("")}qc(d);return w},toWireType:function(d,f){f instanceof ArrayBuffer&&(f=new Uint8Array(f));var k="string"==typeof f;k||f instanceof Uint8Array||f instanceof Uint8ClampedArray||f instanceof Int8Array||Q("Cannot pass non-string to std::string");var l=c&&k?ja(f):f.length;var m=wd(4+l+1),p=m+4;L[m>>2]=
|
||||
l;if(c&&k)ka(f,C,p,l+1);else if(k)for(k=0;k<l;++k){var w=f.charCodeAt(k);255<w&&(qc(p),Q("String has UTF-16 code units that do not fit in 8 bits"));C[p+k]=w}else for(k=0;k<l;++k)C[p+k]=f[k];null!==d&&d.push(qc,m);return m},argPackAdvance:8,readValueFromPointer:nb,Sd:function(d){qc(d)}})},O:function(a,b,c){c=O(c);if(2===b){var d=Dc;var f=Ec;var k=Fc;var l=()=>Ja;var m=1}else 4===b&&(d=Gc,f=Hc,k=Ic,l=()=>L,m=2);ub(a,{name:c,fromWireType:function(p){for(var w=L[p>>2],y=l(),B,D=p+4,u=0;u<=w;++u){var F=
|
||||
p+4+u*b;if(u==w||0==y[F>>m])D=d(D,F-D),void 0===B?B=D:(B+=String.fromCharCode(0),B+=D),D=F+b}qc(p);return B},toWireType:function(p,w){"string"!=typeof w&&Q(`Cannot pass non-string to C++ string type ${c}`);var y=k(w),B=wd(4+y+b);L[B>>2]=y>>m;f(w,B+4,y+b);null!==p&&p.push(qc,B);return B},argPackAdvance:8,readValueFromPointer:nb,Sd:function(p){qc(p)}})},C:function(a,b,c,d,f,k){lb[a]={name:O(b),Be:mc(c,d),Xd:mc(f,k),He:[]}},d:function(a,b,c,d,f,k,l,m,p,w){lb[a].He.push({$e:O(b),ef:c,cf:mc(d,f),df:k,
|
||||
nf:l,mf:mc(m,p),pf:w})},Rc:function(a,b){b=O(b);ub(a,{hf:!0,name:b,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},Qc:()=>!0,Pc:()=>{throw Infinity;},G:function(a,b,c){a=xc(a);b=zc(b,"emval::as");var d=[],f=ac(d);L[c>>2]=f;return b.toWireType(d,a)},N:function(a,b,c,d,f){a=Lc[a];b=xc(b);c=Kc(c);var k=[];L[d>>2]=ac(k);return a(b,c,k,f)},t:function(a,b,c,d){a=Lc[a];b=xc(b);c=Kc(c);a(b,c,null,d)},c:wc,M:function(a){if(0===a)return ac(Mc());a=Kc(a);return ac(Mc()[a])},q:function(a,
|
||||
b){var c=Oc(a,b),d=c[0];b=d.name+"_$"+c.slice(1).map(function(l){return l.name}).join("_")+"$";var f=Pc[b];if(void 0!==f)return f;var k=Array(a-1);f=Nc((l,m,p,w)=>{for(var y=0,B=0;B<a-1;++B)k[B]=c[B+1].readValueFromPointer(w+y),y+=c[B+1].argPackAdvance;l=l[m].apply(l,k);for(B=0;B<a-1;++B)c[B+1].Xe&&c[B+1].Xe(k[B]);if(!d.hf)return d.toWireType(p,l)});return Pc[b]=f},A:function(a,b){a=xc(a);b=xc(b);return ac(a[b])},m:function(a){4<a&&(vc.get(a).Le+=1)},L:function(a,b,c,d){a=xc(a);var f=Rc[b];f||(f=
|
||||
Qc(b),Rc[b]=f);return f(a,c,d)},I:function(){return ac([])},f:function(a){return ac(Kc(a))},F:function(){return ac({})},Oc:function(a){a=xc(a);return!a},z:function(a){var b=xc(a);mb(b);wc(a)},i:function(a,b,c){a=xc(a);b=xc(b);c=xc(c);a[b]=c},g:function(a,b){a=zc(a,"_emval_take_value");a=a.readValueFromPointer(b);return ac(a)},ea:function(){return-52},da:function(){},h:()=>{Ea("")},Nc:()=>performance.now(),Mc:a=>{var b=C.length;a>>>=0;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);
|
||||
d=Math.min(d,a+100663296);var f=Math;d=Math.max(a,d);a:{f=f.min.call(f,2147483648,d+(65536-d%65536)%65536)-Fa.buffer.byteLength+65535>>>16;try{Fa.grow(f);La();var k=1;break a}catch(l){}k=void 0}if(k)return!0}return!1},Lc:function(){return v?v.handle:0},Wc:(a,b)=>{var c=0;nd().forEach(function(d,f){var k=b+c;f=L[a+4*f>>2]=k;for(k=0;k<d.length;++k)Ha[f++>>0]=d.charCodeAt(k);Ha[f>>0]=0;c+=d.length+1});return 0},Vc:(a,b)=>{var c=nd();L[a>>2]=c.length;var d=0;c.forEach(function(f){d+=f.length+1});L[b>>
|
||||
2]=d;return 0},Kc:a=>{if(!noExitRuntime){if(r.onExit)r.onExit(a);Ga=!0}oa(a,new db(a))},P:()=>52,ha:function(){return 52},Uc:()=>52,ga:function(){return 70},Z:(a,b,c,d)=>{for(var f=0,k=0;k<c;k++){var l=L[b>>2],m=L[b+4>>2];b+=8;for(var p=0;p<m;p++){var w=C[l+p],y=od[a];0===w||10===w?((1===a?Aa:Ca)(kb(y,0)),y.length=0):y.push(w)}f+=m}L[d>>2]=f;return 0},Jc:function(a){S.activeTexture(a)},Ic:function(a,b){S.attachShader(Xc[a],$c[b])},Hc:function(a,b,c){S.bindAttribLocation(Xc[a],b,c?kb(C,c):"")},Gc:function(a,
|
||||
b){35051==a?S.ye=b:35052==a&&(S.de=b);S.bindBuffer(a,Wc[b])},W:function(a,b){S.bindFramebuffer(a,Yc[b])},Fc:function(a,b){S.bindRenderbuffer(a,Zc[b])},Ec:function(a,b){S.bindSampler(a,bd[b])},Dc:function(a,b){S.bindTexture(a,ea[b])},Cc:pd,Bc:pd,Ac:function(a,b,c,d){S.blendColor(a,b,c,d)},zc:function(a){S.blendEquation(a)},yc:function(a,b){S.blendFunc(a,b)},xc:function(a,b,c,d,f,k,l,m,p,w){S.blitFramebuffer(a,b,c,d,f,k,l,m,p,w)},wc:function(a,b,c,d){2<=v.version?c&&b?S.bufferData(a,C,d,c,b):S.bufferData(a,
|
||||
b,d):S.bufferData(a,c?C.subarray(c,c+b):b,d)},vc:function(a,b,c,d){2<=v.version?c&&S.bufferSubData(a,b,C,d,c):S.bufferSubData(a,b,C.subarray(d,d+c))},uc:function(a){return S.checkFramebufferStatus(a)},V:function(a){S.clear(a)},U:function(a,b,c,d){S.clearColor(a,b,c,d)},T:function(a){S.clearStencil(a)},ca:function(a,b,c,d){return S.clientWaitSync(cd[a],b,(c>>>0)+4294967296*d)},tc:function(a,b,c,d){S.colorMask(!!a,!!b,!!c,!!d)},sc:function(a){S.compileShader($c[a])},rc:function(a,b,c,d,f,k,l,m){2<=
|
||||
v.version?S.de||!l?S.compressedTexImage2D(a,b,c,d,f,k,l,m):S.compressedTexImage2D(a,b,c,d,f,k,C,m,l):S.compressedTexImage2D(a,b,c,d,f,k,m?C.subarray(m,m+l):null)},qc:function(a,b,c,d,f,k,l,m,p){2<=v.version?S.de||!m?S.compressedTexSubImage2D(a,b,c,d,f,k,l,m,p):S.compressedTexSubImage2D(a,b,c,d,f,k,l,C,p,m):S.compressedTexSubImage2D(a,b,c,d,f,k,l,p?C.subarray(p,p+m):null)},pc:function(a,b,c,d,f){S.copyBufferSubData(a,b,c,d,f)},oc:function(a,b,c,d,f,k,l,m){S.copyTexSubImage2D(a,b,c,d,f,k,l,m)},nc:function(){var a=
|
||||
da(Xc),b=S.createProgram();b.name=a;b.se=b.qe=b.re=0;b.De=1;Xc[a]=b;return a},mc:function(a){var b=da($c);$c[b]=S.createShader(a);return b},lc:function(a){S.cullFace(a)},kc:function(a,b){for(var c=0;c<a;c++){var d=K[b+4*c>>2],f=Wc[d];f&&(S.deleteBuffer(f),f.name=0,Wc[d]=null,d==S.ye&&(S.ye=0),d==S.de&&(S.de=0))}},jc:function(a,b){for(var c=0;c<a;++c){var d=K[b+4*c>>2],f=Yc[d];f&&(S.deleteFramebuffer(f),f.name=0,Yc[d]=null)}},ic:function(a){if(a){var b=Xc[a];b?(S.deleteProgram(b),b.name=0,Xc[a]=null):
|
||||
R(1281)}},hc:function(a,b){for(var c=0;c<a;c++){var d=K[b+4*c>>2],f=Zc[d];f&&(S.deleteRenderbuffer(f),f.name=0,Zc[d]=null)}},gc:function(a,b){for(var c=0;c<a;c++){var d=K[b+4*c>>2],f=bd[d];f&&(S.deleteSampler(f),f.name=0,bd[d]=null)}},fc:function(a){if(a){var b=$c[a];b?(S.deleteShader(b),$c[a]=null):R(1281)}},ec:function(a){if(a){var b=cd[a];b?(S.deleteSync(b),b.name=0,cd[a]=null):R(1281)}},dc:function(a,b){for(var c=0;c<a;c++){var d=K[b+4*c>>2],f=ea[d];f&&(S.deleteTexture(f),f.name=0,ea[d]=null)}},
|
||||
cc:qd,bc:qd,ac:function(a){S.depthMask(!!a)},$b:function(a){S.disable(a)},_b:function(a){S.disableVertexAttribArray(a)},Zb:function(a,b,c){S.drawArrays(a,b,c)},Yb:function(a,b,c,d){S.drawArraysInstanced(a,b,c,d)},Xb:function(a,b,c,d,f){S.Fe.drawArraysInstancedBaseInstanceWEBGL(a,b,c,d,f)},Wb:function(a,b){for(var c=rd[a],d=0;d<a;d++)c[d]=K[b+4*d>>2];S.drawBuffers(c)},Vb:sd,Ub:function(a,b,c,d,f){S.drawElementsInstanced(a,b,c,d,f)},Tb:function(a,b,c,d,f,k,l){S.Fe.drawElementsInstancedBaseVertexBaseInstanceWEBGL(a,
|
||||
b,c,d,f,k,l)},Sb:function(a,b,c,d,f,k){sd(a,d,f,k)},Rb:function(a){S.enable(a)},Qb:function(a){S.enableVertexAttribArray(a)},Pb:function(a,b){return(a=S.fenceSync(a,b))?(b=da(cd),a.name=b,cd[b]=a,b):0},Ob:function(){S.finish()},Nb:function(){S.flush()},Mb:function(a,b,c,d){S.framebufferRenderbuffer(a,b,c,Zc[d])},Lb:function(a,b,c,d,f){S.framebufferTexture2D(a,b,c,ea[d],f)},Kb:function(a){S.frontFace(a)},Jb:function(a,b){td(a,b,"createBuffer",Wc)},Ib:function(a,b){td(a,b,"createFramebuffer",Yc)},Hb:function(a,
|
||||
b){td(a,b,"createRenderbuffer",Zc)},Gb:function(a,b){td(a,b,"createSampler",bd)},Fb:function(a,b){td(a,b,"createTexture",ea)},Eb:ud,Db:ud,Cb:function(a){S.generateMipmap(a)},Bb:function(a,b,c){c?K[c>>2]=S.getBufferParameter(a,b):R(1281)},Ab:function(){var a=S.getError()||hd;hd=0;return a},zb:function(a,b){vd(a,b,2)},yb:function(a,b,c,d){a=S.getFramebufferAttachmentParameter(a,b,c);if(a instanceof WebGLRenderbuffer||a instanceof WebGLTexture)a=a.name|0;K[d>>2]=a},K:function(a,b){vd(a,b,0)},xb:function(a,
|
||||
b,c,d){a=S.getProgramInfoLog(Xc[a]);null===a&&(a="(unknown error)");b=0<b&&d?ka(a,C,d,b):0;c&&(K[c>>2]=b)},wb:function(a,b,c){if(c)if(a>=Vc)R(1281);else if(a=Xc[a],35716==b)a=S.getProgramInfoLog(a),null===a&&(a="(unknown error)"),K[c>>2]=a.length+1;else if(35719==b){if(!a.se)for(b=0;b<S.getProgramParameter(a,35718);++b)a.se=Math.max(a.se,S.getActiveUniform(a,b).name.length+1);K[c>>2]=a.se}else if(35722==b){if(!a.qe)for(b=0;b<S.getProgramParameter(a,35721);++b)a.qe=Math.max(a.qe,S.getActiveAttrib(a,
|
||||
b).name.length+1);K[c>>2]=a.qe}else if(35381==b){if(!a.re)for(b=0;b<S.getProgramParameter(a,35382);++b)a.re=Math.max(a.re,S.getActiveUniformBlockName(a,b).length+1);K[c>>2]=a.re}else K[c>>2]=S.getProgramParameter(a,b);else R(1281)},vb:function(a,b,c){c?K[c>>2]=S.getRenderbufferParameter(a,b):R(1281)},ub:function(a,b,c,d){a=S.getShaderInfoLog($c[a]);null===a&&(a="(unknown error)");b=0<b&&d?ka(a,C,d,b):0;c&&(K[c>>2]=b)},tb:function(a,b,c,d){a=S.getShaderPrecisionFormat(a,b);K[c>>2]=a.rangeMin;K[c+4>>
|
||||
2]=a.rangeMax;K[d>>2]=a.precision},sb:function(a,b,c){c?35716==b?(a=S.getShaderInfoLog($c[a]),null===a&&(a="(unknown error)"),K[c>>2]=a?a.length+1:0):35720==b?(a=S.getShaderSource($c[a]),K[c>>2]=a?a.length+1:0):K[c>>2]=S.getShaderParameter($c[a],b):R(1281)},S:function(a){var b=dd[a];if(!b){switch(a){case 7939:b=S.getSupportedExtensions()||[];b=b.concat(b.map(function(d){return"GL_"+d}));b=xd(b.join(" "));break;case 7936:case 7937:case 37445:case 37446:(b=S.getParameter(a))||R(1280);b=b&&xd(b);break;
|
||||
case 7938:b=S.getParameter(7938);b=2<=v.version?"OpenGL ES 3.0 ("+b+")":"OpenGL ES 2.0 ("+b+")";b=xd(b);break;case 35724:b=S.getParameter(35724);var c=b.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==c&&(3==c[1].length&&(c[1]+="0"),b="OpenGL ES GLSL ES "+c[1]+" ("+b+")");b=xd(b);break;default:R(1280)}dd[a]=b}return b},rb:function(a,b){if(2>v.version)return R(1282),0;var c=ed[a];if(c)return 0>b||b>=c.length?(R(1281),0):c[b];switch(a){case 7939:return c=S.getSupportedExtensions()||[],
|
||||
c=c.concat(c.map(function(d){return"GL_"+d})),c=c.map(function(d){return xd(d)}),c=ed[a]=c,0>b||b>=c.length?(R(1281),0):c[b];default:return R(1280),0}},qb:function(a,b){b=b?kb(C,b):"";if(a=Xc[a]){var c=a,d=c.je,f=c.Ne,k;if(!d)for(c.je=d={},c.Me={},k=0;k<S.getProgramParameter(c,35718);++k){var l=S.getActiveUniform(c,k);var m=l.name;l=l.size;var p=yd(m);p=0<p?m.slice(0,p):m;var w=c.De;c.De+=l;f[p]=[l,w];for(m=0;m<l;++m)d[w]=m,c.Me[w++]=p}c=a.je;d=0;f=b;k=yd(b);0<k&&(d=parseInt(b.slice(k+1))>>>0,f=b.slice(0,
|
||||
k));if((f=a.Ne[f])&&d<f[0]&&(d+=f[1],c[d]=c[d]||S.getUniformLocation(a,b)))return d}else R(1281);return-1},pb:function(a,b,c){for(var d=rd[b],f=0;f<b;f++)d[f]=K[c+4*f>>2];S.invalidateFramebuffer(a,d)},ob:function(a,b,c,d,f,k,l){for(var m=rd[b],p=0;p<b;p++)m[p]=K[c+4*p>>2];S.invalidateSubFramebuffer(a,m,d,f,k,l)},nb:function(a){return S.isSync(cd[a])},mb:function(a){return(a=ea[a])?S.isTexture(a):0},lb:function(a){S.lineWidth(a)},kb:function(a){a=Xc[a];S.linkProgram(a);a.je=0;a.Ne={}},jb:function(a,
|
||||
b,c,d,f,k){S.Je.multiDrawArraysInstancedBaseInstanceWEBGL(a,K,b>>2,K,c>>2,K,d>>2,L,f>>2,k)},ib:function(a,b,c,d,f,k,l,m){S.Je.multiDrawElementsInstancedBaseVertexBaseInstanceWEBGL(a,K,b>>2,c,K,d>>2,K,f>>2,K,k>>2,L,l>>2,m)},hb:function(a,b){3317==a&&(gd=b);S.pixelStorei(a,b)},gb:function(a){S.readBuffer(a)},fb:function(a,b,c,d,f,k,l){if(2<=v.version)if(S.ye)S.readPixels(a,b,c,d,f,k,l);else{var m=zd(k);S.readPixels(a,b,c,d,f,k,m,l>>31-Math.clz32(m.BYTES_PER_ELEMENT))}else(l=Ad(k,f,c,d,l))?S.readPixels(a,
|
||||
b,c,d,f,k,l):R(1280)},eb:function(a,b,c,d){S.renderbufferStorage(a,b,c,d)},db:function(a,b,c,d,f){S.renderbufferStorageMultisample(a,b,c,d,f)},cb:function(a,b,c){S.samplerParameterf(bd[a],b,c)},bb:function(a,b,c){S.samplerParameteri(bd[a],b,c)},ab:function(a,b,c){S.samplerParameteri(bd[a],b,K[c>>2])},$a:function(a,b,c,d){S.scissor(a,b,c,d)},_a:function(a,b,c,d){for(var f="",k=0;k<b;++k){var l=d?K[d+4*k>>2]:-1,m=K[c+4*k>>2];l=m?kb(C,m,0>l?void 0:l):"";f+=l}S.shaderSource($c[a],f)},Za:function(a,b,
|
||||
c){S.stencilFunc(a,b,c)},Ya:function(a,b,c,d){S.stencilFuncSeparate(a,b,c,d)},Xa:function(a){S.stencilMask(a)},Wa:function(a,b){S.stencilMaskSeparate(a,b)},Va:function(a,b,c){S.stencilOp(a,b,c)},Ua:function(a,b,c,d){S.stencilOpSeparate(a,b,c,d)},Ta:function(a,b,c,d,f,k,l,m,p){if(2<=v.version)if(S.de)S.texImage2D(a,b,c,d,f,k,l,m,p);else if(p){var w=zd(m);S.texImage2D(a,b,c,d,f,k,l,m,w,p>>31-Math.clz32(w.BYTES_PER_ELEMENT))}else S.texImage2D(a,b,c,d,f,k,l,m,null);else S.texImage2D(a,b,c,d,f,k,l,m,p?
|
||||
Ad(m,l,d,f,p):null)},Sa:function(a,b,c){S.texParameterf(a,b,c)},Ra:function(a,b,c){S.texParameterf(a,b,N[c>>2])},Qa:function(a,b,c){S.texParameteri(a,b,c)},Pa:function(a,b,c){S.texParameteri(a,b,K[c>>2])},Oa:function(a,b,c,d,f){S.texStorage2D(a,b,c,d,f)},Na:function(a,b,c,d,f,k,l,m,p){if(2<=v.version)if(S.de)S.texSubImage2D(a,b,c,d,f,k,l,m,p);else if(p){var w=zd(m);S.texSubImage2D(a,b,c,d,f,k,l,m,w,p>>31-Math.clz32(w.BYTES_PER_ELEMENT))}else S.texSubImage2D(a,b,c,d,f,k,l,m,null);else w=null,p&&(w=
|
||||
Ad(m,l,f,k,p)),S.texSubImage2D(a,b,c,d,f,k,l,m,w)},Ma:function(a,b){S.uniform1f(W(a),b)},La:function(a,b,c){if(2<=v.version)b&&S.uniform1fv(W(a),N,c>>2,b);else{if(288>=b)for(var d=Bd[b-1],f=0;f<b;++f)d[f]=N[c+4*f>>2];else d=N.subarray(c>>2,c+4*b>>2);S.uniform1fv(W(a),d)}},Ka:function(a,b){S.uniform1i(W(a),b)},Ja:function(a,b,c){if(2<=v.version)b&&S.uniform1iv(W(a),K,c>>2,b);else{if(288>=b)for(var d=Cd[b-1],f=0;f<b;++f)d[f]=K[c+4*f>>2];else d=K.subarray(c>>2,c+4*b>>2);S.uniform1iv(W(a),d)}},Ia:function(a,
|
||||
b,c){S.uniform2f(W(a),b,c)},Ha:function(a,b,c){if(2<=v.version)b&&S.uniform2fv(W(a),N,c>>2,2*b);else{if(144>=b)for(var d=Bd[2*b-1],f=0;f<2*b;f+=2)d[f]=N[c+4*f>>2],d[f+1]=N[c+(4*f+4)>>2];else d=N.subarray(c>>2,c+8*b>>2);S.uniform2fv(W(a),d)}},Ga:function(a,b,c){S.uniform2i(W(a),b,c)},Fa:function(a,b,c){if(2<=v.version)b&&S.uniform2iv(W(a),K,c>>2,2*b);else{if(144>=b)for(var d=Cd[2*b-1],f=0;f<2*b;f+=2)d[f]=K[c+4*f>>2],d[f+1]=K[c+(4*f+4)>>2];else d=K.subarray(c>>2,c+8*b>>2);S.uniform2iv(W(a),d)}},Ea:function(a,
|
||||
b,c,d){S.uniform3f(W(a),b,c,d)},Da:function(a,b,c){if(2<=v.version)b&&S.uniform3fv(W(a),N,c>>2,3*b);else{if(96>=b)for(var d=Bd[3*b-1],f=0;f<3*b;f+=3)d[f]=N[c+4*f>>2],d[f+1]=N[c+(4*f+4)>>2],d[f+2]=N[c+(4*f+8)>>2];else d=N.subarray(c>>2,c+12*b>>2);S.uniform3fv(W(a),d)}},Ca:function(a,b,c,d){S.uniform3i(W(a),b,c,d)},Ba:function(a,b,c){if(2<=v.version)b&&S.uniform3iv(W(a),K,c>>2,3*b);else{if(96>=b)for(var d=Cd[3*b-1],f=0;f<3*b;f+=3)d[f]=K[c+4*f>>2],d[f+1]=K[c+(4*f+4)>>2],d[f+2]=K[c+(4*f+8)>>2];else d=
|
||||
K.subarray(c>>2,c+12*b>>2);S.uniform3iv(W(a),d)}},Aa:function(a,b,c,d,f){S.uniform4f(W(a),b,c,d,f)},za:function(a,b,c){if(2<=v.version)b&&S.uniform4fv(W(a),N,c>>2,4*b);else{if(72>=b){var d=Bd[4*b-1],f=N;c>>=2;for(var k=0;k<4*b;k+=4){var l=c+k;d[k]=f[l];d[k+1]=f[l+1];d[k+2]=f[l+2];d[k+3]=f[l+3]}}else d=N.subarray(c>>2,c+16*b>>2);S.uniform4fv(W(a),d)}},ya:function(a,b,c,d,f){S.uniform4i(W(a),b,c,d,f)},xa:function(a,b,c){if(2<=v.version)b&&S.uniform4iv(W(a),K,c>>2,4*b);else{if(72>=b)for(var d=Cd[4*b-
|
||||
1],f=0;f<4*b;f+=4)d[f]=K[c+4*f>>2],d[f+1]=K[c+(4*f+4)>>2],d[f+2]=K[c+(4*f+8)>>2],d[f+3]=K[c+(4*f+12)>>2];else d=K.subarray(c>>2,c+16*b>>2);S.uniform4iv(W(a),d)}},wa:function(a,b,c,d){if(2<=v.version)b&&S.uniformMatrix2fv(W(a),!!c,N,d>>2,4*b);else{if(72>=b)for(var f=Bd[4*b-1],k=0;k<4*b;k+=4)f[k]=N[d+4*k>>2],f[k+1]=N[d+(4*k+4)>>2],f[k+2]=N[d+(4*k+8)>>2],f[k+3]=N[d+(4*k+12)>>2];else f=N.subarray(d>>2,d+16*b>>2);S.uniformMatrix2fv(W(a),!!c,f)}},va:function(a,b,c,d){if(2<=v.version)b&&S.uniformMatrix3fv(W(a),
|
||||
!!c,N,d>>2,9*b);else{if(32>=b)for(var f=Bd[9*b-1],k=0;k<9*b;k+=9)f[k]=N[d+4*k>>2],f[k+1]=N[d+(4*k+4)>>2],f[k+2]=N[d+(4*k+8)>>2],f[k+3]=N[d+(4*k+12)>>2],f[k+4]=N[d+(4*k+16)>>2],f[k+5]=N[d+(4*k+20)>>2],f[k+6]=N[d+(4*k+24)>>2],f[k+7]=N[d+(4*k+28)>>2],f[k+8]=N[d+(4*k+32)>>2];else f=N.subarray(d>>2,d+36*b>>2);S.uniformMatrix3fv(W(a),!!c,f)}},ua:function(a,b,c,d){if(2<=v.version)b&&S.uniformMatrix4fv(W(a),!!c,N,d>>2,16*b);else{if(18>=b){var f=Bd[16*b-1],k=N;d>>=2;for(var l=0;l<16*b;l+=16){var m=d+l;f[l]=
|
||||
k[m];f[l+1]=k[m+1];f[l+2]=k[m+2];f[l+3]=k[m+3];f[l+4]=k[m+4];f[l+5]=k[m+5];f[l+6]=k[m+6];f[l+7]=k[m+7];f[l+8]=k[m+8];f[l+9]=k[m+9];f[l+10]=k[m+10];f[l+11]=k[m+11];f[l+12]=k[m+12];f[l+13]=k[m+13];f[l+14]=k[m+14];f[l+15]=k[m+15]}}else f=N.subarray(d>>2,d+64*b>>2);S.uniformMatrix4fv(W(a),!!c,f)}},ta:function(a){a=Xc[a];S.useProgram(a);S.We=a},sa:function(a,b){S.vertexAttrib1f(a,b)},ra:function(a,b){S.vertexAttrib2f(a,N[b>>2],N[b+4>>2])},qa:function(a,b){S.vertexAttrib3f(a,N[b>>2],N[b+4>>2],N[b+8>>2])},
|
||||
pa:function(a,b){S.vertexAttrib4f(a,N[b>>2],N[b+4>>2],N[b+8>>2],N[b+12>>2])},oa:function(a,b){S.vertexAttribDivisor(a,b)},na:function(a,b,c,d,f){S.vertexAttribIPointer(a,b,c,d,f)},ma:function(a,b,c,d,f,k){S.vertexAttribPointer(a,b,c,!!d,f,k)},la:function(a,b,c,d){S.viewport(a,b,c,d)},ba:function(a,b,c,d){S.waitSync(cd[a],b,(c>>>0)+4294967296*d)},n:Nd,u:Od,k:Pd,J:Qd,R:Rd,Q:Sd,x:Td,y:Ud,o:Vd,w:Wd,ka:Xd,ja:Yd,ia:Zd,aa:(a,b,c,d)=>Hd(a,b,c,d)};
|
||||
(function(){function a(c){G=c=c.exports;Fa=G.ad;La();Na=G.dd;Pa.unshift(G.bd);Ua--;r.monitorRunDependencies&&r.monitorRunDependencies(Ua);if(0==Ua&&(null!==Va&&(clearInterval(Va),Va=null),Wa)){var d=Wa;Wa=null;d()}return c}var b={a:$d};Ua++;r.monitorRunDependencies&&r.monitorRunDependencies(Ua);if(r.instantiateWasm)try{return r.instantiateWasm(b,a)}catch(c){Ca("Module.instantiateWasm callback failed with error: "+c),ba(c)}cb(b,function(c){a(c.instance)}).catch(ba);return{}})();
|
||||
var wd=r._malloc=a=>(wd=r._malloc=G.cd)(a),qc=r._free=a=>(qc=r._free=G.ed)(a),pc=a=>(pc=G.fd)(a);r.__embind_initialize_bindings=()=>(r.__embind_initialize_bindings=G.gd)();var ae=(a,b)=>(ae=G.hd)(a,b),be=()=>(be=G.id)(),ce=a=>(ce=G.jd)(a);r.dynCall_viji=(a,b,c,d,f)=>(r.dynCall_viji=G.ld)(a,b,c,d,f);r.dynCall_vijiii=(a,b,c,d,f,k,l)=>(r.dynCall_vijiii=G.md)(a,b,c,d,f,k,l);r.dynCall_viiiiij=(a,b,c,d,f,k,l,m)=>(r.dynCall_viiiiij=G.nd)(a,b,c,d,f,k,l,m);
|
||||
r.dynCall_iiiji=(a,b,c,d,f,k)=>(r.dynCall_iiiji=G.od)(a,b,c,d,f,k);r.dynCall_jii=(a,b,c)=>(r.dynCall_jii=G.pd)(a,b,c);r.dynCall_vij=(a,b,c,d)=>(r.dynCall_vij=G.qd)(a,b,c,d);r.dynCall_iiij=(a,b,c,d,f)=>(r.dynCall_iiij=G.rd)(a,b,c,d,f);r.dynCall_iiiij=(a,b,c,d,f,k)=>(r.dynCall_iiiij=G.sd)(a,b,c,d,f,k);r.dynCall_viij=(a,b,c,d,f)=>(r.dynCall_viij=G.td)(a,b,c,d,f);r.dynCall_viiij=(a,b,c,d,f,k)=>(r.dynCall_viiij=G.ud)(a,b,c,d,f,k);
|
||||
r.dynCall_jiiiiii=(a,b,c,d,f,k,l)=>(r.dynCall_jiiiiii=G.vd)(a,b,c,d,f,k,l);r.dynCall_jiiiiji=(a,b,c,d,f,k,l,m)=>(r.dynCall_jiiiiji=G.wd)(a,b,c,d,f,k,l,m);r.dynCall_ji=(a,b)=>(r.dynCall_ji=G.xd)(a,b);r.dynCall_iijj=(a,b,c,d,f,k)=>(r.dynCall_iijj=G.yd)(a,b,c,d,f,k);r.dynCall_iiji=(a,b,c,d,f)=>(r.dynCall_iiji=G.zd)(a,b,c,d,f);r.dynCall_iijjiii=(a,b,c,d,f,k,l,m,p)=>(r.dynCall_iijjiii=G.Ad)(a,b,c,d,f,k,l,m,p);r.dynCall_iij=(a,b,c,d)=>(r.dynCall_iij=G.Bd)(a,b,c,d);
|
||||
r.dynCall_vijjjii=(a,b,c,d,f,k,l,m,p,w)=>(r.dynCall_vijjjii=G.Cd)(a,b,c,d,f,k,l,m,p,w);r.dynCall_jiji=(a,b,c,d,f)=>(r.dynCall_jiji=G.Dd)(a,b,c,d,f);r.dynCall_viijii=(a,b,c,d,f,k,l)=>(r.dynCall_viijii=G.Ed)(a,b,c,d,f,k,l);r.dynCall_iiiiij=(a,b,c,d,f,k,l)=>(r.dynCall_iiiiij=G.Fd)(a,b,c,d,f,k,l);r.dynCall_iiiiijj=(a,b,c,d,f,k,l,m,p)=>(r.dynCall_iiiiijj=G.Gd)(a,b,c,d,f,k,l,m,p);r.dynCall_iiiiiijj=(a,b,c,d,f,k,l,m,p,w)=>(r.dynCall_iiiiiijj=G.Hd)(a,b,c,d,f,k,l,m,p,w);
|
||||
function Wd(a,b,c,d,f){var k=be();try{Na.get(a)(b,c,d,f)}catch(l){ce(k);if(l!==l+0)throw l;ae(1,0)}}function Od(a,b,c){var d=be();try{return Na.get(a)(b,c)}catch(f){ce(d);if(f!==f+0)throw f;ae(1,0)}}function Ud(a,b,c){var d=be();try{Na.get(a)(b,c)}catch(f){ce(d);if(f!==f+0)throw f;ae(1,0)}}function Nd(a,b){var c=be();try{return Na.get(a)(b)}catch(d){ce(c);if(d!==d+0)throw d;ae(1,0)}}function Td(a,b){var c=be();try{Na.get(a)(b)}catch(d){ce(c);if(d!==d+0)throw d;ae(1,0)}}
|
||||
function Pd(a,b,c,d){var f=be();try{return Na.get(a)(b,c,d)}catch(k){ce(f);if(k!==k+0)throw k;ae(1,0)}}function Zd(a,b,c,d,f,k,l,m,p,w){var y=be();try{Na.get(a)(b,c,d,f,k,l,m,p,w)}catch(B){ce(y);if(B!==B+0)throw B;ae(1,0)}}function Vd(a,b,c,d){var f=be();try{Na.get(a)(b,c,d)}catch(k){ce(f);if(k!==k+0)throw k;ae(1,0)}}function Yd(a,b,c,d,f,k,l){var m=be();try{Na.get(a)(b,c,d,f,k,l)}catch(p){ce(m);if(p!==p+0)throw p;ae(1,0)}}
|
||||
function Qd(a,b,c,d,f){var k=be();try{return Na.get(a)(b,c,d,f)}catch(l){ce(k);if(l!==l+0)throw l;ae(1,0)}}function Rd(a,b,c,d,f,k,l){var m=be();try{return Na.get(a)(b,c,d,f,k,l)}catch(p){ce(m);if(p!==p+0)throw p;ae(1,0)}}function Xd(a,b,c,d,f,k){var l=be();try{Na.get(a)(b,c,d,f,k)}catch(m){ce(l);if(m!==m+0)throw m;ae(1,0)}}function Sd(a,b,c,d,f,k,l,m,p,w){var y=be();try{return Na.get(a)(b,c,d,f,k,l,m,p,w)}catch(B){ce(y);if(B!==B+0)throw B;ae(1,0)}}var de;Wa=function ee(){de||fe();de||(Wa=ee)};
|
||||
function fe(){function a(){if(!de&&(de=!0,r.calledRun=!0,!Ga)){eb(Pa);aa(r);if(r.onRuntimeInitialized)r.onRuntimeInitialized();if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;){var b=r.postRun.shift();Qa.unshift(b)}eb(Qa)}}if(!(0<Ua)){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)Ra();eb(Oa);0<Ua||(r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1);a()},1)):a())}}
|
||||
if(r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);0<r.preInit.length;)r.preInit.pop()();fe();
|
||||
|
||||
|
||||
return moduleArg.ready
|
||||
}
|
||||
|
||||
);
|
||||
})();
|
||||
if (typeof exports === 'object' && typeof module === 'object')
|
||||
module.exports = CanvasKitInit;
|
||||
else if (typeof define === 'function' && define['amd'])
|
||||
define([], () => CanvasKitInit);
|
11895
new_backend/public/canvaskit/canvaskit.js.symbols
Normal file
BIN
new_backend/public/canvaskit/canvaskit.wasm
Normal file
216
new_backend/public/canvaskit/chromium/canvaskit.js
Normal file
|
@ -0,0 +1,216 @@
|
|||
|
||||
var CanvasKitInit = (() => {
|
||||
var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
|
||||
if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename;
|
||||
return (
|
||||
function(moduleArg = {}) {
|
||||
|
||||
var r=moduleArg,aa,ba;r.ready=new Promise((a,b)=>{aa=a;ba=b});
|
||||
(function(a){a.Gd=a.Gd||[];a.Gd.push(function(){a.MakeSWCanvasSurface=function(b){var c=b,e="undefined"!==typeof OffscreenCanvas&&c instanceof OffscreenCanvas;if(!("undefined"!==typeof HTMLCanvasElement&&c instanceof HTMLCanvasElement||e||(c=document.getElementById(b),c)))throw"Canvas with id "+b+" was not found";if(b=a.MakeSurface(c.width,c.height))b.ge=c;return b};a.MakeCanvasSurface||(a.MakeCanvasSurface=a.MakeSWCanvasSurface);a.MakeSurface=function(b,c){var e={width:b,height:c,colorType:a.ColorType.RGBA_8888,
|
||||
alphaType:a.AlphaType.Unpremul,colorSpace:a.ColorSpace.SRGB},f=b*c*4,k=a._malloc(f);if(e=a.Surface._makeRasterDirect(e,k,4*b))e.ge=null,e.Oe=b,e.Le=c,e.Me=f,e.re=k,e.getCanvas().clear(a.TRANSPARENT);return e};a.MakeRasterDirectSurface=function(b,c,e){return a.Surface._makeRasterDirect(b,c.byteOffset,e)};a.Surface.prototype.flush=function(b){a.Dd(this.Cd);this._flush();if(this.ge){var c=new Uint8ClampedArray(a.HEAPU8.buffer,this.re,this.Me);c=new ImageData(c,this.Oe,this.Le);b?this.ge.getContext("2d").putImageData(c,
|
||||
0,0,b[0],b[1],b[2]-b[0],b[3]-b[1]):this.ge.getContext("2d").putImageData(c,0,0)}};a.Surface.prototype.dispose=function(){this.re&&a._free(this.re);this.delete()};a.Dd=a.Dd||function(){};a.he=a.he||function(){return null}})})(r);
|
||||
(function(a){a.Gd=a.Gd||[];a.Gd.push(function(){function b(m,q,w){return m&&m.hasOwnProperty(q)?m[q]:w}function c(m){var q=da(ea);ea[q]=m;return q}function e(m){return m.naturalHeight||m.videoHeight||m.displayHeight||m.height}function f(m){return m.naturalWidth||m.videoWidth||m.displayWidth||m.width}function k(m,q,w,y){m.bindTexture(m.TEXTURE_2D,q);y||w.alphaType!==a.AlphaType.Premul||m.pixelStorei(m.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);return q}function l(m,q,w){w||q.alphaType!==a.AlphaType.Premul||
|
||||
m.pixelStorei(m.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1);m.bindTexture(m.TEXTURE_2D,null)}a.GetWebGLContext=function(m,q){if(!m)throw"null canvas passed into makeWebGLContext";var w={alpha:b(q,"alpha",1),depth:b(q,"depth",1),stencil:b(q,"stencil",8),antialias:b(q,"antialias",0),premultipliedAlpha:b(q,"premultipliedAlpha",1),preserveDrawingBuffer:b(q,"preserveDrawingBuffer",0),preferLowPowerToHighPerformance:b(q,"preferLowPowerToHighPerformance",0),failIfMajorPerformanceCaveat:b(q,"failIfMajorPerformanceCaveat",
|
||||
0),enableExtensionsByDefault:b(q,"enableExtensionsByDefault",1),explicitSwapControl:b(q,"explicitSwapControl",0),renderViaOffscreenBackBuffer:b(q,"renderViaOffscreenBackBuffer",0)};w.majorVersion=q&&q.majorVersion?q.majorVersion:"undefined"!==typeof WebGL2RenderingContext?2:1;if(w.explicitSwapControl)throw"explicitSwapControl is not supported";m=fa(m,w);if(!m)return 0;ha(m);x.Od.getExtension("WEBGL_debug_renderer_info");return m};a.deleteContext=function(m){x===ia[m]&&(x=null);"object"==typeof JSEvents&&
|
||||
JSEvents.sf(ia[m].Od.canvas);ia[m]&&ia[m].Od.canvas&&(ia[m].Od.canvas.Je=void 0);ia[m]=null};a._setTextureCleanup({deleteTexture:function(m,q){var w=ea[q];w&&ia[m].Od.deleteTexture(w);ea[q]=null}});a.MakeWebGLContext=function(m){if(!this.Dd(m))return null;var q=this._MakeGrContext();if(!q)return null;q.Cd=m;var w=q.delete.bind(q);q["delete"]=function(){a.Dd(this.Cd);w()}.bind(q);return x.te=q};a.MakeGrContext=a.MakeWebGLContext;a.GrDirectContext.prototype.getResourceCacheLimitBytes=function(){a.Dd(this.Cd);
|
||||
this._getResourceCacheLimitBytes()};a.GrDirectContext.prototype.getResourceCacheUsageBytes=function(){a.Dd(this.Cd);this._getResourceCacheUsageBytes()};a.GrDirectContext.prototype.releaseResourcesAndAbandonContext=function(){a.Dd(this.Cd);this._releaseResourcesAndAbandonContext()};a.GrDirectContext.prototype.setResourceCacheLimitBytes=function(m){a.Dd(this.Cd);this._setResourceCacheLimitBytes(m)};a.MakeOnScreenGLSurface=function(m,q,w,y,B,D){if(!this.Dd(m.Cd))return null;q=void 0===B||void 0===D?
|
||||
this._MakeOnScreenGLSurface(m,q,w,y):this._MakeOnScreenGLSurface(m,q,w,y,B,D);if(!q)return null;q.Cd=m.Cd;return q};a.MakeRenderTarget=function(){var m=arguments[0];if(!this.Dd(m.Cd))return null;if(3===arguments.length){var q=this._MakeRenderTargetWH(m,arguments[1],arguments[2]);if(!q)return null}else if(2===arguments.length){if(q=this._MakeRenderTargetII(m,arguments[1]),!q)return null}else return null;q.Cd=m.Cd;return q};a.MakeWebGLCanvasSurface=function(m,q,w){q=q||null;var y=m,B="undefined"!==
|
||||
typeof OffscreenCanvas&&y instanceof OffscreenCanvas;if(!("undefined"!==typeof HTMLCanvasElement&&y instanceof HTMLCanvasElement||B||(y=document.getElementById(m),y)))throw"Canvas with id "+m+" was not found";m=this.GetWebGLContext(y,w);if(!m||0>m)throw"failed to create webgl context: err "+m;m=this.MakeWebGLContext(m);q=this.MakeOnScreenGLSurface(m,y.width,y.height,q);return q?q:(q=y.cloneNode(!0),y.parentNode.replaceChild(q,y),q.classList.add("ck-replaced"),a.MakeSWCanvasSurface(q))};a.MakeCanvasSurface=
|
||||
a.MakeWebGLCanvasSurface;a.Surface.prototype.makeImageFromTexture=function(m,q){a.Dd(this.Cd);m=c(m);if(q=this._makeImageFromTexture(this.Cd,m,q))q.be=m;return q};a.Surface.prototype.makeImageFromTextureSource=function(m,q,w){q||(q={height:e(m),width:f(m),colorType:a.ColorType.RGBA_8888,alphaType:w?a.AlphaType.Premul:a.AlphaType.Unpremul});q.colorSpace||(q.colorSpace=a.ColorSpace.SRGB);a.Dd(this.Cd);var y=x.Od;w=k(y,y.createTexture(),q,w);2===x.version?y.texImage2D(y.TEXTURE_2D,0,y.RGBA,q.width,q.height,
|
||||
0,y.RGBA,y.UNSIGNED_BYTE,m):y.texImage2D(y.TEXTURE_2D,0,y.RGBA,y.RGBA,y.UNSIGNED_BYTE,m);l(y,q);this._resetContext();return this.makeImageFromTexture(w,q)};a.Surface.prototype.updateTextureFromSource=function(m,q,w){if(m.be){a.Dd(this.Cd);var y=m.getImageInfo(),B=x.Od,D=k(B,ea[m.be],y,w);2===x.version?B.texImage2D(B.TEXTURE_2D,0,B.RGBA,f(q),e(q),0,B.RGBA,B.UNSIGNED_BYTE,q):B.texImage2D(B.TEXTURE_2D,0,B.RGBA,B.RGBA,B.UNSIGNED_BYTE,q);l(B,y,w);this._resetContext();ea[m.be]=null;m.be=c(D);y.colorSpace=
|
||||
m.getColorSpace();q=this._makeImageFromTexture(this.Cd,m.be,y);w=m.jd.Ed;B=m.jd.Jd;m.jd.Ed=q.jd.Ed;m.jd.Jd=q.jd.Jd;q.jd.Ed=w;q.jd.Jd=B;q.delete();y.colorSpace.delete()}};a.MakeLazyImageFromTextureSource=function(m,q,w){q||(q={height:e(m),width:f(m),colorType:a.ColorType.RGBA_8888,alphaType:w?a.AlphaType.Premul:a.AlphaType.Unpremul});q.colorSpace||(q.colorSpace=a.ColorSpace.SRGB);var y={makeTexture:function(){var B=x,D=B.Od,u=k(D,D.createTexture(),q,w);2===B.version?D.texImage2D(D.TEXTURE_2D,0,D.RGBA,
|
||||
q.width,q.height,0,D.RGBA,D.UNSIGNED_BYTE,m):D.texImage2D(D.TEXTURE_2D,0,D.RGBA,D.RGBA,D.UNSIGNED_BYTE,m);l(D,q,w);return c(u)},freeSrc:function(){}};"VideoFrame"===m.constructor.name&&(y.freeSrc=function(){m.close()});return a.Image._makeFromGenerator(q,y)};a.Dd=function(m){return m?ha(m):!1};a.he=function(){return x&&x.te&&!x.te.isDeleted()?x.te:null}})})(r);
|
||||
(function(a){function b(g){return(f(255*g[3])<<24|f(255*g[0])<<16|f(255*g[1])<<8|f(255*g[2])<<0)>>>0}function c(g){if(g&&g._ck)return g;if(g instanceof Float32Array){for(var d=Math.floor(g.length/4),h=new Uint32Array(d),n=0;n<d;n++)h[n]=b(g.slice(4*n,4*(n+1)));return h}if(g instanceof Uint32Array)return g;if(g instanceof Array&&g[0]instanceof Float32Array)return g.map(b)}function e(g){if(void 0===g)return 1;var d=parseFloat(g);return g&&-1!==g.indexOf("%")?d/100:d}function f(g){return Math.round(Math.max(0,
|
||||
Math.min(g||0,255)))}function k(g,d){d&&d._ck||a._free(g)}function l(g,d,h){if(!g||!g.length)return M;if(g&&g._ck)return g.byteOffset;var n=a[d].BYTES_PER_ELEMENT;h||(h=a._malloc(g.length*n));a[d].set(g,h/n);return h}function m(g){var d={Ld:M,count:g.length,colorType:a.ColorType.RGBA_F32};if(g instanceof Float32Array)d.Ld=l(g,"HEAPF32"),d.count=g.length/4;else if(g instanceof Uint32Array)d.Ld=l(g,"HEAPU32"),d.colorType=a.ColorType.RGBA_8888;else if(g instanceof Array){if(g&&g.length){for(var h=a._malloc(16*
|
||||
g.length),n=0,t=h/4,v=0;v<g.length;v++)for(var z=0;4>z;z++)a.HEAPF32[t+n]=g[v][z],n++;g=h}else g=M;d.Ld=g}else throw"Invalid argument to copyFlexibleColorArray, Not a color array "+typeof g;return d}function q(g){if(!g)return M;var d=T.toTypedArray();if(g.length){if(6===g.length||9===g.length)return l(g,"HEAPF32",H),6===g.length&&a.HEAPF32.set(fd,6+H/4),H;if(16===g.length)return d[0]=g[0],d[1]=g[1],d[2]=g[3],d[3]=g[4],d[4]=g[5],d[5]=g[7],d[6]=g[12],d[7]=g[13],d[8]=g[15],H;throw"invalid matrix size";
|
||||
}if(void 0===g.m11)throw"invalid matrix argument";d[0]=g.m11;d[1]=g.m21;d[2]=g.m41;d[3]=g.m12;d[4]=g.m22;d[5]=g.m42;d[6]=g.m14;d[7]=g.m24;d[8]=g.m44;return H}function w(g){if(!g)return M;var d=Y.toTypedArray();if(g.length){if(16!==g.length&&6!==g.length&&9!==g.length)throw"invalid matrix size";if(16===g.length)return l(g,"HEAPF32",ca);d.fill(0);d[0]=g[0];d[1]=g[1];d[3]=g[2];d[4]=g[3];d[5]=g[4];d[7]=g[5];d[10]=1;d[12]=g[6];d[13]=g[7];d[15]=g[8];6===g.length&&(d[12]=0,d[13]=0,d[15]=1);return ca}if(void 0===
|
||||
g.m11)throw"invalid matrix argument";d[0]=g.m11;d[1]=g.m21;d[2]=g.m31;d[3]=g.m41;d[4]=g.m12;d[5]=g.m22;d[6]=g.m32;d[7]=g.m42;d[8]=g.m13;d[9]=g.m23;d[10]=g.m33;d[11]=g.m43;d[12]=g.m14;d[13]=g.m24;d[14]=g.m34;d[15]=g.m44;return ca}function y(g,d){return l(g,"HEAPF32",d||va)}function B(g,d,h,n){var t=Ma.toTypedArray();t[0]=g;t[1]=d;t[2]=h;t[3]=n;return va}function D(g){for(var d=new Float32Array(4),h=0;4>h;h++)d[h]=a.HEAPF32[g/4+h];return d}function u(g,d){return l(g,"HEAPF32",d||X)}function F(g,d){return l(g,
|
||||
"HEAPF32",d||Eb)}a.Color=function(g,d,h,n){void 0===n&&(n=1);return a.Color4f(f(g)/255,f(d)/255,f(h)/255,n)};a.ColorAsInt=function(g,d,h,n){void 0===n&&(n=255);return(f(n)<<24|f(g)<<16|f(d)<<8|f(h)<<0&268435455)>>>0};a.Color4f=function(g,d,h,n){void 0===n&&(n=1);return Float32Array.of(g,d,h,n)};Object.defineProperty(a,"TRANSPARENT",{get:function(){return a.Color4f(0,0,0,0)}});Object.defineProperty(a,"BLACK",{get:function(){return a.Color4f(0,0,0,1)}});Object.defineProperty(a,"WHITE",{get:function(){return a.Color4f(1,
|
||||
1,1,1)}});Object.defineProperty(a,"RED",{get:function(){return a.Color4f(1,0,0,1)}});Object.defineProperty(a,"GREEN",{get:function(){return a.Color4f(0,1,0,1)}});Object.defineProperty(a,"BLUE",{get:function(){return a.Color4f(0,0,1,1)}});Object.defineProperty(a,"YELLOW",{get:function(){return a.Color4f(1,1,0,1)}});Object.defineProperty(a,"CYAN",{get:function(){return a.Color4f(0,1,1,1)}});Object.defineProperty(a,"MAGENTA",{get:function(){return a.Color4f(1,0,1,1)}});a.getColorComponents=function(g){return[Math.floor(255*
|
||||
g[0]),Math.floor(255*g[1]),Math.floor(255*g[2]),g[3]]};a.parseColorString=function(g,d){g=g.toLowerCase();if(g.startsWith("#")){d=255;switch(g.length){case 9:d=parseInt(g.slice(7,9),16);case 7:var h=parseInt(g.slice(1,3),16);var n=parseInt(g.slice(3,5),16);var t=parseInt(g.slice(5,7),16);break;case 5:d=17*parseInt(g.slice(4,5),16);case 4:h=17*parseInt(g.slice(1,2),16),n=17*parseInt(g.slice(2,3),16),t=17*parseInt(g.slice(3,4),16)}return a.Color(h,n,t,d/255)}return g.startsWith("rgba")?(g=g.slice(5,
|
||||
-1),g=g.split(","),a.Color(+g[0],+g[1],+g[2],e(g[3]))):g.startsWith("rgb")?(g=g.slice(4,-1),g=g.split(","),a.Color(+g[0],+g[1],+g[2],e(g[3]))):g.startsWith("gray(")||g.startsWith("hsl")||!d||(g=d[g],void 0===g)?a.BLACK:g};a.multiplyByAlpha=function(g,d){g=g.slice();g[3]=Math.max(0,Math.min(g[3]*d,1));return g};a.Malloc=function(g,d){var h=a._malloc(d*g.BYTES_PER_ELEMENT);return{_ck:!0,length:d,byteOffset:h,Wd:null,subarray:function(n,t){n=this.toTypedArray().subarray(n,t);n._ck=!0;return n},toTypedArray:function(){if(this.Wd&&
|
||||
this.Wd.length)return this.Wd;this.Wd=new g(a.HEAPU8.buffer,h,d);this.Wd._ck=!0;return this.Wd}}};a.Free=function(g){a._free(g.byteOffset);g.byteOffset=M;g.toTypedArray=null;g.Wd=null};var H=M,T,ca=M,Y,va=M,Ma,na,X=M,fc,Ba=M,gc,Fb=M,hc,Gb=M,hb,Sa=M,ic,Eb=M,jc,kc=M,fd=Float32Array.of(0,0,1),M=0;a.onRuntimeInitialized=function(){function g(d,h,n,t,v,z,E){z||(z=4*t.width,t.colorType===a.ColorType.RGBA_F16?z*=2:t.colorType===a.ColorType.RGBA_F32&&(z*=4));var J=z*t.height;var I=v?v.byteOffset:a._malloc(J);
|
||||
if(E?!d._readPixels(t,I,z,h,n,E):!d._readPixels(t,I,z,h,n))return v||a._free(I),null;if(v)return v.toTypedArray();switch(t.colorType){case a.ColorType.RGBA_8888:case a.ColorType.RGBA_F16:d=(new Uint8Array(a.HEAPU8.buffer,I,J)).slice();break;case a.ColorType.RGBA_F32:d=(new Float32Array(a.HEAPU8.buffer,I,J)).slice();break;default:return null}a._free(I);return d}Ma=a.Malloc(Float32Array,4);va=Ma.byteOffset;Y=a.Malloc(Float32Array,16);ca=Y.byteOffset;T=a.Malloc(Float32Array,9);H=T.byteOffset;ic=a.Malloc(Float32Array,
|
||||
12);Eb=ic.byteOffset;jc=a.Malloc(Float32Array,12);kc=jc.byteOffset;na=a.Malloc(Float32Array,4);X=na.byteOffset;fc=a.Malloc(Float32Array,4);Ba=fc.byteOffset;gc=a.Malloc(Float32Array,3);Fb=gc.byteOffset;hc=a.Malloc(Float32Array,3);Gb=hc.byteOffset;hb=a.Malloc(Int32Array,4);Sa=hb.byteOffset;a.ColorSpace.SRGB=a.ColorSpace._MakeSRGB();a.ColorSpace.DISPLAY_P3=a.ColorSpace._MakeDisplayP3();a.ColorSpace.ADOBE_RGB=a.ColorSpace._MakeAdobeRGB();a.GlyphRunFlags={IsWhiteSpace:a._GlyphRunFlags_isWhiteSpace};a.Path.MakeFromCmds=
|
||||
function(d){var h=l(d,"HEAPF32"),n=a.Path._MakeFromCmds(h,d.length);k(h,d);return n};a.Path.MakeFromVerbsPointsWeights=function(d,h,n){var t=l(d,"HEAPU8"),v=l(h,"HEAPF32"),z=l(n,"HEAPF32"),E=a.Path._MakeFromVerbsPointsWeights(t,d.length,v,h.length,z,n&&n.length||0);k(t,d);k(v,h);k(z,n);return E};a.Path.prototype.addArc=function(d,h,n){d=u(d);this._addArc(d,h,n);return this};a.Path.prototype.addCircle=function(d,h,n,t){this._addCircle(d,h,n,!!t);return this};a.Path.prototype.addOval=function(d,h,n){void 0===
|
||||
n&&(n=1);d=u(d);this._addOval(d,!!h,n);return this};a.Path.prototype.addPath=function(){var d=Array.prototype.slice.call(arguments),h=d[0],n=!1;"boolean"===typeof d[d.length-1]&&(n=d.pop());if(1===d.length)this._addPath(h,1,0,0,0,1,0,0,0,1,n);else if(2===d.length)d=d[1],this._addPath(h,d[0],d[1],d[2],d[3],d[4],d[5],d[6]||0,d[7]||0,d[8]||1,n);else if(7===d.length||10===d.length)this._addPath(h,d[1],d[2],d[3],d[4],d[5],d[6],d[7]||0,d[8]||0,d[9]||1,n);else return null;return this};a.Path.prototype.addPoly=
|
||||
function(d,h){var n=l(d,"HEAPF32");this._addPoly(n,d.length/2,h);k(n,d);return this};a.Path.prototype.addRect=function(d,h){d=u(d);this._addRect(d,!!h);return this};a.Path.prototype.addRRect=function(d,h){d=F(d);this._addRRect(d,!!h);return this};a.Path.prototype.addVerbsPointsWeights=function(d,h,n){var t=l(d,"HEAPU8"),v=l(h,"HEAPF32"),z=l(n,"HEAPF32");this._addVerbsPointsWeights(t,d.length,v,h.length,z,n&&n.length||0);k(t,d);k(v,h);k(z,n)};a.Path.prototype.arc=function(d,h,n,t,v,z){d=a.LTRBRect(d-
|
||||
n,h-n,d+n,h+n);v=(v-t)/Math.PI*180-360*!!z;z=new a.Path;z.addArc(d,t/Math.PI*180,v);this.addPath(z,!0);z.delete();return this};a.Path.prototype.arcToOval=function(d,h,n,t){d=u(d);this._arcToOval(d,h,n,t);return this};a.Path.prototype.arcToRotated=function(d,h,n,t,v,z,E){this._arcToRotated(d,h,n,!!t,!!v,z,E);return this};a.Path.prototype.arcToTangent=function(d,h,n,t,v){this._arcToTangent(d,h,n,t,v);return this};a.Path.prototype.close=function(){this._close();return this};a.Path.prototype.conicTo=
|
||||
function(d,h,n,t,v){this._conicTo(d,h,n,t,v);return this};a.Path.prototype.computeTightBounds=function(d){this._computeTightBounds(X);var h=na.toTypedArray();return d?(d.set(h),d):h.slice()};a.Path.prototype.cubicTo=function(d,h,n,t,v,z){this._cubicTo(d,h,n,t,v,z);return this};a.Path.prototype.dash=function(d,h,n){return this._dash(d,h,n)?this:null};a.Path.prototype.getBounds=function(d){this._getBounds(X);var h=na.toTypedArray();return d?(d.set(h),d):h.slice()};a.Path.prototype.lineTo=function(d,
|
||||
h){this._lineTo(d,h);return this};a.Path.prototype.moveTo=function(d,h){this._moveTo(d,h);return this};a.Path.prototype.offset=function(d,h){this._transform(1,0,d,0,1,h,0,0,1);return this};a.Path.prototype.quadTo=function(d,h,n,t){this._quadTo(d,h,n,t);return this};a.Path.prototype.rArcTo=function(d,h,n,t,v,z,E){this._rArcTo(d,h,n,t,v,z,E);return this};a.Path.prototype.rConicTo=function(d,h,n,t,v){this._rConicTo(d,h,n,t,v);return this};a.Path.prototype.rCubicTo=function(d,h,n,t,v,z){this._rCubicTo(d,
|
||||
h,n,t,v,z);return this};a.Path.prototype.rLineTo=function(d,h){this._rLineTo(d,h);return this};a.Path.prototype.rMoveTo=function(d,h){this._rMoveTo(d,h);return this};a.Path.prototype.rQuadTo=function(d,h,n,t){this._rQuadTo(d,h,n,t);return this};a.Path.prototype.stroke=function(d){d=d||{};d.width=d.width||1;d.miter_limit=d.miter_limit||4;d.cap=d.cap||a.StrokeCap.Butt;d.join=d.join||a.StrokeJoin.Miter;d.precision=d.precision||1;return this._stroke(d)?this:null};a.Path.prototype.transform=function(){if(1===
|
||||
arguments.length){var d=arguments[0];this._transform(d[0],d[1],d[2],d[3],d[4],d[5],d[6]||0,d[7]||0,d[8]||1)}else if(6===arguments.length||9===arguments.length)d=arguments,this._transform(d[0],d[1],d[2],d[3],d[4],d[5],d[6]||0,d[7]||0,d[8]||1);else throw"transform expected to take 1 or 9 arguments. Got "+arguments.length;return this};a.Path.prototype.trim=function(d,h,n){return this._trim(d,h,!!n)?this:null};a.Image.prototype.encodeToBytes=function(d,h){var n=a.he();d=d||a.ImageFormat.PNG;h=h||100;
|
||||
return n?this._encodeToBytes(d,h,n):this._encodeToBytes(d,h)};a.Image.prototype.makeShaderCubic=function(d,h,n,t,v){v=q(v);return this._makeShaderCubic(d,h,n,t,v)};a.Image.prototype.makeShaderOptions=function(d,h,n,t,v){v=q(v);return this._makeShaderOptions(d,h,n,t,v)};a.Image.prototype.readPixels=function(d,h,n,t,v){var z=a.he();return g(this,d,h,n,t,v,z)};a.Canvas.prototype.clear=function(d){a.Dd(this.Cd);d=y(d);this._clear(d)};a.Canvas.prototype.clipRRect=function(d,h,n){a.Dd(this.Cd);d=F(d);this._clipRRect(d,
|
||||
h,n)};a.Canvas.prototype.clipRect=function(d,h,n){a.Dd(this.Cd);d=u(d);this._clipRect(d,h,n)};a.Canvas.prototype.concat=function(d){a.Dd(this.Cd);d=w(d);this._concat(d)};a.Canvas.prototype.drawArc=function(d,h,n,t,v){a.Dd(this.Cd);d=u(d);this._drawArc(d,h,n,t,v)};a.Canvas.prototype.drawAtlas=function(d,h,n,t,v,z,E){if(d&&t&&h&&n&&h.length===n.length){a.Dd(this.Cd);v||(v=a.BlendMode.SrcOver);var J=l(h,"HEAPF32"),I=l(n,"HEAPF32"),U=n.length/4,V=l(c(z),"HEAPU32");if(E&&"B"in E&&"C"in E)this._drawAtlasCubic(d,
|
||||
I,J,V,U,v,E.B,E.C,t);else{let p=a.FilterMode.Linear,A=a.MipmapMode.None;E&&(p=E.filter,"mipmap"in E&&(A=E.mipmap));this._drawAtlasOptions(d,I,J,V,U,v,p,A,t)}k(J,h);k(I,n);k(V,z)}};a.Canvas.prototype.drawCircle=function(d,h,n,t){a.Dd(this.Cd);this._drawCircle(d,h,n,t)};a.Canvas.prototype.drawColor=function(d,h){a.Dd(this.Cd);d=y(d);void 0!==h?this._drawColor(d,h):this._drawColor(d)};a.Canvas.prototype.drawColorInt=function(d,h){a.Dd(this.Cd);this._drawColorInt(d,h||a.BlendMode.SrcOver)};a.Canvas.prototype.drawColorComponents=
|
||||
function(d,h,n,t,v){a.Dd(this.Cd);d=B(d,h,n,t);void 0!==v?this._drawColor(d,v):this._drawColor(d)};a.Canvas.prototype.drawDRRect=function(d,h,n){a.Dd(this.Cd);d=F(d,Eb);h=F(h,kc);this._drawDRRect(d,h,n)};a.Canvas.prototype.drawImage=function(d,h,n,t){a.Dd(this.Cd);this._drawImage(d,h,n,t||null)};a.Canvas.prototype.drawImageCubic=function(d,h,n,t,v,z){a.Dd(this.Cd);this._drawImageCubic(d,h,n,t,v,z||null)};a.Canvas.prototype.drawImageOptions=function(d,h,n,t,v,z){a.Dd(this.Cd);this._drawImageOptions(d,
|
||||
h,n,t,v,z||null)};a.Canvas.prototype.drawImageNine=function(d,h,n,t,v){a.Dd(this.Cd);h=l(h,"HEAP32",Sa);n=u(n);this._drawImageNine(d,h,n,t,v||null)};a.Canvas.prototype.drawImageRect=function(d,h,n,t,v){a.Dd(this.Cd);u(h,X);u(n,Ba);this._drawImageRect(d,X,Ba,t,!!v)};a.Canvas.prototype.drawImageRectCubic=function(d,h,n,t,v,z){a.Dd(this.Cd);u(h,X);u(n,Ba);this._drawImageRectCubic(d,X,Ba,t,v,z||null)};a.Canvas.prototype.drawImageRectOptions=function(d,h,n,t,v,z){a.Dd(this.Cd);u(h,X);u(n,Ba);this._drawImageRectOptions(d,
|
||||
X,Ba,t,v,z||null)};a.Canvas.prototype.drawLine=function(d,h,n,t,v){a.Dd(this.Cd);this._drawLine(d,h,n,t,v)};a.Canvas.prototype.drawOval=function(d,h){a.Dd(this.Cd);d=u(d);this._drawOval(d,h)};a.Canvas.prototype.drawPaint=function(d){a.Dd(this.Cd);this._drawPaint(d)};a.Canvas.prototype.drawParagraph=function(d,h,n){a.Dd(this.Cd);this._drawParagraph(d,h,n)};a.Canvas.prototype.drawPatch=function(d,h,n,t,v){if(24>d.length)throw"Need 12 cubic points";if(h&&4>h.length)throw"Need 4 colors";if(n&&8>n.length)throw"Need 4 shader coordinates";
|
||||
a.Dd(this.Cd);const z=l(d,"HEAPF32"),E=h?l(c(h),"HEAPU32"):M,J=n?l(n,"HEAPF32"):M;t||(t=a.BlendMode.Modulate);this._drawPatch(z,E,J,t,v);k(J,n);k(E,h);k(z,d)};a.Canvas.prototype.drawPath=function(d,h){a.Dd(this.Cd);this._drawPath(d,h)};a.Canvas.prototype.drawPicture=function(d){a.Dd(this.Cd);this._drawPicture(d)};a.Canvas.prototype.drawPoints=function(d,h,n){a.Dd(this.Cd);var t=l(h,"HEAPF32");this._drawPoints(d,t,h.length/2,n);k(t,h)};a.Canvas.prototype.drawRRect=function(d,h){a.Dd(this.Cd);d=F(d);
|
||||
this._drawRRect(d,h)};a.Canvas.prototype.drawRect=function(d,h){a.Dd(this.Cd);d=u(d);this._drawRect(d,h)};a.Canvas.prototype.drawRect4f=function(d,h,n,t,v){a.Dd(this.Cd);this._drawRect4f(d,h,n,t,v)};a.Canvas.prototype.drawShadow=function(d,h,n,t,v,z,E){a.Dd(this.Cd);var J=l(v,"HEAPF32"),I=l(z,"HEAPF32");h=l(h,"HEAPF32",Fb);n=l(n,"HEAPF32",Gb);this._drawShadow(d,h,n,t,J,I,E);k(J,v);k(I,z)};a.getShadowLocalBounds=function(d,h,n,t,v,z,E){d=q(d);n=l(n,"HEAPF32",Fb);t=l(t,"HEAPF32",Gb);if(!this._getShadowLocalBounds(d,
|
||||
h,n,t,v,z,X))return null;h=na.toTypedArray();return E?(E.set(h),E):h.slice()};a.Canvas.prototype.drawTextBlob=function(d,h,n,t){a.Dd(this.Cd);this._drawTextBlob(d,h,n,t)};a.Canvas.prototype.drawVertices=function(d,h,n){a.Dd(this.Cd);this._drawVertices(d,h,n)};a.Canvas.prototype.getDeviceClipBounds=function(d){this._getDeviceClipBounds(Sa);var h=hb.toTypedArray();d?d.set(h):d=h.slice();return d};a.Canvas.prototype.getLocalToDevice=function(){this._getLocalToDevice(ca);for(var d=ca,h=Array(16),n=0;16>
|
||||
n;n++)h[n]=a.HEAPF32[d/4+n];return h};a.Canvas.prototype.getTotalMatrix=function(){this._getTotalMatrix(H);for(var d=Array(9),h=0;9>h;h++)d[h]=a.HEAPF32[H/4+h];return d};a.Canvas.prototype.makeSurface=function(d){d=this._makeSurface(d);d.Cd=this.Cd;return d};a.Canvas.prototype.readPixels=function(d,h,n,t,v){a.Dd(this.Cd);return g(this,d,h,n,t,v)};a.Canvas.prototype.saveLayer=function(d,h,n,t){h=u(h);return this._saveLayer(d||null,h,n||null,t||0)};a.Canvas.prototype.writePixels=function(d,h,n,t,v,
|
||||
z,E,J){if(d.byteLength%(h*n))throw"pixels length must be a multiple of the srcWidth * srcHeight";a.Dd(this.Cd);var I=d.byteLength/(h*n);z=z||a.AlphaType.Unpremul;E=E||a.ColorType.RGBA_8888;J=J||a.ColorSpace.SRGB;var U=I*h;I=l(d,"HEAPU8");h=this._writePixels({width:h,height:n,colorType:E,alphaType:z,colorSpace:J},I,U,t,v);k(I,d);return h};a.ColorFilter.MakeBlend=function(d,h,n){d=y(d);n=n||a.ColorSpace.SRGB;return a.ColorFilter._MakeBlend(d,h,n)};a.ColorFilter.MakeMatrix=function(d){if(!d||20!==d.length)throw"invalid color matrix";
|
||||
var h=l(d,"HEAPF32"),n=a.ColorFilter._makeMatrix(h);k(h,d);return n};a.ContourMeasure.prototype.getPosTan=function(d,h){this._getPosTan(d,X);d=na.toTypedArray();return h?(h.set(d),h):d.slice()};a.ImageFilter.prototype.getOutputBounds=function(d,h,n){d=u(d,X);h=q(h);this._getOutputBounds(d,h,Sa);h=hb.toTypedArray();return n?(n.set(h),n):h.slice()};a.ImageFilter.MakeDropShadow=function(d,h,n,t,v,z){v=y(v,va);return a.ImageFilter._MakeDropShadow(d,h,n,t,v,z)};a.ImageFilter.MakeDropShadowOnly=function(d,
|
||||
h,n,t,v,z){v=y(v,va);return a.ImageFilter._MakeDropShadowOnly(d,h,n,t,v,z)};a.ImageFilter.MakeImage=function(d,h,n,t){n=u(n,X);t=u(t,Ba);if("B"in h&&"C"in h)return a.ImageFilter._MakeImageCubic(d,h.B,h.C,n,t);const v=h.filter;let z=a.MipmapMode.None;"mipmap"in h&&(z=h.mipmap);return a.ImageFilter._MakeImageOptions(d,v,z,n,t)};a.ImageFilter.MakeMatrixTransform=function(d,h,n){d=q(d);if("B"in h&&"C"in h)return a.ImageFilter._MakeMatrixTransformCubic(d,h.B,h.C,n);const t=h.filter;let v=a.MipmapMode.None;
|
||||
"mipmap"in h&&(v=h.mipmap);return a.ImageFilter._MakeMatrixTransformOptions(d,t,v,n)};a.Paint.prototype.getColor=function(){this._getColor(va);return D(va)};a.Paint.prototype.setColor=function(d,h){h=h||null;d=y(d);this._setColor(d,h)};a.Paint.prototype.setColorComponents=function(d,h,n,t,v){v=v||null;d=B(d,h,n,t);this._setColor(d,v)};a.Path.prototype.getPoint=function(d,h){this._getPoint(d,X);d=na.toTypedArray();return h?(h[0]=d[0],h[1]=d[1],h):d.slice(0,2)};a.Picture.prototype.makeShader=function(d,
|
||||
h,n,t,v){t=q(t);v=u(v);return this._makeShader(d,h,n,t,v)};a.Picture.prototype.cullRect=function(d){this._cullRect(X);var h=na.toTypedArray();return d?(d.set(h),d):h.slice()};a.PictureRecorder.prototype.beginRecording=function(d,h){d=u(d);return this._beginRecording(d,!!h)};a.Surface.prototype.getCanvas=function(){var d=this._getCanvas();d.Cd=this.Cd;return d};a.Surface.prototype.makeImageSnapshot=function(d){a.Dd(this.Cd);d=l(d,"HEAP32",Sa);return this._makeImageSnapshot(d)};a.Surface.prototype.makeSurface=
|
||||
function(d){a.Dd(this.Cd);d=this._makeSurface(d);d.Cd=this.Cd;return d};a.Surface.prototype.Ne=function(d,h){this.ae||(this.ae=this.getCanvas());return requestAnimationFrame(function(){a.Dd(this.Cd);d(this.ae);this.flush(h)}.bind(this))};a.Surface.prototype.requestAnimationFrame||(a.Surface.prototype.requestAnimationFrame=a.Surface.prototype.Ne);a.Surface.prototype.Ke=function(d,h){this.ae||(this.ae=this.getCanvas());requestAnimationFrame(function(){a.Dd(this.Cd);d(this.ae);this.flush(h);this.dispose()}.bind(this))};
|
||||
a.Surface.prototype.drawOnce||(a.Surface.prototype.drawOnce=a.Surface.prototype.Ke);a.PathEffect.MakeDash=function(d,h){h||(h=0);if(!d.length||1===d.length%2)throw"Intervals array must have even length";var n=l(d,"HEAPF32");h=a.PathEffect._MakeDash(n,d.length,h);k(n,d);return h};a.PathEffect.MakeLine2D=function(d,h){h=q(h);return a.PathEffect._MakeLine2D(d,h)};a.PathEffect.MakePath2D=function(d,h){d=q(d);return a.PathEffect._MakePath2D(d,h)};a.Shader.MakeColor=function(d,h){h=h||null;d=y(d);return a.Shader._MakeColor(d,
|
||||
h)};a.Shader.Blend=a.Shader.MakeBlend;a.Shader.Color=a.Shader.MakeColor;a.Shader.MakeLinearGradient=function(d,h,n,t,v,z,E,J){J=J||null;var I=m(n),U=l(t,"HEAPF32");E=E||0;z=q(z);var V=na.toTypedArray();V.set(d);V.set(h,2);d=a.Shader._MakeLinearGradient(X,I.Ld,I.colorType,U,I.count,v,E,z,J);k(I.Ld,n);t&&k(U,t);return d};a.Shader.MakeRadialGradient=function(d,h,n,t,v,z,E,J){J=J||null;var I=m(n),U=l(t,"HEAPF32");E=E||0;z=q(z);d=a.Shader._MakeRadialGradient(d[0],d[1],h,I.Ld,I.colorType,U,I.count,v,E,
|
||||
z,J);k(I.Ld,n);t&&k(U,t);return d};a.Shader.MakeSweepGradient=function(d,h,n,t,v,z,E,J,I,U){U=U||null;var V=m(n),p=l(t,"HEAPF32");E=E||0;J=J||0;I=I||360;z=q(z);d=a.Shader._MakeSweepGradient(d,h,V.Ld,V.colorType,p,V.count,v,J,I,E,z,U);k(V.Ld,n);t&&k(p,t);return d};a.Shader.MakeTwoPointConicalGradient=function(d,h,n,t,v,z,E,J,I,U){U=U||null;var V=m(v),p=l(z,"HEAPF32");I=I||0;J=q(J);var A=na.toTypedArray();A.set(d);A.set(n,2);d=a.Shader._MakeTwoPointConicalGradient(X,h,t,V.Ld,V.colorType,p,V.count,E,
|
||||
I,J,U);k(V.Ld,v);z&&k(p,z);return d};a.Vertices.prototype.bounds=function(d){this._bounds(X);var h=na.toTypedArray();return d?(d.set(h),d):h.slice()};a.Gd&&a.Gd.forEach(function(d){d()})};a.computeTonalColors=function(g){var d=l(g.ambient,"HEAPF32"),h=l(g.spot,"HEAPF32");this._computeTonalColors(d,h);var n={ambient:D(d),spot:D(h)};k(d,g.ambient);k(h,g.spot);return n};a.LTRBRect=function(g,d,h,n){return Float32Array.of(g,d,h,n)};a.XYWHRect=function(g,d,h,n){return Float32Array.of(g,d,g+h,d+n)};a.LTRBiRect=
|
||||
function(g,d,h,n){return Int32Array.of(g,d,h,n)};a.XYWHiRect=function(g,d,h,n){return Int32Array.of(g,d,g+h,d+n)};a.RRectXY=function(g,d,h){return Float32Array.of(g[0],g[1],g[2],g[3],d,h,d,h,d,h,d,h)};a.MakeAnimatedImageFromEncoded=function(g){g=new Uint8Array(g);var d=a._malloc(g.byteLength);a.HEAPU8.set(g,d);return(g=a._decodeAnimatedImage(d,g.byteLength))?g:null};a.MakeImageFromEncoded=function(g){g=new Uint8Array(g);var d=a._malloc(g.byteLength);a.HEAPU8.set(g,d);return(g=a._decodeImage(d,g.byteLength))?
|
||||
g:null};var Ta=null;a.MakeImageFromCanvasImageSource=function(g){var d=g.width,h=g.height;Ta||(Ta=document.createElement("canvas"));Ta.width=d;Ta.height=h;var n=Ta.getContext("2d",{willReadFrequently:!0});n.drawImage(g,0,0);g=n.getImageData(0,0,d,h);return a.MakeImage({width:d,height:h,alphaType:a.AlphaType.Unpremul,colorType:a.ColorType.RGBA_8888,colorSpace:a.ColorSpace.SRGB},g.data,4*d)};a.MakeImage=function(g,d,h){var n=a._malloc(d.length);a.HEAPU8.set(d,n);return a._MakeImage(g,n,d.length,h)};
|
||||
a.MakeVertices=function(g,d,h,n,t,v){var z=t&&t.length||0,E=0;h&&h.length&&(E|=1);n&&n.length&&(E|=2);void 0===v||v||(E|=4);g=new a._VerticesBuilder(g,d.length/2,z,E);l(d,"HEAPF32",g.positions());g.texCoords()&&l(h,"HEAPF32",g.texCoords());g.colors()&&l(c(n),"HEAPU32",g.colors());g.indices()&&l(t,"HEAPU16",g.indices());return g.detach()};(function(g){g.Gd=g.Gd||[];g.Gd.push(function(){function d(p){p&&(p.dir=0===p.dir?g.TextDirection.RTL:g.TextDirection.LTR);return p}function h(p){if(!p||!p.length)return[];
|
||||
for(var A=[],O=0;O<p.length;O+=5){var Z=g.LTRBRect(p[O],p[O+1],p[O+2],p[O+3]),za=g.TextDirection.LTR;0===p[O+4]&&(za=g.TextDirection.RTL);A.push({rect:Z,dir:za})}g._free(p.byteOffset);return A}function n(p){p=p||{};void 0===p.weight&&(p.weight=g.FontWeight.Normal);p.width=p.width||g.FontWidth.Normal;p.slant=p.slant||g.FontSlant.Upright;return p}function t(p){if(!p||!p.length)return M;for(var A=[],O=0;O<p.length;O++){var Z=v(p[O]);A.push(Z)}return l(A,"HEAPU32")}function v(p){if(J[p])return J[p];var A=
|
||||
ja(p)+1,O=g._malloc(A);ka(p,C,O,A);return J[p]=O}function z(p){p._colorPtr=y(p.color);p._foregroundColorPtr=M;p._backgroundColorPtr=M;p._decorationColorPtr=M;p.foregroundColor&&(p._foregroundColorPtr=y(p.foregroundColor,I));p.backgroundColor&&(p._backgroundColorPtr=y(p.backgroundColor,U));p.decorationColor&&(p._decorationColorPtr=y(p.decorationColor,V));Array.isArray(p.fontFamilies)&&p.fontFamilies.length?(p._fontFamiliesPtr=t(p.fontFamilies),p._fontFamiliesLen=p.fontFamilies.length):(p._fontFamiliesPtr=
|
||||
M,p._fontFamiliesLen=0);if(p.locale){var A=p.locale;p._localePtr=v(A);p._localeLen=ja(A)}else p._localePtr=M,p._localeLen=0;if(Array.isArray(p.shadows)&&p.shadows.length){A=p.shadows;var O=A.map(function(qa){return qa.color||g.BLACK}),Z=A.map(function(qa){return qa.blurRadius||0});p._shadowLen=A.length;for(var za=g._malloc(8*A.length),Hb=za/4,Ib=0;Ib<A.length;Ib++){var lc=A[Ib].offset||[0,0];g.HEAPF32[Hb]=lc[0];g.HEAPF32[Hb+1]=lc[1];Hb+=2}p._shadowColorsPtr=m(O).Ld;p._shadowOffsetsPtr=za;p._shadowBlurRadiiPtr=
|
||||
l(Z,"HEAPF32")}else p._shadowLen=0,p._shadowColorsPtr=M,p._shadowOffsetsPtr=M,p._shadowBlurRadiiPtr=M;Array.isArray(p.fontFeatures)&&p.fontFeatures.length?(A=p.fontFeatures,O=A.map(function(qa){return qa.name}),Z=A.map(function(qa){return qa.value}),p._fontFeatureLen=A.length,p._fontFeatureNamesPtr=t(O),p._fontFeatureValuesPtr=l(Z,"HEAPU32")):(p._fontFeatureLen=0,p._fontFeatureNamesPtr=M,p._fontFeatureValuesPtr=M);Array.isArray(p.fontVariations)&&p.fontVariations.length?(A=p.fontVariations,O=A.map(function(qa){return qa.axis}),
|
||||
Z=A.map(function(qa){return qa.value}),p._fontVariationLen=A.length,p._fontVariationAxesPtr=t(O),p._fontVariationValuesPtr=l(Z,"HEAPF32")):(p._fontVariationLen=0,p._fontVariationAxesPtr=M,p._fontVariationValuesPtr=M)}function E(p){g._free(p._fontFamiliesPtr);g._free(p._shadowColorsPtr);g._free(p._shadowOffsetsPtr);g._free(p._shadowBlurRadiiPtr);g._free(p._fontFeatureNamesPtr);g._free(p._fontFeatureValuesPtr);g._free(p._fontVariationAxesPtr);g._free(p._fontVariationValuesPtr)}g.Paragraph.prototype.getRectsForRange=
|
||||
function(p,A,O,Z){p=this._getRectsForRange(p,A,O,Z);return h(p)};g.Paragraph.prototype.getRectsForPlaceholders=function(){var p=this._getRectsForPlaceholders();return h(p)};g.Paragraph.prototype.getGlyphInfoAt=function(p){return d(this._getGlyphInfoAt(p))};g.Paragraph.prototype.getClosestGlyphInfoAtCoordinate=function(p,A){return d(this._getClosestGlyphInfoAtCoordinate(p,A))};g.TypefaceFontProvider.prototype.registerFont=function(p,A){p=g.Typeface.MakeTypefaceFromData(p);if(!p)return null;A=v(A);
|
||||
this._registerFont(p,A)};g.ParagraphStyle=function(p){p.disableHinting=p.disableHinting||!1;if(p.ellipsis){var A=p.ellipsis;p._ellipsisPtr=v(A);p._ellipsisLen=ja(A)}else p._ellipsisPtr=M,p._ellipsisLen=0;null==p.heightMultiplier&&(p.heightMultiplier=-1);p.maxLines=p.maxLines||0;p.replaceTabCharacters=p.replaceTabCharacters||!1;A=(A=p.strutStyle)||{};A.strutEnabled=A.strutEnabled||!1;A.strutEnabled&&Array.isArray(A.fontFamilies)&&A.fontFamilies.length?(A._fontFamiliesPtr=t(A.fontFamilies),A._fontFamiliesLen=
|
||||
A.fontFamilies.length):(A._fontFamiliesPtr=M,A._fontFamiliesLen=0);A.fontStyle=n(A.fontStyle);null==A.fontSize&&(A.fontSize=-1);null==A.heightMultiplier&&(A.heightMultiplier=-1);A.halfLeading=A.halfLeading||!1;A.leading=A.leading||0;A.forceStrutHeight=A.forceStrutHeight||!1;p.strutStyle=A;p.textAlign=p.textAlign||g.TextAlign.Start;p.textDirection=p.textDirection||g.TextDirection.LTR;p.textHeightBehavior=p.textHeightBehavior||g.TextHeightBehavior.All;p.textStyle=g.TextStyle(p.textStyle);p.applyRoundingHack=
|
||||
!1!==p.applyRoundingHack;return p};g.TextStyle=function(p){p.color||(p.color=g.BLACK);p.decoration=p.decoration||0;p.decorationThickness=p.decorationThickness||0;p.decorationStyle=p.decorationStyle||g.DecorationStyle.Solid;p.textBaseline=p.textBaseline||g.TextBaseline.Alphabetic;null==p.fontSize&&(p.fontSize=-1);p.letterSpacing=p.letterSpacing||0;p.wordSpacing=p.wordSpacing||0;null==p.heightMultiplier&&(p.heightMultiplier=-1);p.halfLeading=p.halfLeading||!1;p.fontStyle=n(p.fontStyle);return p};var J=
|
||||
{},I=g._malloc(16),U=g._malloc(16),V=g._malloc(16);g.ParagraphBuilder.Make=function(p,A){z(p.textStyle);A=g.ParagraphBuilder._Make(p,A);E(p.textStyle);return A};g.ParagraphBuilder.MakeFromFontProvider=function(p,A){z(p.textStyle);A=g.ParagraphBuilder._MakeFromFontProvider(p,A);E(p.textStyle);return A};g.ParagraphBuilder.MakeFromFontCollection=function(p,A){z(p.textStyle);A=g.ParagraphBuilder._MakeFromFontCollection(p,A);E(p.textStyle);return A};g.ParagraphBuilder.ShapeText=function(p,A,O){let Z=0;
|
||||
for(const za of A)Z+=za.length;if(Z!==p.length)throw"Accumulated block lengths must equal text.length";return g.ParagraphBuilder._ShapeText(p,A,O)};g.ParagraphBuilder.prototype.pushStyle=function(p){z(p);this._pushStyle(p);E(p)};g.ParagraphBuilder.prototype.pushPaintStyle=function(p,A,O){z(p);this._pushPaintStyle(p,A,O);E(p)};g.ParagraphBuilder.prototype.addPlaceholder=function(p,A,O,Z,za){O=O||g.PlaceholderAlignment.Baseline;Z=Z||g.TextBaseline.Alphabetic;this._addPlaceholder(p||0,A||0,O,Z,za||0)};
|
||||
g.ParagraphBuilder.prototype.setWordsUtf8=function(p){var A=l(p,"HEAPU32");this._setWordsUtf8(A,p&&p.length||0);k(A,p)};g.ParagraphBuilder.prototype.setWordsUtf16=function(p){var A=l(p,"HEAPU32");this._setWordsUtf16(A,p&&p.length||0);k(A,p)};g.ParagraphBuilder.prototype.setGraphemeBreaksUtf8=function(p){var A=l(p,"HEAPU32");this._setGraphemeBreaksUtf8(A,p&&p.length||0);k(A,p)};g.ParagraphBuilder.prototype.setGraphemeBreaksUtf16=function(p){var A=l(p,"HEAPU32");this._setGraphemeBreaksUtf16(A,p&&p.length||
|
||||
0);k(A,p)};g.ParagraphBuilder.prototype.setLineBreaksUtf8=function(p){var A=l(p,"HEAPU32");this._setLineBreaksUtf8(A,p&&p.length||0);k(A,p)};g.ParagraphBuilder.prototype.setLineBreaksUtf16=function(p){var A=l(p,"HEAPU32");this._setLineBreaksUtf16(A,p&&p.length||0);k(A,p)}})})(r);a.Gd=a.Gd||[];a.Gd.push(function(){a.Path.prototype.op=function(g,d){return this._op(g,d)?this:null};a.Path.prototype.simplify=function(){return this._simplify()?this:null}});a.Gd=a.Gd||[];a.Gd.push(function(){a.Canvas.prototype.drawText=
|
||||
function(g,d,h,n,t){var v=ja(g),z=a._malloc(v+1);ka(g,C,z,v+1);this._drawSimpleText(z,v,d,h,t,n);a._free(z)};a.Canvas.prototype.drawGlyphs=function(g,d,h,n,t,v){if(!(2*g.length<=d.length))throw"Not enough positions for the array of gyphs";a.Dd(this.Cd);const z=l(g,"HEAPU16"),E=l(d,"HEAPF32");this._drawGlyphs(g.length,z,E,h,n,t,v);k(E,d);k(z,g)};a.Font.prototype.getGlyphBounds=function(g,d,h){var n=l(g,"HEAPU16"),t=a._malloc(16*g.length);this._getGlyphWidthBounds(n,g.length,M,t,d||null);d=new Float32Array(a.HEAPU8.buffer,
|
||||
t,4*g.length);k(n,g);if(h)return h.set(d),a._free(t),h;g=Float32Array.from(d);a._free(t);return g};a.Font.prototype.getGlyphIDs=function(g,d,h){d||(d=g.length);var n=ja(g)+1,t=a._malloc(n);ka(g,C,t,n);g=a._malloc(2*d);d=this._getGlyphIDs(t,n-1,d,g);a._free(t);if(0>d)return a._free(g),null;t=new Uint16Array(a.HEAPU8.buffer,g,d);if(h)return h.set(t),a._free(g),h;h=Uint16Array.from(t);a._free(g);return h};a.Font.prototype.getGlyphIntercepts=function(g,d,h,n){var t=l(g,"HEAPU16"),v=l(d,"HEAPF32");return this._getGlyphIntercepts(t,
|
||||
g.length,!(g&&g._ck),v,d.length,!(d&&d._ck),h,n)};a.Font.prototype.getGlyphWidths=function(g,d,h){var n=l(g,"HEAPU16"),t=a._malloc(4*g.length);this._getGlyphWidthBounds(n,g.length,t,M,d||null);d=new Float32Array(a.HEAPU8.buffer,t,g.length);k(n,g);if(h)return h.set(d),a._free(t),h;g=Float32Array.from(d);a._free(t);return g};a.FontMgr.FromData=function(){if(!arguments.length)return null;var g=arguments;1===g.length&&Array.isArray(g[0])&&(g=arguments[0]);if(!g.length)return null;for(var d=[],h=[],n=
|
||||
0;n<g.length;n++){var t=new Uint8Array(g[n]),v=l(t,"HEAPU8");d.push(v);h.push(t.byteLength)}d=l(d,"HEAPU32");h=l(h,"HEAPU32");g=a.FontMgr._fromData(d,h,g.length);a._free(d);a._free(h);return g};a.Typeface.MakeTypefaceFromData=function(g){g=new Uint8Array(g);var d=l(g,"HEAPU8");return(g=a.Typeface._MakeTypefaceFromData(d,g.byteLength))?g:null};a.Typeface.MakeFreeTypeFaceFromData=a.Typeface.MakeTypefaceFromData;a.Typeface.prototype.getGlyphIDs=function(g,d,h){d||(d=g.length);var n=ja(g)+1,t=a._malloc(n);
|
||||
ka(g,C,t,n);g=a._malloc(2*d);d=this._getGlyphIDs(t,n-1,d,g);a._free(t);if(0>d)return a._free(g),null;t=new Uint16Array(a.HEAPU8.buffer,g,d);if(h)return h.set(t),a._free(g),h;h=Uint16Array.from(t);a._free(g);return h};a.TextBlob.MakeOnPath=function(g,d,h,n){if(g&&g.length&&d&&d.countPoints()){if(1===d.countPoints())return this.MakeFromText(g,h);n||(n=0);var t=h.getGlyphIDs(g);t=h.getGlyphWidths(t);var v=[];d=new a.ContourMeasureIter(d,!1,1);for(var z=d.next(),E=new Float32Array(4),J=0;J<g.length&&
|
||||
z;J++){var I=t[J];n+=I/2;if(n>z.length()){z.delete();z=d.next();if(!z){g=g.substring(0,J);break}n=I/2}z.getPosTan(n,E);var U=E[2],V=E[3];v.push(U,V,E[0]-I/2*U,E[1]-I/2*V);n+=I/2}g=this.MakeFromRSXform(g,v,h);z&&z.delete();d.delete();return g}};a.TextBlob.MakeFromRSXform=function(g,d,h){var n=ja(g)+1,t=a._malloc(n);ka(g,C,t,n);g=l(d,"HEAPF32");h=a.TextBlob._MakeFromRSXform(t,n-1,g,h);a._free(t);return h?h:null};a.TextBlob.MakeFromRSXformGlyphs=function(g,d,h){var n=l(g,"HEAPU16");d=l(d,"HEAPF32");
|
||||
h=a.TextBlob._MakeFromRSXformGlyphs(n,2*g.length,d,h);k(n,g);return h?h:null};a.TextBlob.MakeFromGlyphs=function(g,d){var h=l(g,"HEAPU16");d=a.TextBlob._MakeFromGlyphs(h,2*g.length,d);k(h,g);return d?d:null};a.TextBlob.MakeFromText=function(g,d){var h=ja(g)+1,n=a._malloc(h);ka(g,C,n,h);g=a.TextBlob._MakeFromText(n,h-1,d);a._free(n);return g?g:null};a.MallocGlyphIDs=function(g){return a.Malloc(Uint16Array,g)}});a.Gd=a.Gd||[];a.Gd.push(function(){a.MakePicture=function(g){g=new Uint8Array(g);var d=
|
||||
a._malloc(g.byteLength);a.HEAPU8.set(g,d);return(g=a._MakePicture(d,g.byteLength))?g:null}});a.Gd=a.Gd||[];a.Gd.push(function(){a.RuntimeEffect.Make=function(g,d){return a.RuntimeEffect._Make(g,{onError:d||function(h){console.log("RuntimeEffect error",h)}})};a.RuntimeEffect.MakeForBlender=function(g,d){return a.RuntimeEffect._MakeForBlender(g,{onError:d||function(h){console.log("RuntimeEffect error",h)}})};a.RuntimeEffect.prototype.makeShader=function(g,d){var h=!g._ck,n=l(g,"HEAPF32");d=q(d);return this._makeShader(n,
|
||||
4*g.length,h,d)};a.RuntimeEffect.prototype.makeShaderWithChildren=function(g,d,h){var n=!g._ck,t=l(g,"HEAPF32");h=q(h);for(var v=[],z=0;z<d.length;z++)v.push(d[z].jd.Ed);d=l(v,"HEAPU32");return this._makeShaderWithChildren(t,4*g.length,n,d,v.length,h)};a.RuntimeEffect.prototype.makeBlender=function(g){var d=!g._ck,h=l(g,"HEAPF32");return this._makeBlender(h,4*g.length,d)}})})(r);
|
||||
var la=Object.assign({},r),ma="./this.program",oa=(a,b)=>{throw b;},pa="object"==typeof window,ra="function"==typeof importScripts,sa="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,ta="",ua,wa,xa;
|
||||
if(sa){var fs=require("fs"),ya=require("path");ta=ra?ya.dirname(ta)+"/":__dirname+"/";ua=(a,b)=>{a=a.startsWith("file://")?new URL(a):ya.normalize(a);return fs.readFileSync(a,b?void 0:"utf8")};xa=a=>{a=ua(a,!0);a.buffer||(a=new Uint8Array(a));return a};wa=(a,b,c,e=!0)=>{a=a.startsWith("file://")?new URL(a):ya.normalize(a);fs.readFile(a,e?void 0:"utf8",(f,k)=>{f?c(f):b(e?k.buffer:k)})};!r.thisProgram&&1<process.argv.length&&(ma=process.argv[1].replace(/\\/g,"/"));process.argv.slice(2);oa=(a,b)=>{process.exitCode=
|
||||
a;throw b;};r.inspect=()=>"[Emscripten Module object]"}else if(pa||ra)ra?ta=self.location.href:"undefined"!=typeof document&&document.currentScript&&(ta=document.currentScript.src),_scriptDir&&(ta=_scriptDir),0!==ta.indexOf("blob:")?ta=ta.substr(0,ta.replace(/[?#].*/,"").lastIndexOf("/")+1):ta="",ua=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},ra&&(xa=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),
|
||||
wa=(a,b,c)=>{var e=new XMLHttpRequest;e.open("GET",a,!0);e.responseType="arraybuffer";e.onload=()=>{200==e.status||0==e.status&&e.response?b(e.response):c()};e.onerror=c;e.send(null)};var Aa=r.print||console.log.bind(console),Ca=r.printErr||console.error.bind(console);Object.assign(r,la);la=null;r.thisProgram&&(ma=r.thisProgram);r.quit&&(oa=r.quit);var Da;r.wasmBinary&&(Da=r.wasmBinary);var noExitRuntime=r.noExitRuntime||!0;"object"!=typeof WebAssembly&&Ea("no native wasm support detected");
|
||||
var Fa,G,Ga=!1,Ha,C,Ia,Ja,K,L,N,Ka;function La(){var a=Fa.buffer;r.HEAP8=Ha=new Int8Array(a);r.HEAP16=Ia=new Int16Array(a);r.HEAP32=K=new Int32Array(a);r.HEAPU8=C=new Uint8Array(a);r.HEAPU16=Ja=new Uint16Array(a);r.HEAPU32=L=new Uint32Array(a);r.HEAPF32=N=new Float32Array(a);r.HEAPF64=Ka=new Float64Array(a)}var Na,Oa=[],Pa=[],Qa=[];function Ra(){var a=r.preRun.shift();Oa.unshift(a)}var Ua=0,Va=null,Wa=null;
|
||||
function Ea(a){if(r.onAbort)r.onAbort(a);a="Aborted("+a+")";Ca(a);Ga=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ba(a);throw a;}function Xa(a){return a.startsWith("data:application/octet-stream;base64,")}var Ya;Ya="canvaskit.wasm";if(!Xa(Ya)){var Za=Ya;Ya=r.locateFile?r.locateFile(Za,ta):ta+Za}function $a(a){if(a==Ya&&Da)return new Uint8Array(Da);if(xa)return xa(a);throw"both async and sync fetching of the wasm failed";}
|
||||
function ab(a){if(!Da&&(pa||ra)){if("function"==typeof fetch&&!a.startsWith("file://"))return fetch(a,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw"failed to load wasm binary file at '"+a+"'";return b.arrayBuffer()}).catch(()=>$a(a));if(wa)return new Promise((b,c)=>{wa(a,e=>b(new Uint8Array(e)),c)})}return Promise.resolve().then(()=>$a(a))}function bb(a,b,c){return ab(a).then(e=>WebAssembly.instantiate(e,b)).then(e=>e).then(c,e=>{Ca("failed to asynchronously prepare wasm: "+e);Ea(e)})}
|
||||
function cb(a,b){var c=Ya;return Da||"function"!=typeof WebAssembly.instantiateStreaming||Xa(c)||c.startsWith("file://")||sa||"function"!=typeof fetch?bb(c,a,b):fetch(c,{credentials:"same-origin"}).then(e=>WebAssembly.instantiateStreaming(e,a).then(b,function(f){Ca("wasm streaming compile failed: "+f);Ca("falling back to ArrayBuffer instantiation");return bb(c,a,b)}))}function db(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a}var eb=a=>{for(;0<a.length;)a.shift()(r)};
|
||||
function fb(a){this.Ed=a-24;this.Ie=function(b){L[this.Ed+4>>2]=b};this.qe=function(b){L[this.Ed+8>>2]=b};this.Td=function(b,c){this.pe();this.Ie(b);this.qe(c)};this.pe=function(){L[this.Ed+16>>2]=0}}
|
||||
var gb=0,ib=0,jb="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,kb=(a,b,c)=>{var e=b+c;for(c=b;a[c]&&!(c>=e);)++c;if(16<c-b&&a.buffer&&jb)return jb.decode(a.subarray(b,c));for(e="";b<c;){var f=a[b++];if(f&128){var k=a[b++]&63;if(192==(f&224))e+=String.fromCharCode((f&31)<<6|k);else{var l=a[b++]&63;f=224==(f&240)?(f&15)<<12|k<<6|l:(f&7)<<18|k<<12|l<<6|a[b++]&63;65536>f?e+=String.fromCharCode(f):(f-=65536,e+=String.fromCharCode(55296|f>>10,56320|f&1023))}}else e+=String.fromCharCode(f)}return e},
|
||||
lb={};function mb(a){for(;a.length;){var b=a.pop();a.pop()(b)}}function nb(a){return this.fromWireType(K[a>>2])}var ob={},pb={},qb={},rb=void 0;function sb(a){throw new rb(a);}
|
||||
function tb(a,b,c){function e(m){m=c(m);m.length!==a.length&&sb("Mismatched type converter count");for(var q=0;q<a.length;++q)ub(a[q],m[q])}a.forEach(function(m){qb[m]=b});var f=Array(b.length),k=[],l=0;b.forEach((m,q)=>{pb.hasOwnProperty(m)?f[q]=pb[m]:(k.push(m),ob.hasOwnProperty(m)||(ob[m]=[]),ob[m].push(()=>{f[q]=pb[m];++l;l===k.length&&e(f)}))});0===k.length&&e(f)}
|
||||
function vb(a){switch(a){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(`Unknown type size: ${a}`);}}var wb=void 0;function P(a){for(var b="";C[a];)b+=wb[C[a++]];return b}var xb=void 0;function Q(a){throw new xb(a);}
|
||||
function yb(a,b,c={}){var e=b.name;a||Q(`type "${e}" must have a positive integer typeid pointer`);if(pb.hasOwnProperty(a)){if(c.$e)return;Q(`Cannot register type '${e}' twice`)}pb[a]=b;delete qb[a];ob.hasOwnProperty(a)&&(b=ob[a],delete ob[a],b.forEach(f=>f()))}function ub(a,b,c={}){if(!("argPackAdvance"in b))throw new TypeError("registerType registeredInstance requires argPackAdvance");yb(a,b,c)}function zb(a){Q(a.jd.Hd.Fd.name+" instance already deleted")}var Ab=!1;function Bb(){}
|
||||
function Cb(a){--a.count.value;0===a.count.value&&(a.Jd?a.Nd.Rd(a.Jd):a.Hd.Fd.Rd(a.Ed))}function Db(a,b,c){if(b===c)return a;if(void 0===c.Kd)return null;a=Db(a,b,c.Kd);return null===a?null:c.Se(a)}var Jb={},Kb=[];function Lb(){for(;Kb.length;){var a=Kb.pop();a.jd.Zd=!1;a["delete"]()}}var Mb=void 0,Nb={};function Ob(a,b){for(void 0===b&&Q("ptr should not be undefined");a.Kd;)b=a.ee(b),a=a.Kd;return Nb[b]}
|
||||
function Pb(a,b){b.Hd&&b.Ed||sb("makeClassHandle requires ptr and ptrType");!!b.Nd!==!!b.Jd&&sb("Both smartPtrType and smartPtr must be specified");b.count={value:1};return Qb(Object.create(a,{jd:{value:b}}))}function Qb(a){if("undefined"===typeof FinalizationRegistry)return Qb=b=>b,a;Ab=new FinalizationRegistry(b=>{Cb(b.jd)});Qb=b=>{var c=b.jd;c.Jd&&Ab.register(b,{jd:c},b);return b};Bb=b=>{Ab.unregister(b)};return Qb(a)}function Rb(){}
|
||||
function Sb(a){if(void 0===a)return"_unknown";a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?`_${a}`:a}function Tb(a,b){a=Sb(a);return{[a]:function(){return b.apply(this,arguments)}}[a]}
|
||||
function Ub(a,b,c){if(void 0===a[b].Id){var e=a[b];a[b]=function(){a[b].Id.hasOwnProperty(arguments.length)||Q(`Function '${c}' called with an invalid number of arguments (${arguments.length}) - expects one of (${a[b].Id})!`);return a[b].Id[arguments.length].apply(this,arguments)};a[b].Id=[];a[b].Id[e.Xd]=e}}
|
||||
function Vb(a,b,c){r.hasOwnProperty(a)?((void 0===c||void 0!==r[a].Id&&void 0!==r[a].Id[c])&&Q(`Cannot register public name '${a}' twice`),Ub(r,a,a),r.hasOwnProperty(c)&&Q(`Cannot register multiple overloads of a function with the same number of arguments (${c})!`),r[a].Id[c]=b):(r[a]=b,void 0!==c&&(r[a].rf=c))}function Wb(a,b,c,e,f,k,l,m){this.name=a;this.constructor=b;this.$d=c;this.Rd=e;this.Kd=f;this.Ve=k;this.ee=l;this.Se=m;this.df=[]}
|
||||
function Xb(a,b,c){for(;b!==c;)b.ee||Q(`Expected null or instance of ${c.name}, got an instance of ${b.name}`),a=b.ee(a),b=b.Kd;return a}function Yb(a,b){if(null===b)return this.ue&&Q(`null is not a valid ${this.name}`),0;b.jd||Q(`Cannot pass "${Zb(b)}" as a ${this.name}`);b.jd.Ed||Q(`Cannot pass deleted object as a pointer of type ${this.name}`);return Xb(b.jd.Ed,b.jd.Hd.Fd,this.Fd)}
|
||||
function $b(a,b){if(null===b){this.ue&&Q(`null is not a valid ${this.name}`);if(this.je){var c=this.ve();null!==a&&a.push(this.Rd,c);return c}return 0}b.jd||Q(`Cannot pass "${Zb(b)}" as a ${this.name}`);b.jd.Ed||Q(`Cannot pass deleted object as a pointer of type ${this.name}`);!this.ie&&b.jd.Hd.ie&&Q(`Cannot convert argument of type ${b.jd.Nd?b.jd.Nd.name:b.jd.Hd.name} to parameter type ${this.name}`);c=Xb(b.jd.Ed,b.jd.Hd.Fd,this.Fd);if(this.je)switch(void 0===b.jd.Jd&&Q("Passing raw pointer to smart pointer is illegal"),
|
||||
this.jf){case 0:b.jd.Nd===this?c=b.jd.Jd:Q(`Cannot convert argument of type ${b.jd.Nd?b.jd.Nd.name:b.jd.Hd.name} to parameter type ${this.name}`);break;case 1:c=b.jd.Jd;break;case 2:if(b.jd.Nd===this)c=b.jd.Jd;else{var e=b.clone();c=this.ef(c,ac(function(){e["delete"]()}));null!==a&&a.push(this.Rd,c)}break;default:Q("Unsupporting sharing policy")}return c}
|
||||
function bc(a,b){if(null===b)return this.ue&&Q(`null is not a valid ${this.name}`),0;b.jd||Q(`Cannot pass "${Zb(b)}" as a ${this.name}`);b.jd.Ed||Q(`Cannot pass deleted object as a pointer of type ${this.name}`);b.jd.Hd.ie&&Q(`Cannot convert argument of type ${b.jd.Hd.name} to parameter type ${this.name}`);return Xb(b.jd.Ed,b.jd.Hd.Fd,this.Fd)}
|
||||
function cc(a,b,c,e,f,k,l,m,q,w,y){this.name=a;this.Fd=b;this.ue=c;this.ie=e;this.je=f;this.cf=k;this.jf=l;this.Ee=m;this.ve=q;this.ef=w;this.Rd=y;f||void 0!==b.Kd?this.toWireType=$b:(this.toWireType=e?Yb:bc,this.Md=null)}function dc(a,b,c){r.hasOwnProperty(a)||sb("Replacing nonexistant public symbol");void 0!==r[a].Id&&void 0!==c?r[a].Id[c]=b:(r[a]=b,r[a].Xd=c)}
|
||||
var ec=(a,b)=>{var c=[];return function(){c.length=0;Object.assign(c,arguments);if(a.includes("j")){var e=r["dynCall_"+a];e=c&&c.length?e.apply(null,[b].concat(c)):e.call(null,b)}else e=Na.get(b).apply(null,c);return e}};function mc(a,b){a=P(a);var c=a.includes("j")?ec(a,b):Na.get(b);"function"!=typeof c&&Q(`unknown function pointer with signature ${a}: ${b}`);return c}var nc=void 0;function oc(a){a=pc(a);var b=P(a);qc(a);return b}
|
||||
function rc(a,b){function c(k){f[k]||pb[k]||(qb[k]?qb[k].forEach(c):(e.push(k),f[k]=!0))}var e=[],f={};b.forEach(c);throw new nc(`${a}: `+e.map(oc).join([", "]));}
|
||||
function sc(a,b,c,e,f){var k=b.length;2>k&&Q("argTypes array size mismatch! Must at least get return value and 'this' types!");var l=null!==b[1]&&null!==c,m=!1;for(c=1;c<b.length;++c)if(null!==b[c]&&void 0===b[c].Md){m=!0;break}var q="void"!==b[0].name,w=k-2,y=Array(w),B=[],D=[];return function(){arguments.length!==w&&Q(`function ${a} called with ${arguments.length} arguments, expected ${w} args!`);D.length=0;B.length=l?2:1;B[0]=f;if(l){var u=b[1].toWireType(D,this);B[1]=u}for(var F=0;F<w;++F)y[F]=
|
||||
b[F+2].toWireType(D,arguments[F]),B.push(y[F]);F=e.apply(null,B);if(m)mb(D);else for(var H=l?1:2;H<b.length;H++){var T=1===H?u:y[H-2];null!==b[H].Md&&b[H].Md(T)}u=q?b[0].fromWireType(F):void 0;return u}}function tc(a,b){for(var c=[],e=0;e<a;e++)c.push(L[b+4*e>>2]);return c}function uc(){this.Qd=[void 0];this.Ce=[]}var vc=new uc;function wc(a){a>=vc.Td&&0===--vc.get(a).Fe&&vc.qe(a)}
|
||||
var xc=a=>{a||Q("Cannot use deleted val. handle = "+a);return vc.get(a).value},ac=a=>{switch(a){case void 0:return 1;case null:return 2;case !0:return 3;case !1:return 4;default:return vc.pe({Fe:1,value:a})}};function yc(a,b,c){switch(b){case 0:return function(e){return this.fromWireType((c?Ha:C)[e])};case 1:return function(e){return this.fromWireType((c?Ia:Ja)[e>>1])};case 2:return function(e){return this.fromWireType((c?K:L)[e>>2])};default:throw new TypeError("Unknown integer type: "+a);}}
|
||||
function zc(a,b){var c=pb[a];void 0===c&&Q(b+" has unknown type "+oc(a));return c}function Zb(a){if(null===a)return"null";var b=typeof a;return"object"===b||"array"===b||"function"===b?a.toString():""+a}function Ac(a,b){switch(b){case 2:return function(c){return this.fromWireType(N[c>>2])};case 3:return function(c){return this.fromWireType(Ka[c>>3])};default:throw new TypeError("Unknown float type: "+a);}}
|
||||
function Bc(a,b,c){switch(b){case 0:return c?function(e){return Ha[e]}:function(e){return C[e]};case 1:return c?function(e){return Ia[e>>1]}:function(e){return Ja[e>>1]};case 2:return c?function(e){return K[e>>2]}:function(e){return L[e>>2]};default:throw new TypeError("Unknown integer type: "+a);}}
|
||||
var ka=(a,b,c,e)=>{if(!(0<e))return 0;var f=c;e=c+e-1;for(var k=0;k<a.length;++k){var l=a.charCodeAt(k);if(55296<=l&&57343>=l){var m=a.charCodeAt(++k);l=65536+((l&1023)<<10)|m&1023}if(127>=l){if(c>=e)break;b[c++]=l}else{if(2047>=l){if(c+1>=e)break;b[c++]=192|l>>6}else{if(65535>=l){if(c+2>=e)break;b[c++]=224|l>>12}else{if(c+3>=e)break;b[c++]=240|l>>18;b[c++]=128|l>>12&63}b[c++]=128|l>>6&63}b[c++]=128|l&63}}b[c]=0;return c-f},ja=a=>{for(var b=0,c=0;c<a.length;++c){var e=a.charCodeAt(c);127>=e?b++:2047>=
|
||||
e?b+=2:55296<=e&&57343>=e?(b+=4,++c):b+=3}return b},Cc="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Dc=(a,b)=>{var c=a>>1;for(var e=c+b/2;!(c>=e)&&Ja[c];)++c;c<<=1;if(32<c-a&&Cc)return Cc.decode(C.subarray(a,c));c="";for(e=0;!(e>=b/2);++e){var f=Ia[a+2*e>>1];if(0==f)break;c+=String.fromCharCode(f)}return c},Ec=(a,b,c)=>{void 0===c&&(c=2147483647);if(2>c)return 0;c-=2;var e=b;c=c<2*a.length?c/2:a.length;for(var f=0;f<c;++f)Ia[b>>1]=a.charCodeAt(f),b+=2;Ia[b>>1]=0;return b-e},
|
||||
Fc=a=>2*a.length,Gc=(a,b)=>{for(var c=0,e="";!(c>=b/4);){var f=K[a+4*c>>2];if(0==f)break;++c;65536<=f?(f-=65536,e+=String.fromCharCode(55296|f>>10,56320|f&1023)):e+=String.fromCharCode(f)}return e},Hc=(a,b,c)=>{void 0===c&&(c=2147483647);if(4>c)return 0;var e=b;c=e+c-4;for(var f=0;f<a.length;++f){var k=a.charCodeAt(f);if(55296<=k&&57343>=k){var l=a.charCodeAt(++f);k=65536+((k&1023)<<10)|l&1023}K[b>>2]=k;b+=4;if(b+4>c)break}K[b>>2]=0;return b-e},Ic=a=>{for(var b=0,c=0;c<a.length;++c){var e=a.charCodeAt(c);
|
||||
55296<=e&&57343>=e&&++c;b+=4}return b},Jc={};function Kc(a){var b=Jc[a];return void 0===b?P(a):b}var Lc=[];
|
||||
function Mc(){function a(b){b.$$$embind_global$$$=b;var c="object"==typeof $$$embind_global$$$&&b.$$$embind_global$$$==b;c||delete b.$$$embind_global$$$;return c}if("object"==typeof globalThis)return globalThis;if("object"==typeof $$$embind_global$$$)return $$$embind_global$$$;"object"==typeof global&&a(global)?$$$embind_global$$$=global:"object"==typeof self&&a(self)&&($$$embind_global$$$=self);if("object"==typeof $$$embind_global$$$)return $$$embind_global$$$;throw Error("unable to get global object.");
|
||||
}function Nc(a){var b=Lc.length;Lc.push(a);return b}function Oc(a,b){for(var c=Array(a),e=0;e<a;++e)c[e]=zc(L[b+4*e>>2],"parameter "+e);return c}var Pc=[];function Qc(a){var b=Array(a+1);return function(c,e,f){b[0]=c;for(var k=0;k<a;++k){var l=zc(L[e+4*k>>2],"parameter "+k);b[k+1]=l.readValueFromPointer(f);f+=l.argPackAdvance}c=new (c.bind.apply(c,b));return ac(c)}}var Rc={};
|
||||
function Sc(a){var b=a.getExtension("ANGLE_instanced_arrays");b&&(a.vertexAttribDivisor=function(c,e){b.vertexAttribDivisorANGLE(c,e)},a.drawArraysInstanced=function(c,e,f,k){b.drawArraysInstancedANGLE(c,e,f,k)},a.drawElementsInstanced=function(c,e,f,k,l){b.drawElementsInstancedANGLE(c,e,f,k,l)})}
|
||||
function Tc(a){var b=a.getExtension("OES_vertex_array_object");b&&(a.createVertexArray=function(){return b.createVertexArrayOES()},a.deleteVertexArray=function(c){b.deleteVertexArrayOES(c)},a.bindVertexArray=function(c){b.bindVertexArrayOES(c)},a.isVertexArray=function(c){return b.isVertexArrayOES(c)})}function Uc(a){var b=a.getExtension("WEBGL_draw_buffers");b&&(a.drawBuffers=function(c,e){b.drawBuffersWEBGL(c,e)})}
|
||||
var Vc=1,Wc=[],Xc=[],Yc=[],Zc=[],ea=[],$c=[],ad=[],ia=[],bd=[],cd=[],dd={},ed={},gd=4;function R(a){hd||(hd=a)}function da(a){for(var b=Vc++,c=a.length;c<b;c++)a[c]=null;return b}function fa(a,b){a.Td||(a.Td=a.getContext,a.getContext=function(e,f){f=a.Td(e,f);return"webgl"==e==f instanceof WebGLRenderingContext?f:null});var c=1<b.majorVersion?a.getContext("webgl2",b):a.getContext("webgl",b);return c?jd(c,b):0}
|
||||
function jd(a,b){var c=da(ia),e={handle:c,attributes:b,version:b.majorVersion,Od:a};a.canvas&&(a.canvas.Je=e);ia[c]=e;("undefined"==typeof b.Te||b.Te)&&kd(e);return c}function ha(a){x=ia[a];r.pf=S=x&&x.Od;return!(a&&!S)}
|
||||
function kd(a){a||(a=x);if(!a.af){a.af=!0;var b=a.Od;Sc(b);Tc(b);Uc(b);b.ze=b.getExtension("WEBGL_draw_instanced_base_vertex_base_instance");b.De=b.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance");2<=a.version&&(b.Ae=b.getExtension("EXT_disjoint_timer_query_webgl2"));if(2>a.version||!b.Ae)b.Ae=b.getExtension("EXT_disjoint_timer_query");b.qf=b.getExtension("WEBGL_multi_draw");(b.getSupportedExtensions()||[]).forEach(function(c){c.includes("lose_context")||c.includes("debug")||b.getExtension(c)})}}
|
||||
var x,hd,ld={},nd=()=>{if(!md){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:ma||"./this.program"},b;for(b in ld)void 0===ld[b]?delete a[b]:a[b]=ld[b];var c=[];for(b in a)c.push(`${b}=${a[b]}`);md=c}return md},md,od=[null,[],[]];function pd(a){S.bindVertexArray(ad[a])}
|
||||
function qd(a,b){for(var c=0;c<a;c++){var e=K[b+4*c>>2];S.deleteVertexArray(ad[e]);ad[e]=null}}var rd=[];function sd(a,b,c,e){S.drawElements(a,b,c,e)}function td(a,b,c,e){for(var f=0;f<a;f++){var k=S[c](),l=k&&da(e);k?(k.name=l,e[l]=k):R(1282);K[b+4*f>>2]=l}}function ud(a,b){td(a,b,"createVertexArray",ad)}
|
||||
function vd(a,b,c){if(b){var e=void 0;switch(a){case 36346:e=1;break;case 36344:0!=c&&1!=c&&R(1280);return;case 34814:case 36345:e=0;break;case 34466:var f=S.getParameter(34467);e=f?f.length:0;break;case 33309:if(2>x.version){R(1282);return}e=2*(S.getSupportedExtensions()||[]).length;break;case 33307:case 33308:if(2>x.version){R(1280);return}e=33307==a?3:0}if(void 0===e)switch(f=S.getParameter(a),typeof f){case "number":e=f;break;case "boolean":e=f?1:0;break;case "string":R(1280);return;case "object":if(null===
|
||||
f)switch(a){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:e=0;break;default:R(1280);return}else{if(f instanceof Float32Array||f instanceof Uint32Array||f instanceof Int32Array||f instanceof Array){for(a=0;a<f.length;++a)switch(c){case 0:K[b+4*a>>2]=f[a];break;case 2:N[b+4*a>>2]=f[a];break;case 4:Ha[b+a>>0]=f[a]?1:0}return}try{e=f.name|0}catch(k){R(1280);
|
||||
Ca("GL_INVALID_ENUM in glGet"+c+"v: Unknown object returned from WebGL getParameter("+a+")! (error: "+k+")");return}}break;default:R(1280);Ca("GL_INVALID_ENUM in glGet"+c+"v: Native code calling glGet"+c+"v("+a+") and it returns "+f+" of type "+typeof f+"!");return}switch(c){case 1:c=e;L[b>>2]=c;L[b+4>>2]=(c-L[b>>2])/4294967296;break;case 0:K[b>>2]=e;break;case 2:N[b>>2]=e;break;case 4:Ha[b>>0]=e?1:0}}else R(1281)}var xd=a=>{var b=ja(a)+1,c=wd(b);c&&ka(a,C,c,b);return c};
|
||||
function yd(a){return"]"==a.slice(-1)&&a.lastIndexOf("[")}function zd(a){a-=5120;return 0==a?Ha:1==a?C:2==a?Ia:4==a?K:6==a?N:5==a||28922==a||28520==a||30779==a||30782==a?L:Ja}function Ad(a,b,c,e,f){a=zd(a);var k=31-Math.clz32(a.BYTES_PER_ELEMENT),l=gd;return a.subarray(f>>k,f+e*(c*({5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[b-6402]||1)*(1<<k)+l-1&-l)>>k)}
|
||||
function W(a){var b=S.Qe;if(b){var c=b.de[a];"number"==typeof c&&(b.de[a]=c=S.getUniformLocation(b,b.Ge[a]+(0<c?"["+c+"]":"")));return c}R(1282)}var Bd=[],Cd=[],Dd=a=>0===a%4&&(0!==a%100||0===a%400),Ed=[31,29,31,30,31,30,31,31,30,31,30,31],Fd=[31,28,31,30,31,30,31,31,30,31,30,31];function Gd(a){var b=Array(ja(a)+1);ka(a,b,0,b.length);return b}
|
||||
var Hd=(a,b,c,e)=>{function f(u,F,H){for(u="number"==typeof u?u.toString():u||"";u.length<F;)u=H[0]+u;return u}function k(u,F){return f(u,F,"0")}function l(u,F){function H(ca){return 0>ca?-1:0<ca?1:0}var T;0===(T=H(u.getFullYear()-F.getFullYear()))&&0===(T=H(u.getMonth()-F.getMonth()))&&(T=H(u.getDate()-F.getDate()));return T}function m(u){switch(u.getDay()){case 0:return new Date(u.getFullYear()-1,11,29);case 1:return u;case 2:return new Date(u.getFullYear(),0,3);case 3:return new Date(u.getFullYear(),
|
||||
0,2);case 4:return new Date(u.getFullYear(),0,1);case 5:return new Date(u.getFullYear()-1,11,31);case 6:return new Date(u.getFullYear()-1,11,30)}}function q(u){var F=u.Ud;for(u=new Date((new Date(u.Vd+1900,0,1)).getTime());0<F;){var H=u.getMonth(),T=(Dd(u.getFullYear())?Ed:Fd)[H];if(F>T-u.getDate())F-=T-u.getDate()+1,u.setDate(1),11>H?u.setMonth(H+1):(u.setMonth(0),u.setFullYear(u.getFullYear()+1));else{u.setDate(u.getDate()+F);break}}H=new Date(u.getFullYear()+1,0,4);F=m(new Date(u.getFullYear(),
|
||||
0,4));H=m(H);return 0>=l(F,u)?0>=l(H,u)?u.getFullYear()+1:u.getFullYear():u.getFullYear()-1}var w=K[e+40>>2];e={mf:K[e>>2],lf:K[e+4>>2],ne:K[e+8>>2],we:K[e+12>>2],oe:K[e+16>>2],Vd:K[e+20>>2],Pd:K[e+24>>2],Ud:K[e+28>>2],tf:K[e+32>>2],kf:K[e+36>>2],nf:w?w?kb(C,w):"":""};c=c?kb(C,c):"";w={"%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 y in w)c=c.replace(new RegExp(y,"g"),w[y]);var B="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),D="January February March April May June July August September October November December".split(" ");w={"%a":u=>B[u.Pd].substring(0,3),"%A":u=>B[u.Pd],"%b":u=>D[u.oe].substring(0,3),"%B":u=>D[u.oe],"%C":u=>k((u.Vd+1900)/
|
||||
100|0,2),"%d":u=>k(u.we,2),"%e":u=>f(u.we,2," "),"%g":u=>q(u).toString().substring(2),"%G":u=>q(u),"%H":u=>k(u.ne,2),"%I":u=>{u=u.ne;0==u?u=12:12<u&&(u-=12);return k(u,2)},"%j":u=>{for(var F=0,H=0;H<=u.oe-1;F+=(Dd(u.Vd+1900)?Ed:Fd)[H++]);return k(u.we+F,3)},"%m":u=>k(u.oe+1,2),"%M":u=>k(u.lf,2),"%n":()=>"\n","%p":u=>0<=u.ne&&12>u.ne?"AM":"PM","%S":u=>k(u.mf,2),"%t":()=>"\t","%u":u=>u.Pd||7,"%U":u=>k(Math.floor((u.Ud+7-u.Pd)/7),2),"%V":u=>{var F=Math.floor((u.Ud+7-(u.Pd+6)%7)/7);2>=(u.Pd+371-u.Ud-
|
||||
2)%7&&F++;if(F)53==F&&(H=(u.Pd+371-u.Ud)%7,4==H||3==H&&Dd(u.Vd)||(F=1));else{F=52;var H=(u.Pd+7-u.Ud-1)%7;(4==H||5==H&&Dd(u.Vd%400-1))&&F++}return k(F,2)},"%w":u=>u.Pd,"%W":u=>k(Math.floor((u.Ud+7-(u.Pd+6)%7)/7),2),"%y":u=>(u.Vd+1900).toString().substring(2),"%Y":u=>u.Vd+1900,"%z":u=>{u=u.kf;var F=0<=u;u=Math.abs(u)/60;return(F?"+":"-")+String("0000"+(u/60*100+u%60)).slice(-4)},"%Z":u=>u.nf,"%%":()=>"%"};c=c.replace(/%%/g,"\x00\x00");for(y in w)c.includes(y)&&(c=c.replace(new RegExp(y,"g"),w[y](e)));
|
||||
c=c.replace(/\0\0/g,"%");y=Gd(c);if(y.length>b)return 0;Ha.set(y,a);return y.length-1};rb=r.InternalError=class extends Error{constructor(a){super(a);this.name="InternalError"}};for(var Id=Array(256),Jd=0;256>Jd;++Jd)Id[Jd]=String.fromCharCode(Jd);wb=Id;xb=r.BindingError=class extends Error{constructor(a){super(a);this.name="BindingError"}};
|
||||
Rb.prototype.isAliasOf=function(a){if(!(this instanceof Rb&&a instanceof Rb))return!1;var b=this.jd.Hd.Fd,c=this.jd.Ed,e=a.jd.Hd.Fd;for(a=a.jd.Ed;b.Kd;)c=b.ee(c),b=b.Kd;for(;e.Kd;)a=e.ee(a),e=e.Kd;return b===e&&c===a};
|
||||
Rb.prototype.clone=function(){this.jd.Ed||zb(this);if(this.jd.ce)return this.jd.count.value+=1,this;var a=Qb,b=Object,c=b.create,e=Object.getPrototypeOf(this),f=this.jd;a=a(c.call(b,e,{jd:{value:{count:f.count,Zd:f.Zd,ce:f.ce,Ed:f.Ed,Hd:f.Hd,Jd:f.Jd,Nd:f.Nd}}}));a.jd.count.value+=1;a.jd.Zd=!1;return a};Rb.prototype["delete"]=function(){this.jd.Ed||zb(this);this.jd.Zd&&!this.jd.ce&&Q("Object already scheduled for deletion");Bb(this);Cb(this.jd);this.jd.ce||(this.jd.Jd=void 0,this.jd.Ed=void 0)};
|
||||
Rb.prototype.isDeleted=function(){return!this.jd.Ed};Rb.prototype.deleteLater=function(){this.jd.Ed||zb(this);this.jd.Zd&&!this.jd.ce&&Q("Object already scheduled for deletion");Kb.push(this);1===Kb.length&&Mb&&Mb(Lb);this.jd.Zd=!0;return this};r.getInheritedInstanceCount=function(){return Object.keys(Nb).length};r.getLiveInheritedInstances=function(){var a=[],b;for(b in Nb)Nb.hasOwnProperty(b)&&a.push(Nb[b]);return a};r.flushPendingDeletes=Lb;r.setDelayFunction=function(a){Mb=a;Kb.length&&Mb&&Mb(Lb)};
|
||||
cc.prototype.We=function(a){this.Ee&&(a=this.Ee(a));return a};cc.prototype.ye=function(a){this.Rd&&this.Rd(a)};cc.prototype.argPackAdvance=8;cc.prototype.readValueFromPointer=nb;cc.prototype.deleteObject=function(a){if(null!==a)a["delete"]()};
|
||||
cc.prototype.fromWireType=function(a){function b(){return this.je?Pb(this.Fd.$d,{Hd:this.cf,Ed:c,Nd:this,Jd:a}):Pb(this.Fd.$d,{Hd:this,Ed:a})}var c=this.We(a);if(!c)return this.ye(a),null;var e=Ob(this.Fd,c);if(void 0!==e){if(0===e.jd.count.value)return e.jd.Ed=c,e.jd.Jd=a,e.clone();e=e.clone();this.ye(a);return e}e=this.Fd.Ve(c);e=Jb[e];if(!e)return b.call(this);e=this.ie?e.Pe:e.pointerType;var f=Db(c,this.Fd,e.Fd);return null===f?b.call(this):this.je?Pb(e.Fd.$d,{Hd:e,Ed:f,Nd:this,Jd:a}):Pb(e.Fd.$d,
|
||||
{Hd:e,Ed:f})};nc=r.UnboundTypeError=function(a,b){var c=Tb(b,function(e){this.name=b;this.message=e;e=Error(e).stack;void 0!==e&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))});c.prototype=Object.create(a.prototype);c.prototype.constructor=c;c.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`};return c}(Error,"UnboundTypeError");
|
||||
Object.assign(uc.prototype,{get(a){return this.Qd[a]},has(a){return void 0!==this.Qd[a]},pe(a){var b=this.Ce.pop()||this.Qd.length;this.Qd[b]=a;return b},qe(a){this.Qd[a]=void 0;this.Ce.push(a)}});vc.Qd.push({value:void 0},{value:null},{value:!0},{value:!1});vc.Td=vc.Qd.length;r.count_emval_handles=function(){for(var a=0,b=vc.Td;b<vc.Qd.length;++b)void 0!==vc.Qd[b]&&++a;return a};for(var S,Kd=0;32>Kd;++Kd)rd.push(Array(Kd));var Ld=new Float32Array(288);
|
||||
for(Kd=0;288>Kd;++Kd)Bd[Kd]=Ld.subarray(0,Kd+1);var Md=new Int32Array(288);for(Kd=0;288>Kd;++Kd)Cd[Kd]=Md.subarray(0,Kd+1);
|
||||
var $d={H:function(a,b,c){(new fb(a)).Td(b,c);gb=a;ib++;throw gb;},_:function(){return 0},_c:()=>{},Zc:function(){return 0},Yc:()=>{},Xc:function(){},Wc:()=>{},D:function(a){var b=lb[a];delete lb[a];var c=b.ve,e=b.Rd,f=b.Be,k=f.map(l=>l.Ze).concat(f.map(l=>l.gf));tb([a],k,l=>{var m={};f.forEach((q,w)=>{var y=l[w],B=q.Xe,D=q.Ye,u=l[w+f.length],F=q.ff,H=q.hf;m[q.Ue]={read:T=>y.fromWireType(B(D,T)),write:(T,ca)=>{var Y=[];F(H,T,u.toWireType(Y,ca));mb(Y)}}});return[{name:b.name,fromWireType:function(q){var w=
|
||||
{},y;for(y in m)w[y]=m[y].read(q);e(q);return w},toWireType:function(q,w){for(var y in m)if(!(y in w))throw new TypeError(`Missing field: "${y}"`);var B=c();for(y in m)m[y].write(B,w[y]);null!==q&&q.push(e,B);return B},argPackAdvance:8,readValueFromPointer:nb,Md:e}]})},ea:function(){},Sc:function(a,b,c,e,f){var k=vb(c);b=P(b);ub(a,{name:b,fromWireType:function(l){return!!l},toWireType:function(l,m){return m?e:f},argPackAdvance:8,readValueFromPointer:function(l){if(1===c)var m=Ha;else if(2===c)m=Ia;
|
||||
else if(4===c)m=K;else throw new TypeError("Unknown boolean type size: "+b);return this.fromWireType(m[l>>k])},Md:null})},l:function(a,b,c,e,f,k,l,m,q,w,y,B,D){y=P(y);k=mc(f,k);m&&(m=mc(l,m));w&&(w=mc(q,w));D=mc(B,D);var u=Sb(y);Vb(u,function(){rc(`Cannot construct ${y} due to unbound types`,[e])});tb([a,b,c],e?[e]:[],function(F){F=F[0];if(e){var H=F.Fd;var T=H.$d}else T=Rb.prototype;F=Tb(u,function(){if(Object.getPrototypeOf(this)!==ca)throw new xb("Use 'new' to construct "+y);if(void 0===Y.Sd)throw new xb(y+
|
||||
" has no accessible constructor");var Ma=Y.Sd[arguments.length];if(void 0===Ma)throw new xb(`Tried to invoke ctor of ${y} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(Y.Sd).toString()}) parameters instead!`);return Ma.apply(this,arguments)});var ca=Object.create(T,{constructor:{value:F}});F.prototype=ca;var Y=new Wb(y,F,ca,D,H,k,m,w);Y.Kd&&(void 0===Y.Kd.fe&&(Y.Kd.fe=[]),Y.Kd.fe.push(Y));H=new cc(y,Y,!0,!1,!1);T=new cc(y+"*",Y,!1,!1,!1);var va=new cc(y+" const*",
|
||||
Y,!1,!0,!1);Jb[a]={pointerType:T,Pe:va};dc(u,F);return[H,T,va]})},e:function(a,b,c,e,f,k,l){var m=tc(c,e);b=P(b);k=mc(f,k);tb([],[a],function(q){function w(){rc(`Cannot call ${y} due to unbound types`,m)}q=q[0];var y=`${q.name}.${b}`;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);var B=q.Fd.constructor;void 0===B[b]?(w.Xd=c-1,B[b]=w):(Ub(B,b,y),B[b].Id[c-1]=w);tb([],m,function(D){D=[D[0],null].concat(D.slice(1));D=sc(y,D,null,k,l);void 0===B[b].Id?(D.Xd=c-1,B[b]=D):B[b].Id[c-1]=D;if(q.Fd.fe)for(const u of q.Fd.fe)u.constructor.hasOwnProperty(b)||
|
||||
(u.constructor[b]=D);return[]});return[]})},B:function(a,b,c,e,f,k){var l=tc(b,c);f=mc(e,f);tb([],[a],function(m){m=m[0];var q=`constructor ${m.name}`;void 0===m.Fd.Sd&&(m.Fd.Sd=[]);if(void 0!==m.Fd.Sd[b-1])throw new xb(`Cannot register multiple constructors with identical number of parameters (${b-1}) for class '${m.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);m.Fd.Sd[b-1]=()=>{rc(`Cannot construct ${m.name} due to unbound types`,l)};
|
||||
tb([],l,function(w){w.splice(1,0,null);m.Fd.Sd[b-1]=sc(q,w,null,f,k);return[]});return[]})},a:function(a,b,c,e,f,k,l,m){var q=tc(c,e);b=P(b);k=mc(f,k);tb([],[a],function(w){function y(){rc(`Cannot call ${B} due to unbound types`,q)}w=w[0];var B=`${w.name}.${b}`;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);m&&w.Fd.df.push(b);var D=w.Fd.$d,u=D[b];void 0===u||void 0===u.Id&&u.className!==w.name&&u.Xd===c-2?(y.Xd=c-2,y.className=w.name,D[b]=y):(Ub(D,b,B),D[b].Id[c-2]=y);tb([],q,function(F){F=sc(B,F,
|
||||
w,k,l);void 0===D[b].Id?(F.Xd=c-2,D[b]=F):D[b].Id[c-2]=F;return[]});return[]})},s:function(a,b,c){a=P(a);tb([],[b],function(e){e=e[0];r[a]=e.fromWireType(c);return[]})},Rc:function(a,b){b=P(b);ub(a,{name:b,fromWireType:function(c){var e=xc(c);wc(c);return e},toWireType:function(c,e){return ac(e)},argPackAdvance:8,readValueFromPointer:nb,Md:null})},i:function(a,b,c,e){function f(){}c=vb(c);b=P(b);f.values={};ub(a,{name:b,constructor:f,fromWireType:function(k){return this.constructor.values[k]},toWireType:function(k,
|
||||
l){return l.value},argPackAdvance:8,readValueFromPointer:yc(b,c,e),Md:null});Vb(b,f)},b:function(a,b,c){var e=zc(a,"enum");b=P(b);a=e.constructor;e=Object.create(e.constructor.prototype,{value:{value:c},constructor:{value:Tb(`${e.name}_${b}`,function(){})}});a.values[c]=e;a[b]=e},X:function(a,b,c){c=vb(c);b=P(b);ub(a,{name:b,fromWireType:function(e){return e},toWireType:function(e,f){return f},argPackAdvance:8,readValueFromPointer:Ac(b,c),Md:null})},v:function(a,b,c,e,f,k){var l=tc(b,c);a=P(a);f=
|
||||
mc(e,f);Vb(a,function(){rc(`Cannot call ${a} due to unbound types`,l)},b-1);tb([],l,function(m){m=[m[0],null].concat(m.slice(1));dc(a,sc(a,m,null,f,k),b-1);return[]})},E:function(a,b,c,e,f){b=P(b);-1===f&&(f=4294967295);f=vb(c);var k=m=>m;if(0===e){var l=32-8*c;k=m=>m<<l>>>l}c=b.includes("unsigned")?function(m,q){return q>>>0}:function(m,q){return q};ub(a,{name:b,fromWireType:k,toWireType:c,argPackAdvance:8,readValueFromPointer:Bc(b,f,0!==e),Md:null})},r:function(a,b,c){function e(k){k>>=2;var l=
|
||||
L;return new f(l.buffer,l[k+1],l[k])}var f=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][b];c=P(c);ub(a,{name:c,fromWireType:e,argPackAdvance:8,readValueFromPointer:e},{$e:!0})},p:function(a,b,c,e,f,k,l,m,q,w,y,B){c=P(c);k=mc(f,k);m=mc(l,m);w=mc(q,w);B=mc(y,B);tb([a],[b],function(D){D=D[0];return[new cc(c,D.Fd,!1,!1,!0,D,e,k,m,w,B)]})},W:function(a,b){b=P(b);var c="std::string"===b;ub(a,{name:b,fromWireType:function(e){var f=L[e>>2],k=e+4;if(c)for(var l=
|
||||
k,m=0;m<=f;++m){var q=k+m;if(m==f||0==C[q]){l=l?kb(C,l,q-l):"";if(void 0===w)var w=l;else w+=String.fromCharCode(0),w+=l;l=q+1}}else{w=Array(f);for(m=0;m<f;++m)w[m]=String.fromCharCode(C[k+m]);w=w.join("")}qc(e);return w},toWireType:function(e,f){f instanceof ArrayBuffer&&(f=new Uint8Array(f));var k="string"==typeof f;k||f instanceof Uint8Array||f instanceof Uint8ClampedArray||f instanceof Int8Array||Q("Cannot pass non-string to std::string");var l=c&&k?ja(f):f.length;var m=wd(4+l+1),q=m+4;L[m>>2]=
|
||||
l;if(c&&k)ka(f,C,q,l+1);else if(k)for(k=0;k<l;++k){var w=f.charCodeAt(k);255<w&&(qc(q),Q("String has UTF-16 code units that do not fit in 8 bits"));C[q+k]=w}else for(k=0;k<l;++k)C[q+k]=f[k];null!==e&&e.push(qc,m);return m},argPackAdvance:8,readValueFromPointer:nb,Md:function(e){qc(e)}})},O:function(a,b,c){c=P(c);if(2===b){var e=Dc;var f=Ec;var k=Fc;var l=()=>Ja;var m=1}else 4===b&&(e=Gc,f=Hc,k=Ic,l=()=>L,m=2);ub(a,{name:c,fromWireType:function(q){for(var w=L[q>>2],y=l(),B,D=q+4,u=0;u<=w;++u){var F=
|
||||
q+4+u*b;if(u==w||0==y[F>>m])D=e(D,F-D),void 0===B?B=D:(B+=String.fromCharCode(0),B+=D),D=F+b}qc(q);return B},toWireType:function(q,w){"string"!=typeof w&&Q(`Cannot pass non-string to C++ string type ${c}`);var y=k(w),B=wd(4+y+b);L[B>>2]=y>>m;f(w,B+4,y+b);null!==q&&q.push(qc,B);return B},argPackAdvance:8,readValueFromPointer:nb,Md:function(q){qc(q)}})},C:function(a,b,c,e,f,k){lb[a]={name:P(b),ve:mc(c,e),Rd:mc(f,k),Be:[]}},d:function(a,b,c,e,f,k,l,m,q,w){lb[a].Be.push({Ue:P(b),Ze:c,Xe:mc(e,f),Ye:k,
|
||||
gf:l,ff:mc(m,q),hf:w})},Qc:function(a,b){b=P(b);ub(a,{bf:!0,name:b,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},Pc:()=>!0,Oc:()=>{throw Infinity;},G:function(a,b,c){a=xc(a);b=zc(b,"emval::as");var e=[],f=ac(e);L[c>>2]=f;return b.toWireType(e,a)},N:function(a,b,c,e,f){a=Lc[a];b=xc(b);c=Kc(c);var k=[];L[e>>2]=ac(k);return a(b,c,k,f)},t:function(a,b,c,e){a=Lc[a];b=xc(b);c=Kc(c);a(b,c,null,e)},c:wc,M:function(a){if(0===a)return ac(Mc());a=Kc(a);return ac(Mc()[a])},q:function(a,
|
||||
b){var c=Oc(a,b),e=c[0];b=e.name+"_$"+c.slice(1).map(function(l){return l.name}).join("_")+"$";var f=Pc[b];if(void 0!==f)return f;var k=Array(a-1);f=Nc((l,m,q,w)=>{for(var y=0,B=0;B<a-1;++B)k[B]=c[B+1].readValueFromPointer(w+y),y+=c[B+1].argPackAdvance;l=l[m].apply(l,k);for(B=0;B<a-1;++B)c[B+1].Re&&c[B+1].Re(k[B]);if(!e.bf)return e.toWireType(q,l)});return Pc[b]=f},A:function(a,b){a=xc(a);b=xc(b);return ac(a[b])},m:function(a){4<a&&(vc.get(a).Fe+=1)},L:function(a,b,c,e){a=xc(a);var f=Rc[b];f||(f=
|
||||
Qc(b),Rc[b]=f);return f(a,c,e)},I:function(){return ac([])},f:function(a){return ac(Kc(a))},F:function(){return ac({})},Nc:function(a){a=xc(a);return!a},z:function(a){var b=xc(a);mb(b);wc(a)},h:function(a,b,c){a=xc(a);b=xc(b);c=xc(c);a[b]=c},g:function(a,b){a=zc(a,"_emval_take_value");a=a.readValueFromPointer(b);return ac(a)},da:function(){return-52},ca:function(){},k:()=>{Ea("")},Mc:()=>performance.now(),Lc:a=>{var b=C.length;a>>>=0;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var e=b*(1+.2/c);
|
||||
e=Math.min(e,a+100663296);var f=Math;e=Math.max(a,e);a:{f=f.min.call(f,2147483648,e+(65536-e%65536)%65536)-Fa.buffer.byteLength+65535>>>16;try{Fa.grow(f);La();var k=1;break a}catch(l){}k=void 0}if(k)return!0}return!1},Kc:function(){return x?x.handle:0},Vc:(a,b)=>{var c=0;nd().forEach(function(e,f){var k=b+c;f=L[a+4*f>>2]=k;for(k=0;k<e.length;++k)Ha[f++>>0]=e.charCodeAt(k);Ha[f>>0]=0;c+=e.length+1});return 0},Uc:(a,b)=>{var c=nd();L[a>>2]=c.length;var e=0;c.forEach(function(f){e+=f.length+1});L[b>>
|
||||
2]=e;return 0},Jc:a=>{if(!noExitRuntime){if(r.onExit)r.onExit(a);Ga=!0}oa(a,new db(a))},Z:()=>52,ga:function(){return 52},Tc:()=>52,fa:function(){return 70},Y:(a,b,c,e)=>{for(var f=0,k=0;k<c;k++){var l=L[b>>2],m=L[b+4>>2];b+=8;for(var q=0;q<m;q++){var w=C[l+q],y=od[a];0===w||10===w?((1===a?Aa:Ca)(kb(y,0)),y.length=0):y.push(w)}f+=m}L[e>>2]=f;return 0},Ic:function(a){S.activeTexture(a)},Hc:function(a,b){S.attachShader(Xc[a],$c[b])},Gc:function(a,b,c){S.bindAttribLocation(Xc[a],b,c?kb(C,c):"")},Fc:function(a,
|
||||
b){35051==a?S.se=b:35052==a&&(S.Yd=b);S.bindBuffer(a,Wc[b])},V:function(a,b){S.bindFramebuffer(a,Yc[b])},Ec:function(a,b){S.bindRenderbuffer(a,Zc[b])},Dc:function(a,b){S.bindSampler(a,bd[b])},Cc:function(a,b){S.bindTexture(a,ea[b])},Bc:pd,Ac:pd,zc:function(a,b,c,e){S.blendColor(a,b,c,e)},yc:function(a){S.blendEquation(a)},xc:function(a,b){S.blendFunc(a,b)},wc:function(a,b,c,e,f,k,l,m,q,w){S.blitFramebuffer(a,b,c,e,f,k,l,m,q,w)},vc:function(a,b,c,e){2<=x.version?c&&b?S.bufferData(a,C,e,c,b):S.bufferData(a,
|
||||
b,e):S.bufferData(a,c?C.subarray(c,c+b):b,e)},uc:function(a,b,c,e){2<=x.version?c&&S.bufferSubData(a,b,C,e,c):S.bufferSubData(a,b,C.subarray(e,e+c))},tc:function(a){return S.checkFramebufferStatus(a)},U:function(a){S.clear(a)},T:function(a,b,c,e){S.clearColor(a,b,c,e)},S:function(a){S.clearStencil(a)},ba:function(a,b,c,e){return S.clientWaitSync(cd[a],b,(c>>>0)+4294967296*e)},sc:function(a,b,c,e){S.colorMask(!!a,!!b,!!c,!!e)},rc:function(a){S.compileShader($c[a])},qc:function(a,b,c,e,f,k,l,m){2<=
|
||||
x.version?S.Yd||!l?S.compressedTexImage2D(a,b,c,e,f,k,l,m):S.compressedTexImage2D(a,b,c,e,f,k,C,m,l):S.compressedTexImage2D(a,b,c,e,f,k,m?C.subarray(m,m+l):null)},pc:function(a,b,c,e,f,k,l,m,q){2<=x.version?S.Yd||!m?S.compressedTexSubImage2D(a,b,c,e,f,k,l,m,q):S.compressedTexSubImage2D(a,b,c,e,f,k,l,C,q,m):S.compressedTexSubImage2D(a,b,c,e,f,k,l,q?C.subarray(q,q+m):null)},oc:function(a,b,c,e,f){S.copyBufferSubData(a,b,c,e,f)},nc:function(a,b,c,e,f,k,l,m){S.copyTexSubImage2D(a,b,c,e,f,k,l,m)},mc:function(){var a=
|
||||
da(Xc),b=S.createProgram();b.name=a;b.me=b.ke=b.le=0;b.xe=1;Xc[a]=b;return a},lc:function(a){var b=da($c);$c[b]=S.createShader(a);return b},kc:function(a){S.cullFace(a)},jc:function(a,b){for(var c=0;c<a;c++){var e=K[b+4*c>>2],f=Wc[e];f&&(S.deleteBuffer(f),f.name=0,Wc[e]=null,e==S.se&&(S.se=0),e==S.Yd&&(S.Yd=0))}},ic:function(a,b){for(var c=0;c<a;++c){var e=K[b+4*c>>2],f=Yc[e];f&&(S.deleteFramebuffer(f),f.name=0,Yc[e]=null)}},hc:function(a){if(a){var b=Xc[a];b?(S.deleteProgram(b),b.name=0,Xc[a]=null):
|
||||
R(1281)}},gc:function(a,b){for(var c=0;c<a;c++){var e=K[b+4*c>>2],f=Zc[e];f&&(S.deleteRenderbuffer(f),f.name=0,Zc[e]=null)}},fc:function(a,b){for(var c=0;c<a;c++){var e=K[b+4*c>>2],f=bd[e];f&&(S.deleteSampler(f),f.name=0,bd[e]=null)}},ec:function(a){if(a){var b=$c[a];b?(S.deleteShader(b),$c[a]=null):R(1281)}},dc:function(a){if(a){var b=cd[a];b?(S.deleteSync(b),b.name=0,cd[a]=null):R(1281)}},cc:function(a,b){for(var c=0;c<a;c++){var e=K[b+4*c>>2],f=ea[e];f&&(S.deleteTexture(f),f.name=0,ea[e]=null)}},
|
||||
bc:qd,ac:qd,$b:function(a){S.depthMask(!!a)},_b:function(a){S.disable(a)},Zb:function(a){S.disableVertexAttribArray(a)},Yb:function(a,b,c){S.drawArrays(a,b,c)},Xb:function(a,b,c,e){S.drawArraysInstanced(a,b,c,e)},Wb:function(a,b,c,e,f){S.ze.drawArraysInstancedBaseInstanceWEBGL(a,b,c,e,f)},Vb:function(a,b){for(var c=rd[a],e=0;e<a;e++)c[e]=K[b+4*e>>2];S.drawBuffers(c)},Ub:sd,Tb:function(a,b,c,e,f){S.drawElementsInstanced(a,b,c,e,f)},Sb:function(a,b,c,e,f,k,l){S.ze.drawElementsInstancedBaseVertexBaseInstanceWEBGL(a,
|
||||
b,c,e,f,k,l)},Rb:function(a,b,c,e,f,k){sd(a,e,f,k)},Qb:function(a){S.enable(a)},Pb:function(a){S.enableVertexAttribArray(a)},Ob:function(a,b){return(a=S.fenceSync(a,b))?(b=da(cd),a.name=b,cd[b]=a,b):0},Nb:function(){S.finish()},Mb:function(){S.flush()},Lb:function(a,b,c,e){S.framebufferRenderbuffer(a,b,c,Zc[e])},Kb:function(a,b,c,e,f){S.framebufferTexture2D(a,b,c,ea[e],f)},Jb:function(a){S.frontFace(a)},Ib:function(a,b){td(a,b,"createBuffer",Wc)},Hb:function(a,b){td(a,b,"createFramebuffer",Yc)},Gb:function(a,
|
||||
b){td(a,b,"createRenderbuffer",Zc)},Fb:function(a,b){td(a,b,"createSampler",bd)},Eb:function(a,b){td(a,b,"createTexture",ea)},Db:ud,Cb:ud,Bb:function(a){S.generateMipmap(a)},Ab:function(a,b,c){c?K[c>>2]=S.getBufferParameter(a,b):R(1281)},zb:function(){var a=S.getError()||hd;hd=0;return a},yb:function(a,b){vd(a,b,2)},xb:function(a,b,c,e){a=S.getFramebufferAttachmentParameter(a,b,c);if(a instanceof WebGLRenderbuffer||a instanceof WebGLTexture)a=a.name|0;K[e>>2]=a},K:function(a,b){vd(a,b,0)},wb:function(a,
|
||||
b,c,e){a=S.getProgramInfoLog(Xc[a]);null===a&&(a="(unknown error)");b=0<b&&e?ka(a,C,e,b):0;c&&(K[c>>2]=b)},vb:function(a,b,c){if(c)if(a>=Vc)R(1281);else if(a=Xc[a],35716==b)a=S.getProgramInfoLog(a),null===a&&(a="(unknown error)"),K[c>>2]=a.length+1;else if(35719==b){if(!a.me)for(b=0;b<S.getProgramParameter(a,35718);++b)a.me=Math.max(a.me,S.getActiveUniform(a,b).name.length+1);K[c>>2]=a.me}else if(35722==b){if(!a.ke)for(b=0;b<S.getProgramParameter(a,35721);++b)a.ke=Math.max(a.ke,S.getActiveAttrib(a,
|
||||
b).name.length+1);K[c>>2]=a.ke}else if(35381==b){if(!a.le)for(b=0;b<S.getProgramParameter(a,35382);++b)a.le=Math.max(a.le,S.getActiveUniformBlockName(a,b).length+1);K[c>>2]=a.le}else K[c>>2]=S.getProgramParameter(a,b);else R(1281)},ub:function(a,b,c){c?K[c>>2]=S.getRenderbufferParameter(a,b):R(1281)},tb:function(a,b,c,e){a=S.getShaderInfoLog($c[a]);null===a&&(a="(unknown error)");b=0<b&&e?ka(a,C,e,b):0;c&&(K[c>>2]=b)},sb:function(a,b,c,e){a=S.getShaderPrecisionFormat(a,b);K[c>>2]=a.rangeMin;K[c+4>>
|
||||
2]=a.rangeMax;K[e>>2]=a.precision},rb:function(a,b,c){c?35716==b?(a=S.getShaderInfoLog($c[a]),null===a&&(a="(unknown error)"),K[c>>2]=a?a.length+1:0):35720==b?(a=S.getShaderSource($c[a]),K[c>>2]=a?a.length+1:0):K[c>>2]=S.getShaderParameter($c[a],b):R(1281)},R:function(a){var b=dd[a];if(!b){switch(a){case 7939:b=S.getSupportedExtensions()||[];b=b.concat(b.map(function(e){return"GL_"+e}));b=xd(b.join(" "));break;case 7936:case 7937:case 37445:case 37446:(b=S.getParameter(a))||R(1280);b=b&&xd(b);break;
|
||||
case 7938:b=S.getParameter(7938);b=2<=x.version?"OpenGL ES 3.0 ("+b+")":"OpenGL ES 2.0 ("+b+")";b=xd(b);break;case 35724:b=S.getParameter(35724);var c=b.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==c&&(3==c[1].length&&(c[1]+="0"),b="OpenGL ES GLSL ES "+c[1]+" ("+b+")");b=xd(b);break;default:R(1280)}dd[a]=b}return b},qb:function(a,b){if(2>x.version)return R(1282),0;var c=ed[a];if(c)return 0>b||b>=c.length?(R(1281),0):c[b];switch(a){case 7939:return c=S.getSupportedExtensions()||[],
|
||||
c=c.concat(c.map(function(e){return"GL_"+e})),c=c.map(function(e){return xd(e)}),c=ed[a]=c,0>b||b>=c.length?(R(1281),0):c[b];default:return R(1280),0}},pb:function(a,b){b=b?kb(C,b):"";if(a=Xc[a]){var c=a,e=c.de,f=c.He,k;if(!e)for(c.de=e={},c.Ge={},k=0;k<S.getProgramParameter(c,35718);++k){var l=S.getActiveUniform(c,k);var m=l.name;l=l.size;var q=yd(m);q=0<q?m.slice(0,q):m;var w=c.xe;c.xe+=l;f[q]=[l,w];for(m=0;m<l;++m)e[w]=m,c.Ge[w++]=q}c=a.de;e=0;f=b;k=yd(b);0<k&&(e=parseInt(b.slice(k+1))>>>0,f=b.slice(0,
|
||||
k));if((f=a.He[f])&&e<f[0]&&(e+=f[1],c[e]=c[e]||S.getUniformLocation(a,b)))return e}else R(1281);return-1},ob:function(a,b,c){for(var e=rd[b],f=0;f<b;f++)e[f]=K[c+4*f>>2];S.invalidateFramebuffer(a,e)},nb:function(a,b,c,e,f,k,l){for(var m=rd[b],q=0;q<b;q++)m[q]=K[c+4*q>>2];S.invalidateSubFramebuffer(a,m,e,f,k,l)},mb:function(a){return S.isSync(cd[a])},lb:function(a){return(a=ea[a])?S.isTexture(a):0},kb:function(a){S.lineWidth(a)},jb:function(a){a=Xc[a];S.linkProgram(a);a.de=0;a.He={}},ib:function(a,
|
||||
b,c,e,f,k){S.De.multiDrawArraysInstancedBaseInstanceWEBGL(a,K,b>>2,K,c>>2,K,e>>2,L,f>>2,k)},hb:function(a,b,c,e,f,k,l,m){S.De.multiDrawElementsInstancedBaseVertexBaseInstanceWEBGL(a,K,b>>2,c,K,e>>2,K,f>>2,K,k>>2,L,l>>2,m)},gb:function(a,b){3317==a&&(gd=b);S.pixelStorei(a,b)},fb:function(a){S.readBuffer(a)},eb:function(a,b,c,e,f,k,l){if(2<=x.version)if(S.se)S.readPixels(a,b,c,e,f,k,l);else{var m=zd(k);S.readPixels(a,b,c,e,f,k,m,l>>31-Math.clz32(m.BYTES_PER_ELEMENT))}else(l=Ad(k,f,c,e,l))?S.readPixels(a,
|
||||
b,c,e,f,k,l):R(1280)},db:function(a,b,c,e){S.renderbufferStorage(a,b,c,e)},cb:function(a,b,c,e,f){S.renderbufferStorageMultisample(a,b,c,e,f)},bb:function(a,b,c){S.samplerParameterf(bd[a],b,c)},ab:function(a,b,c){S.samplerParameteri(bd[a],b,c)},$a:function(a,b,c){S.samplerParameteri(bd[a],b,K[c>>2])},_a:function(a,b,c,e){S.scissor(a,b,c,e)},Za:function(a,b,c,e){for(var f="",k=0;k<b;++k){var l=e?K[e+4*k>>2]:-1,m=K[c+4*k>>2];l=m?kb(C,m,0>l?void 0:l):"";f+=l}S.shaderSource($c[a],f)},Ya:function(a,b,
|
||||
c){S.stencilFunc(a,b,c)},Xa:function(a,b,c,e){S.stencilFuncSeparate(a,b,c,e)},Wa:function(a){S.stencilMask(a)},Va:function(a,b){S.stencilMaskSeparate(a,b)},Ua:function(a,b,c){S.stencilOp(a,b,c)},Ta:function(a,b,c,e){S.stencilOpSeparate(a,b,c,e)},Sa:function(a,b,c,e,f,k,l,m,q){if(2<=x.version)if(S.Yd)S.texImage2D(a,b,c,e,f,k,l,m,q);else if(q){var w=zd(m);S.texImage2D(a,b,c,e,f,k,l,m,w,q>>31-Math.clz32(w.BYTES_PER_ELEMENT))}else S.texImage2D(a,b,c,e,f,k,l,m,null);else S.texImage2D(a,b,c,e,f,k,l,m,q?
|
||||
Ad(m,l,e,f,q):null)},Ra:function(a,b,c){S.texParameterf(a,b,c)},Qa:function(a,b,c){S.texParameterf(a,b,N[c>>2])},Pa:function(a,b,c){S.texParameteri(a,b,c)},Oa:function(a,b,c){S.texParameteri(a,b,K[c>>2])},Na:function(a,b,c,e,f){S.texStorage2D(a,b,c,e,f)},Ma:function(a,b,c,e,f,k,l,m,q){if(2<=x.version)if(S.Yd)S.texSubImage2D(a,b,c,e,f,k,l,m,q);else if(q){var w=zd(m);S.texSubImage2D(a,b,c,e,f,k,l,m,w,q>>31-Math.clz32(w.BYTES_PER_ELEMENT))}else S.texSubImage2D(a,b,c,e,f,k,l,m,null);else w=null,q&&(w=
|
||||
Ad(m,l,f,k,q)),S.texSubImage2D(a,b,c,e,f,k,l,m,w)},La:function(a,b){S.uniform1f(W(a),b)},Ka:function(a,b,c){if(2<=x.version)b&&S.uniform1fv(W(a),N,c>>2,b);else{if(288>=b)for(var e=Bd[b-1],f=0;f<b;++f)e[f]=N[c+4*f>>2];else e=N.subarray(c>>2,c+4*b>>2);S.uniform1fv(W(a),e)}},Ja:function(a,b){S.uniform1i(W(a),b)},Ia:function(a,b,c){if(2<=x.version)b&&S.uniform1iv(W(a),K,c>>2,b);else{if(288>=b)for(var e=Cd[b-1],f=0;f<b;++f)e[f]=K[c+4*f>>2];else e=K.subarray(c>>2,c+4*b>>2);S.uniform1iv(W(a),e)}},Ha:function(a,
|
||||
b,c){S.uniform2f(W(a),b,c)},Ga:function(a,b,c){if(2<=x.version)b&&S.uniform2fv(W(a),N,c>>2,2*b);else{if(144>=b)for(var e=Bd[2*b-1],f=0;f<2*b;f+=2)e[f]=N[c+4*f>>2],e[f+1]=N[c+(4*f+4)>>2];else e=N.subarray(c>>2,c+8*b>>2);S.uniform2fv(W(a),e)}},Fa:function(a,b,c){S.uniform2i(W(a),b,c)},Ea:function(a,b,c){if(2<=x.version)b&&S.uniform2iv(W(a),K,c>>2,2*b);else{if(144>=b)for(var e=Cd[2*b-1],f=0;f<2*b;f+=2)e[f]=K[c+4*f>>2],e[f+1]=K[c+(4*f+4)>>2];else e=K.subarray(c>>2,c+8*b>>2);S.uniform2iv(W(a),e)}},Da:function(a,
|
||||
b,c,e){S.uniform3f(W(a),b,c,e)},Ca:function(a,b,c){if(2<=x.version)b&&S.uniform3fv(W(a),N,c>>2,3*b);else{if(96>=b)for(var e=Bd[3*b-1],f=0;f<3*b;f+=3)e[f]=N[c+4*f>>2],e[f+1]=N[c+(4*f+4)>>2],e[f+2]=N[c+(4*f+8)>>2];else e=N.subarray(c>>2,c+12*b>>2);S.uniform3fv(W(a),e)}},Ba:function(a,b,c,e){S.uniform3i(W(a),b,c,e)},Aa:function(a,b,c){if(2<=x.version)b&&S.uniform3iv(W(a),K,c>>2,3*b);else{if(96>=b)for(var e=Cd[3*b-1],f=0;f<3*b;f+=3)e[f]=K[c+4*f>>2],e[f+1]=K[c+(4*f+4)>>2],e[f+2]=K[c+(4*f+8)>>2];else e=
|
||||
K.subarray(c>>2,c+12*b>>2);S.uniform3iv(W(a),e)}},za:function(a,b,c,e,f){S.uniform4f(W(a),b,c,e,f)},ya:function(a,b,c){if(2<=x.version)b&&S.uniform4fv(W(a),N,c>>2,4*b);else{if(72>=b){var e=Bd[4*b-1],f=N;c>>=2;for(var k=0;k<4*b;k+=4){var l=c+k;e[k]=f[l];e[k+1]=f[l+1];e[k+2]=f[l+2];e[k+3]=f[l+3]}}else e=N.subarray(c>>2,c+16*b>>2);S.uniform4fv(W(a),e)}},xa:function(a,b,c,e,f){S.uniform4i(W(a),b,c,e,f)},wa:function(a,b,c){if(2<=x.version)b&&S.uniform4iv(W(a),K,c>>2,4*b);else{if(72>=b)for(var e=Cd[4*b-
|
||||
1],f=0;f<4*b;f+=4)e[f]=K[c+4*f>>2],e[f+1]=K[c+(4*f+4)>>2],e[f+2]=K[c+(4*f+8)>>2],e[f+3]=K[c+(4*f+12)>>2];else e=K.subarray(c>>2,c+16*b>>2);S.uniform4iv(W(a),e)}},va:function(a,b,c,e){if(2<=x.version)b&&S.uniformMatrix2fv(W(a),!!c,N,e>>2,4*b);else{if(72>=b)for(var f=Bd[4*b-1],k=0;k<4*b;k+=4)f[k]=N[e+4*k>>2],f[k+1]=N[e+(4*k+4)>>2],f[k+2]=N[e+(4*k+8)>>2],f[k+3]=N[e+(4*k+12)>>2];else f=N.subarray(e>>2,e+16*b>>2);S.uniformMatrix2fv(W(a),!!c,f)}},ua:function(a,b,c,e){if(2<=x.version)b&&S.uniformMatrix3fv(W(a),
|
||||
!!c,N,e>>2,9*b);else{if(32>=b)for(var f=Bd[9*b-1],k=0;k<9*b;k+=9)f[k]=N[e+4*k>>2],f[k+1]=N[e+(4*k+4)>>2],f[k+2]=N[e+(4*k+8)>>2],f[k+3]=N[e+(4*k+12)>>2],f[k+4]=N[e+(4*k+16)>>2],f[k+5]=N[e+(4*k+20)>>2],f[k+6]=N[e+(4*k+24)>>2],f[k+7]=N[e+(4*k+28)>>2],f[k+8]=N[e+(4*k+32)>>2];else f=N.subarray(e>>2,e+36*b>>2);S.uniformMatrix3fv(W(a),!!c,f)}},ta:function(a,b,c,e){if(2<=x.version)b&&S.uniformMatrix4fv(W(a),!!c,N,e>>2,16*b);else{if(18>=b){var f=Bd[16*b-1],k=N;e>>=2;for(var l=0;l<16*b;l+=16){var m=e+l;f[l]=
|
||||
k[m];f[l+1]=k[m+1];f[l+2]=k[m+2];f[l+3]=k[m+3];f[l+4]=k[m+4];f[l+5]=k[m+5];f[l+6]=k[m+6];f[l+7]=k[m+7];f[l+8]=k[m+8];f[l+9]=k[m+9];f[l+10]=k[m+10];f[l+11]=k[m+11];f[l+12]=k[m+12];f[l+13]=k[m+13];f[l+14]=k[m+14];f[l+15]=k[m+15]}}else f=N.subarray(e>>2,e+64*b>>2);S.uniformMatrix4fv(W(a),!!c,f)}},sa:function(a){a=Xc[a];S.useProgram(a);S.Qe=a},ra:function(a,b){S.vertexAttrib1f(a,b)},qa:function(a,b){S.vertexAttrib2f(a,N[b>>2],N[b+4>>2])},pa:function(a,b){S.vertexAttrib3f(a,N[b>>2],N[b+4>>2],N[b+8>>2])},
|
||||
oa:function(a,b){S.vertexAttrib4f(a,N[b>>2],N[b+4>>2],N[b+8>>2],N[b+12>>2])},na:function(a,b){S.vertexAttribDivisor(a,b)},ma:function(a,b,c,e,f){S.vertexAttribIPointer(a,b,c,e,f)},la:function(a,b,c,e,f,k){S.vertexAttribPointer(a,b,c,!!e,f,k)},ka:function(a,b,c,e){S.viewport(a,b,c,e)},aa:function(a,b,c,e){S.waitSync(cd[a],b,(c>>>0)+4294967296*e)},n:Nd,u:Od,j:Pd,J:Qd,Q:Rd,P:Sd,x:Td,y:Ud,o:Vd,w:Wd,ja:Xd,ia:Yd,ha:Zd,$:(a,b,c,e)=>Hd(a,b,c,e)};
|
||||
(function(){function a(c){G=c=c.exports;Fa=G.$c;La();Na=G.cd;Pa.unshift(G.ad);Ua--;r.monitorRunDependencies&&r.monitorRunDependencies(Ua);if(0==Ua&&(null!==Va&&(clearInterval(Va),Va=null),Wa)){var e=Wa;Wa=null;e()}return c}var b={a:$d};Ua++;r.monitorRunDependencies&&r.monitorRunDependencies(Ua);if(r.instantiateWasm)try{return r.instantiateWasm(b,a)}catch(c){Ca("Module.instantiateWasm callback failed with error: "+c),ba(c)}cb(b,function(c){a(c.instance)}).catch(ba);return{}})();
|
||||
var wd=r._malloc=a=>(wd=r._malloc=G.bd)(a),qc=r._free=a=>(qc=r._free=G.dd)(a),pc=a=>(pc=G.ed)(a);r.__embind_initialize_bindings=()=>(r.__embind_initialize_bindings=G.fd)();var ae=(a,b)=>(ae=G.gd)(a,b),be=()=>(be=G.hd)(),ce=a=>(ce=G.id)(a);r.dynCall_viji=(a,b,c,e,f)=>(r.dynCall_viji=G.kd)(a,b,c,e,f);r.dynCall_vijiii=(a,b,c,e,f,k,l)=>(r.dynCall_vijiii=G.ld)(a,b,c,e,f,k,l);r.dynCall_viiiiij=(a,b,c,e,f,k,l,m)=>(r.dynCall_viiiiij=G.md)(a,b,c,e,f,k,l,m);r.dynCall_jii=(a,b,c)=>(r.dynCall_jii=G.nd)(a,b,c);
|
||||
r.dynCall_vij=(a,b,c,e)=>(r.dynCall_vij=G.od)(a,b,c,e);r.dynCall_iiij=(a,b,c,e,f)=>(r.dynCall_iiij=G.pd)(a,b,c,e,f);r.dynCall_iiiij=(a,b,c,e,f,k)=>(r.dynCall_iiiij=G.qd)(a,b,c,e,f,k);r.dynCall_viij=(a,b,c,e,f)=>(r.dynCall_viij=G.rd)(a,b,c,e,f);r.dynCall_viiij=(a,b,c,e,f,k)=>(r.dynCall_viiij=G.sd)(a,b,c,e,f,k);r.dynCall_jiiiiii=(a,b,c,e,f,k,l)=>(r.dynCall_jiiiiii=G.td)(a,b,c,e,f,k,l);r.dynCall_jiiiiji=(a,b,c,e,f,k,l,m)=>(r.dynCall_jiiiiji=G.ud)(a,b,c,e,f,k,l,m);
|
||||
r.dynCall_ji=(a,b)=>(r.dynCall_ji=G.vd)(a,b);r.dynCall_iijj=(a,b,c,e,f,k)=>(r.dynCall_iijj=G.wd)(a,b,c,e,f,k);r.dynCall_jiji=(a,b,c,e,f)=>(r.dynCall_jiji=G.xd)(a,b,c,e,f);r.dynCall_viijii=(a,b,c,e,f,k,l)=>(r.dynCall_viijii=G.yd)(a,b,c,e,f,k,l);r.dynCall_iiiiij=(a,b,c,e,f,k,l)=>(r.dynCall_iiiiij=G.zd)(a,b,c,e,f,k,l);r.dynCall_iiiiijj=(a,b,c,e,f,k,l,m,q)=>(r.dynCall_iiiiijj=G.Ad)(a,b,c,e,f,k,l,m,q);r.dynCall_iiiiiijj=(a,b,c,e,f,k,l,m,q,w)=>(r.dynCall_iiiiiijj=G.Bd)(a,b,c,e,f,k,l,m,q,w);
|
||||
function Wd(a,b,c,e,f){var k=be();try{Na.get(a)(b,c,e,f)}catch(l){ce(k);if(l!==l+0)throw l;ae(1,0)}}function Od(a,b,c){var e=be();try{return Na.get(a)(b,c)}catch(f){ce(e);if(f!==f+0)throw f;ae(1,0)}}function Ud(a,b,c){var e=be();try{Na.get(a)(b,c)}catch(f){ce(e);if(f!==f+0)throw f;ae(1,0)}}function Nd(a,b){var c=be();try{return Na.get(a)(b)}catch(e){ce(c);if(e!==e+0)throw e;ae(1,0)}}function Td(a,b){var c=be();try{Na.get(a)(b)}catch(e){ce(c);if(e!==e+0)throw e;ae(1,0)}}
|
||||
function Pd(a,b,c,e){var f=be();try{return Na.get(a)(b,c,e)}catch(k){ce(f);if(k!==k+0)throw k;ae(1,0)}}function Zd(a,b,c,e,f,k,l,m,q,w){var y=be();try{Na.get(a)(b,c,e,f,k,l,m,q,w)}catch(B){ce(y);if(B!==B+0)throw B;ae(1,0)}}function Vd(a,b,c,e){var f=be();try{Na.get(a)(b,c,e)}catch(k){ce(f);if(k!==k+0)throw k;ae(1,0)}}function Yd(a,b,c,e,f,k,l){var m=be();try{Na.get(a)(b,c,e,f,k,l)}catch(q){ce(m);if(q!==q+0)throw q;ae(1,0)}}
|
||||
function Qd(a,b,c,e,f){var k=be();try{return Na.get(a)(b,c,e,f)}catch(l){ce(k);if(l!==l+0)throw l;ae(1,0)}}function Rd(a,b,c,e,f,k,l){var m=be();try{return Na.get(a)(b,c,e,f,k,l)}catch(q){ce(m);if(q!==q+0)throw q;ae(1,0)}}function Xd(a,b,c,e,f,k){var l=be();try{Na.get(a)(b,c,e,f,k)}catch(m){ce(l);if(m!==m+0)throw m;ae(1,0)}}function Sd(a,b,c,e,f,k,l,m,q,w){var y=be();try{return Na.get(a)(b,c,e,f,k,l,m,q,w)}catch(B){ce(y);if(B!==B+0)throw B;ae(1,0)}}var de;Wa=function ee(){de||fe();de||(Wa=ee)};
|
||||
function fe(){function a(){if(!de&&(de=!0,r.calledRun=!0,!Ga)){eb(Pa);aa(r);if(r.onRuntimeInitialized)r.onRuntimeInitialized();if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;){var b=r.postRun.shift();Qa.unshift(b)}eb(Qa)}}if(!(0<Ua)){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)Ra();eb(Oa);0<Ua||(r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1);a()},1)):a())}}
|
||||
if(r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);0<r.preInit.length;)r.preInit.pop()();fe();
|
||||
|
||||
|
||||
return moduleArg.ready
|
||||
}
|
||||
|
||||
);
|
||||
})();
|
||||
if (typeof exports === 'object' && typeof module === 'object')
|
||||
module.exports = CanvasKitInit;
|
||||
else if (typeof define === 'function' && define['amd'])
|
||||
define([], () => CanvasKitInit);
|
10867
new_backend/public/canvaskit/chromium/canvaskit.js.symbols
Normal file
BIN
new_backend/public/canvaskit/chromium/canvaskit.wasm
Normal file
171
new_backend/public/canvaskit/skwasm.js
Normal file
|
@ -0,0 +1,171 @@
|
|||
|
||||
var skwasm = (() => {
|
||||
var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
|
||||
if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename;
|
||||
return (
|
||||
function(moduleArg = {}) {
|
||||
|
||||
function aa(){d.buffer!=h.buffer&&l();return h}function p(){d.buffer!=h.buffer&&l();return ca}function q(){d.buffer!=h.buffer&&l();return da}function t(){d.buffer!=h.buffer&&l();return ea}function v(){d.buffer!=h.buffer&&l();return fa}function ha(){d.buffer!=h.buffer&&l();return ia}var w=moduleArg,ja,ka;w.ready=new Promise((a,b)=>{ja=a;ka=b});
|
||||
var la=Object.assign({},w),ma="./this.program",na=(a,b)=>{throw b;},oa="object"==typeof window,pa="function"==typeof importScripts,x="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,A=w.ENVIRONMENT_IS_PTHREAD||!1,C="";function qa(a){return w.locateFile?w.locateFile(a,C):C+a}var ra,sa,ta;
|
||||
if(x){var fs=require("fs"),ua=require("path");C=pa?ua.dirname(C)+"/":__dirname+"/";ra=(b,c)=>{b=b.startsWith("file://")?new URL(b):ua.normalize(b);return fs.readFileSync(b,c?void 0:"utf8")};ta=b=>{b=ra(b,!0);b.buffer||(b=new Uint8Array(b));return b};sa=(b,c,e,f=!0)=>{b=b.startsWith("file://")?new URL(b):ua.normalize(b);fs.readFile(b,f?void 0:"utf8",(g,k)=>{g?e(g):c(f?k.buffer:k)})};!w.thisProgram&&1<process.argv.length&&(ma=process.argv[1].replace(/\\/g,"/"));process.argv.slice(2);na=(b,c)=>{process.exitCode=
|
||||
b;throw c;};w.inspect=()=>"[Emscripten Module object]";let a;try{a=require("worker_threads")}catch(b){throw console.error('The "worker_threads" module is not supported in this node.js build - perhaps a newer version is needed?'),b;}global.Worker=a.Worker}else if(oa||pa)pa?C=self.location.href:"undefined"!=typeof document&&document.currentScript&&(C=document.currentScript.src),_scriptDir&&(C=_scriptDir),0!==C.indexOf("blob:")?C=C.substr(0,C.replace(/[?#].*/,"").lastIndexOf("/")+1):C="",x||(ra=a=>{var b=
|
||||
new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},pa&&(ta=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),sa=(a,b,c)=>{var e=new XMLHttpRequest;e.open("GET",a,!0);e.responseType="arraybuffer";e.onload=()=>{200==e.status||0==e.status&&e.response?b(e.response):c()};e.onerror=c;e.send(null)});x&&"undefined"==typeof performance&&(global.performance=require("perf_hooks").performance);
|
||||
var va=console.log.bind(console),wa=console.error.bind(console);x&&(va=(...a)=>fs.writeSync(1,a.join(" ")+"\n"),wa=(...a)=>fs.writeSync(2,a.join(" ")+"\n"));var xa=w.print||va,D=w.printErr||wa;Object.assign(w,la);la=null;w.thisProgram&&(ma=w.thisProgram);w.quit&&(na=w.quit);var ya;w.wasmBinary&&(ya=w.wasmBinary);var noExitRuntime=w.noExitRuntime||!0;"object"!=typeof WebAssembly&&za("no native wasm support detected");var d,F,Aa,Ba=!1,Ca,h,ca,Da,Ea,da,ea,fa,ia;
|
||||
function l(){var a=d.buffer;w.HEAP8=h=new Int8Array(a);w.HEAP16=Da=new Int16Array(a);w.HEAP32=da=new Int32Array(a);w.HEAPU8=ca=new Uint8Array(a);w.HEAPU16=Ea=new Uint16Array(a);w.HEAPU32=ea=new Uint32Array(a);w.HEAPF32=fa=new Float32Array(a);w.HEAPF64=ia=new Float64Array(a)}var Fa=w.INITIAL_MEMORY||16777216;65536<=Fa||za("INITIAL_MEMORY should be larger than STACK_SIZE, was "+Fa+"! (STACK_SIZE=65536)");
|
||||
if(A)d=w.wasmMemory;else if(w.wasmMemory)d=w.wasmMemory;else if(d=new WebAssembly.Memory({initial:Fa/65536,maximum:32768,shared:!0}),!(d.buffer instanceof SharedArrayBuffer))throw D("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),x&&D("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)"),
|
||||
Error("bad memory");l();Fa=d.buffer.byteLength;var G,Ga=[],Ha=[],Ia=[],Ja=0;function Ka(){return noExitRuntime||0<Ja}var H=0,La=null,Ma=null;function Na(){H++;w.monitorRunDependencies&&w.monitorRunDependencies(H)}function Oa(){H--;w.monitorRunDependencies&&w.monitorRunDependencies(H);if(0==H&&(null!==La&&(clearInterval(La),La=null),Ma)){var a=Ma;Ma=null;a()}}
|
||||
function za(a){if(w.onAbort)w.onAbort(a);a="Aborted("+a+")";D(a);Ba=!0;Ca=1;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ka(a);throw a;}function Pa(a){return a.startsWith("data:application/octet-stream;base64,")}var Qa;Qa="skwasm.wasm";Pa(Qa)||(Qa=qa(Qa));function Ra(a){if(a==Qa&&ya)return new Uint8Array(ya);if(ta)return ta(a);throw"both async and sync fetching of the wasm failed";}
|
||||
function Sa(a){if(!ya&&(oa||pa)){if("function"==typeof fetch&&!a.startsWith("file://"))return fetch(a,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw"failed to load wasm binary file at '"+a+"'";return b.arrayBuffer()}).catch(()=>Ra(a));if(sa)return new Promise((b,c)=>{sa(a,e=>b(new Uint8Array(e)),c)})}return Promise.resolve().then(()=>Ra(a))}function Ta(a,b,c){return Sa(a).then(e=>WebAssembly.instantiate(e,b)).then(e=>e).then(c,e=>{D("failed to asynchronously prepare wasm: "+e);za(e)})}
|
||||
function Ua(a,b){var c=Qa;return ya||"function"!=typeof WebAssembly.instantiateStreaming||Pa(c)||c.startsWith("file://")||x||"function"!=typeof fetch?Ta(c,a,b):fetch(c,{credentials:"same-origin"}).then(e=>WebAssembly.instantiateStreaming(e,a).then(b,function(f){D("wasm streaming compile failed: "+f);D("falling back to ArrayBuffer instantiation");return Ta(c,a,b)}))}function Va(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a}
|
||||
function Wa(a){a.terminate();a.onmessage=()=>{}}function Xa(a){(a=I.g[a])||za();I.Aa(a)}function Ya(a){var b=I.ma();if(!b)return 6;I.u.push(b);I.g[a.m]=b;b.m=a.m;var c={cmd:"run",start_routine:a.Ba,arg:a.ka,pthread_ptr:a.m};c.D=a.D;c.S=a.S;x&&b.unref();b.postMessage(c,a.Ha);return 0}
|
||||
var Za="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,$a=(a,b,c)=>{var e=b+c;for(c=b;a[c]&&!(c>=e);)++c;if(16<c-b&&a.buffer&&Za)return Za.decode(a.slice(b,c));for(e="";b<c;){var f=a[b++];if(f&128){var g=a[b++]&63;if(192==(f&224))e+=String.fromCharCode((f&31)<<6|g);else{var k=a[b++]&63;f=224==(f&240)?(f&15)<<12|g<<6|k:(f&7)<<18|g<<12|k<<6|a[b++]&63;65536>f?e+=String.fromCharCode(f):(f-=65536,e+=String.fromCharCode(55296|f>>10,56320|f&1023))}}else e+=String.fromCharCode(f)}return e},
|
||||
J=(a,b)=>a?$a(p(),a,b):"";function ab(a){if(A)return K(1,1,a);Ca=a;if(!Ka()){I.Ca();if(w.onExit)w.onExit(a);Ba=!0}na(a,new Va(a))}
|
||||
var cb=a=>{Ca=a;if(A)throw bb(a),"unwind";ab(a)},I={o:[],u:[],ha:[],g:{},R:function(){A?I.ra():I.qa()},qa:function(){for(var a=1;a--;)I.X();Ga.unshift(()=>{Na();I.ta(()=>Oa())})},ra:function(){I.receiveObjectTransfer=I.za;I.threadInitTLS=I.ga;I.setExitStatus=I.fa;noExitRuntime=!1},fa:function(a){Ca=a},Oa:["$terminateWorker"],Ca:function(){for(var a of I.u)Wa(a);for(a of I.o)Wa(a);I.o=[];I.u=[];I.g=[]},Aa:function(a){var b=a.m;delete I.g[b];I.o.push(a);I.u.splice(I.u.indexOf(a),1);a.m=0;db(b)},za:function(a){"undefined"!=
|
||||
typeof eb&&(Object.assign(L,a.S),!w.canvas&&a.D&&L[a.D]&&(w.canvas=L[a.D].F,w.canvas.id=a.D))},ga:function(){I.ha.forEach(a=>a())},ba:a=>new Promise(b=>{a.onmessage=g=>{g=g.data;var k=g.cmd;if(g.targetThread&&g.targetThread!=fb()){var n=I.g[g.Na];n?n.postMessage(g,g.transferList):D('Internal error! Worker sent a message "'+k+'" to target pthread '+g.targetThread+", but that thread no longer exists!")}else if("checkMailbox"===k)gb();else if("spawnThread"===k)Ya(g);else if("cleanupThread"===k)Xa(g.thread);
|
||||
else if("killThread"===k)g=g.thread,k=I.g[g],delete I.g[g],Wa(k),db(g),I.u.splice(I.u.indexOf(k),1),k.m=0;else if("cancelThread"===k)I.g[g.thread].postMessage({cmd:"cancel"});else if("loaded"===k)a.loaded=!0,x&&!a.m&&a.unref(),b(a);else if("alert"===k)alert("Thread "+g.threadId+": "+g.text);else if("setimmediate"===g.target)a.postMessage(g);else if("callHandler"===k)w[g.handler](...g.args);else k&&D("worker sent an unknown command "+k)};a.onerror=g=>{D("worker sent an error! "+g.filename+":"+g.lineno+
|
||||
": "+g.message);throw g;};x&&(a.on("message",function(g){a.onmessage({data:g})}),a.on("error",function(g){a.onerror(g)}));var c=[],e=["onExit","onAbort","print","printErr"],f;for(f of e)w.hasOwnProperty(f)&&c.push(f);a.postMessage({cmd:"load",handlers:c,urlOrBlob:w.mainScriptUrlOrBlob||_scriptDir,wasmMemory:d,wasmModule:Aa})}),ta:function(a){if(A)return a();Promise.all(I.o.map(I.ba)).then(a)},X:function(){var a=qa("skwasm.worker.js");a=new Worker(a);I.o.push(a)},ma:function(){0==I.o.length&&(I.X(),
|
||||
I.ba(I.o[0]));return I.o.pop()}};w.PThread=I;var hb=a=>{for(;0<a.length;)a.shift()(w)};w.establishStackSpace=function(){var a=fb(),b=q()[a+52>>2];a=q()[a+56>>2];ib(b,b-a);M(b)};function bb(a){if(A)return K(2,0,a);cb(a)}w.invokeEntryPoint=function(a,b){a=G.get(a)(b);Ka()?I.fa(a):jb(a)};function kb(a){this.C=a-24;this.ua=function(b){t()[this.C+4>>2]=b};this.sa=function(b){t()[this.C+8>>2]=b};this.R=function(b,c){this.na();this.ua(b);this.sa(c)};this.na=function(){t()[this.C+16>>2]=0}}var lb=0,mb=0;
|
||||
function nb(a,b,c,e){return A?K(3,1,a,b,c,e):ob(a,b,c,e)}
|
||||
function ob(a,b,c,e){if("undefined"==typeof SharedArrayBuffer)return D("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var f=[],g=0,k=b?t()[b+40>>2]:0;4294967295==k?k="#canvas":k&&(k=J(k).trim());k&&(k=k.split(","));var n={},r=w.canvas?w.canvas.id:"",u;for(u in k){var y=k[u].trim();try{if("#canvas"==y){if(!w.canvas){D('pthread_create: could not find canvas with ID "'+y+'" to transfer to thread!');g=28;break}y=w.canvas.id}if(L[y]){var V=L[y];L[y]=null;w.canvas instanceof
|
||||
OffscreenCanvas&&y===w.canvas.id&&(w.canvas=null)}else if(!A){var E=w.canvas&&w.canvas.id===y?w.canvas:document.querySelector(y);if(!E){D('pthread_create: could not find canvas with ID "'+y+'" to transfer to thread!');g=28;break}if(E.Y){D('pthread_create: cannot transfer canvas with ID "'+y+'" to thread, since the current thread does not have control over it!');g=63;break}if(E.transferControlToOffscreen)E.h||(E.h=pb(12),q()[E.h>>2]=E.width,q()[E.h+4>>2]=E.height,q()[E.h+8>>2]=0),V={F:E.transferControlToOffscreen(),
|
||||
h:E.h,id:E.id},E.Y=!0;else return D('pthread_create: cannot transfer control of canvas "'+y+'" to pthread, because current browser does not support OffscreenCanvas!'),D("pthread_create: Build with -sOFFSCREEN_FRAMEBUFFER to enable fallback proxying of GL commands from pthread to main thread."),52}V&&(f.push(V.F),n[V.id]=V)}catch(m){return D('pthread_create: failed to transfer control of canvas "'+y+'" to OffscreenCanvas! Error: '+m),28}}if(A&&(0===f.length||g))return nb(a,b,c,e);if(g)return g;for(E of Object.values(n))q()[E.h+
|
||||
8>>2]=a;a={Ba:c,m:a,ka:e,D:r,S:n,Ha:f};return A?(a.Ja="spawnThread",postMessage(a,f),0):Ya(a)}function qb(a,b,c){return A?K(4,1,a,b,c):0}function rb(a,b){if(A)return K(5,1,a,b)}function sb(a,b,c){return A?K(6,1,a,b,c):0}function tb(a,b,c,e){if(A)return K(7,1,a,b,c,e)}var ub=a=>{if(!Ba)try{if(a(),!Ka())try{A?jb(Ca):cb(Ca)}catch(b){b instanceof Va||"unwind"==b||na(1,b)}}catch(b){b instanceof Va||"unwind"==b||na(1,b)}};
|
||||
function vb(a){"function"===typeof Atomics.Ia&&(Atomics.Ia(q(),a>>2,a).value.then(gb),a+=128,Atomics.store(q(),a>>2,1))}w.__emscripten_thread_mailbox_await=vb;function gb(){var a=fb();a&&(vb(a),ub(()=>wb()))}w.checkMailbox=gb;
|
||||
var xb=a=>{var b=N();a=a();M(b);return a},yb=a=>{for(var b=0,c=0;c<a.length;++c){var e=a.charCodeAt(c);127>=e?b++:2047>=e?b+=2:55296<=e&&57343>=e?(b+=4,++c):b+=3}return b},zb=(a,b,c,e)=>{if(!(0<e))return 0;var f=c;e=c+e-1;for(var g=0;g<a.length;++g){var k=a.charCodeAt(g);if(55296<=k&&57343>=k){var n=a.charCodeAt(++g);k=65536+((k&1023)<<10)|n&1023}if(127>=k){if(c>=e)break;b[c++]=k}else{if(2047>=k){if(c+1>=e)break;b[c++]=192|k>>6}else{if(65535>=k){if(c+2>=e)break;b[c++]=224|k>>12}else{if(c+3>=e)break;
|
||||
b[c++]=240|k>>18;b[c++]=128|k>>12&63}b[c++]=128|k>>6&63}b[c++]=128|k&63}}b[c]=0;return c-f},Ab=a=>{var b=yb(a)+1,c=pb(b);c&&zb(a,p(),c,b);return c};function Bb(a,b,c,e){b=b?J(b):"";xb(function(){var f=Cb(12),g=0;b&&(g=Ab(b));q()[f>>2]=g;q()[f+4>>2]=c;q()[f+8>>2]=e;Db(a,654311424,0,g,f)})}
|
||||
function Eb(a){var b=a.getExtension("ANGLE_instanced_arrays");b&&(a.vertexAttribDivisor=function(c,e){b.vertexAttribDivisorANGLE(c,e)},a.drawArraysInstanced=function(c,e,f,g){b.drawArraysInstancedANGLE(c,e,f,g)},a.drawElementsInstanced=function(c,e,f,g,k){b.drawElementsInstancedANGLE(c,e,f,g,k)})}
|
||||
function Fb(a){var b=a.getExtension("OES_vertex_array_object");b&&(a.createVertexArray=function(){return b.createVertexArrayOES()},a.deleteVertexArray=function(c){b.deleteVertexArrayOES(c)},a.bindVertexArray=function(c){b.bindVertexArrayOES(c)},a.isVertexArray=function(c){return b.isVertexArrayOES(c)})}function Gb(a){var b=a.getExtension("WEBGL_draw_buffers");b&&(a.drawBuffers=function(c,e){b.drawBuffersWEBGL(c,e)})}
|
||||
function Hb(a){a.Z=a.getExtension("WEBGL_draw_instanced_base_vertex_base_instance")}function Ib(a){a.ea=a.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance")}function Jb(a){a.Ma=a.getExtension("WEBGL_multi_draw")}var Kb=1,Lb=[],O=[],Mb=[],Nb=[],P=[],Q=[],Ob=[],Pb={},L={},R=[],Qb=[],Rb={},Sb={},Tb=4;function S(a){Ub||(Ub=a)}function Vb(a){for(var b=Kb++,c=a.length;c<b;c++)a[c]=null;return b}
|
||||
function Wb(a){var b={da:2,alpha:!0,depth:!0,stencil:!0,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default",failIfMajorPerformanceCaveat:!1,aa:!0};a.C||(a.C=a.getContext,a.getContext=function(e,f){f=a.C(e,f);return"webgl"==e==f instanceof WebGLRenderingContext?f:null});var c=1<b.da?a.getContext("webgl2",b):a.getContext("webgl",b);return c?Xb(c,b):0}
|
||||
function Xb(a,b){var c=pb(8);q()[c+4>>2]=fb();var e={handle:c,attributes:b,version:b.da,s:a};a.canvas&&(a.canvas.I=e);Pb[c]=e;("undefined"==typeof b.aa||b.aa)&&Yb(e);return c}
|
||||
function Yb(a){a||(a=T);if(!a.pa){a.pa=!0;var b=a.s;Eb(b);Fb(b);Gb(b);Hb(b);Ib(b);2<=a.version&&(b.$=b.getExtension("EXT_disjoint_timer_query_webgl2"));if(2>a.version||!b.$)b.$=b.getExtension("EXT_disjoint_timer_query");Jb(b);(b.getSupportedExtensions()||[]).forEach(function(c){c.includes("lose_context")||c.includes("debug")||b.getExtension(c)})}}var eb={},Ub,T;
|
||||
function Zb(a){a=2<a?J(a):a;return L[a.substr(1)]||"canvas"==a&&Object.keys(L)[0]||"undefined"!=typeof document&&document.querySelector(a)}function $b(a,b,c){var e=Zb(a);if(!e)return-4;e.h&&(q()[e.h>>2]=b,q()[e.h+4>>2]=c);if(e.F||!e.Y)e.F&&(e=e.F),a=!1,e.I&&e.I.s&&(a=e.I.s.getParameter(2978),a=0===a[0]&&0===a[1]&&a[2]===e.width&&a[3]===e.height),e.width=b,e.height=c,a&&e.I.s.viewport(0,0,b,c);else return e.h?(e=q()[e.h+8>>2],Bb(e,a,b,c),1):-4;return 0}
|
||||
function ac(a,b,c){return A?K(8,1,a,b,c):$b(a,b,c)}function bc(a,b,c,e,f,g,k,n){return A?K(9,1,a,b,c,e,f,g,k,n):-52}function cc(a,b,c,e,f,g,k){if(A)return K(10,1,a,b,c,e,f,g,k)}function dc(a,b){U.bindFramebuffer(a,Mb[b])}function ec(a){U.clear(a)}function fc(a,b,c,e){U.clearColor(a,b,c,e)}function gc(a){U.clearStencil(a)}
|
||||
function hc(a,b,c){if(b){var e=void 0;switch(a){case 36346:e=1;break;case 36344:0!=c&&1!=c&&S(1280);return;case 34814:case 36345:e=0;break;case 34466:var f=U.getParameter(34467);e=f?f.length:0;break;case 33309:if(2>T.version){S(1282);return}e=2*(U.getSupportedExtensions()||[]).length;break;case 33307:case 33308:if(2>T.version){S(1280);return}e=33307==a?3:0}if(void 0===e)switch(f=U.getParameter(a),typeof f){case "number":e=f;break;case "boolean":e=f?1:0;break;case "string":S(1280);return;case "object":if(null===
|
||||
f)switch(a){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:e=0;break;default:S(1280);return}else{if(f instanceof Float32Array||f instanceof Uint32Array||f instanceof Int32Array||f instanceof Array){for(a=0;a<f.length;++a)switch(c){case 0:q()[b+4*a>>2]=f[a];break;case 2:v()[b+4*a>>2]=f[a];break;case 4:aa()[b+a>>0]=f[a]?1:0}return}try{e=f.name|
|
||||
0}catch(g){S(1280);D("GL_INVALID_ENUM in glGet"+c+"v: Unknown object returned from WebGL getParameter("+a+")! (error: "+g+")");return}}break;default:S(1280);D("GL_INVALID_ENUM in glGet"+c+"v: Native code calling glGet"+c+"v("+a+") and it returns "+f+" of type "+typeof f+"!");return}switch(c){case 1:c=e;t()[b>>2]=c;t()[b+4>>2]=(c-t()[b>>2])/4294967296;break;case 0:q()[b>>2]=e;break;case 2:v()[b>>2]=e;break;case 4:aa()[b>>0]=e?1:0}}else S(1281)}function ic(a,b){hc(a,b,0)}
|
||||
function K(a,b){var c=arguments.length-2,e=arguments;return xb(()=>{for(var f=Cb(8*c),g=f>>3,k=0;k<c;k++){var n=e[2+k];ha()[g+k]=n}return jc(a,c,f,b)})}
|
||||
var kc=[],lc={},nc=()=>{if(!mc){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:ma||"./this.program"},b;for(b in lc)void 0===lc[b]?delete a[b]:a[b]=lc[b];var c=[];for(b in a)c.push(`${b}=${a[b]}`);mc=c}return mc},mc;
|
||||
function oc(a,b){if(A)return K(11,1,a,b);var c=0;nc().forEach(function(e,f){var g=b+c;f=t()[a+4*f>>2]=g;for(g=0;g<e.length;++g)aa()[f++>>0]=e.charCodeAt(g);aa()[f>>0]=0;c+=e.length+1});return 0}function pc(a,b){if(A)return K(12,1,a,b);var c=nc();t()[a>>2]=c.length;var e=0;c.forEach(function(f){e+=f.length+1});t()[b>>2]=e;return 0}function qc(a){return A?K(13,1,a):52}function rc(a,b,c,e,f,g){return A?K(14,1,a,b,c,e,f,g):52}function sc(a,b,c,e){return A?K(15,1,a,b,c,e):52}
|
||||
function tc(a,b,c,e,f){return A?K(16,1,a,b,c,e,f):70}var uc=[null,[],[]];function vc(a,b,c,e){if(A)return K(17,1,a,b,c,e);for(var f=0,g=0;g<c;g++){var k=t()[b>>2],n=t()[b+4>>2];b+=8;for(var r=0;r<n;r++){var u=p()[k+r],y=uc[a];0===u||10===u?((1===a?xa:D)($a(y,0)),y.length=0):y.push(u)}f+=n}t()[e>>2]=f;return 0}function wc(a){U.bindVertexArray(Ob[a])}function xc(a,b){for(var c=0;c<a;c++){var e=q()[b+4*c>>2];U.deleteVertexArray(Ob[e]);Ob[e]=null}}var yc=[];
|
||||
function zc(a,b,c,e){U.drawElements(a,b,c,e)}function Ac(a,b,c,e){for(var f=0;f<a;f++){var g=U[c](),k=g&&Vb(e);g?(g.name=k,e[k]=g):S(1282);q()[b+4*f>>2]=k}}function Bc(a,b){Ac(a,b,"createVertexArray",Ob)}function Cc(a){return"]"==a.slice(-1)&&a.lastIndexOf("[")}function Dc(a){a-=5120;0==a?a=aa():1==a?a=p():2==a?(d.buffer!=h.buffer&&l(),a=Da):4==a?a=q():6==a?a=v():5==a||28922==a||28520==a||30779==a||30782==a?a=t():(d.buffer!=h.buffer&&l(),a=Ea);return a}
|
||||
function Ec(a,b,c,e,f){a=Dc(a);var g=31-Math.clz32(a.BYTES_PER_ELEMENT),k=Tb;return a.subarray(f>>g,f+e*(c*({5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[b-6402]||1)*(1<<g)+k-1&-k)>>g)}function W(a){var b=U.la;if(b){var c=b.H[a];"number"==typeof c&&(b.H[a]=c=U.getUniformLocation(b,b.ia[a]+(0<c?"["+c+"]":"")));return c}S(1282)}var X=[],Fc=[];function Gc(){}function Hc(){}function Ic(){}function Jc(){}function Lc(){}function Mc(){}function Nc(){}function Oc(){}function Pc(){}
|
||||
function Qc(){}function Rc(){}var Sc=a=>0===a%4&&(0!==a%100||0===a%400),Tc=[31,29,31,30,31,30,31,31,30,31,30,31],Uc=[31,28,31,30,31,30,31,31,30,31,30,31];function Vc(a){var b=Array(yb(a)+1);zb(a,b,0,b.length);return b}
|
||||
var Wc=(a,b)=>{aa().set(a,b)},Xc=(a,b,c,e)=>{function f(m,z,B){for(m="number"==typeof m?m.toString():m||"";m.length<z;)m=B[0]+m;return m}function g(m,z){return f(m,z,"0")}function k(m,z){function B(Kc){return 0>Kc?-1:0<Kc?1:0}var ba;0===(ba=B(m.getFullYear()-z.getFullYear()))&&0===(ba=B(m.getMonth()-z.getMonth()))&&(ba=B(m.getDate()-z.getDate()));return ba}function n(m){switch(m.getDay()){case 0:return new Date(m.getFullYear()-1,11,29);case 1:return m;case 2:return new Date(m.getFullYear(),0,3);case 3:return new Date(m.getFullYear(),
|
||||
0,2);case 4:return new Date(m.getFullYear(),0,1);case 5:return new Date(m.getFullYear()-1,11,31);case 6:return new Date(m.getFullYear()-1,11,30)}}function r(m){var z=m.v;for(m=new Date((new Date(m.A+1900,0,1)).getTime());0<z;){var B=m.getMonth(),ba=(Sc(m.getFullYear())?Tc:Uc)[B];if(z>ba-m.getDate())z-=ba-m.getDate()+1,m.setDate(1),11>B?m.setMonth(B+1):(m.setMonth(0),m.setFullYear(m.getFullYear()+1));else{m.setDate(m.getDate()+z);break}}B=new Date(m.getFullYear()+1,0,4);z=n(new Date(m.getFullYear(),
|
||||
0,4));B=n(B);return 0>=k(z,m)?0>=k(B,m)?m.getFullYear()+1:m.getFullYear():m.getFullYear()-1}var u=q()[e+40>>2];e={Fa:q()[e>>2],Ea:q()[e+4>>2],M:q()[e+8>>2],V:q()[e+12>>2],N:q()[e+16>>2],A:q()[e+20>>2],l:q()[e+24>>2],v:q()[e+28>>2],Pa:q()[e+32>>2],Da:q()[e+36>>2],Ga:u?J(u):""};c=J(c);u={"%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 y in u)c=c.replace(new RegExp(y,"g"),u[y]);var V="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),E="January February March April May June July August September October November December".split(" ");u={"%a":m=>V[m.l].substring(0,3),"%A":m=>V[m.l],"%b":m=>E[m.N].substring(0,3),"%B":m=>E[m.N],"%C":m=>g((m.A+1900)/100|
|
||||
0,2),"%d":m=>g(m.V,2),"%e":m=>f(m.V,2," "),"%g":m=>r(m).toString().substring(2),"%G":m=>r(m),"%H":m=>g(m.M,2),"%I":m=>{m=m.M;0==m?m=12:12<m&&(m-=12);return g(m,2)},"%j":m=>{for(var z=0,B=0;B<=m.N-1;z+=(Sc(m.A+1900)?Tc:Uc)[B++]);return g(m.V+z,3)},"%m":m=>g(m.N+1,2),"%M":m=>g(m.Ea,2),"%n":()=>"\n","%p":m=>0<=m.M&&12>m.M?"AM":"PM","%S":m=>g(m.Fa,2),"%t":()=>"\t","%u":m=>m.l||7,"%U":m=>g(Math.floor((m.v+7-m.l)/7),2),"%V":m=>{var z=Math.floor((m.v+7-(m.l+6)%7)/7);2>=(m.l+371-m.v-2)%7&&z++;if(z)53==z&&
|
||||
(B=(m.l+371-m.v)%7,4==B||3==B&&Sc(m.A)||(z=1));else{z=52;var B=(m.l+7-m.v-1)%7;(4==B||5==B&&Sc(m.A%400-1))&&z++}return g(z,2)},"%w":m=>m.l,"%W":m=>g(Math.floor((m.v+7-(m.l+6)%7)/7),2),"%y":m=>(m.A+1900).toString().substring(2),"%Y":m=>m.A+1900,"%z":m=>{m=m.Da;var z=0<=m;m=Math.abs(m)/60;return(z?"+":"-")+String("0000"+(m/60*100+m%60)).slice(-4)},"%Z":m=>m.Ga,"%%":()=>"%"};c=c.replace(/%%/g,"\x00\x00");for(y in u)c.includes(y)&&(c=c.replace(new RegExp(y,"g"),u[y](e)));c=c.replace(/\0\0/g,"%");y=Vc(c);
|
||||
if(y.length>b)return 0;Wc(y,a);return y.length-1},Yc=void 0,Zc=[];I.R();for(var U,Y=0;32>Y;++Y)yc.push(Array(Y));var $c=new Float32Array(288);for(Y=0;288>Y;++Y)X[Y]=$c.subarray(0,Y+1);var ad=new Int32Array(288);for(Y=0;288>Y;++Y)Fc[Y]=ad.subarray(0,Y+1);
|
||||
(function(){const a=new Map,b=new Map;let c;Qc=function(e,f,g){I.g[e].postMessage({G:"setAssociatedObject",T:f,object:g},[g])};Mc=function(e){return b.get(e)};Rc=function(e){I.g[e].postMessage({G:"syncTimeOrigin",timeOrigin:performance.timeOrigin})};Nc=function(e){function f({data:g}){var k=g.G;if(k)switch(k){case "syncTimeOrigin":c=performance.timeOrigin-g.timeOrigin;break;case "renderPictures":bd(g.U,g.wa,g.va,g.O,performance.now()+c);break;case "onRenderComplete":cd(g.U,g.O,{imageBitmaps:g.oa,
|
||||
rasterStartMilliseconds:g.ya,rasterEndMilliseconds:g.xa});break;case "setAssociatedObject":b.set(g.T,g.object);break;case "disposeAssociatedObject":g=g.T;k=b.get(g);k.close&&k.close();b.delete(g);break;default:console.warn(`unrecognized skwasm message: ${k}`)}}e?I.g[e].addEventListener("message",f):addEventListener("message",f)};Jc=function(e,f,g,k,n){I.g[e].postMessage({G:"renderPictures",U:f,wa:g,va:k,O:n})};Ic=function(e,f){e=new OffscreenCanvas(e,f);f=Wb(e);a.set(f,e);return f};Oc=function(e,
|
||||
f,g){e=a.get(e);e.width=f;e.height=g};Gc=function(e,f,g,k){k||(k=[]);e=a.get(e);k.push(createImageBitmap(e,0,0,f,g));return k};Pc=async function(e,f,g,k){f=f?await Promise.all(f):[];postMessage({G:"onRenderComplete",U:e,O:k,oa:f,ya:g,xa:performance.now()+c},[...f])};Hc=function(e,f,g){const k=T.s,n=k.createTexture();k.bindTexture(k.TEXTURE_2D,n);k.pixelStorei(k.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);k.texImage2D(k.TEXTURE_2D,0,k.RGBA,f,g,0,k.RGBA,k.UNSIGNED_BYTE,e);k.pixelStorei(k.UNPACK_PREMULTIPLY_ALPHA_WEBGL,
|
||||
!1);k.bindTexture(k.TEXTURE_2D,null);e=Vb(P);P[e]=n;return e};Lc=function(e,f){I.g[e].postMessage({G:"disposeAssociatedObject",T:f})}})();
|
||||
var dd=[null,ab,bb,nb,qb,rb,sb,tb,ac,bc,cc,oc,pc,qc,rc,sc,tc,vc],qd={__cxa_throw:function(a,b,c){(new kb(a)).R(b,c);lb=a;mb++;throw lb;},__emscripten_init_main_thread_js:function(a){ed(a,!pa,1,!oa,65536,!1);I.ga()},__emscripten_thread_cleanup:function(a){A?postMessage({cmd:"cleanupThread",thread:a}):Xa(a)},__pthread_create_js:ob,__syscall_fcntl64:qb,__syscall_fstat64:rb,__syscall_ioctl:sb,__syscall_openat:tb,_emscripten_get_now_is_monotonic:()=>!0,_emscripten_notify_mailbox_postmessage:function(a,
|
||||
b){a==b?setTimeout(()=>gb()):A?postMessage({targetThread:a,cmd:"checkMailbox"}):(a=I.g[a])&&a.postMessage({cmd:"checkMailbox"})},_emscripten_set_offscreencanvas_size:function(a,b,c){return Zb(a)?$b(a,b,c):ac(a,b,c)},_emscripten_thread_mailbox_await:vb,_emscripten_thread_set_strongref:function(a){x&&I.g[a].ref()},_emscripten_throw_longjmp:()=>{throw Infinity;},_mmap_js:bc,_munmap_js:cc,abort:()=>{za("")},emscripten_check_blocking_allowed:function(){},emscripten_exit_with_live_runtime:()=>{Ja+=1;throw"unwind";
|
||||
},emscripten_get_now:()=>performance.timeOrigin+performance.now(),emscripten_glBindFramebuffer:dc,emscripten_glClear:ec,emscripten_glClearColor:fc,emscripten_glClearStencil:gc,emscripten_glGetIntegerv:ic,emscripten_receive_on_main_thread_js:function(a,b,c,e){I.La=b;kc.length=c;b=e>>3;for(e=0;e<c;e++)kc[e]=ha()[b+e];return dd[a].apply(null,kc)},emscripten_resize_heap:a=>{var b=p().length;a>>>=0;if(a<=b||2147483648<a)return!1;for(var c=1;4>=c;c*=2){var e=b*(1+.2/c);e=Math.min(e,a+100663296);var f=Math;
|
||||
e=Math.max(a,e);a:{f=f.min.call(f,2147483648,e+(65536-e%65536)%65536)-d.buffer.byteLength+65535>>>16;try{d.grow(f);l();var g=1;break a}catch(k){}g=void 0}if(g)return!0}return!1},emscripten_webgl_enable_extension:function(a,b){a=Pb[a];b=J(b);b.startsWith("GL_")&&(b=b.substr(3));"ANGLE_instanced_arrays"==b&&Eb(U);"OES_vertex_array_object"==b&&Fb(U);"WEBGL_draw_buffers"==b&&Gb(U);"WEBGL_draw_instanced_base_vertex_base_instance"==b&&Hb(U);"WEBGL_multi_draw_instanced_base_vertex_base_instance"==b&&Ib(U);
|
||||
"WEBGL_multi_draw"==b&&Jb(U);return!!a.s.getExtension(b)},emscripten_webgl_get_current_context:function(){return T?T.handle:0},emscripten_webgl_make_context_current:function(a){T=Pb[a];w.Ka=U=T&&T.s;return!a||U?0:-5},environ_get:oc,environ_sizes_get:pc,exit:cb,fd_close:qc,fd_pread:rc,fd_read:sc,fd_seek:tc,fd_write:vc,glActiveTexture:function(a){U.activeTexture(a)},glAttachShader:function(a,b){U.attachShader(O[a],Q[b])},glBindAttribLocation:function(a,b,c){U.bindAttribLocation(O[a],b,J(c))},glBindBuffer:function(a,
|
||||
b){35051==a?U.P=b:35052==a&&(U.B=b);U.bindBuffer(a,Lb[b])},glBindFramebuffer:dc,glBindRenderbuffer:function(a,b){U.bindRenderbuffer(a,Nb[b])},glBindSampler:function(a,b){U.bindSampler(a,R[b])},glBindTexture:function(a,b){U.bindTexture(a,P[b])},glBindVertexArray:wc,glBindVertexArrayOES:wc,glBlendColor:function(a,b,c,e){U.blendColor(a,b,c,e)},glBlendEquation:function(a){U.blendEquation(a)},glBlendFunc:function(a,b){U.blendFunc(a,b)},glBlitFramebuffer:function(a,b,c,e,f,g,k,n,r,u){U.blitFramebuffer(a,
|
||||
b,c,e,f,g,k,n,r,u)},glBufferData:function(a,b,c,e){2<=T.version?c&&b?U.bufferData(a,p(),e,c,b):U.bufferData(a,b,e):U.bufferData(a,c?p().subarray(c,c+b):b,e)},glBufferSubData:function(a,b,c,e){2<=T.version?c&&U.bufferSubData(a,b,p(),e,c):U.bufferSubData(a,b,p().subarray(e,e+c))},glCheckFramebufferStatus:function(a){return U.checkFramebufferStatus(a)},glClear:ec,glClearColor:fc,glClearStencil:gc,glClientWaitSync:function(a,b,c,e){return U.clientWaitSync(Qb[a],b,(c>>>0)+4294967296*e)},glColorMask:function(a,
|
||||
b,c,e){U.colorMask(!!a,!!b,!!c,!!e)},glCompileShader:function(a){U.compileShader(Q[a])},glCompressedTexImage2D:function(a,b,c,e,f,g,k,n){2<=T.version?U.B||!k?U.compressedTexImage2D(a,b,c,e,f,g,k,n):U.compressedTexImage2D(a,b,c,e,f,g,p(),n,k):U.compressedTexImage2D(a,b,c,e,f,g,n?p().subarray(n,n+k):null)},glCompressedTexSubImage2D:function(a,b,c,e,f,g,k,n,r){2<=T.version?U.B||!n?U.compressedTexSubImage2D(a,b,c,e,f,g,k,n,r):U.compressedTexSubImage2D(a,b,c,e,f,g,k,p(),r,n):U.compressedTexSubImage2D(a,
|
||||
b,c,e,f,g,k,r?p().subarray(r,r+n):null)},glCopyBufferSubData:function(a,b,c,e,f){U.copyBufferSubData(a,b,c,e,f)},glCopyTexSubImage2D:function(a,b,c,e,f,g,k,n){U.copyTexSubImage2D(a,b,c,e,f,g,k,n)},glCreateProgram:function(){var a=Vb(O),b=U.createProgram();b.name=a;b.L=b.J=b.K=0;b.W=1;O[a]=b;return a},glCreateShader:function(a){var b=Vb(Q);Q[b]=U.createShader(a);return b},glCullFace:function(a){U.cullFace(a)},glDeleteBuffers:function(a,b){for(var c=0;c<a;c++){var e=q()[b+4*c>>2],f=Lb[e];f&&(U.deleteBuffer(f),
|
||||
f.name=0,Lb[e]=null,e==U.P&&(U.P=0),e==U.B&&(U.B=0))}},glDeleteFramebuffers:function(a,b){for(var c=0;c<a;++c){var e=q()[b+4*c>>2],f=Mb[e];f&&(U.deleteFramebuffer(f),f.name=0,Mb[e]=null)}},glDeleteProgram:function(a){if(a){var b=O[a];b?(U.deleteProgram(b),b.name=0,O[a]=null):S(1281)}},glDeleteRenderbuffers:function(a,b){for(var c=0;c<a;c++){var e=q()[b+4*c>>2],f=Nb[e];f&&(U.deleteRenderbuffer(f),f.name=0,Nb[e]=null)}},glDeleteSamplers:function(a,b){for(var c=0;c<a;c++){var e=q()[b+4*c>>2],f=R[e];
|
||||
f&&(U.deleteSampler(f),f.name=0,R[e]=null)}},glDeleteShader:function(a){if(a){var b=Q[a];b?(U.deleteShader(b),Q[a]=null):S(1281)}},glDeleteSync:function(a){if(a){var b=Qb[a];b?(U.deleteSync(b),b.name=0,Qb[a]=null):S(1281)}},glDeleteTextures:function(a,b){for(var c=0;c<a;c++){var e=q()[b+4*c>>2],f=P[e];f&&(U.deleteTexture(f),f.name=0,P[e]=null)}},glDeleteVertexArrays:xc,glDeleteVertexArraysOES:xc,glDepthMask:function(a){U.depthMask(!!a)},glDisable:function(a){U.disable(a)},glDisableVertexAttribArray:function(a){U.disableVertexAttribArray(a)},
|
||||
glDrawArrays:function(a,b,c){U.drawArrays(a,b,c)},glDrawArraysInstanced:function(a,b,c,e){U.drawArraysInstanced(a,b,c,e)},glDrawArraysInstancedBaseInstanceWEBGL:function(a,b,c,e,f){U.Z.drawArraysInstancedBaseInstanceWEBGL(a,b,c,e,f)},glDrawBuffers:function(a,b){for(var c=yc[a],e=0;e<a;e++)c[e]=q()[b+4*e>>2];U.drawBuffers(c)},glDrawElements:zc,glDrawElementsInstanced:function(a,b,c,e,f){U.drawElementsInstanced(a,b,c,e,f)},glDrawElementsInstancedBaseVertexBaseInstanceWEBGL:function(a,b,c,e,f,g,k){U.Z.drawElementsInstancedBaseVertexBaseInstanceWEBGL(a,
|
||||
b,c,e,f,g,k)},glDrawRangeElements:function(a,b,c,e,f,g){zc(a,e,f,g)},glEnable:function(a){U.enable(a)},glEnableVertexAttribArray:function(a){U.enableVertexAttribArray(a)},glFenceSync:function(a,b){return(a=U.fenceSync(a,b))?(b=Vb(Qb),a.name=b,Qb[b]=a,b):0},glFinish:function(){U.finish()},glFlush:function(){U.flush()},glFramebufferRenderbuffer:function(a,b,c,e){U.framebufferRenderbuffer(a,b,c,Nb[e])},glFramebufferTexture2D:function(a,b,c,e,f){U.framebufferTexture2D(a,b,c,P[e],f)},glFrontFace:function(a){U.frontFace(a)},
|
||||
glGenBuffers:function(a,b){Ac(a,b,"createBuffer",Lb)},glGenFramebuffers:function(a,b){Ac(a,b,"createFramebuffer",Mb)},glGenRenderbuffers:function(a,b){Ac(a,b,"createRenderbuffer",Nb)},glGenSamplers:function(a,b){Ac(a,b,"createSampler",R)},glGenTextures:function(a,b){Ac(a,b,"createTexture",P)},glGenVertexArrays:Bc,glGenVertexArraysOES:Bc,glGenerateMipmap:function(a){U.generateMipmap(a)},glGetBufferParameteriv:function(a,b,c){c?q()[c>>2]=U.getBufferParameter(a,b):S(1281)},glGetError:function(){var a=
|
||||
U.getError()||Ub;Ub=0;return a},glGetFloatv:function(a,b){hc(a,b,2)},glGetFramebufferAttachmentParameteriv:function(a,b,c,e){a=U.getFramebufferAttachmentParameter(a,b,c);if(a instanceof WebGLRenderbuffer||a instanceof WebGLTexture)a=a.name|0;q()[e>>2]=a},glGetIntegerv:ic,glGetProgramInfoLog:function(a,b,c,e){a=U.getProgramInfoLog(O[a]);null===a&&(a="(unknown error)");var f;0<b&&e?f=zb(a,p(),e,b):f=0;b=f;c&&(q()[c>>2]=b)},glGetProgramiv:function(a,b,c){if(c)if(a>=Kb)S(1281);else if(a=O[a],35716==b)a=
|
||||
U.getProgramInfoLog(a),null===a&&(a="(unknown error)"),q()[c>>2]=a.length+1;else if(35719==b){if(!a.L)for(b=0;b<U.getProgramParameter(a,35718);++b)a.L=Math.max(a.L,U.getActiveUniform(a,b).name.length+1);q()[c>>2]=a.L}else if(35722==b){if(!a.J)for(b=0;b<U.getProgramParameter(a,35721);++b)a.J=Math.max(a.J,U.getActiveAttrib(a,b).name.length+1);q()[c>>2]=a.J}else if(35381==b){if(!a.K)for(b=0;b<U.getProgramParameter(a,35382);++b)a.K=Math.max(a.K,U.getActiveUniformBlockName(a,b).length+1);q()[c>>2]=a.K}else q()[c>>
|
||||
2]=U.getProgramParameter(a,b);else S(1281)},glGetRenderbufferParameteriv:function(a,b,c){c?q()[c>>2]=U.getRenderbufferParameter(a,b):S(1281)},glGetShaderInfoLog:function(a,b,c,e){a=U.getShaderInfoLog(Q[a]);null===a&&(a="(unknown error)");var f;0<b&&e?f=zb(a,p(),e,b):f=0;b=f;c&&(q()[c>>2]=b)},glGetShaderPrecisionFormat:function(a,b,c,e){a=U.getShaderPrecisionFormat(a,b);q()[c>>2]=a.rangeMin;q()[c+4>>2]=a.rangeMax;q()[e>>2]=a.precision},glGetShaderiv:function(a,b,c){c?35716==b?(a=U.getShaderInfoLog(Q[a]),
|
||||
null===a&&(a="(unknown error)"),a=a?a.length+1:0,q()[c>>2]=a):35720==b?(a=(a=U.getShaderSource(Q[a]))?a.length+1:0,q()[c>>2]=a):q()[c>>2]=U.getShaderParameter(Q[a],b):S(1281)},glGetString:function(a){var b=Rb[a];if(!b){switch(a){case 7939:b=U.getSupportedExtensions()||[];b=b.concat(b.map(function(e){return"GL_"+e}));b=Ab(b.join(" "));break;case 7936:case 7937:case 37445:case 37446:(b=U.getParameter(a))||S(1280);b=b&&Ab(b);break;case 7938:b=U.getParameter(7938);b=2<=T.version?"OpenGL ES 3.0 ("+b+")":
|
||||
"OpenGL ES 2.0 ("+b+")";b=Ab(b);break;case 35724:b=U.getParameter(35724);var c=b.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==c&&(3==c[1].length&&(c[1]+="0"),b="OpenGL ES GLSL ES "+c[1]+" ("+b+")");b=Ab(b);break;default:S(1280)}Rb[a]=b}return b},glGetStringi:function(a,b){if(2>T.version)return S(1282),0;var c=Sb[a];if(c)return 0>b||b>=c.length?(S(1281),0):c[b];switch(a){case 7939:return c=U.getSupportedExtensions()||[],c=c.concat(c.map(function(e){return"GL_"+e})),c=c.map(function(e){return Ab(e)}),
|
||||
c=Sb[a]=c,0>b||b>=c.length?(S(1281),0):c[b];default:return S(1280),0}},glGetUniformLocation:function(a,b){b=J(b);if(a=O[a]){var c=a,e=c.H,f=c.ja,g;if(!e)for(c.H=e={},c.ia={},g=0;g<U.getProgramParameter(c,35718);++g){var k=U.getActiveUniform(c,g);var n=k.name;k=k.size;var r=Cc(n);r=0<r?n.slice(0,r):n;var u=c.W;c.W+=k;f[r]=[k,u];for(n=0;n<k;++n)e[u]=n,c.ia[u++]=r}c=a.H;e=0;f=b;g=Cc(b);0<g&&(e=parseInt(b.slice(g+1))>>>0,f=b.slice(0,g));if((f=a.ja[f])&&e<f[0]&&(e+=f[1],c[e]=c[e]||U.getUniformLocation(a,
|
||||
b)))return e}else S(1281);return-1},glInvalidateFramebuffer:function(a,b,c){for(var e=yc[b],f=0;f<b;f++)e[f]=q()[c+4*f>>2];U.invalidateFramebuffer(a,e)},glInvalidateSubFramebuffer:function(a,b,c,e,f,g,k){for(var n=yc[b],r=0;r<b;r++)n[r]=q()[c+4*r>>2];U.invalidateSubFramebuffer(a,n,e,f,g,k)},glIsSync:function(a){return U.isSync(Qb[a])},glIsTexture:function(a){return(a=P[a])?U.isTexture(a):0},glLineWidth:function(a){U.lineWidth(a)},glLinkProgram:function(a){a=O[a];U.linkProgram(a);a.H=0;a.ja={}},glMultiDrawArraysInstancedBaseInstanceWEBGL:function(a,
|
||||
b,c,e,f,g){U.ea.multiDrawArraysInstancedBaseInstanceWEBGL(a,q(),b>>2,q(),c>>2,q(),e>>2,t(),f>>2,g)},glMultiDrawElementsInstancedBaseVertexBaseInstanceWEBGL:function(a,b,c,e,f,g,k,n){U.ea.multiDrawElementsInstancedBaseVertexBaseInstanceWEBGL(a,q(),b>>2,c,q(),e>>2,q(),f>>2,q(),g>>2,t(),k>>2,n)},glPixelStorei:function(a,b){3317==a&&(Tb=b);U.pixelStorei(a,b)},glReadBuffer:function(a){U.readBuffer(a)},glReadPixels:function(a,b,c,e,f,g,k){if(2<=T.version)if(U.P)U.readPixels(a,b,c,e,f,g,k);else{var n=Dc(g);
|
||||
U.readPixels(a,b,c,e,f,g,n,k>>31-Math.clz32(n.BYTES_PER_ELEMENT))}else(k=Ec(g,f,c,e,k))?U.readPixels(a,b,c,e,f,g,k):S(1280)},glRenderbufferStorage:function(a,b,c,e){U.renderbufferStorage(a,b,c,e)},glRenderbufferStorageMultisample:function(a,b,c,e,f){U.renderbufferStorageMultisample(a,b,c,e,f)},glSamplerParameterf:function(a,b,c){U.samplerParameterf(R[a],b,c)},glSamplerParameteri:function(a,b,c){U.samplerParameteri(R[a],b,c)},glSamplerParameteriv:function(a,b,c){c=q()[c>>2];U.samplerParameteri(R[a],
|
||||
b,c)},glScissor:function(a,b,c,e){U.scissor(a,b,c,e)},glShaderSource:function(a,b,c,e){for(var f="",g=0;g<b;++g){var k=e?q()[e+4*g>>2]:-1;f+=J(q()[c+4*g>>2],0>k?void 0:k)}U.shaderSource(Q[a],f)},glStencilFunc:function(a,b,c){U.stencilFunc(a,b,c)},glStencilFuncSeparate:function(a,b,c,e){U.stencilFuncSeparate(a,b,c,e)},glStencilMask:function(a){U.stencilMask(a)},glStencilMaskSeparate:function(a,b){U.stencilMaskSeparate(a,b)},glStencilOp:function(a,b,c){U.stencilOp(a,b,c)},glStencilOpSeparate:function(a,
|
||||
b,c,e){U.stencilOpSeparate(a,b,c,e)},glTexImage2D:function(a,b,c,e,f,g,k,n,r){if(2<=T.version)if(U.B)U.texImage2D(a,b,c,e,f,g,k,n,r);else if(r){var u=Dc(n);U.texImage2D(a,b,c,e,f,g,k,n,u,r>>31-Math.clz32(u.BYTES_PER_ELEMENT))}else U.texImage2D(a,b,c,e,f,g,k,n,null);else U.texImage2D(a,b,c,e,f,g,k,n,r?Ec(n,k,e,f,r):null)},glTexParameterf:function(a,b,c){U.texParameterf(a,b,c)},glTexParameterfv:function(a,b,c){c=v()[c>>2];U.texParameterf(a,b,c)},glTexParameteri:function(a,b,c){U.texParameteri(a,b,c)},
|
||||
glTexParameteriv:function(a,b,c){c=q()[c>>2];U.texParameteri(a,b,c)},glTexStorage2D:function(a,b,c,e,f){U.texStorage2D(a,b,c,e,f)},glTexSubImage2D:function(a,b,c,e,f,g,k,n,r){if(2<=T.version)if(U.B)U.texSubImage2D(a,b,c,e,f,g,k,n,r);else if(r){var u=Dc(n);U.texSubImage2D(a,b,c,e,f,g,k,n,u,r>>31-Math.clz32(u.BYTES_PER_ELEMENT))}else U.texSubImage2D(a,b,c,e,f,g,k,n,null);else u=null,r&&(u=Ec(n,k,f,g,r)),U.texSubImage2D(a,b,c,e,f,g,k,n,u)},glUniform1f:function(a,b){U.uniform1f(W(a),b)},glUniform1fv:function(a,
|
||||
b,c){if(2<=T.version)b&&U.uniform1fv(W(a),v(),c>>2,b);else{if(288>=b)for(var e=X[b-1],f=0;f<b;++f)e[f]=v()[c+4*f>>2];else e=v().subarray(c>>2,c+4*b>>2);U.uniform1fv(W(a),e)}},glUniform1i:function(a,b){U.uniform1i(W(a),b)},glUniform1iv:function(a,b,c){if(2<=T.version)b&&U.uniform1iv(W(a),q(),c>>2,b);else{if(288>=b)for(var e=Fc[b-1],f=0;f<b;++f)e[f]=q()[c+4*f>>2];else e=q().subarray(c>>2,c+4*b>>2);U.uniform1iv(W(a),e)}},glUniform2f:function(a,b,c){U.uniform2f(W(a),b,c)},glUniform2fv:function(a,b,c){if(2<=
|
||||
T.version)b&&U.uniform2fv(W(a),v(),c>>2,2*b);else{if(144>=b)for(var e=X[2*b-1],f=0;f<2*b;f+=2)e[f]=v()[c+4*f>>2],e[f+1]=v()[c+(4*f+4)>>2];else e=v().subarray(c>>2,c+8*b>>2);U.uniform2fv(W(a),e)}},glUniform2i:function(a,b,c){U.uniform2i(W(a),b,c)},glUniform2iv:function(a,b,c){if(2<=T.version)b&&U.uniform2iv(W(a),q(),c>>2,2*b);else{if(144>=b)for(var e=Fc[2*b-1],f=0;f<2*b;f+=2)e[f]=q()[c+4*f>>2],e[f+1]=q()[c+(4*f+4)>>2];else e=q().subarray(c>>2,c+8*b>>2);U.uniform2iv(W(a),e)}},glUniform3f:function(a,
|
||||
b,c,e){U.uniform3f(W(a),b,c,e)},glUniform3fv:function(a,b,c){if(2<=T.version)b&&U.uniform3fv(W(a),v(),c>>2,3*b);else{if(96>=b)for(var e=X[3*b-1],f=0;f<3*b;f+=3)e[f]=v()[c+4*f>>2],e[f+1]=v()[c+(4*f+4)>>2],e[f+2]=v()[c+(4*f+8)>>2];else e=v().subarray(c>>2,c+12*b>>2);U.uniform3fv(W(a),e)}},glUniform3i:function(a,b,c,e){U.uniform3i(W(a),b,c,e)},glUniform3iv:function(a,b,c){if(2<=T.version)b&&U.uniform3iv(W(a),q(),c>>2,3*b);else{if(96>=b)for(var e=Fc[3*b-1],f=0;f<3*b;f+=3)e[f]=q()[c+4*f>>2],e[f+1]=q()[c+
|
||||
(4*f+4)>>2],e[f+2]=q()[c+(4*f+8)>>2];else e=q().subarray(c>>2,c+12*b>>2);U.uniform3iv(W(a),e)}},glUniform4f:function(a,b,c,e,f){U.uniform4f(W(a),b,c,e,f)},glUniform4fv:function(a,b,c){if(2<=T.version)b&&U.uniform4fv(W(a),v(),c>>2,4*b);else{if(72>=b){var e=X[4*b-1],f=v();c>>=2;for(var g=0;g<4*b;g+=4){var k=c+g;e[g]=f[k];e[g+1]=f[k+1];e[g+2]=f[k+2];e[g+3]=f[k+3]}}else e=v().subarray(c>>2,c+16*b>>2);U.uniform4fv(W(a),e)}},glUniform4i:function(a,b,c,e,f){U.uniform4i(W(a),b,c,e,f)},glUniform4iv:function(a,
|
||||
b,c){if(2<=T.version)b&&U.uniform4iv(W(a),q(),c>>2,4*b);else{if(72>=b)for(var e=Fc[4*b-1],f=0;f<4*b;f+=4)e[f]=q()[c+4*f>>2],e[f+1]=q()[c+(4*f+4)>>2],e[f+2]=q()[c+(4*f+8)>>2],e[f+3]=q()[c+(4*f+12)>>2];else e=q().subarray(c>>2,c+16*b>>2);U.uniform4iv(W(a),e)}},glUniformMatrix2fv:function(a,b,c,e){if(2<=T.version)b&&U.uniformMatrix2fv(W(a),!!c,v(),e>>2,4*b);else{if(72>=b)for(var f=X[4*b-1],g=0;g<4*b;g+=4)f[g]=v()[e+4*g>>2],f[g+1]=v()[e+(4*g+4)>>2],f[g+2]=v()[e+(4*g+8)>>2],f[g+3]=v()[e+(4*g+12)>>2];else f=
|
||||
v().subarray(e>>2,e+16*b>>2);U.uniformMatrix2fv(W(a),!!c,f)}},glUniformMatrix3fv:function(a,b,c,e){if(2<=T.version)b&&U.uniformMatrix3fv(W(a),!!c,v(),e>>2,9*b);else{if(32>=b)for(var f=X[9*b-1],g=0;g<9*b;g+=9)f[g]=v()[e+4*g>>2],f[g+1]=v()[e+(4*g+4)>>2],f[g+2]=v()[e+(4*g+8)>>2],f[g+3]=v()[e+(4*g+12)>>2],f[g+4]=v()[e+(4*g+16)>>2],f[g+5]=v()[e+(4*g+20)>>2],f[g+6]=v()[e+(4*g+24)>>2],f[g+7]=v()[e+(4*g+28)>>2],f[g+8]=v()[e+(4*g+32)>>2];else f=v().subarray(e>>2,e+36*b>>2);U.uniformMatrix3fv(W(a),!!c,f)}},
|
||||
glUniformMatrix4fv:function(a,b,c,e){if(2<=T.version)b&&U.uniformMatrix4fv(W(a),!!c,v(),e>>2,16*b);else{if(18>=b){var f=X[16*b-1],g=v();e>>=2;for(var k=0;k<16*b;k+=16){var n=e+k;f[k]=g[n];f[k+1]=g[n+1];f[k+2]=g[n+2];f[k+3]=g[n+3];f[k+4]=g[n+4];f[k+5]=g[n+5];f[k+6]=g[n+6];f[k+7]=g[n+7];f[k+8]=g[n+8];f[k+9]=g[n+9];f[k+10]=g[n+10];f[k+11]=g[n+11];f[k+12]=g[n+12];f[k+13]=g[n+13];f[k+14]=g[n+14];f[k+15]=g[n+15]}}else f=v().subarray(e>>2,e+64*b>>2);U.uniformMatrix4fv(W(a),!!c,f)}},glUseProgram:function(a){a=
|
||||
O[a];U.useProgram(a);U.la=a},glVertexAttrib1f:function(a,b){U.vertexAttrib1f(a,b)},glVertexAttrib2fv:function(a,b){U.vertexAttrib2f(a,v()[b>>2],v()[b+4>>2])},glVertexAttrib3fv:function(a,b){U.vertexAttrib3f(a,v()[b>>2],v()[b+4>>2],v()[b+8>>2])},glVertexAttrib4fv:function(a,b){U.vertexAttrib4f(a,v()[b>>2],v()[b+4>>2],v()[b+8>>2],v()[b+12>>2])},glVertexAttribDivisor:function(a,b){U.vertexAttribDivisor(a,b)},glVertexAttribIPointer:function(a,b,c,e,f){U.vertexAttribIPointer(a,b,c,e,f)},glVertexAttribPointer:function(a,
|
||||
b,c,e,f,g){U.vertexAttribPointer(a,b,c,!!e,f,g)},glViewport:function(a,b,c,e){U.viewport(a,b,c,e)},glWaitSync:function(a,b,c,e){U.waitSync(Qb[a],b,(c>>>0)+4294967296*e)},invoke_ii:fd,invoke_iii:gd,invoke_iiii:hd,invoke_iiiii:jd,invoke_iiiiiii:kd,invoke_vi:ld,invoke_vii:md,invoke_viii:nd,invoke_viiii:od,invoke_viiiiiii:pd,memory:d||w.wasmMemory,skwasm_captureImageBitmap:Gc,skwasm_createGlTextureFromTextureSource:Hc,skwasm_createOffscreenCanvas:Ic,skwasm_dispatchRenderPictures:Jc,skwasm_disposeAssociatedObjectOnThread:Lc,
|
||||
skwasm_getAssociatedObject:Mc,skwasm_registerMessageListener:Nc,skwasm_resizeCanvas:Oc,skwasm_resolveAndPostImages:Pc,skwasm_setAssociatedObjectOnThread:Qc,skwasm_syncTimeOriginForThread:Rc,strftime_l:(a,b,c,e)=>Xc(a,b,c,e)};
|
||||
(function(){function a(c,e){F=c=c.exports;w.wasmExports=F;I.ha.push(F._emscripten_tls_init);G=F.__indirect_function_table;Ha.unshift(F.__wasm_call_ctors);Aa=e;Oa();return c}var b={env:qd,wasi_snapshot_preview1:qd};Na();if(w.instantiateWasm)try{return w.instantiateWasm(b,a)}catch(c){D("Module.instantiateWasm callback failed with error: "+c),ka(c)}Ua(b,function(c){a(c.instance,c.module)}).catch(ka);return{}})();w._canvas_saveLayer=(a,b,c,e)=>(w._canvas_saveLayer=F.canvas_saveLayer)(a,b,c,e);
|
||||
w._canvas_save=a=>(w._canvas_save=F.canvas_save)(a);w._canvas_restore=a=>(w._canvas_restore=F.canvas_restore)(a);w._canvas_restoreToCount=(a,b)=>(w._canvas_restoreToCount=F.canvas_restoreToCount)(a,b);w._canvas_getSaveCount=a=>(w._canvas_getSaveCount=F.canvas_getSaveCount)(a);w._canvas_translate=(a,b,c)=>(w._canvas_translate=F.canvas_translate)(a,b,c);w._canvas_scale=(a,b,c)=>(w._canvas_scale=F.canvas_scale)(a,b,c);w._canvas_rotate=(a,b)=>(w._canvas_rotate=F.canvas_rotate)(a,b);
|
||||
w._canvas_skew=(a,b,c)=>(w._canvas_skew=F.canvas_skew)(a,b,c);w._canvas_transform=(a,b)=>(w._canvas_transform=F.canvas_transform)(a,b);w._canvas_clipRect=(a,b,c,e)=>(w._canvas_clipRect=F.canvas_clipRect)(a,b,c,e);w._canvas_clipRRect=(a,b,c)=>(w._canvas_clipRRect=F.canvas_clipRRect)(a,b,c);w._canvas_clipPath=(a,b,c)=>(w._canvas_clipPath=F.canvas_clipPath)(a,b,c);w._canvas_drawColor=(a,b,c)=>(w._canvas_drawColor=F.canvas_drawColor)(a,b,c);
|
||||
w._canvas_drawLine=(a,b,c,e,f,g)=>(w._canvas_drawLine=F.canvas_drawLine)(a,b,c,e,f,g);w._canvas_drawPaint=(a,b)=>(w._canvas_drawPaint=F.canvas_drawPaint)(a,b);w._canvas_drawRect=(a,b,c)=>(w._canvas_drawRect=F.canvas_drawRect)(a,b,c);w._canvas_drawRRect=(a,b,c)=>(w._canvas_drawRRect=F.canvas_drawRRect)(a,b,c);w._canvas_drawDRRect=(a,b,c,e)=>(w._canvas_drawDRRect=F.canvas_drawDRRect)(a,b,c,e);w._canvas_drawOval=(a,b,c)=>(w._canvas_drawOval=F.canvas_drawOval)(a,b,c);
|
||||
w._canvas_drawCircle=(a,b,c,e,f)=>(w._canvas_drawCircle=F.canvas_drawCircle)(a,b,c,e,f);w._canvas_drawArc=(a,b,c,e,f,g)=>(w._canvas_drawArc=F.canvas_drawArc)(a,b,c,e,f,g);w._canvas_drawPath=(a,b,c)=>(w._canvas_drawPath=F.canvas_drawPath)(a,b,c);w._canvas_drawShadow=(a,b,c,e,f,g)=>(w._canvas_drawShadow=F.canvas_drawShadow)(a,b,c,e,f,g);w._canvas_drawParagraph=(a,b,c,e)=>(w._canvas_drawParagraph=F.canvas_drawParagraph)(a,b,c,e);
|
||||
w._canvas_drawPicture=(a,b)=>(w._canvas_drawPicture=F.canvas_drawPicture)(a,b);w._canvas_drawImage=(a,b,c,e,f,g)=>(w._canvas_drawImage=F.canvas_drawImage)(a,b,c,e,f,g);w._canvas_drawImageRect=(a,b,c,e,f,g)=>(w._canvas_drawImageRect=F.canvas_drawImageRect)(a,b,c,e,f,g);w._canvas_drawImageNine=(a,b,c,e,f,g)=>(w._canvas_drawImageNine=F.canvas_drawImageNine)(a,b,c,e,f,g);w._canvas_drawVertices=(a,b,c,e)=>(w._canvas_drawVertices=F.canvas_drawVertices)(a,b,c,e);
|
||||
w._canvas_drawPoints=(a,b,c,e,f)=>(w._canvas_drawPoints=F.canvas_drawPoints)(a,b,c,e,f);w._canvas_drawAtlas=(a,b,c,e,f,g,k,n,r)=>(w._canvas_drawAtlas=F.canvas_drawAtlas)(a,b,c,e,f,g,k,n,r);w._canvas_getTransform=(a,b)=>(w._canvas_getTransform=F.canvas_getTransform)(a,b);w._canvas_getLocalClipBounds=(a,b)=>(w._canvas_getLocalClipBounds=F.canvas_getLocalClipBounds)(a,b);w._canvas_getDeviceClipBounds=(a,b)=>(w._canvas_getDeviceClipBounds=F.canvas_getDeviceClipBounds)(a,b);
|
||||
w._contourMeasureIter_create=(a,b,c)=>(w._contourMeasureIter_create=F.contourMeasureIter_create)(a,b,c);w._contourMeasureIter_next=a=>(w._contourMeasureIter_next=F.contourMeasureIter_next)(a);w._contourMeasureIter_dispose=a=>(w._contourMeasureIter_dispose=F.contourMeasureIter_dispose)(a);w._contourMeasure_dispose=a=>(w._contourMeasure_dispose=F.contourMeasure_dispose)(a);w._contourMeasure_length=a=>(w._contourMeasure_length=F.contourMeasure_length)(a);
|
||||
w._contourMeasure_isClosed=a=>(w._contourMeasure_isClosed=F.contourMeasure_isClosed)(a);w._contourMeasure_getPosTan=(a,b,c,e)=>(w._contourMeasure_getPosTan=F.contourMeasure_getPosTan)(a,b,c,e);w._contourMeasure_getSegment=(a,b,c,e)=>(w._contourMeasure_getSegment=F.contourMeasure_getSegment)(a,b,c,e);w._skData_create=a=>(w._skData_create=F.skData_create)(a);w._skData_getPointer=a=>(w._skData_getPointer=F.skData_getPointer)(a);w._skData_getConstPointer=a=>(w._skData_getConstPointer=F.skData_getConstPointer)(a);
|
||||
w._skData_getSize=a=>(w._skData_getSize=F.skData_getSize)(a);w._skData_dispose=a=>(w._skData_dispose=F.skData_dispose)(a);w._imageFilter_createBlur=(a,b,c)=>(w._imageFilter_createBlur=F.imageFilter_createBlur)(a,b,c);w._imageFilter_createDilate=(a,b)=>(w._imageFilter_createDilate=F.imageFilter_createDilate)(a,b);w._imageFilter_createErode=(a,b)=>(w._imageFilter_createErode=F.imageFilter_createErode)(a,b);
|
||||
w._imageFilter_createMatrix=(a,b)=>(w._imageFilter_createMatrix=F.imageFilter_createMatrix)(a,b);w._imageFilter_createFromColorFilter=a=>(w._imageFilter_createFromColorFilter=F.imageFilter_createFromColorFilter)(a);w._imageFilter_compose=(a,b)=>(w._imageFilter_compose=F.imageFilter_compose)(a,b);w._imageFilter_dispose=a=>(w._imageFilter_dispose=F.imageFilter_dispose)(a);w._imageFilter_getFilterBounds=(a,b)=>(w._imageFilter_getFilterBounds=F.imageFilter_getFilterBounds)(a,b);
|
||||
w._colorFilter_createMode=(a,b)=>(w._colorFilter_createMode=F.colorFilter_createMode)(a,b);w._colorFilter_createMatrix=a=>(w._colorFilter_createMatrix=F.colorFilter_createMatrix)(a);w._colorFilter_createSRGBToLinearGamma=()=>(w._colorFilter_createSRGBToLinearGamma=F.colorFilter_createSRGBToLinearGamma)();w._colorFilter_createLinearToSRGBGamma=()=>(w._colorFilter_createLinearToSRGBGamma=F.colorFilter_createLinearToSRGBGamma)();
|
||||
w._colorFilter_compose=(a,b)=>(w._colorFilter_compose=F.colorFilter_compose)(a,b);w._colorFilter_dispose=a=>(w._colorFilter_dispose=F.colorFilter_dispose)(a);w._maskFilter_createBlur=(a,b)=>(w._maskFilter_createBlur=F.maskFilter_createBlur)(a,b);w._maskFilter_dispose=a=>(w._maskFilter_dispose=F.maskFilter_dispose)(a);w._fontCollection_create=()=>(w._fontCollection_create=F.fontCollection_create)();w._fontCollection_dispose=a=>(w._fontCollection_dispose=F.fontCollection_dispose)(a);
|
||||
w._typeface_create=a=>(w._typeface_create=F.typeface_create)(a);w._typeface_dispose=a=>(w._typeface_dispose=F.typeface_dispose)(a);w._typefaces_filterCoveredCodePoints=(a,b,c,e)=>(w._typefaces_filterCoveredCodePoints=F.typefaces_filterCoveredCodePoints)(a,b,c,e);w._fontCollection_registerTypeface=(a,b,c)=>(w._fontCollection_registerTypeface=F.fontCollection_registerTypeface)(a,b,c);w._fontCollection_clearCaches=a=>(w._fontCollection_clearCaches=F.fontCollection_clearCaches)(a);
|
||||
w._image_createFromPicture=(a,b,c)=>(w._image_createFromPicture=F.image_createFromPicture)(a,b,c);w._image_createFromPixels=(a,b,c,e,f)=>(w._image_createFromPixels=F.image_createFromPixels)(a,b,c,e,f);w._image_createFromTextureSource=(a,b,c,e)=>(w._image_createFromTextureSource=F.image_createFromTextureSource)(a,b,c,e);w._image_ref=a=>(w._image_ref=F.image_ref)(a);w._image_dispose=a=>(w._image_dispose=F.image_dispose)(a);w._image_getWidth=a=>(w._image_getWidth=F.image_getWidth)(a);
|
||||
w._image_getHeight=a=>(w._image_getHeight=F.image_getHeight)(a);w._paint_create=()=>(w._paint_create=F.paint_create)();w._paint_dispose=a=>(w._paint_dispose=F.paint_dispose)(a);w._paint_setBlendMode=(a,b)=>(w._paint_setBlendMode=F.paint_setBlendMode)(a,b);w._paint_setStyle=(a,b)=>(w._paint_setStyle=F.paint_setStyle)(a,b);w._paint_getStyle=a=>(w._paint_getStyle=F.paint_getStyle)(a);w._paint_setStrokeWidth=(a,b)=>(w._paint_setStrokeWidth=F.paint_setStrokeWidth)(a,b);
|
||||
w._paint_getStrokeWidth=a=>(w._paint_getStrokeWidth=F.paint_getStrokeWidth)(a);w._paint_setStrokeCap=(a,b)=>(w._paint_setStrokeCap=F.paint_setStrokeCap)(a,b);w._paint_getStrokeCap=a=>(w._paint_getStrokeCap=F.paint_getStrokeCap)(a);w._paint_setStrokeJoin=(a,b)=>(w._paint_setStrokeJoin=F.paint_setStrokeJoin)(a,b);w._paint_getStrokeJoin=a=>(w._paint_getStrokeJoin=F.paint_getStrokeJoin)(a);w._paint_setAntiAlias=(a,b)=>(w._paint_setAntiAlias=F.paint_setAntiAlias)(a,b);
|
||||
w._paint_getAntiAlias=a=>(w._paint_getAntiAlias=F.paint_getAntiAlias)(a);w._paint_setColorInt=(a,b)=>(w._paint_setColorInt=F.paint_setColorInt)(a,b);w._paint_getColorInt=a=>(w._paint_getColorInt=F.paint_getColorInt)(a);w._paint_setMiterLimit=(a,b)=>(w._paint_setMiterLimit=F.paint_setMiterLimit)(a,b);w._paint_getMiterLImit=a=>(w._paint_getMiterLImit=F.paint_getMiterLImit)(a);w._paint_setShader=(a,b)=>(w._paint_setShader=F.paint_setShader)(a,b);
|
||||
w._paint_setImageFilter=(a,b)=>(w._paint_setImageFilter=F.paint_setImageFilter)(a,b);w._paint_setColorFilter=(a,b)=>(w._paint_setColorFilter=F.paint_setColorFilter)(a,b);w._paint_setMaskFilter=(a,b)=>(w._paint_setMaskFilter=F.paint_setMaskFilter)(a,b);w._path_create=()=>(w._path_create=F.path_create)();w._path_dispose=a=>(w._path_dispose=F.path_dispose)(a);w._path_copy=a=>(w._path_copy=F.path_copy)(a);w._path_setFillType=(a,b)=>(w._path_setFillType=F.path_setFillType)(a,b);
|
||||
w._path_getFillType=a=>(w._path_getFillType=F.path_getFillType)(a);w._path_moveTo=(a,b,c)=>(w._path_moveTo=F.path_moveTo)(a,b,c);w._path_relativeMoveTo=(a,b,c)=>(w._path_relativeMoveTo=F.path_relativeMoveTo)(a,b,c);w._path_lineTo=(a,b,c)=>(w._path_lineTo=F.path_lineTo)(a,b,c);w._path_relativeLineTo=(a,b,c)=>(w._path_relativeLineTo=F.path_relativeLineTo)(a,b,c);w._path_quadraticBezierTo=(a,b,c,e,f)=>(w._path_quadraticBezierTo=F.path_quadraticBezierTo)(a,b,c,e,f);
|
||||
w._path_relativeQuadraticBezierTo=(a,b,c,e,f)=>(w._path_relativeQuadraticBezierTo=F.path_relativeQuadraticBezierTo)(a,b,c,e,f);w._path_cubicTo=(a,b,c,e,f,g,k)=>(w._path_cubicTo=F.path_cubicTo)(a,b,c,e,f,g,k);w._path_relativeCubicTo=(a,b,c,e,f,g,k)=>(w._path_relativeCubicTo=F.path_relativeCubicTo)(a,b,c,e,f,g,k);w._path_conicTo=(a,b,c,e,f,g)=>(w._path_conicTo=F.path_conicTo)(a,b,c,e,f,g);w._path_relativeConicTo=(a,b,c,e,f,g)=>(w._path_relativeConicTo=F.path_relativeConicTo)(a,b,c,e,f,g);
|
||||
w._path_arcToOval=(a,b,c,e,f)=>(w._path_arcToOval=F.path_arcToOval)(a,b,c,e,f);w._path_arcToRotated=(a,b,c,e,f,g,k,n)=>(w._path_arcToRotated=F.path_arcToRotated)(a,b,c,e,f,g,k,n);w._path_relativeArcToRotated=(a,b,c,e,f,g,k,n)=>(w._path_relativeArcToRotated=F.path_relativeArcToRotated)(a,b,c,e,f,g,k,n);w._path_addRect=(a,b)=>(w._path_addRect=F.path_addRect)(a,b);w._path_addOval=(a,b)=>(w._path_addOval=F.path_addOval)(a,b);w._path_addArc=(a,b,c,e)=>(w._path_addArc=F.path_addArc)(a,b,c,e);
|
||||
w._path_addPolygon=(a,b,c,e)=>(w._path_addPolygon=F.path_addPolygon)(a,b,c,e);w._path_addRRect=(a,b)=>(w._path_addRRect=F.path_addRRect)(a,b);w._path_addPath=(a,b,c,e)=>(w._path_addPath=F.path_addPath)(a,b,c,e);w._path_close=a=>(w._path_close=F.path_close)(a);w._path_reset=a=>(w._path_reset=F.path_reset)(a);w._path_contains=(a,b,c)=>(w._path_contains=F.path_contains)(a,b,c);w._path_transform=(a,b)=>(w._path_transform=F.path_transform)(a,b);
|
||||
w._path_getBounds=(a,b)=>(w._path_getBounds=F.path_getBounds)(a,b);w._path_combine=(a,b,c)=>(w._path_combine=F.path_combine)(a,b,c);w._pictureRecorder_create=()=>(w._pictureRecorder_create=F.pictureRecorder_create)();w._pictureRecorder_dispose=a=>(w._pictureRecorder_dispose=F.pictureRecorder_dispose)(a);w._pictureRecorder_beginRecording=(a,b)=>(w._pictureRecorder_beginRecording=F.pictureRecorder_beginRecording)(a,b);w._pictureRecorder_endRecording=a=>(w._pictureRecorder_endRecording=F.pictureRecorder_endRecording)(a);
|
||||
w._picture_getCullRect=(a,b)=>(w._picture_getCullRect=F.picture_getCullRect)(a,b);w._picture_dispose=a=>(w._picture_dispose=F.picture_dispose)(a);w._picture_approximateBytesUsed=a=>(w._picture_approximateBytesUsed=F.picture_approximateBytesUsed)(a);w._shader_createLinearGradient=(a,b,c,e,f,g)=>(w._shader_createLinearGradient=F.shader_createLinearGradient)(a,b,c,e,f,g);w._shader_createRadialGradient=(a,b,c,e,f,g,k,n)=>(w._shader_createRadialGradient=F.shader_createRadialGradient)(a,b,c,e,f,g,k,n);
|
||||
w._shader_createConicalGradient=(a,b,c,e,f,g,k,n)=>(w._shader_createConicalGradient=F.shader_createConicalGradient)(a,b,c,e,f,g,k,n);w._shader_createSweepGradient=(a,b,c,e,f,g,k,n,r)=>(w._shader_createSweepGradient=F.shader_createSweepGradient)(a,b,c,e,f,g,k,n,r);w._shader_dispose=a=>(w._shader_dispose=F.shader_dispose)(a);w._runtimeEffect_create=a=>(w._runtimeEffect_create=F.runtimeEffect_create)(a);w._runtimeEffect_dispose=a=>(w._runtimeEffect_dispose=F.runtimeEffect_dispose)(a);
|
||||
w._runtimeEffect_getUniformSize=a=>(w._runtimeEffect_getUniformSize=F.runtimeEffect_getUniformSize)(a);w._shader_createRuntimeEffectShader=(a,b,c,e)=>(w._shader_createRuntimeEffectShader=F.shader_createRuntimeEffectShader)(a,b,c,e);w._shader_createFromImage=(a,b,c,e,f)=>(w._shader_createFromImage=F.shader_createFromImage)(a,b,c,e,f);w._skString_allocate=a=>(w._skString_allocate=F.skString_allocate)(a);w._skString_getData=a=>(w._skString_getData=F.skString_getData)(a);
|
||||
w._skString_free=a=>(w._skString_free=F.skString_free)(a);w._skString16_allocate=a=>(w._skString16_allocate=F.skString16_allocate)(a);w._skString16_getData=a=>(w._skString16_getData=F.skString16_getData)(a);w._skString16_free=a=>(w._skString16_free=F.skString16_free)(a);var Db=(a,b,c,e,f)=>(Db=F.emscripten_dispatch_to_thread_)(a,b,c,e,f);w._surface_create=()=>(w._surface_create=F.surface_create)();w._surface_getThreadId=a=>(w._surface_getThreadId=F.surface_getThreadId)(a);
|
||||
w._surface_setCallbackHandler=(a,b)=>(w._surface_setCallbackHandler=F.surface_setCallbackHandler)(a,b);w._surface_destroy=a=>(w._surface_destroy=F.surface_destroy)(a);w._surface_renderPictures=(a,b,c)=>(w._surface_renderPictures=F.surface_renderPictures)(a,b,c);var bd=w._surface_renderPicturesOnWorker=(a,b,c,e,f)=>(bd=w._surface_renderPicturesOnWorker=F.surface_renderPicturesOnWorker)(a,b,c,e,f);w._surface_rasterizeImage=(a,b,c)=>(w._surface_rasterizeImage=F.surface_rasterizeImage)(a,b,c);
|
||||
var cd=w._surface_onRenderComplete=(a,b,c)=>(cd=w._surface_onRenderComplete=F.surface_onRenderComplete)(a,b,c);w._lineMetrics_create=(a,b,c,e,f,g,k,n,r)=>(w._lineMetrics_create=F.lineMetrics_create)(a,b,c,e,f,g,k,n,r);w._lineMetrics_dispose=a=>(w._lineMetrics_dispose=F.lineMetrics_dispose)(a);w._lineMetrics_getHardBreak=a=>(w._lineMetrics_getHardBreak=F.lineMetrics_getHardBreak)(a);w._lineMetrics_getAscent=a=>(w._lineMetrics_getAscent=F.lineMetrics_getAscent)(a);
|
||||
w._lineMetrics_getDescent=a=>(w._lineMetrics_getDescent=F.lineMetrics_getDescent)(a);w._lineMetrics_getUnscaledAscent=a=>(w._lineMetrics_getUnscaledAscent=F.lineMetrics_getUnscaledAscent)(a);w._lineMetrics_getHeight=a=>(w._lineMetrics_getHeight=F.lineMetrics_getHeight)(a);w._lineMetrics_getWidth=a=>(w._lineMetrics_getWidth=F.lineMetrics_getWidth)(a);w._lineMetrics_getLeft=a=>(w._lineMetrics_getLeft=F.lineMetrics_getLeft)(a);w._lineMetrics_getBaseline=a=>(w._lineMetrics_getBaseline=F.lineMetrics_getBaseline)(a);
|
||||
w._lineMetrics_getLineNumber=a=>(w._lineMetrics_getLineNumber=F.lineMetrics_getLineNumber)(a);w._lineMetrics_getStartIndex=a=>(w._lineMetrics_getStartIndex=F.lineMetrics_getStartIndex)(a);w._lineMetrics_getEndIndex=a=>(w._lineMetrics_getEndIndex=F.lineMetrics_getEndIndex)(a);w._paragraph_dispose=a=>(w._paragraph_dispose=F.paragraph_dispose)(a);w._paragraph_getWidth=a=>(w._paragraph_getWidth=F.paragraph_getWidth)(a);w._paragraph_getHeight=a=>(w._paragraph_getHeight=F.paragraph_getHeight)(a);
|
||||
w._paragraph_getLongestLine=a=>(w._paragraph_getLongestLine=F.paragraph_getLongestLine)(a);w._paragraph_getMinIntrinsicWidth=a=>(w._paragraph_getMinIntrinsicWidth=F.paragraph_getMinIntrinsicWidth)(a);w._paragraph_getMaxIntrinsicWidth=a=>(w._paragraph_getMaxIntrinsicWidth=F.paragraph_getMaxIntrinsicWidth)(a);w._paragraph_getAlphabeticBaseline=a=>(w._paragraph_getAlphabeticBaseline=F.paragraph_getAlphabeticBaseline)(a);w._paragraph_getIdeographicBaseline=a=>(w._paragraph_getIdeographicBaseline=F.paragraph_getIdeographicBaseline)(a);
|
||||
w._paragraph_getDidExceedMaxLines=a=>(w._paragraph_getDidExceedMaxLines=F.paragraph_getDidExceedMaxLines)(a);w._paragraph_layout=(a,b)=>(w._paragraph_layout=F.paragraph_layout)(a,b);w._paragraph_getPositionForOffset=(a,b,c,e)=>(w._paragraph_getPositionForOffset=F.paragraph_getPositionForOffset)(a,b,c,e);w._paragraph_getClosestGlyphInfoAtCoordinate=(a,b,c,e,f,g)=>(w._paragraph_getClosestGlyphInfoAtCoordinate=F.paragraph_getClosestGlyphInfoAtCoordinate)(a,b,c,e,f,g);
|
||||
w._paragraph_getGlyphInfoAt=(a,b,c,e,f)=>(w._paragraph_getGlyphInfoAt=F.paragraph_getGlyphInfoAt)(a,b,c,e,f);w._paragraph_getWordBoundary=(a,b,c)=>(w._paragraph_getWordBoundary=F.paragraph_getWordBoundary)(a,b,c);w._paragraph_getLineCount=a=>(w._paragraph_getLineCount=F.paragraph_getLineCount)(a);w._paragraph_getLineNumberAt=(a,b)=>(w._paragraph_getLineNumberAt=F.paragraph_getLineNumberAt)(a,b);
|
||||
w._paragraph_getLineMetricsAtIndex=(a,b)=>(w._paragraph_getLineMetricsAtIndex=F.paragraph_getLineMetricsAtIndex)(a,b);w._textBoxList_dispose=a=>(w._textBoxList_dispose=F.textBoxList_dispose)(a);w._textBoxList_getLength=a=>(w._textBoxList_getLength=F.textBoxList_getLength)(a);w._textBoxList_getBoxAtIndex=(a,b,c)=>(w._textBoxList_getBoxAtIndex=F.textBoxList_getBoxAtIndex)(a,b,c);w._paragraph_getBoxesForRange=(a,b,c,e,f)=>(w._paragraph_getBoxesForRange=F.paragraph_getBoxesForRange)(a,b,c,e,f);
|
||||
w._paragraph_getBoxesForPlaceholders=a=>(w._paragraph_getBoxesForPlaceholders=F.paragraph_getBoxesForPlaceholders)(a);w._paragraph_getUnresolvedCodePoints=(a,b,c)=>(w._paragraph_getUnresolvedCodePoints=F.paragraph_getUnresolvedCodePoints)(a,b,c);w._paragraphBuilder_create=(a,b)=>(w._paragraphBuilder_create=F.paragraphBuilder_create)(a,b);w._paragraphBuilder_dispose=a=>(w._paragraphBuilder_dispose=F.paragraphBuilder_dispose)(a);
|
||||
w._paragraphBuilder_addPlaceholder=(a,b,c,e,f,g)=>(w._paragraphBuilder_addPlaceholder=F.paragraphBuilder_addPlaceholder)(a,b,c,e,f,g);w._paragraphBuilder_addText=(a,b)=>(w._paragraphBuilder_addText=F.paragraphBuilder_addText)(a,b);w._paragraphBuilder_getUtf8Text=(a,b)=>(w._paragraphBuilder_getUtf8Text=F.paragraphBuilder_getUtf8Text)(a,b);w._paragraphBuilder_pushStyle=(a,b)=>(w._paragraphBuilder_pushStyle=F.paragraphBuilder_pushStyle)(a,b);w._paragraphBuilder_pop=a=>(w._paragraphBuilder_pop=F.paragraphBuilder_pop)(a);
|
||||
w._paragraphBuilder_build=a=>(w._paragraphBuilder_build=F.paragraphBuilder_build)(a);w._unicodePositionBuffer_create=a=>(w._unicodePositionBuffer_create=F.unicodePositionBuffer_create)(a);w._unicodePositionBuffer_getDataPointer=a=>(w._unicodePositionBuffer_getDataPointer=F.unicodePositionBuffer_getDataPointer)(a);w._unicodePositionBuffer_free=a=>(w._unicodePositionBuffer_free=F.unicodePositionBuffer_free)(a);w._lineBreakBuffer_create=a=>(w._lineBreakBuffer_create=F.lineBreakBuffer_create)(a);
|
||||
w._lineBreakBuffer_getDataPointer=a=>(w._lineBreakBuffer_getDataPointer=F.lineBreakBuffer_getDataPointer)(a);w._lineBreakBuffer_free=a=>(w._lineBreakBuffer_free=F.lineBreakBuffer_free)(a);w._paragraphBuilder_setGraphemeBreaksUtf16=(a,b)=>(w._paragraphBuilder_setGraphemeBreaksUtf16=F.paragraphBuilder_setGraphemeBreaksUtf16)(a,b);w._paragraphBuilder_setWordBreaksUtf16=(a,b)=>(w._paragraphBuilder_setWordBreaksUtf16=F.paragraphBuilder_setWordBreaksUtf16)(a,b);
|
||||
w._paragraphBuilder_setLineBreaksUtf16=(a,b)=>(w._paragraphBuilder_setLineBreaksUtf16=F.paragraphBuilder_setLineBreaksUtf16)(a,b);w._paragraphStyle_create=()=>(w._paragraphStyle_create=F.paragraphStyle_create)();w._paragraphStyle_dispose=a=>(w._paragraphStyle_dispose=F.paragraphStyle_dispose)(a);w._paragraphStyle_setTextAlign=(a,b)=>(w._paragraphStyle_setTextAlign=F.paragraphStyle_setTextAlign)(a,b);
|
||||
w._paragraphStyle_setTextDirection=(a,b)=>(w._paragraphStyle_setTextDirection=F.paragraphStyle_setTextDirection)(a,b);w._paragraphStyle_setMaxLines=(a,b)=>(w._paragraphStyle_setMaxLines=F.paragraphStyle_setMaxLines)(a,b);w._paragraphStyle_setHeight=(a,b)=>(w._paragraphStyle_setHeight=F.paragraphStyle_setHeight)(a,b);w._paragraphStyle_setTextHeightBehavior=(a,b,c)=>(w._paragraphStyle_setTextHeightBehavior=F.paragraphStyle_setTextHeightBehavior)(a,b,c);
|
||||
w._paragraphStyle_setEllipsis=(a,b)=>(w._paragraphStyle_setEllipsis=F.paragraphStyle_setEllipsis)(a,b);w._paragraphStyle_setStrutStyle=(a,b)=>(w._paragraphStyle_setStrutStyle=F.paragraphStyle_setStrutStyle)(a,b);w._paragraphStyle_setTextStyle=(a,b)=>(w._paragraphStyle_setTextStyle=F.paragraphStyle_setTextStyle)(a,b);w._paragraphStyle_setApplyRoundingHack=(a,b)=>(w._paragraphStyle_setApplyRoundingHack=F.paragraphStyle_setApplyRoundingHack)(a,b);w._strutStyle_create=()=>(w._strutStyle_create=F.strutStyle_create)();
|
||||
w._strutStyle_dispose=a=>(w._strutStyle_dispose=F.strutStyle_dispose)(a);w._strutStyle_setFontFamilies=(a,b,c)=>(w._strutStyle_setFontFamilies=F.strutStyle_setFontFamilies)(a,b,c);w._strutStyle_setFontSize=(a,b)=>(w._strutStyle_setFontSize=F.strutStyle_setFontSize)(a,b);w._strutStyle_setHeight=(a,b)=>(w._strutStyle_setHeight=F.strutStyle_setHeight)(a,b);w._strutStyle_setHalfLeading=(a,b)=>(w._strutStyle_setHalfLeading=F.strutStyle_setHalfLeading)(a,b);
|
||||
w._strutStyle_setLeading=(a,b)=>(w._strutStyle_setLeading=F.strutStyle_setLeading)(a,b);w._strutStyle_setFontStyle=(a,b,c)=>(w._strutStyle_setFontStyle=F.strutStyle_setFontStyle)(a,b,c);w._strutStyle_setForceStrutHeight=(a,b)=>(w._strutStyle_setForceStrutHeight=F.strutStyle_setForceStrutHeight)(a,b);w._textStyle_create=()=>(w._textStyle_create=F.textStyle_create)();w._textStyle_copy=a=>(w._textStyle_copy=F.textStyle_copy)(a);w._textStyle_dispose=a=>(w._textStyle_dispose=F.textStyle_dispose)(a);
|
||||
w._textStyle_setColor=(a,b)=>(w._textStyle_setColor=F.textStyle_setColor)(a,b);w._textStyle_setDecoration=(a,b)=>(w._textStyle_setDecoration=F.textStyle_setDecoration)(a,b);w._textStyle_setDecorationColor=(a,b)=>(w._textStyle_setDecorationColor=F.textStyle_setDecorationColor)(a,b);w._textStyle_setDecorationStyle=(a,b)=>(w._textStyle_setDecorationStyle=F.textStyle_setDecorationStyle)(a,b);
|
||||
w._textStyle_setDecorationThickness=(a,b)=>(w._textStyle_setDecorationThickness=F.textStyle_setDecorationThickness)(a,b);w._textStyle_setFontStyle=(a,b,c)=>(w._textStyle_setFontStyle=F.textStyle_setFontStyle)(a,b,c);w._textStyle_setTextBaseline=(a,b)=>(w._textStyle_setTextBaseline=F.textStyle_setTextBaseline)(a,b);w._textStyle_clearFontFamilies=a=>(w._textStyle_clearFontFamilies=F.textStyle_clearFontFamilies)(a);
|
||||
w._textStyle_addFontFamilies=(a,b,c)=>(w._textStyle_addFontFamilies=F.textStyle_addFontFamilies)(a,b,c);w._textStyle_setFontSize=(a,b)=>(w._textStyle_setFontSize=F.textStyle_setFontSize)(a,b);w._textStyle_setLetterSpacing=(a,b)=>(w._textStyle_setLetterSpacing=F.textStyle_setLetterSpacing)(a,b);w._textStyle_setWordSpacing=(a,b)=>(w._textStyle_setWordSpacing=F.textStyle_setWordSpacing)(a,b);w._textStyle_setHeight=(a,b)=>(w._textStyle_setHeight=F.textStyle_setHeight)(a,b);
|
||||
w._textStyle_setHalfLeading=(a,b)=>(w._textStyle_setHalfLeading=F.textStyle_setHalfLeading)(a,b);w._textStyle_setLocale=(a,b)=>(w._textStyle_setLocale=F.textStyle_setLocale)(a,b);w._textStyle_setBackground=(a,b)=>(w._textStyle_setBackground=F.textStyle_setBackground)(a,b);w._textStyle_setForeground=(a,b)=>(w._textStyle_setForeground=F.textStyle_setForeground)(a,b);w._textStyle_addShadow=(a,b,c,e,f)=>(w._textStyle_addShadow=F.textStyle_addShadow)(a,b,c,e,f);
|
||||
w._textStyle_addFontFeature=(a,b,c)=>(w._textStyle_addFontFeature=F.textStyle_addFontFeature)(a,b,c);w._textStyle_setFontVariations=(a,b,c,e)=>(w._textStyle_setFontVariations=F.textStyle_setFontVariations)(a,b,c,e);w._vertices_create=(a,b,c,e,f,g,k)=>(w._vertices_create=F.vertices_create)(a,b,c,e,f,g,k);w._vertices_dispose=a=>(w._vertices_dispose=F.vertices_dispose)(a);var fb=w._pthread_self=()=>(fb=w._pthread_self=F.pthread_self)(),pb=a=>(pb=F.malloc)(a);
|
||||
w.__emscripten_tls_init=()=>(w.__emscripten_tls_init=F._emscripten_tls_init)();var ed=w.__emscripten_thread_init=(a,b,c,e,f,g)=>(ed=w.__emscripten_thread_init=F._emscripten_thread_init)(a,b,c,e,f,g);w.__emscripten_thread_crashed=()=>(w.__emscripten_thread_crashed=F._emscripten_thread_crashed)();
|
||||
var jc=(a,b,c,e)=>(jc=F._emscripten_run_in_main_runtime_thread_js)(a,b,c,e),db=a=>(db=F._emscripten_thread_free_data)(a),jb=w.__emscripten_thread_exit=a=>(jb=w.__emscripten_thread_exit=F._emscripten_thread_exit)(a),wb=w.__emscripten_check_mailbox=()=>(wb=w.__emscripten_check_mailbox=F._emscripten_check_mailbox)(),Z=(a,b)=>(Z=F.setThrew)(a,b),ib=(a,b)=>(ib=F.emscripten_stack_set_limits)(a,b),N=()=>(N=F.stackSave)(),M=a=>(M=F.stackRestore)(a),Cb=w.stackAlloc=a=>(Cb=w.stackAlloc=F.stackAlloc)(a);
|
||||
function gd(a,b,c){var e=N();try{return G.get(a)(b,c)}catch(f){M(e);if(f!==f+0)throw f;Z(1,0)}}function md(a,b,c){var e=N();try{G.get(a)(b,c)}catch(f){M(e);if(f!==f+0)throw f;Z(1,0)}}function fd(a,b){var c=N();try{return G.get(a)(b)}catch(e){M(c);if(e!==e+0)throw e;Z(1,0)}}function nd(a,b,c,e){var f=N();try{G.get(a)(b,c,e)}catch(g){M(f);if(g!==g+0)throw g;Z(1,0)}}function hd(a,b,c,e){var f=N();try{return G.get(a)(b,c,e)}catch(g){M(f);if(g!==g+0)throw g;Z(1,0)}}
|
||||
function od(a,b,c,e,f){var g=N();try{G.get(a)(b,c,e,f)}catch(k){M(g);if(k!==k+0)throw k;Z(1,0)}}function pd(a,b,c,e,f,g,k,n){var r=N();try{G.get(a)(b,c,e,f,g,k,n)}catch(u){M(r);if(u!==u+0)throw u;Z(1,0)}}function ld(a,b){var c=N();try{G.get(a)(b)}catch(e){M(c);if(e!==e+0)throw e;Z(1,0)}}function kd(a,b,c,e,f,g,k){var n=N();try{return G.get(a)(b,c,e,f,g,k)}catch(r){M(n);if(r!==r+0)throw r;Z(1,0)}}
|
||||
function jd(a,b,c,e,f){var g=N();try{return G.get(a)(b,c,e,f)}catch(k){M(g);if(k!==k+0)throw k;Z(1,0)}}w.keepRuntimeAlive=Ka;w.wasmMemory=d;w.wasmExports=F;
|
||||
w.addFunction=function(a,b){if(!Yc){Yc=new WeakMap;var c=G.length;if(Yc)for(var e=0;e<0+c;e++){var f=G.get(e);f&&Yc.set(f,e)}}if(c=Yc.get(a)||0)return c;if(Zc.length)c=Zc.pop();else{try{G.grow(1)}catch(n){if(!(n instanceof RangeError))throw n;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.";}c=G.length-1}try{G.set(c,a)}catch(n){if(!(n instanceof TypeError))throw n;if("function"==typeof WebAssembly.Function){e=WebAssembly.Function;f={i:"i32",j:"i64",f:"f32",d:"f64",p:"i32"};for(var g={parameters:[],
|
||||
results:"v"==b[0]?[]:[f[b[0]]]},k=1;k<b.length;++k)g.parameters.push(f[b[k]]);b=new e(g,a)}else{e=[1];f=b.slice(0,1);b=b.slice(1);g={i:127,p:127,j:126,f:125,d:124};e.push(96);k=b.length;128>k?e.push(k):e.push(k%128|128,k>>7);for(k=0;k<b.length;++k)e.push(g[b[k]]);"v"==f?e.push(0):e.push(1,g[f]);b=[0,97,115,109,1,0,0,0,1];f=e.length;128>f?b.push(f):b.push(f%128|128,f>>7);b.push.apply(b,e);b.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);b=new WebAssembly.Module(new Uint8Array(b));b=(new WebAssembly.Instance(b,
|
||||
{e:{f:a}})).exports.f}G.set(c,b)}Yc.set(a,c);return c};w.ExitStatus=Va;w.PThread=I;var rd;Ma=function sd(){rd||td();rd||(Ma=sd)};
|
||||
function td(){function a(){if(!rd&&(rd=!0,w.calledRun=!0,!Ba)){A||hb(Ha);ja(w);if(w.onRuntimeInitialized)w.onRuntimeInitialized();if(!A){if(w.postRun)for("function"==typeof w.postRun&&(w.postRun=[w.postRun]);w.postRun.length;){var b=w.postRun.shift();Ia.unshift(b)}hb(Ia)}}}if(!(0<H))if(A)ja(w),A||hb(Ha),startWorker(w);else{if(w.preRun)for("function"==typeof w.preRun&&(w.preRun=[w.preRun]);w.preRun.length;)Ga.unshift(w.preRun.shift());hb(Ga);0<H||(w.setStatus?(w.setStatus("Running..."),setTimeout(function(){setTimeout(function(){w.setStatus("")},
|
||||
1);a()},1)):a())}}if(w.preInit)for("function"==typeof w.preInit&&(w.preInit=[w.preInit]);0<w.preInit.length;)w.preInit.pop()();td();
|
||||
|
||||
|
||||
return moduleArg.ready
|
||||
}
|
||||
|
||||
);
|
||||
})();
|
||||
if (typeof exports === 'object' && typeof module === 'object')
|
||||
module.exports = skwasm;
|
||||
else if (typeof define === 'function' && define['amd'])
|
||||
define([], () => skwasm);
|
11992
new_backend/public/canvaskit/skwasm.js.symbols
Normal file
BIN
new_backend/public/canvaskit/skwasm.wasm
Normal file
1
new_backend/public/canvaskit/skwasm.worker.js
Normal file
|
@ -0,0 +1 @@
|
|||
"use strict";var Module={};var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";if(ENVIRONMENT_IS_NODE){var nodeWorkerThreads=require("worker_threads");var parentPort=nodeWorkerThreads.parentPort;parentPort.on("message",data=>onmessage({data:data}));var fs=require("fs");Object.assign(global,{self:global,require:require,Module:Module,location:{href:__filename},Worker:nodeWorkerThreads.Worker,importScripts:f=>(0,eval)(fs.readFileSync(f,"utf8")+"//# sourceURL="+f),postMessage:msg=>parentPort.postMessage(msg),performance:global.performance||{now:Date.now}})}var initializedJS=false;function threadPrintErr(){var text=Array.prototype.slice.call(arguments).join(" ");if(ENVIRONMENT_IS_NODE){fs.writeSync(2,text+"\n");return}console.error(text)}function threadAlert(){var text=Array.prototype.slice.call(arguments).join(" ");postMessage({cmd:"alert",text:text,threadId:Module["_pthread_self"]()})}var err=threadPrintErr;self.alert=threadAlert;Module["instantiateWasm"]=(info,receiveInstance)=>{var module=Module["wasmModule"];Module["wasmModule"]=null;var instance=new WebAssembly.Instance(module,info);return receiveInstance(instance)};self.onunhandledrejection=e=>{throw e.reason??e};function handleMessage(e){try{if(e.data.cmd==="load"){let messageQueue=[];self.onmessage=e=>messageQueue.push(e);self.startWorker=instance=>{Module=instance;postMessage({"cmd":"loaded"});for(let msg of messageQueue){handleMessage(msg)}self.onmessage=handleMessage};Module["wasmModule"]=e.data.wasmModule;for(const handler of e.data.handlers){Module[handler]=(...args)=>{postMessage({cmd:"callHandler",handler:handler,args:args})}}Module["wasmMemory"]=e.data.wasmMemory;Module["buffer"]=Module["wasmMemory"].buffer;Module["ENVIRONMENT_IS_PTHREAD"]=true;if(typeof e.data.urlOrBlob=="string"){importScripts(e.data.urlOrBlob)}else{var objectUrl=URL.createObjectURL(e.data.urlOrBlob);importScripts(objectUrl);URL.revokeObjectURL(objectUrl)}skwasm(Module)}else if(e.data.cmd==="run"){Module["__emscripten_thread_init"](e.data.pthread_ptr,/*isMainBrowserThread=*/0,/*isMainRuntimeThread=*/0,/*canBlock=*/1);Module["__emscripten_thread_mailbox_await"](e.data.pthread_ptr);Module["establishStackSpace"]();Module["PThread"].receiveObjectTransfer(e.data);Module["PThread"].threadInitTLS();if(!initializedJS){initializedJS=true}try{Module["invokeEntryPoint"](e.data.start_routine,e.data.arg)}catch(ex){if(ex!="unwind"){throw ex}}}else if(e.data.cmd==="cancel"){if(Module["_pthread_self"]()){Module["__emscripten_thread_exit"](-1)}}else if(e.data.target==="setimmediate"){}else if(e.data.cmd==="checkMailbox"){if(initializedJS){Module["checkMailbox"]()}}else if(e.data.cmd){err("worker.js received unknown command "+e.data.cmd);err(e.data)}}catch(ex){if(Module["__emscripten_thread_crashed"]){Module["__emscripten_thread_crashed"]()}throw ex}}self.onmessage=handleMessage;
|
BIN
new_backend/public/favicon.png
Normal file
After Width: | Height: | Size: 917 B |
4
new_backend/public/flutter.js
Normal file
|
@ -0,0 +1,4 @@
|
|||
(()=>{var I=()=>navigator.vendor==="Google Inc."||navigator.agent==="Edg/",T=()=>typeof ImageDecoder>"u"?!1:I(),E=()=>typeof Intl.v8BreakIterator<"u"&&typeof Intl.Segmenter<"u",S=()=>{let o=[0,97,115,109,1,0,0,0,1,5,1,95,1,120,0];return WebAssembly.validate(new Uint8Array(o))},p={hasImageCodecs:T(),hasChromiumBreakIterators:E(),supportsWasmGC:S(),crossOriginIsolated:window.crossOriginIsolated};var w=U(L());function L(){let o=document.querySelector("base");return o&&o.getAttribute("href")||""}function U(o){return o===""||o.endsWith("/")?o:`${o}/`}var f=class{constructor(){this._scriptLoaded=!1}setTrustedTypesPolicy(e){this._ttPolicy=e}async loadEntrypoint(e){let{entrypointUrl:n=`${w}main.dart.js`,onEntrypointLoaded:r,nonce:t}=e||{};return this._loadJSEntrypoint(n,r,t)}async load(e,n,r,t,i){if(i??=s=>{s.initializeEngine(r).then(a=>a.runApp())},e.compileTarget==="dart2wasm")return this._loadWasmEntrypoint(e,n,i);{let s=e.mainJsPath??"main.dart.js",a=`${w}${s}`;return this._loadJSEntrypoint(a,i,t)}}didCreateEngineInitializer(e){typeof this._didCreateEngineInitializerResolve=="function"&&(this._didCreateEngineInitializerResolve(e),this._didCreateEngineInitializerResolve=null,delete _flutter.loader.didCreateEngineInitializer),typeof this._onEntrypointLoaded=="function"&&this._onEntrypointLoaded(e)}_loadJSEntrypoint(e,n,r){let t=typeof n=="function";if(!this._scriptLoaded){this._scriptLoaded=!0;let i=this._createScriptTag(e,r);if(t)console.debug("Injecting <script> tag. Using callback."),this._onEntrypointLoaded=n,document.head.append(i);else return new Promise((s,a)=>{console.debug("Injecting <script> tag. Using Promises. Use the callback approach instead!"),this._didCreateEngineInitializerResolve=s,i.addEventListener("error",a),document.head.append(i)})}}async _loadWasmEntrypoint(e,n,r){if(!this._scriptLoaded){this._scriptLoaded=!0,this._onEntrypointLoaded=r;let{mainWasmPath:t,jsSupportRuntimePath:i}=e,s=`${w}${t}`,a=`${w}${i}`;this._ttPolicy!=null&&(a=this._ttPolicy.createScriptURL(a));let d=WebAssembly.compileStreaming(fetch(s)),c=await import(a),u;e.renderer==="skwasm"?u=(async()=>{let m=await n.skwasm;return window._flutter_skwasmInstance=m,{skwasm:m.wasmExports,skwasmWrapper:m,ffi:{memory:m.wasmMemory}}})():u={};let l=await c.instantiate(d,u);await c.invoke(l)}}_createScriptTag(e,n){let r=document.createElement("script");r.type="application/javascript",n&&(r.nonce=n);let t=e;return this._ttPolicy!=null&&(t=this._ttPolicy.createScriptURL(e)),r.src=t,r}};async function b(o,e,n){if(e<0)return o;let r,t=new Promise((i,s)=>{r=setTimeout(()=>{s(new Error(`${n} took more than ${e}ms to resolve. Moving on.`,{cause:b}))},e)});return Promise.race([o,t]).finally(()=>{clearTimeout(r)})}var h=class{setTrustedTypesPolicy(e){this._ttPolicy=e}loadServiceWorker(e){if(!e)return console.debug("Null serviceWorker configuration. Skipping."),Promise.resolve();if(!("serviceWorker"in navigator)){let a="Service Worker API unavailable.";return window.isSecureContext||(a+=`
|
||||
The current context is NOT secure.`,a+=`
|
||||
Read more: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts`),Promise.reject(new Error(a))}let{serviceWorkerVersion:n,serviceWorkerUrl:r=`${w}flutter_service_worker.js?v=${n}`,timeoutMillis:t=4e3}=e,i=r;this._ttPolicy!=null&&(i=this._ttPolicy.createScriptURL(i));let s=navigator.serviceWorker.register(i).then(a=>this._getNewServiceWorker(a,n)).then(this._waitForServiceWorkerActivation);return b(s,t,"prepareServiceWorker")}async _getNewServiceWorker(e,n){if(!e.active&&(e.installing||e.waiting))return console.debug("Installing/Activating first service worker."),e.installing||e.waiting;if(e.active.scriptURL.endsWith(n))return console.debug("Loading from existing service worker."),e.active;{let r=await e.update();return console.debug("Updating service worker."),r.installing||r.waiting||r.active}}async _waitForServiceWorkerActivation(e){if(!e||e.state==="activated")if(e){console.debug("Service worker already active.");return}else throw new Error("Cannot activate a null service worker!");return new Promise((n,r)=>{e.addEventListener("statechange",()=>{e.state==="activated"&&(console.debug("Activated new service worker."),n())})})}};var v=class{constructor(e,n="flutter-js"){let r=e||[/\.js$/,/\.mjs$/];window.trustedTypes&&(this.policy=trustedTypes.createPolicy(n,{createScriptURL:function(t){if(t.startsWith("blob:"))return t;let i=new URL(t,window.location),s=i.pathname.split("/").pop();if(r.some(d=>d.test(s)))return i.toString();console.error("URL rejected by TrustedTypes policy",n,":",t,"(download prevented)")}}))}};var y=o=>{let e=WebAssembly.compileStreaming(fetch(o));return(n,r)=>((async()=>{let t=await e,i=await WebAssembly.instantiate(t,n);r(i,t)})(),{})};var C=(o,e,n,r)=>window.flutterCanvasKit?Promise.resolve(window.flutterCanvasKit):(window.flutterCanvasKitLoaded=new Promise((t,i)=>{let s=n.hasChromiumBreakIterators&&n.hasImageCodecs;if(!s&&e.canvasKitVariant=="chromium")throw"Chromium CanvasKit variant specifically requested, but unsupported in this browser";let a=s&&e.canvasKitVariant!=="full",d=e.canvasKitBaseUrl??`https://www.gstatic.com/flutter-canvaskit/${r}/`;a&&(d=`${d}chromium/`);let c=`${d}canvaskit.js`;o.flutterTT.policy&&(c=o.flutterTT.policy.createScriptURL(c));let u=y(`${d}canvaskit.wasm`),l=document.createElement("script");l.src=c,e.nonce&&(l.nonce=e.nonce),l.addEventListener("load",async()=>{try{let m=await CanvasKitInit({instantiateWasm:u});window.flutterCanvasKit=m,t(m)}catch(m){i(m)}}),l.addEventListener("error",i),document.head.appendChild(l)}),window.flutterCanvasKitLoaded);var _=(o,e,n,r)=>new Promise((t,i)=>{let s=e.canvasKitBaseUrl??`https://www.gstatic.com/flutter-canvaskit/${r}/`,a=`${s}skwasm.js`;o.flutterTT.policy&&(a=o.flutterTT.policy.createScriptURL(a));let d=y(`${s}skwasm.wasm`),c=document.createElement("script");c.src=a,e.nonce&&(c.nonce=e.nonce),c.addEventListener("load",async()=>{try{let u=await skwasm({instantiateWasm:d,locateFile:(l,m)=>{let k=m+l;return k.endsWith(".worker.js")?URL.createObjectURL(new Blob([`importScripts('${k}');`],{type:"application/javascript"})):k}});t(u)}catch(u){i(u)}}),c.addEventListener("error",i),document.head.appendChild(c)});var g=class{async loadEntrypoint(e){let{serviceWorker:n,...r}=e||{},t=new v,i=new h;i.setTrustedTypesPolicy(t.policy),await i.loadServiceWorker(n).catch(a=>{console.warn("Exception while loading service worker:",a)});let s=new f;return s.setTrustedTypesPolicy(t.policy),this.didCreateEngineInitializer=s.didCreateEngineInitializer.bind(s),s.loadEntrypoint(r)}async load({serviceWorkerSettings:e,onEntrypointLoaded:n,nonce:r,config:t}={}){t??={};let i=_flutter.buildConfig;if(!i)throw"FlutterLoader.load requires _flutter.buildConfig to be set";let s=l=>{switch(l){case"skwasm":return p.crossOriginIsolated&&p.hasChromiumBreakIterators&&p.hasImageCodecs&&p.supportsWasmGC;default:return!0}},a=l=>l.compileTarget==="dart2wasm"&&!p.supportsWasmGC||t.renderer&&t.renderer!=l.renderer?!1:s(l.renderer),d=i.builds.find(a);if(!d)throw"FlutterLoader could not find a build compatible with configuration and environment.";let c={};c.flutterTT=new v,e&&(c.serviceWorkerLoader=new h,c.serviceWorkerLoader.setTrustedTypesPolicy(c.flutterTT.policy),await c.serviceWorkerLoader.loadServiceWorker(e).catch(l=>{console.warn("Exception while loading service worker:",l)})),d.renderer==="canvaskit"?c.canvasKit=C(c,t,p,i.engineRevision):d.renderer==="skwasm"&&(c.skwasm=_(c,t,p,i.engineRevision));let u=new f;return u.setTrustedTypesPolicy(c.flutterTT.policy),this.didCreateEngineInitializer=u.didCreateEngineInitializer.bind(u),u.load(d,c,t,r,n)}};window._flutter||(window._flutter={});window._flutter.loader||(window._flutter.loader=new g);})();
|
||||
//# sourceMappingURL=flutter.js.map
|
16
new_backend/public/flutter_bootstrap.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
(()=>{var I=()=>navigator.vendor==="Google Inc."||navigator.agent==="Edg/",T=()=>typeof ImageDecoder>"u"?!1:I(),E=()=>typeof Intl.v8BreakIterator<"u"&&typeof Intl.Segmenter<"u",S=()=>{let o=[0,97,115,109,1,0,0,0,1,5,1,95,1,120,0];return WebAssembly.validate(new Uint8Array(o))},p={hasImageCodecs:T(),hasChromiumBreakIterators:E(),supportsWasmGC:S(),crossOriginIsolated:window.crossOriginIsolated};var w=U(L());function L(){let o=document.querySelector("base");return o&&o.getAttribute("href")||""}function U(o){return o===""||o.endsWith("/")?o:`${o}/`}var f=class{constructor(){this._scriptLoaded=!1}setTrustedTypesPolicy(e){this._ttPolicy=e}async loadEntrypoint(e){let{entrypointUrl:n=`${w}main.dart.js`,onEntrypointLoaded:r,nonce:t}=e||{};return this._loadJSEntrypoint(n,r,t)}async load(e,n,r,t,i){if(i??=s=>{s.initializeEngine(r).then(a=>a.runApp())},e.compileTarget==="dart2wasm")return this._loadWasmEntrypoint(e,n,i);{let s=e.mainJsPath??"main.dart.js",a=`${w}${s}`;return this._loadJSEntrypoint(a,i,t)}}didCreateEngineInitializer(e){typeof this._didCreateEngineInitializerResolve=="function"&&(this._didCreateEngineInitializerResolve(e),this._didCreateEngineInitializerResolve=null,delete _flutter.loader.didCreateEngineInitializer),typeof this._onEntrypointLoaded=="function"&&this._onEntrypointLoaded(e)}_loadJSEntrypoint(e,n,r){let t=typeof n=="function";if(!this._scriptLoaded){this._scriptLoaded=!0;let i=this._createScriptTag(e,r);if(t)console.debug("Injecting <script> tag. Using callback."),this._onEntrypointLoaded=n,document.head.append(i);else return new Promise((s,a)=>{console.debug("Injecting <script> tag. Using Promises. Use the callback approach instead!"),this._didCreateEngineInitializerResolve=s,i.addEventListener("error",a),document.head.append(i)})}}async _loadWasmEntrypoint(e,n,r){if(!this._scriptLoaded){this._scriptLoaded=!0,this._onEntrypointLoaded=r;let{mainWasmPath:t,jsSupportRuntimePath:i}=e,s=`${w}${t}`,a=`${w}${i}`;this._ttPolicy!=null&&(a=this._ttPolicy.createScriptURL(a));let d=WebAssembly.compileStreaming(fetch(s)),c=await import(a),u;e.renderer==="skwasm"?u=(async()=>{let m=await n.skwasm;return window._flutter_skwasmInstance=m,{skwasm:m.wasmExports,skwasmWrapper:m,ffi:{memory:m.wasmMemory}}})():u={};let l=await c.instantiate(d,u);await c.invoke(l)}}_createScriptTag(e,n){let r=document.createElement("script");r.type="application/javascript",n&&(r.nonce=n);let t=e;return this._ttPolicy!=null&&(t=this._ttPolicy.createScriptURL(e)),r.src=t,r}};async function b(o,e,n){if(e<0)return o;let r,t=new Promise((i,s)=>{r=setTimeout(()=>{s(new Error(`${n} took more than ${e}ms to resolve. Moving on.`,{cause:b}))},e)});return Promise.race([o,t]).finally(()=>{clearTimeout(r)})}var h=class{setTrustedTypesPolicy(e){this._ttPolicy=e}loadServiceWorker(e){if(!e)return console.debug("Null serviceWorker configuration. Skipping."),Promise.resolve();if(!("serviceWorker"in navigator)){let a="Service Worker API unavailable.";return window.isSecureContext||(a+=`
|
||||
The current context is NOT secure.`,a+=`
|
||||
Read more: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts`),Promise.reject(new Error(a))}let{serviceWorkerVersion:n,serviceWorkerUrl:r=`${w}flutter_service_worker.js?v=${n}`,timeoutMillis:t=4e3}=e,i=r;this._ttPolicy!=null&&(i=this._ttPolicy.createScriptURL(i));let s=navigator.serviceWorker.register(i).then(a=>this._getNewServiceWorker(a,n)).then(this._waitForServiceWorkerActivation);return b(s,t,"prepareServiceWorker")}async _getNewServiceWorker(e,n){if(!e.active&&(e.installing||e.waiting))return console.debug("Installing/Activating first service worker."),e.installing||e.waiting;if(e.active.scriptURL.endsWith(n))return console.debug("Loading from existing service worker."),e.active;{let r=await e.update();return console.debug("Updating service worker."),r.installing||r.waiting||r.active}}async _waitForServiceWorkerActivation(e){if(!e||e.state==="activated")if(e){console.debug("Service worker already active.");return}else throw new Error("Cannot activate a null service worker!");return new Promise((n,r)=>{e.addEventListener("statechange",()=>{e.state==="activated"&&(console.debug("Activated new service worker."),n())})})}};var v=class{constructor(e,n="flutter-js"){let r=e||[/\.js$/,/\.mjs$/];window.trustedTypes&&(this.policy=trustedTypes.createPolicy(n,{createScriptURL:function(t){if(t.startsWith("blob:"))return t;let i=new URL(t,window.location),s=i.pathname.split("/").pop();if(r.some(d=>d.test(s)))return i.toString();console.error("URL rejected by TrustedTypes policy",n,":",t,"(download prevented)")}}))}};var y=o=>{let e=WebAssembly.compileStreaming(fetch(o));return(n,r)=>((async()=>{let t=await e,i=await WebAssembly.instantiate(t,n);r(i,t)})(),{})};var C=(o,e,n,r)=>window.flutterCanvasKit?Promise.resolve(window.flutterCanvasKit):(window.flutterCanvasKitLoaded=new Promise((t,i)=>{let s=n.hasChromiumBreakIterators&&n.hasImageCodecs;if(!s&&e.canvasKitVariant=="chromium")throw"Chromium CanvasKit variant specifically requested, but unsupported in this browser";let a=s&&e.canvasKitVariant!=="full",d=e.canvasKitBaseUrl??`https://www.gstatic.com/flutter-canvaskit/${r}/`;a&&(d=`${d}chromium/`);let c=`${d}canvaskit.js`;o.flutterTT.policy&&(c=o.flutterTT.policy.createScriptURL(c));let u=y(`${d}canvaskit.wasm`),l=document.createElement("script");l.src=c,e.nonce&&(l.nonce=e.nonce),l.addEventListener("load",async()=>{try{let m=await CanvasKitInit({instantiateWasm:u});window.flutterCanvasKit=m,t(m)}catch(m){i(m)}}),l.addEventListener("error",i),document.head.appendChild(l)}),window.flutterCanvasKitLoaded);var _=(o,e,n,r)=>new Promise((t,i)=>{let s=e.canvasKitBaseUrl??`https://www.gstatic.com/flutter-canvaskit/${r}/`,a=`${s}skwasm.js`;o.flutterTT.policy&&(a=o.flutterTT.policy.createScriptURL(a));let d=y(`${s}skwasm.wasm`),c=document.createElement("script");c.src=a,e.nonce&&(c.nonce=e.nonce),c.addEventListener("load",async()=>{try{let u=await skwasm({instantiateWasm:d,locateFile:(l,m)=>{let k=m+l;return k.endsWith(".worker.js")?URL.createObjectURL(new Blob([`importScripts('${k}');`],{type:"application/javascript"})):k}});t(u)}catch(u){i(u)}}),c.addEventListener("error",i),document.head.appendChild(c)});var g=class{async loadEntrypoint(e){let{serviceWorker:n,...r}=e||{},t=new v,i=new h;i.setTrustedTypesPolicy(t.policy),await i.loadServiceWorker(n).catch(a=>{console.warn("Exception while loading service worker:",a)});let s=new f;return s.setTrustedTypesPolicy(t.policy),this.didCreateEngineInitializer=s.didCreateEngineInitializer.bind(s),s.loadEntrypoint(r)}async load({serviceWorkerSettings:e,onEntrypointLoaded:n,nonce:r,config:t}={}){t??={};let i=_flutter.buildConfig;if(!i)throw"FlutterLoader.load requires _flutter.buildConfig to be set";let s=l=>{switch(l){case"skwasm":return p.crossOriginIsolated&&p.hasChromiumBreakIterators&&p.hasImageCodecs&&p.supportsWasmGC;default:return!0}},a=l=>l.compileTarget==="dart2wasm"&&!p.supportsWasmGC||t.renderer&&t.renderer!=l.renderer?!1:s(l.renderer),d=i.builds.find(a);if(!d)throw"FlutterLoader could not find a build compatible with configuration and environment.";let c={};c.flutterTT=new v,e&&(c.serviceWorkerLoader=new h,c.serviceWorkerLoader.setTrustedTypesPolicy(c.flutterTT.policy),await c.serviceWorkerLoader.loadServiceWorker(e).catch(l=>{console.warn("Exception while loading service worker:",l)})),d.renderer==="canvaskit"?c.canvasKit=C(c,t,p,i.engineRevision):d.renderer==="skwasm"&&(c.skwasm=_(c,t,p,i.engineRevision));let u=new f;return u.setTrustedTypesPolicy(c.flutterTT.policy),this.didCreateEngineInitializer=u.didCreateEngineInitializer.bind(u),u.load(d,c,t,r,n)}};window._flutter||(window._flutter={});window._flutter.loader||(window._flutter.loader=new g);})();
|
||||
//# sourceMappingURL=flutter.js.map
|
||||
|
||||
if (!window._flutter) {
|
||||
window._flutter = {};
|
||||
}
|
||||
_flutter.buildConfig = {"engineRevision":"edd8546116457bdf1c5bdfb13ecb9463d2bb5ed4","builds":[{"compileTarget":"dart2js","renderer":"auto","mainJsPath":"main.dart.js"}]};
|
||||
|
||||
|
||||
_flutter.loader.load({
|
||||
serviceWorkerSettings: {
|
||||
serviceWorkerVersion: "724994457"
|
||||
}
|
||||
});
|
204
new_backend/public/flutter_service_worker.js
Normal file
|
@ -0,0 +1,204 @@
|
|||
'use strict';
|
||||
const MANIFEST = 'flutter-app-manifest';
|
||||
const TEMP = 'flutter-temp-cache';
|
||||
const CACHE_NAME = 'flutter-app-cache';
|
||||
|
||||
const RESOURCES = {"icons/Icon-maskable-512.png": "301a7604d45b3e739efc881eb04896ea",
|
||||
"icons/Icon-maskable-192.png": "c457ef57daa1d16f64b27b786ec2ea3c",
|
||||
"icons/Icon-192.png": "ac9a721a12bbc803b44f645561ecb1e1",
|
||||
"icons/Icon-512.png": "96e752610906ba2a93c65f8abe1645f1",
|
||||
"main.dart.js": "3dc0fb060e0b953ed34da6d174a24a97",
|
||||
"flutter.js": "383e55f7f3cce5be08fcf1f3881f585c",
|
||||
"manifest.json": "906fc433ff2f17c2c8af10ca573ca807",
|
||||
"index.html": "6465dc9a008a1c115b9da4f931498a54",
|
||||
"/": "6465dc9a008a1c115b9da4f931498a54",
|
||||
"canvaskit/skwasm.worker.js": "bfb704a6c714a75da9ef320991e88b03",
|
||||
"canvaskit/skwasm.js": "5d4f9263ec93efeb022bb14a3881d240",
|
||||
"canvaskit/skwasm.js.symbols": "c3c05bd50bdf59da8626bbe446ce65a3",
|
||||
"canvaskit/canvaskit.js": "738255d00768497e86aa4ca510cce1e1",
|
||||
"canvaskit/skwasm.wasm": "4051bfc27ba29bf420d17aa0c3a98bce",
|
||||
"canvaskit/canvaskit.wasm": "9251bb81ae8464c4df3b072f84aa969b",
|
||||
"canvaskit/chromium/canvaskit.js": "901bb9e28fac643b7da75ecfd3339f3f",
|
||||
"canvaskit/chromium/canvaskit.wasm": "399e2344480862e2dfa26f12fa5891d7",
|
||||
"canvaskit/chromium/canvaskit.js.symbols": "ee7e331f7f5bbf5ec937737542112372",
|
||||
"canvaskit/canvaskit.js.symbols": "74a84c23f5ada42fe063514c587968c6",
|
||||
"flutter_bootstrap.js": "43d90b9c1dc732462e810c63875b2949",
|
||||
"favicon.png": "5dcef449791fa27946b3d35ad8803796",
|
||||
"assets/NOTICES": "213fab269de5c9d0588132bd340226cd",
|
||||
"assets/fonts/MaterialIcons-Regular.otf": "815edb808938d2e08004691cee29f790",
|
||||
"assets/AssetManifest.json": "99914b932bd37a50b983c5e7c90ae93b",
|
||||
"assets/AssetManifest.bin": "0b0a3415aad49b6e9bf965ff578614f9",
|
||||
"assets/FontManifest.json": "7b2a36307916a9721811788013e65289",
|
||||
"assets/AssetManifest.bin.json": "a1fee2517bf598633e2f67fcf3e26c94",
|
||||
"assets/shaders/ink_sparkle.frag": "ecc85a2e95f5e9f53123dcaf8cb9b6ce",
|
||||
"version.json": "2b521e10dfa0f067561de489a19d6620"};
|
||||
// The application shell files that are downloaded before a service worker can
|
||||
// start.
|
||||
const CORE = ["main.dart.js",
|
||||
"index.html",
|
||||
"flutter_bootstrap.js",
|
||||
"assets/AssetManifest.bin.json",
|
||||
"assets/FontManifest.json"];
|
||||
|
||||
// During install, the TEMP cache is populated with the application shell files.
|
||||
self.addEventListener("install", (event) => {
|
||||
self.skipWaiting();
|
||||
return event.waitUntil(
|
||||
caches.open(TEMP).then((cache) => {
|
||||
return cache.addAll(
|
||||
CORE.map((value) => new Request(value, {'cache': 'reload'})));
|
||||
})
|
||||
);
|
||||
});
|
||||
// During activate, the cache is populated with the temp files downloaded in
|
||||
// install. If this service worker is upgrading from one with a saved
|
||||
// MANIFEST, then use this to retain unchanged resource files.
|
||||
self.addEventListener("activate", function(event) {
|
||||
return event.waitUntil(async function() {
|
||||
try {
|
||||
var contentCache = await caches.open(CACHE_NAME);
|
||||
var tempCache = await caches.open(TEMP);
|
||||
var manifestCache = await caches.open(MANIFEST);
|
||||
var manifest = await manifestCache.match('manifest');
|
||||
// When there is no prior manifest, clear the entire cache.
|
||||
if (!manifest) {
|
||||
await caches.delete(CACHE_NAME);
|
||||
contentCache = await caches.open(CACHE_NAME);
|
||||
for (var request of await tempCache.keys()) {
|
||||
var response = await tempCache.match(request);
|
||||
await contentCache.put(request, response);
|
||||
}
|
||||
await caches.delete(TEMP);
|
||||
// Save the manifest to make future upgrades efficient.
|
||||
await manifestCache.put('manifest', new Response(JSON.stringify(RESOURCES)));
|
||||
// Claim client to enable caching on first launch
|
||||
self.clients.claim();
|
||||
return;
|
||||
}
|
||||
var oldManifest = await manifest.json();
|
||||
var origin = self.location.origin;
|
||||
for (var request of await contentCache.keys()) {
|
||||
var key = request.url.substring(origin.length + 1);
|
||||
if (key == "") {
|
||||
key = "/";
|
||||
}
|
||||
// If a resource from the old manifest is not in the new cache, or if
|
||||
// the MD5 sum has changed, delete it. Otherwise the resource is left
|
||||
// in the cache and can be reused by the new service worker.
|
||||
if (!RESOURCES[key] || RESOURCES[key] != oldManifest[key]) {
|
||||
await contentCache.delete(request);
|
||||
}
|
||||
}
|
||||
// Populate the cache with the app shell TEMP files, potentially overwriting
|
||||
// cache files preserved above.
|
||||
for (var request of await tempCache.keys()) {
|
||||
var response = await tempCache.match(request);
|
||||
await contentCache.put(request, response);
|
||||
}
|
||||
await caches.delete(TEMP);
|
||||
// Save the manifest to make future upgrades efficient.
|
||||
await manifestCache.put('manifest', new Response(JSON.stringify(RESOURCES)));
|
||||
// Claim client to enable caching on first launch
|
||||
self.clients.claim();
|
||||
return;
|
||||
} catch (err) {
|
||||
// On an unhandled exception the state of the cache cannot be guaranteed.
|
||||
console.error('Failed to upgrade service worker: ' + err);
|
||||
await caches.delete(CACHE_NAME);
|
||||
await caches.delete(TEMP);
|
||||
await caches.delete(MANIFEST);
|
||||
}
|
||||
}());
|
||||
});
|
||||
// The fetch handler redirects requests for RESOURCE files to the service
|
||||
// worker cache.
|
||||
self.addEventListener("fetch", (event) => {
|
||||
if (event.request.method !== 'GET') {
|
||||
return;
|
||||
}
|
||||
var origin = self.location.origin;
|
||||
var key = event.request.url.substring(origin.length + 1);
|
||||
// Redirect URLs to the index.html
|
||||
if (key.indexOf('?v=') != -1) {
|
||||
key = key.split('?v=')[0];
|
||||
}
|
||||
if (event.request.url == origin || event.request.url.startsWith(origin + '/#') || key == '') {
|
||||
key = '/';
|
||||
}
|
||||
// If the URL is not the RESOURCE list then return to signal that the
|
||||
// browser should take over.
|
||||
if (!RESOURCES[key]) {
|
||||
return;
|
||||
}
|
||||
// If the URL is the index.html, perform an online-first request.
|
||||
if (key == '/') {
|
||||
return onlineFirst(event);
|
||||
}
|
||||
event.respondWith(caches.open(CACHE_NAME)
|
||||
.then((cache) => {
|
||||
return cache.match(event.request).then((response) => {
|
||||
// Either respond with the cached resource, or perform a fetch and
|
||||
// lazily populate the cache only if the resource was successfully fetched.
|
||||
return response || fetch(event.request).then((response) => {
|
||||
if (response && Boolean(response.ok)) {
|
||||
cache.put(event.request, response.clone());
|
||||
}
|
||||
return response;
|
||||
});
|
||||
})
|
||||
})
|
||||
);
|
||||
});
|
||||
self.addEventListener('message', (event) => {
|
||||
// SkipWaiting can be used to immediately activate a waiting service worker.
|
||||
// This will also require a page refresh triggered by the main worker.
|
||||
if (event.data === 'skipWaiting') {
|
||||
self.skipWaiting();
|
||||
return;
|
||||
}
|
||||
if (event.data === 'downloadOffline') {
|
||||
downloadOffline();
|
||||
return;
|
||||
}
|
||||
});
|
||||
// Download offline will check the RESOURCES for all files not in the cache
|
||||
// and populate them.
|
||||
async function downloadOffline() {
|
||||
var resources = [];
|
||||
var contentCache = await caches.open(CACHE_NAME);
|
||||
var currentContent = {};
|
||||
for (var request of await contentCache.keys()) {
|
||||
var key = request.url.substring(origin.length + 1);
|
||||
if (key == "") {
|
||||
key = "/";
|
||||
}
|
||||
currentContent[key] = true;
|
||||
}
|
||||
for (var resourceKey of Object.keys(RESOURCES)) {
|
||||
if (!currentContent[resourceKey]) {
|
||||
resources.push(resourceKey);
|
||||
}
|
||||
}
|
||||
return contentCache.addAll(resources);
|
||||
}
|
||||
// Attempt to download the resource online before falling back to
|
||||
// the offline cache.
|
||||
function onlineFirst(event) {
|
||||
return event.respondWith(
|
||||
fetch(event.request).then((response) => {
|
||||
return caches.open(CACHE_NAME).then((cache) => {
|
||||
cache.put(event.request, response.clone());
|
||||
return response;
|
||||
});
|
||||
}).catch((error) => {
|
||||
return caches.open(CACHE_NAME).then((cache) => {
|
||||
return cache.match(event.request).then((response) => {
|
||||
if (response != null) {
|
||||
return response;
|
||||
}
|
||||
throw error;
|
||||
});
|
||||
});
|
||||
})
|
||||
);
|
||||
}
|
BIN
new_backend/public/icons/Icon-192.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
new_backend/public/icons/Icon-512.png
Normal file
After Width: | Height: | Size: 8.1 KiB |
BIN
new_backend/public/icons/Icon-maskable-192.png
Normal file
After Width: | Height: | Size: 5.5 KiB |
BIN
new_backend/public/icons/Icon-maskable-512.png
Normal file
After Width: | Height: | Size: 20 KiB |
38
new_backend/public/index.html
Normal file
|
@ -0,0 +1,38 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!--
|
||||
If you are serving your web app in a path other than the root, change the
|
||||
href value below to reflect the base path you are serving from.
|
||||
|
||||
The path provided below has to start and end with a slash "/" in order for
|
||||
it to work correctly.
|
||||
|
||||
For more details:
|
||||
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
|
||||
|
||||
This is a placeholder for base href that will be replaced by the value of
|
||||
the `--base-href` argument provided to `flutter build`.
|
||||
-->
|
||||
<base href="/">
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
|
||||
<meta name="description" content="A new Flutter project.">
|
||||
|
||||
<!-- iOS meta tags & icons -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-title" content="frontend">
|
||||
<link rel="apple-touch-icon" href="icons/Icon-192.png">
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" type="image/png" href="favicon.png"/>
|
||||
|
||||
<title>frontend</title>
|
||||
<link rel="manifest" href="manifest.json">
|
||||
</head>
|
||||
<body>
|
||||
<script src="flutter_bootstrap.js" async></script>
|
||||
</body>
|
||||
</html>
|
82127
new_backend/public/main.dart.js
Normal file
35
new_backend/public/manifest.json
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"name": "frontend",
|
||||
"short_name": "frontend",
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"background_color": "#0175C2",
|
||||
"theme_color": "#0175C2",
|
||||
"description": "A new Flutter project.",
|
||||
"orientation": "portrait-primary",
|
||||
"prefer_related_applications": false,
|
||||
"icons": [
|
||||
{
|
||||
"src": "icons/Icon-192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "icons/Icon-512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "icons/Icon-maskable-192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "icons/Icon-maskable-512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
}
|
||||
]
|
||||
}
|
1
new_backend/public/version.json
Normal file
|
@ -0,0 +1 @@
|
|||
{"app_name":"frontend","version":"1.0.0","build_number":"1","package_name":"frontend"}
|
16
new_backend/pubspec.yaml
Normal file
|
@ -0,0 +1,16 @@
|
|||
name: new_backend
|
||||
description: A new Dart Frog application
|
||||
version: 1.0.0+1
|
||||
publish_to: none
|
||||
|
||||
environment:
|
||||
sdk: ">=3.0.0 <4.0.0"
|
||||
|
||||
dependencies:
|
||||
dart_frog: ^1.1.0
|
||||
path: ^1.9.0
|
||||
|
||||
dev_dependencies:
|
||||
mocktail: ^1.0.3
|
||||
test: ^1.25.5
|
||||
very_good_analysis: ^5.1.0
|
51
new_backend/routes/index.dart
Normal file
|
@ -0,0 +1,51 @@
|
|||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:dart_frog/dart_frog.dart';
|
||||
import 'package:new_backend/shrink_ray.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
Future<Response> onRequest(RequestContext context) async {
|
||||
switch (context.request.method) {
|
||||
case HttpMethod.put:
|
||||
case HttpMethod.delete:
|
||||
case HttpMethod.head:
|
||||
case HttpMethod.options:
|
||||
case HttpMethod.patch:
|
||||
return Response(statusCode: 404);
|
||||
case HttpMethod.post:
|
||||
try {
|
||||
final reqJson = await context.request.body();
|
||||
final data = jsonDecode(reqJson) as Map<String, dynamic>;
|
||||
final url = data['url'] as String?;
|
||||
if (url == null) {
|
||||
return Response(statusCode: 401, body: 'Missing url');
|
||||
}
|
||||
await Future<void>.delayed(const Duration(seconds: 2));
|
||||
final res = ShrinkRay.shrinkUrl(url);
|
||||
switch (res.status) {
|
||||
case Status.ok:
|
||||
shrunkUrls[res.content] = url;
|
||||
return Response(
|
||||
body: jsonEncode(
|
||||
{'url': 'http://localhost:8080/u/${res.content}'},
|
||||
),
|
||||
);
|
||||
case Status.error:
|
||||
return Response(statusCode: 401, body: res.content);
|
||||
}
|
||||
} catch (err, st) {
|
||||
print(st);
|
||||
print(err);
|
||||
return Response(statusCode: 500, body: 'Unexpected error occurred');
|
||||
}
|
||||
case HttpMethod.get:
|
||||
final file = File(path.join(Directory.current.path, 'public', 'index.html'));
|
||||
if (!file.existsSync()) {
|
||||
return Response(body: 'Index Not found');
|
||||
}
|
||||
final indexHtml = file.readAsStringSync();
|
||||
|
||||
return Response(body: indexHtml, headers: {'Content-Type': 'text/html'});
|
||||
}
|
||||
}
|
24
new_backend/routes/u/[urlPath].dart
Normal file
|
@ -0,0 +1,24 @@
|
|||
import 'dart:convert';
|
||||
|
||||
import 'package:dart_frog/dart_frog.dart';
|
||||
import 'package:new_backend/shrink_ray.dart';
|
||||
|
||||
Future<Response> onRequest(RequestContext context, String urlPath) async {
|
||||
switch (context.request.method) {
|
||||
case HttpMethod.put:
|
||||
case HttpMethod.delete:
|
||||
case HttpMethod.head:
|
||||
case HttpMethod.options:
|
||||
case HttpMethod.patch:
|
||||
case HttpMethod.post:
|
||||
return Response(statusCode: 404);
|
||||
case HttpMethod.get:
|
||||
final maybeUrl = shrunkUrls[urlPath];
|
||||
switch (maybeUrl) {
|
||||
case null:
|
||||
return Response(statusCode: 404);
|
||||
default:
|
||||
return Response(statusCode: 302, headers: {'Location': maybeUrl});
|
||||
}
|
||||
}
|
||||
}
|
32
new_backend/test/lib/shrink_ray_test.dart
Normal file
|
@ -0,0 +1,32 @@
|
|||
import 'package:new_backend/shrink_ray.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
||||
test('ShrinkRay equal urls get converted to the same shrunk url', () {
|
||||
const ytUrl = 'https://youtube.com';
|
||||
final ytRes = ShrinkRay.shrinkUrl(ytUrl);
|
||||
final ytRes2 = ShrinkRay.shrinkUrl(ytUrl);
|
||||
expect(ytRes.status, ytRes2.status);
|
||||
expect(ytRes.content, ytRes2.content);
|
||||
|
||||
const startSearchUrl = 'https://www.startpage.com/sp/search?query=how+to+be+awesome';
|
||||
final startSearchRes = ShrinkRay.shrinkUrl(startSearchUrl);
|
||||
final startSearchRes2 = ShrinkRay.shrinkUrl(startSearchUrl);
|
||||
expect(startSearchRes.status, startSearchRes2.status);
|
||||
expect(startSearchRes.content, startSearchRes2.content);
|
||||
});
|
||||
|
||||
test('ShrinkRay invalid Urls return error status and message', () {
|
||||
const badScheme = 'ht://google.com';
|
||||
final schemeRes = ShrinkRay.shrinkUrl(badScheme);
|
||||
expect(schemeRes.status, Status.error);
|
||||
|
||||
const badUrl = 'hello world';
|
||||
final urlRes = ShrinkRay.shrinkUrl(badUrl);
|
||||
expect(urlRes.status, Status.error);
|
||||
|
||||
const badPort = 'http://fosscat.com:1234';
|
||||
final portRes = ShrinkRay.shrinkUrl(badPort);
|
||||
expect(portRes.status, Status.error);
|
||||
});
|
||||
}
|
21
new_backend/test/routes/index_test.dart
Normal file
|
@ -0,0 +1,21 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:dart_frog/dart_frog.dart';
|
||||
import 'package:mocktail/mocktail.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
class _MockRequestContext extends Mock implements RequestContext {}
|
||||
|
||||
void main() {
|
||||
group('GET /', () {
|
||||
test('responds with a 200 and "Welcome to Dart Frog!".', () {
|
||||
// final context = _MockRequestContext();
|
||||
// final response = route.onRequest(context);
|
||||
// expect(response.statusCode, equals(HttpStatus.ok));
|
||||
// expect(
|
||||
// response.body(),
|
||||
// completion(equals('Welcome to Dart Frog!')),
|
||||
// );
|
||||
});
|
||||
});
|
||||
}
|