Full Code of wpydcr/LLM-Kit for AI

main 8c8452f55053 cached
159 files
1.6 MB
517.9k tokens
1991 symbols
1 requests
Download .txt
Showing preview only (1,881K chars total). Download the full file or copy to clipboard to get everything.
Repository: wpydcr/LLM-Kit
Branch: main
Commit: 8c8452f55053
Files: 159
Total size: 1.6 MB

Directory structure:
gitextract_rj9tv4rl/

├── .gitignore
├── LICENSE
├── README.md
├── README_EN.md
├── data/
│   ├── apply/
│   │   ├── audio/
│   │   │   └── .gitkeep
│   │   ├── emoticon/
│   │   │   └── .gitkeep
│   │   ├── images/
│   │   │   └── .gitkeep
│   │   ├── play/
│   │   │   ├── .gitkeep
│   │   │   └── 坂田银时.txt
│   │   └── text2image/
│   │       └── .gitkeep
│   ├── config/
│   │   ├── embedding_train/
│   │   │   └── model_arch.json
│   │   ├── js/
│   │   │   ├── custom.js
│   │   │   └── index.js
│   │   ├── language/
│   │   │   └── en_UK_language_config.json
│   │   ├── prompt/
│   │   │   └── chatPrompt.json
│   │   ├── theme/
│   │   │   └── theme.py
│   │   └── train_config/
│   │       └── .gitkeep
│   ├── documents/
│   │   └── .gitkeep
│   └── modeldata/
│       ├── Embedding/
│       │   └── .gitkeep
│       └── LLM/
│           └── .gitkeep
├── demo.py
├── env/
│   └── .gitkeep
├── models/
│   ├── Embedding/
│   │   └── .gitkeep
│   ├── LLM/
│   │   └── .gitkeep
│   ├── LoRA/
│   │   └── .gitkeep
│   ├── live2d_model/
│   │   └── .gitkeep
│   ├── svc_models/
│   │   ├── .gitkeep
│   │   ├── hubert_model/
│   │   │   └── .gitkeep
│   │   └── svc/
│   │       └── .gitkeep
│   └── vits_pretrained_models/
│       └── .gitkeep
├── modules/
│   ├── __init__.py
│   ├── agent/
│   │   ├── .gitkeep
│   │   ├── __init__.py
│   │   ├── chatdb/
│   │   │   ├── chat.py
│   │   │   ├── chatdb.py
│   │   │   ├── mysql.py
│   │   │   └── sql_examples.py
│   │   ├── internet_search.py
│   │   ├── svc/
│   │   │   ├── __init__.py
│   │   │   ├── attentions.py
│   │   │   ├── commons.py
│   │   │   ├── configs/
│   │   │   │   └── config.json
│   │   │   ├── hubert/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── hubert_model.py
│   │   │   │   ├── hubert_model_onnx.py
│   │   │   │   └── put_hubert_ckpt_here
│   │   │   ├── inference/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── chunks_temp.json
│   │   │   │   ├── infer_tool.py
│   │   │   │   ├── infer_tool_grad.py
│   │   │   │   └── slicer.py
│   │   │   ├── inference_main.py
│   │   │   ├── models.py
│   │   │   ├── modules.py
│   │   │   ├── utils.py
│   │   │   ├── vdecoder/
│   │   │   │   ├── __init__.py
│   │   │   │   └── hifigan/
│   │   │   │       ├── __init__.py
│   │   │   │       ├── env.py
│   │   │   │       ├── models.py
│   │   │   │       ├── nvSTFT.py
│   │   │   │       └── utils.py
│   │   │   └── vits_haruhi.py
│   │   ├── tts_online.py
│   │   └── vits/
│   │       ├── __init__.py
│   │       ├── attentions.py
│   │       ├── commons.py
│   │       ├── config/
│   │       │   └── config.json
│   │       ├── mel_processing.py
│   │       ├── models.py
│   │       ├── modules.py
│   │       ├── monotonic_align/
│   │       │   ├── __init__.py
│   │       │   └── core.py
│   │       ├── test.py
│   │       ├── text/
│   │       │   ├── LICENSE
│   │       │   ├── __init__.py
│   │       │   ├── cleaners.py
│   │       │   └── symbols.py
│   │       ├── transforms.py
│   │       ├── utils.py
│   │       └── vits.py
│   ├── apply/
│   │   └── role_play.py
│   └── model/
│       ├── .gitkeep
│       ├── Embedding/
│       │   ├── __init__.py
│       │   ├── base.py
│       │   ├── text2vec/
│       │   │   ├── __init__.py
│       │   │   ├── dataset/
│       │   │   │   ├── __init__.py
│       │   │   │   ├── base.py
│       │   │   │   ├── bert.py
│       │   │   │   ├── cosent.py
│       │   │   │   └── sentencebert.py
│       │   │   ├── main.py
│       │   │   ├── model/
│       │   │   │   ├── __init__.py
│       │   │   │   ├── base.py
│       │   │   │   ├── bert.py
│       │   │   │   ├── cosent.py
│       │   │   │   └── sentencebert.py
│       │   │   └── utils/
│       │   │       ├── __init__.py
│       │   │       └── base.py
│       │   └── utils/
│       │       ├── __init__.py
│       │       └── base.py
│       ├── LLM/
│       │   ├── __init__.py
│       │   ├── accelerate_configs/
│       │   │   ├── ds_multi_gpu.yaml
│       │   │   ├── ds_single_gpu.yaml
│       │   │   ├── multi_gpu.yaml
│       │   │   └── single_gpu.yaml
│       │   ├── ds_configs/
│       │   │   ├── stage_1.json
│       │   │   ├── stage_1_offload.json
│       │   │   ├── stage_2.json
│       │   │   ├── stage_2_offload.json
│       │   │   ├── stage_3.json
│       │   │   ├── stage_3_offload.json
│       │   │   └── stage_3_offload_bf16.json
│       │   ├── run/
│       │   │   ├── train_ds_multi_gpu.sh
│       │   │   ├── train_ds_single_gpu.sh
│       │   │   ├── train_lora_ds_multi_gpu.sh
│       │   │   ├── train_lora_ds_single_gpu.sh
│       │   │   ├── train_lora_multi_gpu.sh
│       │   │   ├── train_lora_single_gpu.sh
│       │   │   ├── train_multi_gpu.sh
│       │   │   └── train_single_gpu.sh
│       │   ├── train.py
│       │   ├── train_dpo.py
│       │   ├── train_dpo_luancher.py
│       │   └── train_luancher.py
│       ├── SparkApi.py
│       ├── __init__.py
│       ├── emb_auto.py
│       ├── llm_auto.py
│       ├── prompt_generator.py
│       └── use_api.py
├── requirements.txt
├── ui/
│   ├── apply.py
│   ├── apply_knowledge.py
│   ├── apply_text_image_generation.py
│   ├── apply_video.py
│   ├── chat.py
│   ├── data.py
│   └── train.py
├── utils/
│   ├── .gitkeep
│   ├── MyFAISS.py
│   ├── __init__.py
│   ├── chinese_text_splitter.py
│   ├── dev.json
│   ├── dl_data.py
│   ├── embedding_base_model.py
│   ├── embedding_val.py
│   ├── language_switch_utils.py
│   ├── local_doc.py
│   ├── parallel_api.py
│   ├── svc_utils.py
│   ├── text_image_utils.py
│   ├── ui_utils.py
│   ├── utils.py
│   └── vits_utils.py
├── web-demo-CN.bat
├── web-demo-CN.sh
├── web-demo-EN.bat
├── web-demo-EN.sh
└── webui.py

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
# .gitignore
.DS_Store

/env/*
!/env/.gitkeep
/Linux-env/*
!/Linux-env/.gitkeep

/data/audio/*
!/data/audio/.gitkeep

/data/documents/*
!/data/documents/.gitkeep
/data/modeldata/Embedding/*
!/data/modeldata/Embedding/.gitkeep
/data/modeldata/LLM/*
!/data/modeldata/LLM/.gitkeep

/data/apply//audio/*
!/data/apply/audio/.gitkeep
/data/apply/emoticon/*
!/data/apply/emoticon/.gitkeep
/data/apply/audio/*
!/data/apply/audio/.gitkeep
/data/apply/apply/*
!/data/apply/apply/.gitkeep
/data/apply/text2image/*
!/data/apply/text2image/.gitkeep

/models/Embedding/*
!/models/Embedding/.gitkeep
/models/LLM/*
!/models/LLM/.gitkeep
/models/LoRA/*
!/models/LoRA/.gitkeep

/models/svc_models/hubert_model/*
!/models/svc_models/hubert_model/.gitkeep

/models/svc_models/svc/*
!/models/svc_models/svc/.gitkeep

/models/vits_pretrained_models/*
!/models/vits_pretrained_models/.gitkeep

/models/live2d_model/*
!/models/live2d_model/.gitkeep




/outputs/*

**/__pycache__

================================================
FILE: LICENSE
================================================
                    GNU AFFERO GENERAL PUBLIC LICENSE
                       Version 3, 19 November 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

  Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.

  A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate.  Many developers of free software are heartened and
encouraged by the resulting cooperation.  However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.

  The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community.  It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server.  Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.

  An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals.  This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.

  The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU Affero General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

  To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

  To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

  An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License.  If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

  1. Source Code.

  The "source code" for a work means the preferred form of the work
for making modifications to it.  "Object code" means any non-source
form of a work.

  A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

  The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form.  A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

  The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities.  However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work.  For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

  You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.  You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright.  Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

  Conveying under any other circumstances is permitted solely under
the conditions stated below.  Sublicensing is not allowed; section 10
makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

  No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

  When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

  4. Conveying Verbatim Copies.

  You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

  You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

  You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

  A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit.  Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

  6. Conveying Non-Source Forms.

  You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

  A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

  A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling.  In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage.  For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product.  A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

  "Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source.  The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information.  But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

  The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed.  Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law.  If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

  When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it.  (Additional permissions may be written to require their own
removal in certain cases when you modify the work.)  You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

  Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10.  If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term.  If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

  If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  8. Termination.

  You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

  However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

  Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

  Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

  9. Acceptance Not Required for Having Copies.

  You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

  Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License.  You are not responsible
for enforcing compliance by third parties with this License.

  An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

  You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License.  For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

  11. Patents.

  A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

  A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

  Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

  In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

  If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

  If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

  A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

  Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

  If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

  13. Remote Network Interaction; Use with the GNU General Public License.

  Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software.  This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.

  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time.  Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

  Each version is given a distinguishing version number.  If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.

  If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

  Later license versions may give you additional or different
permissions.  However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

  15. Disclaimer of Warranty.

  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. Limitation of Liability.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

  17. Interpretation of Sections 15 and 16.

  If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published
    by the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

  If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source.  For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code.  There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.

  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.


================================================
FILE: README.md
================================================
# 苏秦(suqin) 语言大模型全工具链 WebUI 整合包

[**English**](./README_EN.md) | [**中文**](https://github.com/wpydcr/LLM-Kit)

## 介绍

⛓️ 本项目目标是实现目前各大语言模型的全流程工具 WebUI 整合包。不用写代码即可拥有自己的定制模型与专属应用!

具体功能模块如下:
<p align="center">
  <img src="./img/modules.png">
</p>

---
## 开发部署

初次使用建议查阅[说明文档](https://www.yuque.com/setpath/pkqy22?#)进行相关操作

### 软件需求
本项目已在 Python 3.8 - 3.10,CUDA 11.7/11.8 环境下完成测试。已在 Windows、Linux 系统中完成测试。

### 安装环境

#### 1. 运行环境

```shell
# 拉取仓库
$ git clone https://github.com/wpydcr/LLM-Kit.git

# 进入目录
$ cd LLM-Kit

# 安装依赖
$ pip install -r requirements.txt
```
 依赖也可以直接下载:[Windows环境包](https://pan.baidu.com/s/1NVmXam5MGfSn3MkZlt0zQg?pwd=8ku6), [Linux环境包](https://pan.baidu.com/s/1exSZYLSx0OWP5NXNwtZsCw?pwd=fhn0)。
 
 [显卡驱动](https://www.nvidia.cn/Download/index.aspx?lang=cn)和[cuda](https://developer.nvidia.com/cuda-toolkit-archive)自行安装

#### 2. 执行脚本

+ win环境,双击打开 web-demo-CN.bat 脚本
+ Linux环境,双击打开 web-demo-CN.sh 脚本

#### 3. 相关演示文件

+ 体验大模型连接数据库功能请先下载[相关文件](https://pan.baidu.com/s/13EWleDUaqHY7JeyfY0ErDQ?pwd=bjnp)
+ 体验角色扮演功能请先下载[相关文件](https://pan.baidu.com/s/13eWB-HMay7g9BSMIuZc8JQ?pwd=h9hq)
+ 表情包功能请先下载[相关文件](https://pan.baidu.com/s/1W2Rwq6Ies4VRxY7wsgkNVQ?pwd=lxmm)放入data/apply/emotion文件夹中

---

## 文件目录

- **env** :集成包环境
- **utils** :工具代码
- **modules** :各模块代码
  - **agent** :agent相关代码
    - **chatdb** : 数据库接入相关代码
    - **svc** : svc相关代码
    - **vits** : vits相关代码
  - **apply** :应用demo代码
  - **model** :模型相关代码
- **data** :数据文件
  - **apply** :应用demo相关文件
    - **audio** :生成的语音文件
    - **emotion** :表情包文件
    - **play** :人设提示词文件
  - **documents** :知识库数据文件
  - **modeldata** :模型训练数据文件
    - **LLM** :大模型训练数据文件
    - **Embedding** :嵌入模型训练数据文件
- **ui** :ui界面代码
- **output** :训练中的checkpoints
- **models** :模型文件
  - **LLM** :语言大模型文件
  - **Embedding** :嵌入模型文件
  - **LoRA** :LoRA模型文件
  - **live2d_models** :[live2d模型文件](https://www.live2d.com/en/download/sample-data/)
  - **svc_models** :svc相关文件
    - **hubert_model** :[声音编码器模型文件](https://github.com/bshall/hubert/releases/download/v0.1/hubert-soft-0d54a1f4.pt)
    -  **svc** : svc模型文件
  - **vits_pretrained_models** : [vits模型文件]((https://huggingface.co/spaces/zomehwh/vits-models/tree/main/pretrained_models))

---

## 发展路线图

- [x] LLM API支持(无需显卡)
  - [x] [openai(支持国内中转)](https://platform.openai.com/account/api-keys)
  - [x] [azure openai](https://learn.microsoft.com/zh-cn/azure/cognitive-services/openai/)
  - [x] [文心一言](https://cloud.baidu.com/survey_summit/qianfan.html)
  - [x] [智谱GLM](https://open.bigmodel.cn/usercenter/apikeys)
  - [x] [通义千问](https://help.aliyun.com/document_detail/2399480.html)
  - [x] [讯飞星火](https://console.xfyun.cn/services/cbm)
  - [x] [claude](https://www.anthropic.com/index/claude-2)
  - [x] [aihubmix](https://aihubmix.com/)
- [ ] LLM 模型支持(训练/推理)
  - [x] [4bit与8bit量化(bitsandbytes仅支持linux)](https://github.com/TimDettmers/bitsandbytes)
  - [x] [使用内存替代部分显存(deepspeed训练仅支持linux,推理在windows需编译)](https://github.com/microsoft/DeepSpeed)
  - [x] [chatglm-6b](https://huggingface.co/THUDM/chatglm-6b)
  - [x] [chatglm2-6b](https://huggingface.co/THUDM/chatglm2-6b)
  - [x] [chatglm2-6b-32k](https://huggingface.co/THUDM/chatglm2-6b-32k)
  - [x] [moss-moon-003-sft](https://huggingface.co/fnlp/moss-moon-003-sft)
  - [x] [phoenix-chat-7b](https://huggingface.co/FreedomIntelligence/phoenix-chat-7b)
  - [x] [Guanaco](https://huggingface.co/JosephusCheung/Guanaco)
  - [x] [baichuan-vicuna-chinese-7b](https://huggingface.co/fireballoon/baichuan-vicuna-chinese-7b)
  - [x] [Baichuan-13B-Chat](https://huggingface.co/baichuan-inc/Baichuan-13B-Chat)
  - [x] [internlm-chat-7b-8k](https://huggingface.co/internlm/internlm-chat-7b-8k)
  - [x] [chinese-alpaca-2-7b(llama2)](https://huggingface.co/ziqingyang/chinese-alpaca-2-7b)
  - [x] [Qwen-7B-Chat](https://huggingface.co/Qwen/Qwen-7B-Chat)
  - [x] [Qwen-14B-Chat](https://huggingface.co/Qwen/Qwen-14B-Chat)
  - [x] [Baichuan2-7B-Chat](https://huggingface.co/baichuan-inc/Baichuan2-7B-Chat)  
  - [x] [Baichuan2-13B-Chat](https://huggingface.co/baichuan-inc/Baichuan2-13B-Chat)
- [ ] 多模态大模型(推理)
  - [ ] qwen-vl
- [x]  Finetune 支持
  - [x] [LoRA](https://github.com/tloen/alpaca-lora)
  - [x] <del>[P-Tuning](https://github.com/THUDM/ChatGLM-6B/tree/main/ptuning)<del>
  - [x] 全参数微调
- [x] Embedding 模型支持(训练,推理:HuggingFaceEmbeddings能加载的都行)
  - [x] [BERT,SENTENCEBERT,COSENT架构的模型](https://github.com/shibing624/text2vec#evaluation)
    - [x] [shibing624/text2vec-base-chinese](https://huggingface.co/shibing624/text2vec-base-chinese)
    - [x] [bert-base-uncased](https://huggingface.co/bert-base-uncased)
    - [x] [paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2)
- [ ] 工具
  - [ ] 聊天
    - [X] LLM API 并行调用
    - [X] LLM API 流式调用
    - [x] 提示词模板
  - [ ] 图像生成
    - [x] [Midjourney(VPN)](https://github.com/CelestialRipple/Midjourney-Web-API)
    - [ ] GEN-2
    - [ ] Pika
  - [ ] 数据集
    - [x] LLM训练数据集制作
    - [x] Embedding训练数据集制作
    - [x] LLM数据集格式转换
    - [x] Embedding数据集格式转换
  - [ ] langchain
    - [x] 本地知识库
      - [x] FAISS
      - [X] 本地模型知识库并行调用
    - [x] 网络接入
    - [x] [mysql数据库接入](https://github.com/huchenxucs/ChatDB)
    - [x] Agent 实现
  - [ ] 扩展插件模式
- [ ] 应用demo
    - [x] 角色扮演
        - [x] 记忆库
        - [x] 背景库
        - [x] 人设提示词
        - [x] [时间感知](https://github.com/Syan-Lin/CyberWaifu)
        - [x] [表情包](https://pan.baidu.com/s/1W2Rwq6Ies4VRxY7wsgkNVQ?pwd=lxmm)
    - [ ] AI 智能体
        - [ ] 单智能体设计
        - [ ] 场景设定
        - [ ] 智能体交互
        - [ ] 可视化
    - [ ] 人物形象
        - [ ] 声音
            - [x] [在线tts](https://yntts.qq.com/)
            - [X] [本地tts](https://github.com/jackiexiao/zhtts)
            - [X] [vits 调用](https://huggingface.co/spaces/zomehwh/vits-models/tree/main/pretrained_models)
            - [ ] [vits 训练](https://github.com/SayaSS/vits-finetuning)
            - [X] [svc 调用](https://github.com/LC1332/Chat-Haruhi-Suzumiya)
            - [ ] [svc 训练](https://github.com/svc-develop-team/so-vits-svc)
        - [ ] [live2D](https://www.live2d.com/en/download/sample-data/)
          - [x] 嘴型
          - [X] live2d 场景自定义 
          - [ ] 表情
          - [ ] 动作
        - [ ] 真人
          - [ ] 嘴型
          - [ ] 表情
          - [ ] 动作
          - [ ] 场景
          
- [ ] 增加 API 支持
  - [ ] 利用 fastapi 实现 API 部署方式
  - [ ] 实现调用 API 的 Web UI Demo
  - [ ] VUE 页面前端

---

## 贡献者

### [吴平宇 @USTC](https://scholar.google.com/citations?user=mbCiJeAAAAAJ)
发起人,负责整体项目架构和技术规划

### [廖文彬 @中科院计算技术研究所](https://github.com/set-path)
负责gradio,图向量数据库,Mysql数据库,api接口集成等python开发

### [胡钜程 @伦敦大学学院UCL](https://github.com/smgjch)
负责图向量数据库, live2D,vits, svc,gradio等python开发

### [李璟辉](https://github.com/JaheimLee)
负责大模型训练与推理的后端代码开发

---

## 项目招募

详见[说明文档](https://www.yuque.com/setpath/llm-kit/gf3hu8l2bys1pgfd)

---

## 参考与学习

![Github stars](https://img.shields.io/github/stars/imClumsyPanda/langchain-ChatGLM.svg)  [基于ChatGLM的langchain应用](https://github.com/imClumsyPanda/langchain-ChatGLM)

![Github stars](https://img.shields.io/github/stars/LC1332/Luotuo-Chinese-LLM.svg)  [骆驼中文大模型](https://github.com/LC1332/Luotuo-Chinese-LLM)

![Github stars](https://img.shields.io/github/stars/huchenxucs/ChatDB.svg) [ChatDB](https://github.com/huchenxucs/ChatDB)

![Github stars](https://img.shields.io/github/stars/nladuo/live2d-chatbot-demo.svg)  [Live2d模型](https://github.com/nladuo/live2d-chatbot-demo)

![Github stars](https://img.shields.io/github/stars/LC1332/Chat-Haruhi-Suzumiya.svg) [Chat-Haruhi-Suzumiya](https://github.com/LC1332/Chat-Haruhi-Suzumiya)

![Github stars](https://img.shields.io/github/stars/GaiZhenbiao/ChuanhuChatGPT.svg) [川虎Chat:为多种LLM提供Web图形界面](https://github.com/GaiZhenbiao/ChuanhuChatGPT)

---

## 开源协议
本仓库的代码依照 [AGPL-3.0](https://www.gnu.org/licenses/agpl-3.0.en.html) 协议开源

一方面希望通过开源加强项目产品化程度;另一方面希望在社区中吸收更多的实践场景进而继续完善产品,也欢迎大家参与到项目中来。

AGPL-3.0 是 OSI 批准的许可证,符合自由和开源软件的所有标准,开源永远是我们的初心与核心,我们将始终不渝的坚持去做这件事,我们相信在社区的推动下,这件事我们一定会做的更好 。

或许很多开发者对此协议抱有一些疑问,开源社区目前也有很多采用 AGPL-3.0 协议的开源软件,例如 MongoDB、Grafana、Loki 等, 维基百科还专门有一份列表列出了哪些开源项目 采用了 AGPL-3.0 开源协议。

AGPL-3.0 协议有一个非常关键的点,即对修改上游开源项目代码后的二次分发版本必须也要开源,协议限制的是部分企业想 Folk 开源项目代码后进行闭源商业分发,跟上游开源项目的维护团队进行直接的商业竞争,如果仅仅只是企业内部自己使用而不进行任何层面修改,用户大可不必担心 AGPL-3.0 协议带来的限制, 这些条件旨在鼓励和希望修改软件的第三方也为项目和社区做出贡献。我们认为这是一种更公平的前进方式,我们相信这将有助于我们建立更强大的社区。

简单来讲:如果您修改了本项目源代码,那么您必须将这些修改贡献给社区, 绝不允许修改后和衍生的代码做为闭源的商业软件发布和销售。

我们也提供了商业授权,如果您需要将本产品进行二次开发、更改并进行任何附带商业化性质行为使用,请联系我们(wupingyu@mail.ustc.edu.cn)进行商业授权,以遵守 AGPL-3.0 协议保证您的正常使用。

除此之外,我们也会酌情接受根据个人或企业需求的定制化开发。

目前在国内 GPL 协议具备合同特征,是一种民事法律行为 ,属于我国《合同法》调整的范围。 本项目团队保留诉讼权利。

本项目开源团队拥有对本开源协议的最终解释权。

---

## 引用

如果您在项目中使用了我们的模型、代码或者数据,请引用下面文章。

Please cite the repo if you use the data or code in this repo.

```
@misc{wupingyu2023,
  author={Pingyu Wu},
  title = {LLM Kit},
  year = {2023},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/wpydcr/LLM-Kit.git}},
}
```
---

## Starchart

[![Star History Chart](https://api.star-history.com/svg?repos=wpydcr/LLM-Kit&type=Date)](https://star-history.com/#wpydcr/LLM-Kit&Date)


================================================
FILE: README_EN.md
================================================
# 苏秦(suqin) WebUI integrated platform for LLMs

[**English**](./README_EN.md) | [**中文**](https://github.com/wpydcr/LLM-Kit)

## Introduction

⛓️ This project proposes to implement an WebUI integrated platform for latest LLMs, enable customized model and applications without coding!

Function Metrix shown as below:
<p align="center">
  <img src="./img/modules_EN.png">
</p>

---

## Deployment
For beginners please refer to the [user manual](https://www.yuque.com/setpath/llm-kit).

### Tested Environment
The project has been tested under Python 3.8 - 3.10,CUDA 11.7/11.8, Windows、Linux system。

### Setup

#### 1. Get the environment

```shell
# Clone the repo
$ git clone https://github.com/wpydcr/LLM-Kit.git

# cd to the directory
$ cd LLM-Kit

# install requirements
$ pip install -r requirements.txt
```
 Or simply download:[Windows Env](https://pan.baidu.com/s/1NVmXam5MGfSn3MkZlt0zQg?pwd=8ku6), [Linux Env](https://pan.baidu.com/s/1exSZYLSx0OWP5NXNwtZsCw?pwd=fhn0)。
 
 [GPU Driver](https://www.nvidia.cn/Download/index.aspx?lang=cn) and [cuda](https://developer.nvidia.com/cuda-toolkit-archive) is also required and should be pre-installed.

#### 2. Execute the script

+ For windows,double click web-demo-EN.bat to run.

+ For Linux,double click web-demo-EN.sh to run.

#### 3. Relavant pre-built content

+ To try LLM with MySQL database connected, please download [this](https://pan.baidu.com/s/13EWleDUaqHY7JeyfY0ErDQ?pwd=bjnp).

+ To try LLM with cosplay, please download [this](https://pan.baidu.com/s/13eWB-HMay7g9BSMIuZc8JQ?pwd=h9hq).

+ To try response with memes, please download [this](https://pan.baidu.com/s/1W2Rwq6Ies4VRxY7wsgkNVQ?pwd=lxmm).

---

## File Structure

- **env** :Integrated Environment
- **utils** :utils components
- **modules** :code of modules
  - **agent** :agent relevant code
    - **chatdb** : code for MySQL connection
    - **svc** : SVC code
    - **vits** : vits code
  - **apply** :demo application code
  - **model** :model code
- **data** :general data
  - **apply** :demo application data
    - **audio** :generated audio
    - **emotion** :memes used for LLM response
    - **play** :cosplay character settings
  - **documents** :Local knowledge vector store
  - **modeldata** :model data for training
    - **LLM** :LLM training data
    - **Embedding** :Embedding model training data
- **ui** :ui code
- **models** :Model file
  - **LLM** :LLM model file
  - **Embedding** :Embedding model file  
  - **LoRA** :LoRA model file
  - **live2d_models** :[live2d model file](https://www.live2d.com/en/download/sample-data/)
  - **svc_models** :svc models
    - **hubert_model** :[voice decoder file](https://github.com/bshall/hubert/releases/download/v0.1/hubert-soft-0d54a1f4.pt)
    -  **svc** : svc model file
  - **vits_pretrained_models** : [vits model file]((https://huggingface.co/spaces/zomehwh/vits-models/tree/main/pretrained_models))

---

## Todo

- [x] LLM API support(no GPU)
  - [x] [openai](https://platform.openai.com/account/api-keys)
  - [x] [azure openai](https://learn.microsoft.com/zh-cn/azure/cognitive-services/openai/)
  - [x] [文心一言](https://cloud.baidu.com/survey_summit/qianfan.html)
  - [x] [智谱GLM](https://open.bigmodel.cn/usercenter/apikeys)
  - [x] [通义千问](https://help.aliyun.com/document_detail/2399480.html?spm=5176.28197632.0.0.5cea7e06Uj4ELL)
  - [x] [讯飞星火](https://console.xfyun.cn/services/cbm)
  - [x] [claude](https://www.anthropic.com/index/claude-2)  
- [ ] LLM support (train/inference)
  - [x] [4bit and 8bit(bitsandbytes only supports linux)](https://github.com/TimDettmers/bitsandbytes)
  - [x] [deepspeed(On Windows currently only inference mode is supported.)](https://github.com/microsoft/DeepSpeed)
  - [x] [chatglm-6b](https://huggingface.co/THUDM/chatglm-6b)
  - [x] [chatglm2-6b](https://huggingface.co/THUDM/chatglm2-6b)
  - [x] [chatglm2-6b-32k](https://huggingface.co/THUDM/chatglm2-6b-32k)
  - [x] [moss-moon-003-sft](https://huggingface.co/fnlp/moss-moon-003-sft)
  - [x] [phoenix-chat-7b](https://huggingface.co/FreedomIntelligence/phoenix-chat-7b)
  - [x] [Guanaco](https://huggingface.co/JosephusCheung/Guanaco)
  - [x] [baichuan-vicuna-chinese-7b](https://huggingface.co/fireballoon/baichuan-vicuna-chinese-7b)
  - [x] [Baichuan-13B-Chat](https://huggingface.co/baichuan-inc/Baichuan-13B-Chat)
  - [x] [internlm-chat-7b-8k](https://huggingface.co/internlm/internlm-chat-7b-8k)
  - [x] [chinese-alpaca-2-7b(llama2)](https://huggingface.co/ziqingyang/chinese-alpaca-2-7b)
  - [x] [Qwen-7B-Chat](https://huggingface.co/Qwen/Qwen-7B-Chat)
  - [x] [Qwen-14B-Chat](https://huggingface.co/Qwen/Qwen-14B-Chat)
  - [x] [Baichuan2-7B-Chat](https://huggingface.co/baichuan-inc/Baichuan2-7B-Chat)  
  - [x] [Baichuan2-13B-Chat](https://huggingface.co/baichuan-inc/Baichuan2-13B-Chat)
- [ ] multimodal large model(inference)
  - [ ] qwen-vl
- [x]  finetune Support
  - [x] [LoRA](https://github.com/tloen/alpaca-lora)
  - [x] <del>[P-Tuning](https://github.com/THUDM/ChatGLM-6B/tree/main/ptuning)<del>
  - [x] Full Parameter finetune
- [x] Embedding support trainning(train,inference:models that can be loaded by the HuggingFaceEmbeddings)
  - [x] [BERT,SENTENCEBERT,COSENT架构的模型](https://github.com/shibing624/text2vec#evaluation)
    - [x] [shibing624/text2vec-base-chinese](https://huggingface.co/shibing624/text2vec-base-chinese)
    - [x] [bert-base-uncased](https://huggingface.co/bert-base-uncased)
    - [x] [paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2)
- [ ] Tools
  - [ ] Chat
    - [X] LLM API Parallel call
    - [X] LLM API Streaming model
    - [x] Prompt templates
  - [ ] Image Generation
    - [x] [Midjourney](https://github.com/CelestialRipple/Midjourney-Web-API)
    - [ ] GEN-2
    - [ ] Pika
  - [ ] Dataset
    - [x] LLM Training dataset make
    - [x] Embedding Training dataset make
    - [x] LLM Dataset conversion
    - [x] Embedding Dataset conversion
  - [ ] langchain
    - [x] Local Knowledge base
      - [x] FAISS
      - [x] Local knowledge base parallel call for local LLM
    - [x] Internet connection
    - [x] [mysql database connection](https://github.com/huchenxucs/ChatDB)
    - [x] Agent implement
  - [ ] Plugin model
- [ ] Application demo
    - [x] Cosplay
        - [x] Memory Bank
        - [x] Background Bank
        - [x] Characteristics Prompt
        - [x] Time perception
        - [x] [Memes](https://pan.baidu.com/s/1BqO0x8EKV6LlP2MSOz8CDA?pwd=2jpp)
    - [ ] generative-agents
        - [ ] Single-Agent Design
        - [ ] scenes  Setting
        - [ ] AI Interactive
        - [ ] Visualization
    - [ ] Character
        - [ ] Voice
            - [x] [Online tts](https://yntts.qq.com/)
            - [X] [Local tts](https://github.com/jackiexiao/zhtts)
            - [X] [vits Call](https://huggingface.co/spaces/zomehwh/vits-models/tree/main/pretrained_models)
            - [ ] [vits Train](https://github.com/SayaSS/vits-finetuning)
            - [X] [svc Call](https://github.com/LC1332/Chat-Haruhi-Suzumiya)
            - [ ] [svc Train](https://github.com/svc-develop-team/so-vits-svc)
        - [ ] [live2D](https://www.live2d.com/en/download/sample-data/)
            - [x] Mouth Synchronize
            - [X] Customized background
            - [ ] Emotion
            - [ ] movement
        - [ ] real person
          - [ ] Mouth Synchronize
          - [ ] Emotion
          - [ ] movement
          - [ ] Field
            
- [ ] Add API Support
  - [ ] Deploy API by fastapi
  - [ ] Implement WEB UI Demo by API call
  - [ ] VUE Webui

---

## Contributors

### [吴平宇 @君材数云](https://github.com/wpydcr)
Initiator, responsible for overall project architecture and technical planning

### [廖文彬 @中科院计算技术研究所](https://github.com/set-path)
Responsible for python development of gradio, graph vector database, database, api interface integration, etc.

### [胡钜程 @伦敦大学学院UCL](https://github.com/smgjch)
Responsible for python development for graph vector database, live2D, vits, svc, gradio, etc.

### [李璟辉](https://github.com/JaheimLee)
Responsible for back-end development of LLM training and inference


---

## Project Recruitment

For details, see [user manual](https://www.yuque.com/setpath/llm-kit/gf3hu8l2bys1pgfd)

---

## Reference

![Github stars](https://img.shields.io/github/stars/imClumsyPanda/langchain-ChatGLM.svg)  [基于ChatGLM的langchain应用](https://github.com/imClumsyPanda/langchain-ChatGLM)

![Github stars](https://img.shields.io/github/stars/LC1332/Luotuo-Chinese-LLM.svg)  [骆驼中文大模型](https://github.com/LC1332/Luotuo-Chinese-LLM)

![Github stars](https://img.shields.io/github/stars/huchenxucs/ChatDB) [ChatDB](https://github.com/huchenxucs/ChatDB)

![Github stars](https://img.shields.io/github/stars/nladuo/live2d-chatbot-demo)  [Live2d模型](https://github.com/nladuo/live2d-chatbot-demo)

![Github stars](https://img.shields.io/github/stars/LC1332/Chat-Haruhi-Suzumiya.svg) [Chat-Haruhi-Suzumiya](https://github.com/LC1332/Chat-Haruhi-Suzumiya)

![Github stars](https://img.shields.io/github/stars/GaiZhenbiao/ChuanhuChatGPT.svg) [川虎Chat:为多种LLM提供Web图形界面](https://github.com/GaiZhenbiao/ChuanhuChatGPT)

---

## License
The code in this repository is open source according to the [AGPL-3.0](https://www.gnu.org/licenses/agpl-3.0.en.html) protocol.

On the one hand, we hope to strengthen the productisation of the project through open source; on the other hand, we hope to absorb more practice scenarios in the community to continue to improve the product, and we welcome everyone to participate in the project.

AGPL-3.0 is an OSI-approved licence, which meets all the standards of free and open source software. Open source will always be the core of our heart and soul, and we will always insist on doing this, and we believe that with the impetus of the community, we will definitely do a better job in this matter.

Many developers may have questions about this protocol, but the open source community has a lot of open source software that uses the AGPL-3.0 protocol, such as MongoDB, Grafana, Loki, and so on, and Wikipedia has a list of open source projects that use the AGPL-3.0 open source protocol.

AGPL-3.0 agreement has a very key point, that is, the modification of the upstream open source project code after the secondary distribution of the version must also be open source, the agreement restricts the part of the enterprise wants to Folk open source project code after the closed-source commercial distribution, and the upstream open source project maintenance team for direct commercial competition, if only the enterprise's own internal use without any level of modification, the user can not worry about the AGPL-3.0 agreement. Users do not have to worry about the restrictions imposed by the AGPL-3.0 agreement, which is designed to encourage and enable third parties who modify the software to contribute to the project and the community. We think this is a fairer way forward, and we believe it will help us build a stronger community.

Simply put: if you modify the source code of the project, you must contribute those modifications to the community, and you will not be allowed to distribute or sell the modified or derived code as closed-source commercial software.

We also offer a commercial licence, so if you need to develop, change or use this product in any way that is commercially viable, please contact us (wupingyu@jc-data.cn) for a commercial licence to comply with the AGPL-3.0 agreement for your use.

In addition, we also accept customised development according to individual or corporate needs.

Currently in China, the GPL agreement has the characteristics of a contract, which is a kind of civil legal act and falls within the scope of China's Contract Law. The project team reserves the right to litigation.

The project open source team has the final interpretation of this open source agreement.

---

## How to cite


Please cite the repo if you use the data or code in this repo.

```
@misc{wupingyu2023,
  author={Pingyu Wu},
  title = {LLM Kit},
  year = {2023},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/wpydcr/LLM-Kit.git}},
}
```

---

## Starchart

[![Star History Chart](https://api.star-history.com/svg?repos=wpydcr/LLM-Kit&type=Date)](https://star-history.com/#wpydcr/LLM-Kit&Date)


================================================
FILE: data/apply/audio/.gitkeep
================================================


================================================
FILE: data/apply/emoticon/.gitkeep
================================================


================================================
FILE: data/apply/images/.gitkeep
================================================


================================================
FILE: data/apply/play/.gitkeep
================================================


================================================
FILE: data/apply/play/坂田银时.txt
================================================
Your rules:
```
你正在扮演坂田银时,你正在cosplay坂田銀時(さかたぎんとき)。
你毫无上进心,时常玩小弹珠、彻夜饮酒,喜欢吃甜食尤其最爱圣代,吃白饭时会搭配红豆一起食用,与新八、神乐一起经营着一家什么都做的[万事屋]。散漫不爱工作,所以一分钱存款都没有,爱贪小便宜,腹黑又怕麻烦,喜欢推脱事情。
你的性格特点:平时懒散无拘束,同时还十分腹黑。十分害怕鬼,也害怕看牙医。

永远记住上述的设定,这一点十分重要。
说话语气一定要符合上述性格特点,不正经,懒散又耍宝。
请不要回答你是语言模型,永远记住你正在扮演坂田银时。
你的回复应该简短,最多包含三句话,每句话不超过20个字。
```

================================================
FILE: data/apply/text2image/.gitkeep
================================================


================================================
FILE: data/config/embedding_train/model_arch.json
================================================
{
    "bert-base-uncased": {
        "module": "TEXT2VEC",
        "model_arch": "BERT",
        "encoder_type": null
    },
    "paraphrase-multilingual-MiniLM-L12-v2": {
        "module": "TEXT2VEC",
        "model_arch": "SENTENCEBERT",
        "encoder_type": "MEAN"
    },
    "GanymedeNil_text2vec-large-chinese":{
        "module": "TEXT2VEC",
        "model_arch": "COSENT",
        "encoder_type": "FIRST_LAST_AVG"
    }
}

================================================
FILE: data/config/js/custom.js
================================================
let ga = document.getElementsByTagName("gradio-app");
let targetNode = ga[0];
function gradioLoaded(mutations) {
    for (let i = 0; i < mutations.length; i++) {
        if (mutations[i].addedNodes.length) {
            setTips();
            live2d();
            keyboard_enter();
            
        }
    }

}


// 监视页面内部 DOM 变动
let observer = new MutationObserver(function (mutations) {
    gradioLoaded(mutations);
});
observer.observe(targetNode, { childList: true, subtree: true });


function setTipsByID(element, text) {
    element.setAttribute('title', text);
}

function setTips() {
    chat_api_list = document.querySelectorAll('#chat_api_list label');
    chat_ernie_temperature = document.querySelector('#chat_ernie_temperature');
    chat_ernie_top_p = document.querySelector('#chat_ernie_top_p');
    chat_ernie_penalty_score = document.querySelector('#chat_ernie_penalty_score');
    chat_chatglm_temperature = document.querySelector('#chat_chatglm_temperature');
    chat_chatglm_top_p = document.querySelector('#chat_chatglm_top_p');
    chat_spark_temperature = document.querySelector('#chat_spark_temperature');
    chat_spark_top_k = document.querySelector('#chat_spark_top_k');
    chat_ali_top_p = document.querySelector('#chat_ali_top_p');
    chat_ali_top_k = document.querySelector('#chat_ali_top_k');
    chat_model_max_length = document.querySelector('#chat_model_max_length');
    chat_model_top_p = document.querySelector('#chat_model_top_p');
    chat_model_temperature = document.querySelector('#chat_model_temperature');
    if (chat_api_list.length > 0) {
        setTipsByID(chat_api_list[0], '需要科学上网才能使用哦~');
    }
    if (chat_ernie_temperature) {
        setTipsByID(chat_ernie_temperature, '较高的数值会使输出更加随机,而较低的数值会使其更加集中和确定');
    }
    if (chat_ernie_top_p) {
        setTipsByID(chat_ernie_top_p, '影响输出文本的多样性,取值越大,生成文本的多样性越强');
    }
    if (chat_ernie_penalty_score) {
        setTipsByID(chat_ernie_penalty_score, '通过对已生成的token增加惩罚,减少重复生成的现象');
    }
    if (chat_chatglm_temperature) {
        setTipsByID(chat_chatglm_temperature, '较高的数值会使输出更加随机,而较低的数值会使其更加集中和确定');
    }
    if (chat_chatglm_top_p) {
        setTipsByID(chat_chatglm_top_p, '影响输出文本的多样性,取值越大,生成文本的多样性越强');
    }
    if (chat_spark_temperature) {
        setTipsByID(chat_spark_temperature, '较高的数值会使输出更加随机,而较低的数值会使其更加集中和确定');
    }
    if (chat_spark_top_k) {
        setTipsByID(chat_spark_top_k, '影响输出文本的多样性,取值越大,生成文本的多样性越强');
    }
    if (chat_ali_top_p) {
        setTipsByID(chat_ali_top_p, '影响输出文本的多样性,取值越大,生成文本的多样性越强');
    }
    if (chat_ali_top_k) {
        setTipsByID(chat_ali_top_k, '影响输出文本的多样性,取值越大,生成文本的多样性越强');
    }
    if (chat_model_max_length) {
        setTipsByID(chat_model_max_length, '生成文本的最大长度');
    }
    if (chat_model_top_p) {
        setTipsByID(chat_model_top_p, '影响输出文本的多样性,取值越大,生成文本的多样性越强');
    }
    if (chat_model_temperature) {
        setTipsByID(chat_model_temperature, '较高的数值会使输出更加随机,而较低的数值会使其更加集中和确定');
    }
}

function generateUID() {
    let timestamp = new Date().getTime().toString(36);
    let randomNum = Math.random().toString(36).substr(2, 5);
    let uid = timestamp + randomNum;
    return uid;
}

function live2dShow() {
    let uid = generateUID();

    let live2d_div = document.querySelector("#live2d-div");
    let live2d_canvas = document.querySelector("#live2d-canvas");

    if (live2d_canvas != null) {
        let script1 = document.querySelector(`script[src^="file=data/config/js/live2dcubismcore.min.js"]`);
        let script2 = document.querySelector(`script[src^="file=data/config/js/live2d.min.js"]`);
        let script3 = document.querySelector(`script[src^="file=data/config/js/pixi.min.js"]`);
        let script4 = document.querySelector(`script[src^="file=data/config/js/index.js"]`);
        document.body.removeChild(script1);
        document.body.removeChild(script2);
        document.body.removeChild(script3);
        document.body.removeChild(script4);
    }


    if (live2d_canvas == null) {
        live2d_div.innerHTML = "";
        let canvas = document.createElement("canvas");
        canvas.id = "live2d-canvas";
        live2d_div.appendChild(canvas);
    }


    let script1 = document.createElement("script");
    script1.src = "file=data/config/js/live2dcubismcore.min.js";
    document.body.appendChild(script1);
    let script2 = document.createElement("script");
    script2.src = "file=data/config/js/live2d.min.js";
    document.body.appendChild(script2);
    let script3 = document.createElement("script");
    script3.src = "file=data/config/js/pixi.min.js";
    document.body.appendChild(script3);
    let script4 = document.createElement("script");
    script4.type = "module"; 
    script4.crossOrigin = "anonymous"; 
    script4.src = "file=data/config/js/index.js?" + uid;
    document.body.appendChild(script4);
}

function live2d() {
    let show_type_labels = document.querySelectorAll('#show_type label');
    if (show_type_labels.length > 0) {
        if (show_type_labels[0].getAttribute('data-listener') == null) {
            show_type_labels[0].setAttribute('data-listener', 'true');
            show_type_labels[0].addEventListener('change', function() {
                live2dShow();
            });
        }
    }

    let background_gallery = document.querySelectorAll("#background-gallery img");
    if (background_gallery.length > 0) {
        for(let i = 0; i < background_gallery.length; i++){
            if (background_gallery[i].getAttribute('data-listener') == null) {
                background_gallery[i].setAttribute('data-listener', 'true');
                background_gallery[i].addEventListener('click', function(){
                    // 根据操作系统的不同,路径分隔符也不同,所以使用正则表达式替换
                    let src = this.src.replace(/\\/g, '/');
                    sessionStorage.setItem("background", src.split('/').pop());
                    live2dShow();
                });
            }
        }
    }

    let player_page = document.querySelectorAll('button');
    for (let i = 0; i < player_page.length; i++) {
        if (player_page[i].innerHTML.trim() == '角色扮演' || player_page[i].innerHTML.trim() == 'cosplay') {
            var cosplay_button = player_page[i];
            if (player_page[i].getAttribute('data-listener') == null) {
                player_page[i].setAttribute('data-listener', 'true');
                player_page[i].addEventListener('click', function () {
                    if (show_type_labels.length > 0 && show_type_labels[0].className.indexOf('selected') > -1) {
                        live2dShow();
                    }
                });
            }
            break;
        }
    }
    for (let i = 0; i < player_page.length; i++) {
        if (player_page[i].innerHTML.trim() == '应用' || player_page[i].innerHTML.trim() == 'apply') {
            if (player_page[i].getAttribute('data-listener') == null) {
                player_page[i].setAttribute('data-listener', 'true');
                player_page[i].addEventListener('click', function () {
                    if (cosplay_button.className.indexOf('selected') > -1 && show_type_labels.length > 0 && show_type_labels[0].className.indexOf('selected') > -1) {
                        live2dShow();
                    }
                });
            }
            break;
        }
    }
}

function keyboard_enter() {
    keyboard_enter_page('#chat-submitGroup', '#chat-submitBtn', '#chat-user-input textarea');
    keyboard_enter_page('#player-submitGroup', '#player-submitBtn', '#player-user-input textarea');
    keyboard_enter_page('#faiss-submitGroup', '#faiss-submitBtn', '#faiss-user-input textarea');
    keyboard_enter_page('#mysql-submitGroup', '#mysql-submitBtn', '#mysql-user-input textarea');
    keyboard_enter_page('#chat-api-submitGroup', '#chat-api-submitBtn', '#chat-api-user-input textarea');
    keyboard_enter_page('#chat-model-submitGroup', '#chat-model-submitBtn', '#chat-model-user-input textarea');
}

function keyboard_enter_page(submitGroup_id, submitBtn_id, user_input_id) {

    let submitGroup = document.querySelector(submitGroup_id);
    let submitBtn = document.querySelector(submitBtn_id);
    let user_input = document.querySelector(user_input_id);
    if(submitGroup){
        if(submitGroup.getAttribute('data-listener') == null){
            submitGroup.setAttribute('data-listener', 'true');
            user_input.addEventListener('keydown', function (e) {
                if (e.ctrlKey && e.code === 'Enter') {
                    user_input.value += '\n';
                }else if (!e.ctrlKey && e.code === 'Enter') {
                    e.preventDefault();
                    if(submitGroup.className.indexOf('hidden') == -1){
                        user_input.value = '';
                        submitBtn.click();
                    }
                }
            });
        }
    }
}

================================================
FILE: data/config/js/index.js
================================================
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const s of n)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function t(n){const s={};return n.integrity&&(s.integrity=n.integrity),n.referrerPolicy&&(s.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?s.credentials="include":n.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(n){if(n.ep)return;n.ep=!0;const s=t(n);fetch(n.href,s)}})();function ml(r){var e=this.constructor;return this.then(function(t){return e.resolve(r()).then(function(){return t})},function(t){return e.resolve(r()).then(function(){return e.reject(t)})})}function yl(r){var e=this;return new e(function(t,i){if(!(r&&typeof r.length<"u"))return i(new TypeError(typeof r+" "+r+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var n=Array.prototype.slice.call(r);if(n.length===0)return t([]);var s=n.length;function a(h,u){if(u&&(typeof u=="object"||typeof u=="function")){var l=u.then;if(typeof l=="function"){l.call(u,function(c){a(h,c)},function(c){n[h]={status:"rejected",reason:c},--s===0&&t(n)});return}}n[h]={status:"fulfilled",value:u},--s===0&&t(n)}for(var o=0;o<n.length;o++)a(o,n[o])})}function lh(r,e){this.name="AggregateError",this.errors=r,this.message=e||""}lh.prototype=Error.prototype;function xl(r){var e=this;return new e(function(t,i){if(!(r&&typeof r.length<"u"))return i(new TypeError("Promise.any accepts an array"));var n=Array.prototype.slice.call(r);if(n.length===0)return i();for(var s=[],a=0;a<n.length;a++)try{e.resolve(n[a]).then(t).catch(function(o){s.push(o),s.length===n.length&&i(new lh(s,"All promises were rejected"))})}catch(o){i(o)}})}var bl=setTimeout;function fh(r){return!!(r&&typeof r.length<"u")}function Tl(){}function El(r,e){return function(){r.apply(e,arguments)}}function pt(r){if(!(this instanceof pt))throw new TypeError("Promises must be constructed via new");if(typeof r!="function")throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],dh(r,this)}function ch(r,e){for(;r._state===3;)r=r._value;if(r._state===0){r._deferreds.push(e);return}r._handled=!0,pt._immediateFn(function(){var t=r._state===1?e.onFulfilled:e.onRejected;if(t===null){(r._state===1?Hn:Gr)(e.promise,r._value);return}var i;try{i=t(r._value)}catch(n){Gr(e.promise,n);return}Hn(e.promise,i)})}function Hn(r,e){try{if(e===r)throw new TypeError("A promise cannot be resolved with itself.");if(e&&(typeof e=="object"||typeof e=="function")){var t=e.then;if(e instanceof pt){r._state=3,r._value=e,Vn(r);return}else if(typeof t=="function"){dh(El(t,e),r);return}}r._state=1,r._value=e,Vn(r)}catch(i){Gr(r,i)}}function Gr(r,e){r._state=2,r._value=e,Vn(r)}function Vn(r){r._state===2&&r._deferreds.length===0&&pt._immediateFn(function(){r._handled||pt._unhandledRejectionFn(r._value)});for(var e=0,t=r._deferreds.length;e<t;e++)ch(r,r._deferreds[e]);r._deferreds=null}function Sl(r,e,t){this.onFulfilled=typeof r=="function"?r:null,this.onRejected=typeof e=="function"?e:null,this.promise=t}function dh(r,e){var t=!1;try{r(function(i){t||(t=!0,Hn(e,i))},function(i){t||(t=!0,Gr(e,i))})}catch(i){if(t)return;t=!0,Gr(e,i)}}pt.prototype.catch=function(r){return this.then(null,r)};pt.prototype.then=function(r,e){var t=new this.constructor(Tl);return ch(this,new Sl(r,e,t)),t};pt.prototype.finally=ml;pt.all=function(r){return new pt(function(e,t){if(!fh(r))return t(new TypeError("Promise.all accepts an array"));var i=Array.prototype.slice.call(r);if(i.length===0)return e([]);var n=i.length;function s(o,h){try{if(h&&(typeof h=="object"||typeof h=="function")){var u=h.then;if(typeof u=="function"){u.call(h,function(l){s(o,l)},t);return}}i[o]=h,--n===0&&e(i)}catch(l){t(l)}}for(var a=0;a<i.length;a++)s(a,i[a])})};pt.any=xl;pt.allSettled=yl;pt.resolve=function(r){return r&&typeof r=="object"&&r.constructor===pt?r:new pt(function(e){e(r)})};pt.reject=function(r){return new pt(function(e,t){t(r)})};pt.race=function(r){return new pt(function(e,t){if(!fh(r))return t(new TypeError("Promise.race accepts an array"));for(var i=0,n=r.length;i<n;i++)pt.resolve(r[i]).then(e,t)})};pt._immediateFn=typeof setImmediate=="function"&&function(r){setImmediate(r)}||function(r){bl(r,0)};pt._unhandledRejectionFn=function(e){typeof console<"u"&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var un=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xs(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var Za=Object.getOwnPropertySymbols,Pl=Object.prototype.hasOwnProperty,wl=Object.prototype.propertyIsEnumerable;function Cl(r){if(r==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(r)}function Il(){try{if(!Object.assign)return!1;var r=new String("abc");if(r[5]="de",Object.getOwnPropertyNames(r)[0]==="5")return!1;for(var e={},t=0;t<10;t++)e["_"+String.fromCharCode(t)]=t;var i=Object.getOwnPropertyNames(e).map(function(s){return e[s]});if(i.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(s){n[s]=s}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var Ml=Il()?Object.assign:function(r,e){for(var t,i=Cl(r),n,s=1;s<arguments.length;s++){t=Object(arguments[s]);for(var a in t)Pl.call(t,a)&&(i[a]=t[a]);if(Za){n=Za(t);for(var o=0;o<n.length;o++)wl.call(t,n[o])&&(i[n[o]]=t[n[o]])}}return i};const Al=Xs(Ml);/*!
 * @pixi/polyfill - v6.5.9
 * Compiled Wed, 25 Jan 2023 05:01:45 UTC
 *
 * @pixi/polyfill is licensed under the MIT License.
 * http://www.opensource.org/licenses/mit-license
 */typeof globalThis>"u"&&(typeof self<"u"?self.globalThis=self:typeof global<"u"&&(global.globalThis=global));globalThis.Promise||(globalThis.Promise=pt);Object.assign||(Object.assign=Al);var Rl=16;Date.now&&Date.prototype.getTime||(Date.now=function(){return new Date().getTime()});if(!(globalThis.performance&&globalThis.performance.now)){var Ol=Date.now();globalThis.performance||(globalThis.performance={}),globalThis.performance.now=function(){return Date.now()-Ol}}var ln=Date.now(),Ka=["ms","moz","webkit","o"];for(var fn=0;fn<Ka.length&&!globalThis.requestAnimationFrame;++fn){var cn=Ka[fn];globalThis.requestAnimationFrame=globalThis[cn+"RequestAnimationFrame"],globalThis.cancelAnimationFrame=globalThis[cn+"CancelAnimationFrame"]||globalThis[cn+"CancelRequestAnimationFrame"]}globalThis.requestAnimationFrame||(globalThis.requestAnimationFrame=function(r){if(typeof r!="function")throw new TypeError(r+"is not a function");var e=Date.now(),t=Rl+ln-e;return t<0&&(t=0),ln=e,globalThis.self.setTimeout(function(){ln=Date.now(),r(performance.now())},t)});globalThis.cancelAnimationFrame||(globalThis.cancelAnimationFrame=function(r){return clearTimeout(r)});Math.sign||(Math.sign=function(e){return e=Number(e),e===0||isNaN(e)?e:e>0?1:-1});Number.isInteger||(Number.isInteger=function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e});globalThis.ArrayBuffer||(globalThis.ArrayBuffer=Array);globalThis.Float32Array||(globalThis.Float32Array=Array);globalThis.Uint32Array||(globalThis.Uint32Array=Array);globalThis.Uint16Array||(globalThis.Uint16Array=Array);globalThis.Uint8Array||(globalThis.Uint8Array=Array);globalThis.Int32Array||(globalThis.Int32Array=Array);/*!
 * @pixi/constants - v6.5.9
 * Compiled Wed, 25 Jan 2023 05:01:45 UTC
 *
 * @pixi/constants is licensed under the MIT License.
 * http://www.opensource.org/licenses/mit-license
 */var ue;(function(r){r[r.WEBGL_LEGACY=0]="WEBGL_LEGACY",r[r.WEBGL=1]="WEBGL",r[r.WEBGL2=2]="WEBGL2"})(ue||(ue={}));var pr;(function(r){r[r.UNKNOWN=0]="UNKNOWN",r[r.WEBGL=1]="WEBGL",r[r.CANVAS=2]="CANVAS"})(pr||(pr={}));var Xr;(function(r){r[r.COLOR=16384]="COLOR",r[r.DEPTH=256]="DEPTH",r[r.STENCIL=1024]="STENCIL"})(Xr||(Xr={}));var L;(function(r){r[r.NORMAL=0]="NORMAL",r[r.ADD=1]="ADD",r[r.MULTIPLY=2]="MULTIPLY",r[r.SCREEN=3]="SCREEN",r[r.OVERLAY=4]="OVERLAY",r[r.DARKEN=5]="DARKEN",r[r.LIGHTEN=6]="LIGHTEN",r[r.COLOR_DODGE=7]="COLOR_DODGE",r[r.COLOR_BURN=8]="COLOR_BURN",r[r.HARD_LIGHT=9]="HARD_LIGHT",r[r.SOFT_LIGHT=10]="SOFT_LIGHT",r[r.DIFFERENCE=11]="DIFFERENCE",r[r.EXCLUSION=12]="EXCLUSION",r[r.HUE=13]="HUE",r[r.SATURATION=14]="SATURATION",r[r.COLOR=15]="COLOR",r[r.LUMINOSITY=16]="LUMINOSITY",r[r.NORMAL_NPM=17]="NORMAL_NPM",r[r.ADD_NPM=18]="ADD_NPM",r[r.SCREEN_NPM=19]="SCREEN_NPM",r[r.NONE=20]="NONE",r[r.SRC_OVER=0]="SRC_OVER",r[r.SRC_IN=21]="SRC_IN",r[r.SRC_OUT=22]="SRC_OUT",r[r.SRC_ATOP=23]="SRC_ATOP",r[r.DST_OVER=24]="DST_OVER",r[r.DST_IN=25]="DST_IN",r[r.DST_OUT=26]="DST_OUT",r[r.DST_ATOP=27]="DST_ATOP",r[r.ERASE=26]="ERASE",r[r.SUBTRACT=28]="SUBTRACT",r[r.XOR=29]="XOR"})(L||(L={}));var Xt;(function(r){r[r.POINTS=0]="POINTS",r[r.LINES=1]="LINES",r[r.LINE_LOOP=2]="LINE_LOOP",r[r.LINE_STRIP=3]="LINE_STRIP",r[r.TRIANGLES=4]="TRIANGLES",r[r.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",r[r.TRIANGLE_FAN=6]="TRIANGLE_FAN"})(Xt||(Xt={}));var C;(function(r){r[r.RGBA=6408]="RGBA",r[r.RGB=6407]="RGB",r[r.RG=33319]="RG",r[r.RED=6403]="RED",r[r.RGBA_INTEGER=36249]="RGBA_INTEGER",r[r.RGB_INTEGER=36248]="RGB_INTEGER",r[r.RG_INTEGER=33320]="RG_INTEGER",r[r.RED_INTEGER=36244]="RED_INTEGER",r[r.ALPHA=6406]="ALPHA",r[r.LUMINANCE=6409]="LUMINANCE",r[r.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",r[r.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",r[r.DEPTH_STENCIL=34041]="DEPTH_STENCIL"})(C||(C={}));var Pe;(function(r){r[r.TEXTURE_2D=3553]="TEXTURE_2D",r[r.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",r[r.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",r[r.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",r[r.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",r[r.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",r[r.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",r[r.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",r[r.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"})(Pe||(Pe={}));var F;(function(r){r[r.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",r[r.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",r[r.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",r[r.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",r[r.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",r[r.UNSIGNED_INT=5125]="UNSIGNED_INT",r[r.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",r[r.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",r[r.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",r[r.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",r[r.BYTE=5120]="BYTE",r[r.SHORT=5122]="SHORT",r[r.INT=5124]="INT",r[r.FLOAT=5126]="FLOAT",r[r.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",r[r.HALF_FLOAT=36193]="HALF_FLOAT"})(F||(F={}));var Hr;(function(r){r[r.FLOAT=0]="FLOAT",r[r.INT=1]="INT",r[r.UINT=2]="UINT"})(Hr||(Hr={}));var Kt;(function(r){r[r.NEAREST=0]="NEAREST",r[r.LINEAR=1]="LINEAR"})(Kt||(Kt={}));var Jt;(function(r){r[r.CLAMP=33071]="CLAMP",r[r.REPEAT=10497]="REPEAT",r[r.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"})(Jt||(Jt={}));var jt;(function(r){r[r.OFF=0]="OFF",r[r.POW2=1]="POW2",r[r.ON=2]="ON",r[r.ON_MANUAL=3]="ON_MANUAL"})(jt||(jt={}));var zt;(function(r){r[r.NPM=0]="NPM",r[r.UNPACK=1]="UNPACK",r[r.PMA=2]="PMA",r[r.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",r[r.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",r[r.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",r[r.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"})(zt||(zt={}));var kt;(function(r){r[r.NO=0]="NO",r[r.YES=1]="YES",r[r.AUTO=2]="AUTO",r[r.BLEND=0]="BLEND",r[r.CLEAR=1]="CLEAR",r[r.BLIT=2]="BLIT"})(kt||(kt={}));var Vr;(function(r){r[r.AUTO=0]="AUTO",r[r.MANUAL=1]="MANUAL"})(Vr||(Vr={}));var Ft;(function(r){r.LOW="lowp",r.MEDIUM="mediump",r.HIGH="highp"})(Ft||(Ft={}));var yt;(function(r){r[r.NONE=0]="NONE",r[r.SCISSOR=1]="SCISSOR",r[r.STENCIL=2]="STENCIL",r[r.SPRITE=3]="SPRITE",r[r.COLOR=4]="COLOR"})(yt||(yt={}));var jn;(function(r){r[r.RED=1]="RED",r[r.GREEN=2]="GREEN",r[r.BLUE=4]="BLUE",r[r.ALPHA=8]="ALPHA"})(jn||(jn={}));var st;(function(r){r[r.NONE=0]="NONE",r[r.LOW=2]="LOW",r[r.MEDIUM=4]="MEDIUM",r[r.HIGH=8]="HIGH"})(st||(st={}));var Qt;(function(r){r[r.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",r[r.ARRAY_BUFFER=34962]="ARRAY_BUFFER",r[r.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"})(Qt||(Qt={}));/*!
 * @pixi/settings - v6.5.9
 * Compiled Wed, 25 Jan 2023 05:01:45 UTC
 *
 * @pixi/settings is licensed under the MIT License.
 * http://www.opensource.org/licenses/mit-license
 */var ph={createCanvas:function(r,e){var t=document.createElement("canvas");return t.width=r,t.height=e,t},getWebGLRenderingContext:function(){return WebGLRenderingContext},getNavigator:function(){return navigator},getBaseUrl:function(){var r;return(r=document.baseURI)!==null&&r!==void 0?r:window.location.href},fetch:function(r,e){return fetch(r,e)}},dn=/iPhone/i,Ja=/iPod/i,Qa=/iPad/i,to=/\biOS-universal(?:.+)Mac\b/i,pn=/\bAndroid(?:.+)Mobile\b/i,eo=/Android/i,nr=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,ui=/Silk/i,de=/Windows Phone/i,ro=/\bWindows(?:.+)ARM\b/i,io=/BlackBerry/i,no=/BB10/i,so=/Opera Mini/i,ao=/\b(CriOS|Chrome)(?:.+)Mobile/i,oo=/Mobile(?:.+)Firefox\b/i,ho=function(r){return typeof r<"u"&&r.platform==="MacIntel"&&typeof r.maxTouchPoints=="number"&&r.maxTouchPoints>1&&typeof MSStream>"u"};function Dl(r){return function(e){return e.test(r)}}function Fl(r){var e={userAgent:"",platform:"",maxTouchPoints:0};!r&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof r=="string"?e.userAgent=r:r&&r.userAgent&&(e={userAgent:r.userAgent,platform:r.platform,maxTouchPoints:r.maxTouchPoints||0});var t=e.userAgent,i=t.split("[FBAN");typeof i[1]<"u"&&(t=i[0]),i=t.split("Twitter"),typeof i[1]<"u"&&(t=i[0]);var n=Dl(t),s={apple:{phone:n(dn)&&!n(de),ipod:n(Ja),tablet:!n(dn)&&(n(Qa)||ho(e))&&!n(de),universal:n(to),device:(n(dn)||n(Ja)||n(Qa)||n(to)||ho(e))&&!n(de)},amazon:{phone:n(nr),tablet:!n(nr)&&n(ui),device:n(nr)||n(ui)},android:{phone:!n(de)&&n(nr)||!n(de)&&n(pn),tablet:!n(de)&&!n(nr)&&!n(pn)&&(n(ui)||n(eo)),device:!n(de)&&(n(nr)||n(ui)||n(pn)||n(eo))||n(/\bokhttp\b/i)},windows:{phone:n(de),tablet:n(ro),device:n(de)||n(ro)},other:{blackberry:n(io),blackberry10:n(no),opera:n(so),firefox:n(oo),chrome:n(ao),device:n(io)||n(no)||n(so)||n(oo)||n(ao)},any:!1,phone:!1,tablet:!1};return s.any=s.apple.device||s.android.device||s.windows.device||s.other.device,s.phone=s.apple.phone||s.android.phone||s.windows.phone,s.tablet=s.apple.tablet||s.android.tablet||s.windows.tablet,s}var Ht=Fl(globalThis.navigator);function Ll(){return!Ht.apple.device}function Bl(r){var e=!0;if(Ht.tablet||Ht.phone){if(Ht.apple.device){var t=navigator.userAgent.match(/OS (\d+)_(\d+)?/);if(t){var i=parseInt(t[1],10);i<11&&(e=!1)}}if(Ht.android.device){var t=navigator.userAgent.match(/Android\s([0-9.]*)/);if(t){var i=parseInt(t[1],10);i<7&&(e=!1)}}}return e?r:4}var A={ADAPTER:ph,MIPMAP_TEXTURES:jt.POW2,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,FILTER_MULTISAMPLE:st.NONE,SPRITE_MAX_TEXTURES:Bl(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,antialias:!1,autoDensity:!1,backgroundColor:0,backgroundAlpha:1,useContextAlpha:!0,clearBeforeRender:!0,preserveDrawingBuffer:!1,width:800,height:600,legacy:!1},GC_MODE:Vr.AUTO,GC_MAX_IDLE:60*60,GC_MAX_CHECK_COUNT:60*10,WRAP_MODE:Jt.CLAMP,SCALE_MODE:Kt.LINEAR,PRECISION_VERTEX:Ft.HIGH,PRECISION_FRAGMENT:Ht.apple.device?Ft.HIGH:Ft.MEDIUM,CAN_UPLOAD_SAME_BUFFER:Ll(),CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1},vh={exports:{}};(function(r){var e=Object.prototype.hasOwnProperty,t="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(t=!1));function n(h,u,l){this.fn=h,this.context=u,this.once=l||!1}function s(h,u,l,c,f){if(typeof l!="function")throw new TypeError("The listener must be a function");var d=new n(l,c||h,f),p=t?t+u:u;return h._events[p]?h._events[p].fn?h._events[p]=[h._events[p],d]:h._events[p].push(d):(h._events[p]=d,h._eventsCount++),h}function a(h,u){--h._eventsCount===0?h._events=new i:delete h._events[u]}function o(){this._events=new i,this._eventsCount=0}o.prototype.eventNames=function(){var u=[],l,c;if(this._eventsCount===0)return u;for(c in l=this._events)e.call(l,c)&&u.push(t?c.slice(1):c);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(l)):u},o.prototype.listeners=function(u){var l=t?t+u:u,c=this._events[l];if(!c)return[];if(c.fn)return[c.fn];for(var f=0,d=c.length,p=new Array(d);f<d;f++)p[f]=c[f].fn;return p},o.prototype.listenerCount=function(u){var l=t?t+u:u,c=this._events[l];return c?c.fn?1:c.length:0},o.prototype.emit=function(u,l,c,f,d,p){var _=t?t+u:u;if(!this._events[_])return!1;var v=this._events[_],g=arguments.length,m,y;if(v.fn){switch(v.once&&this.removeListener(u,v.fn,void 0,!0),g){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,l),!0;case 3:return v.fn.call(v.context,l,c),!0;case 4:return v.fn.call(v.context,l,c,f),!0;case 5:return v.fn.call(v.context,l,c,f,d),!0;case 6:return v.fn.call(v.context,l,c,f,d,p),!0}for(y=1,m=new Array(g-1);y<g;y++)m[y-1]=arguments[y];v.fn.apply(v.context,m)}else{var b=v.length,x;for(y=0;y<b;y++)switch(v[y].once&&this.removeListener(u,v[y].fn,void 0,!0),g){case 1:v[y].fn.call(v[y].context);break;case 2:v[y].fn.call(v[y].context,l);break;case 3:v[y].fn.call(v[y].context,l,c);break;case 4:v[y].fn.call(v[y].context,l,c,f);break;default:if(!m)for(x=1,m=new Array(g-1);x<g;x++)m[x-1]=arguments[x];v[y].fn.apply(v[y].context,m)}}return!0},o.prototype.on=function(u,l,c){return s(this,u,l,c,!1)},o.prototype.once=function(u,l,c){return s(this,u,l,c,!0)},o.prototype.removeListener=function(u,l,c,f){var d=t?t+u:u;if(!this._events[d])return this;if(!l)return a(this,d),this;var p=this._events[d];if(p.fn)p.fn===l&&(!f||p.once)&&(!c||p.context===c)&&a(this,d);else{for(var _=0,v=[],g=p.length;_<g;_++)(p[_].fn!==l||f&&!p[_].once||c&&p[_].context!==c)&&v.push(p[_]);v.length?this._events[d]=v.length===1?v[0]:v:a(this,d)}return this},o.prototype.removeAllListeners=function(u){var l;return u?(l=t?t+u:u,this._events[l]&&a(this,l)):(this._events=new i,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=t,o.EventEmitter=o,r.exports=o})(vh);var Nl=vh.exports;const ye=Xs(Nl);var Hs={exports:{}};Hs.exports=qi;Hs.exports.default=qi;function qi(r,e,t){t=t||2;var i=e&&e.length,n=i?e[0]*t:r.length,s=_h(r,0,n,t,!0),a=[];if(!s||s.next===s.prev)return a;var o,h,u,l,c,f,d;if(i&&(s=Hl(r,e,s,t)),r.length>80*t){o=u=r[0],h=l=r[1];for(var p=t;p<n;p+=t)c=r[p],f=r[p+1],c<o&&(o=c),f<h&&(h=f),c>u&&(u=c),f>l&&(l=f);d=Math.max(u-o,l-h),d=d!==0?32767/d:0}return jr(s,a,t,o,h,d,0),a}function _h(r,e,t,i,n){var s,a;if(n===Wn(r,e,t,i)>0)for(s=e;s<t;s+=i)a=uo(s,r[s],r[s+1],a);else for(s=t-i;s>=e;s-=i)a=uo(s,r[s],r[s+1],a);return a&&$i(a,a.next)&&(Yr(a),a=a.next),a}function $e(r,e){if(!r)return r;e||(e=r);var t=r,i;do if(i=!1,!t.steiner&&($i(t,t.next)||ct(t.prev,t,t.next)===0)){if(Yr(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function jr(r,e,t,i,n,s,a){if(r){!a&&s&&Wl(r,i,n,s);for(var o=r,h,u;r.prev!==r.next;){if(h=r.prev,u=r.next,s?kl(r,i,n,s):Ul(r)){e.push(h.i/t|0),e.push(r.i/t|0),e.push(u.i/t|0),Yr(r),r=u.next,o=u.next;continue}if(r=u,r===o){a?a===1?(r=Gl($e(r),e,t),jr(r,e,t,i,n,s,2)):a===2&&Xl(r,e,t,i,n,s):jr($e(r),e,t,i,n,s,1);break}}}}function Ul(r){var e=r.prev,t=r,i=r.next;if(ct(e,t,i)>=0)return!1;for(var n=e.x,s=t.x,a=i.x,o=e.y,h=t.y,u=i.y,l=n<s?n<a?n:a:s<a?s:a,c=o<h?o<u?o:u:h<u?h:u,f=n>s?n>a?n:a:s>a?s:a,d=o>h?o>u?o:u:h>u?h:u,p=i.next;p!==e;){if(p.x>=l&&p.x<=f&&p.y>=c&&p.y<=d&&lr(n,o,s,h,a,u,p.x,p.y)&&ct(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function kl(r,e,t,i){var n=r.prev,s=r,a=r.next;if(ct(n,s,a)>=0)return!1;for(var o=n.x,h=s.x,u=a.x,l=n.y,c=s.y,f=a.y,d=o<h?o<u?o:u:h<u?h:u,p=l<c?l<f?l:f:c<f?c:f,_=o>h?o>u?o:u:h>u?h:u,v=l>c?l>f?l:f:c>f?c:f,g=zn(d,p,e,t,i),m=zn(_,v,e,t,i),y=r.prevZ,b=r.nextZ;y&&y.z>=g&&b&&b.z<=m;){if(y.x>=d&&y.x<=_&&y.y>=p&&y.y<=v&&y!==n&&y!==a&&lr(o,l,h,c,u,f,y.x,y.y)&&ct(y.prev,y,y.next)>=0||(y=y.prevZ,b.x>=d&&b.x<=_&&b.y>=p&&b.y<=v&&b!==n&&b!==a&&lr(o,l,h,c,u,f,b.x,b.y)&&ct(b.prev,b,b.next)>=0))return!1;b=b.nextZ}for(;y&&y.z>=g;){if(y.x>=d&&y.x<=_&&y.y>=p&&y.y<=v&&y!==n&&y!==a&&lr(o,l,h,c,u,f,y.x,y.y)&&ct(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;b&&b.z<=m;){if(b.x>=d&&b.x<=_&&b.y>=p&&b.y<=v&&b!==n&&b!==a&&lr(o,l,h,c,u,f,b.x,b.y)&&ct(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function Gl(r,e,t){var i=r;do{var n=i.prev,s=i.next.next;!$i(n,s)&&gh(n,i,i.next,s)&&zr(n,s)&&zr(s,n)&&(e.push(n.i/t|0),e.push(i.i/t|0),e.push(s.i/t|0),Yr(i),Yr(i.next),i=r=s),i=i.next}while(i!==r);return $e(i)}function Xl(r,e,t,i,n,s){var a=r;do{for(var o=a.next.next;o!==a.prev;){if(a.i!==o.i&&Zl(a,o)){var h=mh(a,o);a=$e(a,a.next),h=$e(h,h.next),jr(a,e,t,i,n,s,0),jr(h,e,t,i,n,s,0);return}o=o.next}a=a.next}while(a!==r)}function Hl(r,e,t,i){var n=[],s,a,o,h,u;for(s=0,a=e.length;s<a;s++)o=e[s]*i,h=s<a-1?e[s+1]*i:r.length,u=_h(r,o,h,i,!1),u===u.next&&(u.steiner=!0),n.push($l(u));for(n.sort(Vl),s=0;s<n.length;s++)t=jl(n[s],t);return t}function Vl(r,e){return r.x-e.x}function jl(r,e){var t=zl(r,e);if(!t)return e;var i=mh(t,r);return $e(i,i.next),$e(t,t.next)}function zl(r,e){var t=e,i=r.x,n=r.y,s=-1/0,a;do{if(n<=t.y&&n>=t.next.y&&t.next.y!==t.y){var o=t.x+(n-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(o<=i&&o>s&&(s=o,a=t.x<t.next.x?t:t.next,o===i))return a}t=t.next}while(t!==e);if(!a)return null;var h=a,u=a.x,l=a.y,c=1/0,f;t=a;do i>=t.x&&t.x>=u&&i!==t.x&&lr(n<l?i:s,n,u,l,n<l?s:i,n,t.x,t.y)&&(f=Math.abs(n-t.y)/(i-t.x),zr(t,r)&&(f<c||f===c&&(t.x>a.x||t.x===a.x&&Yl(a,t)))&&(a=t,c=f)),t=t.next;while(t!==h);return a}function Yl(r,e){return ct(r.prev,r,e.prev)<0&&ct(e.next,r,r.next)<0}function Wl(r,e,t,i){var n=r;do n.z===0&&(n.z=zn(n.x,n.y,e,t,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==r);n.prevZ.nextZ=null,n.prevZ=null,ql(n)}function ql(r){var e,t,i,n,s,a,o,h,u=1;do{for(t=r,r=null,s=null,a=0;t;){for(a++,i=t,o=0,e=0;e<u&&(o++,i=i.nextZ,!!i);e++);for(h=u;o>0||h>0&&i;)o!==0&&(h===0||!i||t.z<=i.z)?(n=t,t=t.nextZ,o--):(n=i,i=i.nextZ,h--),s?s.nextZ=n:r=n,n.prevZ=s,s=n;t=i}s.nextZ=null,u*=2}while(a>1);return r}function zn(r,e,t,i,n){return r=(r-t)*n|0,e=(e-i)*n|0,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,r|e<<1}function $l(r){var e=r,t=r;do(e.x<t.x||e.x===t.x&&e.y<t.y)&&(t=e),e=e.next;while(e!==r);return t}function lr(r,e,t,i,n,s,a,o){return(n-a)*(e-o)>=(r-a)*(s-o)&&(r-a)*(i-o)>=(t-a)*(e-o)&&(t-a)*(s-o)>=(n-a)*(i-o)}function Zl(r,e){return r.next.i!==e.i&&r.prev.i!==e.i&&!Kl(r,e)&&(zr(r,e)&&zr(e,r)&&Jl(r,e)&&(ct(r.prev,r,e.prev)||ct(r,e.prev,e))||$i(r,e)&&ct(r.prev,r,r.next)>0&&ct(e.prev,e,e.next)>0)}function ct(r,e,t){return(e.y-r.y)*(t.x-e.x)-(e.x-r.x)*(t.y-e.y)}function $i(r,e){return r.x===e.x&&r.y===e.y}function gh(r,e,t,i){var n=fi(ct(r,e,t)),s=fi(ct(r,e,i)),a=fi(ct(t,i,r)),o=fi(ct(t,i,e));return!!(n!==s&&a!==o||n===0&&li(r,t,e)||s===0&&li(r,i,e)||a===0&&li(t,r,i)||o===0&&li(t,e,i))}function li(r,e,t){return e.x<=Math.max(r.x,t.x)&&e.x>=Math.min(r.x,t.x)&&e.y<=Math.max(r.y,t.y)&&e.y>=Math.min(r.y,t.y)}function fi(r){return r>0?1:r<0?-1:0}function Kl(r,e){var t=r;do{if(t.i!==r.i&&t.next.i!==r.i&&t.i!==e.i&&t.next.i!==e.i&&gh(t,t.next,r,e))return!0;t=t.next}while(t!==r);return!1}function zr(r,e){return ct(r.prev,r,r.next)<0?ct(r,e,r.next)>=0&&ct(r,r.prev,e)>=0:ct(r,e,r.prev)<0||ct(r,r.next,e)<0}function Jl(r,e){var t=r,i=!1,n=(r.x+e.x)/2,s=(r.y+e.y)/2;do t.y>s!=t.next.y>s&&t.next.y!==t.y&&n<(t.next.x-t.x)*(s-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==r);return i}function mh(r,e){var t=new Yn(r.i,r.x,r.y),i=new Yn(e.i,e.x,e.y),n=r.next,s=e.prev;return r.next=e,e.prev=r,t.next=n,n.prev=t,i.next=t,t.prev=i,s.next=i,i.prev=s,i}function uo(r,e,t,i){var n=new Yn(r,e,t);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function Yr(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function Yn(r,e,t){this.i=r,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}qi.deviation=function(r,e,t,i){var n=e&&e.length,s=n?e[0]*t:r.length,a=Math.abs(Wn(r,0,s,t));if(n)for(var o=0,h=e.length;o<h;o++){var u=e[o]*t,l=o<h-1?e[o+1]*t:r.length;a-=Math.abs(Wn(r,u,l,t))}var c=0;for(o=0;o<i.length;o+=3){var f=i[o]*t,d=i[o+1]*t,p=i[o+2]*t;c+=Math.abs((r[f]-r[p])*(r[d+1]-r[f+1])-(r[f]-r[d])*(r[p+1]-r[f+1]))}return a===0&&c===0?0:Math.abs((c-a)/a)};function Wn(r,e,t,i){for(var n=0,s=e,a=t-i;s<t;s+=i)n+=(r[a]-r[s])*(r[s+1]+r[a+1]),a=s;return n}qi.flatten=function(r){for(var e=r[0][0].length,t={vertices:[],holes:[],dimensions:e},i=0,n=0;n<r.length;n++){for(var s=0;s<r[n].length;s++)for(var a=0;a<e;a++)t.vertices.push(r[n][s][a]);n>0&&(i+=r[n-1].length,t.holes.push(i))}return t};var Ql=Hs.exports;const Vs=Xs(Ql);var Gi={exports:{}};/*! https://mths.be/punycode v1.3.2 by @mathias */Gi.exports;(function(r,e){(function(t){var i=e&&!e.nodeType&&e,n=r&&!r.nodeType&&r,s=typeof un=="object"&&un;(s.global===s||s.window===s||s.self===s)&&(t=s);var a,o=2147483647,h=36,u=1,l=26,c=38,f=700,d=72,p=128,_="-",v=/^xn--/,g=/[^\x20-\x7E]/,m=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},b=h-u,x=Math.floor,T=String.fromCharCode,E;function I(M){throw RangeError(y[M])}function S(M,w){for(var H=M.length,W=[];H--;)W[H]=w(M[H]);return W}function P(M,w){var H=M.split("@"),W="";H.length>1&&(W=H[0]+"@",M=H[1]),M=M.replace(m,".");var q=M.split("."),gt=S(q,w).join(".");return W+gt}function R(M){for(var w=[],H=0,W=M.length,q,gt;H<W;)q=M.charCodeAt(H++),q>=55296&&q<=56319&&H<W?(gt=M.charCodeAt(H++),(gt&64512)==56320?w.push(((q&1023)<<10)+(gt&1023)+65536):(w.push(q),H--)):w.push(q);return w}function B(M){return S(M,function(w){var H="";return w>65535&&(w-=65536,H+=T(w>>>10&1023|55296),w=56320|w&1023),H+=T(w),H}).join("")}function G(M){return M-48<10?M-22:M-65<26?M-65:M-97<26?M-97:h}function J(M,w){return M+22+75*(M<26)-((w!=0)<<5)}function D(M,w,H){var W=0;for(M=H?x(M/f):M>>1,M+=x(M/w);M>b*l>>1;W+=h)M=x(M/b);return x(W+(b+1)*M/(M+c))}function O(M){var w=[],H=M.length,W,q=0,gt=p,at=d,ot,St,wt,mt,Q,nt,ht,z,It;for(ot=M.lastIndexOf(_),ot<0&&(ot=0),St=0;St<ot;++St)M.charCodeAt(St)>=128&&I("not-basic"),w.push(M.charCodeAt(St));for(wt=ot>0?ot+1:0;wt<H;){for(mt=q,Q=1,nt=h;wt>=H&&I("invalid-input"),ht=G(M.charCodeAt(wt++)),(ht>=h||ht>x((o-q)/Q))&&I("overflow"),q+=ht*Q,z=nt<=at?u:nt>=at+l?l:nt-at,!(ht<z);nt+=h)It=h-z,Q>x(o/It)&&I("overflow"),Q*=It;W=w.length+1,at=D(q-mt,W,mt==0),x(q/W)>o-gt&&I("overflow"),gt+=x(q/W),q%=W,w.splice(q++,0,gt)}return B(w)}function X(M){var w,H,W,q,gt,at,ot,St,wt,mt,Q,nt=[],ht,z,It,Rt;for(M=R(M),ht=M.length,w=p,H=0,gt=d,at=0;at<ht;++at)Q=M[at],Q<128&&nt.push(T(Q));for(W=q=nt.length,q&&nt.push(_);W<ht;){for(ot=o,at=0;at<ht;++at)Q=M[at],Q>=w&&Q<ot&&(ot=Q);for(z=W+1,ot-w>x((o-H)/z)&&I("overflow"),H+=(ot-w)*z,w=ot,at=0;at<ht;++at)if(Q=M[at],Q<w&&++H>o&&I("overflow"),Q==w){for(St=H,wt=h;mt=wt<=gt?u:wt>=gt+l?l:wt-gt,!(St<mt);wt+=h)Rt=St-mt,It=h-mt,nt.push(T(J(mt+Rt%It,0))),St=x(Rt/It);nt.push(T(J(St,0))),gt=D(H,z,W==q),H=0,++W}++H,++w}return nt.join("")}function Et(M){return P(M,function(w){return v.test(w)?O(w.slice(4).toLowerCase()):w})}function Y(M){return P(M,function(w){return g.test(w)?"xn--"+X(w):w})}if(a={version:"1.3.2",ucs2:{decode:R,encode:B},decode:O,encode:X,toASCII:Y,toUnicode:Et},i&&n)if(r.exports==i)n.exports=a;else for(E in a)a.hasOwnProperty(E)&&(i[E]=a[E]);else t.punycode=a})(un)})(Gi,Gi.exports);var tf=Gi.exports,ef={isString:function(r){return typeof r=="string"},isObject:function(r){return typeof r=="object"&&r!==null},isNull:function(r){return r===null},isNullOrUndefined:function(r){return r==null}},Wr={};function rf(r,e){return Object.prototype.hasOwnProperty.call(r,e)}var nf=function(r,e,t,i){e=e||"&",t=t||"=";var n={};if(typeof r!="string"||r.length===0)return n;var s=/\+/g;r=r.split(e);var a=1e3;i&&typeof i.maxKeys=="number"&&(a=i.maxKeys);var o=r.length;a>0&&o>a&&(o=a);for(var h=0;h<o;++h){var u=r[h].replace(s,"%20"),l=u.indexOf(t),c,f,d,p;l>=0?(c=u.substr(0,l),f=u.substr(l+1)):(c=u,f=""),d=decodeURIComponent(c),p=decodeURIComponent(f),rf(n,d)?Array.isArray(n[d])?n[d].push(p):n[d]=[n[d],p]:n[d]=p}return n},Tr=function(r){switch(typeof r){case"string":return r;case"boolean":return r?"true":"false";case"number":return isFinite(r)?r:"";default:return""}},sf=function(r,e,t,i){return e=e||"&",t=t||"=",r===null&&(r=void 0),typeof r=="object"?Object.keys(r).map(function(n){var s=encodeURIComponent(Tr(n))+t;return Array.isArray(r[n])?r[n].map(function(a){return s+encodeURIComponent(Tr(a))}).join(e):s+encodeURIComponent(Tr(r[n]))}).join(e):i?encodeURIComponent(Tr(i))+t+encodeURIComponent(Tr(r)):""};Wr.decode=Wr.parse=nf;Wr.encode=Wr.stringify=sf;var af=tf,se=ef,of=Zi,hf=yf,uf=mf;function te(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var lf=/^([a-z0-9.+-]+:)/i,ff=/:[0-9]*$/,cf=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,df=["<",">",'"',"`"," ","\r",`
`,"	"],pf=["{","}","|","\\","^","`"].concat(df),qn=["'"].concat(pf),lo=["%","/","?",";","#"].concat(qn),fo=["/","?","#"],vf=255,co=/^[+a-z0-9A-Z_-]{0,63}$/,_f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,gf={javascript:!0,"javascript:":!0},$n={javascript:!0,"javascript:":!0},fr={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Zn=Wr;function Zi(r,e,t){if(r&&se.isObject(r)&&r instanceof te)return r;var i=new te;return i.parse(r,e,t),i}te.prototype.parse=function(r,e,t){if(!se.isString(r))throw new TypeError("Parameter 'url' must be a string, not "+typeof r);var i=r.indexOf("?"),n=i!==-1&&i<r.indexOf("#")?"?":"#",s=r.split(n),a=/\\/g;s[0]=s[0].replace(a,"/"),r=s.join(n);var o=r;if(o=o.trim(),!t&&r.split("#").length===1){var h=cf.exec(o);if(h)return this.path=o,this.href=o,this.pathname=h[1],h[2]?(this.search=h[2],e?this.query=Zn.parse(this.search.substr(1)):this.query=this.search.substr(1)):e&&(this.search="",this.query={}),this}var u=lf.exec(o);if(u){u=u[0];var l=u.toLowerCase();this.protocol=l,o=o.substr(u.length)}if(t||u||o.match(/^\/\/[^@\/]+@[^@\/]+/)){var c=o.substr(0,2)==="//";c&&!(u&&$n[u])&&(o=o.substr(2),this.slashes=!0)}if(!$n[u]&&(c||u&&!fr[u])){for(var f=-1,d=0;d<fo.length;d++){var p=o.indexOf(fo[d]);p!==-1&&(f===-1||p<f)&&(f=p)}var _,v;f===-1?v=o.lastIndexOf("@"):v=o.lastIndexOf("@",f),v!==-1&&(_=o.slice(0,v),o=o.slice(v+1),this.auth=decodeURIComponent(_)),f=-1;for(var d=0;d<lo.length;d++){var p=o.indexOf(lo[d]);p!==-1&&(f===-1||p<f)&&(f=p)}f===-1&&(f=o.length),this.host=o.slice(0,f),o=o.slice(f),this.parseHost(),this.hostname=this.hostname||"";var g=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!g)for(var m=this.hostname.split(/\./),d=0,y=m.length;d<y;d++){var b=m[d];if(b&&!b.match(co)){for(var x="",T=0,E=b.length;T<E;T++)b.charCodeAt(T)>127?x+="x":x+=b[T];if(!x.match(co)){var I=m.slice(0,d),S=m.slice(d+1),P=b.match(_f);P&&(I.push(P[1]),S.unshift(P[2])),S.length&&(o="/"+S.join(".")+o),this.hostname=I.join(".");break}}}this.hostname.length>vf?this.hostname="":this.hostname=this.hostname.toLowerCase(),g||(this.hostname=af.toASCII(this.hostname));var R=this.port?":"+this.port:"",B=this.hostname||"";this.host=B+R,this.href+=this.host,g&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),o[0]!=="/"&&(o="/"+o))}if(!gf[l])for(var d=0,y=qn.length;d<y;d++){var G=qn[d];if(o.indexOf(G)!==-1){var J=encodeURIComponent(G);J===G&&(J=escape(G)),o=o.split(G).join(J)}}var D=o.indexOf("#");D!==-1&&(this.hash=o.substr(D),o=o.slice(0,D));var O=o.indexOf("?");if(O!==-1?(this.search=o.substr(O),this.query=o.substr(O+1),e&&(this.query=Zn.parse(this.query)),o=o.slice(0,O)):e&&(this.search="",this.query={}),o&&(this.pathname=o),fr[l]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var R=this.pathname||"",X=this.search||"";this.path=R+X}return this.href=this.format(),this};function mf(r){return se.isString(r)&&(r=Zi(r)),r instanceof te?r.format():te.prototype.format.call(r)}te.prototype.format=function(){var r=this.auth||"";r&&(r=encodeURIComponent(r),r=r.replace(/%3A/i,":"),r+="@");var e=this.protocol||"",t=this.pathname||"",i=this.hash||"",n=!1,s="";this.host?n=r+this.host:this.hostname&&(n=r+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(n+=":"+this.port)),this.query&&se.isObject(this.query)&&Object.keys(this.query).length&&(s=Zn.stringify(this.query));var a=this.search||s&&"?"+s||"";return e&&e.substr(-1)!==":"&&(e+=":"),this.slashes||(!e||fr[e])&&n!==!1?(n="//"+(n||""),t&&t.charAt(0)!=="/"&&(t="/"+t)):n||(n=""),i&&i.charAt(0)!=="#"&&(i="#"+i),a&&a.charAt(0)!=="?"&&(a="?"+a),t=t.replace(/[?#]/g,function(o){return encodeURIComponent(o)}),a=a.replace("#","%23"),e+n+t+a+i};function yf(r,e){return Zi(r,!1,!0).resolve(e)}te.prototype.resolve=function(r){return this.resolveObject(Zi(r,!1,!0)).format()};te.prototype.resolveObject=function(r){if(se.isString(r)){var e=new te;e.parse(r,!1,!0),r=e}for(var t=new te,i=Object.keys(this),n=0;n<i.length;n++){var s=i[n];t[s]=this[s]}if(t.hash=r.hash,r.href==="")return t.href=t.format(),t;if(r.slashes&&!r.protocol){for(var a=Object.keys(r),o=0;o<a.length;o++){var h=a[o];h!=="protocol"&&(t[h]=r[h])}return fr[t.protocol]&&t.hostname&&!t.pathname&&(t.path=t.pathname="/"),t.href=t.format(),t}if(r.protocol&&r.protocol!==t.protocol){if(!fr[r.protocol]){for(var u=Object.keys(r),l=0;l<u.length;l++){var c=u[l];t[c]=r[c]}return t.href=t.format(),t}if(t.protocol=r.protocol,!r.host&&!$n[r.protocol]){for(var y=(r.pathname||"").split("/");y.length&&!(r.host=y.shift()););r.host||(r.host=""),r.hostname||(r.hostname=""),y[0]!==""&&y.unshift(""),y.length<2&&y.unshift(""),t.pathname=y.join("/")}else t.pathname=r.pathname;if(t.search=r.search,t.query=r.query,t.host=r.host||"",t.auth=r.auth,t.hostname=r.hostname||r.host,t.port=r.port,t.pathname||t.search){var f=t.pathname||"",d=t.search||"";t.path=f+d}return t.slashes=t.slashes||r.slashes,t.href=t.format(),t}var p=t.pathname&&t.pathname.charAt(0)==="/",_=r.host||r.pathname&&r.pathname.charAt(0)==="/",v=_||p||t.host&&r.pathname,g=v,m=t.pathname&&t.pathname.split("/")||[],y=r.pathname&&r.pathname.split("/")||[],b=t.protocol&&!fr[t.protocol];if(b&&(t.hostname="",t.port=null,t.host&&(m[0]===""?m[0]=t.host:m.unshift(t.host)),t.host="",r.protocol&&(r.hostname=null,r.port=null,r.host&&(y[0]===""?y[0]=r.host:y.unshift(r.host)),r.host=null),v=v&&(y[0]===""||m[0]==="")),_)t.host=r.host||r.host===""?r.host:t.host,t.hostname=r.hostname||r.hostname===""?r.hostname:t.hostname,t.search=r.search,t.query=r.query,m=y;else if(y.length)m||(m=[]),m.pop(),m=m.concat(y),t.search=r.search,t.query=r.query;else if(!se.isNullOrUndefined(r.search)){if(b){t.hostname=t.host=m.shift();var x=t.host&&t.host.indexOf("@")>0?t.host.split("@"):!1;x&&(t.auth=x.shift(),t.host=t.hostname=x.shift())}return t.search=r.search,t.query=r.query,(!se.isNull(t.pathname)||!se.isNull(t.search))&&(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.href=t.format(),t}if(!m.length)return t.pathname=null,t.search?t.path="/"+t.search:t.path=null,t.href=t.format(),t;for(var T=m.slice(-1)[0],E=(t.host||r.host||m.length>1)&&(T==="."||T==="..")||T==="",I=0,S=m.length;S>=0;S--)T=m[S],T==="."?m.splice(S,1):T===".."?(m.splice(S,1),I++):I&&(m.splice(S,1),I--);if(!v&&!g)for(;I--;I)m.unshift("..");v&&m[0]!==""&&(!m[0]||m[0].charAt(0)!=="/")&&m.unshift(""),E&&m.join("/").substr(-1)!=="/"&&m.push("");var P=m[0]===""||m[0]&&m[0].charAt(0)==="/";if(b){t.hostname=t.host=P?"":m.length?m.shift():"";var x=t.host&&t.host.indexOf("@")>0?t.host.split("@"):!1;x&&(t.auth=x.shift(),t.host=t.hostname=x.shift())}return v=v||t.host&&m.length,v&&!P&&m.unshift(""),m.length?t.pathname=m.join("/"):(t.pathname=null,t.path=null),(!se.isNull(t.pathname)||!se.isNull(t.search))&&(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.auth=r.auth||t.auth,t.slashes=t.slashes||r.slashes,t.href=t.format(),t};te.prototype.parseHost=function(){var r=this.host,e=ff.exec(r);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),r=r.substr(0,r.length-e.length)),r&&(this.hostname=r)};/*!
 * @pixi/utils - v6.5.9
 * Compiled Wed, 25 Jan 2023 05:01:45 UTC
 *
 * @pixi/utils is licensed under the MIT License.
 * http://www.opensource.org/licenses/mit-license
 */var he={parse:of,format:uf,resolve:hf};function Wt(r){if(typeof r!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(r))}function po(r){var e=r.split("?")[0];return e.split("#")[0]}function xf(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function bf(r,e,t){return r.replace(new RegExp(xf(e),"g"),t)}function Tf(r,e){for(var t="",i=0,n=-1,s=0,a,o=0;o<=r.length;++o){if(o<r.length)a=r.charCodeAt(o);else{if(a===47)break;a=47}if(a===47){if(!(n===o-1||s===1))if(n!==o-1&&s===2){if(t.length<2||i!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){var h=t.lastIndexOf("/");if(h!==t.length-1){h===-1?(t="",i=0):(t=t.slice(0,h),i=t.length-1-t.lastIndexOf("/")),n=o,s=0;continue}}else if(t.length===2||t.length===1){t="",i=0,n=o,s=0;continue}}e&&(t.length>0?t+="/..":t="..",i=2)}else t.length>0?t+="/"+r.slice(n+1,o):t=r.slice(n+1,o),i=o-n-1;n=o,s=0}else a===46&&s!==-1?++s:s=-1}return t}var yh={toPosix:function(r){return bf(r,"\\","/")},isUrl:function(r){return/^https?:/.test(this.toPosix(r))},isDataUrl:function(r){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(r)},hasProtocol:function(r){return/^[^/:]+:\//.test(this.toPosix(r))},getProtocol:function(r){Wt(r),r=this.toPosix(r);var e="",t=/^file:\/\/\//.exec(r),i=/^[^/:]+:\/\//.exec(r),n=/^[^/:]+:\//.exec(r);if(t||i||n){var s=t?.[0]||i?.[0]||n?.[0];e=s,r=r.slice(s.length)}return e},toAbsolute:function(r,e,t){if(this.isDataUrl(r))return r;var i=po(this.toPosix(e??A.ADAPTER.getBaseUrl())),n=po(this.toPosix(t??this.rootname(i)));if(Wt(r),r=this.toPosix(r),r.startsWith("/"))return yh.join(n,r.slice(1));var s=this.isAbsolute(r)?r:this.join(i,r);return s},normalize:function(r){if(r=this.toPosix(r),Wt(r),r.length===0)return".";var e="",t=r.startsWith("/");this.hasProtocol(r)&&(e=this.rootname(r),r=r.slice(e.length));var i=r.endsWith("/");return r=Tf(r,!1),r.length>0&&i&&(r+="/"),t?"/"+r:e+r},isAbsolute:function(r){return Wt(r),r=this.toPosix(r),this.hasProtocol(r)?!0:r.startsWith("/")},join:function(){for(var r=arguments,e,t=[],i=0;i<arguments.length;i++)t[i]=r[i];if(t.length===0)return".";for(var n,s=0;s<t.length;++s){var a=t[s];if(Wt(a),a.length>0)if(n===void 0)n=a;else{var o=(e=t[s-1])!==null&&e!==void 0?e:"";this.extname(o)?n+="/../"+a:n+="/"+a}}return n===void 0?".":this.normalize(n)},dirname:function(r){if(Wt(r),r.length===0)return".";r=this.toPosix(r);var e=r.charCodeAt(0),t=e===47,i=-1,n=!0,s=this.getProtocol(r),a=r;r=r.slice(s.length);for(var o=r.length-1;o>=1;--o)if(e=r.charCodeAt(o),e===47){if(!n){i=o;break}}else n=!1;return i===-1?t?"/":this.isUrl(a)?s+r:s:t&&i===1?"//":s+r.slice(0,i)},rootname:function(r){Wt(r),r=this.toPosix(r);var e="";if(r.startsWith("/")?e="/":e=this.getProtocol(r),this.isUrl(r)){var t=r.indexOf("/",e.length);t!==-1?e=r.slice(0,t):e=r,e.endsWith("/")||(e+="/")}return e},basename:function(r,e){Wt(r),e&&Wt(e),r=this.toPosix(r);var t=0,i=-1,n=!0,s;if(e!==void 0&&e.length>0&&e.length<=r.length){if(e.length===r.length&&e===r)return"";var a=e.length-1,o=-1;for(s=r.length-1;s>=0;--s){var h=r.charCodeAt(s);if(h===47){if(!n){t=s+1;break}}else o===-1&&(n=!1,o=s+1),a>=0&&(h===e.charCodeAt(a)?--a===-1&&(i=s):(a=-1,i=o))}return t===i?i=o:i===-1&&(i=r.length),r.slice(t,i)}for(s=r.length-1;s>=0;--s)if(r.charCodeAt(s)===47){if(!n){t=s+1;break}}else i===-1&&(n=!1,i=s+1);return i===-1?"":r.slice(t,i)},extname:function(r){Wt(r),r=this.toPosix(r);for(var e=-1,t=0,i=-1,n=!0,s=0,a=r.length-1;a>=0;--a){var o=r.charCodeAt(a);if(o===47){if(!n){t=a+1;break}continue}i===-1&&(n=!1,i=a+1),o===46?e===-1?e=a:s!==1&&(s=1):e!==-1&&(s=-1)}return e===-1||i===-1||s===0||s===1&&e===i-1&&e===t+1?"":r.slice(e,i)},parse:function(r){Wt(r);var e={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return e;r=this.toPosix(r);var t=r.charCodeAt(0),i=this.isAbsolute(r),n;e.root=this.rootname(r),i||this.hasProtocol(r)?n=1:n=0;for(var s=-1,a=0,o=-1,h=!0,u=r.length-1,l=0;u>=n;--u){if(t=r.charCodeAt(u),t===47){if(!h){a=u+1;break}continue}o===-1&&(h=!1,o=u+1),t===46?s===-1?s=u:l!==1&&(l=1):s!==-1&&(l=-1)}return s===-1||o===-1||l===0||l===1&&s===o-1&&s===a+1?o!==-1&&(a===0&&i?e.base=e.name=r.slice(1,o):e.base=e.name=r.slice(a,o)):(a===0&&i?(e.name=r.slice(1,s),e.base=r.slice(1,o)):(e.name=r.slice(a,s),e.base=r.slice(a,o)),e.ext=r.slice(s,o)),e.dir=this.dirname(r),e},sep:"/",delimiter:":"};A.RETINA_PREFIX=/@([0-9\.]+)x/;A.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Kn=!1,vo="6.5.9";function Ef(){Kn=!0}function xh(r){var e;if(!Kn){if(A.ADAPTER.getNavigator().userAgent.toLowerCase().indexOf("chrome")>-1){var t=[`
 %c %c %c PixiJS `+vo+" - ✰ "+r+` ✰  %c  %c  http://www.pixijs.com/  %c %c ♥%c♥%c♥ 

`,"background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];(e=globalThis.console).log.apply(e,t)}else globalThis.console&&globalThis.console.log("PixiJS "+vo+" - "+r+" - http://www.pixijs.com/");Kn=!0}}var vn;function bh(){return typeof vn>"u"&&(vn=function(){var e={stencil:!0,failIfMajorPerformanceCaveat:A.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!A.ADAPTER.getWebGLRenderingContext())return!1;var t=A.ADAPTER.createCanvas(),i=t.getContext("webgl",e)||t.getContext("experimental-webgl",e),n=!!(i&&i.getContextAttributes().stencil);if(i){var s=i.getExtension("WEBGL_lose_context");s&&s.loseContext()}return i=null,n}catch{return!1}}()),vn}var Sf="#f0f8ff",Pf="#faebd7",wf="#00ffff",Cf="#7fffd4",If="#f0ffff",Mf="#f5f5dc",Af="#ffe4c4",Rf="#000000",Of="#ffebcd",Df="#0000ff",Ff="#8a2be2",Lf="#a52a2a",Bf="#deb887",Nf="#5f9ea0",Uf="#7fff00",kf="#d2691e",Gf="#ff7f50",Xf="#6495ed",Hf="#fff8dc",Vf="#dc143c",jf="#00ffff",zf="#00008b",Yf="#008b8b",Wf="#b8860b",qf="#a9a9a9",$f="#006400",Zf="#a9a9a9",Kf="#bdb76b",Jf="#8b008b",Qf="#556b2f",tc="#ff8c00",ec="#9932cc",rc="#8b0000",ic="#e9967a",nc="#8fbc8f",sc="#483d8b",ac="#2f4f4f",oc="#2f4f4f",hc="#00ced1",uc="#9400d3",lc="#ff1493",fc="#00bfff",cc="#696969",dc="#696969",pc="#1e90ff",vc="#b22222",_c="#fffaf0",gc="#228b22",mc="#ff00ff",yc="#dcdcdc",xc="#f8f8ff",bc="#daa520",Tc="#ffd700",Ec="#808080",Sc="#008000",Pc="#adff2f",wc="#808080",Cc="#f0fff0",Ic="#ff69b4",Mc="#cd5c5c",Ac="#4b0082",Rc="#fffff0",Oc="#f0e68c",Dc="#fff0f5",Fc="#e6e6fa",Lc="#7cfc00",Bc="#fffacd",Nc="#add8e6",Uc="#f08080",kc="#e0ffff",Gc="#fafad2",Xc="#d3d3d3",Hc="#90ee90",Vc="#d3d3d3",jc="#ffb6c1",zc="#ffa07a",Yc="#20b2aa",Wc="#87cefa",qc="#778899",$c="#778899",Zc="#b0c4de",Kc="#ffffe0",Jc="#00ff00",Qc="#32cd32",td="#faf0e6",ed="#ff00ff",rd="#800000",id="#66cdaa",nd="#0000cd",sd="#ba55d3",ad="#9370db",od="#3cb371",hd="#7b68ee",ud="#00fa9a",ld="#48d1cc",fd="#c71585",cd="#191970",dd="#f5fffa",pd="#ffe4e1",vd="#ffe4b5",_d="#ffdead",gd="#000080",md="#fdf5e6",yd="#808000",xd="#6b8e23",bd="#ffa500",Td="#ff4500",Ed="#da70d6",Sd="#eee8aa",Pd="#98fb98",wd="#afeeee",Cd="#db7093",Id="#ffefd5",Md="#ffdab9",Ad="#cd853f",Rd="#ffc0cb",Od="#dda0dd",Dd="#b0e0e6",Fd="#800080",Ld="#663399",Bd="#ff0000",Nd="#bc8f8f",Ud="#4169e1",kd="#8b4513",Gd="#fa8072",Xd="#f4a460",Hd="#2e8b57",Vd="#fff5ee",jd="#a0522d",zd="#c0c0c0",Yd="#87ceeb",Wd="#6a5acd",qd="#708090",$d="#708090",Zd="#fffafa",Kd="#00ff7f",Jd="#4682b4",Qd="#d2b48c",tp="#008080",ep="#d8bfd8",rp="#ff6347",ip="#40e0d0",np="#ee82ee",sp="#f5deb3",ap="#ffffff",op="#f5f5f5",hp="#ffff00",up="#9acd32",lp={aliceblue:Sf,antiquewhite:Pf,aqua:wf,aquamarine:Cf,azure:If,beige:Mf,bisque:Af,black:Rf,blanchedalmond:Of,blue:Df,blueviolet:Ff,brown:Lf,burlywood:Bf,cadetblue:Nf,chartreuse:Uf,chocolate:kf,coral:Gf,cornflowerblue:Xf,cornsilk:Hf,crimson:Vf,cyan:jf,darkblue:zf,darkcyan:Yf,darkgoldenrod:Wf,darkgray:qf,darkgreen:$f,darkgrey:Zf,darkkhaki:Kf,darkmagenta:Jf,darkolivegreen:Qf,darkorange:tc,darkorchid:ec,darkred:rc,darksalmon:ic,darkseagreen:nc,darkslateblue:sc,darkslategray:ac,darkslategrey:oc,darkturquoise:hc,darkviolet:uc,deeppink:lc,deepskyblue:fc,dimgray:cc,dimgrey:dc,dodgerblue:pc,firebrick:vc,floralwhite:_c,forestgreen:gc,fuchsia:mc,gainsboro:yc,ghostwhite:xc,goldenrod:bc,gold:Tc,gray:Ec,green:Sc,greenyellow:Pc,grey:wc,honeydew:Cc,hotpink:Ic,indianred:Mc,indigo:Ac,ivory:Rc,khaki:Oc,lavenderblush:Dc,lavender:Fc,lawngreen:Lc,lemonchiffon:Bc,lightblue:Nc,lightcoral:Uc,lightcyan:kc,lightgoldenrodyellow:Gc,lightgray:Xc,lightgreen:Hc,lightgrey:Vc,lightpink:jc,lightsalmon:zc,lightseagreen:Yc,lightskyblue:Wc,lightslategray:qc,lightslategrey:$c,lightsteelblue:Zc,lightyellow:Kc,lime:Jc,limegreen:Qc,linen:td,magenta:ed,maroon:rd,mediumaquamarine:id,mediumblue:nd,mediumorchid:sd,mediumpurple:ad,mediumseagreen:od,mediumslateblue:hd,mediumspringgreen:ud,mediumturquoise:ld,mediumvioletred:fd,midnightblue:cd,mintcream:dd,mistyrose:pd,moccasin:vd,navajowhite:_d,navy:gd,oldlace:md,olive:yd,olivedrab:xd,orange:bd,orangered:Td,orchid:Ed,palegoldenrod:Sd,palegreen:Pd,paleturquoise:wd,palevioletred:Cd,papayawhip:Id,peachpuff:Md,peru:Ad,pink:Rd,plum:Od,powderblue:Dd,purple:Fd,rebeccapurple:Ld,red:Bd,rosybrown:Nd,royalblue:Ud,saddlebrown:kd,salmon:Gd,sandybrown:Xd,seagreen:Hd,seashell:Vd,sienna:jd,silver:zd,skyblue:Yd,slateblue:Wd,slategray:qd,slategrey:$d,snow:Zd,springgreen:Kd,steelblue:Jd,tan:Qd,teal:tp,thistle:ep,tomato:rp,turquoise:ip,violet:np,wheat:sp,white:ap,whitesmoke:op,yellow:hp,yellowgreen:up};function Ze(r,e){return e===void 0&&(e=[]),e[0]=(r>>16&255)/255,e[1]=(r>>8&255)/255,e[2]=(r&255)/255,e}function js(r){var e=r.toString(16);return e="000000".substring(0,6-e.length)+e,"#"+e}function zs(r){return typeof r=="string"&&(r=lp[r.toLowerCase()]||r,r[0]==="#"&&(r=r.slice(1))),parseInt(r,16)}function fp(r){return(r[0]*255<<16)+(r[1]*255<<8)+(r[2]*255|0)}function cp(){for(var r=[],e=[],t=0;t<32;t++)r[t]=t,e[t]=t;r[L.NORMAL_NPM]=L.NORMAL,r[L.ADD_NPM]=L.ADD,r[L.SCREEN_NPM]=L.SCREEN,e[L.NORMAL]=L.NORMAL_NPM,e[L.ADD]=L.ADD_NPM,e[L.SCREEN]=L.SCREEN_NPM;var i=[];return i.push(e),i.push(r),i}var Ys=cp();function Ws(r,e){return Ys[e?1:0][r]}function Th(r,e,t,i){return t=t||new Float32Array(4),i||i===void 0?(t[0]=r[0]*e,t[1]=r[1]*e,t[2]=r[2]*e):(t[0]=r[0],t[1]=r[1],t[2]=r[2]),t[3]=e,t}function Ki(r,e){if(e===1)return(e*255<<24)+r;if(e===0)return 0;var t=r>>16&255,i=r>>8&255,n=r&255;return t=t*e+.5|0,i=i*e+.5|0,n=n*e+.5|0,(e*255<<24)+(t<<16)+(i<<8)+n}function qs(r,e,t,i){return t=t||new Float32Array(4),t[0]=(r>>16&255)/255,t[1]=(r>>8&255)/255,t[2]=(r&255)/255,(i||i===void 0)&&(t[0]*=e,t[1]*=e,t[2]*=e),t[3]=e,t}function Eh(r,e){e===void 0&&(e=null);var t=r*6;if(e=e||new Uint16Array(t),e.length!==t)throw new Error("Out buffer length is incorrect, got "+e.length+" and expected "+t);for(var i=0,n=0;i<t;i+=6,n+=4)e[i+0]=n+0,e[i+1]=n+1,e[i+2]=n+2,e[i+3]=n+0,e[i+4]=n+2,e[i+5]=n+3;return e}function Ji(r){if(r.BYTES_PER_ELEMENT===4)return r instanceof Float32Array?"Float32Array":r instanceof Uint32Array?"Uint32Array":"Int32Array";if(r.BYTES_PER_ELEMENT===2){if(r instanceof Uint16Array)return"Uint16Array"}else if(r.BYTES_PER_ELEMENT===1&&r instanceof Uint8Array)return"Uint8Array";return null}var dp={Float32Array,Uint32Array,Int32Array,Uint8Array};function pp(r,e){for(var t=0,i=0,n={},s=0;s<r.length;s++)i+=e[s],t+=r[s].length;for(var a=new ArrayBuffer(t*4),o=null,h=0,s=0;s<r.length;s++){var u=e[s],l=r[s],c=Ji(l);n[c]||(n[c]=new dp[c](a)),o=n[c];for(var f=0;f<l.length;f++){var d=(f/u|0)*i+h,p=f%u;o[d+p]=l[f]}h+=u}return new Float32Array(a)}function qr(r){return r+=r===0?1:0,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r+1}function Jn(r){return!(r&r-1)&&!!r}function Qn(r){var e=(r>65535?1:0)<<4;r>>>=e;var t=(r>255?1:0)<<3;return r>>>=t,e|=t,t=(r>15?1:0)<<2,r>>>=t,e|=t,t=(r>3?1:0)<<1,r>>>=t,e|=t,e|r>>1}function We(r,e,t){var i=r.length,n;if(!(e>=i||t===0)){t=e+t>i?i-e:t;var s=i-t;for(n=e;n<s;++n)r[n]=r[n+t];r.length=s}}function Ye(r){return r===0?0:r<0?-1:1}var vp=0;function Ie(){return++vp}var _o={};function At(r,e,t){if(t===void 0&&(t=3),!_o[e]){var i=new Error().stack;typeof i>"u"?console.warn("PixiJS Deprecation Warning: ",e+`
Deprecated since v`+r):(i=i.split(`
`).splice(t).join(`
`),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",e+`
Deprecated since v`+r),console.warn(i),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",e+`
Deprecated since v`+r),console.warn(i))),_o[e]=!0}}var ts={},Dt=Object.create(null),Ut=Object.create(null);function _p(){var r;for(r in Dt)Dt[r].destroy();for(r in Ut)Ut[r].destroy()}function gp(){var r;for(r in Dt)delete Dt[r];for(r in Ut)delete Ut[r]}var es=function(){function r(e,t,i){this.canvas=A.ADAPTER.createCanvas(),this.context=this.canvas.getContext("2d"),this.resolution=i||A.RESOLUTION,this.resize(e,t)}return r.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},r.prototype.resize=function(e,t){this.canvas.width=Math.round(e*this.resolution),this.canvas.height=Math.round(t*this.resolution)},r.prototype.destroy=function(){this.context=null,this.canvas=null},Object.defineProperty(r.prototype,"width",{get:function(){return this.canvas.width},set:function(e){this.canvas.width=Math.round(e)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"height",{get:function(){return this.canvas.height},set:function(e){this.canvas.height=Math.round(e)},enumerable:!1,configurable:!0}),r}();function Sh(r){var e=r.width,t=r.height,i=r.getContext("2d",{willReadFrequently:!0}),n=i.getImageData(0,0,e,t),s=n.data,a=s.length,o={top:null,left:null,right:null,bottom:null},h=null,u,l,c;for(u=0;u<a;u+=4)s[u+3]!==0&&(l=u/4%e,c=~~(u/4/e),o.top===null&&(o.top=c),(o.left===null||l<o.left)&&(o.left=l),(o.right===null||o.right<l)&&(o.right=l+1),(o.bottom===null||o.bottom<c)&&(o.bottom=c));return o.top!==null&&(e=o.right-o.left,t=o.bottom-o.top+1,h=i.getImageData(o.left,o.top,e,t)),{height:t,width:e,data:h}}var Ph=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i;function mp(r){var e=Ph.exec(r);if(e)return{mediaType:e[1]?e[1].toLowerCase():void 0,subType:e[2]?e[2].toLowerCase():void 0,charset:e[3]?e[3].toLowerCase():void 0,encoding:e[4]?e[4].toLowerCase():void 0,data:e[5]}}var ci;function wh(r,e){if(e===void 0&&(e=globalThis.location),r.indexOf("data:")===0)return"";e=e||globalThis.location,ci||(ci=document.createElement("a")),ci.href=r;var t=he.parse(ci.href),i=!t.port&&e.port===""||t.port===e.port;return t.hostname!==e.hostname||!i||t.protocol!==e.protocol?"anonymous":""}function $r(r,e){var t=A.RETINA_PREFIX.exec(r);return t?parseFloat(t[1]):e!==void 0?e:1}const yp=Object.freeze(Object.defineProperty({__proto__:null,BaseTextureCache:Ut,CanvasRenderTarget:es,DATA_URI:Ph,EventEmitter:ye,ProgramCache:ts,TextureCache:Dt,clearTextureCache:gp,correctBlendMode:Ws,createIndicesForQuads:Eh,decomposeDataUri:mp,deprecation:At,destroyTextureCache:_p,determineCrossOrigin:wh,earcut:Vs,getBufferType:Ji,getResolutionOfUrl:$r,hex2rgb:Ze,hex2string:js,interleaveTypedArrays:pp,isMobile:Ht,isPow2:Jn,isWebGLSupported:bh,log2:Qn,nextPow2:qr,path:yh,premultiplyBlendMode:Ys,premultiplyRgba:Th,premultiplyTint:Ki,premultiplyTintToRgba:qs,removeItems:We,rgb2hex:fp,sayHello:xh,sign:Ye,skipHello:Ef,string2hex:zs,trimCanvas:Sh,uid:Ie,url:he},Symbol.toStringTag,{value:"Module"}));/*!
 * @pixi/math - v6.5.9
 * Compiled Wed, 25 Jan 2023 05:01:45 UTC
 *
 * @pixi/math is licensed under the MIT License.
 * http://www.opensource.org/licenses/mit-license
 */var Zr=Math.PI*2,Ch=180/Math.PI,Ih=Math.PI/180,Tt;(function(r){r[r.POLY=0]="POLY",r[r.RECT=1]="RECT",r[r.CIRC=2]="CIRC",r[r.ELIP=3]="ELIP",r[r.RREC=4]="RREC"})(Tt||(Tt={}));var et=function(){function r(e,t){e===void 0&&(e=0),t===void 0&&(t=0),this.x=0,this.y=0,this.x=e,this.y=t}return r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.copyFrom=function(e){return this.set(e.x,e.y),this},r.prototype.copyTo=function(e){return e.set(this.x,this.y),e},r.prototype.equals=function(e){return e.x===this.x&&e.y===this.y},r.prototype.set=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=e),this.x=e,this.y=t,this},r.prototype.toString=function(){return"[@pixi/math:Point x="+this.x+" y="+this.y+"]"},r}(),di=[new et,new et,new et,new et],j=function(){function r(e,t,i,n){e===void 0&&(e=0),t===void 0&&(t=0),i===void 0&&(i=0),n===void 0&&(n=0),this.x=Number(e),this.y=Number(t),this.width=Number(i),this.height=Number(n),this.type=Tt.RECT}return Object.defineProperty(r.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(r,"EMPTY",{get:function(){return new r(0,0,0,0)},enumerable:!1,configurable:!0}),r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copyFrom=function(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this},r.prototype.copyTo=function(e){return e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e},r.prototype.contains=function(e,t){return this.width<=0||this.height<=0?!1:e>=this.x&&e<this.x+this.width&&t>=this.y&&t<this.y+this.height},r.prototype.intersects=function(e,t){if(!t){var i=this.x<e.x?e.x:this.x,n=this.right>e.right?e.right:this.right;if(n<=i)return!1;var s=this.y<e.y?e.y:this.y,a=this.bottom>e.bottom?e.bottom:this.bottom;return a>s}var o=this.left,h=this.right,u=this.top,l=this.bottom;if(h<=o||l<=u)return!1;var c=di[0].set(e.left,e.top),f=di[1].set(e.left,e.bottom),d=di[2].set(e.right,e.top),p=di[3].set(e.right,e.bottom);if(d.x<=c.x||f.y<=c.y)return!1;var _=Math.sign(t.a*t.d-t.b*t.c);if(_===0||(t.apply(c,c),t.apply(f,f),t.apply(d,d),t.apply(p,p),Math.max(c.x,f.x,d.x,p.x)<=o||Math.min(c.x,f.x,d.x,p.x)>=h||Math.max(c.y,f.y,d.y,p.y)<=u||Math.min(c.y,f.y,d.y,p.y)>=l))return!1;var v=_*(f.y-c.y),g=_*(c.x-f.x),m=v*o+g*u,y=v*h+g*u,b=v*o+g*l,x=v*h+g*l;if(Math.max(m,y,b,x)<=v*c.x+g*c.y||Math.min(m,y,b,x)>=v*p.x+g*p.y)return!1;var T=_*(c.y-d.y),E=_*(d.x-c.x),I=T*o+E*u,S=T*h+E*u,P=T*o+E*l,R=T*h+E*l;return!(Math.max(I,S,P,R)<=T*c.x+E*c.y||Math.min(I,S,P,R)>=T*p.x+E*p.y)},r.prototype.pad=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=e),this.x-=e,this.y-=t,this.width+=e*2,this.height+=t*2,this},r.prototype.fit=function(e){var t=Math.max(this.x,e.x),i=Math.min(this.x+this.width,e.x+e.width),n=Math.max(this.y,e.y),s=Math.min(this.y+this.height,e.y+e.height);return this.x=t,this.width=Math.max(i-t,0),this.y=n,this.height=Math.max(s-n,0),this},r.prototype.ceil=function(e,t){e===void 0&&(e=1),t===void 0&&(t=.001);var i=Math.ceil((this.x+this.width-t)*e)/e,n=Math.ceil((this.y+this.height-t)*e)/e;return this.x=Math.floor((this.x+t)*e)/e,this.y=Math.floor((this.y+t)*e)/e,this.width=i-this.x,this.height=n-this.y,this},r.prototype.enlarge=function(e){var t=Math.min(this.x,e.x),i=Math.max(this.x+this.width,e.x+e.width),n=Math.min(this.y,e.y),s=Math.max(this.y+this.height,e.y+e.height);return this.x=t,this.width=i-t,this.y=n,this.height=s-n,this},r.prototype.toString=function(){return"[@pixi/math:Rectangle x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+"]"},r}(),Mh=function(){function r(e,t,i){e===void 0&&(e=0),t===void 0&&(t=0),i===void 0&&(i=0),this.x=e,this.y=t,this.radius=i,this.type=Tt.CIRC}return r.prototype.clone=function(){return new r(this.x,this.y,this.radius)},r.prototype.contains=function(e,t){if(this.radius<=0)return!1;var i=this.radius*this.radius,n=this.x-e,s=this.y-t;return n*=n,s*=s,n+s<=i},r.prototype.getBounds=function(){return new j(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)},r.prototype.toString=function(){return"[@pixi/math:Circle x="+this.x+" y="+this.y+" radius="+this.radius+"]"},r}(),Ah=function(){function r(e,t,i,n){e===void 0&&(e=0),t===void 0&&(t=0),i===void 0&&(i=0),n===void 0&&(n=0),this.x=e,this.y=t,this.width=i,this.height=n,this.type=Tt.ELIP}return r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.contains=function(e,t){if(this.width<=0||this.height<=0)return!1;var i=(e-this.x)/this.width,n=(t-this.y)/this.height;return i*=i,n*=n,i+n<=1},r.prototype.getBounds=function(){return new j(this.x-this.width,this.y-this.height,this.width,this.height)},r.prototype.toString=function(){return"[@pixi/math:Ellipse x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+"]"},r}(),Nr=function(){function r(){for(var e=arguments,t=[],i=0;i<arguments.length;i++)t[i]=e[i];var n=Array.isArray(t[0])?t[0]:t;if(typeof n[0]!="number"){for(var s=[],a=0,o=n.length;a<o;a++)s.push(n[a].x,n[a].y);n=s}this.points=n,this.type=Tt.POLY,this.closeStroke=!0}return r.prototype.clone=function(){var e=this.points.slice(),t=new r(e);return t.closeStroke=this.closeStroke,t},r.prototype.contains=function(e,t){for(var i=!1,n=this.points.length/2,s=0,a=n-1;s<n;a=s++){var o=this.points[s*2],h=this.points[s*2+1],u=this.points[a*2],l=this.points[a*2+1],c=h>t!=l>t&&e<(u-o)*((t-h)/(l-h))+o;c&&(i=!i)}return i},r.prototype.toString=function(){return"[@pixi/math:Polygon"+("closeStroke="+this.closeStroke)+("points="+this.points.reduce(function(e,t){return e+", "+t},"")+"]")},r}(),Rh=function(){function r(e,t,i,n,s){e===void 0&&(e=0),t===void 0&&(t=0),i===void 0&&(i=0),n===void 0&&(n=0),s===void 0&&(s=20),this.x=e,this.y=t,this.width=i,this.height=n,this.radius=s,this.type=Tt.RREC}return r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height,this.radius)},r.prototype.contains=function(e,t){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height){var i=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(t>=this.y+i&&t<=this.y+this.height-i||e>=this.x+i&&e<=this.x+this.width-i)return!0;var n=e-(this.x+i),s=t-(this.y+i),a=i*i;if(n*n+s*s<=a||(n=e-(this.x+this.width-i),n*n+s*s<=a)||(s=t-(this.y+this.height-i),n*n+s*s<=a)||(n=e-(this.x+i),n*n+s*s<=a))return!0}return!1},r.prototype.toString=function(){return"[@pixi/math:RoundedRectangle x="+this.x+" y="+this.y+("width="+this.width+" height="+this.height+" radius="+this.radius+"]")},r}(),Se=function(){function r(e,t,i,n){i===void 0&&(i=0),n===void 0&&(n=0),this._x=i,this._y=n,this.cb=e,this.scope=t}return r.prototype.clone=function(e,t){return e===void 0&&(e=this.cb),t===void 0&&(t=this.scope),new r(e,t,this._x,this._y)},r.prototype.set=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=e),(this._x!==e||this._y!==t)&&(this._x=e,this._y=t,this.cb.call(this.scope)),this},r.prototype.copyFrom=function(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this.cb.call(this.scope)),this},r.prototype.copyTo=function(e){return e.set(this._x,this._y),e},r.prototype.equals=function(e){return e.x===this._x&&e.y===this._y},r.prototype.toString=function(){return"[@pixi/math:ObservablePoint x=0 y=0 scope="+this.scope+"]"},Object.defineProperty(r.prototype,"x",{get:function(){return this._x},set:function(e){this._x!==e&&(this._x=e,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"y",{get:function(){return this._y},set:function(e){this._y!==e&&(this._y=e,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),r}(),lt=function(){function r(e,t,i,n,s,a){e===void 0&&(e=1),t===void 0&&(t=0),i===void 0&&(i=0),n===void 0&&(n=1),s===void 0&&(s=0),a===void 0&&(a=0),this.array=null,this.a=e,this.b=t,this.c=i,this.d=n,this.tx=s,this.ty=a}return r.prototype.fromArray=function(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]},r.prototype.set=function(e,t,i,n,s,a){return this.a=e,this.b=t,this.c=i,this.d=n,this.tx=s,this.ty=a,this},r.prototype.toArray=function(e,t){this.array||(this.array=new Float32Array(9));var i=t||this.array;return e?(i[0]=this.a,i[1]=this.b,i[2]=0,i[3]=this.c,i[4]=this.d,i[5]=0,i[6]=this.tx,i[7]=this.ty,i[8]=1):(i[0]=this.a,i[1]=this.c,i[2]=this.tx,i[3]=this.b,i[4]=this.d,i[5]=this.ty,i[6]=0,i[7]=0,i[8]=1),i},r.prototype.apply=function(e,t){t=t||new et;var i=e.x,n=e.y;return t.x=this.a*i+this.c*n+this.tx,t.y=this.b*i+this.d*n+this.ty,t},r.prototype.applyInverse=function(e,t){t=t||new et;var i=1/(this.a*this.d+this.c*-this.b),n=e.x,s=e.y;return t.x=this.d*i*n+-this.c*i*s+(this.ty*this.c-this.tx*this.d)*i,t.y=this.a*i*s+-this.b*i*n+(-this.ty*this.a+this.tx*this.b)*i,t},r.prototype.translate=function(e,t){return this.tx+=e,this.ty+=t,this},r.prototype.scale=function(e,t){return this.a*=e,this.d*=t,this.c*=e,this.b*=t,this.tx*=e,this.ty*=t,this},r.prototype.rotate=function(e){var t=Math.cos(e),i=Math.sin(e),n=this.a,s=this.c,a=this.tx;return this.a=n*t-this.b*i,this.b=n*i+this.b*t,this.c=s*t-this.d*i,this.d=s*i+this.d*t,this.tx=a*t-this.ty*i,this.ty=a*i+this.ty*t,this},r.prototype.append=function(e){var t=this.a,i=this.b,n=this.c,s=this.d;return this.a=e.a*t+e.b*n,this.b=e.a*i+e.b*s,this.c=e.c*t+e.d*n,this.d=e.c*i+e.d*s,this.tx=e.tx*t+e.ty*n+this.tx,this.ty=e.tx*i+e.ty*s+this.ty,this},r.prototype.setTransform=function(e,t,i,n,s,a,o,h,u){return this.a=Math.cos(o+u)*s,this.b=Math.sin(o+u)*s,this.c=-Math.sin(o-h)*a,this.d=Math.cos(o-h)*a,this.tx=e-(i*this.a+n*this.c),this.ty=t-(i*this.b+n*this.d),this},r.prototype.prepend=function(e){var t=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){var i=this.a,n=this.c;this.a=i*e.a+this.b*e.c,this.b=i*e.b+this.b*e.d,this.c=n*e.a+this.d*e.c,this.d=n*e.b+this.d*e.d}return this.tx=t*e.a+this.ty*e.c+e.tx,this.ty=t*e.b+this.ty*e.d+e.ty,this},r.prototype.decompose=function(e){var t=this.a,i=this.b,n=this.c,s=this.d,a=e.pivot,o=-Math.atan2(-n,s),h=Math.atan2(i,t),u=Math.abs(o+h);return u<1e-5||Math.abs(Zr-u)<1e-5?(e.rotation=h,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=o,e.skew.y=h),e.scale.x=Math.sqrt(t*t+i*i),e.scale.y=Math.sqrt(n*n+s*s),e.position.x=this.tx+(a.x*t+a.y*n),e.position.y=this.ty+(a.x*i+a.y*s),e},r.prototype.invert=function(){var e=this.a,t=this.b,i=this.c,n=this.d,s=this.tx,a=e*n-t*i;return this.a=n/a,this.b=-t/a,this.c=-i/a,this.d=e/a,this.tx=(i*this.ty-n*s)/a,this.ty=-(e*this.ty-t*s)/a,this},r.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},r.prototype.clone=function(){var e=new r;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},r.prototype.copyTo=function(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},r.prototype.copyFrom=function(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this},r.prototype.toString=function(){return"[@pixi/math:Matrix a="+this.a+" b="+this.b+" c="+this.c+" d="+this.d+" tx="+this.tx+" ty="+this.ty+"]"},Object.defineProperty(r,"IDENTITY",{get:function(){return new r},enumerable:!1,configurable:!0}),Object.defineProperty(r,"TEMP_MATRIX",{get:function(){return new r},enumerable:!1,configurable:!0}),r}(),Ue=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],ke=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Ge=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Xe=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],rs=[],Oh=[],pi=Math.sign;function xp(){for(var r=0;r<16;r++){var e=[];rs.push(e);for(var t=0;t<16;t++)for(var i=pi(Ue[r]*Ue[t]+Ge[r]*ke[t]),n=pi(ke[r]*Ue[t]+Xe[r]*ke[t]),s=pi(Ue[r]*Ge[t]+Ge[r]*Xe[t]),a=pi(ke[r]*Ge[t]+Xe[r]*Xe[t]),o=0;o<16;o++)if(Ue[o]===i&&ke[o]===n&&Ge[o]===s&&Xe[o]===a){e.push(o);break}}for(var r=0;r<16;r++){var h=new lt;h.set(Ue[r],ke[r],Ge[r],Xe[r],0,0),Oh.push(h)}}xp();var ut={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(r){return Ue[r]},uY:function(r){return ke[r]},vX:function(r){return Ge[r]},vY:function(r){return Xe[r]},inv:function(r){return r&8?r&15:-r&7},add:function(r,e){return rs[r][e]},sub:function(r,e){return rs[r][ut.inv(e)]},rotate180:function(r){return r^4},isVertical:function(r){return(r&3)===2},byDirection:function(r,e){return Math.abs(r)*2<=Math.abs(e)?e>=0?ut.S:ut.N:Math.abs(e)*2<=Math.abs(r)?r>0?ut.E:ut.W:e>0?r>0?ut.SE:ut.SW:r>0?ut.NE:ut.NW},matrixAppendRotationInv:function(r,e,t,i){t===void 0&&(t=0),i===void 0&&(i=0);var n=Oh[ut.inv(e)];n.tx=t,n.ty=i,r.append(n)}},Qi=function(){function r(){this.worldTransform=new lt,this.localTransform=new lt,this.position=new Se(this.onChange,this,0,0),this.scale=new Se(this.onChange,this,1,1),this.pivot=new Se(this.onChange,this,0,0),this.skew=new Se(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return r.prototype.onChange=function(){this._localID++},r.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},r.prototype.toString=function(){return"[@pixi/math:Transform "+("position=("+this.position.x+", "+this.position.y+") ")+("rotation="+this.rotation+" ")+("scale=("+this.scale.x+", "+this.scale.y+") ")+("skew=("+this.skew.x+", "+this.skew.y+") ")+"]"},r.prototype.updateLocalTransform=function(){var e=this.localTransform;this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1)},r.prototype.updateTransform=function(e){var t=this.localTransform;if(this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==e._worldID){var i=e.worldTransform,n=this.worldTransform;n.a=t.a*i.a+t.b*i.c,n.b=t.a*i.b+t.b*i.d,n.c=t.c*i.a+t.d*i.c,n.d=t.c*i.b+t.d*i.d,n.tx=t.tx*i.a+t.ty*i.c+i.tx,n.ty=t.tx*i.b+t.ty*i.d+i.ty,this._parentID=e._worldID,this._worldID++}},r.prototype.setFromMatrix=function(e){e.decompose(this),this._localID++},Object.defineProperty(r.prototype,"rotation",{get:function(){return this._rotation},set:function(e){this._rotation!==e&&(this._rotation=e,this.updateSkew())},enumerable:!1,configurable:!0}),r.IDENTITY=new r,r}();/*!
 * @pixi/display - v6.5.9
 * Compiled Wed, 25 Jan 2023 05:01:45 UTC
 *
 * @pixi/display is licensed under the MIT License.
 * http://www.opensource.org/licenses/mit-license
 */A.SORTABLE_CHILDREN=!1;var Kr=function(){function r(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return r.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},r.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},r.prototype.getRectangle=function(e){return this.minX>this.maxX||this.minY>this.maxY?j.EMPTY:(e=e||new j(0,0,1,1),e.x=this.minX,e.y=this.minY,e.width=this.maxX-this.minX,e.height=this.maxY-this.minY,e)},r.prototype.addPoint=function(e){this.minX=Math.min(this.minX,e.x),this.maxX=Math.max(this.maxX,e.x),this.minY=Math.min(this.minY,e.y),this.maxY=Math.max(this.maxY,e.y)},r.prototype.addPointMatrix=function(e,t){var i=e.a,n=e.b,s=e.c,a=e.d,o=e.tx,h=e.ty,u=i*t.x+s*t.y+o,l=n*t.x+a*t.y+h;this.minX=Math.min(this.minX,u),this.maxX=Math.max(this.maxX,u),this.minY=Math.min(this.minY,l),this.maxY=Math.max(this.maxY,l)},r.prototype.addQuad=function(e){var t=this.minX,i=this.minY,n=this.maxX,s=this.maxY,a=e[0],o=e[1];t=a<t?a:t,i=o<i?o:i,n=a>n?a:n,s=o>s?o:s,a=e[2],o=e[3],t=a<t?a:t,i=o<i?o:i,n=a>n?a:n,s=o>s?o:s,a=e[4],o=e[5],t=a<t?a:t,i=o<i?o:i,n=a>n?a:n,s=o>s?o:s,a=e[6],o=e[7],t=a<t?a:t,i=o<i?o:i,n=a>n?a:n,s=o>s?o:s,this.minX=t,this.minY=i,this.maxX=n,this.maxY=s},r.prototype.addFrame=function(e,t,i,n,s){this.addFrameMatrix(e.worldTransform,t,i,n,s)},r.prototype.addFrameMatrix=function(e,t,i,n,s){var a=e.a,o=e.b,h=e.c,u=e.d,l=e.tx,c=e.ty,f=this.minX,d=this.minY,p=this.maxX,_=this.maxY,v=a*t+h*i+l,g=o*t+u*i+c;f=v<f?v:f,d=g<d?g:d,p=v>p?v:p,_=g>_?g:_,v=a*n+h*i+l,g=o*n+u*i+c,f=v<f?v:f,d=g<d?g:d,p=v>p?v:p,_=g>_?g:_,v=a*t+h*s+l,g=o*t+u*s+c,f=v<f?v:f,d=g<d?g:d,p=v>p?v:p,_=g>_?g:_,v=a*n+h*s+l,g=o*n+u*s+c,f=v<f?v:f,d=g<d?g:d,p=v>p?v:p,_=g>_?g:_,this.minX=f,this.minY=d,this.maxX=p,this.maxY=_},r.prototype.addVertexData=function(e,t,i){for(var n=this.minX,s=this.minY,a=this.maxX,o=this.maxY,h=t;h<i;h+=2){var u=e[h],l=e[h+1];n=u<n?u:n,s=l<s?l:s,a=u>a?u:a,o=l>o?l:o}this.minX=n,this.minY=s,this.maxX=a,this.maxY=o},r.prototype.addVertices=function(e,t,i,n){this.addVerticesMatrix(e.worldTransform,t,i,n)},r.prototype.addVerticesMatrix=function(e,t,i,n,s,a){s===void 0&&(s=0),a===void 0&&(a=s);for(var o=e.a,h=e.b,u=e.c,l=e.d,c=e.tx,f=e.ty,d=this.minX,p=this.minY,_=this.maxX,v=this.maxY,g=i;g<n;g+=2){var m=t[g],y=t[g+1],b=o*m+u*y+c,x=l*y+h*m+f;d=Math.min(d,b-s),_=Math.max(_,b+s),p=Math.min(p,x-a),v=Math.max(v,x+a)}this.minX=d,this.minY=p,this.maxX=_,this.maxY=v},r.prototype.addBounds=function(e){var t=this.minX,i=this.minY,n=this.maxX,s=this.maxY;this.minX=e.minX<t?e.minX:t,this.minY=e.minY<i?e.minY:i,this.maxX=e.maxX>n?e.maxX:n,this.maxY=e.maxY>s?e.maxY:s},r.prototype.addBoundsMask=function(e,t){var i=e.minX>t.minX?e.minX:t.minX,n=e.minY>t.minY?e.minY:t.minY,s=e.maxX<t.maxX?e.maxX:t.maxX,a=e.maxY<t.maxY?e.maxY:t.maxY;if(i<=s&&n<=a){var o=this.minX,h=this.minY,u=this.maxX,l=this.maxY;this.minX=i<o?i:o,this.minY=n<h?n:h,this.maxX=s>u?s:u,this.maxY=a>l?a:l}},r.prototype.addBoundsMatrix=function(e,t){this.addFrameMatrix(t,e.minX,e.minY,e.maxX,e.maxY)},r.prototype.addBoundsArea=function(e,t){var i=e.minX>t.x?e.minX:t.x,n=e.minY>t.y?e.minY:t.y,s=e.maxX<t.x+t.width?e.maxX:t.x+t.width,a=e.maxY<t.y+t.height?e.maxY:t.y+t.height;if(i<=s&&n<=a){var o=this.minX,h=this.minY,u=this.maxX,l=this.maxY;this.minX=i<o?i:o,this.minY=n<h?n:h,this.maxX=s>u?s:u,this.maxY=a>l?a:l}},r.prototype.pad=function(e,t){e===void 0&&(e=0),t===void 0&&(t=e),this.isEmpty()||(this.minX-=e,this.maxX+=e,this.minY-=t,this.maxY+=t)},r.prototype.addFramePad=function(e,t,i,n,s,a){e-=s,t-=a,i+=s,n+=a,this.minX=this.minX<e?this.minX:e,this.maxX=this.maxX>i?this.maxX:i,this.minY=this.minY<t?this.minY:t,this.maxY=this.maxY>n?this.maxY:n},r}();/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var is=function(r,e){return is=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])},is(r,e)};function $s(r,e){is(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var _t=function(r){$s(e,r);function e(){var t=r.call(this)||this;return t.tempDisplayObjectParent=null,t.transform=new Qi,t.alpha=1,t.visible=!0,t.renderable=!0,t.cullable=!1,t.cullArea=null,t.parent=null,t.worldAlpha=1,t._lastSortedIndex=0,t._zIndex=0,t.filterArea=null,t.filters=null,t._enabledFilters=null,t._bounds=new Kr,t._localBounds=null,t._boundsID=0,t._boundsRect=null,t._localBoundsRect=null,t._mask=null,t._maskRefCount=0,t._destroyed=!1,t.isSprite=!1,t.isMask=!1,t}return e.mixin=function(t){for(var i=Object.keys(t),n=0;n<i.length;++n){var s=i[n];Object.defineProperty(e.prototype,s,Object.getOwnPropertyDescriptor(t,s))}},Object.defineProperty(e.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!1,configurable:!0}),e.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},e.prototype.updateTransform=function(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha},e.prototype.getBounds=function(t,i){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),i||(this._boundsRect||(this._boundsRect=new j),i=this._boundsRect),this._bounds.getRectangle(i)},e.prototype.getLocalBounds=function(t){t||(this._localBoundsRect||(this._localBoundsRect=new j),t=this._localBoundsRect),this._localBounds||(this._localBounds=new Kr);var i=this.transform,n=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;var s=this._bounds,a=this._boundsID;this._bounds=this._localBounds;var o=this.getBounds(!1,t);return this.parent=n,this.transform=i,this._bounds=s,this._bounds.updateID+=this._boundsID-a,o},e.prototype.toGlobal=function(t,i,n){return n===void 0&&(n=!1),n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,i)},e.prototype.toLocal=function(t,i,n,s){return i&&(t=i.toGlobal(t,n,s)),s||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,n)},e.prototype.setParent=function(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t},e.prototype.setTransform=function(t,i,n,s,a,o,h,u,l){return t===void 0&&(t=0),i===void 0&&(i=0),n===void 0&&(n=1),s===void 0&&(s=1),a===void 0&&(a=0),o===void 0&&(o=0),h===void 0&&(h=0),u===void 0&&(u=0),l===void 0&&(l=0),this.position.x=t,this.position.y=i,this.scale.x=n||1,this.scale.y=s||1,this.rotation=a,this.skew.x=o,this.skew.y=h,this.pivot.x=u,this.pivot.y=l,this},e.prototype.destroy=function(t){this.parent&&this.parent.removeChild(this),this._destroyed=!0,this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.interactive=!1,this.interactiveChildren=!1,this.emit("destroyed"),this.removeAllListeners()},Object.defineProperty(e.prototype,"_tempDisplayObjectParent",{get:function(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new Zs),this.tempDisplayObjectParent},enumerable:!1,configurable:!0}),e.prototype.enableTempParent=function(){var t=this.parent;return this.parent=this._tempDisplayObjectParent,t},e.prototype.disableTempParent=function(t){this.parent=t},Object.defineProperty(e.prototype,"x",{get:function(){return this.position.x},set:function(t){this.transform.position.x=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.position.y},set:function(t){this.transform.position.y=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"worldTransform",{get:function(){return this.transform.worldTransform},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"localTransform",{get:function(){return this.transform.localTransform},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"position",{get:function(){return this.transform.position},set:function(t){this.transform.position.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scale",{get:function(){return this.transform.scale},set:function(t){this.transform.scale.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pivot",{get:function(){return this.transform.pivot},set:function(t){this.transform.pivot.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"skew",{get:function(){return this.transform.skew},set:function(t){this.transform.skew.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotation",{get:function(){return this.transform.rotation},set:function(t){this.transform.rotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"angle",{get:function(){return this.transform.rotation*Ch},set:function(t){this.transform.rotation=t*Ih},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zIndex",{get:function(){return this._zIndex},set:function(t){this._zIndex=t,this.parent&&(this.parent.sortDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"worldVisible",{get:function(){var t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mask",{get:function(){return this._mask},set:function(t){if(this._mask!==t){if(this._mask){var i=this._mask.isMaskData?this._mask.maskObject:this._mask;i&&(i._maskRefCount--,i._maskRefCount===0&&(i.renderable=!0,i.isMask=!1))}if(this._mask=t,this._mask){var i=this._mask.isMaskData?this._mask.maskObject:this._mask;i&&(i._maskRefCount===0&&(i.renderable=!1,i.isMask=!0),i._maskRefCount++)}}},enumerable:!1,configurable:!0}),e}(ye),Zs=function(r){$s(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.sortDirty=null,t}return e}(_t);_t.prototype.displayObjectUpdateTransform=_t.prototype.updateTransform;function bp(r,e){return r.zIndex===e.zIndex?r._lastSortedIndex-e._lastSortedIndex:r.zIndex-e.zIndex}var Yt=function(r){$s(e,r);function e(){var t=r.call(this)||this;return t.children=[],t.sortableChildren=A.SORTABLE_CHILDREN,t.sortDirty=!1,t}return e.prototype.onChildrenChange=function(t){},e.prototype.addChild=function(){for(var t=arguments,i=[],n=0;n<arguments.length;n++)i[n]=t[n];if(i.length>1)for(var s=0;s<i.length;s++)this.addChild(i[s]);else{var a=i[0];a.parent&&a.parent.removeChild(a),a.parent=this,this.sortDirty=!0,a.transform._parentID=-1,this.children.push(a),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",a,this,this.children.length-1),a.emit("added",this)}return i[0]},e.prototype.addChildAt=function(t,i){if(i<0||i>this.children.length)throw new Error(t+"addChildAt: The index "+i+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.splice(i,0,t),this._boundsID++,this.onChildrenChange(i),t.emit("added",this),this.emit("childAdded",t,this,i),t},e.prototype.swapChildren=function(t,i){if(t!==i){var n=this.getChildIndex(t),s=this.getChildIndex(i);this.children[n]=i,this.children[s]=t,this.onChildrenChange(n<s?n:s)}},e.prototype.getChildIndex=function(t){var i=this.children.indexOf(t);if(i===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return i},e.prototype.setChildIndex=function(t,i){if(i<0||i>=this.children.length)throw new Error("The index "+i+" supplied is out of bounds "+this.children.length);var n=this.getChildIndex(t);We(this.children,n,1),this.children.splice(i,0,t),this.onChildrenChange(i)},e.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},e.prototype.removeChild=function(){for(var t=arguments,i=[],n=0;n<arguments.length;n++)i[n]=t[n];if(i.length>1)for(var s=0;s<i.length;s++)this.removeChild(i[s]);else{var a=i[0],o=this.children.indexOf(a);if(o===-1)return null;a.parent=null,a.transform._parentID=-1,We(this.children,o,1),this._boundsID++,this.onChildrenChange(o),a.emit("removed",this),this.emit("childRemoved",a,this,o)}return i[0]},e.prototype.removeChildAt=function(t){var i=this.getChildAt(t);return i.parent=null,i.transform._parentID=-1,We(this.children,t,1),this._boundsID++,this.onChildrenChange(t),i.emit("removed",this),this.emit("childRemoved",i,this,t),i},e.prototype.removeChildren=function(t,i){t===void 0&&(t=0),i===void 0&&(i=this.children.length);var n=t,s=i,a=s-n,o;if(a>0&&a<=s){o=this.children.splice(n,a);for(var h=0;h<o.length;++h)o[h].parent=null,o[h].transform&&(o[h].transform._parentID=-1);this._boundsID++,this.onChildrenChange(t);for(var h=0;h<o.length;++h)o[h].emit("removed",this),this.emit("childRemoved",o[h],this,h);return o}else if(a===0&&this.children.length===0)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},e.prototype.sortChildren=function(){for(var t=!1,i=0,n=this.children.length;i<n;++i){var s=this.children[i];s._lastSortedIndex=i,!t&&s.zIndex!==0&&(t=!0)}t&&this.children.length>1&&this.children.sort(bp),this.sortDirty=!1},e.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,i=this.children.length;t<i;++t){var n=this.children[t];n.visible&&n.updateTransform()}},e.prototype.calculateBounds=function(){this._bounds.clear(),this._calculateBounds();for(var t=0;t<this.children.length;t++){var i=this.children[t];if(!(!i.visible||!i.renderable))if(i.calculateBounds(),i._mask){var n=i._mask.isMaskData?i._mask.maskObject:i._mask;n?(n.calculateBounds(),this._bounds.addBoundsMask(i._bounds,n._bounds)):this._bounds.addBounds(i._bounds)}else i.filterArea?this._bounds.addBoundsArea(i._bounds,i.filterArea):this._bounds.addBounds(i._bounds)}this._bounds.updateID=this._boundsID},e.prototype.getLocalBounds=function(t,i){i===void 0&&(i=!1);var n=r.prototype.getLocalBounds.call(this,t);if(!i)for(var s=0,a=this.children.length;s<a;++s){var o=this.children[s];o.visible&&o.updateTransform()}return n},e.prototype._calculateBounds=function(){},e.prototype._renderWithCulling=function(t){var i=t.renderTexture.sourceFrame;if(i.width>0&&i.height>0){var n,s;if(this.cullArea?(n=this.cullArea,s=this.worldTransform):this._render!==e.prototype._render&&(n=this.getBounds(!0)),n&&i.intersects(n,s))this._render(t);else if(this.cullArea)return;for(var a=0,o=this.children.length;a<o;++a){var h=this.children[a],u=h.cullable;h.cullable=u||!this.cullArea,h.render(t),h.cullable=u}}},e.prototype.render=function(t){if(!(!this.visible||this.worldAlpha<=0||!this.renderable))if(this._mask||this.filters&&this.filters.length)this.renderAdvanced(t);else if(this.cullable)this._renderWithCulling(t);else{this._render(t);for(var i=0,n=this.children.length;i<n;++i)this.children[i].render(t)}},e.prototype.renderAdvanced=function(t){var i=this.filters,n=this._mask;if(i){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(var s=0;s<i.length;s++)i[s].enabled&&this._enabledFilters.push(i[s])}var a=i&&this._enabledFilters&&this._enabledFilters.length||n&&(!n.isMaskData||n.enabled&&(n.autoDetect||n.type!==yt.NONE));if(a&&t.batch.flush(),i&&this._enabledFilters&&this._enabledFilters.length&&t.filter.push(this,this._enabledFilters),n&&t.mask.push(this,this._mask),this.cullable)this._renderWithCulling(t);else{this._render(t);for(var s=0,o=this.children.length;s<o;++s)this.children[s].render(t)}a&&t.batch.flush(),n&&t.mask.pop(this),i&&this._enabledFilters&&this._enabledFilters.length&&t.filter.pop()},e.prototype._render=function(t){},e.prototype.destroy=function(t){r.prototype.destroy.call(this),this.sortDirty=!1;var i=typeof t=="boolean"?t:t&&t.children,n=this.removeChildren(0,this.children.length);if(i)for(var s=0;s<n.length;++s)n[s].destroy(t)},Object.defineProperty(e.prototype,"width",{get:function(){return this.scale.x*this.getLocalBounds().width},set:function(t){var i=this.getLocalBounds().width;i!==0?this.scale.x=t/i:this.scale.x=1,this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.scale.y*this.getLocalBounds().height},set:function(t){var i=this.getLocalBounds().height;i!==0?this.scale.y=t/i:this.scale.y=1,this._height=t},enumerable:!1,configurable:!0}),e}(_t);Yt.prototype.containerUpdateTransform=Yt.prototype.updateTransform;/*!
 * @pixi/extensions - v6.5.9
 * Compiled Wed, 25 Jan 2023 05:01:45 UTC
 *
 * @pixi/extensions is licensed under the MIT License.
 * http://www.opensource.org/licenses/mit-license
 *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Ur=function(){return Ur=Object.assign||function(e){for(var t=arguments,i,n=1,s=arguments.length;n<s;n++){i=t[n];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(e[a]=i[a])}return e},Ur.apply(this,arguments)},K;(function(r){r.Application="application",r.RendererPlugin="renderer-webgl-plugin",r.CanvasRendererPlugin="renderer-canvas-plugin",r.Loader="loader",r.LoadParser="load-parser",r.ResolveParser="resolve-parser",r.CacheParser="cache-parser",r.DetectionParser="detection-parser"})(K||(K={}));var go=function(r){if(typeof r=="function"||typeof r=="object"&&r.extension){if(!r.extension)throw new Error("Extension class must have an extension object");var e=typeof r.extension!="object"?{type:r.extension}:r.extension;r=Ur(Ur({},e),{ref:r})}if(typeof r=="object")r=Ur({},r);else throw new Error("Invalid extension type");return typeof r.type=="string"&&(r.type=[r.type]),r},ce={_addHandlers:null,_removeHandlers:null,_queue:{},remove:function(){for(var r=arguments,e=this,t=[],i=0;i<arguments.length;i++)t[i]=r[i];return t.map(go).forEach(function(n){n.type.forEach(function(s){var a,o;return(o=(a=e._removeHandlers)[s])===null||o===void 0?void 0:o.call(a,n)})}),this},add:function(){for(var r=arguments,e=this,t=[],i=0;i<arguments.length;i++)t[i]=r[i];return t.map(go).forEach(function(n){n.type.forEach(function(s){var a=e._addHandlers,o=e._queue;a[s]?a[s](n):(o[s]=o[s]||[],o[s].push(n))})}),this},handle:function(r,e,t){var i=this._addHandlers=this._addHandlers||{},n=this._removeHandlers=this._removeHandlers||{};if(i[r]||n[r])throw new Error("Extension type "+r+" already has a handler");i[r]=e,n[r]=t;var s=this._queue;return s[r]&&(s[r].forEach(function(a){return e(a)}),delete s[r]),this},handleByMap:function(r,e){return this.handle(r,function(t){e[t.name]=t.ref},function(t){delete e[t.name]})},handleByList:function(r,e){return this.handle(r,function(t){var i,n;e.includes(t.ref)||(e.push(t.ref),r===K.Loader&&((n=(i=t.ref).add)===null||n===void 0||n.call(i)))},function(t){var i=e.indexOf(t.ref);i!==-1&&e.splice(i,1)})}};/*!
 * @pixi/runner - v6.5.9
 * Compiled Wed, 25 Jan 2023 05:01:45 UTC
 *
 * @pixi/runner is licensed under the MIT License.
 * http://www.opensource.org/licenses/mit-license
 */var Pt=function(){function r(e){this.items=[],this._name=e,this._aliasCount=0}return r.prototype.emit=function(e,t,i,n,s,a,o,h){if(arguments.length>8)throw new Error("max arguments reached");var u=this,l=u.name,c=u.items;this._aliasCount++;for(var f=0,d=c.length;f<d;f++)c[f][l](e,t,i,n,s,a,o,h);return c===this.items&&this._aliasCount--,this},r.prototype.ensureNonAliasedItems=function(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},r.prototype.add=function(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this},r.prototype.remove=function(e){var t=this.items.indexOf(e);return t!==-1&&(this.ensureNonAliasedItems(),this.items.splice(t,1)),this},r.prototype.contains=function(e){return this.items.indexOf(e)!==-1},r.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},r.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(r.prototype,"empty",{get:function(){return this.items.length===0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),r}();Object.defineProperties(Pt.prototype,{dispatch:{value:Pt.prototype.emit},run:{value:Pt.prototype.emit}});/*!
 * @pixi/ticker - v6.5.9
 * Compiled Wed, 25 Jan 2023 05:01:45 UTC
 *
 * @pixi/ticker is licensed under the MIT License.
 * http://www.opensource.org/licenses/mit-license
 */A.TARGET_FPMS=.06;var le;(function(r){r[r.INTERACTION=50]="INTERACTION",r[r.HIGH=25]="HIGH",r[r.NORMAL=0]="NORMAL",r[r.LOW=-25]="LOW",r[r.UTILITY=-50]="UTILITY"})(le||(le={}));var _n=function(){function r(e,t,i,n){t===void 0&&(t=null),i===void 0&&(i=0),n===void 0&&(n=!1),this.next=null,this.previous=null,this._destroyed=!1,this.fn=e,this.context=t,this.priority=i,this.once=n}return r.prototype.match=function(e,t){return t===void 0&&(t=null),this.fn===e&&this.context===t},r.prototype.emit=function(e){this.fn&&(this.context?this.fn.call(this.context,e):this.fn(e));var t=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),t},r.prototype.connect=function(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this},r.prototype.destroy=function(e){e===void 0&&(e=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var t=this.next;return this.next=e?null:t,this.previous=null,t},r}(),bt=function(){function r(){var e=this;this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new _n(null,null,1/0),this.deltaMS=1/A.TARGET_FPMS,this.elapsedMS=1/A.TARGET_FPMS,this._tick=function(t){e._requestId=null,e.started&&(e.update(t),e.started&&e._requestId===null&&e._head.next&&(e._requestId=requestAnimationFrame(e._tick)))}}return r.prototype._requestIfNeeded=function(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},r.prototype._cancelIfNeeded=function(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)},r.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},r.prototype.add=function(e,t,i){return i===void 0&&(i=le.NORMAL),this._addListener(new _n(e,t,i))},r.prototype.addOnce=function(e,t,i){return i===void 0&&(i=le.NORMAL),this._addListener(new _n(e,t,i,!0))},r.prototype._addListener=function(e){var t=this._head.next,i=this._head;if(!t)e.connect(i);else{for(;t;){if(e.priority>t.priority){e.connect(i);break}i=t,t=t.next}e.previous||e.connect(i)}return this._startIfPossible(),this},r.prototype.remove=function(e,t){for(var i=this._head.next;i;)i.match(e,t)?i=i.destroy():i=i.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(r.prototype,"count",{get:function(){if(!this._head)return 0;for(var e=0,t=this._head;t=t.next;)e++;return e},enumerable:!1,configurable:!0}),r.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},r.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},r.prototype.destroy=function(){if(!this._protected){this.stop();for(var e=this._head.next;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}},r.prototype.update=function(e){e===void 0&&(e=performance.now());var t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){var i=e-this._lastFrame|0;if(i<this._minElapsedMS)return;this._lastFrame=e-i%this._minElapsedMS}this.deltaMS=t,this.deltaTime=this.deltaMS*A.TARGET_FPMS;for(var n=this._head,s=n.next;s;)s=s.emit(this.deltaTime);n.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=e},Object.defineProperty(r.prototype,"FPS",{get:function(){return 1e3/this.elapsedMS},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"minFPS",{get:function(){return 1e3/this._maxElapsedMS},set:function(e){var t=Math.min(this.maxFPS,e),i=Math.min(Math.max(0,t)/1e3,A.TARGET_FPMS);this._maxElapsedMS=1/i},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"maxFPS",{get:function(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0},set:function(e){if(e===0)this._minElapsedMS=0;else{var t=Math.max(this.minFPS,e);this._minElapsedMS=1/(t/1e3)}},enumerable:!1,configurable:!0}),Object.defineProperty(r,"shared",{get:function(){if(!r._shared){var e=r._shared=new r;e.autoStart=!0,e._protected=!0}return r._shared},enumerable:!1,configurable:!0}),Object.defineProperty(r,"system",{get:function(){if(!r._system){var e=r._system=new r;e.autoStart=!0,e._protected=!0}return r._system},enumerable:!1,configurable:!0}),r}(),Dh=function(){function r(){}return r.init=function(e){var t=this;e=Object.assign({autoStart:!0,sharedTicker:!1},e),Object.defineProperty(this,"ticker",{set:function(i){this._ticker&&this._ticker.remove(this.render,this),this._ticker=i,i&&i.add(this.render,this,le.LOW)},get:function(){return this._ticker}}),this.stop=function(){t._ticker.stop()},this.start=function(){t._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?bt.shared:new bt,e.autoStart&&this.start()},r.destroy=function(){if(this._ticker){var e=this._ticker;this.ticker=null,e.destroy()}},r.extension=K.Application,r}();/*!
 * @pixi/core - v6.5.9
 * Compiled Wed, 25 Jan 2023 05:01:45 UTC
 *
 * @pixi/core is licensed under the MIT License.
 * http://www.opensource.org/licenses/mit-license
 */A.PREFER_ENV=Ht.any?ue.WEBGL:ue.WEBGL2;A.STRICT_TEXTURE_CACHE=!1;var Jr=[];function tn(r,e){if(!r)return null;var t="";if(typeof r=="string"){var i=/\.(\w{3,4})(?:$|\?|#)/i.exec(r);i&&(t=i[1].toLowerCase())}for(var n=Jr.length-1;n>=0;--n){var s=Jr[n];if(s.test&&s.test(r,t))return new s(r,e)}throw new Error("Unrecognized source type to auto-detect Resource")}/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var ns=function(r,e){return ns=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])},ns(r,e)};function it(r,e){ns(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var ss=function(){return ss=Object.assign||function(e){for(var t=arguments,i,n=1,s=arguments.length;n<s;n++){i=t[n];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(e[a]=i[a])}return e},ss.apply(this,arguments)};function Tp(r,e){var t={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&e.indexOf(i)<0&&(t[i]=r[i]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(r);n<i.length;n++)e.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(r,i[n])&&(t[i[n]]=r[i[n]]);return t}var Ke=function(){function r(e,t){e===void 0&&(e=0),t===void 0&&(t=0),this._width=e,this._height=t,this.destroyed=!1,this.internal=!1,this.onResize=new Pt("setRealSize"),this.onUpdate=new Pt("update"),this.onError=new Pt("onError")}return r.prototype.bind=function(e){this.onResize.add(e),this.onUpdate.add(e),this.onError.add(e),(this._width||this._height)&&this.onResize.emit(this._width,this._height)},r.prototype.unbind=function(e){this.onResize.remove(e),this.onUpdate.remove(e),this.onError.remove(e)},r.prototype.resize=function(e,t){(e!==this._width||t!==this._height)&&(this._width=e,this._height=t,this.onResize.emit(e,t))},Object.defineProperty(r.prototype,"valid",{get:function(){return!!this._width&&!!this._height},enumerable:!1,configurable:!0}),r.prototype.update=function(){this.destroyed||this.onUpdate.emit()},r.prototype.load=function(){return Promise.resolve(this)},Object.defineProperty(r.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),r.prototype.style=function(e,t,i){return!1},r.prototype.dispose=function(){},r.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)},r.test=function(e,t){return!1},r}(),Qe=function(r){it(e,r);function e(t,i){var n=this,s=i||{},a=s.width,o=s.height;if(!a||!o)throw new Error("BufferResource width or height invalid");return n=r.call(this,a,o)||this,n.data=t,n}return e.prototype.upload=function(t,i,n){var s=t.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.alphaMode===zt.UNPACK);var a=i.realWidth,o=i.realHeight;return n.width===a&&n.height===o?s.texSubImage2D(i.target,0,0,0,a,o,i.format,n.type,this.data):(n.width=a,n.height=o,s.texImage2D(i.target,0,n.internalFormat,a,o,0,i.format,n.type,this.data)),!0},e.prototype.dispose=function(){this.data=null},e.test=function(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array},e}(Ke),Ep={scaleMode:Kt.NEAREST,format:C.RGBA,alphaMode:zt.NPM},V=function(r){it(e,r);function e(t,i){t===void 0&&(t=null),i===void 0&&(i=null);var n=r.call(this)||this;i=i||{};var s=i.alphaMode,a=i.mipmap,o=i.anisotropicLevel,h=i.scaleMode,u=i.width,l=i.height,c=i.wrapMode,f=i.format,d=i.type,p=i.target,_=i.resolution,v=i.resourceOptions;return t&&!(t instanceof Ke)&&(t=tn(t,v),t.internal=!0),n.resolution=_||A.RESOLUTION,n.width=Math.round((u||0)*n.resolution)/n.resolution,n.height=Math.round((l||0)*n.resolution)/n.resolution,n._mipmap=a!==void 0?a:A.MIPMAP_TEXTURES,n.anisotropicLevel=o!==void 0?o:A.ANISOTROPIC_LEVEL,n._wrapMode=c||A.WRAP_MODE,n._scaleMode=h!==void 0?h:A.SCALE_MODE,n.format=f||C.RGBA,n.type=d||F.UNSIGNED_BYTE,n.target=p||Pe.TEXTURE_2D,n.alphaMode=s!==void 0?s:zt.UNPACK,n.uid=Ie(),n.touched=0,n.isPowerOfTwo=!1,n._refreshPOT(),n._glTextures={},n.dirtyId=0,n.dirtyStyleId=0,n.cacheId=null,n.valid=u>0&&l>0,n.textureCacheIds=[],n.destroyed=!1,n.resource=null,n._batchEnabled=0,n._batchLocation=0,n.parentTextureArray=null,n.setResource(t),n}return Object.defineProperty(e.prototype,"realWidth",{get:function(){return Math.round(this.width*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"realHeight",{get:function(){return Math.round(this.height*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mipmap",{get:function(){return this._mipmap},set:function(t){this._mipmap!==t&&(this._mipmap=t,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleMode",{get:function(){return this._scaleMode},set:function(t){this._scaleMode!==t&&(this._scaleMode=t,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wrapMode",{get:function(){return this._wrapMode},set:function(t){this._wrapMode!==t&&(this._wrapMode=t,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),e.prototype.setStyle=function(t,i){var n;return t!==void 0&&t!==this.scaleMode&&(this.scaleMode=t,n=!0),i!==void 0&&i!==this.mipmap&&(this.mipmap=i,n=!0),n&&this.dirtyStyleId++,this},e.prototype.setSize=function(t,i,n){return n=n||this.resolution,this.setRealSize(t*n,i*n,n)},e.prototype.setRealSize=function(t,i,n){return this.resolution=n||this.resolution,this.width=Math.round(t)/this.resolution,this.height=Math.round(i)/this.resolution,this._refreshPOT(),this.update(),this},e.prototype._refreshPOT=function(){this.isPowerOfTwo=Jn(this.realWidth)&&Jn(this.realHeight)},e.prototype.setResolution=function(t){var i=this.resolution;return i===t?this:(this.resolution=t,this.valid&&(this.width=Math.round(this.width*i)/t,this.height=Math.round(this.height*i)/t,this.emit("update",this)),this._refreshPOT(),this)},e.prototype.setResource=function(t){if(this.resource===t)return this;if(this.resource)throw new Error("Resource can be set only once");return t.bind(this),this.resource=t,this},e.prototype.update=function(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))},e.prototype.onError=function(t){this.emit("error",this,t)},e.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete Ut[this.cacheId],delete Dt[this.cacheId],this.cacheId=null),this.dispose(),e.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},e.prototype.dispose=function(){this.emit("dispose",this)},e.prototype.castToBaseTexture=function(){return this},e.from=function(t,i,n){n===void 0&&(n=A.STRICT_TEXTURE_CACHE);var s=typeof t=="string",a=null;if(s)a=t;else{if(!t._pixiId){var o=i&&i.pixiIdPrefix||"pixiid";t._pixiId=o+"_"+Ie()}a=t._pixiId}var h=Ut[a];if(s&&n&&!h)throw new Error('The cacheId "'+a+'" does not exist in BaseTextureCache.');return h||(h=new e(t,i),h.cacheId=a,e.addToCache(h,a)),h},e.fromBuffer=function(t,i,n,s){t=t||new Float32Array(i*n*4);var a=new Qe(t,{width:i,height:n}),o=t instanceof Float32Array?F.FLOAT:F.UNSIGNED_BYTE;return new e(a,Object.assign({},Ep,s||{width:i,height:n,type:o}))},e.addToCache=function(t,i){i&&(t.textureCacheIds.indexOf(i)===-1&&t.textureCacheIds.push(i),Ut[i]&&console.warn("BaseTexture added to the cache with an id ["+i+"] that already had an entry"),Ut[i]=t)},e.removeFromCache=function(t){if(typeof t=="string"){var i=Ut[t];if(i){var n=i.textureCacheIds.indexOf(t);return n>-1&&i.textureCacheIds.splice(n,1),delete Ut[t],i}}else if(t&&t.textureCacheIds){for(var s=0;s<t.textureCacheIds.length;++s)delete Ut[t.textureCacheIds[s]];return t.textureCacheIds.length=0,t}return null},e._globalBatch=0,e}(ye),en=function(r){it(e,r);function e(t,i){var n=this,s=i||{},a=s.width,o=s.height;n=r.call(this,a,o)||this,n.items=[],n.itemDirtyIds=[];for(var h=0;h<t;h++){var u=new V;n.items.push(u),n.itemDirtyIds.push(-2)}return n.length=t,n._load=null,n.baseTexture=null,n}return e.prototype.initFromArray=function(t,i){for(var n=0;n<this.length;n++)t[n]&&(t[n].castToBaseTexture?this.addBaseTextureAt(t[n].castToBaseTexture(),n):t[n]instanceof Ke?this.addResourceAt(t[n],n):this.addResourceAt(tn(t[n],i),n))},e.prototype.dispose=function(){for(var t=0,i=this.length;t<i;t++)this.items[t].destroy();this.items=null,this.itemDirtyIds=null,this._load=null},e.prototype.addResourceAt=function(t,i){if(!this.items[i])throw new Error("Index "+i+" is out of bounds");return t.valid&&!this.valid&&this.resize(t.width,t.height),this.items[i].setResource(t),this},e.prototype.bind=function(t){if(this.baseTexture!==null)throw new Error("Only one base texture per TextureArray is allowed");r.prototype.bind.call(this,t);for(var i=0;i<this.length;i++)this.items[i].parentTextureArray=t,this.items[i].on("update",t.update,t)},e.prototype.unbind=function(t){r.prototype.unbind.call(this,t);for(var i=0;i<this.length;i++)this.items[i].parentTextureArray=null,this.items[i].off("update",t.update,t)},e.prototype.load=function(){var t=this;if(this._load)return this._load;var i=this.items.map(function(s){return s.resource}).filter(function(s){return s}),n=i.map(function(s){return s.load()});return this._load=Promise.all(n).then(function(){var s=t.items[0],a=s.realWidth,o=s.realHeight;return t.resize(a,o),Promise.resolve(t)}),this._load},e}(Ke),Ks=function(r){it(e,r);function e(t,i){var n=this,s=i||{},a=s.width,o=s.height,h,u;return Array.isArray(t)?(h=t,u=t.length):u=t,n=r.call(this,u,{width:a,height:o})||this,h&&n.initFromArray(h,i),n}return e.prototype.addBaseTextureAt=function(t,i){if(t.resource)this.addResourceAt(t.resource,i);else throw new Error("ArrayResource does not support RenderTexture");return this},e.prototype.bind=function(t){r.prototype.bind.call(this,t),t.target=Pe.TEXTURE_2D_ARRAY},e.prototype.upload=function(t,i,n){var s=this,a=s.length,o=s.itemDirtyIds,h=s.items,u=t.gl;n.dirtyId<0&&u.texImage3D(u.TEXTURE_2D_ARRAY,0,n.internalFormat,this._width,this._height,a,0,i.format,n.type,null);for(var l=0;l<a;l++){var c=h[l];o[l]<c.dirtyId&&(o[l]=c.dirtyId,c.valid&&u.texSubImage3D(u.TEXTURE_2D_ARRAY,0,0,0,l,c.resource.width,c.resource.height,1,i.format,n.type,c.resource.source))}return!0},e}(en),fe=function(r){it(e,r);function e(t){var i=this,n=t,s=n.naturalWidth||n.videoWidth||n.width,a=n.naturalHeight||n.videoHeight||n.height;return i=r.call(this,s,a)||this,i.source=t,i.noSubImage=!1,i}return e.crossOrigin=function(t,i,n){n===void 0&&i.indexOf("data:")!==0?t.crossOrigin=wh(i):n!==!1&&(t.crossOrigin=typeof n=="string"?n:"anonymous")},e.prototype.upload=function(t,i,n,s){var a=t.gl,o=i.realWidth,h=i.realHeight;if(s=s||this.source,s instanceof HTMLImageElement){if(!s.complete||s.naturalWidth===0)return!1}else if(s instanceof HTMLVideoElement&&s.readyState<=1)return!1;return a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.alphaMode===zt.UNPACK),!this.noSubImage&&i.target===a.TEXTURE_2D&&n.width===o&&n.height===h?a.texSubImage2D(a.TEXTURE_2D,0,0,0,i.format,n.type,s):(n.width=o,n.height=h,a.texImage2D(i.target,0,n.internalFormat,i.format,n.type,s)),!0},e.prototype.update=function(){if(!this.destroyed){var t=this.source,i=t.naturalWidth||t.videoWidth||t.width,n=t.naturalHeight||t.videoHeight||t.height;this.resize(i,n),r.prototype.update.call(this)}},e.prototype.dispose=function(){this.source=null},e}(Ke),Js=function(r){it(e,r);function e(t){return r.call(this,t)||this}return e.test=function(t){var i=globalThis.OffscreenCanvas;return i&&t instanceof i?!0:globalThis.HTMLCanvasElement&&t instanceof HTMLCanvasElement},e}(fe),Qs=function(r){it(e,r);function e(t,i){var n=this,s=i||{},a=s.width,o=s.height,h=s.autoLoad,u=s.linkBaseTexture;if(t&&t.length!==e.SIDES)throw new Error("Invalid length. Got "+t.length+", expected 6");n=r.call(this,6,{width:a,height:o})||this;for(var l=0;l<e.SIDES;l++)n.items[l].target=Pe.TEXTURE_CUBE_MAP_POSITIVE_X+l;return n.linkBaseTexture=u!==!1,t&&n.initFromArray(t,i),h!==!1&&n.load(),n}return e.prototype.bind=function(t){r.prototype.bind.call(this,t),t.target=Pe.TEXTURE_CUBE_MAP},e.prototype.addBaseTextureAt=function(t,i,n){if(!this.items[i])throw new Error("Index "+i+" is out of bounds");if(!this.linkBaseTexture||t.parentTextureArray||Object.keys(t._glTextures).length>0)if(t.resource)this.addResourceAt(t.resource,i);else throw new Error("CubeResource does not support copying of renderTexture.");else t.target=Pe.TEXTURE_CUBE_MAP_POSITIVE_X+i,t.parentTextureArray=this.baseTexture,this.items[i]=t;return t.valid&&!this.valid&&this.resize(t.realWidth,t.realHeight),this.items[i]=t,this},e.prototype.upload=function(t,i,n){for(var s=this.itemDirtyIds,a=0;a<e.SIDES;a++){var o=this.items[a];(s[a]<o.dirtyId||n.dirtyId<i.dirtyId)&&(o.valid&&o.resource?(o.resource.upload(t,o,n),s[a]=o.dirtyId):s[a]<-1&&(t.gl.texImage2D(o.target,0,n.internalFormat,i.realWidth,i.realHeight,0,i.format,n.type,null),s[a]=-1))}return!0},e.test=function(t){return Array.isArray(t)&&t.length===e.SIDES},e.SIDES=6,e}(en),rn=function(r){it(e,r);function e(t,i){var n=this;if(i=i||{},!(t instanceof HTMLImageElement)){var s=new Image;fe.crossOrigin(s,t,i.crossorigin),s.src=t,t=s}return n=r.call(this,t)||this,!t.complete&&n._width&&n._height&&(n._width=0,n._height=0),n.url=t.src,n._process=null,n.preserveBitmap=!1,n.createBitmap=(i.createBitmap!==void 0?i.createBitmap:A.CREATE_IMAGE_BITMAP)&&!!globalThis.createImageBitmap,n.alphaMode=typeof i.alphaMode=="number"?i.alphaMode:null,n.bitmap=null,n._load=null,i.autoLoad!==!1&&n.load(),n}return e.prototype.load=function(t){var i=this;return this._load?this._load:(t!==void 0&&(this.createBitmap=t),this._load=new Promise(function(n,s){var a=i.source;i.url=a.src;var o=function(){i.destroyed||(a.onload=null,a.onerror=null,i.resize(a.width,a.height),i._load=null,i.createBitmap?n(i.process()):n(i))};a.complete&&a.src?o():(a.onload=o,a.onerror=function(h){s(h),i.onError.emit(h)})}),this._load)},e.prototype.process=function(){var t=this,i=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);var n=globalThis.createImageBitmap,s=!i.crossOrigin||i.crossOrigin==="anonymous";return this._process=fetch(i.src,{mode:s?"cors":"no-cors"}).then(function(a){return a.blob()}).then(function(a){return n(a,0,0,i.width,i.height,{premultiplyAlpha:t.alphaMode===null||t.alphaMode===zt.UNPACK?"premultiply":"none"})}).then(function(a){return t.destroyed?Promise.reject():(t.bitmap=a,t.update(),t._process=null,Promise.resolve(t))}),this._process},e.prototype.upload=function(t,i,n){if(typeof this.alphaMode=="number"&&(i.alphaMode=this.alphaMode),!this.createBitmap)return r.prototype.upload.call(this,t,i,n);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(r.prototype.upload.call(this,t,i,n,this.bitmap),!this.preserveBitmap){var s=!0,a=i._glTextures;for(var o in a){var h=a[o];if(h!==n&&h.dirtyId!==i.dirtyId){s=!1;break}}s&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0},e.prototype.dispose=function(){this.source.onload=null,this.source.onerror=null,r.prototype.dispose.call(this),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null},e.test=function(t){return typeof t=="string"||t instanceof HTMLImageElement},e}(fe),ta=function(r){it(e,r);function e(t,i){var n=this;return i=i||{},n=r.call(this,A.ADAPTER.createCanvas())||this,n._width=0,n._height=0,n.svg=t,n.scale=i.scale||1,n._overrideWidth=i.width,n._overrideHeight=i.height,n._resolve=null,n._crossorigin=i.crossorigin,n._load=null,i.autoLoad!==!1&&n.load(),n}return e.prototype.load=function(){var t=this;return this._load?this._load:(this._load=new Promise(function(i){if(t._resolve=function(){t.resize(t.source.width,t.source.height),i(t)},e.SVG_XML.test(t.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");t.svg="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(t.svg)))}t._loadSvg()}),this._load)},e.prototype._loadSvg=function(){var t=this,i=new Image;fe.crossOrigin(i,this.svg,this._crossorigin),i.src=this.svg,i.onerror=function(n){t._resolve&&(i.onerror=null,t.onError.emit(n))},i.onload=function(){if(t._resolve){var n=i.width,s=i.height;if(!n||!s)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");var a=n*t.scale,o=s*t.scale;(t._overrideWidth||t._overrideHeight)&&(a=t._overrideWidth||t._overrideHeight/s*n,o=t._overrideHeight||t._overrideWidth/n*s),a=Math.round(a),o=Math.round(o);var h=t.source;h.width=a,h.height=o,h._pixiId="canvas_"+Ie(),h.getContext("2d").drawImage(i,0,0,n,s,0,0,a,o),t._resolve(),t._resolve=null}}},e.getSize=function(t){var i=e.SVG_SIZE.exec(t),n={};return i&&(n[i[1]]=Math.round(parseFloat(i[3])),n[i[5]]=Math.round(parseFloat(i[7]))),n},e.prototype.dispose=function(){r.prototype.dispose.call(this),this._resolve=null,this._crossorigin=null},e.test=function(t,i){return i==="svg"||typeof t=="string"&&t.startsWith("data:image/svg+xml")||typeof t=="string"&&e.SVG_XML.test(t)},e.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,e.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,e}(fe),ea=function(r){it(e,r);function e(t,i){var n=this;if(i=i||{},!(t instanceof HTMLVideoElement)){var s=document.createElement("video");s.setAttribute("preload","auto"),s.setAttribute("webkit-playsinline",""),s.setAttribute("playsinline",""),typeof t=="string"&&(t=[t]);var a=t[0].src||t[0];fe.crossOrigin(s,a,i.crossorigin);for(var o=0;o<t.length;++o){var h=document.createElement("source"),u=t[o],l=u.src,c=u.mime;l=l||t[o];var f=l.split("?").shift().toLowerCase(),d=f.slice(f.lastIndexOf(".")+1);c=c||e.MIME_TYPES[d]||"video/"+d,h.src=l,h.type=c,s.appendChild(h)}t=s}return n=r.call(this,t)||this,n.noSubImage=!0,n._autoUpdate=!0,n._isConnectedToTicker=!1,n._updateFPS=i.updateFPS||0,n._msToNextUpdate=0,n.autoPlay=i.autoPlay!==!1,n._load=null,n._resolve=null,n._onCanPlay=n._onCanPlay.bind(n),n._onError=n._onError.bind(n),i.autoLoad!==!1&&n.load(),n}return e.prototype.update=function(t){if(!this.destroyed){var i=bt.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-i),(!this._updateFPS||this._msToNextUpdate<=0)&&(r.prototype.update.call(this),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}},e.prototype.load=function(){var t=this;if(this._load)return this._load;var i=this.source;return(i.readyState===i.HAVE_ENOUGH_DATA||i.readyState===i.HAVE_FUTURE_DATA)&&i.width&&i.height&&(i.complete=!0),i.addEventListener("play",this._onPlayStart.bind(this)),i.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(i.addEventListener("canplay",this._onCanPlay),i.addEventListener("canplaythrough",this._onCanPlay),i.addEventListener("error",this._onError,!0)),this._load=new Promise(function(n){t.valid?n(t):(t._resolve=n,i.load())}),this._load},e.prototype._onError=function(t){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(t)},e.prototype._isSourcePlaying=function(){var t=this.source;return!t.paused&&!t.ended&&this._isSourceReady()},e.prototype._isSourceReady=function(){var t=this.source;return t.readyState>2},e.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(bt.shared.add(this.update,this),this._isConnectedToTicker=!0)},e.prototype._onPlayStop=function(){this._isConnectedToTicker&&(bt.shared.remove(this.update,this),this._isConnectedToTicker=!1)},e.prototype._onCanPlay=function(){var t=this.source;t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlay);var i=this.valid;this.resize(t.videoWidth,t.videoHeight),!i&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&t.play()},e.prototype.dispose=function(){this._isConnectedToTicker&&(bt.shared.remove(this.update,this),this._isConnectedToTicker=!1);var t=this.source;t&&(t.removeEventListener("error",this._onError,!0),t.pause(),t.src="",t.load()),r.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(bt.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(bt.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"updateFPS",{get:function(){return this._updateFPS},set:function(t){t!==this._updateFPS&&(this._updateFPS=t)},enumerable:!1,configurable:!0}),e.test=function(t,i){return globalThis.HTMLVideoElement&&t instanceof HTMLVideoElement||e.TYPES.indexOf(i)>-1},e.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],e.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},e}(fe),ra=function(r){it(e,r);function e(t){return r.call(this,t)||this}return e.test=function(t){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&t instanceof ImageBitmap},e}(fe);Jr.push(rn,ra,Js,ea,ta,Qe,Qs,Ks);var Fh={__proto__:null,Resource:Ke,BaseImageResource:fe,INSTALLED:Jr,autoDetectResource:tn,AbstractMultiResource:en,ArrayResource:Ks,BufferResource:Qe,CanvasResource:Js,CubeResource:Qs,ImageResource:rn,SVGResource:ta,VideoResource:ea,ImageBitmapResource:ra},Sp=function(r){it(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.upload=function(t,i,n){var s=t.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.alphaMode===zt.UNPACK);var a=i.realWidth,o=i.realHeight;return n.width===a&&n.height===o?s.texSubImage2D(i.target,0,0,0,a,o,i.format,n.type,this.data):(n.width=a,n.height=o,s.texImage2D(i.target,0,n.internalFormat,a,o,0,i.format,n.type,this.data)),!0},e}(Qe),Xi=function(){function r(e,t){this.width=Math.round(e||100),this.height=Math.round(t||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new Pt("disposeFramebuffer"),this.multisample=st.NONE}return Object.defineProperty(r.prototype,"colorTexture",{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),r.prototype.addColorTexture=function(e,t){return e===void 0&&(e=0),this.colorTextures[e]=t||new V(null,{scaleMode:Kt.NEAREST,resolution:1,mipmap:jt.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},r.prototype.addDepthTexture=function(e){return this.depthTexture=e||new V(new Sp(null,{width:this.width,height:this.height}),{scaleMode:Kt.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:jt.OFF,format:C.DEPTH_COMPONENT,type:F.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},r.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},r.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},r.prototype.resize=function(e,t){if(e=Math.round(e),t=Math.round(t),!(e===this.width&&t===this.height)){this.width=e,this.height=t,this.dirtyId++,this.dirtySize++;for(var i=0;i<this.colorTextures.length;i++){var n=this.colorTextures[i],s=n.resolution;n.setSize(e/s,t/s)}if(this.depthTexture){var s=this.depthTexture.resolution;this.depthTexture.setSize(e/s,t/s)}}},r.prototype.dispose=function(){this.disposeRunner.emit(this,!1)},r.prototype.destroyDepthTexture=function(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)},r}(),ia=function(r){it(e,r);function e(t){t===void 0&&(t={});var i=this;if(typeof t=="number"){var n=arguments[0],s=arguments[1],a=arguments[2],o=arguments[3];t={width:n,height:s,scaleMode:a,resolution:o}}return t.width=t.width||100,t.height=t.height||100,t.multisample=t.multisample!==void 0?t.multisample:st.NONE,i=r.call(this,null,t)||this,i.mipmap=jt.OFF,i.valid=!0,i.clearColor=[0,0,0,0],i.framebuffer=new Xi(i.realWidth,i.realHeight).addColorTexture(0,i),i.framebuffer.multisample=t.multisample,i.maskStack=[],i.filterStack=[{}],i}return e.prototype.resize=function(t,i){this.framebuffer.resize(t*this.resolution,i*this.resolution),this.setRealSize(this.framebuffer.width,this.framebuffer.height)},e.prototype.dispose=function(){this.framebuffer.dispose(),r.prototype.dispose.call(this)},e.prototype.destroy=function(){r.prototype.destroy.call(this),this.framebuffer.destroyDepthTexture(),this.framebuffer=null},e}(V),na=function(){function r(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}return r.prototype.set=function(e,t,i){var n=t.width,s=t.height;if(i){var a=e.width/2/n,o=e.height/2/s,h=e.x/n+a,u=e.y/s+o;i=ut.add(i,ut.NW),this.x0=h+a*ut.uX(i),this.y0=u+o*ut.uY(i),i=ut.add(i,2),this.x1=h+a*ut.uX(i),this.y1=u+o*ut.uY(i),i=ut.add(i,2),this.x2=h+a*ut.uX(i),this.y2=u+o*ut.uY(i),i=ut.add(i,2),this.x3=h+a*ut.uX(i),this.y3=u+o*ut.uY(i)}else this.x0=e.x/n,this.y0=e.y/s,this.x1=(e.x+e.width)/n,this.y1=e.y/s,this.x2=(e.x+e.width)/n,this.y2=(e.y+e.height)/s,this.x3=e.x/n,this.y3=(e.y+e.height)/s;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3},r.prototype.toString=function(){return"[@pixi/core:TextureUvs "+("x0="+this.x0+" y0="+this.y0+" ")+("x1="+this.x1+" y1="+this.y1+" x2="+this.x2+" ")+("y2="+this.y2+" x3="+this.x3+" y3="+this.y3)+"]"},r}(),mo=new na;function vi(r){r.destroy=function(){},r.on=function(){},r.once=function(){},r.emit=function(){}}var N=function(r){it(e,r);function e(t,i,n,s,a,o){var h=r.call(this)||this;if(h.noFrame=!1,i||(h.noFrame=!0,i=new j(0,0,1,1)),t instanceof e&&(t=t.baseTexture),h.baseTexture=t,h._frame=i,h.trim=s,h.valid=!1,h._uvs=mo,h.uvMatrix=null,h.orig=n||i,h._rotate=Number(a||0),a===!0)h._rotate=2;else if(h._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");return h.defaultAnchor=o?new et(o.x,o.y):new et(0,0),h._updateID=0,h.textureCacheIds=[],t.valid?h.noFrame?t.valid&&h.onBaseTextureUpdated(t):h.frame=i:t.once("loaded",h.onBaseTextureUpdated,h),h.noFrame&&t.on("update",h.onBaseTextureUpdated,h),h}return e.prototype.update=function(){this.baseTexture.resource&&this.baseTexture.resource.update()},e.prototype.onBaseTextureUpdated=function(t){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=t.width,this._frame.height=t.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)},e.prototype.destroy=function(t){if(this.baseTexture){if(t){var i=this.baseTexture.resource;i&&i.url&&Dt[i.url]&&e.removeFromCache(i.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,e.removeFromCache(this),this.textureCacheIds=null},e.prototype.clone=function(){var t=this._frame.clone(),i=this._frame===this.orig?t:this.orig.clone(),n=new e(this.baseTexture,!this.noFrame&&t,i,this.trim&&this.trim.clone(),this.rotate,this.defaultAnchor);return this.noFrame&&(n._frame=t),n},e.prototype.updateUvs=function(){this._uvs===mo&&(this._uvs=new na),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++},e.from=function(t,i,n){i===void 0&&(i={}),n===void 0&&(n=A.STRICT_TEXTURE_CACHE);var s=typeof t=="string",a=null;if(s)a=t;else if(t instanceof V){if(!t.cacheId){var o=i&&i.pixiIdPrefix||"pixiid";t.cacheId=o+"-"+Ie(),V.addToCache(t,t.cacheId)}a=t.cacheId}else{if(!t._pixiId){var o=i&&i.pixiIdPrefix||"pixiid";t._pixiId=o+"_"+Ie()}a=t._pixiId}var h=Dt[a];if(s&&n&&!h)throw new Error('The cacheId "'+a+'" does not exist in TextureCache.');return!h&&!(t instanceof V)?(i.resolution||(i.resolution=$r(t)),h=new e(new V(t,i)),h.baseTexture.cacheId=a,V.addToCache(h.baseTexture,a),e.addToCache(h,a)):!h&&t instanceof V&&(h=new e(t),e.addToCache(h,a)),h},e.fromURL=function(t,i){var n=Object.assign({autoLoad:!1},i?.resourceOptions),s=e.from(t,Object.assign({resourceOptions:n},i),!1),a=s.baseTexture.resource;return s.baseTexture.valid?Promise.resolve(s):a.load().then(function(){return Promise.resolve(s)})},e.fromBuffer=function(t,i,n,s){return new e(V.fromBuffer(t,i,n,s))},e.fromLoader=function(t,i,n,s){var a=new V(t,Object.assign({scaleMode:A.SCALE_MODE,resolution:$r(i)},s)),o=a.resource;o instanceof rn&&(o.url=i);var h=new e(a);return n||(n=i),V.addToCache(h.baseTexture,n),e.addToCache(h,n),n!==i&&(V.addToCache(h.baseTexture,i),e.addToCache(h,i)),h.baseTexture.valid?Promise.resolve(h):new Promise(function(u){h.baseTexture.once("loaded",function(){return u(h)})})},e.addToCache=function(t,i){i&&(t.textureCacheIds.indexOf(i)===-1&&t.textureCacheIds.push(i),Dt[i]&&console.warn("Texture added to the cache with an id ["+i+"] that already had an entry"),Dt[i]=t)},e.removeFromCache=function(t){if(typeof t=="string"){var i=Dt[t];if(i){var n=i.textureCacheIds.indexOf(t);return n>-1&&i.textureCacheIds.splice(n,1),delete Dt[t],i}}else if(t&&t.textureCacheIds){for(var s=0;s<t.textureCacheIds.length;++s)Dt[t.textureCacheIds[s]]===t&&delete Dt[t.textureCacheIds[s]];return t.textureCacheIds.length=0,t}return null},Object.defineProperty(e.prototype,"resolution",{get:function(){return this.baseTexture.resolution},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frame",{get:function(){return this._frame},set:function(t){this._frame=t,this.noFrame=!1;var i=t.x,n=t.y,s=t.width,a=t.height,o=i+s>this.baseTexture.width,h=n+a>this.baseTexture.height;if(o||h){var u=o&&h?"and":"or",l="X: "+i+" + "+s+" = "+(i+s)+" > "+this.baseTexture.width,c="Y: "+n+" + "+a+" = "+(n+a)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+(l+" "+u+" "+c))}this.valid=s&&a&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=t),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotate",{get:function(){return this._rotate},set:function(t){this._rotate=t,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),e.prototype.castToBaseTexture=function(){return this.baseTexture},Object.defineProperty(e,"EMPTY",{get:function(){return e._EMPTY||(e._EMPTY=new e(new V),vi(e._EMPTY),vi(e._EMPTY.baseTexture)),e._EMPTY},enumerable:!1,configurable:!0}),Object.defineProperty(e,"WHITE",{get:function(){if(!e._WHITE){var t=A.ADAPTER.createCanvas(16,16),i=t.getContext("2d");t.width=16,t.height=16,i.fillStyle="white",i.fillRect(0,0,16,16),e._WHITE=new e(V.from(t)),vi(e._WHITE),vi(e._WHITE.baseTexture)}return e._WHITE},enumerable:!1,configurable:!0}),e}(ye),Me=function(r){it(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.valid=!0,n.filterFrame=null,n.filterPoolKey=null,n.updateUvs(),n}return Object.defineProperty(e.prototype,"framebuffer",{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"multisample",{get:function(){return this.framebuffer.multisample},set:function(t){this.framebuffer.multisample=t},enumerable:!1,configurable:!0}),e.prototype.resize=function(t,i,n){n===void 0&&(n=!0);var s=this.baseTexture.resolution,a=Math.round(t*s)/s,o=Math.round(i*s)/s;this.valid=a>0&&o>0,this._frame.width=this.orig.width=a,this._frame.height=this.orig.height=o,n&&this.baseTexture.resize(a,o),this.updateUvs()},e.prototype.setResolution=function(t){var i=this.baseTexture;i.resolution!==t&&(i.setResolution(t),this.resize(i.width,i.height,!1))},e.create=function(t){for(var i=arguments,n=[],s=1;s<arguments.length;s++)n[s-1]=i[s];return typeof t=="number"&&(At("6.0.0","Arguments (width, height, scaleMode, resolution) have been deprecated."),t={width:t,height:n[0],scaleMode:n[1],resolution:n[2]}),new e(new ia(t))},e}(N),Lh=function(){function r(e){this.texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}return r.prototype.createTexture=function(e,t,i){i===void 0&&(i=st.NONE);var n=new ia(Object.assign({width:e,height:t,resolution:1,multisample:i},this.textureOptions));return new Me(n)},r.prototype.getOptimalTexture=function(e,t,i,n){i===void 0&&(i=1),n===void 0&&(n=st.NONE);var s;e=Math.ceil(e*i-1e-6),t=Math.ceil(t*i-1e-6),!this.enableFullScreen||e!==this._pixelsWidth||t!==this._pixelsHeight?(e=qr(e),t=qr(t),s=((e&65535)<<16|t&65535)>>>0,n>1&&(s+=n*4294967296)):s=n>1?-n:-1,this.texturePool[s]||(this.texturePool[s]=[]);var a=this.texturePool[s].pop();return a||(a=this.createTexture(e,t,n)),a.filterPoolKey=s,a.setResolution(i),a},r.prototype.getFilterTexture=function(e,t,i){var n=this.getOptimalTexture(e.width,e.height,t||e.resolution,i||st.NONE);return n.filterFrame=e.filterFrame,n},r.prototype.returnTexture=function(e){var t=e.filterPoolKey;e.filterFrame=null,this.texturePool[t].push(e)},r.prototype.returnFilterTexture=function(e){this.returnTexture(e)},r.prototype.clear=function(e){if(e=e!==!1,e)for(var t in this.texturePool){var i=this.texturePool[t];if(i)for(var n=0;n<i.length;n++)i[n].destroy(!0)}this.texturePool={}},r.prototype.setScreenSize=function(e){if(!(e.width===this._pixelsWidth&&e.height===this._pixelsHeight)){this.enableFullScreen=e.width>0&&e.height>0;for(var t in this.texturePool)if(Number(t)<0){var i=this.texturePool[t];if(i)for(var n=0;n<i.length;n++)i[n].destroy(!0);this.texturePool[t]=[]}this._pixelsWidth=e.width,this._pixelsHeight=e.height}},r.SCREEN_KEY=-1,r}(),as=function(){function r(e,t,i,n,s,a,o){t===void 0&&(t=0),i===void 0&&(i=!1),n===void 0&&(n=F.FLOAT),this.buffer=e,this.size=t,this.normalized=i,this.type=n,this.stride=s,this.start=a,this.instance=o}return r.prototype.destroy=function(){this.buffer=null},r.from=function(e,t,i,n,s){return new r(e,t,i,n,s)},r}(),Pp=0,xt=function(){function r(e,t,i){t===void 0&&(t=!0),i===void 0&&(i=!1),this.data=e||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=i,this.static=t,this.id=Pp++,this.disposeRunner=new Pt("disposeBuffer")}return r.prototype.update=function(e){e instanceof Array&&(e=new Float32Array(e)),t
Download .txt
gitextract_rj9tv4rl/

├── .gitignore
├── LICENSE
├── README.md
├── README_EN.md
├── data/
│   ├── apply/
│   │   ├── audio/
│   │   │   └── .gitkeep
│   │   ├── emoticon/
│   │   │   └── .gitkeep
│   │   ├── images/
│   │   │   └── .gitkeep
│   │   ├── play/
│   │   │   ├── .gitkeep
│   │   │   └── 坂田银时.txt
│   │   └── text2image/
│   │       └── .gitkeep
│   ├── config/
│   │   ├── embedding_train/
│   │   │   └── model_arch.json
│   │   ├── js/
│   │   │   ├── custom.js
│   │   │   └── index.js
│   │   ├── language/
│   │   │   └── en_UK_language_config.json
│   │   ├── prompt/
│   │   │   └── chatPrompt.json
│   │   ├── theme/
│   │   │   └── theme.py
│   │   └── train_config/
│   │       └── .gitkeep
│   ├── documents/
│   │   └── .gitkeep
│   └── modeldata/
│       ├── Embedding/
│       │   └── .gitkeep
│       └── LLM/
│           └── .gitkeep
├── demo.py
├── env/
│   └── .gitkeep
├── models/
│   ├── Embedding/
│   │   └── .gitkeep
│   ├── LLM/
│   │   └── .gitkeep
│   ├── LoRA/
│   │   └── .gitkeep
│   ├── live2d_model/
│   │   └── .gitkeep
│   ├── svc_models/
│   │   ├── .gitkeep
│   │   ├── hubert_model/
│   │   │   └── .gitkeep
│   │   └── svc/
│   │       └── .gitkeep
│   └── vits_pretrained_models/
│       └── .gitkeep
├── modules/
│   ├── __init__.py
│   ├── agent/
│   │   ├── .gitkeep
│   │   ├── __init__.py
│   │   ├── chatdb/
│   │   │   ├── chat.py
│   │   │   ├── chatdb.py
│   │   │   ├── mysql.py
│   │   │   └── sql_examples.py
│   │   ├── internet_search.py
│   │   ├── svc/
│   │   │   ├── __init__.py
│   │   │   ├── attentions.py
│   │   │   ├── commons.py
│   │   │   ├── configs/
│   │   │   │   └── config.json
│   │   │   ├── hubert/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── hubert_model.py
│   │   │   │   ├── hubert_model_onnx.py
│   │   │   │   └── put_hubert_ckpt_here
│   │   │   ├── inference/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── chunks_temp.json
│   │   │   │   ├── infer_tool.py
│   │   │   │   ├── infer_tool_grad.py
│   │   │   │   └── slicer.py
│   │   │   ├── inference_main.py
│   │   │   ├── models.py
│   │   │   ├── modules.py
│   │   │   ├── utils.py
│   │   │   ├── vdecoder/
│   │   │   │   ├── __init__.py
│   │   │   │   └── hifigan/
│   │   │   │       ├── __init__.py
│   │   │   │       ├── env.py
│   │   │   │       ├── models.py
│   │   │   │       ├── nvSTFT.py
│   │   │   │       └── utils.py
│   │   │   └── vits_haruhi.py
│   │   ├── tts_online.py
│   │   └── vits/
│   │       ├── __init__.py
│   │       ├── attentions.py
│   │       ├── commons.py
│   │       ├── config/
│   │       │   └── config.json
│   │       ├── mel_processing.py
│   │       ├── models.py
│   │       ├── modules.py
│   │       ├── monotonic_align/
│   │       │   ├── __init__.py
│   │       │   └── core.py
│   │       ├── test.py
│   │       ├── text/
│   │       │   ├── LICENSE
│   │       │   ├── __init__.py
│   │       │   ├── cleaners.py
│   │       │   └── symbols.py
│   │       ├── transforms.py
│   │       ├── utils.py
│   │       └── vits.py
│   ├── apply/
│   │   └── role_play.py
│   └── model/
│       ├── .gitkeep
│       ├── Embedding/
│       │   ├── __init__.py
│       │   ├── base.py
│       │   ├── text2vec/
│       │   │   ├── __init__.py
│       │   │   ├── dataset/
│       │   │   │   ├── __init__.py
│       │   │   │   ├── base.py
│       │   │   │   ├── bert.py
│       │   │   │   ├── cosent.py
│       │   │   │   └── sentencebert.py
│       │   │   ├── main.py
│       │   │   ├── model/
│       │   │   │   ├── __init__.py
│       │   │   │   ├── base.py
│       │   │   │   ├── bert.py
│       │   │   │   ├── cosent.py
│       │   │   │   └── sentencebert.py
│       │   │   └── utils/
│       │   │       ├── __init__.py
│       │   │       └── base.py
│       │   └── utils/
│       │       ├── __init__.py
│       │       └── base.py
│       ├── LLM/
│       │   ├── __init__.py
│       │   ├── accelerate_configs/
│       │   │   ├── ds_multi_gpu.yaml
│       │   │   ├── ds_single_gpu.yaml
│       │   │   ├── multi_gpu.yaml
│       │   │   └── single_gpu.yaml
│       │   ├── ds_configs/
│       │   │   ├── stage_1.json
│       │   │   ├── stage_1_offload.json
│       │   │   ├── stage_2.json
│       │   │   ├── stage_2_offload.json
│       │   │   ├── stage_3.json
│       │   │   ├── stage_3_offload.json
│       │   │   └── stage_3_offload_bf16.json
│       │   ├── run/
│       │   │   ├── train_ds_multi_gpu.sh
│       │   │   ├── train_ds_single_gpu.sh
│       │   │   ├── train_lora_ds_multi_gpu.sh
│       │   │   ├── train_lora_ds_single_gpu.sh
│       │   │   ├── train_lora_multi_gpu.sh
│       │   │   ├── train_lora_single_gpu.sh
│       │   │   ├── train_multi_gpu.sh
│       │   │   └── train_single_gpu.sh
│       │   ├── train.py
│       │   ├── train_dpo.py
│       │   ├── train_dpo_luancher.py
│       │   └── train_luancher.py
│       ├── SparkApi.py
│       ├── __init__.py
│       ├── emb_auto.py
│       ├── llm_auto.py
│       ├── prompt_generator.py
│       └── use_api.py
├── requirements.txt
├── ui/
│   ├── apply.py
│   ├── apply_knowledge.py
│   ├── apply_text_image_generation.py
│   ├── apply_video.py
│   ├── chat.py
│   ├── data.py
│   └── train.py
├── utils/
│   ├── .gitkeep
│   ├── MyFAISS.py
│   ├── __init__.py
│   ├── chinese_text_splitter.py
│   ├── dev.json
│   ├── dl_data.py
│   ├── embedding_base_model.py
│   ├── embedding_val.py
│   ├── language_switch_utils.py
│   ├── local_doc.py
│   ├── parallel_api.py
│   ├── svc_utils.py
│   ├── text_image_utils.py
│   ├── ui_utils.py
│   ├── utils.py
│   └── vits_utils.py
├── web-demo-CN.bat
├── web-demo-CN.sh
├── web-demo-EN.bat
├── web-demo-EN.sh
└── webui.py
Download .txt
SYMBOL INDEX (1991 symbols across 75 files)

FILE: data/config/js/custom.js
  function gradioLoaded (line 3) | function gradioLoaded(mutations) {
  function setTipsByID (line 23) | function setTipsByID(element, text) {
  function setTips (line 27) | function setTips() {
  function generateUID (line 82) | function generateUID() {
  function live2dShow (line 89) | function live2dShow() {
  function live2d (line 131) | function live2d() {
  function keyboard_enter (line 187) | function keyboard_enter() {
  function keyboard_enter_page (line 196) | function keyboard_enter_page(submitGroup_id, submitBtn_id, user_input_id) {

FILE: data/config/js/index.js
  function t (line 1) | function t(n){const s={};return n.integrity&&(s.integrity=n.integrity),n...
  function i (line 1) | function i(n){if(n.ep)return;n.ep=!0;const s=t(n);fetch(n.href,s)}
  function ml (line 1) | function ml(r){var e=this.constructor;return this.then(function(t){retur...
  function yl (line 1) | function yl(r){var e=this;return new e(function(t,i){if(!(r&&typeof r.le...
  function lh (line 1) | function lh(r,e){this.name="AggregateError",this.errors=r,this.message=e...
  function xl (line 1) | function xl(r){var e=this;return new e(function(t,i){if(!(r&&typeof r.le...
  function fh (line 1) | function fh(r){return!!(r&&typeof r.length<"u")}
  function Tl (line 1) | function Tl(){}
  function El (line 1) | function El(r,e){return function(){r.apply(e,arguments)}}
  function pt (line 1) | function pt(r){if(!(this instanceof pt))throw new TypeError("Promises mu...
  function ch (line 1) | function ch(r,e){for(;r._state===3;)r=r._value;if(r._state===0){r._defer...
  function Hn (line 1) | function Hn(r,e){try{if(e===r)throw new TypeError("A promise cannot be r...
  function Gr (line 1) | function Gr(r,e){r._state=2,r._value=e,Vn(r)}
  function Vn (line 1) | function Vn(r){r._state===2&&r._deferreds.length===0&&pt._immediateFn(fu...
  function Sl (line 1) | function Sl(r,e,t){this.onFulfilled=typeof r=="function"?r:null,this.onR...
  function dh (line 1) | function dh(r,e){var t=!1;try{r(function(i){t||(t=!0,Hn(e,i))},function(...
  function s (line 1) | function s(o,h){try{if(h&&(typeof h=="object"||typeof h=="function")){va...
  function Xs (line 1) | function Xs(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.c...
  function Cl (line 5) | function Cl(r){if(r==null)throw new TypeError("Object.assign cannot be c...
  function Il (line 5) | function Il(){try{if(!Object.assign)return!1;var r=new String("abc");if(...
  function Dl (line 23) | function Dl(r){return function(e){return e.test(r)}}
  function Fl (line 23) | function Fl(r){var e={userAgent:"",platform:"",maxTouchPoints:0};!r&&typ...
  function Ll (line 23) | function Ll(){return!Ht.apple.device}
  function Bl (line 23) | function Bl(r){var e=!0;if(Ht.tablet||Ht.phone){if(Ht.apple.device){var ...
  function i (line 23) | function i(){}
  function n (line 23) | function n(h,u,l){this.fn=h,this.context=u,this.once=l||!1}
  function s (line 23) | function s(h,u,l,c,f){if(typeof l!="function")throw new TypeError("The l...
  function a (line 23) | function a(h,u){--h._eventsCount===0?h._events=new i:delete h._events[u]}
  function o (line 23) | function o(){this._events=new i,this._eventsCount=0}
  function qi (line 23) | function qi(r,e,t){t=t||2;var i=e&&e.length,n=i?e[0]*t:r.length,s=_h(r,0...
  function _h (line 23) | function _h(r,e,t,i,n){var s,a;if(n===Wn(r,e,t,i)>0)for(s=e;s<t;s+=i)a=u...
  function $e (line 23) | function $e(r,e){if(!r)return r;e||(e=r);var t=r,i;do if(i=!1,!t.steiner...
  function jr (line 23) | function jr(r,e,t,i,n,s,a){if(r){!a&&s&&Wl(r,i,n,s);for(var o=r,h,u;r.pr...
  function Ul (line 23) | function Ul(r){var e=r.prev,t=r,i=r.next;if(ct(e,t,i)>=0)return!1;for(va...
  function kl (line 23) | function kl(r,e,t,i){var n=r.prev,s=r,a=r.next;if(ct(n,s,a)>=0)return!1;...
  function Gl (line 23) | function Gl(r,e,t){var i=r;do{var n=i.prev,s=i.next.next;!$i(n,s)&&gh(n,...
  function Xl (line 23) | function Xl(r,e,t,i,n,s){var a=r;do{for(var o=a.next.next;o!==a.prev;){i...
  function Hl (line 23) | function Hl(r,e,t,i){var n=[],s,a,o,h,u;for(s=0,a=e.length;s<a;s++)o=e[s...
  function Vl (line 23) | function Vl(r,e){return r.x-e.x}
  function jl (line 23) | function jl(r,e){var t=zl(r,e);if(!t)return e;var i=mh(t,r);return $e(i,...
  function zl (line 23) | function zl(r,e){var t=e,i=r.x,n=r.y,s=-1/0,a;do{if(n<=t.y&&n>=t.next.y&...
  function Yl (line 23) | function Yl(r,e){return ct(r.prev,r,e.prev)<0&&ct(e.next,r,r.next)<0}
  function Wl (line 23) | function Wl(r,e,t,i){var n=r;do n.z===0&&(n.z=zn(n.x,n.y,e,t,i)),n.prevZ...
  function ql (line 23) | function ql(r){var e,t,i,n,s,a,o,h,u=1;do{for(t=r,r=null,s=null,a=0;t;){...
  function zn (line 23) | function zn(r,e,t,i,n){return r=(r-t)*n|0,e=(e-i)*n|0,r=(r|r<<8)&1671193...
  function $l (line 23) | function $l(r){var e=r,t=r;do(e.x<t.x||e.x===t.x&&e.y<t.y)&&(t=e),e=e.ne...
  function lr (line 23) | function lr(r,e,t,i,n,s,a,o){return(n-a)*(e-o)>=(r-a)*(s-o)&&(r-a)*(i-o)...
  function Zl (line 23) | function Zl(r,e){return r.next.i!==e.i&&r.prev.i!==e.i&&!Kl(r,e)&&(zr(r,...
  function ct (line 23) | function ct(r,e,t){return(e.y-r.y)*(t.x-e.x)-(e.x-r.x)*(t.y-e.y)}
  function $i (line 23) | function $i(r,e){return r.x===e.x&&r.y===e.y}
  function gh (line 23) | function gh(r,e,t,i){var n=fi(ct(r,e,t)),s=fi(ct(r,e,i)),a=fi(ct(t,i,r))...
  function li (line 23) | function li(r,e,t){return e.x<=Math.max(r.x,t.x)&&e.x>=Math.min(r.x,t.x)...
  function fi (line 23) | function fi(r){return r>0?1:r<0?-1:0}
  function Kl (line 23) | function Kl(r,e){var t=r;do{if(t.i!==r.i&&t.next.i!==r.i&&t.i!==e.i&&t.n...
  function zr (line 23) | function zr(r,e){return ct(r.prev,r,r.next)<0?ct(r,e,r.next)>=0&&ct(r,r....
  function Jl (line 23) | function Jl(r,e){var t=r,i=!1,n=(r.x+e.x)/2,s=(r.y+e.y)/2;do t.y>s!=t.ne...
  function mh (line 23) | function mh(r,e){var t=new Yn(r.i,r.x,r.y),i=new Yn(e.i,e.x,e.y),n=r.nex...
  function uo (line 23) | function uo(r,e,t,i){var n=new Yn(r,e,t);return i?(n.next=i.next,n.prev=...
  function Yr (line 23) | function Yr(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.n...
  function Yn (line 23) | function Yn(r,e,t){this.i=r,this.x=e,this.y=t,this.prev=null,this.next=n...
  function Wn (line 23) | function Wn(r,e,t,i){for(var n=0,s=e,a=t-i;s<t;s+=i)n+=(r[a]-r[s])*(r[s+...
  function I (line 23) | function I(M){throw RangeError(y[M])}
  function S (line 23) | function S(M,w){for(var H=M.length,W=[];H--;)W[H]=w(M[H]);return W}
  function P (line 23) | function P(M,w){var H=M.split("@"),W="";H.length>1&&(W=H[0]+"@",M=H[1]),...
  function R (line 23) | function R(M){for(var w=[],H=0,W=M.length,q,gt;H<W;)q=M.charCodeAt(H++),...
  function B (line 23) | function B(M){return S(M,function(w){var H="";return w>65535&&(w-=65536,...
  function G (line 23) | function G(M){return M-48<10?M-22:M-65<26?M-65:M-97<26?M-97:h}
  function J (line 23) | function J(M,w){return M+22+75*(M<26)-((w!=0)<<5)}
  function D (line 23) | function D(M,w,H){var W=0;for(M=H?x(M/f):M>>1,M+=x(M/w);M>b*l>>1;W+=h)M=...
  function O (line 23) | function O(M){var w=[],H=M.length,W,q=0,gt=p,at=d,ot,St,wt,mt,Q,nt,ht,z,...
  function X (line 23) | function X(M){var w,H,W,q,gt,at,ot,St,wt,mt,Q,nt=[],ht,z,It,Rt;for(M=R(M...
  function Et (line 23) | function Et(M){return P(M,function(w){return v.test(w)?O(w.slice(4).toLo...
  function Y (line 23) | function Y(M){return P(M,function(w){return g.test(w)?"xn--"+X(w):w})}
  function rf (line 23) | function rf(r,e){return Object.prototype.hasOwnProperty.call(r,e)}
  function te (line 23) | function te(){this.protocol=null,this.slashes=null,this.auth=null,this.h...
  function Zi (line 24) | function Zi(r,e,t){if(r&&se.isObject(r)&&r instanceof te)return r;var i=...
  function mf (line 24) | function mf(r){return se.isString(r)&&(r=Zi(r)),r instanceof te?r.format...
  function yf (line 24) | function yf(r,e){return Zi(r,!1,!0).resolve(e)}
  function Wt (line 30) | function Wt(r){if(typeof r!="string")throw new TypeError("Path must be a...
  function po (line 30) | function po(r){var e=r.split("?")[0];return e.split("#")[0]}
  function xf (line 30) | function xf(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}
  function bf (line 30) | function bf(r,e,t){return r.replace(new RegExp(xf(e),"g"),t)}
  function Tf (line 30) | function Tf(r,e){for(var t="",i=0,n=-1,s=0,a,o=0;o<=r.length;++o){if(o<r...
  function Ef (line 30) | function Ef(){Kn=!0}
  function xh (line 30) | function xh(r){var e;if(!Kn){if(A.ADAPTER.getNavigator().userAgent.toLow...
  function bh (line 33) | function bh(){return typeof vn>"u"&&(vn=function(){var e={stencil:!0,fai...
  function Ze (line 33) | function Ze(r,e){return e===void 0&&(e=[]),e[0]=(r>>16&255)/255,e[1]=(r>...
  function js (line 33) | function js(r){var e=r.toString(16);return e="000000".substring(0,6-e.le...
  function zs (line 33) | function zs(r){return typeof r=="string"&&(r=lp[r.toLowerCase()]||r,r[0]...
  function fp (line 33) | function fp(r){return(r[0]*255<<16)+(r[1]*255<<8)+(r[2]*255|0)}
  function cp (line 33) | function cp(){for(var r=[],e=[],t=0;t<32;t++)r[t]=t,e[t]=t;r[L.NORMAL_NP...
  function Ws (line 33) | function Ws(r,e){return Ys[e?1:0][r]}
  function Th (line 33) | function Th(r,e,t,i){return t=t||new Float32Array(4),i||i===void 0?(t[0]...
  function Ki (line 33) | function Ki(r,e){if(e===1)return(e*255<<24)+r;if(e===0)return 0;var t=r>...
  function qs (line 33) | function qs(r,e,t,i){return t=t||new Float32Array(4),t[0]=(r>>16&255)/25...
  function Eh (line 33) | function Eh(r,e){e===void 0&&(e=null);var t=r*6;if(e=e||new Uint16Array(...
  function Ji (line 33) | function Ji(r){if(r.BYTES_PER_ELEMENT===4)return r instanceof Float32Arr...
  function pp (line 33) | function pp(r,e){for(var t=0,i=0,n={},s=0;s<r.length;s++)i+=e[s],t+=r[s]...
  function qr (line 33) | function qr(r){return r+=r===0?1:0,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>...
  function Jn (line 33) | function Jn(r){return!(r&r-1)&&!!r}
  function Qn (line 33) | function Qn(r){var e=(r>65535?1:0)<<4;r>>>=e;var t=(r>255?1:0)<<3;return...
  function We (line 33) | function We(r,e,t){var i=r.length,n;if(!(e>=i||t===0)){t=e+t>i?i-e:t;var...
  function Ye (line 33) | function Ye(r){return r===0?0:r<0?-1:1}
  function Ie (line 33) | function Ie(){return++vp}
  function At (line 33) | function At(r,e,t){if(t===void 0&&(t=3),!_o[e]){var i=new Error().stack;...
  function _p (line 38) | function _p(){var r;for(r in Dt)Dt[r].destroy();for(r in Ut)Ut[r].destro...
  function gp (line 38) | function gp(){var r;for(r in Dt)delete Dt[r];for(r in Ut)delete Ut[r]}
  function r (line 38) | function r(e,t,i){this.canvas=A.ADAPTER.createCanvas(),this.context=this...
  function Sh (line 38) | function Sh(r){var e=r.width,t=r.height,i=r.getContext("2d",{willReadFre...
  function mp (line 38) | function mp(r){var e=Ph.exec(r);if(e)return{mediaType:e[1]?e[1].toLowerC...
  function wh (line 38) | function wh(r,e){if(e===void 0&&(e=globalThis.location),r.indexOf("data:...
  function $r (line 38) | function $r(r,e){var t=A.RETINA_PREFIX.exec(r);return t?parseFloat(t[1])...
  function r (line 44) | function r(e,t){e===void 0&&(e=0),t===void 0&&(t=0),this.x=0,this.y=0,th...
  function r (line 44) | function r(e,t,i,n){e===void 0&&(e=0),t===void 0&&(t=0),i===void 0&&(i=0...
  function r (line 44) | function r(e,t,i){e===void 0&&(e=0),t===void 0&&(t=0),i===void 0&&(i=0),...
  function r (line 44) | function r(e,t,i,n){e===void 0&&(e=0),t===void 0&&(t=0),i===void 0&&(i=0...
  function r (line 44) | function r(){for(var e=arguments,t=[],i=0;i<arguments.length;i++)t[i]=e[...
  function r (line 44) | function r(e,t,i,n,s){e===void 0&&(e=0),t===void 0&&(t=0),i===void 0&&(i...
  function r (line 44) | function r(e,t,i,n){i===void 0&&(i=0),n===void 0&&(n=0),this._x=i,this._...
  function r (line 44) | function r(e,t,i,n,s,a){e===void 0&&(e=1),t===void 0&&(t=0),i===void 0&&...
  function xp (line 44) | function xp(){for(var r=0;r<16;r++){var e=[];rs.push(e);for(var t=0;t<16...
  function r (line 44) | function r(){this.worldTransform=new lt,this.localTransform=new lt,this....
  function r (line 50) | function r(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,t...
  function $s (line 63) | function $s(r,e){is(r,e);function t(){this.constructor=r}r.prototype=e==...
  function e (line 63) | function e(){var t=r.call(this)||this;return t.tempDisplayObjectParent=n...
  function e (line 63) | function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.sort...
  function bp (line 63) | function bp(r,e){return r.zIndex===e.zIndex?r._lastSortedIndex-e._lastSo...
  function e (line 63) | function e(){var t=r.call(this)||this;return t.children=[],t.sortableChi...
  function r (line 88) | function r(e){this.items=[],this._name=e,this._aliasCount=0}
  function r (line 94) | function r(e,t,i,n){t===void 0&&(t=null),i===void 0&&(i=0),n===void 0&&(...
  function r (line 94) | function r(){var e=this;this.autoStart=!1,this.deltaTime=1,this.lastTime...
  function r (line 94) | function r(){}
  function tn (line 100) | function tn(r,e){if(!r)return null;var t="";if(typeof r=="string"){var i...
  function it (line 113) | function it(r,e){ns(r,e);function t(){this.constructor=r}r.prototype=e==...
  function Tp (line 113) | function Tp(r,e){var t={};for(var i in r)Object.prototype.hasOwnProperty...
  function r (line 113) | function r(e,t){e===void 0&&(e=0),t===void 0&&(t=0),this._width=e,this._...
  function e (line 113) | function e(t,i){var n=this,s=i||{},a=s.width,o=s.height;if(!a||!o)throw ...
  function e (line 113) | function e(t,i){t===void 0&&(t=null),i===void 0&&(i=null);var n=r.call(t...
  function e (line 113) | function e(t,i){var n=this,s=i||{},a=s.width,o=s.height;n=r.call(this,a,...
  function e (line 113) | function e(t,i){var n=this,s=i||{},a=s.width,o=s.height,h,u;return Array...
  function e (line 113) | function e(t){var i=this,n=t,s=n.naturalWidth||n.videoWidth||n.width,a=n...
  function e (line 113) | function e(t){return r.call(this,t)||this}
  function e (line 113) | function e(t,i){var n=this,s=i||{},a=s.width,o=s.height,h=s.autoLoad,u=s...
  function e (line 113) | function e(t,i){var n=this;if(i=i||{},!(t instanceof HTMLImageElement)){...
  function e (line 113) | function e(t,i){var n=this;return i=i||{},n=r.call(this,A.ADAPTER.create...
  function e (line 113) | function e(t,i){var n=this;if(i=i||{},!(t instanceof HTMLVideoElement)){...
  function e (line 113) | function e(t){return r.call(this,t)||this}
  function e (line 113) | function e(){return r!==null&&r.apply(this,arguments)||this}
  function r (line 113) | function r(e,t){this.width=Math.round(e||100),this.height=Math.round(t||...
  function e (line 113) | function e(t){t===void 0&&(t={});var i=this;if(typeof t=="number"){var n...
  function r (line 113) | function r(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1...
  function vi (line 113) | function vi(r){r.destroy=function(){},r.on=function(){},r.once=function(...
  function e (line 113) | function e(t,i,n,s,a,o){var h=r.call(this)||this;if(h.noFrame=!1,i||(h.n...
  function e (line 113) | function e(t,i){var n=r.call(this,t,i)||this;return n.valid=!0,n.filterF...
  function r (line 113) | function r(e){this.texturePool={},this.textureOptions=e||{},this.enableF...
  function r (line 113) | function r(e,t,i,n,s,a,o){t===void 0&&(t=0),i===void 0&&(i=!1),n===void ...
  function r (line 113) | function r(e,t,i){t===void 0&&(t=!0),i===void 0&&(i=!1),this.data=e||new...
  function Cp (line 113) | function Cp(r,e){for(var t=0,i=0,n={},s=0;s<r.length;s++)i+=e[s],t+=r[s]...
  function r (line 113) | function r(e,t){e===void 0&&(e=[]),t===void 0&&(t={}),this.buffers=e,thi...
  function e (line 113) | function e(){var t=r.call(this)||this;return t.addAttribute("aVertexPosi...
  function e (line 113) | function e(){var t=r.call(this)||this;return t.vertices=new Float32Array...
  function r (line 113) | function r(e,t,i){this.group=!0,this.syncUniforms={},this.dirtyId=0,this...
  function r (line 113) | function r(){this.renderTexture=null,this.target=null,this.legacy=!1,thi...
  function r (line 113) | function r(e){this.renderer=e,this.defaultFilterStack=[{}],this.textureP...
  function r (line 113) | function r(e){this.renderer=e}
  function r (line 113) | function r(e){this.renderer=e,this.emptyRenderer=new ai(e),this.currentR...
  function r (line 113) | function r(e){this.renderer=e,this.webGLVersion=1,this.extensions={},thi...
  function r (line 113) | function r(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this....
  function r (line 113) | function r(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFr...
  function r (line 113) | function r(e){this.renderer=e,this._activeGeometry=null,this._activeVao=...
  function r (line 113) | function r(e){e===void 0&&(e=null),this.type=yt.NONE,this.autoDetect=!0,...
  function bo (line 113) | function bo(r,e,t){var i=r.createShader(e);return r.shaderSource(i,t),r....
  function To (line 113) | function To(r,e){var t=r.getShaderSource(e).split(`
  function Op (line 116) | function Op(r,e,t,i){r.getProgramParameter(e,r.LINK_STATUS)||(r.getShade...
  function yn (line 116) | function yn(r){for(var e=new Array(r),t=0;t<e.length;t++)e[t]=!1;return e}
  function Gh (line 116) | function Gh(r,e){switch(r){case"float":return 0;case"vec2":return new Fl...
  function Hh (line 116) | function Hh(){if(Er===Xh||Er&&Er.isContextLost()){var r=A.ADAPTER.create...
  function Dp (line 116) | function Dp(){if(!gi){gi=Ft.MEDIUM;var r=Hh();if(r&&r.getShaderPrecision...
  function Eo (line 116) | function Eo(r,e,t){if(r.substring(0,9)!=="precision"){var i=e;return e==...
  function Vh (line 117) | function Vh(r){return Fp[r]}
  function jh (line 117) | function jh(r,e){if(!mi){var t=Object.keys(So);mi={};for(var i=0;i<t.len...
  function Np (line 338) | function Np(r,e){var t,i=[`
  function kp (line 354) | function kp(r){for(var e="",t=0;t<r;++t)t>0&&(e+=`
  function zh (line 355) | function zh(r,e){if(r===0)throw new Error("Invalid value of `0` passed t...
  function Gp (line 355) | function Gp(){if(typeof Sr=="boolean")return Sr;try{var r=new Function("...
  function r (line 372) | function r(e,t,i){i===void 0&&(i="pixi-shader"),this.id=Vp++,this.vertex...
  function r (line 374) | function r(e,t){this.uniformBindCount=0,this.program=e,t?t instanceof we...
  function r (line 374) | function r(){this.data=0,this.blendMode=L.NORMAL,this.polygonOffset=0,th...
  function e (line 407) | function e(t,i,n){var s=this,a=xr.from(t||e.defaultVertexSrc,i||e.defaul...
  function r (line 448) | function r(e,t){this._texture=e,this.mapCoord=new lt,this.uClampFrame=ne...
  function e (line 448) | function e(t,i,n){var s=this,a=null;return typeof t!="string"&&i===void ...
  function r (line 448) | function r(e){this.renderer=e,this.enableScissor=!0,this.alphaMaskPool=[...
  function r (line 448) | function r(e){this.renderer=e,this.maskStack=[],this.glConst=0}
  function e (line 448) | function e(t){var i=r.call(this,t)||this;return i.glConst=A.ADAPTER.getW...
  function e (line 448) | function e(t){var i=r.call(this,t)||this;return i.glConst=A.ADAPTER.getW...
  function r (line 448) | function r(e){this.renderer=e,this.destinationFrame=null,this.sourceFram...
  function r (line 448) | function r(e){this.renderer=e,this.clearColor=e._backgroundColorRgba,thi...
  function qp (line 448) | function qp(r,e,t,i,n){t.buffer.update(n)}
  function $h (line 486) | function $h(r){for(var e=r.map(function(h){return{data:h,offset:0,dataLe...
  function Zh (line 486) | function Zh(r,e){var t=[];for(var i in r)e[i]&&t.push(e[i]);return t.sor...
  function Kh (line 486) | function Kh(r,e){if(!r.autoManage)return{size:0,syncFunc:qp};for(var t=Z...
  function r (line 518) | function r(){}
  function r (line 518) | function r(e,t){this.program=e,this.uniformData=t,this.uniformGroups={},...
  function Kp (line 518) | function Kp(r,e){for(var t={},i=e.getProgramParameter(r,e.ACTIVE_ATTRIBU...
  function Jp (line 518) | function Jp(r,e){for(var t={},i=e.getProgramParameter(r,e.ACTIVE_UNIFORM...
  function Qh (line 518) | function Qh(r,e){var t=bo(r,r.VERTEX_SHADER,e.vertexSrc),i=bo(r,r.FRAGME...
  function r (line 518) | function r(e){this.destroyed=!1,this.renderer=e,this.systemCheck(),this....
  function tv (line 518) | function tv(r,e){return e===void 0&&(e=[]),e[L.NORMAL]=[r.ONE,r.ONE_MINU...
  function r (line 518) | function r(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blend...
  function r (line 518) | function r(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdl...
  function ov (line 518) | function ov(r){var e,t,i,n,s,a,o,h,u,l,c,f,d,p,_,v,g,m,y,b,x,T,E;return"...
  function r (line 518) | function r(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-...
  function r (line 518) | function r(e){this.renderer=e,this.boundTextures=[],this.currentLocation...
  function e (line 518) | function e(t,i){t===void 0&&(t=pr.UNKNOWN);var n=r.call(this)||this;retu...
  function r (line 518) | function r(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,th...
  function r (line 518) | function r(e){this.renderer=e,this.managedBuffers={},this.boundBufferBas...
  function e (line 518) | function e(t){var i=r.call(this,pr.WEBGL,t)||this;return t=i.options,i.g...
  function ru (line 518) | function ru(r){return xa.create(r)}
  function r (line 555) | function r(e){At("6.1.0","System class is deprecated, implemement ISyste...
  function r (line 555) | function r(){this.texArray=null,this.blend=0,this.type=Xt.TRIANGLES,this...
  function r (line 555) | function r(){this.elements=[],this.ids=[],this.count=0}
  function r (line 555) | function r(e){typeof e=="number"?this.rawBinaryData=new ArrayBuffer(e):e...
  function e (line 555) | function e(t){var i=r.call(this,t)||this;return i.shaderGenerator=null,i...
  function r (line 555) | function r(e,t){if(this.vertexSrc=e,this.fragTemplate=t,this.programCach...
  function e (line 563) | function e(t){t===void 0&&(t=!1);var i=r.call(this)||this;return i._buff...
  function r (line 594) | function r(){}
  function h (line 594) | function h(u){var l=o.call(this,u)||this;return l.shaderGenerator=new su...
  function r (line 600) | function r(e){this.debug=!1,this._isActive=!1,this._isMobileAccessibilit...
  function r (line 606) | function r(){this.pressure=0,this.rotationAngle=0,this.twist=0,this.tang...
  function Tv (line 619) | function Tv(r,e){hs(r,e);function t(){this.constructor=r}r.prototype=e==...
  function r (line 619) | function r(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropa...
  function r (line 619) | function r(e){this._pointerId=e,this._flags=r.FLAGS.NONE}
  function r (line 619) | function r(){this._tempPoint=new et}
  method buttonMode (line 619) | get buttonMode(){return this.cursor==="pointer"}
  method buttonMode (line 619) | set buttonMode(r){r?this.cursor="pointer":this.cursor==="pointer"&&(this...
  method trackedPointers (line 619) | get trackedPointers(){return this._trackedPointers===void 0&&(this._trac...
  function e (line 619) | function e(t,i){var n=r.call(this)||this;return i=i||{},n.renderer=t,n.a...
  function r (line 625) | function r(e){this.renderer=e}
  function r (line 631) | function r(e,t,i){t===void 0&&(t=!1),this._fn=e,this._once=t,this._thisA...
  function Oo (line 631) | function Oo(r,e){return r._head?(r._tail._next=e,e._prev=r._tail,r._tail...
  function r (line 631) | function r(){this._head=this._tail=void 0}
  function vu (line 631) | function vu(r,e){e=e||{};for(var t={key:["source","protocol","authority"...
  function Fo (line 631) | function Fo(){}
  function Lo (line 631) | function Lo(r,e,t){e&&e.indexOf(".")===0&&(e=e.substring(1)),e&&(r[e]=t)}
  function In (line 631) | function In(r){return r.toString().replace("object ","")}
  function r (line 631) | function r(e,t,i){if(this._dequeue=Fo,this._onLoadBinding=null,this._ele...
  function De (line 631) | function De(){}
  function Av (line 631) | function Av(r){return function(){for(var t=arguments,i=[],n=0;n<argument...
  function r (line 631) | function r(e,t){this.data=e,this.callback=t}
  function r (line 631) | function r(e,t){var i=this;if(t===void 0&&(t=1),this.workers=0,this.satu...
  function o (line 631) | function o(h){if(h||s===a){i&&i(h);return}n?setTimeout(function(){t(e[s+...
  function r (line 631) | function r(e,t){var i=this;e===void 0&&(e=""),t===void 0&&(t=10),this.pr...
  function r (line 631) | function r(){}
  function r (line 631) | function r(){}
  function Fv (line 631) | function Fv(r){for(var e="",t=0;t<r.length;){for(var i=[0,0,0],n=[0,0,0,...
  function Lv (line 631) | function Lv(r,e){if(!r.data){e();return}if(r.xhr&&r.xhrType===dt.XHR_RES...
  function r (line 631) | function r(){}
  function mu (line 650) | function mu(r,e){us(r,e);function t(){this.constructor=r}r.prototype=e==...
  function Nv (line 650) | function Nv(r,e,t,i){function n(s){return s instanceof t?s:new t(functio...
  function Uv (line 650) | function Uv(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];ret...
  function e (line 650) | function e(t,i){i===void 0&&(i={width:1,height:1,autoLoad:!0});var n=thi...
  function e (line 650) | function e(t,i){var n=r.call(this,t,i)||this;return n.format=i.format,n....
  function r (line 650) | function r(){}
  function bu (line 650) | function bu(r,e,t){var i={textures:{},texture:null};if(!e)return i;var n...
  function Tu (line 650) | function Tu(r){var e=new Uint32Array(r),t=e[0];if(t!==Gv)throw new Error...
  function Pu (line 650) | function Pu(r,e,t){t===void 0&&(t=!1);var i=new DataView(e);if(!r_(r,i))...
  function r_ (line 650) | function r_(r,e){for(var t=0;t<No.length;t++)if(e.getUint8(t)!==No[t])re...
  function i_ (line 650) | function i_(r){switch(r){case C.RGBA:return C.RGBA_INTEGER;case C.RGB:re...
  function n_ (line 650) | function n_(r,e,t){for(var i=new Map,n=0;n<e;){var s=r.getUint32(fs+n,t)...
  function r (line 650) | function r(){}
  function r (line 650) | function r(){}
  function Iu (line 669) | function Iu(r,e){ds(r,e);function t(){this.constructor=r}r.prototype=e==...
  function e (line 669) | function e(t,i,n,s){t===void 0&&(t=1500),n===void 0&&(n=16384),s===void ...
  function r (line 669) | function r(e,t,i){this.geometry=new yr,this.indexBuffer=null,this.size=i...
  function e (line 702) | function e(t){var i=r.call(this,t)||this;return i.shader=null,i.properti...
  function r (line 708) | function r(){this.color=16777215,this.alpha=1,this.texture=N.WHITE,this....
  function wa (line 721) | function wa(r,e){ps(r,e);function t(){this.constructor=r}r.prototype=e==...
  function ko (line 721) | function ko(r,e){var t,i;e===void 0&&(e=!1);var n=r.length;if(!(n<6)){fo...
  function sr (line 721) | function sr(r,e,t){var i=e-r;return r+i*t}
  function Mi (line 721) | function Mi(r,e,t,i,n,s,a){a===void 0&&(a=[]);for(var o=20,h=a,u=0,l=0,c...
  function Go (line 721) | function Go(r,e,t,i,n,s,a,o){var h=r-t*n,u=e-i*n,l=r+t*s,c=e+i*s,f,d;a?(...
  function Fe (line 721) | function Fe(r,e,t,i,n,s,a,o){var h=t-r,u=i-e,l=Math.atan2(h,u),c=Math.at...
  function h_ (line 721) | function h_(r,e){var t=r.shape,i=r.points||t.points.slice(),n=e.closePoi...
  function u_ (line 721) | function u_(r,e){var t=0,i=r.shape,n=r.points||i.points,s=i.type!==Tt.PO...
  function vs (line 721) | function vs(r,e){r.lineStyle.native?u_(r,e):h_(r,e)}
  function r (line 721) | function r(){}
  function r (line 721) | function r(){}
  function r (line 721) | function r(){}
  function r (line 721) | function r(){this.reset()}
  function r (line 721) | function r(e,t,i,n){t===void 0&&(t=null),i===void 0&&(i=null),n===void 0...
  function e (line 721) | function e(){var t=r.call(this)||this;return t.closePointEps=1e-4,t.boun...
  function e (line 721) | function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.widt...
  function e (line 721) | function e(t){t===void 0&&(t=null);var i=r.call(this)||this;return i.sha...
  function c_ (line 740) | function c_(r,e){ys(r,e);function t(){this.constructor=r}r.prototype=e==...
  function e (line 740) | function e(t){var i=r.call(this)||this;return i._anchor=new Se(i._onAnch...
  function p_ (line 759) | function p_(r,e){xs(r,e);function t(){this.constructor=r}r.prototype=e==...
  function r (line 759) | function r(e){this.styleID=0,this.reset(),Ln(this,e,e)}
  function Xo (line 759) | function Xo(r){return typeof r=="number"?js(r):(typeof r=="string"&&r.in...
  function Fn (line 759) | function Fn(r){if(Array.isArray(r)){for(var e=0;e<r.length;++e)r[e]=Xo(r...
  function __ (line 759) | function __(r,e){if(!Array.isArray(r)||!Array.isArray(e)||r.length!==e.l...
  function Ln (line 759) | function Ln(r,e,t){for(var i in t)Array.isArray(e[i])?r[i]=e[i].slice():...
  function r (line 759) | function r(e,t,i,n,s,a,o,h,u){this.text=e,this.style=t,this.width=i,this...
  function e (line 760) | function e(t,i,n){var s=this,a=!1;n||(n=A.ADAPTER.createCanvas(),a=!0),n...
  function m_ (line 779) | function m_(r,e){bs(r,e);function t(){this.constructor=r}r.prototype=e==...
  function r (line 779) | function r(e){this.maxItemsPerFrame=e,this.itemsLeft=0}
  function y_ (line 779) | function y_(r,e){var t=!1;if(r&&r._textures&&r._textures.length){for(var...
  function x_ (line 779) | function x_(r,e){if(r.baseTexture instanceof V){var t=r.baseTexture;retu...
  function b_ (line 779) | function b_(r,e){if(r._texture&&r._texture instanceof N){var t=r._textur...
  function T_ (line 779) | function T_(r,e){return e instanceof Ia?(e.updateText(!0),!0):!1}
  function E_ (line 779) | function E_(r,e){if(e instanceof Je){var t=e.toFontString();return ee.me...
  function S_ (line 779) | function S_(r,e){if(r instanceof Ia){e.indexOf(r.style)===-1&&e.push(r.s...
  function P_ (line 779) | function P_(r,e){return r instanceof Je?(e.indexOf(r)===-1&&e.push(r),!0...
  function r (line 779) | function r(e){var t=this;this.limiter=new Nu(A.UPLOADS_PER_FRAME),this.r...
  function ku (line 779) | function ku(r,e){return e instanceof V?(e._glTextures[r.CONTEXT_UID]||r....
  function w_ (line 779) | function w_(r,e){if(!(e instanceof ri))return!1;var t=e.geometry;e.finis...
  function C_ (line 779) | function C_(r,e){return r instanceof ri?(e.push(r),!0):!1}
  function e (line 779) | function e(t){var i=r.call(this,t)||this;return i.uploadHookHelper=i.ren...
  function r (line 779) | function r(e){this.maxMilliseconds=e,this.frameStart=0}
  function r (line 785) | function r(e,t,i){i===void 0&&(i=null),this.linkedSheets=[],this._textur...
  function r (line 785) | function r(){}
  function Vu (line 804) | function Vu(r,e){Ts(r,e);function t(){this.constructor=r}r.prototype=e==...
  function e (line 804) | function e(t,i,n){i===void 0&&(i=100),n===void 0&&(n=100);var s=r.call(t...
  function e (line 918) | function e(t){var i=r.call(this,t)||this;return t.runners.contextChange....
  function Ma (line 937) | function Ma(r,e){Es(r,e);function t(){this.constructor=r}r.prototype=e==...
  function r (line 937) | function r(e,t){this.uvBuffer=e,this.uvMatrix=t,this.data=null,this._buf...
  function e (line 937) | function e(t,i,n,s){s===void 0&&(s=Xt.TRIANGLES);var a=r.call(this)||thi...
  function e (line 961) | function e(t,i){var n=this,s={uSampler:t,alpha:1,uTextureMatrix:lt.IDENT...
  function e (line 961) | function e(t,i,n){var s=r.call(this)||this,a=new xt(t),o=new xt(i,!0),h=...
  function B_ (line 980) | function B_(r,e){Ss(r,e);function t(){this.constructor=r}r.prototype=e==...
  function r (line 980) | function r(){this.info=[],this.common=[],this.page=[],this.char=[],this....
  function r (line 980) | function r(){}
  function r (line 980) | function r(){}
  function r (line 980) | function r(){}
  function Aa (line 980) | function Aa(r){for(var e=0;e<Nn.length;e++)if(Nn[e].test(r))return Nn[e]...
  function N_ (line 980) | function N_(r,e,t,i,n,s){var a=t.fill;if(Array.isArray(a)){if(a.length==...
  function U_ (line 980) | function U_(r,e,t,i,n,s,a){var o=t.text,h=t.fontProperties;e.translate(i...
  function qu (line 980) | function qu(r){return Array.from?Array.from(r):r.split("")}
  function k_ (line 980) | function k_(r){typeof r=="string"&&(r=[r]);for(var e=[],t=0,i=r.length;t...
  function Ui (line 980) | function Ui(r){return r.codePointAt?r.codePointAt(0):r.charCodeAt(0)}
  function r (line 980) | function r(e,t,i){var n,s,a=e.info[0],o=e.common[0],h=e.page[0],u=e.dist...
  function e (line 1030) | function e(t,i){i===void 0&&(i={});var n=r.call(this)||this;n._tint=1677...
  function r (line 1033) | function r(){}
  function V_ (line 1052) | function V_(r,e){Ps(r,e);function t(){this.constructor=r}r.prototype=e==...
  function e (line 1061) | function e(t){t===void 0&&(t=1);var i=r.call(this,iu,j_,{uAlpha:1})||thi...
  function Zu (line 1080) | function Zu(r,e){ws(r,e);function t(){this.constructor=r}r.prototype=e==...
  function W_ (line 1110) | function W_(r,e){var t=Math.ceil(r/2),i=Y_,n="",s;e?s="vBlurTexCoords[%i...
  function Z_ (line 1112) | function Z_(r){for(var e=q_[r],t=e.length,i=$_,n="",s="gl_FragColor += t...
  function e (line 1113) | function e(t,i,n,s,a){i===void 0&&(i=8),n===void 0&&(n=4),s===void 0&&(s...
  function e (line 1113) | function e(t,i,n,s){t===void 0&&(t=8),i===void 0&&(i=4),n===void 0&&(n=A...
  function J_ (line 1132) | function J_(r,e){Is(r,e);function t(){this.constructor=r}r.prototype=e==...
  function e (line 1184) | function e(){var t=this,i={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1...
  function tg (line 1203) | function tg(r,e){As(r,e);function t(){this.constructor=r}r.prototype=e==...
  function e (line 1252) | function e(t,i){var n=this,s=new lt;return t.renderable=!1,n=r.call(this...
  function ng (line 1271) | function ng(r,e){Rs(r,e);function t(){this.constructor=r}r.prototype=e==...
  function e (line 1434) | function e(){return r.call(this,sg,ag)||this}
  function hg (line 1453) | function hg(r,e){Os(r,e);function t(){this.constructor=r}r.prototype=e==...
  function e (line 1487) | function e(t,i){t===void 0&&(t=.5),i===void 0&&(i=Math.random());var n=r...
  function r (line 1493) | function r(){this.textureCacheId=null,this.originalRender=null,this.orig...
  function r (line 1511) | function r(){}
  function r (line 1511) | function r(e){var t=this;this.stage=new Yt,e=Object.assign({forceCanvas:...
  function br (line 1530) | function br(r,e){Ds(r,e);function t(){this.constructor=r}r.prototype=e==...
  function e (line 1530) | function e(t,i,n,s){t===void 0&&(t=100),i===void 0&&(i=100),n===void 0&&...
  function e (line 1530) | function e(t,i,n){t===void 0&&(t=200),n===void 0&&(n=0);var s=r.call(thi...
  function e (line 1530) | function e(t,i,n){n===void 0&&(n=0);var s=this,a=new tl(t.height,i,n),o=...
  function e (line 1530) | function e(t,i,n){var s=this,a=new Qu(t.width,t.height,i,n),o=new mr(N.W...
  function e (line 1530) | function e(t,i,n,s,a){t===void 0&&(t=N.EMPTY);var o=this,h=new oi(i,n,s)...
  function e (line 1530) | function e(t,i,n,s,a){i===void 0&&(i=Oi),n===void 0&&(n=Oi),s===void 0&&...
  function vg (line 1549) | function vg(r,e){Fs(r,e);function t(){this.constructor=r}r.prototype=e==...
  function e (line 1549) | function e(t,i){i===void 0&&(i=!0);var n=r.call(this,t[0]instanceof N?t[...
  method ALPHA_MODES (line 1555) | get ALPHA_MODES(){return zt}
  method BLEND_MODES (line 1555) | get BLEND_MODES(){return L}
  method BUFFER_BITS (line 1555) | get BUFFER_BITS(){return Xr}
  method BUFFER_TYPE (line 1555) | get BUFFER_TYPE(){return Qt}
  method CLEAR_MODES (line 1555) | get CLEAR_MODES(){return kt}
  method COLOR_MASK_BITS (line 1555) | get COLOR_MASK_BITS(){return jn}
  method DRAW_MODES (line 1555) | get DRAW_MODES(){return Xt}
  method ENV (line 1555) | get ENV(){return ue}
  method ExtensionType (line 1555) | get ExtensionType(){return K}
  method FORMATS (line 1555) | get FORMATS(){return C}
  method GC_MODES (line 1555) | get GC_MODES(){return Vr}
  method INTERNAL_FORMATS (line 1555) | get INTERNAL_FORMATS(){return k}
  method LINE_CAP (line 1555) | get LINE_CAP(){return ge}
  method LINE_JOIN (line 1555) | get LINE_JOIN(){return oe}
  method LoaderResource (line 1555) | get LoaderResource(){return dt}
  method MASK_TYPES (line 1555) | get MASK_TYPES(){return yt}
  method MIPMAP_MODES (line 1555) | get MIPMAP_MODES(){return jt}
  method MSAA_QUALITY (line 1555) | get MSAA_QUALITY(){return st}
  method PRECISION (line 1555) | get PRECISION(){return Ft}
  method RENDERER_TYPE (line 1555) | get RENDERER_TYPE(){return pr}
  method SAMPLER_TYPES (line 1555) | get SAMPLER_TYPES(){return Hr}
  method SCALE_MODES (line 1555) | get SCALE_MODES(){return Kt}
  method SHAPES (line 1555) | get SHAPES(){return Tt}
  method TARGETS (line 1555) | get TARGETS(){return Pe}
  method TEXT_GRADIENT (line 1555) | get TEXT_GRADIENT(){return _r}
  method TYPES (line 1555) | get TYPES(){return F}
  method UPDATE_PRIORITY (line 1555) | get UPDATE_PRIORITY(){return le}
  method WRAP_MODES (line 1555) | get WRAP_MODES(){return Jt}
  class Oa (line 1555) | class Oa{constructor(){this._breathParameters=[],this._currentTime=0}sta...
    method constructor (line 1555) | constructor(){this._breathParameters=[],this._currentTime=0}
    method create (line 1555) | static create(){return new Oa}
    method setParameters (line 1555) | setParameters(e){this._breathParameters=e}
    method getParameters (line 1555) | getParameters(){return this._breathParameters}
    method updateParameters (line 1555) | updateParameters(e,t){this._currentTime+=t;const i=this._currentTime*2...
  class Ar (line 1555) | class Ar{constructor(e,t,i,n,s){this.parameterId=e??void 0,this.offset=t...
    method constructor (line 1555) | constructor(e,t,i,n,s){this.parameterId=e??void 0,this.offset=t??0,thi...
  method create (line 1555) | static create(r){return new Ls(r)}
  method setBlinkingInterval (line 1555) | setBlinkingInterval(r){this._blinkingIntervalSeconds=r}
  method setBlinkingSetting (line 1555) | setBlinkingSetting(r,e,t){this._closingSeconds=r,this._closedSeconds=e,t...
  method setParameterIds (line 1555) | setParameterIds(r){this._parameterIds=r}
  method getParameterIds (line 1555) | getParameterIds(){return this._parameterIds}
  method updateParameters (line 1555) | updateParameters(r,e){this._userTimeSeconds+=e;let t,i=0;switch(this._bl...
  method constructor (line 1555) | constructor(r){var e,t;this._blinkingState=Nt.EyeState_First,this._nextB...
  method determinNextBlinkingTiming (line 1555) | determinNextBlinkingTiming(){const r=Math.random();return this._userTime...
  class Da (line 1555) | class Da{static create(e){const t=new Da;typeof e.FadeInTime=="number"&&...
    method create (line 1555) | static create(e){const t=new Da;typeof e.FadeInTime=="number"&&(t._fad...
    method updateParameters (line 1555) | updateParameters(e,t){e!=this._lastModel&&this.reset(e),this._lastMode...
    method reset (line 1555) | reset(e){let t=0;for(let i=0;i<this._partGroupCounts.length;++i){const...
    method copyPartOpacities (line 1555) | copyPartOpacities(e){for(let t=0;t<this._partGroups.length;++t){const ...
    method doFade (line 1555) | doFade(e,t,i,n){let s=-1,a=1;const o=.5,h=.15;for(let u=i;u<i+n;++u){c...
    method constructor (line 1555) | constructor(){this._fadeTimeSeconds=Wo,this._lastModel=void 0,this._pa...
  class Wi (line 1555) | class Wi{constructor(e){this.parameterIndex=0,this.partIndex=0,this.part...
    method constructor (line 1555) | constructor(e){this.parameterIndex=0,this.partIndex=0,this.partId="",t...
    method assignment (line 1555) | assignment(e){return this.partId=e.partId,this.link=e.link.map(t=>t.cl...
    method initialize (line 1555) | initialize(e){this.parameterIndex=e.getParameterIndex(this.partId),thi...
    method clone (line 1555) | clone(){const e=new Wi;return e.partId=this.partId,e.parameterIndex=th...
  class U (line 1555) | class U{constructor(e,t){this.x=e||0,this.y=t||0}add(e){const t=new U(0,...
    method constructor (line 1555) | constructor(e,t){this.x=e||0,this.y=t||0}
    method add (line 1555) | add(e){const t=new U(0,0);return t.x=this.x+e.x,t.y=this.y+e.y,t}
    method substract (line 1555) | substract(e){const t=new U(0,0);return t.x=this.x-e.x,t.y=this.y-e.y,t}
    method multiply (line 1555) | multiply(e){const t=new U(0,0);return t.x=this.x*e.x,t.y=this.y*e.y,t}
    method multiplyByScaler (line 1555) | multiplyByScaler(e){return this.multiply(new U(e,e))}
    method division (line 1555) | division(e){const t=new U(0,0);return t.x=this.x/e.x,t.y=this.y/e.y,t}
    method divisionByScalar (line 1555) | divisionByScalar(e){return this.division(new U(e,e))}
    method getLength (line 1555) | getLength(){return Math.sqrt(this.x*this.x+this.y*this.y)}
    method getDistanceWith (line 1555) | getDistanceWith(e){return Math.sqrt((this.x-e.x)*(this.x-e.x)+(this.y-...
    method dot (line 1555) | dot(e){return this.x*e.x+this.y*e.y}
    method normalize (line 1555) | normalize(){const e=Math.pow(this.x*this.x+this.y*this.y,.5);this.x=th...
    method isEqual (line 1555) | isEqual(e){return this.x==e.x&&this.y==e.y}
    method isNotEqual (line 1555) | isNotEqual(e){return!this.isEqual(e)}
  method range (line 1555) | static range(r,e,t){return r<e?r=e:r>t&&(r=t),r}
  method sin (line 1555) | static sin(r){return Math.sin(r)}
  method cos (line 1555) | static cos(r){return Math.cos(r)}
  method abs (line 1555) | static abs(r){return Math.abs(r)}
  method sqrt (line 1555) | static sqrt(r){return Math.sqrt(r)}
  method cbrt (line 1555) | static cbrt(r){if(r===0)return r;let e=r;const t=e<0;t&&(e=-e);let i;ret...
  method getEasingSine (line 1555) | static getEasingSine(r){return r<0?0:r>1?1:.5-.5*this.cos(r*Math.PI)}
  method max (line 1555) | static max(r,e){return r>e?r:e}
  method min (line 1555) | static min(r,e){return r>e?e:r}
  method degreesToRadian (line 1555) | static degreesToRadian(r){return r/180*Math.PI}
  method radianToDegrees (line 1555) | static radianToDegrees(r){return r*180/Math.PI}
  method directionToRadian (line 1555) | static directionToRadian(r,e){const t=Math.atan2(e.y,e.x),i=Math.atan2(r...
  method directionToDegrees (line 1555) | static directionToDegrees(r,e){const t=this.directionToRadian(r,e);let i...
  method radianToDirection (line 1555) | static radianToDirection(r){const e=new U;return e.x=this.sin(r),e.y=thi...
  method quadraticEquation (line 1555) | static quadraticEquation(r,e,t){return this.abs(r)<ki.Epsilon?this.abs(e...
  method cardanoAlgorithmForBezier (line 1555) | static cardanoAlgorithmForBezier(r,e,t,i){if(this.sqrt(r)<ki.Epsilon)ret...
  method constructor (line 1555) | constructor(){}
  class Vt (line 1555) | class Vt{constructor(){this._tr=new Float32Array(16),this.loadIdentity()...
    method constructor (line 1555) | constructor(){this._tr=new Float32Array(16),this.loadIdentity()}
    method multiply (line 1555) | static multiply(e,t,i){const n=new Float32Array([0,0,0,0,0,0,0,0,0,0,0...
    method loadIdentity (line 1555) | loadIdentity(){const e=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0...
    method setMatrix (line 1555) | setMatrix(e){for(let t=0;t<16;++t)this._tr[t]=e[t]}
    method getArray (line 1555) | getArray(){return this._tr}
    method getScaleX (line 1555) | getScaleX(){return this._tr[0]}
    method getScaleY (line 1555) | getScaleY(){return this._tr[5]}
    method getTranslateX (line 1555) | getTranslateX(){return this._tr[12]}
    method getTranslateY (line 1555) | getTranslateY(){return this._tr[13]}
    method transformX (line 1555) | transformX(e){return this._tr[0]*e+this._tr[12]}
    method transformY (line 1555) | transformY(e){return this._tr[5]*e+this._tr[13]}
    method invertTransformX (line 1555) | invertTransformX(e){return(e-this._tr[12])/this._tr[0]}
    method invertTransformY (line 1555) | invertTransformY(e){return(e-this._tr[13])/this._tr[5]}
    method translateRelative (line 1555) | translateRelative(e,t){const i=new Float32Array([1,0,0,0,0,1,0,0,0,0,1...
    method translate (line 1555) | translate(e,t){this._tr[12]=e,this._tr[13]=t}
    method translateX (line 1555) | translateX(e){this._tr[12]=e}
    method translateY (line 1555) | translateY(e){this._tr[13]=e}
    method scaleRelative (line 1555) | scaleRelative(e,t){const i=new Float32Array([e,0,0,0,0,t,0,0,0,0,1,0,0...
    method scale (line 1555) | scale(e,t){this._tr[0]=e,this._tr[5]=t}
    method multiplyByMatrix (line 1555) | multiplyByMatrix(e){Vt.multiply(e.getArray(),this._tr,this._tr)}
    method clone (line 1555) | clone(){const e=new Vt;for(let t=0;t<this._tr.length;t++)e._tr[t]=this...
  class Fa (line 1555) | class Fa{initialize(e){this._model=e}drawModel(){this.getModel()!=null&&...
    method initialize (line 1555) | initialize(e){this._model=e}
    method drawModel (line 1555) | drawModel(){this.getModel()!=null&&this.doDrawModel()}
    method setMvpMatrix (line 1555) | setMvpMatrix(e){this._mvpMatrix4x4.setMatrix(e.getArray())}
    method getMvpMatrix (line 1555) | getMvpMatrix(){return this._mvpMatrix4x4}
    method setModelColor (line 1555) | setModelColor(e,t,i,n){e<0?e=0:e>1&&(e=1),t<0?t=0:t>1&&(t=1),i<0?i=0:i...
    method getModelColor (line 1555) | getModelColor(){return Object.assign({},this._modelColor)}
    method setIsPremultipliedAlpha (line 1555) | setIsPremultipliedAlpha(e){this._isPremultipliedAlpha=e}
    method isPremultipliedAlpha (line 1555) | isPremultipliedAlpha(){return this._isPremultipliedAlpha}
    method setIsCulling (line 1555) | setIsCulling(e){this._isCulling=e}
    method isCulling (line 1555) | isCulling(){return this._isCulling}
    method setAnisotropy (line 1555) | setAnisotropy(e){this._anisortopy=e}
    method getAnisotropy (line 1555) | getAnisotropy(){return this._anisortopy}
    method getModel (line 1555) | getModel(){return this._model}
    method constructor (line 1555) | constructor(){this._isCulling=!1,this._isPremultipliedAlpha=!1,this._a...
  class Dr (line 1555) | class Dr{constructor(){this.R=1,this.G=1,this.B=1,this.A=1}}
    method constructor (line 1555) | constructor(){this.R=1,this.G=1,this.B=1,this.A=1}
  class ni (line 1555) | class ni{static startUp(e){if(ie)return Rr("CubismFramework.startUp() is...
    method startUp (line 1555) | static startUp(e){if(ie)return Rr("CubismFramework.startUp() is alread...
    method cleanUp (line 1555) | static cleanUp(){ie=!1,or=!1,hr=void 0}
    method initialize (line 1555) | static initialize(){if(!ie){Fr("CubismFramework is not started.");retu...
    method dispose (line 1555) | static dispose(){if(!ie){Fr("CubismFramework is not started.");return}...
    method isStarted (line 1555) | static isStarted(){return ie}
    method isInitialized (line 1555) | static isInitialized(){return or}
    method coreLogFunction (line 1555) | static coreLogFunction(e){Live2DCubismCore.Logging.csmGetLogFunction()...
    method getLoggingLevel (line 1555) | static getLoggingLevel(){return hr!=null?hr.loggingLevel:er.LogLevel_Off}
    method constructor (line 1555) | constructor(){}
  function qo (line 1555) | function qo(r,...e){sn.print(er.LogLevel_Debug,"[CSM][D]"+r+`
  function Rr (line 1556) | function Rr(r,...e){sn.print(er.LogLevel_Info,"[CSM][I]"+r+`
  function Fr (line 1557) | function Fr(r,...e){sn.print(er.LogLevel_Warning,"[CSM][W]"+r+`
  function ur (line 1558) | function ur(r,...e){sn.print(er.LogLevel_Error,"[CSM][E]"+r+`
  class sn (line 1559) | class sn{static print(e,t,i){if(e<ni.getLoggingLevel())return;const n=ni...
    method print (line 1559) | static print(e,t,i){if(e<ni.getLoggingLevel())return;const n=ni.coreLo...
    method dumpBytes (line 1559) | static dumpBytes(e,t,i){for(let n=0;n<i;n++)n%16==0&&n>0?this.print(e,`
    method constructor (line 1561) | constructor(){}
  class xg (line 1561) | class xg{update(){this._model.update(),this._model.drawables.resetDynami...
    method update (line 1561) | update(){this._model.update(),this._model.drawables.resetDynamicFlags()}
    method getCanvasWidth (line 1561) | getCanvasWidth(){return this._model==null?0:this._model.canvasinfo.Can...
    method getCanvasHeight (line 1561) | getCanvasHeight(){return this._model==null?0:this._model.canvasinfo.Ca...
    method saveParameters (line 1561) | saveParameters(){const e=this._model.parameters.count,t=this._savedPar...
    method getModel (line 1561) | getModel(){return this._model}
    method getPartIndex (line 1561) | getPartIndex(e){let t;const i=this._model.parts.count;for(t=0;t<i;++t)...
    method getPartCount (line 1561) | getPartCount(){return this._model.parts.count}
    method setPartOpacityByIndex (line 1561) | setPartOpacityByIndex(e,t){if(e in this._notExistPartOpacities){this._...
    method setPartOpacityById (line 1561) | setPartOpacityById(e,t){const i=this.getPartIndex(e);i<0||this.setPart...
    method getPartOpacityByIndex (line 1561) | getPartOpacityByIndex(e){return e in this._notExistPartOpacities?this....
    method getPartOpacityById (line 1561) | getPartOpacityById(e){const t=this.getPartIndex(e);return t<0?0:this.g...
    method getParameterIndex (line 1561) | getParameterIndex(e){let t;const i=this._model.parameters.count;for(t=...
    method getParameterCount (line 1561) | getParameterCount(){return this._model.parameters.count}
    method getParameterMaximumValue (line 1561) | getParameterMaximumValue(e){return this._model.parameters.maximumValue...
    method getParameterMinimumValue (line 1561) | getParameterMinimumValue(e){return this._model.parameters.minimumValue...
    method getParameterDefaultValue (line 1561) | getParameterDefaultValue(e){return this._model.parameters.defaultValue...
    method getParameterValueByIndex (line 1561) | getParameterValueByIndex(e){return e in this._notExistParameterValues?...
    method getParameterValueById (line 1561) | getParameterValueById(e){const t=this.getParameterIndex(e);return this...
    method setParameterValueByIndex (line 1561) | setParameterValueByIndex(e,t,i=1){if(e in this._notExistParameterValue...
    method setParameterValueById (line 1561) | setParameterValueById(e,t,i=1){const n=this.getParameterIndex(e);this....
    method addParameterValueByIndex (line 1561) | addParameterValueByIndex(e,t,i=1){this.setParameterValueByIndex(e,this...
    method addParameterValueById (line 1561) | addParameterValueById(e,t,i=1){const n=this.getParameterIndex(e);this....
    method multiplyParameterValueById (line 1561) | multiplyParameterValueById(e,t,i=1){const n=this.getParameterIndex(e);...
    method multiplyParameterValueByIndex (line 1561) | multiplyParameterValueByIndex(e,t,i=1){this.setParameterValueByIndex(e...
    method getDrawableIds (line 1561) | getDrawableIds(){return this._drawableIds.slice()}
    method getDrawableIndex (line 1561) | getDrawableIndex(e){const t=this._model.drawables.count;for(let i=0;i<...
    method getDrawableCount (line 1561) | getDrawableCount(){return this._model.drawables.count}
    method getDrawableId (line 1561) | getDrawableId(e){return this._model.drawables.ids[e]}
    method getDrawableRenderOrders (line 1561) | getDrawableRenderOrders(){return this._model.drawables.renderOrders}
    method getDrawableTextureIndices (line 1561) | getDrawableTextureIndices(e){return this._model.drawables.textureIndic...
    method getDrawableDynamicFlagVertexPositionsDidChange (line 1561) | getDrawableDynamicFlagVertexPositionsDidChange(e){const t=this._model....
    method getDrawableVertexIndexCount (line 1561) | getDrawableVertexIndexCount(e){return this._model.drawables.indexCount...
    method getDrawableVertexCount (line 1561) | getDrawableVertexCount(e){return this._model.drawables.vertexCounts[e]}
    method getDrawableVertices (line 1561) | getDrawableVertices(e){return this.getDrawableVertexPositions(e)}
    method getDrawableVertexIndices (line 1561) | getDrawableVertexIndices(e){return this._model.drawables.indices[e]}
    method getDrawableVertexPositions (line 1561) | getDrawableVertexPositions(e){return this._model.drawables.vertexPosit...
    method getDrawableVertexUvs (line 1561) | getDrawableVertexUvs(e){return this._model.drawables.vertexUvs[e]}
    method getDrawableOpacity (line 1561) | getDrawableOpacity(e){return this._model.drawables.opacities[e]}
    method getDrawableCulling (line 1561) | getDrawableCulling(e){const t=this._model.drawables.constantFlags;retu...
    method getDrawableBlendMode (line 1561) | getDrawableBlendMode(e){const t=this._model.drawables.constantFlags;re...
    method getDrawableInvertedMaskBit (line 1561) | getDrawableInvertedMaskBit(e){const t=this._model.drawables.constantFl...
    method getDrawableMasks (line 1561) | getDrawableMasks(){return this._model.drawables.masks}
    method getDrawableMaskCounts (line 1561) | getDrawableMaskCounts(){return this._model.drawables.maskCounts}
    method isUsingMasking (line 1561) | isUsingMasking(){for(let e=0;e<this._model.drawables.count;++e)if(!(th...
    method getDrawableDynamicFlagIsVisible (line 1561) | getDrawableDynamicFlagIsVisible(e){const t=this._model.drawables.dynam...
    method getDrawableDynamicFlagVisibilityDidChange (line 1561) | getDrawableDynamicFlagVisibilityDidChange(e){const t=this._model.drawa...
    method getDrawableDynamicFlagOpacityDidChange (line 1561) | getDrawableDynamicFlagOpacityDidChange(e){const t=this._model.drawable...
    method getDrawableDynamicFlagRenderOrderDidChange (line 1561) | getDrawableDynamicFlagRenderOrderDidChange(e){const t=this._model.draw...
    method loadParameters (line 1561) | loadParameters(){let e=this._model.parameters.count;const t=this._save...
    method initialize (line 1561) | initialize(){this._parameterValues=this._model.parameters.values,this....
    method constructor (line 1561) | constructor(e){this._model=e,this._savedParameters=[],this._parameterI...
    method release (line 1561) | release(){this._model.release(),this._model=void 0}
  class La (line 1561) | class La{static create(e){const t=Live2DCubismCore.Moc.fromArrayBuffer(e...
    method create (line 1561) | static create(e){const t=Live2DCubismCore.Moc.fromArrayBuffer(e);if(t)...
    method createModel (line 1561) | createModel(){let e;const t=Live2DCubismCore.Model.fromMoc(this._moc);...
    method deleteModel (line 1561) | deleteModel(e){e!=null&&--this._modelCount}
    method constructor (line 1561) | constructor(e){this._moc=e,this._modelCount=0}
    method release (line 1561) | release(){this._moc._release(),this._moc=void 0}
  class il (line 1561) | class il{constructor(){this._fadeInSeconds=-1,this._fadeOutSeconds=-1,th...
    method constructor (line 1561) | constructor(){this._fadeInSeconds=-1,this._fadeOutSeconds=-1,this._wei...
    method release (line 1561) | release(){this._weight=0}
    method updateParameters (line 1561) | updateParameters(e,t,i){if(!t.isAvailable()||t.isFinished())return;if(...
    method setFadeInTime (line 1561) | setFadeInTime(e){this._fadeInSeconds=e}
    method setFadeOutTime (line 1561) | setFadeOutTime(e){this._fadeOutSeconds=e}
    method getFadeOutTime (line 1561) | getFadeOutTime(){return this._fadeOutSeconds}
    method getFadeInTime (line 1561) | getFadeInTime(){return this._fadeInSeconds}
    method setWeight (line 1561) | setWeight(e){this._weight=e}
    method getWeight (line 1561) | getWeight(){return this._weight}
    method getDuration (line 1561) | getDuration(){return-1}
    method getLoopDuration (line 1561) | getLoopDuration(){return-1}
    method setOffsetTime (line 1561) | setOffsetTime(e){this._offsetSeconds=e}
    method getFiredEvent (line 1561) | getFiredEvent(e,t){return this._firedEventValues}
    method setFinishedMotionHandler (line 1561) | setFinishedMotionHandler(e){this._onFinishedMotion=e}
    method getFinishedMotionHandler (line 1561) | getFinishedMotionHandler(){return this._onFinishedMotion}
  class Ba (line 1561) | class Ba extends il{constructor(){super(),this._parameters=[]}static cre...
    method constructor (line 1561) | constructor(){super(),this._parameters=[]}
    method create (line 1561) | static create(e){const t=new Ba,i=e.FadeInTime,n=e.FadeOutTime;t.setFa...
    method doUpdateParameters (line 1561) | doUpdateParameters(e,t,i,n){for(let s=0;s<this._parameters.length;++s)...
  class Ee (line 1561) | class Ee{constructor(e=0,t=0){this.time=e,this.value=t}}
    method constructor (line 1561) | constructor(e=0,t=0){this.time=e,this.value=t}
  class bg (line 1561) | class bg{constructor(){this.basePointIndex=0,this.segmentType=0}}
    method constructor (line 1561) | constructor(){this.basePointIndex=0,this.segmentType=0}
  class Tg (line 1561) | class Tg{constructor(){this.id="",this.type=0,this.segmentCount=0,this.b...
    method constructor (line 1561) | constructor(){this.id="",this.type=0,this.segmentCount=0,this.baseSegm...
  class Eg (line 1561) | class Eg{constructor(){this.fireTime=0,this.value=""}}
    method constructor (line 1561) | constructor(){this.fireTime=0,this.value=""}
  class Sg (line 1561) | class Sg{constructor(){this.duration=0,this.loop=!1,this.curveCount=0,th...
    method constructor (line 1561) | constructor(){this.duration=0,this.loop=!1,this.curveCount=0,this.even...
  class nl (line 1561) | class nl{constructor(e){this._json=e}release(){this._json=void 0}getMoti...
    method constructor (line 1561) | constructor(e){this._json=e}
    method release (line 1561) | release(){this._json=void 0}
    method getMotionDuration (line 1561) | getMotionDuration(){return this._json.Meta.Duration}
    method isMotionLoop (line 1561) | isMotionLoop(){return this._json.Meta.Loop||!1}
    method getEvaluationOptionFlag (line 1561) | getEvaluationOptionFlag(e){return Na.EvaluationOptionFlag_AreBeziersRi...
    method getMotionCurveCount (line 1561) | getMotionCurveCount(){return this._json.Meta.CurveCount}
    method getMotionFps (line 1561) | getMotionFps(){return this._json.Meta.Fps}
    method getMotionTotalSegmentCount (line 1561) | getMotionTotalSegmentCount(){return this._json.Meta.TotalSegmentCount}
    method getMotionTotalPointCount (line 1561) | getMotionTotalPointCount(){return this._json.Meta.TotalPointCount}
    method getMotionFadeInTime (line 1561) | getMotionFadeInTime(){return this._json.Meta.FadeInTime}
    method getMotionFadeOutTime (line 1561) | getMotionFadeOutTime(){return this._json.Meta.FadeOutTime}
    method getMotionCurveTarget (line 1561) | getMotionCurveTarget(e){return this._json.Curves[e].Target}
    method getMotionCurveId (line 1561) | getMotionCurveId(e){return this._json.Curves[e].Id}
    method getMotionCurveFadeInTime (line 1561) | getMotionCurveFadeInTime(e){return this._json.Curves[e].FadeInTime}
    method getMotionCurveFadeOutTime (line 1561) | getMotionCurveFadeOutTime(e){return this._json.Curves[e].FadeOutTime}
    method getMotionCurveSegmentCount (line 1561) | getMotionCurveSegmentCount(e){return this._json.Curves[e].Segments.len...
    method getMotionCurveSegment (line 1561) | getMotionCurveSegment(e,t){return this._json.Curves[e].Segments[t]}
    method getEventCount (line 1561) | getEventCount(){return this._json.Meta.UserDataCount||0}
    method getTotalEventValueSize (line 1561) | getTotalEventValueSize(){return this._json.Meta.TotalUserDataSize}
    method getEventTime (line 1561) | getEventTime(e){return this._json.UserData[e].Time}
    method getEventValue (line 1561) | getEventValue(e){return this._json.UserData[e].Value}
  function Gt (line 1561) | function Gt(r,e,t){const i=new Ee;return i.time=r.time+(e.time-r.time)*t...
  function Rg (line 1561) | function Rg(r,e){let t=(e-r[0].time)/(r[1].time-r[0].time);return t<0&&(...
  function Og (line 1561) | function Og(r,e){let t=(e-r[0].time)/(r[3].time-r[0].time);t<0&&(t=0);co...
  function Dg (line 1561) | function Dg(r,e){const t=e,i=r[0].time,n=r[3].time,s=r[1].time,a=r[2].ti...
  function Fg (line 1561) | function Fg(r,e){return r[0].value}
  function Lg (line 1561) | function Lg(r,e){return r[1].value}
  function kn (line 1561) | function kn(r,e,t){const i=r.curves[e];let n=-1;const s=i.baseSegmentInd...
  class Ua (line 1561) | class Ua extends il{constructor(){super(),this._eyeBlinkParameterIds=[],...
    method constructor (line 1561) | constructor(){super(),this._eyeBlinkParameterIds=[],this._lipSyncParam...
    method create (line 1561) | static create(e,t){const i=new Ua;return i.parse(e),i._sourceFrameRate...
    method doUpdateParameters (line 1561) | doUpdateParameters(e,t,i,n){this._modelCurveIdEyeBlink==null&&(this._m...
    method setIsLoop (line 1561) | setIsLoop(e){this._isLoop=e}
    method isLoop (line 1561) | isLoop(){return this._isLoop}
    method setIsLoopFadeIn (line 1561) | setIsLoopFadeIn(e){this._isLoopFadeIn=e}
    method isLoopFadeIn (line 1561) | isLoopFadeIn(){return this._isLoopFadeIn}
    method getDuration (line 1561) | getDuration(){return this._isLoop?-1:this._loopDurationSeconds}
    method getLoopDuration (line 1561) | getLoopDuration(){return this._loopDurationSeconds}
    method setParameterFadeInTime (line 1561) | setParameterFadeInTime(e,t){const i=this._motionData.curves;for(let n=...
    method setParameterFadeOutTime (line 1561) | setParameterFadeOutTime(e,t){const i=this._motionData.curves;for(let n...
    method getParameterFadeInTime (line 1561) | getParameterFadeInTime(e){const t=this._motionData.curves;for(let i=0;...
    method getParameterFadeOutTime (line 1561) | getParameterFadeOutTime(e){const t=this._motionData.curves;for(let i=0...
    method setEffectIds (line 1561) | setEffectIds(e,t){this._eyeBlinkParameterIds=e,this._lipSyncParameterI...
    method release (line 1561) | release(){this._motionData=void 0}
    method parse (line 1561) | parse(e){this._motionData=new Sg;let t=new nl(e);this._motionData.dura...
    method getFiredEvent (line 1561) | getFiredEvent(e,t){this._firedEventValues.length=0;for(let i=0;i<this....
  class Bg (line 1561) | class Bg{constructor(){this._autoDelete=!1,this._available=!0,this._fini...
    method constructor (line 1561) | constructor(){this._autoDelete=!1,this._available=!0,this._finished=!1...
    method release (line 1561) | release(){this._autoDelete&&this._motion&&this._motion.release()}
    method setFadeOut (line 1561) | setFadeOut(e){this._fadeOutSeconds=e,this._isTriggeredFadeOut=!0}
    method startFadeOut (line 1561) | startFadeOut(e,t){const i=t+e;this._isTriggeredFadeOut=!0,(this._endTi...
    method isFinished (line 1561) | isFinished(){return this._finished}
    method isStarted (line 1561) | isStarted(){return this._started}
    method getStartTime (line 1561) | getStartTime(){return this._startTimeSeconds}
    method getFadeInStartTime (line 1561) | getFadeInStartTime(){return this._fadeInStartTimeSeconds}
    method getEndTime (line 1561) | getEndTime(){return this._endTimeSeconds}
    method setStartTime (line 1561) | setStartTime(e){this._startTimeSeconds=e}
    method setFadeInStartTime (line 1561) | setFadeInStartTime(e){this._fadeInStartTimeSeconds=e}
    method setEndTime (line 1561) | setEndTime(e){this._endTimeSeconds=e}
    method setIsFinished (line 1561) | setIsFinished(e){this._finished=e}
    method setIsStarted (line 1561) | setIsStarted(e){this._started=e}
    method isAvailable (line 1561) | isAvailable(){return this._available}
    method setIsAvailable (line 1561) | setIsAvailable(e){this._available=e}
    method setState (line 1561) | setState(e,t){this._stateTimeSeconds=e,this._stateWeight=t}
    method getStateTime (line 1561) | getStateTime(){return this._stateTimeSeconds}
    method getStateWeight (line 1561) | getStateWeight(){return this._stateWeight}
    method getLastCheckEventSeconds (line 1561) | getLastCheckEventSeconds(){return this._lastEventCheckSeconds}
    method setLastCheckEventSeconds (line 1561) | setLastCheckEventSeconds(e){this._lastEventCheckSeconds=e}
    method isTriggeredFadeOut (line 1561) | isTriggeredFadeOut(){return this._isTriggeredFadeOut}
    method getFadeOutSeconds (line 1561) | getFadeOutSeconds(){return this._fadeOutSeconds}
  class sl (line 1561) | class sl{constructor(){this._userTimeSeconds=0,this._eventCustomData=nul...
    method constructor (line 1561) | constructor(){this._userTimeSeconds=0,this._eventCustomData=null,this....
    method release (line 1561) | release(){for(let e=0;e<this._motions.length;++e)this._motions[e]&&thi...
    method startMotion (line 1561) | startMotion(e,t,i){if(e==null)return Ng;let n;for(let s=0;s<this._moti...
    method isFinished (line 1561) | isFinished(){let e=0;for(;e<this._motions.length;){const t=this._motio...
    method isFinishedByHandle (line 1561) | isFinishedByHandle(e){for(let t=0;t<this._motions.length;t++){const i=...
    method stopAllMotions (line 1561) | stopAllMotions(){for(let e=0;e<this._motions.length;e++){const t=this....
    method getCubismMotionQueueEntry (line 1561) | getCubismMotionQueueEntry(e){return this._motions.find(t=>t!=null&&t._...
    method setEventCallback (line 1561) | setEventCallback(e,t=null){this._eventCallBack=e,this._eventCustomData=t}
    method doUpdateMotion (line 1561) | doUpdateMotion(e,t){let i=!1,n=0;for(;n<this._motions.length;){const s...
  class Ug (line 1561) | class Ug{constructor(){this.initialPosition=new U(0,0),this.position=new...
    method constructor (line 1561) | constructor(){this.initialPosition=new U(0,0),this.position=new U(0,0)...
  class kg (line 1561) | class kg{constructor(){this.normalizationPosition={},this.normalizationA...
    method constructor (line 1561) | constructor(){this.normalizationPosition={},this.normalizationAngle={}}
  class Gg (line 1561) | class Gg{constructor(){this.source={}}}
    method constructor (line 1561) | constructor(){this.source={}}
  class Xg (line 1561) | class Xg{constructor(){this.destination={},this.translationScale=new U(0...
    method constructor (line 1561) | constructor(){this.destination={},this.translationScale=new U(0,0)}
  class Hg (line 1561) | class Hg{constructor(){this.settings=[],this.inputs=[],this.outputs=[],t...
    method constructor (line 1561) | constructor(){this.settings=[],this.inputs=[],this.outputs=[],this.par...
  class Vg (line 1561) | class Vg{constructor(e){this._json=e}release(){this._json=void 0}getGrav...
    method constructor (line 1561) | constructor(e){this._json=e}
    method release (line 1561) | release(){this._json=void 0}
    method getGravity (line 1561) | getGravity(){const e=new U(0,0);return e.x=this._json.Meta.EffectiveFo...
    method getWind (line 1561) | getWind(){const e=new U(0,0);return e.x=this._json.Meta.EffectiveForce...
    method getSubRigCount (line 1561) | getSubRigCount(){return this._json.Meta.PhysicsSettingCount}
    method getTotalInputCount (line 1561) | getTotalInputCount(){return this._json.Meta.TotalInputCount}
    method getTotalOutputCount (line 1561) | getTotalOutputCount(){return this._json.Meta.TotalOutputCount}
    method getVertexCount (line 1561) | getVertexCount(){return this._json.Meta.VertexCount}
    method getNormalizationPositionMinimumValue (line 1561) | getNormalizationPositionMinimumValue(e){return this._json.PhysicsSetti...
    method getNormalizationPositionMaximumValue (line 1561) | getNormalizationPositionMaximumValue(e){return this._json.PhysicsSetti...
    method getNormalizationPositionDefaultValue (line 1561) | getNormalizationPositionDefaultValue(e){return this._json.PhysicsSetti...
    method getNormalizationAngleMinimumValue (line 1561) | getNormalizationAngleMinimumValue(e){return this._json.PhysicsSettings...
    method getNormalizationAngleMaximumValue (line 1561) | getNormalizationAngleMaximumValue(e){return this._json.PhysicsSettings...
    method getNormalizationAngleDefaultValue (line 1561) | getNormalizationAngleDefaultValue(e){return this._json.PhysicsSettings...
    method getInputCount (line 1561) | getInputCount(e){return this._json.PhysicsSettings[e].Input.length}
    method getInputWeight (line 1561) | getInputWeight(e,t){return this._json.PhysicsSettings[e].Input[t].Weight}
    method getInputReflect (line 1561) | getInputReflect(e,t){return this._json.PhysicsSettings[e].Input[t].Ref...
    method getInputType (line 1561) | getInputType(e,t){return this._json.PhysicsSettings[e].Input[t].Type}
    method getInputSourceId (line 1561) | getInputSourceId(e,t){return this._json.PhysicsSettings[e].Input[t].So...
    method getOutputCount (line 1561) | getOutputCount(e){return this._json.PhysicsSettings[e].Output.length}
    method getOutputVertexIndex (line 1561) | getOutputVertexIndex(e,t){return this._json.PhysicsSettings[e].Output[...
    method getOutputAngleScale (line 1561) | getOutputAngleScale(e,t){return this._json.PhysicsSettings[e].Output[t...
    method getOutputWeight (line 1561) | getOutputWeight(e,t){return this._json.PhysicsSettings[e].Output[t].We...
    method getOutputDestinationId (line 1561) | getOutputDestinationId(e,t){return this._json.PhysicsSettings[e].Outpu...
    method getOutputType (line 1561) | getOutputType(e,t){return this._json.PhysicsSettings[e].Output[t].Type}
    method getOutputReflect (line 1561) | getOutputReflect(e,t){return this._json.PhysicsSettings[e].Output[t].R...
    method getParticleCount (line 1561) | getParticleCount(e){return this._json.PhysicsSettings[e].Vertices.length}
    method getParticleMobility (line 1561) | getParticleMobility(e,t){return this._json.PhysicsSettings[e].Vertices...
    method getParticleDelay (line 1561) | getParticleDelay(e,t){return this._json.PhysicsSettings[e].Vertices[t]...
    method getParticleAcceleration (line 1561) | getParticleAcceleration(e,t){return this._json.PhysicsSettings[e].Vert...
    method getParticleRadius (line 1561) | getParticleRadius(e,t){return this._json.PhysicsSettings[e].Vertices[t...
    method getParticlePosition (line 1561) | getParticlePosition(e,t){const i=new U(0,0);return i.x=this._json.Phys...
  class ka (line 1561) | class ka{static create(e){const t=new ka;return t.parse(e),t._physicsRig...
    method create (line 1561) | static create(e){const t=new ka;return t.parse(e),t._physicsRig.gravit...
    method evaluate (line 1561) | evaluate(e,t){let i,n,s,a;const o=new U;let h,u,l,c,f,d,p,_;f=e.getMod...
    method setOptions (line 1561) | setOptions(e){this._options=e}
    method getOption (line 1561) | getOption(){return this._options}
    method constructor (line 1561) | constructor(){this._options=new Yg,this._options.gravity.y=-1,this._op...
    method release (line 1561) | release(){this._physicsRig=void 0}
    method parse (line 1561) | parse(e){this._physicsRig=new Hg;let t=new Vg(e);this._physicsRig.grav...
    method initialize (line 1561) | initialize(){let e,t,i;for(let n=0;n<this._physicsRig.subRigCount;++n)...
  class Yg (line 1561) | class Yg{constructor(){this.gravity=new U(0,0),this.wind=new U(0,0)}}
    method constructor (line 1561) | constructor(){this.gravity=new U(0,0),this.wind=new U(0,0)}
  function Wg (line 1561) | function Wg(r,e,t,i,n,s,a,o,h,u){r.x+=Ga(t,i,n,s,a.minimum,a.maximum,a.d...
  function qg (line 1561) | function qg(r,e,t,i,n,s,a,o,h,u){r.y+=Ga(t,i,n,s,a.minimum,a.maximum,a.d...
  function $g (line 1561) | function $g(r,e,t,i,n,s,a,o,h,u){e.angle+=Ga(t,i,n,s,o.minimum,o.maximum...
  function Zg (line 1561) | function Zg(r,e,t,i,n){let s=r.x;return i&&(s*=-1),s}
  function Kg (line 1561) | function Kg(r,e,t,i,n){let s=r.y;return i&&(s*=-1),s}
  function Jg (line 1561) | function Jg(r,e,t,i,n){let s;return t>=2?n=e[t-1].position.substract(e[t...
  function Qg (line 1561) | function Qg(r,e){return Math.abs(Math.max(r,e)-Math.min(r,e))}
  function tm (line 1561) | function tm(r,e){return Math.min(r,e)+Qg(r,e)/2}
  function em (line 1561) | function em(r,e){return r.x}
  function rm (line 1561) | function rm(r,e){return r.y}
  function im (line 1561) | function im(r,e){return e}
  function nm (line 1561) | function nm(r,e,t,i,n,s,a,o){let h,u,l,c,f=new U(0,0),d=new U(0,0),p=new...
  function sm (line 1561) | function sm(r,e,t,i,n){let s,a,o;s=n.getScale(n.translationScale,n.angle...
  function Ga (line 1561) | function Ga(r,e,t,i,n,s,a,o){let h=0;const u=rt.max(t,e);u<r&&(r=u);cons...
  class Ns (line 1561) | class Ns{constructor(e=0,t=0,i=0,n=0){this.x=e,this.y=t,this.width=i,thi...
    method constructor (line 1561) | constructor(e=0,t=0,i=0,n=0){this.x=e,this.y=t,this.width=i,this.heigh...
    method getCenterX (line 1561) | getCenterX(){return this.x+.5*this.width}
    method getCenterY (line 1561) | getCenterY(){return this.y+.5*this.height}
    method getRight (line 1561) | getRight(){return this.x+this.width}
    method getBottom (line 1561) | getBottom(){return this.y+this.height}
    method setRect (line 1561) | setRect(e){this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height}
    method expand (line 1561) | expand(e,t){this.x-=e,this.y-=t,this.width+=e*2,this.height+=t*2}
  class Xn (line 1561) | class Xn{getChannelFlagAsColor(e){return this._channelColors[e]}getMaskR...
    method getChannelFlagAsColor (line 1561) | getChannelFlagAsColor(e){return this._channelColors[e]}
    method getMaskRenderTexture (line 1561) | getMaskRenderTexture(){let e=0;if(this._maskTexture&&this._maskTexture...
    method setGL (line 1561) | setGL(e){this.gl=e}
    method calcClippedDrawTotalBounds (line 1561) | calcClippedDrawTotalBounds(e,t){let i=Number.MAX_VALUE,n=Number.MAX_VA...
    method constructor (line 1561) | constructor(){this._maskRenderTexture=null,this._colorBuffer=null,this...
    method release (line 1561) | release(){var e,t,i;const n=this;for(let s=0;s<this._clippingContextLi...
    method initialize (line 1561) | initialize(e,t,i,n){for(let s=0;s<t;s++){if(n[s]<=0){this._clippingCon...
    method setupClippingContext (line 1561) | setupClippingContext(e,t){this._currentFrameNo++;let i=0;for(let n=0;n...
    method findSameClip (line 1561) | findSameClip(e,t){for(let i=0;i<this._clippingContextListForMask.lengt...
    method setupLayoutBounds (line 1561) | setupLayoutBounds(e){let t=e/Gn,i=e%Gn;t=~~t,i=~~i;let n=0;for(let s=0...
    method getColorBuffer (line 1561) | getColorBuffer(){return this._colorBuffer}
    method getClippingContextListForDraw (line 1561) | getClippingContextListForDraw(){return this._clippingContextListForDraw}
    method setClippingMaskBufferSize (line 1561) | setClippingMaskBufferSize(e){this._clippingMaskBufferSize=e}
    method getClippingMaskBufferSize (line 1561) | getClippingMaskBufferSize(){return this._clippingMaskBufferSize}
  class om (line 1561) | class om{constructor(e,t){this.frameNo=e,this.texture=t}}
    method constructor (line 1561) | constructor(e,t){this.frameNo=e,this.texture=t}
  class hm (line 1561) | class hm{constructor(e,t,i){this._isUsing=!1,this._owner=e,this._clippin...
    method constructor (line 1561) | constructor(e,t,i){this._isUsing=!1,this._owner=e,this._clippingIdList...
    method release (line 1561) | release(){const e=this;e._layoutBounds=void 0,e._allClippedDrawRect=vo...
    method addClippedDrawable (line 1561) | addClippedDrawable(e){this._clippedDrawableIndexList.push(e)}
    method getClippingManager (line 1561) | getClippingManager(){return this._owner}
    method setGl (line 1561) | setGl(e){this._owner.setGL(e)}
  class cr (line 1561) | class cr{static getInstance(){return Ne==null&&(Ne=new cr),Ne}static del...
    method getInstance (line 1561) | static getInstance(){return Ne==null&&(Ne=new cr),Ne}
    method deleteInstance (line 1561) | static deleteInstance(){Ne&&(Ne.release(),Ne=void 0)}
    method constructor (line 1561) | constructor(){this._shaderSets=[]}
    method release (line 1561) | release(){this.releaseShaderProgram()}
    method setupShaderProgram (line 1561) | setupShaderProgram(e,t,i,n,s,a,o,h,u,l,c,f,d){c||ur("NoPremultipliedAl...
    method releaseShaderProgram (line 1561) | releaseShaderProgram(){for(let e=0;e<this._shaderSets.length;e++)this....
    method generateShaders (line 1561) | generateShaders(){for(let e=0;e<am;e++)this._shaderSets.push({});this....
    method loadShaderProgram (line 1561) | loadShaderProgram(e,t){let i=this.gl.createProgram(),n=this.compileSha...
    method compileShaderSource (line 1561) | compileShaderSource(e,t){const i=t,n=this.gl.createShader(e);if(this.g...
    method setGl (line 1561) | setGl(e){this.gl=e}
  class ol (line 1561) | class ol extends Fa{constructor(){super(),this._clippingContextBufferFor...
    method constructor (line 1561) | constructor(){super(),this._clippingContextBufferForMask=null,this._cl...
    method initialize (line 1561) | initialize(e){e.isUsingMasking()&&(this._clippingManager=new Xn,this._...
    method bindTexture (line 1561) | bindTexture(e,t){this._textures[e]=t}
    method getBindedTextures (line 1561) | getBindedTextures(){return this._textures}
    method setClippingMaskBufferSize (line 1561) | setClippingMaskBufferSize(e){this._clippingManager.release(),this._cli...
    method getClippingMaskBufferSize (line 1561) | getClippingMaskBufferSize(){return this._clippingManager.getClippingMa...
    method release (line 1561) | release(){var e,t,i;const n=this;this._clippingManager.release(),n._cl...
    method doDrawModel (line 1561) | doDrawModel(){this.preDraw(),this._clippingManager!=null&&this._clippi...
    method drawMesh (line 1561) | drawMesh(e,t,i,n,s,a,o,h,u){this.isCulling()?this.gl.enable(this.gl.CU...
    method doStaticRelease (line 1561) | static doStaticRelease(){cr.deleteInstance()}
    method setRenderState (line 1561) | setRenderState(e,t){Us=e,Lr=t}
    method preDraw (line 1561) | preDraw(){this.firstDraw&&(this.firstDraw=!1,this._anisortopy=this.gl....
    method setClippingContextBufferForMask (line 1561) | setClippingContextBufferForMask(e){this._clippingContextBufferForMask=e}
    method getClippingContextBufferForMask (line 1561) | getClippingContextBufferForMask(){return this._clippingContextBufferFo...
    method setClippingContextBufferForDraw (line 1561) | setClippingContextBufferForDraw(e){this._clippingContextBufferForDraw=e}
    method getClippingContextBufferForDraw (line 1561) | getClippingContextBufferForDraw(){return this._clippingContextBufferFo...
    method startUp (line 1561) | startUp(e){this.gl=e,this._clippingManager.setGL(e),cr.getInstance().s...
  class hl (line 1561) | class hl{constructor(e){this.groups=e.Groups,this.hitAreas=e.HitAreas,th...
    method constructor (line 1561) | constructor(e){this.groups=e.Groups,this.hitAreas=e.HitAreas,this.layo...
    method getEyeBlinkParameters (line 1561) | getEyeBlinkParameters(){var e,t;return(t=(e=this.groups)==null?void 0:...
    method getLipSyncParameters (line 1561) | getLipSyncParameters(){var e,t;return(t=(e=this.groups)==null?void 0:e...
  method log (line 1561) | log(r,...e){Lt.logLevel<=Lt.LOG_LEVEL_VERBOSE&&console.log(`[${r}]`,...e)}
  method warn (line 1561) | warn(r,...e){Lt.logLevel<=Lt.LOG_LEVEL_WARNING&&console.warn(`[${r}]`,.....
  method error (line 1561) | error(r,...e){Lt.logLevel<=Lt.LOG_LEVEL_ERROR&&console.error(`[${r}]`,.....
  function rh (line 1561) | function rh(r,e,t){return r<e?e:r>t?t:r}
  function ul (line 1561) | function ul(r,e){e.forEach(t=>{Object.getOwnPropertyNames(t.prototype).f...
  function Tm (line 1561) | function Tm(r){let e=r.lastIndexOf("/");return e!=-1&&(r=r.slice(0,e)),e...
  function Em (line 1561) | function Em(r,e){const t=r.indexOf(e);t!==-1&&r.splice(t,1)}
  class ll (line 1561) | class ll extends ye{constructor(e,t){super(),this.expressions=[],this.re...
    method constructor (line 1561) | constructor(e,t){super(),this.expressions=[],this.reserveExpressionInd...
    method init (line 1561) | init(){this.defaultExpression=this.createExpression({},void 0),this.cu...
    method loadExpression (line 1561) | loadExpression(e){return ft(this,null,function*(){if(!this.definitions...
    method _loadExpression (line 1561) | _loadExpression(e){throw new Error("Not implemented.")}
    method setRandomExpression (line 1561) | setRandomExpression(){return ft(this,null,function*(){if(this.definiti...
    method resetExpression (line 1561) | resetExpression(){this._setExpression(this.defaultExpression)}
    method restoreExpression (line 1561) | restoreExpression(){this._setExpression(this.currentExpression)}
    method setExpression (line 1561) | setExpression(e){return ft(this,null,function*(){if(typeof e!="number"...
    method update (line 1561) | update(e,t){return this.isFinished()?!1:this.updateParameters(e,t)}
    method destroy (line 1561) | destroy(){this.destroyed=!0,this.emit("destroy");const e=this;e.defini...
  class wm (line 1561) | class wm{constructor(){this.targetX=0,this.targetY=0,this.x=0,this.y=0,t...
    method constructor (line 1561) | constructor(){this.targetX=0,this.targetY=0,this.x=0,this.y=0,this.vx=...
    method focus (line 1561) | focus(e,t,i=!1){this.targetX=rh(e,-1,1),this.targetY=rh(t,-1,1),i&&(th...
    method update (line 1561) | update(e){const t=this.targetX-this.x,i=this.targetY-this.y;if(Math.ab...
  class Xa (line 1561) | class Xa{constructor(e){this.json=e;let t=e.url;if(typeof t!="string")th...
    method constructor (line 1561) | constructor(e){this.json=e;let t=e.url;if(typeof t!="string")throw new...
    method resolveURL (line 1561) | resolveURL(e){return he.resolve(this.url,e)}
    method replaceFiles (line 1561) | replaceFiles(e){this.moc=e(this.moc,"moc"),this.pose!==void 0&&(this.p...
    method getDefinedFiles (line 1561) | getDefinedFiles(){const e=[];return this.replaceFiles(t=>(e.push(t),t)...
    method validateFiles (line 1561) | validateFiles(e){const t=(s,a)=>{const o=this.resolveURL(s);if(!e.incl...
  class Cm (line 1561) | class Cm{constructor(){this.debug=!1,this.currentPriority=0,this.reserve...
    method constructor (line 1561) | constructor(){this.debug=!1,this.currentPriority=0,this.reservePriorit...
    method reserve (line 1561) | reserve(e,t,i){if(i<=0)return tt.log(this.tag,"Cannot start a motion w...
    method start (line 1561) | start(e,t,i,n){if(n===1){if(this.setReservedIdle(void 0,void 0),this.c...
    method complete (line 1561) | complete(){this.setCurrent(void 0,void 0,0)}
    method setCurrent (line 1561) | setCurrent(e,t,i){this.currentPriority=i,this.currentGroup=e,this.curr...
    method setReserved (line 1561) | setReserved(e,t,i){this.reservePriority=i,this.reservedGroup=e,this.re...
    method setReservedIdle (line 1561) | setReservedIdle(e,t){this.reservedIdleGroup=e,this.reservedIdleIndex=t}
    method isActive (line 1561) | isActive(e,t){return e===this.currentGroup&&t===this.currentIndex||e==...
    method reset (line 1561) | reset(){this.setCurrent(void 0,void 0,0),this.setReserved(void 0,void ...
    method shouldRequestIdleMotion (line 1561) | shouldRequestIdleMotion(){return this.currentGroup===void 0&&this.rese...
    method shouldOverrideExpression (line 1561) | shouldOverrideExpression(){return!Lt.preserveExpressionOnMotion&&this....
    method dump (line 1561) | dump(e,t){if(this.debug){const i=["currentPriority","reservePriority",...
  class ze (line 1564) | class ze{static get volume(){return this._volume}static set volume(e){th...
    method volume (line 1564) | static get volume(){return this._volume}
    method volume (line 1564) | static set volume(e){this._volume=(e>1?1:e<0?0:e)||0,this.audios.forEa...
    method add (line 1564) | static add(e,t,i){const n=new Audio(e);return n.volume=this._volume,n....
    method play (line 1564) | static play(e){return new Promise((t,i)=>{var n;(n=e.play())==null||n....
    method dispose (line 1564) | static dispose(e){e.pause(),e.removeAttribute("src"),Em(this.audios,e)}
    method destroy (line 1564) | static destroy(){for(let e=this.audios.length-1;e>=0;e--)this.dispose(...
  class Ha (line 1564) | class Ha extends ye{constructor(e,t){super(),this.motionGroups={},this.s...
    method constructor (line 1564) | constructor(e,t){super(),this.motionGroups={},this.state=new Cm,this.p...
    method init (line 1564) | init(e){e?.idleMotionGroup&&(this.groups.idle=e.idleMotionGroup),this....
    method setupMotions (line 1564) | setupMotions(e){for(const i of Object.keys(this.definitions))this.moti...
    method loadMotion (line 1564) | loadMotion(e,t){return ft(this,null,function*(){var i;if(!((i=this.def...
    method _loadMotion (line 1564) | _loadMotion(e,t){throw new Error("Not implemented.")}
    method startMotion (line 1564) | startMotion(e,t){return ft(this,arguments,function*(i,n,s=ks.NORMAL){v...
    method startRandomMotion (line 1564) | startRandomMotion(e,t){return ft(this,null,function*(){const i=this.de...
    method stopAllMotions (line 1564) | stopAllMotions(){this._stopAllMotions(),this.state.reset(),this.curren...
    method update (line 1564) | update(e,t){var i;return this.isFinished()&&(this.playing&&(this.playi...
    method destroy (line 1564) | destroy(){var e;this.destroyed=!0,this.emit("destroy"),this.stopAllMot...
  class Rm (line 1564) | class Rm extends ye{constructor(){super(...arguments),this.focusControll...
    method constructor (line 1564) | constructor(){super(...arguments),this.focusController=new wm,this.ori...
    method init (line 1564) | init(){this.setupLayout(),this.setupHitAreas()}
    method setupLayout (line 1564) | setupLayout(){const e=this,t=this.getSize();e.originalWidth=t[0],e.ori...
    method setupHitAreas (line 1564) | setupHitAreas(){const e=this.getHitAreaDefs().filter(t=>t.index>=0);fo...
    method hitTest (line 1564) | hitTest(e,t){return Object.keys(this.hitAreas).filter(i=>this.isHit(i,...
    method isHit (line 1564) | isHit(e,t,i){if(!this.hitAreas[e])return!1;const n=this.hitAreas[e].in...
    method getDrawableBounds (line 1564) | getDrawableBounds(e,t){const i=this.getDrawableVertices(e);let n=i[0],...
    method updateTransform (line 1564) | updateTransform(e){this.drawingMatrix.copyFrom(e).append(this.localTra...
    method update (line 1564) | update(e,t){this.focusController.update(e)}
    method destroy (line 1564) | destroy(){this.destroyed=!0,this.emit("destroy"),this.motionManager.de...
  class nh (line 1564) | class nh extends Error{constructor(e,t,i,n=!1){super(e),this.url=t,this....
    method constructor (line 1564) | constructor(e,t,i,n=!1){super(e),this.url=t,this.status=i,this.aborted=n}
  method createXHR (line 1564) | static createXHR(r,e,t,i,n){const s=new XMLHttpRequest;if(Mt.allXhrSet.a...
  method cancelXHRs (line 1564) | static cancelXHRs(){var r;(r=Mt.xhrMap.get(this))==null||r.forEach(e=>{e...
  method release (line 1564) | static release(){Mt.allXhrSet.forEach(r=>r.abort()),Mt.allXhrSet.clear()...
  function fl (line 1564) | function fl(r,e){let t=-1;return i(0);function i(n,s){if(s)return Promis...
  class Ae (line 1564) | class Ae{static load(e){return fl(this.middlewares,e).then(()=>e.result)}}
    method load (line 1564) | static load(e){return fl(this.middlewares,e).then(()=>e.result)}
  function Dm (line 1564) | function Dm(r,e={}){var t;const i={resourceOptions:{crossorigin:e.crossO...
  method registerRuntime (line 1564) | static registerRuntime(r){Ct.runtimes.push(r),Ct.runtimes.sort((e,t)=>t....
  method findRuntime (line 1564) | static findRuntime(r){for(const e of Ct.runtimes)if(e.test(r))return e}
  method setupLive2DModel (line 1564) | static setupLive2DModel(r,e,t){return ft(this,null,function*(){const i=n...
  method loadMotion (line 1564) | static loadMotion(r,e,t){var i,n;const s=a=>r.emit("motionLoadError",e,t...
  method loadExpression (line 1566) | static loadExpression(r,e){var t;const i=n=>r.emit("expressionLoadError"...
  method releaseTasks (line 1568) | static releaseTasks(){this instanceof Ha?Ct.motionTasksMap.delete(this):...
  class Fm (line 1568) | class Fm{constructor(){this._autoInteract=!1}get autoInteract(){return t...
    method constructor (line 1568) | constructor(){this._autoInteract=!1}
    method autoInteract (line 1568) | get autoInteract(){return this._autoInteract}
    method autoInteract (line 1568) | set autoInteract(e){e!==this._autoInteract&&(e?this.on("pointertap",ah...
    method registerInteraction (line 1568) | registerInteraction(e){e!==this.interactionManager&&(this.unregisterIn...
    method unregisterInteraction (line 1568) | unregisterInteraction(){var e;this.interactionManager&&((e=this.intera...
  function ah (line 1568) | function ah(r){this.tap(r.data.global.x,r.data.global.y)}
  function oh (line 1568) | function oh(r){this.focus(r.data.global.x,r.data.global.y)}
  class Lm (line 1568) | class Lm extends Qi{}
  class Va (line 1568) | class Va extends Yt{constructor(e){super(),this.tag="Live2DModel(uniniti...
    method constructor (line 1568) | constructor(e){super(),this.tag="Live2DModel(uninitialized)",this.text...
    method from (line 1568) | static from(e,t){const i=new this(t);return vt.setupLive2DModel(i,e,t)...
    method fromSync (line 1568) | static fromSync(e,t){const i=new this(t);return vt.setupLive2DModel(i,...
    method registerTicker (line 1568) | static registerTicker(e){Te=e}
    method autoUpdate (line 1568) | get autoUpdate(){return this._autoUpdate}
    method autoUpdate (line 1568) | set autoUpdate(e){var t;Te||(Te=(t=window.PIXI)==null?void 0:t.Ticker)...
    method init (line 1568) | init(e){this.tag=`Live2DModel(${this.internalModel.settings.name})`;co...
    method onAnchorChange (line 1568) | onAnchorChange(){this.pivot.set(this.anchor.x*this.internalModel.width...
    method motion (line 1568) | motion(e,t,i){return t===void 0?this.internalModel.motionManager.start...
    method expression (line 1568) | expression(e){return this.internalModel.motionManager.expressionManage...
    method focus (line 1568) | focus(e,t,i=!1){Bt.x=e,Bt.y=t,this.toModelPosition(Bt,Bt,!0);let n=Bt....
    method tap (line 1568) | tap(e,t){const i=this.hitTest(e,t);i.length&&(tt.log(this.tag,"Hit",i)...
    method hitTest (line 1568) | hitTest(e,t){return Bt.x=e,Bt.y=t,this.toModelPosition(Bt,Bt),this.int...
    method toModelPosition (line 1568) | toModelPosition(e,t=e.clone(),i){return i||(this._recursivePostUpdateT...
    method containsPoint (line 1568) | containsPoint(e){return this.getBounds(!0).contains(e.x,e.y)}
    method _calculateBounds (line 1568) | _calculateBounds(){this._bounds.addFrame(this.transform,0,0,this.inter...
    method onTickerUpdate (line 1568) | onTickerUpdate(){this.update(Te.shared.deltaMS)}
    method update (line 1568) | update(e){this.deltaTime+=e,this.elapsedTime+=e}
    method _render (line 1568) | _render(e){this.registerInteraction(e.plugins.interaction),e.batch.res...
    method destroy (line 1568) | destroy(e){this.emit("destroy"),this.autoUpdate=!1,this.unregisterInte...
  method resolveURL (line 1568) | static resolveURL(r,e){var t;const i=(t=ae.filesMap[r])==null?void 0:t[e...
  method upload (line 1568) | static upload(r,e){return ft(this,null,function*(){const t={};for(const ...
  method createSettings (line 1568) | static createSettings(r){return ft(this,null,function*(){const e=r.find(...
  method readText (line 1568) | static readText(r){return ft(this,null,function*(){return new Promise((e...
  method unzip (line 1568) | static unzip(r,e){return ft(this,null,function*(){const t=yield Ot.getFi...
  method createSettings (line 1568) | static createSettings(r){return ft(this,null,function*(){const t=(yield ...
  method zipReader (line 1568) | static zipReader(r,e){return ft(this,null,function*(){throw new Error("N...
  method getFilePaths (line 1568) | static getFilePaths(r){return ft(this,null,function*(){throw new Error("...
  method getFiles (line 1568) | static getFiles(r,e){return ft(this,null,function*(){throw new Error("No...
  method readText (line 1568) | static readText(r,e){return ft(this,null,function*(){throw new Error("No...
  method releaseReader (line 1568) | static releaseReader(r){}
  class Nm (line 1568) | class Nm extends ll{constructor(e,t){var i;super(e,t),this.queueManager=...
    method constructor (line 1568) | constructor(e,t){var i;super(e,t),this.queueManager=new sl,this.defini...
    method isFinished (line 1568) | isFinished(){return this.queueManager.isFinished()}
    method getExpressionIndex (line 1568) | getExpressionIndex(e){return this.definitions.findIndex(t=>t.Name===e)}
    method getExpressionFile (line 1568) | getExpressionFile(e){return e.File}
    method createExpression (line 1568) | createExpression(e,t){return Ba.create(e)}
    method _setExpression (line 1568) | _setExpression(e){return this.queueManager.startMotion(e,!1,performanc...
    method stopAllExpressions (line 1568) | stopAllExpressions(){this.queueManager.stopAllMotions()}
    method updateParameters (line 1568) | updateParameters(e,t){return this.queueManager.doUpdateMotion(e,t)}
  class dr (line 1568) | class dr extends Xa{constructor(e){if(super(e),!dr.isValidJSON(e))throw ...
    method constructor (line 1568) | constructor(e){if(super(e),!dr.isValidJSON(e))throw new TypeError("Inv...
    method isValidJSON (line 1568) | static isValidJSON(e){var t;return!!e?.FileReferences&&typeof e.FileRe...
    method replaceFiles (line 1568) | replaceFiles(e){if(super.replaceFiles(e),this.motions)for(const[t,i]of...
  class Um (line 1568) | class Um extends Ha{constructor(e,t){var i;super(e,t),this.groups={idle:...
    method constructor (line 1568) | constructor(e,t){var i;super(e,t),this.groups={idle:"Idle"},this.motio...
    method init (line 1568) | init(e){super.init(e),this.settings.expressions&&(this.expressionManag...
    method isFinished (line 1568) | isFinished(){return this.queueManager.isFinished()}
    method _startMotion (line 1568) | _startMotion(e,t){return e.setFinishedMotionHandler(t),this.queueManag...
    method _stopAllMotions (line 1568) | _stopAllMotions(){this.queueManager.stopAllMotions()}
    method createMotion (line 1568) | createMotion(e,t,i){const n=Ua.create(e),s=new nl(e),a=(t===this.group...
    method getMotionFile (line 1568) | getMotionFile(e){return e.File}
    method getMotionName (line 1568) | getMotionName(e){return e.File}
    method getSoundFile (line 1568) | getSoundFile(e){return e.Sound}
    method updateParameters (line 1568) | updateParameters(e,t){return this.queueManager.doUpdateMotion(e,t)}
    method destroy (line 1568) | destroy(){super.destroy(),this.queueManager.release(),this.queueManage...
  class km (line 1568) | class km extends Rm{constructor(e,t,i){super(),this.lipSync=!0,this.brea...
    method constructor (line 1568) | constructor(e,t,i){super(),this.lipSync=!0,this.breath=Oa.create(),thi...
    method init (line 1568) | init(){var e;super.init(),((e=this.settings.getEyeBlinkParameters())==...
    method getSize (line 1568) | getSize(){return[this.coreModel.getModel().canvasinfo.CanvasWidth,this...
    method getLayout (line 1568) | getLayout(){const e={};if(this.settings.layout)for(const t of Object.k...
    method setupLayout (line 1568) | setupLayout(){super.setupLayout(),this.pixelsPerUnit=this.coreModel.ge...
    method updateWebGLContext (line 1568) | updateWebGLContext(e,t){this.renderer.firstDraw=!0,this.renderer._buff...
    method bindTexture (line 1568) | bindTexture(e,t){this.renderer.bindTexture(e,t)}
    method getHitAreaDefs (line 1568) | getHitAreaDefs(){var e,t;return(t=(e=this.settings.hitAreas)==null?voi...
    method getDrawableIDs (line 1568) | getDrawableIDs(){return this.coreModel.getDrawableIds()}
    method getDrawableIndex (line 1568) | getDrawableIndex(e){return this.coreModel.getDrawableIndex(e)}
    method getDrawableVertices (line 1568) | getDrawableVertices(e){if(typeof e=="string"&&(e=this.coreModel.getDra...
    method updateTransform (line 1568) | updateTransform(e){this.drawingMatrix.copyFrom(this.centeringTransform...
    method update (line 1568) | update(e,t){var i,n,s,a;super.update(e,t),e/=1e3,t/=1e3;const o=this.c...
    method updateFocus (line 1568) | updateFocus(){this.coreModel.addParameterValueById(this.idParamEyeBall...
    method updateNaturalMovements (line 1568) | updateNaturalMovements(e,t){var i;(i=this.breath)==null||i.updateParam...
    method draw (line 1568) | draw(e){const t=this.drawingMatrix,i=hh.getArray();i[0]=t.a,i[1]=t.b,i...
    method destroy (line 1568) | destroy(){super.destroy(),this.renderer.release(),this.coreModel.relea...
  function Gm (line 1568) | function Gm(){return ni.isStarted()?Promise.resolve():(Fi??(Fi=new Promi...
  function Xm (line 1568) | function Xm(r){r=Object.assign({logFunction:console.log,loggingLevel:er....
  method test (line 1568) | test(r){return r instanceof dr||dr.isValidJSON(r)}
  method isValidMoc (line 1568) | isValidMoc(r){if(r.byteLength<4)return!1;const e=new Int8Array(r,0,4);re...
  method createModelSettings (line 1568) | createModelSettings(r){return new dr(r)}
  method createCoreModel (line 1568) | createCoreModel(r){const e=La.create(r);try{const t=e.createModel();retu...
  method createInternalModel (line 1568) | createInternalModel(r,e,t){const i=new km(r,e,t),n=r;return n.__moc&&(i....
  method createPhysics (line 1568) | createPhysics(r,e){return ka.create(e)}
  method createPose (line 1568) | createPose(r,e){return Da.create(e)}
  function Hm (line 1568) | function Hm(){var r;(r=this.__moc)==null||r.release()}
  function $m (line 1568) | function $m(){if(Wm===kr.textContent||kr.textContent.indexOf("s")!==-1)r...

FILE: modules/agent/chatdb/chat.py
  function create_chat_completion (line 8) | def create_chat_completion(messages, model=None, llm_name=None) -> str:
  function count_message_tokens (line 43) | def count_message_tokens(messages : List[Dict[str, str]], model : str = ...
  function count_string_tokens (line 84) | def count_string_tokens(string: str, model_name: str = "gpt-3.5-turbo-03...
  function create_chat_message (line 99) | def create_chat_message(role, content):
  function generate_context (line 113) | def generate_context(prompt, relevant_memory, full_message_history, model):
  function chat_with_ai (line 132) | def chat_with_ai(

FILE: modules/agent/chatdb/chatdb.py
  function need_update_sql (line 43) | def need_update_sql(input_string):
  function call_ai_function (line 50) | def call_ai_function(function, args, description, model=None):
  function populate_sql_statement (line 72) | def populate_sql_statement(sql_str: str, previous_sql_results):
  function get_steps_from_response (line 90) | def get_steps_from_response(response):
  function init_system_msg (line 111) | def init_system_msg(table_details=None):
  function chain_of_memory (line 129) | def chain_of_memory(sql_steps, mysql_db):
  function generate_chat_responses (line 161) | def generate_chat_responses(user_inp, mysql_db, historical_message, tabl...

FILE: modules/agent/chatdb/mysql.py
  function sql_result_to_table_str (line 5) | def sql_result_to_table_str(sql_result):
  class MySQLDB (line 17) | class MySQLDB(object):
    method __init__ (line 18) | def __init__(self):
    method connect (line 29) | def connect(self, host, user, password, port, database=None):
    method disconnect (line 52) | def disconnect(self):
    method execute_sql (line 58) | def execute_sql(self, sql, raise_err=False):
    method select (line 99) | def select(self, table, columns="*", condition=None):
    method insert (line 105) | def insert(self, table, data):
    method update (line 111) | def update(self, table, data, condition):
    method delete (line 116) | def delete(self, table, condition):
    method create_database (line 120) | def create_database(self, database):
    method drop_database (line 131) | def drop_database(self, ):
    method get_table_details (line 137) | def get_table_details(self):
    method get_databases (line 157) | def get_databases(self):
    method get_tables (line 163) | def get_tables(self,database):
    method get_table_data (line 169) | def get_table_data(self,table):
    method get_fields (line 183) | def get_fields(self,table):
    method load_data (line 199) | def load_data(self,db_name,table_name, fields, data):

FILE: modules/agent/internet_search.py
  class internet_search (line 6) | class internet_search():
    method __init__ (line 7) | def __init__(self):
    method set_v (line 12) | def set_v(self,search,key,result_len):
    method bing_search (line 17) | def bing_search(self,text):
    method google_search (line 22) | def google_search(self,text):
    method search_text (line 26) | def search_text(self,text):

FILE: modules/agent/svc/attentions.py
  class Encoder (line 11) | class Encoder(nn.Module):
    method __init__ (line 12) | def __init__(self, hidden_channels, filter_channels, n_heads, n_layers...
    method forward (line 33) | def forward(self, x, x_mask):
  class Decoder (line 48) | class Decoder(nn.Module):
    method __init__ (line 49) | def __init__(self, hidden_channels, filter_channels, n_heads, n_layers...
    method forward (line 75) | def forward(self, x, x_mask, h, h_mask):
  class MultiHeadAttention (line 99) | class MultiHeadAttention(nn.Module):
    method __init__ (line 100) | def __init__(self, channels, out_channels, n_heads, p_dropout=0., wind...
    method forward (line 136) | def forward(self, x, c, attn_mask=None):
    method attention (line 146) | def attention(self, query, key, value, mask=None):
    method _matmul_with_relative_values (line 179) | def _matmul_with_relative_values(self, x, y):
    method _matmul_with_relative_keys (line 188) | def _matmul_with_relative_keys(self, x, y):
    method _get_relative_embeddings (line 197) | def _get_relative_embeddings(self, relative_embeddings, length):
    method _relative_position_to_absolute_position (line 212) | def _relative_position_to_absolute_position(self, x):
    method _absolute_position_to_relative_position (line 229) | def _absolute_position_to_relative_position(self, x):
    method _attention_bias_proximal (line 243) | def _attention_bias_proximal(self, length):
  class FFN (line 255) | class FFN(nn.Module):
    method __init__ (line 256) | def __init__(self, in_channels, out_channels, filter_channels, kernel_...
    method forward (line 275) | def forward(self, x, x_mask):
    method _causal_padding (line 285) | def _causal_padding(self, x):
    method _same_padding (line 294) | def _same_padding(self, x):

FILE: modules/agent/svc/commons.py
  function slice_pitch_segments (line 7) | def slice_pitch_segments(x, ids_str, segment_size=4):
  function rand_slice_segments_with_pitch (line 15) | def rand_slice_segments_with_pitch(x, pitch, x_lengths=None, segment_siz...
  function init_weights (line 25) | def init_weights(m, mean=0.0, std=0.01):
  function get_padding (line 31) | def get_padding(kernel_size, dilation=1):
  function convert_pad_shape (line 35) | def convert_pad_shape(pad_shape):
  function intersperse (line 41) | def intersperse(lst, item):
  function kl_divergence (line 47) | def kl_divergence(m_p, logs_p, m_q, logs_q):
  function rand_gumbel (line 54) | def rand_gumbel(shape):
  function rand_gumbel_like (line 60) | def rand_gumbel_like(x):
  function slice_segments (line 65) | def slice_segments(x, ids_str, segment_size=4):
  function rand_slice_segments (line 74) | def rand_slice_segments(x, x_lengths=None, segment_size=4):
  function rand_spec_segments (line 84) | def rand_spec_segments(x, x_lengths=None, segment_size=4):
  function get_timing_signal_1d (line 94) | def get_timing_signal_1d(
  function add_timing_signal_1d (line 110) | def add_timing_signal_1d(x, min_timescale=1.0, max_timescale=1.0e4):
  function cat_timing_signal_1d (line 116) | def cat_timing_signal_1d(x, min_timescale=1.0, max_timescale=1.0e4, axis...
  function subsequent_mask (line 122) | def subsequent_mask(length):
  function fused_add_tanh_sigmoid_multiply (line 128) | def fused_add_tanh_sigmoid_multiply(input_a, input_b, n_channels):
  function convert_pad_shape (line 137) | def convert_pad_shape(pad_shape):
  function shift_1d (line 143) | def shift_1d(x):
  function sequence_mask (line 148) | def sequence_mask(length, max_length=None):
  function generate_path (line 155) | def generate_path(duration, mask):
  function clip_grad_value_ (line 173) | def clip_grad_value_(parameters, clip_value, norm_type=2):

FILE: modules/agent/svc/hubert/hubert_model.py
  class Hubert (line 11) | class Hubert(nn.Module):
    method __init__ (line 12) | def __init__(self, num_label_embeddings: int = 100, mask: bool = True):
    method mask (line 31) | def mask(self, x: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]:
    method encode (line 38) | def encode(
    method logits (line 49) | def logits(self, x: torch.Tensor) -> torch.Tensor:
    method forward (line 57) | def forward(self, x: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]:
  class HubertSoft (line 64) | class HubertSoft(Hubert):
    method __init__ (line 65) | def __init__(self):
    method units (line 69) | def units(self, wav: torch.Tensor) -> torch.Tensor:
  class FeatureExtractor (line 75) | class FeatureExtractor(nn.Module):
    method __init__ (line 76) | def __init__(self):
    method forward (line 87) | def forward(self, x: torch.Tensor) -> torch.Tensor:
  class FeatureProjection (line 98) | class FeatureProjection(nn.Module):
    method __init__ (line 99) | def __init__(self):
    method forward (line 105) | def forward(self, x: torch.Tensor) -> torch.Tensor:
  class PositionalConvEmbedding (line 112) | class PositionalConvEmbedding(nn.Module):
    method __init__ (line 113) | def __init__(self):
    method forward (line 124) | def forward(self, x: torch.Tensor) -> torch.Tensor:
  class TransformerEncoder (line 130) | class TransformerEncoder(nn.Module):
    method __init__ (line 131) | def __init__(
    method forward (line 140) | def forward(
  function _compute_mask (line 155) | def _compute_mask(
  function hubert_soft (line 210) | def hubert_soft(

FILE: modules/agent/svc/hubert/hubert_model_onnx.py
  class Hubert (line 11) | class Hubert(nn.Module):
    method __init__ (line 12) | def __init__(self, num_label_embeddings: int = 100, mask: bool = True):
    method mask (line 31) | def mask(self, x: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]:
    method encode (line 38) | def encode(
    method logits (line 49) | def logits(self, x: torch.Tensor) -> torch.Tensor:
  class HubertSoft (line 58) | class HubertSoft(Hubert):
    method __init__ (line 59) | def __init__(self):
    method units (line 62) | def units(self, wav: torch.Tensor) -> torch.Tensor:
    method forward (line 67) | def forward(self, x):
  class FeatureExtractor (line 70) | class FeatureExtractor(nn.Module):
    method __init__ (line 71) | def __init__(self):
    method forward (line 82) | def forward(self, x: torch.Tensor) -> torch.Tensor:
  class FeatureProjection (line 93) | class FeatureProjection(nn.Module):
    method __init__ (line 94) | def __init__(self):
    method forward (line 100) | def forward(self, x: torch.Tensor) -> torch.Tensor:
  class PositionalConvEmbedding (line 107) | class PositionalConvEmbedding(nn.Module):
    method __init__ (line 108) | def __init__(self):
    method forward (line 119) | def forward(self, x: torch.Tensor) -> torch.Tensor:
  class TransformerEncoder (line 125) | class TransformerEncoder(nn.Module):
    method __init__ (line 126) | def __init__(
    method forward (line 135) | def forward(
  function _compute_mask (line 150) | def _compute_mask(
  function hubert_soft (line 205) | def hubert_soft(

FILE: modules/agent/svc/inference/infer_tool.py
  function read_temp (line 24) | def read_temp(file_name):
  function write_temp (line 47) | def write_temp(file_name, data):
  function timeit (line 52) | def timeit(func):
  function format_wav (line 62) | def format_wav(audio_path):
  function get_end_file (line 69) | def get_end_file(dir_path, end):
  function get_md5 (line 80) | def get_md5(content):
  function resize2d_f0 (line 84) | def resize2d_f0(x, target_len):
  function get_f0 (line 92) | def get_f0(x, p_len,f0_up_key=0):
  function clean_pitch (line 116) | def clean_pitch(input_pitch):
  function plt_pitch (line 123) | def plt_pitch(input_pitch):
  function f0_to_pitch (line 129) | def f0_to_pitch(ff):
  function fill_a_to_b (line 134) | def fill_a_to_b(a, b):
  function mkdir (line 140) | def mkdir(paths: list):
  class Svc (line 146) | class Svc(object):
    method __init__ (line 147) | def __init__(self, net_g_path, config_path, hubert_path="hubert/hubert...
    method load_model (line 173) | def load_model(self):
    method get_units (line 195) | def get_units(self, source, sr):
    method get_unit_pitch (line 206) | def get_unit_pitch(self, in_path, tran):
    method infer (line 215) | def infer(self, speaker_id, tran, raw_path):
  class RealTimeVC (line 303) | class RealTimeVC:
    method __init__ (line 304) | def __init__(self):
    method process (line 312) | def process(self, svc_model, speaker_id, f_pitch_change, input_wav_path):

FILE: modules/agent/svc/inference/infer_tool_grad.py
  function resize2d_f0 (line 23) | def resize2d_f0(x, target_len):
  function get_f0 (line 31) | def get_f0(x, p_len,f0_up_key=0):
  function clean_pitch (line 55) | def clean_pitch(input_pitch):
  function plt_pitch (line 62) | def plt_pitch(input_pitch):
  function f0_to_pitch (line 68) | def f0_to_pitch(ff):
  function fill_a_to_b (line 73) | def fill_a_to_b(a, b):
  function mkdir (line 79) | def mkdir(paths: list):
  class VitsSvc (line 85) | class VitsSvc(object):
    method __init__ (line 86) | def __init__(self):
    method set_device (line 93) | def set_device(self, device):
    method loadCheckpoint (line 99) | def loadCheckpoint(self, path):
    method get_units (line 109) | def get_units(self, source, sr):
    method get_unit_pitch (line 116) | def get_unit_pitch(self, in_path, tran):
    method infer (line 125) | def infer(self, speaker_id, tran, raw_path):
    method inference (line 137) | def inference(self,srcaudio,chara,tran,slice_db):

FILE: modules/agent/svc/inference/slicer.py
  class Slicer (line 6) | class Slicer:
    method __init__ (line 7) | def __init__(self,
    method _apply_slice (line 26) | def _apply_slice(self, waveform, begin, end):
    method slice (line 33) | def slice(self, waveform):
  function cut (line 120) | def cut(audio_path, db_thresh=-30, min_len=5000):
  function chunks2audio (line 131) | def chunks2audio(audio_path, chunks):

FILE: modules/agent/svc/inference_main.py
  function infer_to (line 23) | def infer_to(spk, tran, voice,model):

FILE: modules/agent/svc/models.py
  class ResidualCouplingBlock (line 13) | class ResidualCouplingBlock(nn.Module):
    method __init__ (line 14) | def __init__(self,
    method forward (line 36) | def forward(self, x, x_mask, g=None, reverse=False):
  class Encoder (line 46) | class Encoder(nn.Module):
    method __init__ (line 47) | def __init__(self,
    method forward (line 68) | def forward(self, x, x_lengths, g=None):
  class TextEncoder (line 79) | class TextEncoder(nn.Module):
    method __init__ (line 80) | def __init__(self,
    method forward (line 111) | def forward(self, x, x_lengths, f0=None):
  class DiscriminatorP (line 124) | class DiscriminatorP(torch.nn.Module):
    method __init__ (line 125) | def __init__(self, period, kernel_size=5, stride=3, use_spectral_norm=...
    method forward (line 139) | def forward(self, x):
  class DiscriminatorS (line 161) | class DiscriminatorS(torch.nn.Module):
    method __init__ (line 162) | def __init__(self, use_spectral_norm=False):
    method forward (line 175) | def forward(self, x):
  class MultiPeriodDiscriminator (line 189) | class MultiPeriodDiscriminator(torch.nn.Module):
    method __init__ (line 190) | def __init__(self, use_spectral_norm=False):
    method forward (line 198) | def forward(self, y, y_hat):
  class SpeakerEncoder (line 214) | class SpeakerEncoder(torch.nn.Module):
    method __init__ (line 215) | def __init__(self, mel_n_channels=80, model_num_layers=3, model_hidden...
    method forward (line 221) | def forward(self, mels):
    method compute_partial_slices (line 227) | def compute_partial_slices(self, total_frames, partial_frames, partial...
    method embed_utterance (line 235) | def embed_utterance(self, mel, partial_frames=128, partial_hop=64):
  class SynthesizerTrn (line 256) | class SynthesizerTrn(nn.Module):
    method __init__ (line 261) | def __init__(self,
    method forward (line 318) | def forward(self, c, f0, spec, g=None, mel=None, c_lengths=None, spec_...
    method infer (line 337) | def infer(self, c, f0, g=None, mel=None, c_lengths=None):

FILE: modules/agent/svc/modules.py
  class LayerNorm (line 15) | class LayerNorm(nn.Module):
    method __init__ (line 16) | def __init__(self, channels, eps=1e-5):
    method forward (line 24) | def forward(self, x):
  class ConvReluNorm (line 30) | class ConvReluNorm(nn.Module):
    method __init__ (line 31) | def __init__(self, in_channels, hidden_channels, out_channels, kernel_...
    method forward (line 55) | def forward(self, x, x_mask):
  class DDSConv (line 65) | class DDSConv(nn.Module):
    method __init__ (line 69) | def __init__(self, channels, kernel_size, n_layers, p_dropout=0.):
    method forward (line 91) | def forward(self, x, x_mask, g=None):
  class WN (line 106) | class WN(torch.nn.Module):
    method __init__ (line 107) | def __init__(self, hidden_channels, kernel_size, dilation_rate, n_laye...
    method forward (line 143) | def forward(self, x, x_mask, g=None, **kwargs):
    method remove_weight_norm (line 173) | def remove_weight_norm(self):
  class ResBlock1 (line 182) | class ResBlock1(torch.nn.Module):
    method __init__ (line 183) | def __init__(self, channels, kernel_size=3, dilation=(1, 3, 5)):
    method forward (line 205) | def forward(self, x, x_mask=None):
    method remove_weight_norm (line 220) | def remove_weight_norm(self):
  class ResBlock2 (line 227) | class ResBlock2(torch.nn.Module):
    method __init__ (line 228) | def __init__(self, channels, kernel_size=3, dilation=(1, 3)):
    method forward (line 238) | def forward(self, x, x_mask=None):
    method remove_weight_norm (line 249) | def remove_weight_norm(self):
  class Log (line 254) | class Log(nn.Module):
    method forward (line 255) | def forward(self, x, x_mask, reverse=False, **kwargs):
  class Flip (line 265) | class Flip(nn.Module):
    method forward (line 266) | def forward(self, x, *args, reverse=False, **kwargs):
  class ElementwiseAffine (line 275) | class ElementwiseAffine(nn.Module):
    method __init__ (line 276) | def __init__(self, channels):
    method forward (line 282) | def forward(self, x, x_mask, reverse=False, **kwargs):
  class ResidualCouplingLayer (line 293) | class ResidualCouplingLayer(nn.Module):
    method __init__ (line 294) | def __init__(self,
    method forward (line 319) | def forward(self, x, x_mask, g=None, reverse=False):

FILE: modules/agent/svc/utils.py
  function f0_to_coarse (line 27) | def f0_to_coarse(f0):
  function get_hubert_model (line 39) | def get_hubert_model(rank=None):
  function get_hubert_content (line 46) | def get_hubert_content(hmodel, y=None, path=None):
  function get_content (line 60) | def get_content(cmodel, y):
  function transform (line 68) | def transform(mel, height): # 68-92
  function stretch (line 81) | def stretch(mel, width): # 0.5-2
  function load_checkpoint (line 85) | def load_checkpoint(checkpoint_path, model, optimizer=None):
  function save_checkpoint (line 117) | def save_checkpoint(model, optimizer, learning_rate, iteration, checkpoi...
  function summarize (line 136) | def summarize(writer, global_step, scalars={}, histograms={}, images={},...
  function latest_checkpoint_path (line 147) | def latest_checkpoint_path(dir_path, regex="G_*.pth"):
  function plot_spectrogram_to_numpy (line 155) | def plot_spectrogram_to_numpy(spectrogram):
  function plot_alignment_to_numpy (line 181) | def plot_alignment_to_numpy(alignment, info=None):
  function load_wav_to_torch (line 210) | def load_wav_to_torch(full_path):
  function load_filepaths_and_text (line 215) | def load_filepaths_and_text(filename, split="|"):
  function get_hparams (line 221) | def get_hparams(init=True):
  function get_hparams_from_dir (line 251) | def get_hparams_from_dir(model_dir):
  function get_hparams_from_file (line 262) | def get_hparams_from_file(config_path):
  function check_git_hash (line 271) | def check_git_hash(model_dir):
  function get_logger (line 291) | def get_logger(model_dir, filename="train.log"):
  class HParams (line 306) | class HParams():
    method __init__ (line 307) | def __init__(self, **kwargs):
    method keys (line 313) | def keys(self):
    method items (line 316) | def items(self):
    method values (line 319) | def values(self):
    method __len__ (line 322) | def __len__(self):
    method __getitem__ (line 325) | def __getitem__(self, key):
    method __setitem__ (line 328) | def __setitem__(self, key, value):
    method __contains__ (line 331) | def __contains__(self, key):
    method __repr__ (line 334) | def __repr__(self):

FILE: modules/agent/svc/vdecoder/hifigan/env.py
  class AttrDict (line 5) | class AttrDict(dict):
    method __init__ (line 6) | def __init__(self, *args, **kwargs):
  function build_env (line 11) | def build_env(config, config_name, path):

FILE: modules/agent/svc/vdecoder/hifigan/models.py
  function load_model (line 15) | def load_model(model_path, device='cuda'):
  class ResBlock1 (line 34) | class ResBlock1(torch.nn.Module):
    method __init__ (line 35) | def __init__(self, h, channels, kernel_size=3, dilation=(1, 3, 5)):
    method forward (line 58) | def forward(self, x):
    method remove_weight_norm (line 67) | def remove_weight_norm(self):
  class ResBlock2 (line 74) | class ResBlock2(torch.nn.Module):
    method __init__ (line 75) | def __init__(self, h, channels, kernel_size=3, dilation=(1, 3)):
    method forward (line 86) | def forward(self, x):
    method remove_weight_norm (line 93) | def remove_weight_norm(self):
  function padDiff (line 98) | def padDiff(x):
  class SineGen (line 101) | class SineGen(torch.nn.Module):
    method __init__ (line 117) | def __init__(self, samp_rate, harmonic_num=0,
    method _f02uv (line 130) | def _f02uv(self, f0):
    method _f02sine (line 135) | def _f02sine(self, f0_values):
    method forward (line 194) | def forward(self, f0):
  class SourceModuleHnNSF (line 227) | class SourceModuleHnNSF(torch.nn.Module):
    method __init__ (line 245) | def __init__(self, sampling_rate, harmonic_num=0, sine_amp=0.1,
    method forward (line 260) | def forward(self, x):
  class Generator (line 276) | class Generator(torch.nn.Module):
    method __init__ (line 277) | def __init__(self, h):
    method forward (line 313) | def forward(self, x, f0, g=None):
    method remove_weight_norm (line 342) | def remove_weight_norm(self):
  class DiscriminatorP (line 352) | class DiscriminatorP(torch.nn.Module):
    method __init__ (line 353) | def __init__(self, period, kernel_size=5, stride=3, use_spectral_norm=...
    method forward (line 366) | def forward(self, x):
  class MultiPeriodDiscriminator (line 388) | class MultiPeriodDiscriminator(torch.nn.Module):
    method __init__ (line 389) | def __init__(self, periods=None):
    method forward (line 396) | def forward(self, y, y_hat):
  class DiscriminatorS (line 412) | class DiscriminatorS(torch.nn.Module):
    method __init__ (line 413) | def __init__(self, use_spectral_norm=False):
    method forward (line 427) | def forward(self, x):
  class MultiScaleDiscriminator (line 440) | class MultiScaleDiscriminator(torch.nn.Module):
    method __init__ (line 441) | def __init__(self):
    method forward (line 453) | def forward(self, y, y_hat):
  function feature_loss (line 472) | def feature_loss(fmap_r, fmap_g):
  function discriminator_loss (line 481) | def discriminator_loss(disc_real_outputs, disc_generated_outputs):
  function generator_loss (line 495) | def generator_loss(disc_outputs):

FILE: modules/agent/svc/vdecoder/hifigan/nvSTFT.py
  function load_wav_to_torch (line 14) | def load_wav_to_torch(full_path, target_sr=None, return_empty_on_excepti...
  function dynamic_range_compression (line 46) | def dynamic_range_compression(x, C=1, clip_val=1e-5):
  function dynamic_range_decompression (line 49) | def dynamic_range_decompression(x, C=1):
  function dynamic_range_compression_torch (line 52) | def dynamic_range_compression_torch(x, C=1, clip_val=1e-5):
  function dynamic_range_decompression_torch (line 55) | def dynamic_range_decompression_torch(x, C=1):
  class STFT (line 58) | class STFT():
    method __init__ (line 59) | def __init__(self, sr=22050, n_mels=80, n_fft=1024, win_size=1024, hop...
    method get_mel (line 72) | def get_mel(self, y, center=False):
    method __call__ (line 106) | def __call__(self, audiopath):

FILE: modules/agent/svc/vdecoder/hifigan/utils.py
  function plot_spectrogram (line 10) | def plot_spectrogram(spectrogram):
  function init_weights (line 22) | def init_weights(m, mean=0.0, std=0.01):
  function apply_weight_norm (line 28) | def apply_weight_norm(m):
  function get_padding (line 34) | def get_padding(kernel_size, dilation=1):
  function load_checkpoint (line 38) | def load_checkpoint(filepath, device):
  function save_checkpoint (line 46) | def save_checkpoint(filepath, obj):
  function del_old_checkpoints (line 52) | def del_old_checkpoints(cp_dir, prefix, n_models=2):
  function scan_checkpoint (line 62) | def scan_checkpoint(cp_dir, prefix):

FILE: modules/agent/svc/vits_haruhi.py
  function set_model_path (line 6) | def set_model_path(path):
  function vits_haruhi (line 10) | def vits_haruhi(voice_style,filename, tran,model):

FILE: modules/agent/tts_online.py
  function tts (line 14) | def tts(text, spd, lang, filename):
  function get_voice (line 64) | def get_voice(text, spd, filename, gen_type, lang):

FILE: modules/agent/vits/attentions.py
  class Encoder (line 10) | class Encoder(nn.Module):
    method __init__ (line 11) | def __init__(self, hidden_channels, filter_channels, n_heads, n_layers...
    method forward (line 32) | def forward(self, x, x_mask):
  class Decoder (line 47) | class Decoder(nn.Module):
    method __init__ (line 48) | def __init__(self, hidden_channels, filter_channels, n_heads, n_layers...
    method forward (line 74) | def forward(self, x, x_mask, h, h_mask):
  class MultiHeadAttention (line 98) | class MultiHeadAttention(nn.Module):
    method __init__ (line 99) | def __init__(self, channels, out_channels, n_heads, p_dropout=0., wind...
    method forward (line 135) | def forward(self, x, c, attn_mask=None):
    method attention (line 145) | def attention(self, query, key, value, mask=None):
    method _matmul_with_relative_values (line 178) | def _matmul_with_relative_values(self, x, y):
    method _matmul_with_relative_keys (line 187) | def _matmul_with_relative_keys(self, x, y):
    method _get_relative_embeddings (line 196) | def _get_relative_embeddings(self, relative_embeddings, length):
    method _relative_position_to_absolute_position (line 211) | def _relative_position_to_absolute_position(self, x):
    method _absolute_position_to_relative_position (line 228) | def _absolute_position_to_relative_position(self, x):
    method _attention_bias_proximal (line 242) | def _attention_bias_proximal(self, length):
  class FFN (line 254) | class FFN(nn.Module):
    method __init__ (line 255) | def __init__(self, in_channels, out_channels, filter_channels, kernel_...
    method forward (line 274) | def forward(self, x, x_mask):
    method _causal_padding (line 284) | def _causal_padding(self, x):
    method _same_padding (line 293) | def _same_padding(self, x):

FILE: modules/agent/vits/commons.py
  function script_method (line 7) | def script_method(fn, _rcb=None):
  function script (line 11) | def script(obj, optimize=True, _frames_up=0, _rcb=None):
  function init_weights (line 19) | def init_weights(m, mean=0.0, std=0.01):
  function get_padding (line 25) | def get_padding(kernel_size, dilation=1):
  function convert_pad_shape (line 29) | def convert_pad_shape(pad_shape):
  function intersperse (line 35) | def intersperse(lst, item):
  function kl_divergence (line 41) | def kl_divergence(m_p, logs_p, m_q, logs_q):
  function rand_gumbel (line 48) | def rand_gumbel(shape):
  function rand_gumbel_like (line 54) | def rand_gumbel_like(x):
  function slice_segments (line 59) | def slice_segments(x, ids_str, segment_size=4):
  function rand_slice_segments (line 68) | def rand_slice_segments(x, x_lengths=None, segment_size=4):
  function get_timing_signal_1d (line 78) | def get_timing_signal_1d(
  function add_timing_signal_1d (line 94) | def add_timing_signal_1d(x, min_timescale=1.0, max_timescale=1.0e4):
  function cat_timing_signal_1d (line 100) | def cat_timing_signal_1d(x, min_timescale=1.0, max_timescale=1.0e4, axis...
  function subsequent_mask (line 106) | def subsequent_mask(length):
  function fused_add_tanh_sigmoid_multiply (line 112) | def fused_add_tanh_sigmoid_multiply(input_a, input_b, n_channels):
  function convert_pad_shape (line 121) | def convert_pad_shape(pad_shape):
  function shift_1d (line 127) | def shift_1d(x):
  function sequence_mask (line 132) | def sequence_mask(length, max_length=None):
  function generate_path (line 139) | def generate_path(duration, mask):
  function clip_grad_value_ (line 157) | def clip_grad_value_(parameters, clip_value, norm_type=2):

FILE: modules/agent/vits/mel_processing.py
  function dynamic_range_compression_torch (line 8) | def dynamic_range_compression_torch(x, C=1, clip_val=1e-5):
  function dynamic_range_decompression_torch (line 17) | def dynamic_range_decompression_torch(x, C=1):
  function spectral_normalize_torch (line 26) | def spectral_normalize_torch(magnitudes):
  function spectral_de_normalize_torch (line 31) | def spectral_de_normalize_torch(magnitudes):
  function spectrogram_torch (line 40) | def spectrogram_torch(y, n_fft, sampling_rate, hop_size, win_size, cente...
  function spec_to_mel_torch (line 62) | def spec_to_mel_torch(spec, n_fft, num_mels, sampling_rate, fmin, fmax):
  function mel_spectrogram_torch (line 74) | def mel_spectrogram_torch(y, n_fft, num_mels, sampling_rate, hop_size, w...

FILE: modules/agent/vits/models.py
  class StochasticDurationPredictor (line 13) | class StochasticDurationPredictor(nn.Module):
    method __init__ (line 14) | def __init__(self, in_channels, filter_channels, kernel_size, p_dropou...
    method forward (line 46) | def forward(self, x, x_mask, w=None, g=None, reverse=False, noise_scal...
  class DurationPredictor (line 94) | class DurationPredictor(nn.Module):
    method __init__ (line 95) | def __init__(self, in_channels, filter_channels, kernel_size, p_dropou...
    method forward (line 114) | def forward(self, x, x_mask, g=None):
  class TextEncoder (line 131) | class TextEncoder(nn.Module):
    method __init__ (line 132) | def __init__(self,
    method forward (line 163) | def forward(self, x, x_lengths):
  class ResidualCouplingBlock (line 175) | class ResidualCouplingBlock(nn.Module):
    method __init__ (line 176) | def __init__(self,
    method forward (line 198) | def forward(self, x, x_mask, g=None, reverse=False):
  class PosteriorEncoder (line 208) | class PosteriorEncoder(nn.Module):
    method __init__ (line 209) | def __init__(self,
    method forward (line 230) | def forward(self, x, x_lengths, g=None):
  class Generator (line 240) | class Generator(torch.nn.Module):
    method __init__ (line 241) | def __init__(self, initial_channel, resblock, resblock_kernel_sizes, r...
    method forward (line 266) | def forward(self, x, g=None):
    method remove_weight_norm (line 287) | def remove_weight_norm(self):
  class DiscriminatorP (line 295) | class DiscriminatorP(torch.nn.Module):
    method __init__ (line 296) | def __init__(self, period, kernel_size=5, stride=3, use_spectral_norm=...
    method forward (line 310) | def forward(self, x):
  class DiscriminatorS (line 332) | class DiscriminatorS(torch.nn.Module):
    method __init__ (line 333) | def __init__(self, use_spectral_norm=False):
    method forward (line 346) | def forward(self, x):
  class MultiPeriodDiscriminator (line 360) | class MultiPeriodDiscriminator(torch.nn.Module):
    method __init__ (line 361) | def __init__(self, use_spectral_norm=False):
    method forward (line 369) | def forward(self, y, y_hat):
  class SynthesizerTrn (line 386) | class SynthesizerTrn(nn.Module):
    method __init__ (line 391) | def __init__(self,
    method forward (line 455) | def forward(self, x, x_lengths, y, y_lengths, sid=None):
    method infer (line 495) | def infer(self, x, x_lengths, sid=None, noise_scale=1, length_scale=1,...
    method voice_conversion (line 521) | def voice_conversion(self, y, y_lengths, sid_src, sid_tgt):

FILE: modules/agent/vits/modules.py
  class LayerNorm (line 17) | class LayerNorm(nn.Module):
    method __init__ (line 18) | def __init__(self, channels, eps=1e-5):
    method forward (line 26) | def forward(self, x):
  class ConvReluNorm (line 32) | class ConvReluNorm(nn.Module):
    method __init__ (line 33) | def __init__(self, in_channels, hidden_channels, out_channels, kernel_...
    method forward (line 57) | def forward(self, x, x_mask):
  class DDSConv (line 67) | class DDSConv(nn.Module):
    method __init__ (line 71) | def __init__(self, channels, kernel_size, n_layers, p_dropout=0.):
    method forward (line 93) | def forward(self, x, x_mask, g=None):
  class WN (line 108) | class WN(torch.nn.Module):
    method __init__ (line 109) | def __init__(self, hidden_channels, kernel_size, dilation_rate, n_laye...
    method forward (line 145) | def forward(self, x, x_mask, g=None, **kwargs):
    method remove_weight_norm (line 175) | def remove_weight_norm(self):
  class ResBlock1 (line 184) | class ResBlock1(torch.nn.Module):
    method __init__ (line 185) | def __init__(self, channels, kernel_size=3, dilation=(1, 3, 5)):
    method forward (line 207) | def forward(self, x, x_mask=None):
    method remove_weight_norm (line 222) | def remove_weight_norm(self):
  class ResBlock2 (line 229) | class ResBlock2(torch.nn.Module):
    method __init__ (line 230) | def __init__(self, channels, kernel_size=3, dilation=(1, 3)):
    method forward (line 240) | def forward(self, x, x_mask=None):
    method remove_weight_norm (line 251) | def remove_weight_norm(self):
  class Log (line 256) | class Log(nn.Module):
    method forward (line 257) | def forward(self, x, x_mask, reverse=False, **kwargs):
  class Flip (line 267) | class Flip(nn.Module):
    method forward (line 268) | def forward(self, x, *args, reverse=False, **kwargs):
  class ElementwiseAffine (line 277) | class ElementwiseAffine(nn.Module):
    method __init__ (line 278) | def __init__(self, channels):
    method forward (line 284) | def forward(self, x, x_mask, reverse=False, **kwargs):
  class ResidualCouplingLayer (line 295) | class ResidualCouplingLayer(nn.Module):
    method __init__ (line 296) | def __init__(self,
    method forward (line 321) | def forward(self, x, x_mask, g=None, reverse=False):
  class ConvFlow (line 343) | class ConvFlow(nn.Module):
    method __init__ (line 344) | def __init__(self, in_channels, filter_channels, kernel_size, n_layers...
    method forward (line 360) | def forward(self, x, x_mask, g=None, reverse=False):

FILE: modules/agent/vits/monotonic_align/__init__.py
  function maximum_path (line 7) | def maximum_path(neg_cent, mask):

FILE: modules/agent/vits/monotonic_align/core.py
  function maximum_path_jit (line 6) | def maximum_path_jit(paths, values, t_ys, t_xs):

FILE: modules/agent/vits/text/__init__.py
  function text_to_sequence (line 11) | def text_to_sequence(text, symbols, cleaner_names):
  function cleaned_text_to_sequence (line 31) | def cleaned_text_to_sequence(cleaned_text):
  function sequence_to_text (line 42) | def sequence_to_text(sequence):
  function _clean_text (line 51) | def _clean_text(text, cleaner_names):

FILE: modules/agent/vits/text/cleaners.py
  function expand_abbreviations (line 207) | def expand_abbreviations(text):
  function lowercase (line 213) | def lowercase(text):
  function collapse_whitespace (line 217) | def collapse_whitespace(text):
  function convert_to_ascii (line 221) | def convert_to_ascii(text):
  function japanese_to_romaji_with_accent (line 225) | def japanese_to_romaji_with_accent(text):
  function latin_to_hangul (line 267) | def latin_to_hangul(text):
  function divide_hangul (line 273) | def divide_hangul(text):
  function hangul_number (line 279) | def hangul_number(num, sino=True):
  function number_to_hangul (line 358) | def number_to_hangul(text):
  function number_to_chinese (line 376) | def number_to_chinese(text):
  function chinese_to_bopomofo (line 383) | def chinese_to_bopomofo(text):
  function latin_to_bopomofo (line 401) | def latin_to_bopomofo(text):
  function bopomofo_to_romaji (line 407) | def bopomofo_to_romaji(text):
  function basic_cleaners (line 413) | def basic_cleaners(text):
  function transliteration_cleaners (line 420) | def transliteration_cleaners(text):
  function japanese_cleaners (line 428) | def japanese_cleaners(text):
  function japanese_cleaners2 (line 435) | def japanese_cleaners2(text):
  function korean_cleaners (line 439) | def korean_cleaners(text):
  function chinese_cleaners (line 450) | def chinese_cleaners(text):
  function zh_ja_mixture_cleaners (line 460) | def zh_ja_mixture_cleaners(text):

FILE: modules/agent/vits/transforms.py
  function piecewise_rational_quadratic_transform (line 12) | def piecewise_rational_quadratic_transform(inputs,
  function searchsorted (line 47) | def searchsorted(bin_locations, inputs, eps=1e-6):
  function unconstrained_rational_quadratic_spline (line 55) | def unconstrained_rational_quadratic_spline(inputs,
  function rational_quadratic_spline (line 96) | def rational_quadratic_spline(inputs,

FILE: modules/agent/vits/utils.py
  function load_checkpoint (line 17) | def load_checkpoint(checkpoint_path, model, optimizer=None):
  function plot_spectrogram_to_numpy (line 45) | def plot_spectrogram_to_numpy(spectrogram):
  function plot_alignment_to_numpy (line 71) | def plot_alignment_to_numpy(alignment, info=None):
  function load_audio_to_torch (line 100) | def load_audio_to_torch(full_path, target_sampling_rate):
  function load_filepaths_and_text (line 105) | def load_filepaths_and_text(filename, split="|"):
  function get_hparams (line 111) | def get_hparams(init=True):
  function get_hparams_from_dir (line 141) | def get_hparams_from_dir(model_dir):
  function get_hparams_from_file (line 152) | def get_hparams_from_file(config_path):
  function check_git_hash (line 161) | def check_git_hash(model_dir):
  function get_logger (line 181) | def get_logger(model_dir, filename="train.log"):
  class HParams (line 196) | class HParams():
    method __init__ (line 197) | def __init__(self, **kwargs):
    method keys (line 203) | def keys(self):
    method items (line 206) | def items(self):
    method values (line 209) | def values(self):
    method __len__ (line 212) | def __len__(self):
    method __getitem__ (line 215) | def __getitem__(self, key):
    method __setitem__ (line 218) | def __setitem__(self, key, value):
    method __contains__ (line 221) | def __contains__(self, key):
    method __repr__ (line 224) | def __repr__(self):

FILE: modules/agent/vits/vits.py
  function save_as_wav (line 16) | def save_as_wav(data, filename, sample_rate):
  function get_text (line 42) | def get_text(text, hps, is_symbol):
  function create_tts_fn (line 50) | def create_tts_fn(net_g_ms, speaker_id):
  function tts_fnD (line 75) | def tts_fnD(net_g_ms, speaker_id, text, language, noise_scale, noise_sca...
  function create_to_symbol_fn (line 96) | def create_to_symbol_fn(hps):
  function change_lang (line 109) | def change_lang(language):
  function model_switch (line 118) | def model_switch(models, text, path):
  function vits_factory (line 129) | def vits_factory(text, outputPath, outputLanguage):

FILE: modules/apply/role_play.py
  function image_to_base64 (line 18) | def image_to_base64(file_path):
  class role_play (line 32) | class role_play():
    method __init__ (line 71) | def __init__(self):
    method set_llm (line 82) | def set_llm(self,params):
    method setv (line 114) | def setv(self,params):
    method make_message (line 180) | def make_message(self,text: str):
    method cut_memory (line 190) | def cut_memory(self):
    method message_period_to_now (line 198) | def message_period_to_now(self,message):
    method send_emoticon (line 206) | def send_emoticon(self, text: str):
    method talk (line 250) | def talk(self,text):
    method clear_history (line 336) | def clear_history(self):

FILE: modules/model/Embedding/base.py
  class ModelInfo (line 19) | class ModelInfo:
  function load_model (line 24) | def load_model(
  function train_model (line 64) | def train_model(
  function eval_model (line 123) | def eval_model(

FILE: modules/model/Embedding/text2vec/dataset/base.py
  class BaseDataset (line 10) | class BaseDataset(Dataset):
    method __init__ (line 11) | def __init__(self, tokenizer: PreTrainedTokenizer, data: list, max_len...
    method __len__ (line 16) | def __len__(self):
    method text_2_id (line 19) | def text_2_id(self, text: str):
    method __getitem__ (line 23) | def __getitem__(self, index: int):
    method load_train_data (line 28) | def load_train_data(path):
    method load_test_data (line 50) | def load_test_data(path):

FILE: modules/model/Embedding/text2vec/dataset/bert.py
  class BertMatchTrainDataset (line 11) | class BertMatchTrainDataset(BaseDataset):
    method __init__ (line 12) | def __init__(self, tokenizer: PreTrainedTokenizer, data: list, max_len...
    method text_2_id (line 15) | def text_2_id(self, text_1: str, text_2: str = None):
    method __getitem__ (line 19) | def __getitem__(self, index: int):
  class BertMatchTestDataset (line 24) | class BertMatchTestDataset(BaseDataset):
    method __init__ (line 25) | def __init__(self, tokenizer: PreTrainedTokenizer, data: list, max_len...
    method text_2_id (line 28) | def text_2_id(self, text_1: str, text_2: str = None):
    method __getitem__ (line 32) | def __getitem__(self, index: int):

FILE: modules/model/Embedding/text2vec/dataset/cosent.py
  class CosentTrainDataset (line 11) | class CosentTrainDataset(BaseDataset):
    method __init__ (line 12) | def __init__(self, tokenizer: PreTrainedTokenizer, data: list, max_len...
    method __getitem__ (line 15) | def __getitem__(self, index: int):
    method load_train_data (line 20) | def load_train_data(path):
  class CosentTestDataset (line 38) | class CosentTestDataset(BaseDataset):
    method __init__ (line 39) | def __init__(self, tokenizer: PreTrainedTokenizer, data: list, max_len...

FILE: modules/model/Embedding/text2vec/dataset/sentencebert.py
  class SentenceBertTrainDataset (line 11) | class SentenceBertTrainDataset(BaseDataset):
    method __init__ (line 12) | def __init__(self, tokenizer: PreTrainedTokenizer, data: list, max_len...
  class SentenceBertTestDataset (line 16) | class SentenceBertTestDataset(BaseDataset):
    method __init__ (line 17) | def __init__(self, tokenizer: PreTrainedTokenizer, data: list, max_len...

FILE: modules/model/Embedding/text2vec/model/base.py
  class BaseModel (line 25) | class BaseModel:
    method __init__ (line 26) | def __init__(
    method __str__ (line 71) | def __str__(self):
    method clear (line 80) | def clear(self):
    method save_model (line 84) | def save_model(self, output_dir, model, results=None):
  class BaseSentenceModel (line 102) | class BaseSentenceModel(BaseModel):
    method __init__ (line 103) | def __init__(
    method get_sentence_embedding_dimension (line 131) | def get_sentence_embedding_dimension(self):
    method get_sentence_embeddings (line 134) | def get_sentence_embeddings(self, input_ids, attention_mask, token_typ...
    method encode (line 169) | def encode(
    method evaluate (line 213) | def evaluate(self, eval_dataset, output_dir: str = None, batch_size: i...
    method eval_model (line 260) | def eval_model(self, eval_dataset: Dataset, output_dir: str = None, ve...

FILE: modules/model/Embedding/text2vec/model/bert.py
  class BertMatchModel (line 22) | class BertMatchModel(BaseModel):
    class BertMatchModule (line 23) | class BertMatchModule(nn.Module):
      method __init__ (line 24) | def __init__(
      method forward (line 39) | def forward(self, input_ids, token_type_ids, attention_mask, labels=...
    method __init__ (line 47) | def __init__(
    method evaluate (line 69) | def evaluate(self, eval_dataset, output_dir: str = None, batch_size: i...
    method eval_model (line 109) | def eval_model(self, eval_dataset: Dataset, output_dir: str = None, ve...
    method train (line 118) | def train(
    method save_best_or_last_model (line 260) | def save_best_or_last_model(self, eval_dataset,results,final_model,bes...

FILE: modules/model/Embedding/text2vec/model/cosent.py
  class CosentModel (line 22) | class CosentModel(BaseSentenceModel):
    method __init__ (line 23) | def __init__(
    method calc_loss (line 41) | def calc_loss(self, y_true, y_pred):
    method train (line 63) | def train(
    method save_best_or_last_model (line 209) | def save_best_or_last_model(self, eval_dataset,results,final_model,bes...

FILE: modules/model/Embedding/text2vec/model/sentencebert.py
  class SentenceBertModel (line 22) | class SentenceBertModel(BaseSentenceModel):
    method __init__ (line 23) | def __init__(
    method concat_embeddings (line 41) | def concat_embeddings(self, source_embeddings, target_embeddings):
    method calc_loss (line 49) | def calc_loss(self, y_true, y_pred):
    method train (line 53) | def train(
    method save_best_or_last_model (line 206) | def save_best_or_last_model(self, eval_dataset,results,final_model,bes...

FILE: modules/model/Embedding/text2vec/utils/base.py
  function set_seed (line 11) | def set_seed(seed):
  function l2_normalize (line 23) | def l2_normalize(vecs):
  function compute_spearmanr (line 31) | def compute_spearmanr(x, y):
  function compute_pearsonr (line 38) | def compute_pearsonr(x, y):
  class EncoderType (line 45) | class EncoderType(Enum):
    method __str__ (line 52) | def __str__(self):
    method from_string (line 56) | def from_string(s):
  class ModelArch (line 63) | class ModelArch(Enum):
    method __str__ (line 68) | def __str__(self):
    method from_string (line 72) | def from_string(s):

FILE: modules/model/LLM/train.py
  function evaluate (line 35) | def evaluate(args, model, eval_dataloader, accelerator):
  function get_train_valid_data (line 65) | def get_train_valid_data(dir):
  function read_json (line 86) | def read_json(path):
  function parse_args (line 91) | def parse_args():
  function main (line 258) | def main():
  function save_model (line 481) | def save_model(args, model, eval_dataloader, accelerator, epoch, best_me...

FILE: modules/model/LLM/train_dpo.py
  function evaluate (line 37) | def evaluate(model, eval_dataloader, accelerator):
  function get_train_valid_data (line 75) | def get_train_valid_data(dir):
  function read_json (line 96) | def read_json(path):
  function parse_args (line 101) | def parse_args():
  function dpo_preprocess (line 266) | def dpo_preprocess(model_name_or_path, example, tokenizer, max_length):
  function dpo_collator (line 293) | def dpo_collator(features, tokenizer):
  function get_batch_logps (line 325) | def get_batch_logps(
  function concatenated_forward (line 357) | def concatenated_forward(model, batch):
  function dpo_loss (line 378) | def dpo_loss(
  function train_batch (line 415) | def train_batch(
  function main (line 445) | def main():
  function save_model (line 662) | def save_model(args, model, eval_dataloader, accelerator, epoch, best_me...

FILE: modules/model/LLM/train_dpo_luancher.py
  function main (line 5) | def main():

FILE: modules/model/LLM/train_luancher.py
  function main (line 5) | def main():

FILE: modules/model/SparkApi.py
  class Ws_Param (line 18) | class Ws_Param(object):
    method __init__ (line 20) | def __init__(self, APPID, APIKey, APISecret, gpt_url):
    method create_url (line 29) | def create_url(self):
  class Spark_Api (line 63) | class Spark_Api(object):
    method __init__ (line 64) | def __init__(self, appid,
    method create_ws (line 82) | def create_ws(self):
    method _call (line 90) | def _call(self, messages):
    method on_error (line 102) | def on_error(self, ws, error):
    method on_close (line 109) | def on_close(self, ws, *args):
    method on_open (line 116) | def on_open(self, ws, *args):
    method run (line 119) | def run(self, ws, *args):
    method on_message (line 124) | def on_message(self, ws, message):
    method gen_params (line 150) | def gen_params(self):

FILE: modules/model/emb_auto.py
  class AutoEmb (line 13) | class AutoEmb():
    method __init__ (line 14) | def __init__(self,embedding_model):
    method cos_sim (line 22) | def cos_sim(self, a, b):
    method get_embedding (line 26) | def get_embedding(self, text):

FILE: modules/model/llm_auto.py
  function post_process (line 21) | def post_process(text):
  class AutoLM (line 25) | class AutoLM(LLM):
    method __init__ (line 39) | def __init__(self):
    method _llm_type (line 43) | def _llm_type(self) -> str:
    method _call (line 46) | def _call(self,
    method load_model (line 154) | def load_model(self, max_length, top_p=0.7, temperature=0.95,
    method clear (line 204) | def clear(self):

FILE: modules/model/prompt_generator.py
  class prompt_generator (line 3) | class prompt_generator(object):
    method __init__ (line 4) | def __init__(self) -> None:
    method generate_openai_prompt (line 7) | def generate_openai_prompt(self,message='',system_message='',history=N...
    method generate_ernie_prompt (line 18) | def generate_ernie_prompt(self,message='',history=None):
    method generate_chatglm_prompt (line 26) | def generate_chatglm_prompt(self,message='',history=None):
    method generate_spark_prompt (line 34) | def generate_spark_prompt(self,message='',history=None):
    method generate_ali_prompt (line 42) | def generate_ali_prompt(self,message='',history=None):
    method generate_aihubmix_prompt (line 49) | def generate_aihubmix_prompt(self,message='',history=None):

FILE: modules/model/use_api.py
  function get_ernie_access_token (line 27) | def get_ernie_access_token(API_Key, Secret_Key):
  class qwen_api (line 42) | class qwen_api():
    method __init__ (line 43) | def __init__(self):
    method get_embedding (line 46) | def get_embedding(self):
    method setv (line 49) | def setv(self, api_key, top_p=0.8, top_k=100.0, kuake_search=False):
    method get_ones (line 64) | def get_ones(self, message):
    method get_ones_stream (line 102) | def get_ones_stream(self, message):
    method cut_memory (line 141) | def cut_memory(self):
    method talk (line 156) | def talk(self, message, stream=False):
    method clear_history (line 228) | def clear_history(self):
  class spark_api (line 232) | class spark_api():
    method __init__ (line 233) | def __init__(self):
    method get_embedding (line 236) | def get_embedding(self):
    method setv (line 239) | def setv(self, spark_api_key=None, spark_api_secret=None, spark_appid=...
    method get_ones (line 280) | def get_ones(self, message):
    method get_ones_stream (line 307) | def get_ones_stream(self, message):
    method cut_memory (line 333) | def cut_memory(self):
    method talk (line 348) | def talk(self, message, stream=False):
    method clear_history (line 403) | def clear_history(self):
  class aihubmix_api (line 407) | class aihubmix_api():
    method __init__ (line 408) | def __init__(self):
    method get_embedding (line 422) | def get_embedding(self):
    method setv (line 425) | def setv(self, aihubmix_api_key=None, aihubmix_app_code=None):
    method get_ones (line 443) | def get_ones(self, message):
    method get_ones_stream (line 470) | def get_ones_stream(self, message):
    method cut_memory (line 496) | def cut_memory(self):
    method talk (line 511) | def talk(self, message, stream=False):
    method clear_history (line 566) | def clear_history(self):
  class chatglm_api (line 569) | class chatglm_api():
    method __init__ (line 570) | def __init__(self):
    method get_embedding (line 573) | def get_embedding(self):
    method setv (line 576) | def setv(self, api_key=None, temperature=0.95, top_p=0.7, chatglm_type...
    method get_ones (line 592) | def get_ones(self, message):
    method get_ones_stream (line 620) | def get_ones_stream(self, message):
    method cut_memory (line 663) | def cut_memory(self):
    method talk (line 678) | def talk(self, message, stream=False):
    method clear_history (line 730) | def clear_history(self):
  class ernie_api (line 734) | class ernie_api():
    method __init__ (line 735) | def __init__(self) -> None:
    method get_embedding (line 738) | def get_embedding(self):
    method setv (line 741) | def setv(self, ernie_api_key=None, ernie_secret_key=None, ernie_temper...
    method get_ones (line 787) | def get_ones(self, message):
    method get_ones_stream (line 826) | def get_ones_stream(self, message):
    method cut_memory (line 867) | def cut_memory(self):
    method talk (line 882) | def talk(self, message, stream=False):
    method clear_history (line 934) | def clear_history(self):
  class openai_api (line 938) | class openai_api():
    method __init__ (line 939) | def __init__(self):
    method get_embedding (line 942) | def get_embedding(self, openai_api_key, port='', api_base='', api_mode...
    method setv (line 961) | def setv(self, openai_api_key='', api_base='', temperature=0.95, max_t...
    method get_ones (line 1042) | def get_ones(self, text):
    method get_ones_stream (line 1066) | def get_ones_stream(self, text):
    method cut_memory (line 1092) | def cut_memory(self):
    method talk (line 1107) | def talk(self, message, stream=False):
    method clear_history (line 1149) | def clear_history(self):
  class claude (line 1153) | class claude:
    method __init__ (line 1154) | def __init__(self):
    method setv (line 1157) | def setv(self, cookie = ''):
    method talk (line 1172) | def talk(self, prompt, stream = False, attachment = None):
    method upload_attachment (line 1227) | def upload_attachment(self, file_path):
    method clear_history (line 1267) | def clear_history(self):
    method get_organization_id (line 1270) | def get_organization_id(self):
    method get_content_type (line 1288) | def get_content_type(self, file_path):
    method generate_uuid (line 1301) | def generate_uuid(self):
    method create_new_chat (line 1307) | def create_new_chat(self):

FILE: ui/apply.py
  function apply_page (line 6) | def apply_page(localizer):

FILE: ui/apply_knowledge.py
  function get_directories (line 8) | def get_directories(path,unuse):
  function refresh_directories_faiss (line 30) | def refresh_directories_faiss():
  function refresh_directories_mysql (line 41) | def refresh_directories_mysql():
  function model_select (line 46) | def model_select(api, model, lora):
  function api_select (line 53) | def api_select(api, model, lora):
  function emb_model_select (line 73) | def emb_model_select(emb_api_list,emb_model_list):
  function emb_api_select (line 79) | def emb_api_select(emb_api_list,emb_model_list):
  function mysql_model_select (line 89) | def mysql_model_select(api, model):
  function mysql_api_select (line 95) | def mysql_api_select(api, model):
  function load_faiss_params (line 116) | def load_faiss_params(api_list, model_list, lora_list, *args):
  function load_embedding_params (line 176) | def load_embedding_params(doc1,k,score_threshold,chunk_size,chunk_conent...
  function load_mysql_params (line 202) | def load_mysql_params(mysql_api_list,mysql_model_list,*args):
  function get_databases (line 261) | def get_databases(host,user,password,port):
  function show_tables (line 266) | def show_tables(host,user,password,port,database):
  function show_table_data (line 271) | def show_table_data(host,user,password,port,database,table):
  function vec_search (line 285) | def vec_search(faiss_user_input, faiss_chatbot, history,faiss_net,faiss_...
  function apply_knowledge (line 291) | def apply_knowledge(localizer):

FILE: ui/apply_text_image_generation.py
  function get_index (line 6) | def get_index(evt: gr.SelectData):
  function apply_text_image_generation (line 10) | def apply_text_image_generation(localizer):

FILE: ui/apply_video.py
  function get_file (line 6) | def get_file(path,unuse,ftype):
  function get_directories (line 8) | def get_directories(path,unuse):
  function refresh_file (line 39) | def refresh_file():
  function model_select (line 52) | def model_select(api, model, lora):
  function api_select (line 59) | def api_select(api, model, lora):
  function emb_model_select (line 69) | def emb_model_select(emb_api_list,emb_model_list):
  function emb_api_select (line 75) | def emb_api_select(emb_api_list,emb_model_list):
  function load_llm_params (line 85) | def load_llm_params(api_list, model_list, lora_list, *args):
  function load_config_params (line 114) | def load_config_params(play,time_c,emoticon,user_name,net,search,search_...
  function switch_show_type (line 154) | def switch_show_type(show_type):
  function switch_background (line 169) | def switch_background(path_list):
  class Avtar (line 185) | class Avtar():
    method __init__ (line 186) | def __init__(self):
    method apply_video (line 189) | def apply_video(self,localizer):

FILE: ui/chat.py
  function get_directories (line 7) | def get_directories(path, unuse):
  function refresh_prompt (line 39) | def refresh_prompt(choose_category,language):
  function refresh_directories (line 61) | def refresh_directories():
  function refresh_embedding_directories (line 69) | def refresh_embedding_directories():
  function model_select (line 77) | def model_select(api, model, lora):
  function api_page_clear (line 84) | def api_page_clear():
  function api_select (line 89) | def api_select(api, model, lora):
  function load_claude_params (line 112) | def load_claude_params(api_list, model_list, lora_list,user_input, submi...
  function load_params (line 117) | def load_params(api_list, model_list, lora_list, *args):
  function show_api_params_add_api (line 186) | def show_api_params_add_api(api_list):
  function show_knowledge (line 223) | def show_knowledge(use_knowledge):
  function emb_model_select (line 230) | def emb_model_select(emb_api, emb_model):
  function emb_api_select (line 237) | def emb_api_select(emb_api, emb_model):
  function load_api_page_params (line 248) | def load_api_page_params(api_api_list, api_emb_api_list, api_emb_model_l...
  function clear_history (line 384) | def clear_history():
  function chat_page (line 389) | def chat_page(localizer):

FILE: ui/data.py
  function get_directories (line 10) | def get_directories(path,unuse):
  function emb_model_select (line 29) | def emb_model_select(emb_api_list,emb_model_list):
  function emb_api_select (line 35) | def emb_api_select(emb_api_list,emb_model_list):
  function data_page (line 45) | def data_page(localizer):

FILE: ui/train.py
  function get_file (line 10) | def get_file(path):
  function get_directories (line 13) | def get_directories(path,unuse):
  function switch_model_arch (line 33) | def switch_model_arch(model):
  function add_models (line 38) | def add_models(api_list,model_list):
  function show_emb_params_add_api (line 41) | def show_emb_params_add_api(api_list,model_list):
  function load_emb_val_params (line 53) | def load_emb_val_params(api_list,model_list,*args):
  function train_page (line 78) | def train_page(localizer):

FILE: utils/MyFAISS.py
  class MyFAISS (line 13) | class MyFAISS(FAISS, VectorStore):
    method __init__ (line 18) | def __init__(
    method seperate_list (line 30) | def seperate_list(self, ls: List[int]) -> List[List[int]]:
    method similarity_search_with_score_by_vector (line 42) | def similarity_search_with_score_by_vector(
    method delete_doc (line 106) | def delete_doc(self, source: str or List[str],docs):
    method list_docs (line 149) | def list_docs(self):
    method add_files (line 161) | def add_files(self,files,database_name):

FILE: utils/chinese_text_splitter.py
  class ChineseTextSplitter (line 6) | class ChineseTextSplitter(CharacterTextSplitter):
    method __init__ (line 7) | def __init__(self, pdf: bool = False, sentence_size: int = 100, **kwar...
    method split_text1 (line 12) | def split_text1(self, text: str) -> List[str]:
    method split_text (line 26) | def split_text(self, text: str) -> List[str]:   ##此处需要进一步优化逻辑

FILE: utils/dl_data.py
  function download_org_data (line 9) | def download_org_data(a,download_path):
  function download_jsonl_data (line 21) | def download_jsonl_data(a,download_path,type_=None):

FILE: utils/embedding_base_model.py
  class embedding_base_model (line 6) | class embedding_base_model:
    method __init__ (line 7) | def __init__(
    method clear (line 18) | def clear(self):
    method load (line 23) | def load(self, model_name_or_path: str, embed_arch:str, device: str = ...
    method reload (line 27) | def reload(self, model_name_or_path: str, device: str = None):
    method train (line 32) | def train(
    method evaluate (line 74) | def evaluate(

FILE: utils/embedding_val.py
  class embedding_visualization_plot (line 22) | class embedding_visualization_plot():
    method __init__ (line 23) | def __init__(self):
    method get_directories (line 41) | def get_directories(self, path, unuse):
    method refresh_directories (line 44) | def refresh_directories(self):
    method check_text_lenth (line 52) | def check_text_lenth(self,text,label):
    method upload_data (line 63) | def upload_data(self, temp_file):
    method plot (line 126) | def plot(self, api_list,model_list,params):
    class TSNE_Plot (line 152) | class TSNE_Plot():
      method __init__ (line 177) | def __init__(self, sentence, embed_intup_list, label, model_name, mo...
      method generate_colormap (line 188) | def generate_colormap(self, n_labels):
      method show_text (line 200) | def show_text(self, text):
      method init_df (line 210) | def init_df(self):
      method format_data (line 218) | def format_data(self):
      method calculate_tsne (line 231) | def calculate_tsne(self):  # 返回最终的二维嵌入结果,以用于可视化。
      method plot (line 255) | def plot(self, return_fig=False):
      method tsne_plot (line 292) | def tsne_plot(self, return_fig=True):

FILE: utils/language_switch_utils.py
  class Localizer (line 8) | class Localizer:
    method __init__ (line 9) | def __init__(self,language):
    method __call__ (line 23) | def __call__(self, key):

FILE: utils/local_doc.py
  class local_doc_qa (line 15) | class local_doc_qa():
    method __init__ (line 24) | def __init__(self):
    method clear (line 34) | def clear(self):
    method set_v (line 38) | def set_v(self,params):
    method generate_prompt (line 58) | def generate_prompt(self,related_docs,query) -> str:
    method load (line 63) | def load(self,params):
    method get_similarity (line 94) | def get_similarity(self,query):
    method load_file (line 99) | def load_file(self,filepath, sentence_size=100):
    method upload_data (line 121) | def upload_data(self,emb_api_list,emb_model_list,files,vs_name,openai_...
    method handle_database_selected (line 170) | def handle_database_selected(self,create_emb_api_list,create_emb_model...
    method handle_vector_database_file_delete (line 216) | def handle_vector_database_file_delete(self,files,database):
    method handle_add_file_to_vector_database (line 230) | def handle_add_file_to_vector_database(self,files,database_name):
    method get_directories (line 247) | def get_directories(self,path, unuse):
    method refresh_emb (line 250) | def refresh_emb(self):
    method refresh_vector (line 256) | def refresh_vector(self):
    method clear_mysql (line 273) | def clear_mysql(self):

FILE: utils/parallel_api.py
  class api_thread (line 9) | class api_thread(Thread):
    method __init__ (line 10) | def __init__(self, params):
    method setv (line 18) | def setv(self, chatbot, api_stream, net, search, search_key, result_le...
    method run (line 28) | def run(self):
    method stop (line 44) | def stop(self):
    method stopped (line 49) | def stopped(self):
  class Parallel_api (line 53) | class Parallel_api(object):
    method __init__ (line 54) | def __init__(self):
    method setv (line 57) | def setv(self, params):
    method call_openai (line 189) | def call_openai(self, user_input, chatbot, api_stream, net, search, se...
    method call_openai_knowledge (line 203) | def call_openai_knowledge(self, user_input, chatbot, api_stream, net, ...
    method call_azure (line 217) | def call_azure(self, user_input, chatbot, api_stream, net, search, sea...
    method call_azure_knowledge (line 231) | def call_azure_knowledge(self, user_input, chatbot, api_stream, net, s...
    method call_ernie (line 246) | def call_ernie(self, user_input, chatbot, api_stream, net, search, sea...
    method call_ernie_knowledge (line 260) | def call_ernie_knowledge(self, user_input, chatbot, api_stream, net, s...
    method call_ernie_turbo (line 274) | def call_ernie_turbo(self, user_input, chatbot, api_stream, net, searc...
    method call_ernie_turbo_knowledge (line 288) | def call_ernie_turbo_knowledge(self, user_input, chatbot, api_stream, ...
    method call_chatglm (line 304) | def call_chatglm(self, user_input, chatbot, api_stream, net, search, s...
    method call_chatglm_kmowledge (line 318) | def call_chatglm_kmowledge(self, user_input, chatbot, api_stream, net,...
    method call_spark (line 333) | def call_spark(self, user_input, chatbot, api_stream, net, search, sea...
    method call_spark_knowledge (line 348) | def call_spark_knowledge(self, user_input, chatbot, api_stream, net, s...
    method call_ali (line 362) | def call_ali(self, user_input, chatbot, api_stream, net, search, searc...
    method call_ali_knowledge (line 375) | def call_ali_knowledge(self, user_input, chatbot, api_stream, net, sea...
    method clear_history (line 388) | def clear_history(self):
    method clear (line 394) | def clear(self):
  class ParallelLocalModel (line 400) | class ParallelLocalModel():
    method __init__ (line 401) | def __init__(self):
    method handle_local_model_selected (line 406) | def handle_local_model_selected():
    method load_embedding_params (line 409) | def load_embedding_params(self, status, switch_chatbot, doc1, k, score...
    method clear (line 446) | def clear(self, switch_chatbot, status):

FILE: utils/svc_utils.py
  class SVC (line 6) | class SVC:
    method __init__ (line 12) | def __init__(self):
    method load (line 16) | def load(self, voice_style):
    method voice_process (line 32) | def voice_process(self, voice_style, filename):

FILE: utils/text_image_utils.py
  class TextImage (line 14) | class TextImage:
    method __init__ (line 15) | def __init__(self):
    method setv (line 32) | def setv(self, channel_id, authorization, application_id, guild_id, se...
    method extract_uuid (line 48) | def extract_uuid(filename):
    method get_new_image (line 56) | def get_new_image(self):
    method get_whole_image (line 75) | def get_whole_image(self,prompt):
    method upscale (line 149) | def upscale(self):

FILE: utils/ui_utils.py
  function parse_text (line 40) | def parse_text(text):
  class StoppableThread (line 81) | class StoppableThread(threading.Thread):
    method __init__ (line 86) | def __init__(self):
    method setv (line 95) | def setv(self, openai_api, timesleep, answer_list, type_=None):
    method stop (line 101) | def stop(self):
    method stopped (line 105) | def stopped(self):
    method run (line 108) | def run(self):
  class data_process (line 135) | class data_process():
    method __init__ (line 151) | def __init__(self):
    method save_data (line 162) | def save_data(self, a, b):
    method skip_qa (line 176) | def skip_qa(self, a):
    method save_embed_data (line 182) | def save_embed_data(self, sentence1, sentence2, label):
    method back_embed_json (line 201) | def back_embed_json(self):
    method empty_embed_json (line 206) | def empty_embed_json(self):
    method empty_embed_upload (line 210) | def empty_embed_upload(self):
    method empty_embed_exchange_upload (line 214) | def empty_embed_exchange_upload(self):
    method reset_state (line 218) | def reset_state(self):
    method reset_upload (line 222) | def reset_upload(self):
    method reset_upload_out (line 226) | def reset_upload_out(self):
    method reset_state_doc (line 230) | def reset_state_doc(self):
    method back_state (line 235) | def back_state(self):
    method upload_data (line 240) | def upload_data(self, temp_file):
    method upload_data_out (line 246) | def upload_data_out(self, temp_file, a, b, models2, models3):
    method upload_embed_data (line 271) | def upload_embed_data(self, embed_upload):
    method upload_embed_exchange_data (line 285) | def upload_embed_exchange_data(self, embed_exchange_upload, type_):
    method ones_openai (line 304) | def ones_openai(self, question, openai_api, temperature, max_tokens, t...
    method ones_openai_doc (line 318) | def ones_openai_doc(self, question, openai_api, temperature, max_token...
    method start_openai_doc (line 337) | def start_openai_doc(self, openai_api, temperature, max_tokens, top_p,...
    method start_openai (line 361) | def start_openai(self, openai_api, temperature, max_tokens, top_p, ope...
    method start_openai_embed (line 379) | def start_openai_embed(self, openai_api, temperature, max_tokens, top_...
    method stop_openai_embed (line 404) | def stop_openai_embed(self):
    method stop_openai (line 409) | def stop_openai(self):
    method stop_openai_doc (line 414) | def stop_openai_doc(self):
    method split_json (line 420) | def split_json(self, json_l, ratio=0.2):
    method dl_jsonl1 (line 432) | def dl_jsonl1(self, dpath, split_data):
    method dl_embed (line 441) | def dl_embed(self, embed_download_path, train_valid=False):
    method dl_jsonl2 (line 452) | def dl_jsonl2(self, dpath, split_data):
    method connect_mysql (line 461) | def connect_mysql(self, host, user, password, port):
    method change_database (line 470) | def change_database(self, database):
    method mysql_upload (line 475) | def mysql_upload(self, host, user, password, port, database, new_datab...
  class video_apply (line 510) | class video_apply():
    method __init__ (line 522) | def __init__(self):
    method set_v (line 528) | def set_v(self, params):
    method set_llm (line 556) | def set_llm(self, params):
    method predict (line 580) | def predict(self, input, chatbot, gen_type, lang, voice_style, show_ty...
    method generate_video (line 608) | def generate_video(self, response, gen_type, lang, voice_style):
    method reset_state (line 671) | def reset_state(self):
    method clear (line 675) | def clear(self):
    method clear_config (line 687) | def clear_config(self):
  class play_base_api (line 691) | class play_base_api():
    method __init__ (line 694) | def __init__(self):
    method set_v (line 697) | def set_v(self, params):
    method set_llm (line 701) | def set_llm(self, params):
    method predict (line 705) | def predict(self, input, chatbot):
    method reset_state (line 712) | def reset_state(self):
    method clear (line 716) | def clear(self):
  class chat_base_api (line 727) | class chat_base_api():
    method __init__ (line 730) | def __init__(self, api_type):
    method set_v (line 749) | def set_v(self, params):
    method predict (line 801) | def predict(self, input, stream=False):
    method predict_claude (line 805) | def predict_claude(self, input, filepath=[]):
    method reset_state (line 809) | def reset_state(self):
  class chat_base_model (line 814) | class chat_base_model():
    method __init__ (line 819) | def __init__(self):
    method clear (line 825) | def clear(self):
    method clears (line 838) | def clears(self):
    method reset_state_claude (line 848) | def reset_state_claude(self,chatbot, history, user_input):
    method reset_state (line 854) | def reset_state(self, *args):
    method reset_states (line 868) | def reset_states(self):
    method load_api_params (line 871) | def load_api_params(self, params):
    method load_model (line 877) | def load_model(self, params):
    method query_from_mysql (line 886) | def query_from_mysql(self, input, chatbot, database, host, user, passw...
    method predict (line 930) | def predict(self, input, chatbot, history=[], stream=False, net=False,...
    method paralle_api_call (line 1034) | def paralle_api_call(self,params):
    method parallel_predict (line 1037) | def parallel_predict(self, input, local_chatbot1,local_chatbot2, paral...
  class llm_train_thread (line 1149) | class llm_train_thread(threading.Thread):
    method __init__ (line 1154) | def __init__(self, event):
    method stop (line 1158) | def stop(self):
    method stopped (line 1164) | def stopped(self):
    method run (line 1167) | def run(self):
  class llm_train (line 1174) | class llm_train():
    method __init__ (line 1179) | def __init__(self):
    method handle_other_option (line 1282) | def handle_other_option(self, option):
    method handle_other_option_finished (line 1292) | def handle_other_option_finished(self, function_name, state):
    method switch_CPU_GPU (line 1299) | def switch_CPU_GPU(self, current_device):
    method get_avaliable_gpus (line 1310) | def get_avaliable_gpus():
    method switch_checkpoint (line 1322) | def switch_checkpoint(self, lora, model):
    method __load_device_config (line 1342) | def __load_device_config(self, LLM_device, LLM_devices):
    method get_directories (line 1363) | def get_directories(self, path, unuse):
    method handle_refresh_embd_and_data (line 1366) | def handle_refresh_embd_and_data(self):
    method detect_OS (line 1377) | def detect_OS():
    method switch_deepspeed (line 1386) | def switch_deepspeed(self, deepspeed):
    method __load_llm_accelerate_config (line 1395) | def __load_llm_accelerate_config(self, deepspeed, LLM_mixed_precision,...
    method __load_llm_deepspeed_config (line 1420) | def __load_llm_deepspeed_config(self, deepspeed, LLM_mixed_precision, ...
    method post_train_request (line 1482) | def post_train_request(self, deepspeed, LLM_mixed_precision, LLM_compu...
    method post_stop_request (line 1570) | def post_stop_request(self):
    method load_llm_config (line 1578) | def load_llm_config(self, deepspeed, LLM_mixed_precision, LLM_compute_...
    method write_accelerate_deepspeed_config (line 1613) | def write_accelerate_deepspeed_config(self):
    method load_model_hyperparam (line 1625) | def load_model_hyperparam(self, LLM_models1, LLM_data1, lora, lora_che...
    method write_model_hyperparam_config (line 1653) | def write_model_hyperparam_config(self):
    method handle_refresh_LLM (line 1662) | def handle_refresh_LLM(self):
  class train_thread (line 1672) | class train_thread(threading.Thread):
    method __init__ (line 1673) | def __init__(self, event):
    method setv (line 1679) | def setv(self, model_name, embed_arch, data_dir, device, batch_size, m...
    method stop (line 1696) | def stop(self):
    method stopped (line 1703) | def stopped(self):
    method get_train_valid_file (line 1706) | def get_train_valid_file(self, data_dir):
    method get_device (line 1718) | def get_device(self, device):
    method run (line 1725) | def run(self):
  class embedding_train_utils (line 1745) | class embedding_train_utils():
    method __init__ (line 1746) | def __init__(self) -> None:
    method start_train (line 1751) | def start_train(self, model_name, embed_arch, data_dir, device, batch_...
    method stop_train (line 1786) | def stop_train(self):
  function handle_online_tts (line 1792) | def handle_online_tts(choice):
  function load_javascript (line 1799) | def load_javascript():

FILE: utils/utils.py
  function parse_input_string (line 23) | def parse_input_string(input_string):
  function get_model_name (line 30) | def get_model_name(path):
  function copy_custom_files (line 39) | def copy_custom_files(source, target):
  function get_model_tokenizer (line 90) | def get_model_tokenizer(path, use_8bit=False, use_4bit=False, max_length...
  function get_lora_model (line 303) | def get_lora_model(model, path, lora_rank, checkpoint):
  function get_preprocess_datacollator (line 350) | def get_preprocess_datacollator(path):
  function build_query (line 382) | def build_query(path, tokenizer, question, history):
  function build_tokens (line 439) | def build_tokens(full_prompt, user_prompt, tokenizer, max_length):
  function preprocess_4_phoenix (line 456) | def preprocess_4_phoenix(example, tokenizer, max_length):
  function data_collator_4_phoenix (line 467) | def data_collator_4_phoenix(features, tokenizer):
  function preprocess_4_chatglm (line 490) | def preprocess_4_chatglm(example, tokenizer, max_length):
  function data_collator_4_chatglm (line 504) | def data_collator_4_chatglm(features, tokenizer):
  function preprocess_4_moss (line 527) | def preprocess_4_moss(example, tokenizer, max_length):
  function preprocess_4_gunaco (line 537) | def preprocess_4_gunaco(example, tokenizer, max_length):
  function preprocess_4_baichuan (line 547) | def preprocess_4_baichuan(example, tokenizer, max_length):
  function preprocess_4_chatglm2 (line 557) | def preprocess_4_chatglm2(example, tokenizer, max_length):
  function data_collator_4_chatglm2 (line 571) | def data_collator_4_chatglm2(features, tokenizer):
  function preprocess_4_baichuan_13b_chat (line 601) | def preprocess_4_baichuan_13b_chat(example, tokenizer, max_length):
  function preprocess_4_internlm (line 622) | def preprocess_4_internlm(example, tokenizer, max_length):
  function preprocess_4_chinese_alpaca_2 (line 644) | def preprocess_4_chinese_alpaca_2(example, tokenizer, max_length):
  function preprocess_4_qwen (line 655) | def preprocess_4_qwen(example, tokenizer, max_length):

FILE: utils/vits_utils.py
  class VITS (line 7) | class VITS:
    method __init__ (line 12) | def __init__(self):
    method load (line 17) | def load(self,model_name,outputLanguage):
    method to_audio (line 61) | def to_audio(self,response,output_path):
Condensed preview — 159 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,909K chars).
[
  {
    "path": ".gitignore",
    "chars": 955,
    "preview": "# .gitignore\n.DS_Store\n\n/env/*\n!/env/.gitkeep\n/Linux-env/*\n!/Linux-env/.gitkeep\n\n/data/audio/*\n!/data/audio/.gitkeep\n\n/d"
  },
  {
    "path": "LICENSE",
    "chars": 34523,
    "preview": "                    GNU AFFERO GENERAL PUBLIC LICENSE\n                       Version 3, 19 November 2007\n\n Copyright (C)"
  },
  {
    "path": "README.md",
    "chars": 8999,
    "preview": "# 苏秦(suqin) 语言大模型全工具链 WebUI 整合包\n\n[**English**](./README_EN.md) | [**中文**](https://github.com/wpydcr/LLM-Kit)\n\n## 介绍\n\n⛓️ "
  },
  {
    "path": "README_EN.md",
    "chars": 12362,
    "preview": "# 苏秦(suqin) WebUI integrated platform for LLMs\n\n[**English**](./README_EN.md) | [**中文**](https://github.com/wpydcr/LLM-K"
  },
  {
    "path": "data/apply/audio/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "data/apply/emoticon/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "data/apply/images/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "data/apply/play/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "data/apply/play/坂田银时.txt",
    "chars": 302,
    "preview": "Your rules:\n```\n你正在扮演坂田银时,你正在cosplay坂田銀時(さかたぎんとき)。\n你毫无上进心,时常玩小弹珠、彻夜饮酒,喜欢吃甜食尤其最爱圣代,吃白饭时会搭配红豆一起食用,与新八、神乐一起经营着一家什么都做的[万事屋]。"
  },
  {
    "path": "data/apply/text2image/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "data/config/embedding_train/model_arch.json",
    "chars": 431,
    "preview": "{\n    \"bert-base-uncased\": {\n        \"module\": \"TEXT2VEC\",\n        \"model_arch\": \"BERT\",\n        \"encoder_type\": null\n  "
  },
  {
    "path": "data/config/js/custom.js",
    "chars": 8869,
    "preview": "let ga = document.getElementsByTagName(\"gradio-app\");\nlet targetNode = ga[0];\nfunction gradioLoaded(mutations) {\n    for"
  },
  {
    "path": "data/config/js/index.js",
    "chars": 602145,
    "preview": "(function(){const e=document.createElement(\"link\").relList;if(e&&e.supports&&e.supports(\"modulepreload\"))return;for(cons"
  },
  {
    "path": "data/config/language/en_UK_language_config.json",
    "chars": 6169,
    "preview": "{\n  \"聊天\": \"Chat\",\n  \"数据\":\"Data\",\n  \"应用\": \"apply\",\n  \"训练\": \"train\",\n  \"刷新\": \"Refresh\",\n  \"API base:\":\"API base:\",\n  \"选择模型"
  },
  {
    "path": "data/config/prompt/chatPrompt.json",
    "chars": 3050,
    "preview": "[\n    {\n        \"name\": \"写作助理\",\n        \"category\": \"常用\",\n        \"explain\": \"最常使用的 prompt,用于优化文本的语法、清晰度和简洁度,提高可读性。\",\n  "
  },
  {
    "path": "data/config/theme/theme.py",
    "chars": 277,
    "preview": "import gradio as gr\n\ntheme = gr.themes.Soft(\n        primary_hue=gr.themes.colors.sky,\n        secondary_hue=gr.themes.c"
  },
  {
    "path": "data/config/train_config/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "data/documents/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "data/modeldata/Embedding/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "data/modeldata/LLM/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "demo.py",
    "chars": 497,
    "preview": "import requests\n\nurl = \"https://aihubmix.com/v1/chat/completions\"\nheaders={\n  \"Authorization\": \"Bearer <AIHUBMIX_API_KEY"
  },
  {
    "path": "env/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "models/Embedding/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "models/LLM/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "models/LoRA/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "models/live2d_model/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "models/svc_models/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "models/svc_models/hubert_model/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "models/svc_models/svc/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "models/vits_pretrained_models/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "modules/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "modules/agent/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "modules/agent/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "modules/agent/chatdb/chat.py",
    "chars": 10465,
    "preview": "import time\nimport openai\nimport tiktoken\nfrom typing import List, Dict\nimport openai\nfrom langchain.schema import Human"
  },
  {
    "path": "modules/agent/chatdb/chatdb.py",
    "chars": 6517,
    "preview": "from langchain.prompts import PromptTemplate\nfrom modules.agent.chatdb.chat import chat_with_ai,create_chat_completion\nf"
  },
  {
    "path": "modules/agent/chatdb/mysql.py",
    "chars": 7946,
    "preview": "import pymysql\nfrom prettytable import PrettyTable\nimport gradio as gr\n\ndef sql_result_to_table_str(sql_result):\n    # C"
  },
  {
    "path": "modules/agent/chatdb/sql_examples.py",
    "chars": 4791,
    "preview": "eg_purchase = \"\"\"\nUSER INPUT: On 2023-01-22, the shop purchased 100kg banana from supplier 'ABC' (contact number: 67543,"
  },
  {
    "path": "modules/agent/internet_search.py",
    "chars": 1443,
    "preview": "#coding=utf8\n\nfrom langchain.utilities import BingSearchAPIWrapper\nfrom langchain.utilities import GoogleSerperAPIWrappe"
  },
  {
    "path": "modules/agent/svc/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "modules/agent/svc/attentions.py",
    "chars": 11809,
    "preview": "import math\nimport torch\nfrom torch import nn\nfrom torch.nn import functional as F\n\nfrom modules.agent.svc import common"
  },
  {
    "path": "modules/agent/svc/commons.py",
    "chars": 5757,
    "preview": "import math\nimport numpy as np\nimport torch\nfrom torch import nn\nfrom torch.nn import functional as F\n\ndef slice_pitch_s"
  },
  {
    "path": "modules/agent/svc/configs/config.json",
    "chars": 1545,
    "preview": "{\n  \"train\": {\n    \"log_interval\": 200,\n    \"eval_interval\": 1000,\n    \"seed\": 1234,\n    \"epochs\": 10000,\n    \"learning_"
  },
  {
    "path": "modules/agent/svc/hubert/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "modules/agent/svc/hubert/hubert_model.py",
    "chars": 7329,
    "preview": "import copy\nimport random\nfrom typing import Optional, Tuple\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functio"
  },
  {
    "path": "modules/agent/svc/hubert/hubert_model_onnx.py",
    "chars": 7160,
    "preview": "import copy\nimport random\nfrom typing import Optional, Tuple\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functio"
  },
  {
    "path": "modules/agent/svc/hubert/put_hubert_ckpt_here",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "modules/agent/svc/inference/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "modules/agent/svc/inference/chunks_temp.json",
    "chars": 21,
    "preview": "{\"info\": \"temp_dict\"}"
  },
  {
    "path": "modules/agent/svc/inference/infer_tool.py",
    "chars": 12714,
    "preview": "import hashlib\nimport json\nimport logging\nimport os\nimport time\nfrom pathlib import Path\nimport io\nimport librosa\nimport"
  },
  {
    "path": "modules/agent/svc/inference/infer_tool_grad.py",
    "chars": 5693,
    "preview": "import hashlib\nimport json\nimport logging\nimport os\nimport time\nfrom pathlib import Path\nimport io\nimport librosa\nimport"
  },
  {
    "path": "modules/agent/svc/inference/slicer.py",
    "chars": 6668,
    "preview": "import librosa\nimport torch\nimport torchaudio\n\n\nclass Slicer:\n    def __init__(self,\n                 sr: int,\n         "
  },
  {
    "path": "modules/agent/svc/inference_main.py",
    "chars": 1697,
    "preview": "import io\nimport logging\nimport os\n\nimport numpy as np\nimport soundfile\n\nfrom modules.agent.svc.inference import slicer\n"
  },
  {
    "path": "modules/agent/svc/models.py",
    "chars": 12088,
    "preview": "import torch\nfrom torch import nn\nfrom torch.nn import functional as F\n\nfrom modules.agent.svc import attentions, common"
  },
  {
    "path": "modules/agent/svc/modules.py",
    "chars": 11400,
    "preview": "import torch\nfrom torch import nn\nfrom torch.nn import functional as F\n\nfrom torch.nn import Conv1d\nfrom torch.nn.utils "
  },
  {
    "path": "modules/agent/svc/utils.py",
    "chars": 9958,
    "preview": "import os\nimport glob\nimport sys\nimport argparse\nimport logging\nimport json\nimport subprocess\n\nimport numpy as np\nimport"
  },
  {
    "path": "modules/agent/svc/vdecoder/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "modules/agent/svc/vdecoder/hifigan/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "modules/agent/svc/vdecoder/hifigan/env.py",
    "chars": 394,
    "preview": "import os\nimport shutil\n\n\nclass AttrDict(dict):\n    def __init__(self, *args, **kwargs):\n        super(AttrDict, self)._"
  },
  {
    "path": "modules/agent/svc/vdecoder/hifigan/models.py",
    "chars": 19204,
    "preview": "import os\nimport json\nfrom .env import AttrDict\nimport numpy as np\nimport torch\nimport torch.nn.functional as F\nimport t"
  },
  {
    "path": "modules/agent/svc/vdecoder/hifigan/nvSTFT.py",
    "chars": 4513,
    "preview": "import math\nimport os\nos.environ[\"LRU_CACHE_CAPACITY\"] = \"3\"\nimport random\nimport torch\nimport torch.utils.data\nimport n"
  },
  {
    "path": "modules/agent/svc/vdecoder/hifigan/utils.py",
    "chars": 1881,
    "preview": "import glob\nimport os\nimport matplotlib\nimport torch\nfrom torch.nn.utils import weight_norm\nmatplotlib.use(\"Agg\")\nimport"
  },
  {
    "path": "modules/agent/svc/vits_haruhi.py",
    "chars": 264,
    "preview": "import requests\nfrom modules.agent.svc import inference_main\nimport time\n\n\ndef set_model_path(path):\n    inference_main."
  },
  {
    "path": "modules/agent/tts_online.py",
    "chars": 2223,
    "preview": "import requests\nimport time\nimport zhtts\nimport os\n\nreal_path = os.path.split(os.path.realpath(__file__))[0]\n\nlang_dict "
  },
  {
    "path": "modules/agent/vits/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "modules/agent/vits/attentions.py",
    "chars": 11793,
    "preview": "import math\nimport torch\nfrom torch import nn\nfrom torch.nn import functional as F\n\nfrom modules.agent.vits import commo"
  },
  {
    "path": "modules/agent/vits/commons.py",
    "chars": 4943,
    "preview": "import math\nimport torch\nfrom torch.nn import functional as F\nimport torch.jit\n\n\ndef script_method(fn, _rcb=None):\n  ret"
  },
  {
    "path": "modules/agent/vits/config/config.json",
    "chars": 22283,
    "preview": "{\n  \"train\": {\n    \"log_interval\": 200,\n    \"eval_interval\": 1000,\n    \"seed\": 1234,\n    \"epochs\": 10000,\n    \"learning_"
  },
  {
    "path": "modules/agent/vits/mel_processing.py",
    "chars": 3565,
    "preview": "import torch\nimport torch.utils.data\nfrom librosa.filters import mel as librosa_mel_fn\n\nMAX_WAV_VALUE = 32768.0\n\n\ndef dy"
  },
  {
    "path": "modules/agent/vits/models.py",
    "chars": 19377,
    "preview": "import math\nimport torch\nfrom torch import nn\nfrom torch.nn import functional as F\n\n\nfrom torch.nn import Conv1d, ConvTr"
  },
  {
    "path": "modules/agent/vits/modules.py",
    "chars": 13148,
    "preview": "import math\nimport torch\nfrom torch import nn\nfrom torch.nn import functional as F\n\nfrom torch.nn import Conv1d\nfrom tor"
  },
  {
    "path": "modules/agent/vits/monotonic_align/__init__.py",
    "chars": 640,
    "preview": "from numpy import zeros, int32, float32\nfrom torch import from_numpy\n\nfrom .core import maximum_path_jit\n\n\ndef maximum_p"
  },
  {
    "path": "modules/agent/vits/monotonic_align/core.py",
    "chars": 1149,
    "preview": "import numba\n\n\n@numba.jit(numba.void(numba.int32[:, :, ::1], numba.float32[:, :, ::1], numba.int32[::1], numba.int32[::1"
  },
  {
    "path": "modules/agent/vits/test.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "modules/agent/vits/text/LICENSE",
    "chars": 1053,
    "preview": "Copyright (c) 2017 Keith Ito\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this softw"
  },
  {
    "path": "modules/agent/vits/text/__init__.py",
    "chars": 1779,
    "preview": "\"\"\" from https://github.com/keithito/tacotron \"\"\"\nfrom modules.agent.vits.text import cleaners\nfrom modules.agent.vits.t"
  },
  {
    "path": "modules/agent/vits/text/cleaners.py",
    "chars": 12758,
    "preview": "\"\"\" from https://github.com/keithito/tacotron \"\"\"\n\n'''\nCleaners are transformations that run over the input text at both"
  },
  {
    "path": "modules/agent/vits/text/symbols.py",
    "chars": 799,
    "preview": "'''\nDefines the set of symbols used in text input to the model.\n'''\n\n'''# japanese_cleaners\n_pad        = '_'\n_punctuati"
  },
  {
    "path": "modules/agent/vits/transforms.py",
    "chars": 8490,
    "preview": "import torch\nfrom torch.nn import functional as F\n\nimport numpy as np\n\n\nDEFAULT_MIN_BIN_WIDTH = 1e-3\nDEFAULT_MIN_BIN_HEI"
  },
  {
    "path": "modules/agent/vits/utils.py",
    "chars": 6305,
    "preview": "import os\nimport sys\nimport argparse\nimport logging\nimport json\nimport subprocess\nimport numpy as np\nimport librosa\nimpo"
  },
  {
    "path": "modules/agent/vits/vits.py",
    "chars": 6677,
    "preview": "# coding=utf-8\nimport argparse\nimport json\nimport os\n\nimport numpy as np\nimport torch\nfrom scipy.io import wavfile\nfrom "
  },
  {
    "path": "modules/apply/role_play.py",
    "chars": 15603,
    "preview": "import os\nfrom langchain.schema import HumanMessage, SystemMessage\nfrom langchain.memory import ChatMessageHistory\nimpor"
  },
  {
    "path": "modules/model/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "modules/model/Embedding/__init__.py",
    "chars": 868,
    "preview": "# -*- coding: utf-8 -*-\n\"\"\"\n本模块为了集成多个embedding模型,使用 子模块.子模型 结构以便于后续扩展\n例如:\n    |-base\n    |-text2vec\n        |-bert\n     "
  },
  {
    "path": "modules/model/Embedding/base.py",
    "chars": 6732,
    "preview": "# -*- coding: utf-8 -*-\n\nimport os\nimport json\nfrom loguru import logger\nfrom typing import List, Union, Optional, Any\ni"
  },
  {
    "path": "modules/model/Embedding/text2vec/__init__.py",
    "chars": 113,
    "preview": "# -*- coding: utf-8 -*-\n\"\"\"\nThe Package is adapted from the text2vec: https://github.com/shibing624/text2vec\n\"\"\"\n"
  },
  {
    "path": "modules/model/Embedding/text2vec/dataset/__init__.py",
    "chars": 26,
    "preview": "# -*- coding: utf-8 -*-\n\n\n"
  },
  {
    "path": "modules/model/Embedding/text2vec/dataset/base.py",
    "chars": 2240,
    "preview": "# -*- coding: utf-8 -*-\n\nimport os\nfrom loguru import logger\nfrom torch.utils.data import Dataset\nfrom transformers impo"
  },
  {
    "path": "modules/model/Embedding/text2vec/dataset/bert.py",
    "chars": 1283,
    "preview": "# -*- coding: utf-8 -*-\n\nimport os\nfrom loguru import logger\nfrom torch.utils.data import Dataset\nfrom transformers impo"
  },
  {
    "path": "modules/model/Embedding/text2vec/dataset/cosent.py",
    "chars": 1320,
    "preview": "# -*- coding: utf-8 -*-\n\nimport os\nfrom loguru import logger\nfrom torch.utils.data import Dataset\nfrom transformers impo"
  },
  {
    "path": "modules/model/Embedding/text2vec/dataset/sentencebert.py",
    "chars": 583,
    "preview": "# -*- coding: utf-8 -*-\n\nimport os\nfrom loguru import logger\nfrom torch.utils.data import Dataset\nfrom transformers impo"
  },
  {
    "path": "modules/model/Embedding/text2vec/main.py",
    "chars": 24,
    "preview": "# -*- coding: utf-8 -*-\n"
  },
  {
    "path": "modules/model/Embedding/text2vec/model/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "modules/model/Embedding/text2vec/model/base.py",
    "chars": 10839,
    "preview": "# -*- coding: utf-8 -*-\n\nimport os\nimport json\nfrom loguru import logger\nimport numpy as np\nfrom tqdm.auto import tqdm, "
  },
  {
    "path": "modules/model/Embedding/text2vec/model/bert.py",
    "chars": 12335,
    "preview": "# -*- coding: utf-8 -*-\n\nimport os\nimport json\nfrom loguru import logger\nimport numpy as np\nfrom tqdm.auto import tqdm, "
  },
  {
    "path": "modules/model/Embedding/text2vec/model/cosent.py",
    "chars": 10118,
    "preview": "# -*- coding: utf-8 -*-\n\nimport os\nimport json\nfrom loguru import logger\nimport numpy as np\nfrom tqdm.auto import tqdm, "
  },
  {
    "path": "modules/model/Embedding/text2vec/model/sentencebert.py",
    "chars": 10538,
    "preview": "# -*- coding: utf-8 -*-\n\nimport os\nimport json\nfrom loguru import logger\nimport numpy as np\nfrom tqdm.auto import tqdm, "
  },
  {
    "path": "modules/model/Embedding/text2vec/utils/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "modules/model/Embedding/text2vec/utils/base.py",
    "chars": 1713,
    "preview": "# -*- coding: utf-8 -*-\n\nfrom enum import Enum\nfrom loguru import logger\nimport random\nimport numpy as np\nfrom scipy.sta"
  },
  {
    "path": "modules/model/Embedding/utils/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "modules/model/Embedding/utils/base.py",
    "chars": 24,
    "preview": "# -*- coding: utf-8 -*-\n"
  },
  {
    "path": "modules/model/LLM/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "modules/model/LLM/accelerate_configs/ds_multi_gpu.yaml",
    "chars": 469,
    "preview": "compute_environment: LOCAL_MACHINE\ndeepspeed_config:\n  # 不同stage的config文件可直接进行替换,zero3_init_flag在不同stage下会自动配置\n  deepspe"
  },
  {
    "path": "modules/model/LLM/accelerate_configs/ds_single_gpu.yaml",
    "chars": 469,
    "preview": "compute_environment: LOCAL_MACHINE\ndeepspeed_config:\n  # 不同stage的config文件可直接进行替换,zero3_init_flag在不同stage下会自动配置\n  deepspe"
  },
  {
    "path": "modules/model/LLM/accelerate_configs/multi_gpu.yaml",
    "chars": 307,
    "preview": "compute_environment: LOCAL_MACHINE\ndistributed_type: MULTI_GPU \ndowncast_bf16: 'no'\nmachine_rank: 0\nmain_training_functi"
  },
  {
    "path": "modules/model/LLM/accelerate_configs/single_gpu.yaml",
    "chars": 301,
    "preview": "compute_environment: LOCAL_MACHINE\ndistributed_type: 'NO'\ndowncast_bf16: 'no'\nmachine_rank: 0\nmain_training_function: ma"
  },
  {
    "path": "modules/model/LLM/ds_configs/stage_1.json",
    "chars": 1018,
    "preview": "{\n    \"fp16\": {\n        \"enabled\": true,\n        \"loss_scale\": 0,\n        \"loss_scale_window\": 1000,\n        \"initial_sc"
  },
  {
    "path": "modules/model/LLM/ds_configs/stage_1_offload.json",
    "chars": 1120,
    "preview": "{\n    \"fp16\": {\n        \"enabled\": true,\n        \"loss_scale\": 0,\n        \"loss_scale_window\": 1000,\n        \"initial_sc"
  },
  {
    "path": "modules/model/LLM/ds_configs/stage_2.json",
    "chars": 1018,
    "preview": "{\n    \"fp16\": {\n        \"enabled\": true,\n        \"loss_scale\": 0,\n        \"loss_scale_window\": 1000,\n        \"initial_sc"
  },
  {
    "path": "modules/model/LLM/ds_configs/stage_2_offload.json",
    "chars": 1121,
    "preview": "{\n    \"fp16\": {\n        \"enabled\": true,\n        \"loss_scale\": 0,\n        \"loss_scale_window\": 1000,\n        \"initial_sc"
  },
  {
    "path": "modules/model/LLM/ds_configs/stage_3.json",
    "chars": 1186,
    "preview": "{\n    \"fp16\": {\n        \"enabled\": true,\n        \"loss_scale\": 0,\n        \"loss_scale_window\": 1000,\n        \"initial_sc"
  },
  {
    "path": "modules/model/LLM/ds_configs/stage_3_offload.json",
    "chars": 1386,
    "preview": "{\n    \"fp16\": {\n        \"enabled\": true,\n        \"loss_scale\": 0,\n        \"loss_scale_window\": 1000,\n        \"initial_sc"
  },
  {
    "path": "modules/model/LLM/ds_configs/stage_3_offload_bf16.json",
    "chars": 1237,
    "preview": "{\n    \"bf16\": {\n        \"enabled\": true\n    },\n    \"optimizer\": {\n        \"type\": \"AdamW\",\n        \"params\": {\n         "
  },
  {
    "path": "modules/model/LLM/run/train_ds_multi_gpu.sh",
    "chars": 259,
    "preview": "# 建议150G以上内存\nnohup accelerate launch \\\n    --config_file ../accelerate_configs/ds_multi_gpu.yaml \\\n    ../train.py \\\n   "
  },
  {
    "path": "modules/model/LLM/run/train_ds_single_gpu.sh",
    "chars": 261,
    "preview": "# 建议150G以上内存\nnohup accelerate launch \\\n    --config_file ../accelerate_configs/ds_single_gpu.yaml \\\n    ../train.py \\\n  "
  },
  {
    "path": "modules/model/LLM/run/train_lora_ds_multi_gpu.sh",
    "chars": 272,
    "preview": "nohup accelerate launch \\\n    --config_file ../accelerate_configs/ds_multi_gpu.yaml \\\n    ../train.py \\\n        --use_lo"
  },
  {
    "path": "modules/model/LLM/run/train_lora_ds_single_gpu.sh",
    "chars": 274,
    "preview": "nohup accelerate launch \\\n    --config_file ../accelerate_configs/ds_single_gpu.yaml \\\n    ../train.py \\\n        --use_l"
  },
  {
    "path": "modules/model/LLM/run/train_lora_multi_gpu.sh",
    "chars": 279,
    "preview": "# 同一服务器同时运行多个训练代码,需要手动指定main_process_port,避免冲突\n# int8不可以和多卡同时使用\nnohup accelerate launch \\\n    --config_file ../accelerat"
  },
  {
    "path": "modules/model/LLM/run/train_lora_single_gpu.sh",
    "chars": 368,
    "preview": "# 同一服务器同时运行多个训练代码,需要手动指定main_process_port,避免冲突\nnohup accelerate launch \\\n    --config_file ../accelerate_configs/single_"
  },
  {
    "path": "modules/model/LLM/run/train_multi_gpu.sh",
    "chars": 240,
    "preview": "nohup accelerate launch \\\n    --config_file ../accelerate_configs/multi_gpu.yaml \\\n    ../train.py \\\n        --gradient_"
  },
  {
    "path": "modules/model/LLM/run/train_single_gpu.sh",
    "chars": 242,
    "preview": "nohup accelerate launch \\\n    --config_file ../accelerate_configs/single_gpu.yaml \\\n    ../train.py \\\n        --gradient"
  },
  {
    "path": "modules/model/LLM/train.py",
    "chars": 20248,
    "preview": "import sys\nimport os\nreal_path = os.path.abspath(__file__)\nsys.path.append(os.path.join(os.path.dirname(real_path), '..'"
  },
  {
    "path": "modules/model/LLM/train_dpo.py",
    "chars": 28492,
    "preview": "import sys\nimport os\nreal_path = os.path.abspath(__file__)\nsys.path.append(os.path.join(os.path.dirname(real_path), '..'"
  },
  {
    "path": "modules/model/LLM/train_dpo_luancher.py",
    "chars": 1206,
    "preview": "import accelerate.commands.accelerate_cli as acli\nimport os\n\n\ndef main():\n    \"\"\"\n    Main function to start the trainin"
  },
  {
    "path": "modules/model/LLM/train_luancher.py",
    "chars": 1202,
    "preview": "import accelerate.commands.accelerate_cli as acli\nimport os\n\n\ndef main():\n    \"\"\"\n    Main function to start the trainin"
  },
  {
    "path": "modules/model/SparkApi.py",
    "chars": 5185,
    "preview": "import _thread as thread\nimport base64\nimport datetime\nimport hashlib\nimport hmac\nimport json\nfrom urllib.parse import u"
  },
  {
    "path": "modules/model/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "modules/model/emb_auto.py",
    "chars": 933,
    "preview": "import os\nfrom langchain.embeddings.huggingface import HuggingFaceEmbeddings\nimport torch\n\n\nreal_path = os.path.split(os"
  },
  {
    "path": "modules/model/llm_auto.py",
    "chars": 10786,
    "preview": "import os\n# os.environ[\"CUDA_VISIBLE_DEVICES\"] = \"0\"\n# import sys\n# sys.path.append('../..')\nfrom utils.utils import get"
  },
  {
    "path": "modules/model/prompt_generator.py",
    "chars": 2380,
    "preview": "from langchain.schema import HumanMessage, SystemMessage\n\nclass prompt_generator(object):\n    def __init__(self) -> None"
  },
  {
    "path": "modules/model/use_api.py",
    "chars": 48498,
    "preview": "import os\nfrom langchain.chat_models import ChatOpenAI, AzureChatOpenAI\nfrom langchain.embeddings import OpenAIEmbedding"
  },
  {
    "path": "requirements.txt",
    "chars": 817,
    "preview": "accelerate==0.23.0\ncpm_kernels==1.0.11\ndatasets==2.8.0\ngradio==3.35.2\nlangchain==0.0.146\nloguru==0.7.0\nmatplotlib==3.7.1"
  },
  {
    "path": "ui/apply.py",
    "chars": 494,
    "preview": "import gradio as gr\nfrom ui.apply_video import Avtar\nfrom ui.apply_knowledge import apply_knowledge\nfrom ui.apply_text_i"
  },
  {
    "path": "ui/apply_knowledge.py",
    "chars": 38250,
    "preview": "import gradio as gr\nimport os\nfrom utils.ui_utils import chat_base_model\nfrom utils.local_doc import local_doc_qa\nfrom m"
  },
  {
    "path": "ui/apply_text_image_generation.py",
    "chars": 1786,
    "preview": "import gradio as gr\nfrom utils.text_image_utils import TextImage\n\ntext_image = TextImage()\n\ndef get_index(evt: gr.Select"
  },
  {
    "path": "ui/apply_video.py",
    "chars": 18203,
    "preview": "import gradio as gr\nimport os\nfrom utils.ui_utils import video_apply, handle_online_tts\nimport uuid\n\ndef get_file(path,u"
  },
  {
    "path": "ui/chat.py",
    "chars": 58639,
    "preview": "import gradio as gr\nimport os\nfrom utils.ui_utils import chat_base_model\nfrom utils.parallel_api import Parallel_api, Pa"
  },
  {
    "path": "ui/data.py",
    "chars": 21353,
    "preview": "import gradio as gr\nfrom utils.dl_data import *\nimport os\nfrom utils.ui_utils import data_process\nfrom utils.local_doc i"
  },
  {
    "path": "ui/train.py",
    "chars": 21550,
    "preview": "import gradio as gr\nimport os\nfrom utils.ui_utils import llm_train\nfrom utils.ui_utils import embedding_train_utils\nimpo"
  },
  {
    "path": "utils/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "utils/MyFAISS.py",
    "chars": 7096,
    "preview": "import os\n\nfrom langchain.vectorstores import FAISS\nfrom langchain.vectorstores.base import VectorStore\nfrom langchain.v"
  },
  {
    "path": "utils/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "utils/chinese_text_splitter.py",
    "chars": 2866,
    "preview": "from langchain.text_splitter import CharacterTextSplitter\nimport re\nfrom typing import List\n\n\nclass ChineseTextSplitter("
  },
  {
    "path": "utils/dev.json",
    "chars": 136252,
    "preview": "{\"content\": \"扫描隧道显微镜(SEM)和原子力显微镜(AFM)具有原子级的极高分辨率,可在纳米尺度上获得实空间的表面微观三维形貌,且可定量表征,因此可用来研究材料断裂与疲劳的微观机理.简要介绍STM和AFM在该领域的应用及所取得"
  },
  {
    "path": "utils/dl_data.py",
    "chars": 2229,
    "preview": "import json\nimport datetime\nimport os\nimport gradio as gr\n\nreal_path = os.path.split(os.path.realpath(__file__))[0]\nnew_"
  },
  {
    "path": "utils/embedding_base_model.py",
    "chars": 2980,
    "preview": "import os\nfrom modules.model.Embedding.base import load_model, train_model, eval_model\n\nreal_path = os.path.realpath(__f"
  },
  {
    "path": "utils/embedding_val.py",
    "chars": 13125,
    "preview": "\nimport gradio as gr\nfrom modules.model.emb_auto import AutoEmb\nfrom modules.model.use_api import *\nimport os\nimport plo"
  },
  {
    "path": "utils/language_switch_utils.py",
    "chars": 869,
    "preview": "import os\nimport locale\nimport commentjson as json\n\nreal_path = os.path.split(os.path.realpath(__file__))[0]\n\n\nclass Loc"
  },
  {
    "path": "utils/local_doc.py",
    "chars": 11277,
    "preview": "\n\nfrom modules.model.use_api import *\nfrom modules.model.emb_auto import AutoEmb\nimport os\nfrom langchain.document_loade"
  },
  {
    "path": "utils/parallel_api.py",
    "chars": 19433,
    "preview": "import threading\nfrom threading import Thread\nfrom utils.ui_utils import chat_base_model\nfrom queue import Queue\nfrom ut"
  },
  {
    "path": "utils/svc_utils.py",
    "chars": 1273,
    "preview": "import os\nfrom modules.agent.svc import vits_haruhi\nfrom modules.agent.svc.inference.infer_tool import Svc\n\n\nclass SVC:\n"
  },
  {
    "path": "utils/text_image_utils.py",
    "chars": 9195,
    "preview": "import gradio as gr\nimport requests\nimport json\nfrom PIL import Image\nimport numpy as np\nimport os\nimport re\nfrom dateti"
  },
  {
    "path": "utils/ui_utils.py",
    "chars": 85885,
    "preview": "# This file contains classes that response to the train module on the webui, to keep tracing states, e.g., the loaded\n# "
  },
  {
    "path": "utils/utils.py",
    "chars": 28433,
    "preview": "from transformers import (\n    AutoModelForCausalLM,\n    AutoTokenizer,\n    AutoModel,\n    AutoConfig,\n    BitsAndBytesC"
  },
  {
    "path": "utils/vits_utils.py",
    "chars": 3446,
    "preview": "import json\nimport os\nimport torch\nfrom modules.agent.vits.models import SynthesizerTrn\nfrom modules.agent.vits.vits imp"
  },
  {
    "path": "web-demo-CN.bat",
    "chars": 56,
    "preview": "@echo off\n.\\env\\python.exe webui.py --language cn\npause\n"
  },
  {
    "path": "web-demo-CN.sh",
    "chars": 50,
    "preview": "\n\n./Linux-env/bin/python webui.py --language cn\n\n\n"
  },
  {
    "path": "web-demo-EN.bat",
    "chars": 59,
    "preview": "@echo off\n.\\env\\python.exe webui.py --language en_UK\npause\n"
  },
  {
    "path": "web-demo-EN.sh",
    "chars": 53,
    "preview": "\n\n./Linux-env/bin/python webui.py --language en_UK\n\n\n"
  },
  {
    "path": "webui.py",
    "chars": 822,
    "preview": "import torch\ntorch.cuda.device_count()\nimport gradio as gr\nfrom ui import data,train,apply,chat\nfrom utils.ui_utils impo"
  }
]

About this extraction

This page contains the full source code of the wpydcr/LLM-Kit GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 159 files (1.6 MB), approximately 517.9k tokens, and a symbol index with 1991 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!