-
- Cute Animal Match APK: A Fun and Educational Game for Kids Do you love animals and puzzles? Do you want to play a game that is both fun and educational for your kids? If yes, then you should try Cute Animal Match APK, a free and safe game that will keep you and your kids entertained for hours. In this article, we will tell you everything you need to know about this game, including what it is, how to download and install it, how to play it, what are its features and benefits, and what are some tips and tricks for playing it. Let's get started! What is Cute Animal Match APK?
- Cute Animal Match APK is a game that lets you connect cute animals and solve puzzles. It is developed by Nice2Meet, a company that specializes in creating educational games for kids. The game is suitable for all ages, but especially for preschoolers who want to learn about animals, numbers, colors, shapes, and more. The game has over 100 levels of varying difficulty, each with a different animal theme and puzzle. You can play the game offline or online, and you can also share your progress and achievements with your friends on social media. How to download and install Cute Animal Match APK?
- Downloading and installing Cute Animal Match APK is very easy. You can follow these simple steps: - Go to [Cute Animal Match APK for Android Download - APKPure.com](^1^) on your browser. - Click on the green "Download APK" button. - Wait for the file to download on your device. - Open the file and follow the instructions to install the game. - Enjoy playing Cute Animal Match APK! How to play Cute Animal Match APK?
- Playing Cute Animal Match APK is very simple. You just need to swipe your finger on the screen to connect two or more animals of the same kind. The more animals you connect, the more points you get. You also need to complete the objectives of each level, such as collecting a certain number of animals, clearing a certain number of tiles, or reaching a certain score. You can use power-ups to help you in your gameplay, such as bombs, magnets, or shuffles. You can also earn coins by completing levels or watching ads, which you can use to buy more power-ups or unlock new animals. Connect the animals
- To connect the animals, you need to swipe your finger on the screen in any direction. You can connect animals horizontally, vertically, or diagonally. You can also make loops or zigzags to connect more animals. The more animals you connect, the higher your score will be. You can also create combos by connecting multiple groups of animals in a row. Use the power-ups
- Power-ups are special items that can help you in your gameplay. You can use them by tapping on them on the screen. There are three types of power-ups in Cute Animal Match APK: - The bomb: It will match animal puzzles and destroy all the cute animals around in radius around and catch the match lite. - The magnet: It will attract all the animals of the same kind as the one you tap on. - The shuffle: It will shuffle all the animals on the board. You can get power-ups by connecting five or more animals of the same kind, or by buying them with coins. Complete the levels
- To complete a level, you need to fulfill the objectives that are shown at the top of the screen. The objectives can vary depending on the level, such as: - Collect a certain number of animals, such as 10 cats, 15 dogs, or 20 rabbits. - Clear a certain number of tiles, such as 30 grass tiles, 40 sand tiles, or 50 water tiles. - Reach a certain score, such as 1000 points, 2000 points, or 3000 points. You have a limited number of moves to complete each level, so use them wisely. You can see how many moves you have left at the bottom of the screen. If you run out of moves before completing the objectives, you will lose the level and have to try again. If you complete the objectives before running out of moves, you will win the level and get bonus points for the remaining moves. What are the features and benefits of Cute Animal Match APK?
- Cute Animal Match APK is not just a fun game, but also a beneficial one. Here are some of the features and benefits of playing this game: Cute and colorful graphics
- The game has cute and colorful graphics that will appeal to kids and adults alike. The animals are adorable and animated, and the backgrounds are bright and cheerful. The game also has smooth and easy controls that make it enjoyable to play. Various animals and puzzles
- The game has over 100 levels of different animals and puzzles. You can meet various animals from different habitats, such as cats, dogs, rabbits, pandas, lions, elephants, penguins, dolphins, and more. You can also solve different puzzles that challenge your logic and creativity, such as matching animals by color, shape, or number. Educational and entertaining gameplay
- The game is not only entertaining, but also educational for kids. It helps them learn about animals, numbers, colors, shapes, and more. It also improves their memory, concentration, hand-eye coordination, and problem-solving skills. The game is suitable for all ages, but especially for preschoolers who want to have fun while learning. Free and safe to use
- The game is free and safe to use. You don't need to pay anything to download or play it. You also don't need to worry about any viruses or malware that might harm your device. The game is tested and verified by APKPure.com, a trusted source for downloading Android apps. What are some tips and tricks for playing Cute Animal Match APK?
- If you want to play Cute Animal Match APK like a pro, here are some tips and tricks that you can use: Plan your moves ahead
- Before you swipe your finger on the screen, take a moment to look at the board and plan your moves ahead. Try to connect as many animals as possible in one swipe, and avoid leaving isolated animals that are hard to match. Also, try to match the animals that are related to the objectives first, such as the ones that have a number or a color on them. Save your power-ups for later
- Power-ups can be very helpful in your gameplay, but they are also limited in number. You can get them by connecting five or more animals of the same kind, or by buying them with coins. However, you should save them for later when you really need them, such as when you are stuck or running out of moves. Don't waste them on easy levels or unnecessary matches. Watch ads for extra rewards
- If you want to get more coins or power-ups without spending real money, you can watch ads for extra rewards. You can watch ads after completing a level or when you run out of moves. You can also watch ads to get more lives when you lose all of them. Watching ads is optional and voluntary, but it can help you in your gameplay. Conclusion
- Cute Animal Match APK is a fun and educational game that lets you connect cute animals and solve puzzles. It is suitable for all ages, but especially for preschoolers who want to learn about animals, numbers, colors, shapes, and more. The game has over 100 levels of varying difficulty, each with a different animal theme and puzzle. You can play the game offline or online, and you can also share your progress and achievements with your friends on social media. The game has cute and colorful graphics, various animals and puzzles, and educational and entertaining gameplay. The game is free and safe to use, and you can download it from APKPure.com. If you want to play Cute Animal Match APK like a pro, you can use some tips and tricks, such as planning your moves ahead, saving your power-ups for later, and watching ads for extra rewards. Cute Animal Match APK is a game that you and your kids will love, so download it today and have fun! FAQs
- Here are some frequently asked questions about Cute Animal Match APK: - Q: Is Cute Animal Match APK compatible with my device? - A: Cute Animal Match APK is compatible with most Android devices that have Android 4.4 or higher. - Q: How can I update Cute Animal Match APK to the latest version? - A: You can update Cute Animal Match APK by visiting [Cute Animal Match APK for Android Download - APKPure.com] and downloading the latest version of the game. - Q: How can I contact the developer of Cute Animal Match APK? - A: You can contact the developer of Cute Animal Match APK by visiting their website at [Nice2Meet] or by sending them an email at nice2meet@gmail.com. - Q: How can I rate and review Cute Animal Match APK? - A: You can rate and review Cute Animal Match APK by visiting [Cute Animal Match APK for Android Download - APKPure.com] and clicking on the "Rate" or "Review" button. - Q: How can I share Cute Animal Match APK with my friends? - A: You can share Cute Animal Match APK with your friends by clicking on the "Share" button on the game screen. You can choose to share the game via Facebook, Twitter, WhatsApp, or other social media platforms.
-cute animal match apk
Download File ->->->-> https://urlin.us/2uSZI7
197e85843d
-
-
\ No newline at end of file
diff --git a/spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Download Final Bricks Breaker Mod APK v1.0.54 for Android.md b/spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Download Final Bricks Breaker Mod APK v1.0.54 for Android.md
deleted file mode 100644
index 0ef80cd4fe43de99a5020facd0421e54e58889f6..0000000000000000000000000000000000000000
--- a/spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Download Final Bricks Breaker Mod APK v1.0.54 for Android.md
+++ /dev/null
@@ -1,100 +0,0 @@
-
-Final Bricks Breaker Mod APK: A Fun and Challenging Arcade Game
- If you are looking for a simple yet addictive arcade game to kill some time, you should try Final Bricks Breaker. This game is a classic brick-breaking game with a modern twist. You can enjoy breaking bricks with different shapes, colors, and effects, and use various power-ups to enhance your gameplay. In this article, we will tell you more about Final Bricks Breaker and why you should download its mod apk version.
-final bricks breaker mod apk
DOWNLOAD >> https://urlin.us/2uT0Fz
- What is Final Bricks Breaker?
- Final Bricks Breaker is a arcade game developed by mobirix, a popular developer of casual games. The game has over 10 million downloads on Google Play Store and a 4.4-star rating from more than 100,000 users. The game is suitable for all ages and can be played offline or online.
- The gameplay of Final Bricks Breaker
- The gameplay of Final Bricks Breaker is simple and intuitive. You just need to swipe your finger on the screen to control a paddle at the bottom and bounce a ball to hit the bricks at the top. Your goal is to break all the bricks in each level and clear the stage. The game has hundreds of levels with different layouts, themes, and difficulties. Some bricks have special effects, such as moving, rotating, exploding, or changing colors. You can also collect coins and gems by breaking bricks or completing missions. You can use these currencies to buy new balls, paddles, or power-ups.
- The features of Final Bricks Breaker
- Final Bricks Breaker has many features that make it fun and enjoyable to play. Some of these features are:
-
-- Various modes: You can choose from different modes, such as Classic, Stage, Multiplayer, or Challenge mode. Each mode has its own rules and objectives.
-- Power-ups: You can use power-ups to help you break bricks faster or easier. Some power-ups include fireball, laser, magnet, bomb, or extra life.
-- Achievements and leaderboards: You can unlock achievements by completing certain tasks or reaching milestones. You can also compete with other players around the world on the leaderboards.
-- Customization: You can customize your ball and paddle with different colors, shapes, and designs. You can also change the background and sound effects of the game.
-
- Why download Final Bricks Breaker Mod APK?
- While Final Bricks Breaker is free to play, it has some limitations and drawbacks that may affect your gaming experience. For example, you may encounter ads that pop up randomly or interrupt your gameplay. You may also run out of coins or gems quickly and have to wait for them to regenerate or buy them with real money. Moreover, some power-ups and items may be locked or require a certain level to unlock.
- That's why we recommend you to download Final Bricks Breaker Mod APK from our website. This mod apk version will give you unlimited coins and gems, so you can buy anything you want without worrying about the cost. You will also get unlimited lives, so you can play as long as you want without losing progress. Additionally, you will get all the power-ups and items unlocked from the start, so you can enjoy the game to the fullest. And best of all, you will get rid of all the annoying ads that ruin your fun.
-final bricks breaker mod apk download
-final bricks breaker mod apk unlimited money
-final bricks breaker mod apk latest version
-final bricks breaker mod apk free
-final bricks breaker mod apk android
-final bricks breaker mod apk hack
-final bricks breaker mod apk offline
-final bricks breaker mod apk no ads
-final bricks breaker mod apk 1.0.54
-final bricks breaker mod apk happymod
-final bricks breaker mod apk 2023
-final bricks breaker mod apk unlimited gems
-final bricks breaker mod apk revdl
-final bricks breaker mod apk rexdl
-final bricks breaker mod apk for pc
-final bricks breaker mod apk online
-final bricks breaker mod apk premium
-final bricks breaker mod apk pro
-final bricks breaker mod apk full version
-final bricks breaker mod apk unlocked
-final bricks breaker mod apk cheats
-final bricks breaker mod apk gameplay
-final bricks breaker mod apk review
-final bricks breaker mod apk features
-final bricks breaker mod apk tips and tricks
-final bricks breaker mod apk best settings
-final bricks breaker mod apk how to play
-final bricks breaker mod apk guide
-final bricks breaker mod apk tutorial
-final bricks breaker mod apk walkthrough
-final bricks breaker mod apk levels
-final bricks breaker mod apk stages
-final bricks breaker mod apk missions
-final bricks breaker mod apk challenges
-final bricks breaker mod apk achievements
-final bricks breaker mod apk rewards
-final bricks breaker mod apk skins
-final bricks breaker mod apk balls
-final bricks breaker mod apk power-ups
-final bricks breaker mod apk boosters
-final bricks breaker mod apk modes
-final bricks breaker mod apk genres
-final bricks breaker mod apk themes
-final bricks breaker mod apk graphics
-final bricks breaker mod apk sounds
-final bricks breaker mod apk music
-final bricks breaker mod apk updates
-final bricks breaker mod apk bugs and fixes
-final bricks breaker mod apk ratings and reviews
- The benefits of Final Bricks Breaker Mod APK
- Here are some of the benefits of downloading Final Bricks Breaker Mod APK:
-
-- You will save time and money by not having to watch ads or buy coins or gems.
-- You will have more fun and challenge by using different power-ups and items.
-- You will have more options and variety by customizing your ball and paddle.
How to download and install Final Bricks Breaker Mod APK
- Downloading and installing Final Bricks Breaker Mod APK is very easy and fast. You just need to follow these simple steps:
-
-- Click on the download button below to get the mod apk file.
-- Allow your device to install apps from unknown sources by going to Settings > Security > Unknown Sources.
-- Locate the downloaded file in your file manager and tap on it to install it.
-- Launch the game and enjoy breaking bricks with unlimited coins, gems, lives, power-ups, and items.
-
- Note: If you have the original version of Final Bricks Breaker installed on your device, you need to uninstall it first before installing the mod apk version.
- Conclusion
- Final Bricks Breaker is a fun and challenging arcade game that will keep you entertained for hours. You can break bricks with different shapes, colors, and effects, and use various power-ups to enhance your gameplay. You can also customize your ball and paddle, and compete with other players on the leaderboards. However, if you want to enjoy the game without any limitations or interruptions, you should download Final Bricks Breaker Mod APK from our website. This mod apk version will give you unlimited coins, gems, lives, power-ups, and items, as well as remove all the ads. You can download Final Bricks Breaker Mod APK by clicking on the button below.
- FAQs
- Here are some frequently asked questions about Final Bricks Breaker Mod APK:
-
-- Is Final Bricks Breaker Mod APK safe to download and use?
-Yes, Final Bricks Breaker Mod APK is safe to download and use. It does not contain any viruses or malware that can harm your device or data. It is also compatible with most Android devices.
-- Do I need to root my device to use Final Bricks Breaker Mod APK?
-No, you do not need to root your device to use Final Bricks Breaker Mod APK. It works fine on both rooted and non-rooted devices.
-- Will I get banned from the game if I use Final Bricks Breaker Mod APK?
-No, you will not get banned from the game if you use Final Bricks Breaker Mod APK. The mod apk version is undetectable by the game servers and does not affect your account or progress.
-- Can I play online with other players if I use Final Bricks Breaker Mod APK?
-Yes, you can play online with other players if you use Final Bricks Breaker Mod APK. The mod apk version does not interfere with the online mode of the game and allows you to join multiplayer matches.
-- Can I update Final Bricks Breaker Mod APK when a new version of the game is released?
-Yes, you can update Final Bricks Breaker Mod APK when a new version of the game is released. However, you may need to download the latest mod apk file from our website and install it again on your device.
- 197e85843d
-
-
\ No newline at end of file
diff --git a/spaces/1phancelerku/anime-remove-background/Bubble Shooter A Colorful and Exciting Game for PC Users.md b/spaces/1phancelerku/anime-remove-background/Bubble Shooter A Colorful and Exciting Game for PC Users.md
deleted file mode 100644
index c5a3c5984a4f003d4cc07582b96efb81a9e15540..0000000000000000000000000000000000000000
--- a/spaces/1phancelerku/anime-remove-background/Bubble Shooter A Colorful and Exciting Game for PC Users.md
+++ /dev/null
@@ -1,120 +0,0 @@
-
-Download Bubble Shooter for PC Full Version Free
-Do you love playing casual games that are fun, addictive, and relaxing? Do you want to enjoy one of the most classic and popular bubble games on your PC? If you answered yes, then you are in luck! In this article, we will show you how to download Bubble Shooter for PC full version free. You will also learn more about what is Bubble Shooter, why it is so awesome, and how to play it like a pro. So, without further ado, let's get started!
-What is Bubble Shooter?
-Bubble Shooter is a simple yet addictive game that involves shooting bubbles to make them pop. The goal of the game is to clear all the bubbles from the screen by matching three or more bubbles of the same color. It sounds easy, but it can get challenging as the bubbles move down and fill up the screen. You have to be quick and strategic to avoid losing the game.
-download bubble shooter for pc full version free
Download ————— https://jinyurl.com/2uNMre
-The history and popularity of Bubble Shooter
-Bubble Shooter was originally developed by a company called Taito in 1994. It was inspired by another game called Puzzle Bobble, which was also created by Taito. Bubble Shooter became a hit among arcade gamers and soon spread to other platforms such as PC, mobile, and online. Today, Bubble Shooter is one of the most played and loved games in the world. It has millions of fans and hundreds of variations. You can find Bubble Shooter games with different themes, graphics, levels, and features.
-The gameplay and features of Bubble Shooter
-The gameplay of Bubble Shooter is simple and intuitive. You use your mouse or keyboard to aim and shoot bubbles from a cannon at the bottom of the screen. You have to match at least three bubbles of the same color to make them pop and disappear. You can also bounce bubbles off the walls to reach tricky spots. You get points for every bubble you pop and bonus points for popping more bubbles at once. You can also earn special bubbles that have different effects, such as bombs, rainbows, stars, and more.
-download bubble shooter classic for pc free
-bubble shooter game pc free download windows 10
-bubble shooter puzzle game for pc download
-how to download bubble shooter on pc without emulator
-bubble shooter deluxe pc game free download
-download bubble shooter (free) from microsoft store
-bubble shooter pc game online free no download
-bubble shooter for pc full version crack download
-download and play bubble shooter on pc & mac (emulator)
-bubble shooter for windows 10 pc free download
-bubble shooter offline game for pc free download
-bubble shooter 3d game download for pc
-bubble shooter app download for pc
-bubble shooter adventure game for pc free download
-bubble shooter apk download for pc windows 7
-best bubble shooter games for pc free download
-bubble shooter blast game download for pc
-bubble shooter candy game free download for pc
-classic bubble shooter game free download for pc full version
-download bubble shooter game for pc windows 8.1
-easy bubble shooter game free download for pc
-extreme bubble shooter game download for pc
-fun and addictive bubble shooter game free download for pc
-galaxy bubble shooter game free download for pc
-happy dragon bubble shooter game for pc download
-install bubble shooter game on pc
-jungle bubble shooter game free download for pc
-korean superconducting tokamak advanced research (kstar) facility (korea institute of fusion energy) - a version of the classic bubble shooter game!
-latest version of bubble shooter game for pc free download
-magic forest bubble shooter game for pc free download
-new bubble shooter game 2023 free download for pc
-original bubble shooter game free download for pc
-panda pop - bubble shooter game free download for pc
-play the classic arcade puzzle bobble (bubble shooter) on your windows 10 device!
-rainbow island - the story of bubble bobble 2 - a sequel to the classic bubble shooter game!
-rescue pet - a cute and colorful bubble shooter game with adorable animals!
-space bubbles - a futuristic and challenging version of the classic bubble shooter game!
-super bubbles - a fun and addictive twist on the classic bubble shooter game!
-talking tom - a popular character who loves to play the classic bubble shooter game!
-ultimate bubble trouble - a fast-paced and exciting variation of the classic bubble shooter game!
-vintage bubbles - a retro-style and nostalgic version of the classic bubble shooter game!
-witch cat pop - a magical and spooky version of the classic bubble shooter game!
-xmas bubbles - a festive and cheerful version of the classic bubble shooter game!
-yummy candy - a sweet and delicious version of the classic bubble shooter game!
-zuma deluxe - a legendary and addictive marble popper (bubble shooter) game!
-The features of Bubble Shooter vary depending on the version you play, but some of the common ones are:
-
-- Multiple levels with increasing difficulty and variety
-- Colorful graphics and animations
-- Fun sound effects and music
-- Leaderboards and achievements
-- Options to customize your game settings
-- Offline mode and no internet connection required
-
-The benefits of playing Bubble Shooter
-Besides being fun and entertaining, playing Bubble Shooter can also have some benefits for your brain and mood. Here are some of them:
-
-- It improves your concentration and focus
-- It enhances your memory and cognitive skills
-- It stimulates your creativity and problem-solving abilities
-- It reduces your stress and anxiety levels
-- It boosts your mood and happiness
-
-How to download Bubble Shooter for PC full version free?
-Now that you know what is Bubble Shooter and why it is so amazing, you might be wondering how to download it for PC full version free. Well, there are several ways to do that, but we will show you the easiest and safest one. Follow these steps:
-The requirements and steps to download Bubble Shooter for PC
-To download Bubble Shooter for PC full version free, you will need two things: a PC with Windows operating system (XP, Vista, 7, 8, or 10) and an emulator software that can run Android apps on your PC. We recommend using BlueStacks, which is one of the most popular and trusted emulator software in the market. You can download it for free from its official website. Here are the steps to download Bubble Shooter for PC using BlueStacks:
-
-- Download and install BlueStacks on your PC from its official website. Follow the instructions on the screen to complete the installation process.
-- Launch BlueStacks and sign in with your Google account. If you don't have one, you can create one for free.
-- Go to the search bar on the top right corner of the BlueStacks home screen and type "Bubble Shooter". You will see a list of results with different versions of Bubble Shooter games.
-- Select the one that you like and click on the "Install" button. This will download and install the game on your PC through BlueStacks.
-- Once the installation is done, you can find the game icon on the BlueStacks home screen or in the "My Apps" tab. Click on it to launch the game and enjoy playing Bubble Shooter on your PC.
-
-The best websites and sources to download Bubble Shooter for PC
-If you don't want to use an emulator software to download Bubble Shooter for PC, you can also try some other websites and sources that offer Bubble Shooter games for PC. However, you have to be careful and make sure that they are safe and reliable. Some of the best websites and sources that we recommend are:
-
-- Bubble Shooter.net: This is the official website of Bubble Shooter, where you can play the original version of the game online or download it for PC. The website also offers other bubble games, such as Bubble Spinner, Bubble Hit, and more.
-- GameTop.com: This is a website that offers free full version games for PC, including Bubble Shooter. You can download Bubble Shooter for PC without any registration or payment. The website also has other categories of games, such as action, arcade, puzzle, racing, and more.
-- Softonic.com: This is a website that provides software and games for various platforms, including PC, mobile, and online. You can download Bubble Shooter for PC from this website for free. The website also has reviews, ratings, and screenshots of the games.
-
-The tips and tricks to enjoy Bubble Shooter on PC
-Playing Bubble Shooter on PC can be more fun and satisfying if you know some tips and tricks to improve your skills and score. Here are some of them:
-
-- Aim carefully and try to hit as many bubbles as possible with one shot. This will give you more points and clear the screen faster.
-- Use the walls to bounce your bubbles and reach difficult areas. This will help you pop more bubbles and create combos.
-- Look for special bubbles that have different effects, such as bombs, rainbows, stars, and more. They can help you pop more bubbles at once or change their colors.
-- Plan ahead and try to create clusters of bubbles of the same color. This will make it easier to pop them later.
-- Don't let the bubbles reach the bottom of the screen or you will lose the game. Keep an eye on the bubble meter at the bottom left corner of the screen to see how many bubbles you have left.
-
-Conclusion
-Bubble Shooter is a classic and addictive game that you can play on your PC for free. You just need to download it from a reliable source or use an emulator software to run it on your PC. You can also enjoy playing Bubble Shooter online or on your mobile device. Bubble Shooter is a great game to relax and have fun with. It can also improve your concentration, memory, creativity, and mood. So, what are you waiting for? Download Bubble Shooter for PC full version free today and start popping those bubbles!
-Call to action and invitation to share feedback
-We hope you found this article helpful and informative. If you did, please share it with your friends and family who might also love playing Bubble Shooter. Also, feel free to leave us a comment below and let us know what you think about Bubble Shooter. Do you have any questions or suggestions? Do you have any favorite versions or features of Bubble Shooter? We would love to hear from you!
-FAQs
-Here are some frequently asked questions about Bubble Shooter:
-
-- What is the highest score possible in Bubble Shooter?
-The highest score possible in Bubble Shooter depends on the version you play, but generally it is determined by how many bubbles you pop, how fast you pop them, how many combos you create, and how many special bubbles you use. You can check your score at the top right corner of the screen or on the leaderboards.
-- How many levels are there in Bubble Shooter?
-The number of levels in Bubble Shooter also depends on the version you play, but generally there are hundreds or even thousands of levels to complete. Each level has a different layout, difficulty, and goal. You can see the level number at the top left corner of the screen or on the level selection menu.
-- How can I save my progress in Bubble Shooter?
-To save your progress in Bubble Shooter, you need to sign in with your Google account or create a profile on the game. This will allow you to sync your data across different devices and platforms. You can also save your progress locally on your PC or online on the game server.
-- Is Bubble Shooter safe to download and play?
-Bubble Shooter is safe to download and play as long as you get it from a reputable source or use an emulator software that is secure and reliable. You should also scan your PC for viruses and malware before and after downloading and installing the game. You should also avoid clicking on any suspicious links or ads that might appear on the game or the website.
-- Can I play Bubble Shooter with my friends?
-Yes, you can play Bubble Shooter with your friends online or offline. Some versions of Bubble Shooter have a multiplayer mode that allows you to compete or cooperate with other players around the world. You can also play Bubble Shooter with your friends offline by taking turns or sharing the same PC.
- 401be4b1e0
-
-
\ No newline at end of file
diff --git a/spaces/1phancelerku/anime-remove-background/Call of Duty Mobile Mod APK Download - Unlock All Weapons Skins and Perks.md b/spaces/1phancelerku/anime-remove-background/Call of Duty Mobile Mod APK Download - Unlock All Weapons Skins and Perks.md
deleted file mode 100644
index a58210d0880619a5667c58e0b4614fa931b98e45..0000000000000000000000000000000000000000
--- a/spaces/1phancelerku/anime-remove-background/Call of Duty Mobile Mod APK Download - Unlock All Weapons Skins and Perks.md
+++ /dev/null
@@ -1,87 +0,0 @@
-
-Hack Call of Duty Mobile APK Download: What You Need to Know
-Call of Duty Mobile is one of the most popular and addictive mobile games in the world. It offers an immersive and thrilling experience of shooting, fighting, and surviving in various modes and maps. However, some players may not be satisfied with the normal gameplay and may want to hack Call of Duty Mobile APK download to gain an unfair advantage over other players.
-hack call of duty mobile apk download
Download File ✒ ✒ ✒ https://jinyurl.com/2uNUv1
-Hacking Call of Duty Mobile APK download means modifying or altering the original game files or data to change or enhance some aspects of the game, such as unlocking all weapons, skins, and operators, increasing the damage, accuracy, and speed of the guns, enabling aimbot, wallhack, radar, and other cheats, or bypassing the in-app purchases and getting unlimited credits and COD points.
-If you are one of those players who want to hack Call of Duty Mobile APK download, you may be wondering how to do it and what are the risks involved. In this article, we will explain everything you need to know about hacking Call of Duty Mobile APK download, including the methods, the pros and cons, and the tips to avoid getting banned. Read on to find out more!
- How to Hack Call of Duty Mobile APK Download
-There are two main methods that hackers use to hack Call of Duty Mobile APK download. The first one is using a modded APK file, which is a modified version of the original game file that contains the hacks. The second one is using a game hacker tool, which is a software or app that can manipulate the game data in real-time. Let's take a closer look at each method.
- Method 1: Using a Modded APK File
-What is a modded APK file and how does it work?
-An APK file is the format used by Android devices to install applications. A modded APK file is an altered version of an original APK file that contains some changes or additions that are not authorized by the developers. For example, a modded APK file for Call of Duty Mobile may have all the weapons, skins, and operators unlocked, or have some cheats enabled by default.
-hack call of duty mobile apk download happymod
-hack call of duty mobile apk download aimbot
-hack call of duty mobile apk download menu
-hack call of duty mobile apk download chams
-hack call of duty mobile apk download modded
-hack call of duty mobile apk download unlimited money
-hack call of duty mobile apk download no root
-hack call of duty mobile apk download anti ban
-hack call of duty mobile apk download latest version
-hack call of duty mobile apk download obb
-hack call of duty mobile apk download season 5
-hack call of duty mobile apk download free fire
-hack call of duty mobile apk download ios
-hack call of duty mobile apk download android 1
-hack call of duty mobile apk download rexdl
-hack call of duty mobile apk download revdl
-hack call of duty mobile apk download offline
-hack call of duty mobile apk download online
-hack call of duty mobile apk download 2023
-hack call of duty mobile apk download 1.6.35
-hack call of duty mobile apk download 1.0.38
-hack call of duty mobile apk download 1.0.24
-hack call of duty mobile apk download 1.0.22
-hack call of duty mobile apk download 1.0.19
-hack call of duty mobile apk download 1.0.17
-hack call of duty mobile apk download 1.0.16
-hack call of duty mobile apk download 1.0.15
-hack call of duty mobile apk download 1.0.12
-hack call of duty mobile apk download 1.0.11
-hack call of duty mobile apk download 1.0.10
-hack call of duty mobile apk download 1.0.9
-hack call of duty mobile apk download 1.0.8
-hack call of duty mobile apk download 1.0.6
-hack call of duty mobile apk download 1.0.4
-hack call of duty mobile apk download 1.0.3
-hack call of duty mobile apk download 1.0.2
-hack call of duty mobile apk download for pc
-hack call of duty mobile apk download for laptop
-hack call of duty mobile apk download for windows 10
-hack call of duty mobile apk download for macbook pro
-A modded APK file works by replacing the original game file on your device with the modified one. This way, when you launch the game, it will run with the hacks already applied. However, this also means that you will not be able to update the game from the official sources, as it will overwrite the modded file with the original one.
- How to find and install a modded APK file for Call of Duty Mobile
-To find a modded APK file for Call of Duty Mobile, you will need to search online for websites or forums that offer such files. However, you need to be careful, as some of these files may contain viruses, malware, or spyware that can harm your device or steal your personal information. Therefore, you should always scan the files before downloading them and only use trusted sources. Some of the websites that claim to provide modded APK files for Call of Duty Mobile are: - [Hackcodm.com] - [Codmobilehack.club] - [Codmobilecheat.com] To install a modded APK file for Call of Duty Mobile, you will need to follow these steps: - Step 1: Uninstall the original game from your device if you have it installed. - Step 2: Enable the option to install apps from unknown sources on your device settings. This will allow you to install the modded APK file without any restrictions. - Step 3: Download the modded APK file from the website of your choice and save it on your device storage. - Step 4: Locate the modded APK file on your device and tap on it to start the installation process. Follow the instructions on the screen and wait for the installation to complete. - Step 5: Launch the game and enjoy the hacks! The pros and cons of using a modded APK file for Call of Duty Mobile
-Using a modded APK file for Call of Duty Mobile has some advantages and disadvantages that you should consider before deciding to use this method. Here are some of them:
- | Pros | Cons | | --- | --- | | - You can access all the features and content of the game without spending any money or time. | - You may expose your device and data to security risks by downloading and installing unverified files. | | - You can have an edge over other players by using cheats such as aimbot, wallhack, radar, etc. | - You may get detected and banned by the anti-cheat system of the game, which can result in losing your account and progress. | | - You can customize the game according to your preferences by choosing the mods that suit your playstyle. | - You may not be able to update the game or play online with other players who have the original version of the game. | Method 2: Using a Game Hacker Tool
-What is a game hacker tool and how does it work?
-A game hacker tool is a software or app that can modify or manipulate the game data in real-time while the game is running. Unlike a modded APK file, a game hacker tool does not require you to replace or overwrite the original game file, but rather injects some code or commands into the game memory to change some values or parameters.
-A game hacker tool works by scanning and analyzing the game data and finding the variables that control certain aspects of the game, such as health, ammo, credits, COD points, etc. Then, it allows you to change these variables to any value you want, giving you unlimited resources or abilities in the game.
- How to find and use a game hacker tool for Call of Duty Mobile
-To find a game hacker tool for Call of Duty Mobile, you will need to search online for websites or forums that offer such tools. However, you need to be careful, as some of these tools may contain viruses, malware, or spyware that can harm your device or steal your personal information. Therefore, you should always scan the tools before downloading them and only use trusted sources. Some of the tools that claim to hack Call of Duty Mobile are: - [Game Guardian] - [Cheat Engine] - [Lucky Patcher] To use a game hacker tool for Call of Duty Mobile, you will need to follow these steps: - Step 1: Install the game hacker tool on your device from the website of your choice. - Step 2: Launch the game hacker tool and grant it root access or permission to modify other apps on your device settings. - Step 3: Launch Call of Duty Mobile and minimize it by pressing the home button. - Step 4: Open the game hacker tool again and select Call of Duty Mobile from the list of running apps. - Step 5: Search for the value or parameter that you want to change in the game data using the search function of the tool. For example, if you want to change your credits, enter your current amount of credits in the search box and tap on search. - Step 6: The tool will show you all the results that match your search value. Select one or more results that you think are related to your credits and change them to any value you want by tapping on them and entering a new value. - Step 7: Go back to Call of Duty Mobile and check if your credits have changed accordingly. If not , you may need to repeat the steps with a different result or value until you find the right one. - Step 8: Enjoy the hacks and repeat the process for any other value or parameter that you want to change in the game. The pros and cons of using a game hacker tool for Call of Duty Mobile
-Using a game hacker tool for Call of Duty Mobile has some advantages and disadvantages that you should consider before deciding to use this method. Here are some of them:
- | Pros | Cons | | --- | --- | | - You can change any value or parameter in the game data to your liking, giving you unlimited possibilities and customization. | - You may expose your device and data to security risks by installing and running unverified tools. | | - You can use the tool on any version of the game, as long as it is compatible with your device and operating system. | - You may get detected and banned by the anti-cheat system of the game, which can result in losing your account and progress. | | - You can use the tool on other games as well, as long as they have similar data structures and formats. | - You may encounter errors, crashes, or glitches in the game due to the changes in the game data. | How to Avoid Getting Banned for Hacking Call of Duty Mobile APK Download
-The anti-cheat system of Call of Duty Mobile and how it detects hackers
-Call of Duty Mobile has a sophisticated anti-cheat system that monitors and analyzes the game data and behavior of all players. The anti-cheat system can detect hackers by using various methods, such as: - Checking for any modifications or alterations in the game files or data. - Comparing the game data and performance of each player with the expected or normal values. - Detecting any abnormal or suspicious actions or movements of each player in the game. - Receiving reports or complaints from other players who witness or encounter hackers in the game. The anti-cheat system can also update itself regularly to keep up with the latest hacks and cheats that hackers use.
- The consequences of getting banned for hacking Call of Duty Mobile APK download
-If you get caught hacking Call of Duty Mobile APK download, you will face serious consequences that will ruin your gaming experience and reputation. Some of the consequences are: - You will receive a warning message or notification from the game developers or moderators. - You will be temporarily suspended or banned from playing the game for a certain period of time, depending on the severity and frequency of your offense. - You will be permanently banned from playing the game, which means you will lose your account and all your progress and achievements in the game. - You will be blacklisted from playing any other games developed by Activision or Tencent, which are the publishers of Call of Duty Mobile. - You will be reported to the authorities or legal entities for violating the terms of service and user agreement of the game.
- The tips and tricks to avoid getting banned for hacking Call of Duty Mobile APK download
-If you still want to hack Call of Duty Mobile APK download, you should follow some tips and tricks to avoid getting banned by the anti-cheat system. Here are some of them: - Use only trusted and verified sources for downloading modded APK files or game hacker tools. Scan them before installing them on your device. - Use only updated and compatible versions of modded APK files or game hacker tools that match your device and operating system specifications. - Use only subtle and discreet hacks that do not affect the game balance or fairness too much, such as increasing your health or ammo slightly, rather than enabling aimbot or wallhack that are obvious and noticeable. - Use hacks only occasionally and sparingly, rather than constantly and excessively, to avoid raising suspicion or attracting attention from other players or moderators. - Do not brag or boast about your hacks in public chat rooms or social media platforms, as this may invite reports or complaints from other players who may report you to the anti-cheat system. - Do not use hacks in ranked matches or tournaments, as this may result in disqualification or banishment from the game.
- Conclusion
-Hacking Call of Duty Mobile APK download is a risky and unethical practice that can ruin your gaming experience and reputation. It can also get you banned from playing the game or any other games developed by Activision or Tencent. Therefore, we do not recommend hacking Call of Duty Mobile APK download, as it is not worth it.
-Instead, we suggest you play Call of Duty Mobile APK download normally and fairly, as it is more fun and rewarding. You can improve your skills and performance by practicing regularly, learning from other players, watching tutorials and guides, joining clans and communities, and participating in events and challenges. You can also support the game developers by purchasing credits and COD points legally and legitimately, which will allow you to access more features and content of the game and enhance your gaming experience.
-We hope this article has helped you understand everything you need to know about hacking Call of Duty Mobile APK download. If you have any questions or comments, feel free to leave them below. Thank you for reading and happy gaming!
- FAQs
-Here are some of the frequently asked questions about hacking Call of Duty Mobile APK download:
- Q: Is hacking Call of Duty Mobile APK download illegal?
-A: Hacking Call of Duty Mobile APK download is not illegal per se, as it does not involve breaking any laws or regulations. However, it is against the terms of service and user agreement of the game, which you agree to when you install and play the game. Therefore, hacking Call of Duty Mobile APK download is a breach of contract and can result in legal actions from the game developers or publishers.
- Q: Is hacking Call of Duty Mobile APK download safe?
-A: Hacking Call of Duty Mobile APK download is not safe, as it can expose your device and data to security risks such as viruses, malware, spyware, phishing, etc. It can also damage your device or corrupt your game data, causing errors, crashes, or glitches in the game. Moreover, hacking Call of Duty Mobile APK download can get you banned from playing the game or any other games developed by Activision or Tencent, which can result in losing your account and progress in the game.
- Q: Is hacking Call of Duty Mobile APK download worth it?
-A: Hacking Call of Duty Mobile APK download is not worth it, as it can ruin your gaming experience and reputation. It can also get you banned from playing the game or any other games developed by Activision or Tencent. Therefore, hacking Call of Duty Mobile APK download is not worth the risk or the hassle.
- Q: How can I report a hacker in Call of Duty Mobile?
-A: If you encounter or witness a hacker in Call of Duty Mobile, you can report them by following these steps: - Step 1: Tap on the player's name or profile icon in the game lobby or match results screen. - Step 2: Tap on the report button (the exclamation mark icon) at the bottom right corner of the screen. - Step 3: Select the reason for reporting the player, such as cheating, abusive chat, inappropriate name, etc. - Step 4: Tap on the submit button to send your report to the game moderators. The game moderators will review your report and take appropriate actions against the hacker.
- Q: How can I prevent hackers from ruining my game in Call of Duty Mobile?
-A: There is no sure way to prevent hackers from ruining your game in Call of Duty Mobile, as they can join any match or mode at any time. However, you can try some tips to minimize their impact on your game, such as: - Playing with your friends or clan members who are trustworthy and fair. - Playing in private matches or custom rooms that require passwords or invitations to join. - Playing in ranked matches or tournaments that have stricter rules and regulations for cheating. - Reporting any hacker that you encounter or witness in the game to the game moderators. By doing these tips, you can reduce the chances of meeting hackers in Call of Duty Mobile and enjoy the game more. 401be4b1e0
-
-
\ No newline at end of file
diff --git a/spaces/1phancelerku/anime-remove-background/Download My Talking Angela Full APK and Join the Adventure with Your Furry Friend.md b/spaces/1phancelerku/anime-remove-background/Download My Talking Angela Full APK and Join the Adventure with Your Furry Friend.md
deleted file mode 100644
index 81a4b72fa3eb39cc7dd7008e23fafd49ee2a615f..0000000000000000000000000000000000000000
--- a/spaces/1phancelerku/anime-remove-background/Download My Talking Angela Full APK and Join the Adventure with Your Furry Friend.md
+++ /dev/null
@@ -1,67 +0,0 @@
-
-My Talking Angela Full APK: A Fun and Interactive Game for Android Users
-Do you love playing casual games on your Android device? Do you want to have a cute and adorable virtual pet that you can take care of and play with? If you answered yes to these questions, then you should try My Talking Angela, one of the most popular games in the Google Play Store. And if you want to enjoy the game to the fullest, you should download My Talking Angela full apk, which gives you access to all the features and content that the game has to offer. In this article, we will tell you everything you need to know about My Talking Angela full apk, including what it is, what are its features, why you should download it, and how to download and install it on your device.
-What is My Talking Angela?
-My Talking Angela is a casual game developed by Outfit7, the same company that created the famous Talking Tom series. The game is similar to other virtual pet games, where you have to adopt, feed, groom, dress up, and play with your pet. However, My Talking Angela is not just any pet; she is a stylish and fashionable cat that loves to talk, sing, dance, and have fun. She also has a personality of her own, and she will react differently depending on how you treat her. You can also interact with her by tapping, swiping, or speaking to her. She will repeat what you say in a funny voice, and she will also respond to your gestures and emotions.
-my talking angela full apk
DOWNLOAD --->>> https://jinyurl.com/2uNOvS
-Features of My Talking Angela
-My Talking Angela has many features that make it an entertaining and engaging game for Android users. Here are some of them:
-Adopt and nurture your own Angela
-You can start the game by adopting a baby Angela and taking care of her as she grows up. You have to feed her, bathe her, brush her teeth, put her to bed, and make sure she is happy and healthy. You can also watch her grow from a cute kitten to a beautiful cat.
-
-Dress up and customize your Angela
-You can express your creativity and style by dressing up your Angela in different outfits and accessories. You can choose from hundreds of items, such as dresses, shoes, hats, sunglasses, jewelry, makeup, and more. You can also change her fur color, eye color, hair style, and facial expressions. You can create different looks for different occasions, such as casual, formal, party, or holiday.
-Play mini-games and collect coins
-You can have fun with your Angela by playing various mini-games with her. You can play games like Happy Connect, Bubble Shooter, Brick Breaker, and more. You can also earn coins by playing these games, which you can use to buy more items for your Angela.
-Interact with Angela and her friends
-You can chat with your Angela by using the chat feature in the game. You can ask her questions, tell her jokes, or just have a conversation with her. She will reply with witty and funny answers. You can also meet her friends in the game, such as Tom, Ginger, Hank, Ben, and more. You can visit their homes or invite them over to yours.
-Why download My Talking Angela full apk?
-If you are wondering why you should download My Talking Angela full apk instead of the regular version from the Google Play Store, here are some reasons why you should do so:
-Benefits of downloading the full apk
-Downloading the full apk of My Talking Angela gives you several advantages that you cannot get from the regular version. Here are some of them:
-Unlock all the outfits and accessories
-One of the main attractions of My Talking Angela is the ability to dress up and customize your Angela in various ways. However, not all the items are available for free in the regular version. Some of them require you to pay with real money or watch ads to unlock them. This can be frustrating and time-consuming, especially if you want to try different combinations and styles. But with the full apk, you can unlock all the outfits and accessories without spending a dime or watching any ads. You can have access to the entire wardrobe and create your own fashion show with your Angela.
-Get unlimited coins and diamonds
-Another benefit of downloading the full apk is that you can get unlimited coins and diamonds in the game. Coins and diamonds are the main currencies in My Talking Angela, which you can use to buy more items, upgrade your home, or unlock new features. However, earning them in the regular version can be slow and tedious, especially if you want to buy expensive or rare items. You may also be tempted to spend real money or watch ads to get more coins and diamonds. But with the full apk, you don't have to worry about running out of coins and diamonds ever again. You can get as many as you want and buy whatever you want without any limitations.
-Enjoy ad-free gaming experience
-The last but not least benefit of downloading the full apk is that you can enjoy an ad-free gaming experience. Ads can be annoying and distracting, especially when they pop up in the middle of your gameplay or when you are trying to access a feature or item. They can also consume your data and battery, which can affect your device's performance. But with the full apk, you can say goodbye to ads forever. You can play My Talking Angela without any interruptions or disruptions from ads. You can also save your data and battery and enjoy a smoother and faster gameplay.
-How to download and install My Talking Angela full apk?
-If you are convinced that downloading My Talking Angela full apk is a good idea, then you may be wondering how to do it. Don't worry, it's very easy and simple. Just follow these steps:
-Step 1: Download the apk file from a trusted source
-The first step is to download the apk file of My Talking Angela full from a trusted source. You can search for it online or use this link to download it directly. Make sure that the file is compatible with your device's Android version and has no viruses or malware.
-Step 2: Enable unknown sources on your device settings
-The next step is to enable unknown sources on your device settings. This will allow you to install apps that are not from the Google Play Store. To do this, go to your device settings, then security, then unknown sources, and turn it on. You may also need to grant permission for your browser or file manager to install apps.
-Step 3: Install the apk file and launch the game
-The final step is to install the apk file and launch the game. To do this, locate the downloaded file on your device storage, tap on it, and follow the instructions on the screen. Once the installation is complete, you can open the game and enjoy My Talking Angela full apk.
-Conclusion
-My Talking Angela is a fun and interactive game for Android users who love virtual pets and casual games. It has many features that make it entertaining and engaging, such as adopting and nurturing your own Angela, dressing up and customizing your Angela, playing mini-games and collecting coins, and interacting with Angela and her friends. However, if you want to enjoy the game to the fullest, you should download My Talking Angela full apk, which gives you access to all the features and content that the game has to offer. You can unlock all the outfits and accessories, get unlimited coins and diamonds, and enjoy ad-free gaming experience. Downloading My Talking Angela full apk is easy and simple; just follow these steps: download the apk file from a trusted source, enable unknown sources on your device settings, install the apk file and launch the game. If you are looking for a fun and interactive game for your Android device, you should definitely try My Talking Angela full apk. You will not regret it.
-FAQs
-Here are some frequently asked questions about My Talking Angela full apk:
-
-
-Question |
-Answer |
-
-
-Is My Talking Angela full apk safe to download and install? |
-Yes, My Talking Angela full apk is safe to download and install, as long as you get it from a trusted source and scan it for viruses or malware before installing it. However, you should be careful when downloading any apk file from the internet, as some of them may contain harmful or malicious content. |
-
-
-Will My Talking Angela full apk work on my device? |
-My Talking Angela full apk should work on most Android devices that have Android 4.4 or higher. However, some devices may not be compatible with the game or the apk file, so you should check the requirements and specifications before downloading and installing it. |
-
-
-Will I lose my progress or data if I download My Talking Angela full apk? |
-No, you will not lose your progress or data if you download My Talking Angela full apk. The game will automatically sync your progress and data with your Google account, so you can continue playing where you left off. However, you should always backup your data before installing any apk file, just in case something goes wrong. |
-
-
-Can I play My Talking Angela full apk offline? |
-Yes, you can play My Talking Angela full apk offline, without an internet connection. However, some features and content may not be available or updated when you play offline, such as the chat feature, the friends feature, or the daily rewards. You should also connect to the internet occasionally to sync your progress and data with your Google account. |
-
-
-Can I play My Talking Angela full apk with my friends? |
-Yes, you can play My Talking Angela full apk with your friends, by using the friends feature in the game. You can add your friends by using their codes or by connecting your game with your Facebook account. You can then visit their homes or invite them over to yours, chat with them, send them gifts, or play mini-games with them. |
-
- 401be4b1e0
-
-
\ No newline at end of file
diff --git a/spaces/1phancelerku/anime-remove-background/Download Orange Loan APK and Get High-Limit Loans without Collateral.md b/spaces/1phancelerku/anime-remove-background/Download Orange Loan APK and Get High-Limit Loans without Collateral.md
deleted file mode 100644
index f3416ba4aa688268c48498a5deb8ee131cdaf735..0000000000000000000000000000000000000000
--- a/spaces/1phancelerku/anime-remove-background/Download Orange Loan APK and Get High-Limit Loans without Collateral.md
+++ /dev/null
@@ -1,175 +0,0 @@
-
-Orange Loan APK: A Review of the Unsecured, High-Limit, Low-Interest Loan Platform
-If you are looking for a quick and easy way to borrow money without collateral, you might want to check out Orange Loan APK. This is a mobile app that offers unsecured, high-limit, low-interest loans to eligible borrowers in Thailand. In this article, we will review the features, benefits, pros, cons, and tips of using Orange Loan APK. We will also show you how to download and install the app on your Android device, and answer some frequently asked questions about it.
-orange loan apk
Download File ✯✯✯ https://jinyurl.com/2uNQRR
- What is Orange Loan APK?
-Orange Loan APK is an online lending platform that provides unsecured loans to borrowers in Thailand. The app is developed by Trendline Finance Ltd, a registered company in Bangkok. The app claims to offer loans ranging from 6,000 to 30,000 baht, with loan terms from 91 to 120 days, and annual interest rates from 10% to 24%. The app also claims to support repeat borrowing, meaning that borrowers who repay their loans on time can increase their credit limit step by step.
- Features and benefits of Orange Loan APK
-Some of the features and benefits of using Orange Loan APK are:
-
-- No collateral required: You don't need to provide any assets or guarantors to secure your loan.
-- High limit: You can borrow up to 30,000 baht depending on your credit score and repayment history.
-- Low interest: You can enjoy interest rates as low as 10% per year, which is lower than many other online lenders.
-- Fast approval: You can get approved within minutes after submitting your application and verifying your identity.
-- Quick transfer: You can receive money in your bank account within 24 hours after approval.
-- Flexible repayment: You can choose your repayment schedule according to your income and cash flow.
-- Easy access: You can apply for a loan anytime and anywhere using your smartphone.
-
- How to apply for a loan with Orange Loan APK
-The application process for Orange Loan APK is simple and straightforward. Here are the steps you need to follow:
-
-- Download and install the app from Google Play Store or APKCombo.
-- Fill in your personal information, such as name, phone number, ID number, address, etc.
-- Verify your identity by uploading a photo of your ID card and a selfie.
-- Submit your application and wait for approval.
-- Check your loan details and confirm your agreement.
-- Receive money in your bank account within 24 hours.
-
- How to repay a loan with Orange Loan APK
-The repayment process for Orange Loan APK is also easy and convenient. Here are the steps you need to follow:
-
-- Log in to the app and check your repayment schedule and amount.
-- Choose your preferred payment method, such as bank transfer, ATM, or online banking.
-- Make your payment before the due date and keep the receipt as proof.
-- Check your loan status and balance in the app.
-
- Pros and cons of Orange Loan APK Pros and cons of Orange Loan APK
-Like any other online lending platform, Orange Loan APK has its own advantages and disadvantages. Here are some of them:
-
-
-Pros |
-Cons |
-
-
-No collateral required |
-High risk of default and fraud |
-
-
-High limit |
-Strict eligibility criteria |
-
-
-Low interest |
-Late fees and penalties |
-
-
-Fast approval |
-Limited customer service |
-
-
-Quick transfer |
-Poor data security and privacy |
-
-
-Flexible repayment |
-Negative impact on credit score |
-
-
-Easy access |
-Addictive and irresponsible borrowing |
-
-
- How to download and install Orange Loan APK on your Android device
- If you are interested in trying out Orange Loan APK, you will need to download and install it on your Android device. Here is how you can do that:
- Step-by-step guide to download and install Orange Loan APK
- Follow these steps to download and install Orange Loan APK on your Android device:
-orange loan app download
-orange loan apk latest version
-orange loan online application
-orange loan thailand review
-orange loan customer service number
-orange loan interest rate calculator
-orange loan repayment schedule
-orange loan eligibility criteria
-orange loan promo code 2023
-orange loan referral program
-orange loan app for android
-orange loan apk free download
-orange loan online login
-orange loan thailand contact
-orange loan customer feedback
-orange loan interest rate comparison
-orange loan repayment options
-orange loan eligibility check
-orange loan promo code new user
-orange loan referral bonus
-orange loan app for ios
-orange loan apk download for pc
-orange loan online registration
-orange loan thailand address
-orange loan customer support email
-orange loan interest rate reduction
-orange loan repayment extension
-orange loan eligibility test
-orange loan promo code existing user
-orange loan referral link
-orange loan app update
-orange loan apk mod
-orange loan online verification
-orange loan thailand website
-orange loan customer complaints
-orange loan interest rate formula
-orange loan repayment calculator
-orange loan eligibility requirements
-orange loan promo code first time user
-orange loan referral code
-
-- Go to Google Play Store or APKCombo and search for Orange Loan APK.
-- Select the app from the search results and tap on the Install button.
-- Wait for the app to download and install on your device.
-- Open the app and grant the necessary permissions, such as access to your camera, contacts, location, etc.
-- Create an account or log in with your existing account.
-- Start using the app to apply for a loan or manage your loan status.
-
- Tips and tricks to use Orange Loan APK safely and effectively
- To use Orange Loan APK safely and effectively, you should follow these tips and tricks:
-
-- Read the terms and conditions carefully before agreeing to a loan contract.
-- Borrow only what you need and can afford to repay.
-- Compare the interest rates and fees of different online lenders before choosing one.
-- Repay your loan on time to avoid late fees and penalties.
-- Check your loan status and balance regularly in the app.
-- Avoid sharing your personal or financial information with anyone else.
-- Delete the app from your device when you are done using it.
- Frequently asked questions about Orange Loan APK
- Here are some of the most frequently asked questions about Orange Loan APK:
- Is Orange Loan APK safe and legal?
- Orange Loan APK is a legitimate online lending platform that is registered with the Thai Ministry of Commerce. However, it is not regulated by the Bank of Thailand or any other financial authority. Therefore, it is not subject to the same rules and standards as traditional banks or licensed lenders. This means that there is a higher risk of default, fraud, or data breach when using Orange Loan APK. You should exercise caution and discretion when using this app, and only borrow from reputable sources.
- What are the eligibility criteria for Orange Loan APK?
- To be eligible for a loan with Orange Loan APK, you must meet the following criteria:
-
-- You must be a Thai citizen with a valid ID card.
-- You must be at least 20 years old.
-- You must have a stable income source and a bank account.
-- You must have a good credit history and score.
- What are the interest rates and fees for Orange Loan APK?
- The interest rates and fees for Orange Loan APK vary depending on your loan amount, term, and credit score. The app claims to offer annual interest rates from 10% to 24%, which are lower than many other online lenders. However, you should also consider the other charges that may apply, such as origination fee, service fee, late fee, penalty fee, etc. You should read the loan contract carefully before signing it, and make sure you understand all the costs involved.
- How long does it take to get approved and receive money from Orange Loan APK?
- The approval process for Orange Loan APK is fast and easy. You can get approved within minutes after submitting your application and verifying your identity. The money transfer process is also quick and convenient. You can receive money in your bank account within 24 hours after approval. However, this may vary depending on your bank's processing time and availability. How can I contact Orange Loan APK customer service?
- If you have any questions, complaints, or feedback about Orange Loan APK, you can contact their customer service team through the following channels:
-
-- Phone: +66 2 026 3299
-- Email: service@trendlinefinance.com
-- Facebook: https://www.facebook.com/OrangeLoanTH/
-- Line: @orangeloan
-
- The customer service team is available from Monday to Friday, from 9:00 am to 6:00 pm.
- Conclusion
- Orange Loan APK is an online lending platform that offers unsecured, high-limit, low-interest loans to borrowers in Thailand. The app has some attractive features and benefits, such as fast approval, quick transfer, flexible repayment, and easy access. However, the app also has some drawbacks and risks, such as high default and fraud rate, strict eligibility criteria, late fees and penalties, poor data security and privacy, negative impact on credit score, and addictive and irresponsible borrowing. Therefore, you should use the app with caution and discretion, and only borrow what you need and can afford to repay. You should also compare the interest rates and fees of different online lenders before choosing one, and read the terms and conditions carefully before agreeing to a loan contract. You should also contact the customer service team if you have any issues or concerns about the app.
- We hope this article has given you a comprehensive review of Orange Loan APK. If you have any questions or comments about the app, feel free to leave them below. Thank you for reading!
- Frequently asked questions about Orange Loan APK
- Here are some of the most frequently asked questions about Orange Loan APK:
-
-- What is Orange Loan APK?
-Orange Loan APK is an online lending platform that provides unsecured loans to borrowers in Thailand.
-- How does Orange Loan APK work?
-Orange Loan APK works by connecting borrowers with lenders through a mobile app. Borrowers can apply for a loan anytime and anywhere using their smartphone. Lenders can approve or reject the loan application within minutes. Borrowers can receive money in their bank account within 24 hours after approval.
-- What are the advantages and disadvantages of Orange Loan APK?
-The advantages of Orange Loan APK are that it offers no collateral required, high limit, low interest, fast approval, quick transfer, flexible repayment, and easy access. The disadvantages of Orange Loan APK are that it has high risk of default and fraud, strict eligibility criteria, late fees and penalties, limited customer service, poor data security and privacy, negative impact on credit score, and addictive and irresponsible borrowing.
-- How can I download and install Orange Loan APK on my Android device?
-You can download and install Orange Loan APK on your Android device by going to Google Play Store or APKCombo and searching for Orange Loan APK. Then you can select the app from the search results and tap on the Install button. After that, you can open the app and grant the necessary permissions. Then you can create an account or log in with your existing account.
-- How can I contact Orange Loan APK customer service?
-You can contact Orange Loan APK customer service by phone (+66 2 026 3299), email (service@trendlinefinance.com), Facebook (https://www.facebook.com/OrangeLoanTH/), or Line (@orangeloan). The customer service team is available from Monday to Friday, from 9:00 am to 6:00 pm.
- 197e85843d
-
-
\ No newline at end of file
diff --git a/spaces/7hao/bingo/src/lib/bots/bing/utils.ts b/spaces/7hao/bingo/src/lib/bots/bing/utils.ts
deleted file mode 100644
index 64b4b96452d125346b0fc4436b5f7c18c962df0b..0000000000000000000000000000000000000000
--- a/spaces/7hao/bingo/src/lib/bots/bing/utils.ts
+++ /dev/null
@@ -1,87 +0,0 @@
-import { ChatResponseMessage, BingChatResponse } from './types'
-
-export function convertMessageToMarkdown(message: ChatResponseMessage): string {
- if (message.messageType === 'InternalSearchQuery') {
- return message.text
- }
- for (const card of message.adaptiveCards??[]) {
- for (const block of card.body) {
- if (block.type === 'TextBlock') {
- return block.text
- }
- }
- }
- return ''
-}
-
-const RecordSeparator = String.fromCharCode(30)
-
-export const websocketUtils = {
- packMessage(data: any) {
- return `${JSON.stringify(data)}${RecordSeparator}`
- },
- unpackMessage(data: string | ArrayBuffer | Blob) {
- if (!data) return {}
- return data
- .toString()
- .split(RecordSeparator)
- .filter(Boolean)
- .map((s) => {
- try {
- return JSON.parse(s)
- } catch (e) {
- return {}
- }
- })
- },
-}
-
-export async function createImage(prompt: string, id: string, headers: HeadersInit): Promise {
- const { headers: responseHeaders } = await fetch(`https://www.bing.com/images/create?partner=sydney&re=1&showselective=1&sude=1&kseed=7000&SFX=&q=${encodeURIComponent(prompt)}&iframeid=${id}`,
- {
- method: 'HEAD',
- headers,
- redirect: 'manual'
- },
- );
-
- if (!/&id=([^&]+)$/.test(responseHeaders.get('location') || '')) {
- throw new Error('请求异常,请检查 cookie 是否有效')
- }
-
- const resultId = RegExp.$1;
- let count = 0
- const imageThumbUrl = `https://www.bing.com/images/create/async/results/${resultId}?q=${encodeURIComponent(prompt)}&partner=sydney&showselective=1&IID=images.as`;
-
- do {
- await sleep(3000);
- const content = await fetch(imageThumbUrl, { headers, method: 'GET' })
-
- // @ts-ignore
- if (content.headers.get('content-length') > 1) {
- const text = await content.text()
- return (text?.match(/ target?.split('src="').pop()?.replace(/&/g, '&'))
- .map(img => ``).join(' ')
- }
- } while(count ++ < 10);
-}
-
-
-export async function* streamAsyncIterable(stream: ReadableStream) {
- const reader = stream.getReader()
- try {
- while (true) {
- const { done, value } = await reader.read()
- if (done) {
- return
- }
- yield value
- }
- } finally {
- reader.releaseLock()
- }
-}
-
-export const sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms))
-
diff --git a/spaces/801artistry/RVC801/julius/utils.py b/spaces/801artistry/RVC801/julius/utils.py
deleted file mode 100644
index 944b973ad1a38700c1ba98ab7306c233cb87868d..0000000000000000000000000000000000000000
--- a/spaces/801artistry/RVC801/julius/utils.py
+++ /dev/null
@@ -1,101 +0,0 @@
-# File under the MIT license, see https://github.com/adefossez/julius/LICENSE for details.
-# Author: adefossez, 2020
-"""
-Non signal processing related utilities.
-"""
-
-import inspect
-import typing as tp
-import sys
-import time
-
-
-def simple_repr(obj, attrs: tp.Optional[tp.Sequence[str]] = None,
- overrides: dict = {}):
- """
- Return a simple representation string for `obj`.
- If `attrs` is not None, it should be a list of attributes to include.
- """
- params = inspect.signature(obj.__class__).parameters
- attrs_repr = []
- if attrs is None:
- attrs = list(params.keys())
- for attr in attrs:
- display = False
- if attr in overrides:
- value = overrides[attr]
- elif hasattr(obj, attr):
- value = getattr(obj, attr)
- else:
- continue
- if attr in params:
- param = params[attr]
- if param.default is inspect._empty or value != param.default: # type: ignore
- display = True
- else:
- display = True
-
- if display:
- attrs_repr.append(f"{attr}={value}")
- return f"{obj.__class__.__name__}({','.join(attrs_repr)})"
-
-
-class MarkdownTable:
- """
- Simple MarkdownTable generator. The column titles should be large enough
- for the lines content. This will right align everything.
-
- >>> import io # we use io purely for test purposes, default is sys.stdout.
- >>> file = io.StringIO()
- >>> table = MarkdownTable(["Item Name", "Price"], file=file)
- >>> table.header(); table.line(["Honey", "5"]); table.line(["Car", "5,000"])
- >>> print(file.getvalue().strip()) # Strip for test purposes
- | Item Name | Price |
- |-----------|-------|
- | Honey | 5 |
- | Car | 5,000 |
- """
- def __init__(self, columns, file=sys.stdout):
- self.columns = columns
- self.file = file
-
- def _writeln(self, line):
- self.file.write("|" + "|".join(line) + "|\n")
-
- def header(self):
- self._writeln(f" {col} " for col in self.columns)
- self._writeln("-" * (len(col) + 2) for col in self.columns)
-
- def line(self, line):
- out = []
- for val, col in zip(line, self.columns):
- val = format(val, '>' + str(len(col)))
- out.append(" " + val + " ")
- self._writeln(out)
-
-
-class Chrono:
- """
- Measures ellapsed time, calling `torch.cuda.synchronize` if necessary.
- `Chrono` instances can be used as context managers (e.g. with `with`).
- Upon exit of the block, you can access the duration of the block in seconds
- with the `duration` attribute.
-
- >>> with Chrono() as chrono:
- ... _ = sum(range(10_000))
- ...
- >>> print(chrono.duration < 10) # Should be true unless on a really slow computer.
- True
- """
- def __init__(self):
- self.duration = None
-
- def __enter__(self):
- self._begin = time.time()
- return self
-
- def __exit__(self, exc_type, exc_value, exc_tracebck):
- import torch
- if torch.cuda.is_available():
- torch.cuda.synchronize()
- self.duration = time.time() - self._begin
diff --git a/spaces/A00001/bingothoo/src/lib/hooks/use-at-bottom.tsx b/spaces/A00001/bingothoo/src/lib/hooks/use-at-bottom.tsx
deleted file mode 100644
index d37c8cf4162adcb0064e08ecec24eb731416b045..0000000000000000000000000000000000000000
--- a/spaces/A00001/bingothoo/src/lib/hooks/use-at-bottom.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-import * as React from 'react'
-
-export function useAtBottom(offset = 0) {
- const [isAtBottom, setIsAtBottom] = React.useState(false)
-
- React.useEffect(() => {
- const handleScroll = () => {
- setIsAtBottom(
- window.innerHeight + window.scrollY >=
- document.body.offsetHeight - offset
- )
- }
-
- window.addEventListener('scroll', handleScroll, { passive: true })
- handleScroll()
-
- return () => {
- window.removeEventListener('scroll', handleScroll)
- }
- }, [offset])
-
- return isAtBottom
-}
diff --git a/spaces/AIGC-Audio/AudioGPT/audio_to_text/captioning/utils/report_results.py b/spaces/AIGC-Audio/AudioGPT/audio_to_text/captioning/utils/report_results.py
deleted file mode 100644
index 3b9f6ec5e8d2f253706198e0d521f73981ef3efe..0000000000000000000000000000000000000000
--- a/spaces/AIGC-Audio/AudioGPT/audio_to_text/captioning/utils/report_results.py
+++ /dev/null
@@ -1,37 +0,0 @@
-from pathlib import Path
-import argparse
-import numpy as np
-
-parser = argparse.ArgumentParser()
-parser.add_argument("--input", help="input filename", type=str, nargs="+")
-parser.add_argument("--output", help="output result file", default=None)
-
-args = parser.parse_args()
-
-
-scores = {}
-for path in args.input:
- with open(path, "r") as reader:
- for line in reader.readlines():
- metric, score = line.strip().split(": ")
- score = float(score)
- if metric not in scores:
- scores[metric] = []
- scores[metric].append(score)
-
-if len(scores) == 0:
- print("No experiment directory found, wrong path?")
- exit(1)
-
-with open(args.output, "w") as writer:
- print("Average results: ", file=writer)
- for metric, score in scores.items():
- score = np.array(score)
- mean = np.mean(score)
- std = np.std(score)
- print(f"{metric}: {mean:.3f} (±{std:.3f})", file=writer)
- print("", file=writer)
- print("Best results: ", file=writer)
- for metric, score in scores.items():
- score = np.max(score)
- print(f"{metric}: {score:.3f}", file=writer)
diff --git a/spaces/AIWaves/Debate/src/agents/Component/__init__.py b/spaces/AIWaves/Debate/src/agents/Component/__init__.py
deleted file mode 100644
index 61d0e26fcc092bfe6da96fdb5696586ec7d30045..0000000000000000000000000000000000000000
--- a/spaces/AIWaves/Debate/src/agents/Component/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from .ExtraComponent import *
-from .PromptComponent import *
-from .ToolComponent import *
\ No newline at end of file
diff --git a/spaces/AIZero2HeroBootcamp/AnimatedGifGallery/README.md b/spaces/AIZero2HeroBootcamp/AnimatedGifGallery/README.md
deleted file mode 100644
index d050331267acc0e40325f45c99dd602d2c1aa62c..0000000000000000000000000000000000000000
--- a/spaces/AIZero2HeroBootcamp/AnimatedGifGallery/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
----
-title: AnimatedGifGallery
-emoji: 🐨
-colorFrom: gray
-colorTo: green
-sdk: streamlit
-sdk_version: 1.21.0
-app_file: app.py
-pinned: false
-license: mit
----
-
-Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
diff --git a/spaces/AbeShinzo0708/AI_Kishida_Fumio_speaker/app.py b/spaces/AbeShinzo0708/AI_Kishida_Fumio_speaker/app.py
deleted file mode 100644
index 4f1e5d8c0a6629ced3ddcac72a7b78c57ac16211..0000000000000000000000000000000000000000
--- a/spaces/AbeShinzo0708/AI_Kishida_Fumio_speaker/app.py
+++ /dev/null
@@ -1,37 +0,0 @@
-import time
-
-import streamlit as st
-import numpy as np
-import torch
-from espnet2.bin.tts_inference import Text2Speech
-from scipy.io.wavfile import write
-from PIL import Image
-
-
-fs, lang = 44100, "Japanese"
-model= "./100epoch.pth"
-x = "これはテストメッセージです"
-
-text2speech = Text2Speech.from_pretrained(
- model_file=model,
- device="cpu",
- speed_control_alpha=1.0,
- noise_scale=0.333,
- noise_scale_dur=0.333,
-)
-pause = np.zeros(30000, dtype=np.float32)
-
-st.title("おしゃべりAI岸田文雄メーカー")
-image = Image.open('kishida.jpg')
-st.image(image)
-text = st.text_area(label='ここにテキストを入力 (Input Text)↓', height=100, max_chars=2048)
-
-
-if st.button("生成(Generate)"):
- with torch.no_grad():
- wav = text2speech(text)["wav"]
-
- wav_list = []
- wav_list.append(np.concatenate([wav.view(-1).cpu().numpy(), pause]))
- final_wav = np.concatenate(wav_list)
- st.audio(final_wav, sample_rate=fs)
diff --git a/spaces/AchyuthGamer/OpenGPT-Chat-UI/.svelte-kit/generated/client/matchers.js b/spaces/AchyuthGamer/OpenGPT-Chat-UI/.svelte-kit/generated/client/matchers.js
deleted file mode 100644
index f6bd30a4eb679f78dfe9f8947afe362bb30c4b5a..0000000000000000000000000000000000000000
--- a/spaces/AchyuthGamer/OpenGPT-Chat-UI/.svelte-kit/generated/client/matchers.js
+++ /dev/null
@@ -1 +0,0 @@
-export const matchers = {};
\ No newline at end of file
diff --git a/spaces/AchyuthGamer/OpenGPT/g4f/Provider/Providers/deprecated/AiService.py b/spaces/AchyuthGamer/OpenGPT/g4f/Provider/Providers/deprecated/AiService.py
deleted file mode 100644
index 9b41e3c82261585d4eb2114665cc2b88354ee45b..0000000000000000000000000000000000000000
--- a/spaces/AchyuthGamer/OpenGPT/g4f/Provider/Providers/deprecated/AiService.py
+++ /dev/null
@@ -1,36 +0,0 @@
-from __future__ import annotations
-
-import requests
-
-from ...typing import Any, CreateResult
-from ..base_provider import BaseProvider
-
-
-class AiService(BaseProvider):
- url = "https://aiservice.vercel.app/"
- working = False
- supports_gpt_35_turbo = True
-
- @staticmethod
- def create_completion(
- model: str,
- messages: list[dict[str, str]],
- stream: bool,
- **kwargs: Any,
- ) -> CreateResult:
- base = "\n".join(f"{message['role']}: {message['content']}" for message in messages)
- base += "\nassistant: "
-
- headers = {
- "accept": "*/*",
- "content-type": "text/plain;charset=UTF-8",
- "sec-fetch-dest": "empty",
- "sec-fetch-mode": "cors",
- "sec-fetch-site": "same-origin",
- "Referer": "https://aiservice.vercel.app/chat",
- }
- data = {"input": base}
- url = "https://aiservice.vercel.app/api/chat/answer"
- response = requests.post(url, headers=headers, json=data)
- response.raise_for_status()
- yield response.json()["data"]
diff --git a/spaces/Adapter/CoAdapter/ldm/models/diffusion/ddpm.py b/spaces/Adapter/CoAdapter/ldm/models/diffusion/ddpm.py
deleted file mode 100644
index 1dd7d26802c3d269aaf3fd48f53f2d5d2039b243..0000000000000000000000000000000000000000
--- a/spaces/Adapter/CoAdapter/ldm/models/diffusion/ddpm.py
+++ /dev/null
@@ -1,1329 +0,0 @@
-"""
-wild mixture of
-https://github.com/lucidrains/denoising-diffusion-pytorch/blob/7706bdfc6f527f58d33f84b7b522e61e6e3164b3/denoising_diffusion_pytorch/denoising_diffusion_pytorch.py
-https://github.com/openai/improved-diffusion/blob/e94489283bb876ac1477d5dd7709bbbd2d9902ce/improved_diffusion/gaussian_diffusion.py
-https://github.com/CompVis/taming-transformers
--- merci
-"""
-
-import torch
-import torch.nn as nn
-import numpy as np
-import pytorch_lightning as pl
-from torch.optim.lr_scheduler import LambdaLR
-from einops import rearrange, repeat
-from contextlib import contextmanager, nullcontext
-from functools import partial
-import itertools
-from tqdm import tqdm
-from torchvision.utils import make_grid
-from pytorch_lightning.utilities.distributed import rank_zero_only
-from omegaconf import ListConfig
-
-from ldm.util import log_txt_as_img, exists, default, ismap, isimage, mean_flat, count_params, instantiate_from_config
-from ldm.modules.ema import LitEma
-from ldm.modules.distributions.distributions import normal_kl, DiagonalGaussianDistribution
-from ldm.models.autoencoder import IdentityFirstStage, AutoencoderKL
-from ldm.modules.diffusionmodules.util import make_beta_schedule, extract_into_tensor, noise_like
-from ldm.models.diffusion.ddim import DDIMSampler
-
-
-__conditioning_keys__ = {'concat': 'c_concat',
- 'crossattn': 'c_crossattn',
- 'adm': 'y'}
-
-
-def disabled_train(self, mode=True):
- """Overwrite model.train with this function to make sure train/eval mode
- does not change anymore."""
- return self
-
-
-def uniform_on_device(r1, r2, shape, device):
- return (r1 - r2) * torch.rand(*shape, device=device) + r2
-
-
-class DDPM(pl.LightningModule):
- # classic DDPM with Gaussian diffusion, in image space
- def __init__(self,
- unet_config,
- timesteps=1000,
- beta_schedule="linear",
- loss_type="l2",
- ckpt_path=None,
- ignore_keys=[],
- load_only_unet=False,
- monitor="val/loss",
- use_ema=True,
- first_stage_key="image",
- image_size=256,
- channels=3,
- log_every_t=100,
- clip_denoised=True,
- linear_start=1e-4,
- linear_end=2e-2,
- cosine_s=8e-3,
- given_betas=None,
- original_elbo_weight=0.,
- v_posterior=0., # weight for choosing posterior variance as sigma = (1-v) * beta_tilde + v * beta
- l_simple_weight=1.,
- conditioning_key=None,
- parameterization="eps", # all assuming fixed variance schedules
- scheduler_config=None,
- use_positional_encodings=False,
- learn_logvar=False,
- logvar_init=0.,
- make_it_fit=False,
- ucg_training=None,
- reset_ema=False,
- reset_num_ema_updates=False,
- ):
- super().__init__()
- assert parameterization in ["eps", "x0", "v"], 'currently only supporting "eps" and "x0" and "v"'
- self.parameterization = parameterization
- print(f"{self.__class__.__name__}: Running in {self.parameterization}-prediction mode")
- self.cond_stage_model = None
- self.clip_denoised = clip_denoised
- self.log_every_t = log_every_t
- self.first_stage_key = first_stage_key
- self.image_size = image_size # try conv?
- self.channels = channels
- self.use_positional_encodings = use_positional_encodings
- self.model = DiffusionWrapper(unet_config, conditioning_key)
- count_params(self.model, verbose=True)
- self.use_ema = use_ema
- if self.use_ema:
- self.model_ema = LitEma(self.model)
- print(f"Keeping EMAs of {len(list(self.model_ema.buffers()))}.")
-
- self.use_scheduler = scheduler_config is not None
- if self.use_scheduler:
- self.scheduler_config = scheduler_config
-
- self.v_posterior = v_posterior
- self.original_elbo_weight = original_elbo_weight
- self.l_simple_weight = l_simple_weight
-
- if monitor is not None:
- self.monitor = monitor
- self.make_it_fit = make_it_fit
- if reset_ema: assert exists(ckpt_path)
- if ckpt_path is not None:
- self.init_from_ckpt(ckpt_path, ignore_keys=ignore_keys, only_model=load_only_unet)
- if reset_ema:
- assert self.use_ema
- print(f"Resetting ema to pure model weights. This is useful when restoring from an ema-only checkpoint.")
- self.model_ema = LitEma(self.model)
- if reset_num_ema_updates:
- print(" +++++++++++ WARNING: RESETTING NUM_EMA UPDATES TO ZERO +++++++++++ ")
- assert self.use_ema
- self.model_ema.reset_num_updates()
-
- self.register_schedule(given_betas=given_betas, beta_schedule=beta_schedule, timesteps=timesteps,
- linear_start=linear_start, linear_end=linear_end, cosine_s=cosine_s)
-
- self.loss_type = loss_type
-
- self.learn_logvar = learn_logvar
- self.logvar = torch.full(fill_value=logvar_init, size=(self.num_timesteps,))
- if self.learn_logvar:
- self.logvar = nn.Parameter(self.logvar, requires_grad=True)
-
- self.ucg_training = ucg_training or dict()
- if self.ucg_training:
- self.ucg_prng = np.random.RandomState()
-
- def register_schedule(self, given_betas=None, beta_schedule="linear", timesteps=1000,
- linear_start=1e-4, linear_end=2e-2, cosine_s=8e-3):
- if exists(given_betas):
- betas = given_betas
- else:
- betas = make_beta_schedule(beta_schedule, timesteps, linear_start=linear_start, linear_end=linear_end,
- cosine_s=cosine_s)
- alphas = 1. - betas
- alphas_cumprod = np.cumprod(alphas, axis=0)
- alphas_cumprod_prev = np.append(1., alphas_cumprod[:-1])
-
- timesteps, = betas.shape
- self.num_timesteps = int(timesteps)
- self.linear_start = linear_start
- self.linear_end = linear_end
- assert alphas_cumprod.shape[0] == self.num_timesteps, 'alphas have to be defined for each timestep'
-
- to_torch = partial(torch.tensor, dtype=torch.float32)
-
- self.register_buffer('betas', to_torch(betas))
- self.register_buffer('alphas_cumprod', to_torch(alphas_cumprod))
- self.register_buffer('alphas_cumprod_prev', to_torch(alphas_cumprod_prev))
-
- # calculations for diffusion q(x_t | x_{t-1}) and others
- self.register_buffer('sqrt_alphas_cumprod', to_torch(np.sqrt(alphas_cumprod)))
- self.register_buffer('sqrt_one_minus_alphas_cumprod', to_torch(np.sqrt(1. - alphas_cumprod)))
- self.register_buffer('log_one_minus_alphas_cumprod', to_torch(np.log(1. - alphas_cumprod)))
- self.register_buffer('sqrt_recip_alphas_cumprod', to_torch(np.sqrt(1. / alphas_cumprod)))
- self.register_buffer('sqrt_recipm1_alphas_cumprod', to_torch(np.sqrt(1. / alphas_cumprod - 1)))
-
- # calculations for posterior q(x_{t-1} | x_t, x_0)
- posterior_variance = (1 - self.v_posterior) * betas * (1. - alphas_cumprod_prev) / (
- 1. - alphas_cumprod) + self.v_posterior * betas
- # above: equal to 1. / (1. / (1. - alpha_cumprod_tm1) + alpha_t / beta_t)
- self.register_buffer('posterior_variance', to_torch(posterior_variance))
- # below: log calculation clipped because the posterior variance is 0 at the beginning of the diffusion chain
- self.register_buffer('posterior_log_variance_clipped', to_torch(np.log(np.maximum(posterior_variance, 1e-20))))
- self.register_buffer('posterior_mean_coef1', to_torch(
- betas * np.sqrt(alphas_cumprod_prev) / (1. - alphas_cumprod)))
- self.register_buffer('posterior_mean_coef2', to_torch(
- (1. - alphas_cumprod_prev) * np.sqrt(alphas) / (1. - alphas_cumprod)))
-
- if self.parameterization == "eps":
- lvlb_weights = self.betas ** 2 / (
- 2 * self.posterior_variance * to_torch(alphas) * (1 - self.alphas_cumprod))
- elif self.parameterization == "x0":
- lvlb_weights = 0.5 * np.sqrt(torch.Tensor(alphas_cumprod)) / (2. * 1 - torch.Tensor(alphas_cumprod))
- elif self.parameterization == "v":
- lvlb_weights = torch.ones_like(self.betas ** 2 / (
- 2 * self.posterior_variance * to_torch(alphas) * (1 - self.alphas_cumprod)))
- else:
- raise NotImplementedError("mu not supported")
- lvlb_weights[0] = lvlb_weights[1]
- self.register_buffer('lvlb_weights', lvlb_weights, persistent=False)
- assert not torch.isnan(self.lvlb_weights).all()
-
- @contextmanager
- def ema_scope(self, context=None):
- if self.use_ema:
- self.model_ema.store(self.model.parameters())
- self.model_ema.copy_to(self.model)
- if context is not None:
- print(f"{context}: Switched to EMA weights")
- try:
- yield None
- finally:
- if self.use_ema:
- self.model_ema.restore(self.model.parameters())
- if context is not None:
- print(f"{context}: Restored training weights")
-
- @torch.no_grad()
- def init_from_ckpt(self, path, ignore_keys=list(), only_model=False):
- sd = torch.load(path, map_location="cpu")
- if "state_dict" in list(sd.keys()):
- sd = sd["state_dict"]
- keys = list(sd.keys())
- for k in keys:
- for ik in ignore_keys:
- if k.startswith(ik):
- print("Deleting key {} from state_dict.".format(k))
- del sd[k]
- if self.make_it_fit:
- n_params = len([name for name, _ in
- itertools.chain(self.named_parameters(),
- self.named_buffers())])
- for name, param in tqdm(
- itertools.chain(self.named_parameters(),
- self.named_buffers()),
- desc="Fitting old weights to new weights",
- total=n_params
- ):
- if not name in sd:
- continue
- old_shape = sd[name].shape
- new_shape = param.shape
- assert len(old_shape) == len(new_shape)
- if len(new_shape) > 2:
- # we only modify first two axes
- assert new_shape[2:] == old_shape[2:]
- # assumes first axis corresponds to output dim
- if not new_shape == old_shape:
- new_param = param.clone()
- old_param = sd[name]
- if len(new_shape) == 1:
- for i in range(new_param.shape[0]):
- new_param[i] = old_param[i % old_shape[0]]
- elif len(new_shape) >= 2:
- for i in range(new_param.shape[0]):
- for j in range(new_param.shape[1]):
- new_param[i, j] = old_param[i % old_shape[0], j % old_shape[1]]
-
- n_used_old = torch.ones(old_shape[1])
- for j in range(new_param.shape[1]):
- n_used_old[j % old_shape[1]] += 1
- n_used_new = torch.zeros(new_shape[1])
- for j in range(new_param.shape[1]):
- n_used_new[j] = n_used_old[j % old_shape[1]]
-
- n_used_new = n_used_new[None, :]
- while len(n_used_new.shape) < len(new_shape):
- n_used_new = n_used_new.unsqueeze(-1)
- new_param /= n_used_new
-
- sd[name] = new_param
-
- missing, unexpected = self.load_state_dict(sd, strict=False) if not only_model else self.model.load_state_dict(
- sd, strict=False)
- print(f"Restored from {path} with {len(missing)} missing and {len(unexpected)} unexpected keys")
- if len(missing) > 0:
- print(f"Missing Keys:\n {missing}")
- if len(unexpected) > 0:
- print(f"\nUnexpected Keys:\n {unexpected}")
-
- def q_mean_variance(self, x_start, t):
- """
- Get the distribution q(x_t | x_0).
- :param x_start: the [N x C x ...] tensor of noiseless inputs.
- :param t: the number of diffusion steps (minus 1). Here, 0 means one step.
- :return: A tuple (mean, variance, log_variance), all of x_start's shape.
- """
- mean = (extract_into_tensor(self.sqrt_alphas_cumprod, t, x_start.shape) * x_start)
- variance = extract_into_tensor(1.0 - self.alphas_cumprod, t, x_start.shape)
- log_variance = extract_into_tensor(self.log_one_minus_alphas_cumprod, t, x_start.shape)
- return mean, variance, log_variance
-
- def predict_start_from_noise(self, x_t, t, noise):
- return (
- extract_into_tensor(self.sqrt_recip_alphas_cumprod, t, x_t.shape) * x_t -
- extract_into_tensor(self.sqrt_recipm1_alphas_cumprod, t, x_t.shape) * noise
- )
-
- def predict_start_from_z_and_v(self, x_t, t, v):
- # self.register_buffer('sqrt_alphas_cumprod', to_torch(np.sqrt(alphas_cumprod)))
- # self.register_buffer('sqrt_one_minus_alphas_cumprod', to_torch(np.sqrt(1. - alphas_cumprod)))
- return (
- extract_into_tensor(self.sqrt_alphas_cumprod, t, x_t.shape) * x_t -
- extract_into_tensor(self.sqrt_one_minus_alphas_cumprod, t, x_t.shape) * v
- )
-
- def predict_eps_from_z_and_v(self, x_t, t, v):
- return (
- extract_into_tensor(self.sqrt_alphas_cumprod, t, x_t.shape) * v +
- extract_into_tensor(self.sqrt_one_minus_alphas_cumprod, t, x_t.shape) * x_t
- )
-
- def q_posterior(self, x_start, x_t, t):
- posterior_mean = (
- extract_into_tensor(self.posterior_mean_coef1, t, x_t.shape) * x_start +
- extract_into_tensor(self.posterior_mean_coef2, t, x_t.shape) * x_t
- )
- posterior_variance = extract_into_tensor(self.posterior_variance, t, x_t.shape)
- posterior_log_variance_clipped = extract_into_tensor(self.posterior_log_variance_clipped, t, x_t.shape)
- return posterior_mean, posterior_variance, posterior_log_variance_clipped
-
- def p_mean_variance(self, x, t, clip_denoised: bool):
- model_out = self.model(x, t)
- if self.parameterization == "eps":
- x_recon = self.predict_start_from_noise(x, t=t, noise=model_out)
- elif self.parameterization == "x0":
- x_recon = model_out
- if clip_denoised:
- x_recon.clamp_(-1., 1.)
-
- model_mean, posterior_variance, posterior_log_variance = self.q_posterior(x_start=x_recon, x_t=x, t=t)
- return model_mean, posterior_variance, posterior_log_variance
-
- @torch.no_grad()
- def p_sample(self, x, t, clip_denoised=True, repeat_noise=False):
- b, *_, device = *x.shape, x.device
- model_mean, _, model_log_variance = self.p_mean_variance(x=x, t=t, clip_denoised=clip_denoised)
- noise = noise_like(x.shape, device, repeat_noise)
- # no noise when t == 0
- nonzero_mask = (1 - (t == 0).float()).reshape(b, *((1,) * (len(x.shape) - 1)))
- return model_mean + nonzero_mask * (0.5 * model_log_variance).exp() * noise
-
- @torch.no_grad()
- def p_sample_loop(self, shape, return_intermediates=False):
- device = self.betas.device
- b = shape[0]
- img = torch.randn(shape, device=device)
- intermediates = [img]
- for i in tqdm(reversed(range(0, self.num_timesteps)), desc='Sampling t', total=self.num_timesteps):
- img = self.p_sample(img, torch.full((b,), i, device=device, dtype=torch.long),
- clip_denoised=self.clip_denoised)
- if i % self.log_every_t == 0 or i == self.num_timesteps - 1:
- intermediates.append(img)
- if return_intermediates:
- return img, intermediates
- return img
-
- @torch.no_grad()
- def sample(self, batch_size=16, return_intermediates=False):
- image_size = self.image_size
- channels = self.channels
- return self.p_sample_loop((batch_size, channels, image_size, image_size),
- return_intermediates=return_intermediates)
-
- def q_sample(self, x_start, t, noise=None):
- noise = default(noise, lambda: torch.randn_like(x_start))
- return (extract_into_tensor(self.sqrt_alphas_cumprod, t, x_start.shape) * x_start +
- extract_into_tensor(self.sqrt_one_minus_alphas_cumprod, t, x_start.shape) * noise)
-
- def get_v(self, x, noise, t):
- return (
- extract_into_tensor(self.sqrt_alphas_cumprod, t, x.shape) * noise -
- extract_into_tensor(self.sqrt_one_minus_alphas_cumprod, t, x.shape) * x
- )
-
- def get_loss(self, pred, target, mean=True):
- if self.loss_type == 'l1':
- loss = (target - pred).abs()
- if mean:
- loss = loss.mean()
- elif self.loss_type == 'l2':
- if mean:
- loss = torch.nn.functional.mse_loss(target, pred)
- else:
- loss = torch.nn.functional.mse_loss(target, pred, reduction='none')
- else:
- raise NotImplementedError("unknown loss type '{loss_type}'")
-
- return loss
-
- def p_losses(self, x_start, t, noise=None):
- noise = default(noise, lambda: torch.randn_like(x_start))
- x_noisy = self.q_sample(x_start=x_start, t=t, noise=noise)
- model_out = self.model(x_noisy, t)
-
- loss_dict = {}
- if self.parameterization == "eps":
- target = noise
- elif self.parameterization == "x0":
- target = x_start
- elif self.parameterization == "v":
- target = self.get_v(x_start, noise, t)
- else:
- raise NotImplementedError(f"Parameterization {self.parameterization} not yet supported")
-
- loss = self.get_loss(model_out, target, mean=False).mean(dim=[1, 2, 3])
-
- log_prefix = 'train' if self.training else 'val'
-
- loss_dict.update({f'{log_prefix}/loss_simple': loss.mean()})
- loss_simple = loss.mean() * self.l_simple_weight
-
- loss_vlb = (self.lvlb_weights[t] * loss).mean()
- loss_dict.update({f'{log_prefix}/loss_vlb': loss_vlb})
-
- loss = loss_simple + self.original_elbo_weight * loss_vlb
-
- loss_dict.update({f'{log_prefix}/loss': loss})
-
- return loss, loss_dict
-
- def forward(self, x, *args, **kwargs):
- # b, c, h, w, device, img_size, = *x.shape, x.device, self.image_size
- # assert h == img_size and w == img_size, f'height and width of image must be {img_size}'
- t = torch.randint(0, self.num_timesteps, (x.shape[0],), device=self.device).long()
- return self.p_losses(x, t, *args, **kwargs)
-
- def get_input(self, batch, k):
- x = batch[k]
- # if len(x.shape) == 3:
- # x = x[..., None]
- # x = rearrange(x, 'b h w c -> b c h w')
- # x = x.to(memory_format=torch.contiguous_format).float()
- return x
-
- def shared_step(self, batch):
- x = self.get_input(batch, self.first_stage_key)
- loss, loss_dict = self(x)
- return loss, loss_dict
-
- def training_step(self, batch, batch_idx):
- loss, loss_dict = self.shared_step(batch)
-
- self.log_dict(loss_dict, prog_bar=True,
- logger=True, on_step=True, on_epoch=True)
-
- self.log("global_step", self.global_step,
- prog_bar=True, logger=True, on_step=True, on_epoch=False)
-
- if self.use_scheduler:
- lr = self.optimizers().param_groups[0]['lr']
- self.log('lr_abs', lr, prog_bar=True, logger=True, on_step=True, on_epoch=False)
-
- return loss
-
- @torch.no_grad()
- def validation_step(self, batch, batch_idx):
- _, loss_dict_no_ema = self.shared_step(batch)
- with self.ema_scope():
- _, loss_dict_ema = self.shared_step(batch)
- loss_dict_ema = {key + '_ema': loss_dict_ema[key] for key in loss_dict_ema}
- self.log_dict(loss_dict_no_ema, prog_bar=False, logger=True, on_step=False, on_epoch=True)
- self.log_dict(loss_dict_ema, prog_bar=False, logger=True, on_step=False, on_epoch=True)
-
- def on_train_batch_end(self, *args, **kwargs):
- if self.use_ema:
- self.model_ema(self.model)
-
- def _get_rows_from_list(self, samples):
- n_imgs_per_row = len(samples)
- denoise_grid = rearrange(samples, 'n b c h w -> b n c h w')
- denoise_grid = rearrange(denoise_grid, 'b n c h w -> (b n) c h w')
- denoise_grid = make_grid(denoise_grid, nrow=n_imgs_per_row)
- return denoise_grid
-
- @torch.no_grad()
- def log_images(self, batch, N=8, n_row=2, sample=True, return_keys=None, **kwargs):
- log = dict()
- x = self.get_input(batch, self.first_stage_key)
- N = min(x.shape[0], N)
- n_row = min(x.shape[0], n_row)
- x = x.to(self.device)[:N]
- log["inputs"] = x
-
- # get diffusion row
- diffusion_row = list()
- x_start = x[:n_row]
-
- for t in range(self.num_timesteps):
- if t % self.log_every_t == 0 or t == self.num_timesteps - 1:
- t = repeat(torch.tensor([t]), '1 -> b', b=n_row)
- t = t.to(self.device).long()
- noise = torch.randn_like(x_start)
- x_noisy = self.q_sample(x_start=x_start, t=t, noise=noise)
- diffusion_row.append(x_noisy)
-
- log["diffusion_row"] = self._get_rows_from_list(diffusion_row)
-
- if sample:
- # get denoise row
- with self.ema_scope("Plotting"):
- samples, denoise_row = self.sample(batch_size=N, return_intermediates=True)
-
- log["samples"] = samples
- log["denoise_row"] = self._get_rows_from_list(denoise_row)
-
- if return_keys:
- if np.intersect1d(list(log.keys()), return_keys).shape[0] == 0:
- return log
- else:
- return {key: log[key] for key in return_keys}
- return log
-
- def configure_optimizers(self):
- lr = self.learning_rate
- params = list(self.model.parameters())
- if self.learn_logvar:
- params = params + [self.logvar]
- opt = torch.optim.AdamW(params, lr=lr)
- return opt
-
-
-class LatentDiffusion(DDPM):
- """main class"""
-
- def __init__(self,
- first_stage_config,
- cond_stage_config,
- num_timesteps_cond=None,
- cond_stage_key="image",
- cond_stage_trainable=False,
- concat_mode=True,
- cond_stage_forward=None,
- conditioning_key=None,
- scale_factor=1.0,
- scale_by_std=False,
- *args, **kwargs):
- self.num_timesteps_cond = default(num_timesteps_cond, 1)
- self.scale_by_std = scale_by_std
- assert self.num_timesteps_cond <= kwargs['timesteps']
- # for backwards compatibility after implementation of DiffusionWrapper
- if conditioning_key is None:
- conditioning_key = 'concat' if concat_mode else 'crossattn'
- if cond_stage_config == '__is_unconditional__':
- conditioning_key = None
- ckpt_path = kwargs.pop("ckpt_path", None)
- reset_ema = kwargs.pop("reset_ema", False)
- reset_num_ema_updates = kwargs.pop("reset_num_ema_updates", False)
- ignore_keys = kwargs.pop("ignore_keys", [])
- super().__init__(conditioning_key=conditioning_key, *args, **kwargs)
- self.concat_mode = concat_mode
- self.cond_stage_trainable = cond_stage_trainable
- self.cond_stage_key = cond_stage_key
- try:
- self.num_downs = len(first_stage_config.params.ddconfig.ch_mult) - 1
- except:
- self.num_downs = 0
- if not scale_by_std:
- self.scale_factor = scale_factor
- else:
- self.register_buffer('scale_factor', torch.tensor(scale_factor))
- self.instantiate_first_stage(first_stage_config)
- self.instantiate_cond_stage(cond_stage_config)
- self.cond_stage_forward = cond_stage_forward
- self.clip_denoised = False
- self.bbox_tokenizer = None
-
- self.restarted_from_ckpt = False
- if ckpt_path is not None:
- self.init_from_ckpt(ckpt_path, ignore_keys)
- self.restarted_from_ckpt = True
- if reset_ema:
- assert self.use_ema
- print(
- f"Resetting ema to pure model weights. This is useful when restoring from an ema-only checkpoint.")
- self.model_ema = LitEma(self.model)
- if reset_num_ema_updates:
- print(" +++++++++++ WARNING: RESETTING NUM_EMA UPDATES TO ZERO +++++++++++ ")
- assert self.use_ema
- self.model_ema.reset_num_updates()
-
- def make_cond_schedule(self, ):
- self.cond_ids = torch.full(size=(self.num_timesteps,), fill_value=self.num_timesteps - 1, dtype=torch.long)
- ids = torch.round(torch.linspace(0, self.num_timesteps - 1, self.num_timesteps_cond)).long()
- self.cond_ids[:self.num_timesteps_cond] = ids
-
- def register_schedule(self,
- given_betas=None, beta_schedule="linear", timesteps=1000,
- linear_start=1e-4, linear_end=2e-2, cosine_s=8e-3):
- super().register_schedule(given_betas, beta_schedule, timesteps, linear_start, linear_end, cosine_s)
-
- self.shorten_cond_schedule = self.num_timesteps_cond > 1
- if self.shorten_cond_schedule:
- self.make_cond_schedule()
-
- def instantiate_first_stage(self, config):
- model = instantiate_from_config(config)
- self.first_stage_model = model.eval()
- self.first_stage_model.train = disabled_train
- for param in self.first_stage_model.parameters():
- param.requires_grad = False
-
- def instantiate_cond_stage(self, config):
- if not self.cond_stage_trainable:
- if config == "__is_first_stage__":
- print("Using first stage also as cond stage.")
- self.cond_stage_model = self.first_stage_model
- elif config == "__is_unconditional__":
- print(f"Training {self.__class__.__name__} as an unconditional model.")
- self.cond_stage_model = None
- # self.be_unconditional = True
- else:
- model = instantiate_from_config(config)
- self.cond_stage_model = model.eval()
- self.cond_stage_model.train = disabled_train
- for param in self.cond_stage_model.parameters():
- param.requires_grad = False
- else:
- assert config != '__is_first_stage__'
- assert config != '__is_unconditional__'
- model = instantiate_from_config(config)
- self.cond_stage_model = model
-
- def _get_denoise_row_from_list(self, samples, desc='', force_no_decoder_quantization=False):
- denoise_row = []
- for zd in tqdm(samples, desc=desc):
- denoise_row.append(self.decode_first_stage(zd.to(self.device),
- force_not_quantize=force_no_decoder_quantization))
- n_imgs_per_row = len(denoise_row)
- denoise_row = torch.stack(denoise_row) # n_log_step, n_row, C, H, W
- denoise_grid = rearrange(denoise_row, 'n b c h w -> b n c h w')
- denoise_grid = rearrange(denoise_grid, 'b n c h w -> (b n) c h w')
- denoise_grid = make_grid(denoise_grid, nrow=n_imgs_per_row)
- return denoise_grid
-
- def get_first_stage_encoding(self, encoder_posterior):
- if isinstance(encoder_posterior, DiagonalGaussianDistribution):
- z = encoder_posterior.sample()
- elif isinstance(encoder_posterior, torch.Tensor):
- z = encoder_posterior
- else:
- raise NotImplementedError(f"encoder_posterior of type '{type(encoder_posterior)}' not yet implemented")
- return self.scale_factor * z
-
- def get_learned_conditioning(self, c):
- if self.cond_stage_forward is None:
- if hasattr(self.cond_stage_model, 'encode') and callable(self.cond_stage_model.encode):
- c = self.cond_stage_model.encode(c)
- if isinstance(c, DiagonalGaussianDistribution):
- c = c.mode()
- else:
- c = self.cond_stage_model(c)
- else:
- assert hasattr(self.cond_stage_model, self.cond_stage_forward)
- c = getattr(self.cond_stage_model, self.cond_stage_forward)(c)
- return c
-
- def meshgrid(self, h, w):
- y = torch.arange(0, h).view(h, 1, 1).repeat(1, w, 1)
- x = torch.arange(0, w).view(1, w, 1).repeat(h, 1, 1)
-
- arr = torch.cat([y, x], dim=-1)
- return arr
-
- def delta_border(self, h, w):
- """
- :param h: height
- :param w: width
- :return: normalized distance to image border,
- wtith min distance = 0 at border and max dist = 0.5 at image center
- """
- lower_right_corner = torch.tensor([h - 1, w - 1]).view(1, 1, 2)
- arr = self.meshgrid(h, w) / lower_right_corner
- dist_left_up = torch.min(arr, dim=-1, keepdims=True)[0]
- dist_right_down = torch.min(1 - arr, dim=-1, keepdims=True)[0]
- edge_dist = torch.min(torch.cat([dist_left_up, dist_right_down], dim=-1), dim=-1)[0]
- return edge_dist
-
- def get_weighting(self, h, w, Ly, Lx, device):
- weighting = self.delta_border(h, w)
- weighting = torch.clip(weighting, self.split_input_params["clip_min_weight"],
- self.split_input_params["clip_max_weight"], )
- weighting = weighting.view(1, h * w, 1).repeat(1, 1, Ly * Lx).to(device)
-
- if self.split_input_params["tie_braker"]:
- L_weighting = self.delta_border(Ly, Lx)
- L_weighting = torch.clip(L_weighting,
- self.split_input_params["clip_min_tie_weight"],
- self.split_input_params["clip_max_tie_weight"])
-
- L_weighting = L_weighting.view(1, 1, Ly * Lx).to(device)
- weighting = weighting * L_weighting
- return weighting
-
- def get_fold_unfold(self, x, kernel_size, stride, uf=1, df=1): # todo load once not every time, shorten code
- """
- :param x: img of size (bs, c, h, w)
- :return: n img crops of size (n, bs, c, kernel_size[0], kernel_size[1])
- """
- bs, nc, h, w = x.shape
-
- # number of crops in image
- Ly = (h - kernel_size[0]) // stride[0] + 1
- Lx = (w - kernel_size[1]) // stride[1] + 1
-
- if uf == 1 and df == 1:
- fold_params = dict(kernel_size=kernel_size, dilation=1, padding=0, stride=stride)
- unfold = torch.nn.Unfold(**fold_params)
-
- fold = torch.nn.Fold(output_size=x.shape[2:], **fold_params)
-
- weighting = self.get_weighting(kernel_size[0], kernel_size[1], Ly, Lx, x.device).to(x.dtype)
- normalization = fold(weighting).view(1, 1, h, w) # normalizes the overlap
- weighting = weighting.view((1, 1, kernel_size[0], kernel_size[1], Ly * Lx))
-
- elif uf > 1 and df == 1:
- fold_params = dict(kernel_size=kernel_size, dilation=1, padding=0, stride=stride)
- unfold = torch.nn.Unfold(**fold_params)
-
- fold_params2 = dict(kernel_size=(kernel_size[0] * uf, kernel_size[0] * uf),
- dilation=1, padding=0,
- stride=(stride[0] * uf, stride[1] * uf))
- fold = torch.nn.Fold(output_size=(x.shape[2] * uf, x.shape[3] * uf), **fold_params2)
-
- weighting = self.get_weighting(kernel_size[0] * uf, kernel_size[1] * uf, Ly, Lx, x.device).to(x.dtype)
- normalization = fold(weighting).view(1, 1, h * uf, w * uf) # normalizes the overlap
- weighting = weighting.view((1, 1, kernel_size[0] * uf, kernel_size[1] * uf, Ly * Lx))
-
- elif df > 1 and uf == 1:
- fold_params = dict(kernel_size=kernel_size, dilation=1, padding=0, stride=stride)
- unfold = torch.nn.Unfold(**fold_params)
-
- fold_params2 = dict(kernel_size=(kernel_size[0] // df, kernel_size[0] // df),
- dilation=1, padding=0,
- stride=(stride[0] // df, stride[1] // df))
- fold = torch.nn.Fold(output_size=(x.shape[2] // df, x.shape[3] // df), **fold_params2)
-
- weighting = self.get_weighting(kernel_size[0] // df, kernel_size[1] // df, Ly, Lx, x.device).to(x.dtype)
- normalization = fold(weighting).view(1, 1, h // df, w // df) # normalizes the overlap
- weighting = weighting.view((1, 1, kernel_size[0] // df, kernel_size[1] // df, Ly * Lx))
-
- else:
- raise NotImplementedError
-
- return fold, unfold, normalization, weighting
-
- @torch.no_grad()
- def get_input(self, batch, k, return_first_stage_outputs=False, force_c_encode=False,
- cond_key=None, return_original_cond=False, bs=None):
- x = super().get_input(batch, k)
- if bs is not None:
- x = x[:bs]
- x = x.to(self.device)
- encoder_posterior = self.encode_first_stage(x)
- z = self.get_first_stage_encoding(encoder_posterior).detach()
-
- if self.model.conditioning_key is not None:
- if cond_key is None:
- cond_key = self.cond_stage_key
- if cond_key != self.first_stage_key:
- if cond_key in ['caption', 'coordinates_bbox', "txt"]:
- xc = batch[cond_key]
- elif cond_key in ['class_label', 'cls']:
- xc = batch
- else:
- xc = super().get_input(batch, cond_key).to(self.device)
- else:
- xc = x
- if not self.cond_stage_trainable or force_c_encode:
- if isinstance(xc, dict) or isinstance(xc, list):
- # import pudb; pudb.set_trace()
- c = self.get_learned_conditioning(xc)
- else:
- c = self.get_learned_conditioning(xc.to(self.device))
- else:
- c = xc
- if bs is not None:
- c = c[:bs]
-
- if self.use_positional_encodings:
- pos_x, pos_y = self.compute_latent_shifts(batch)
- ckey = __conditioning_keys__[self.model.conditioning_key]
- c = {ckey: c, 'pos_x': pos_x, 'pos_y': pos_y}
-
- else:
- c = None
- xc = None
- if self.use_positional_encodings:
- pos_x, pos_y = self.compute_latent_shifts(batch)
- c = {'pos_x': pos_x, 'pos_y': pos_y}
- out = [z, c]
- if return_first_stage_outputs:
- xrec = self.decode_first_stage(z)
- out.extend([x, xrec])
- if return_original_cond:
- out.append(xc)
- return out
-
- @torch.no_grad()
- def decode_first_stage(self, z, predict_cids=False, force_not_quantize=False):
- if predict_cids:
- if z.dim() == 4:
- z = torch.argmax(z.exp(), dim=1).long()
- z = self.first_stage_model.quantize.get_codebook_entry(z, shape=None)
- z = rearrange(z, 'b h w c -> b c h w').contiguous()
-
- z = 1. / self.scale_factor * z
- return self.first_stage_model.decode(z)
-
- @torch.no_grad()
- def encode_first_stage(self, x):
- return self.first_stage_model.encode(x)
-
- def shared_step(self, batch, **kwargs):
- x, c = self.get_input(batch, self.first_stage_key)
- loss = self(x, c, **kwargs)
- return loss
-
- def get_time_with_schedule(self, scheduler, bs):
- if scheduler == 'linear':
- t = torch.randint(0, self.num_timesteps, (bs,), device=self.device).long()
- elif scheduler == 'cosine':
- t = torch.rand((bs, ), device=self.device)
- t = torch.cos(torch.pi / 2. * t) * self.num_timesteps
- t = t.long()
- elif scheduler == 'cubic':
- t = torch.rand((bs,), device=self.device)
- t = (1 - t ** 3) * self.num_timesteps
- t = t.long()
- else:
- raise NotImplementedError
- t = torch.clamp(t, min=0, max=self.num_timesteps-1)
- return t
-
- def forward(self, x, c, *args, **kwargs):
- if 't' not in kwargs:
- t = torch.randint(0, self.num_timesteps, (x.shape[0], ), device=self.device).long()
- else:
- t = kwargs.pop('t')
-
- return self.p_losses(x, c, t, *args, **kwargs)
-
- def apply_model(self, x_noisy, t, cond, return_ids=False, **kwargs):
- if isinstance(cond, dict):
- # hybrid case, cond is expected to be a dict
- pass
- else:
- if not isinstance(cond, list):
- cond = [cond]
- key = 'c_concat' if self.model.conditioning_key == 'concat' else 'c_crossattn'
- cond = {key: cond}
-
- x_recon = self.model(x_noisy, t, **cond, **kwargs)
-
- if isinstance(x_recon, tuple) and not return_ids:
- return x_recon[0]
- else:
- return x_recon
-
- def _predict_eps_from_xstart(self, x_t, t, pred_xstart):
- return (extract_into_tensor(self.sqrt_recip_alphas_cumprod, t, x_t.shape) * x_t - pred_xstart) / \
- extract_into_tensor(self.sqrt_recipm1_alphas_cumprod, t, x_t.shape)
-
- def _prior_bpd(self, x_start):
- """
- Get the prior KL term for the variational lower-bound, measured in
- bits-per-dim.
- This term can't be optimized, as it only depends on the encoder.
- :param x_start: the [N x C x ...] tensor of inputs.
- :return: a batch of [N] KL values (in bits), one per batch element.
- """
- batch_size = x_start.shape[0]
- t = torch.tensor([self.num_timesteps - 1] * batch_size, device=x_start.device)
- qt_mean, _, qt_log_variance = self.q_mean_variance(x_start, t)
- kl_prior = normal_kl(mean1=qt_mean, logvar1=qt_log_variance, mean2=0.0, logvar2=0.0)
- return mean_flat(kl_prior) / np.log(2.0)
-
- def p_losses(self, x_start, cond, t, noise=None, **kwargs):
- noise = default(noise, lambda: torch.randn_like(x_start))
- x_noisy = self.q_sample(x_start=x_start, t=t, noise=noise)
- model_output = self.apply_model(x_noisy, t, cond, **kwargs)
-
- loss_dict = {}
- prefix = 'train' if self.training else 'val'
-
- if self.parameterization == "x0":
- target = x_start
- elif self.parameterization == "eps":
- target = noise
- elif self.parameterization == "v":
- target = self.get_v(x_start, noise, t)
- else:
- raise NotImplementedError()
-
- loss_simple = self.get_loss(model_output, target, mean=False).mean([1, 2, 3])
- loss_dict.update({f'{prefix}/loss_simple': loss_simple.mean()})
-
- logvar_t = self.logvar[t].to(self.device)
- loss = loss_simple / torch.exp(logvar_t) + logvar_t
- # loss = loss_simple / torch.exp(self.logvar) + self.logvar
- if self.learn_logvar:
- loss_dict.update({f'{prefix}/loss_gamma': loss.mean()})
- loss_dict.update({'logvar': self.logvar.data.mean()})
-
- loss = self.l_simple_weight * loss.mean()
-
- loss_vlb = self.get_loss(model_output, target, mean=False).mean(dim=(1, 2, 3))
- loss_vlb = (self.lvlb_weights[t] * loss_vlb).mean()
- loss_dict.update({f'{prefix}/loss_vlb': loss_vlb})
- loss += (self.original_elbo_weight * loss_vlb)
- loss_dict.update({f'{prefix}/loss': loss})
-
- return loss, loss_dict
-
- def p_mean_variance(self, x, c, t, clip_denoised: bool, return_codebook_ids=False, quantize_denoised=False,
- return_x0=False, score_corrector=None, corrector_kwargs=None):
- t_in = t
- model_out = self.apply_model(x, t_in, c, return_ids=return_codebook_ids)
-
- if score_corrector is not None:
- assert self.parameterization == "eps"
- model_out = score_corrector.modify_score(self, model_out, x, t, c, **corrector_kwargs)
-
- if return_codebook_ids:
- model_out, logits = model_out
-
- if self.parameterization == "eps":
- x_recon = self.predict_start_from_noise(x, t=t, noise=model_out)
- elif self.parameterization == "x0":
- x_recon = model_out
- else:
- raise NotImplementedError()
-
- if clip_denoised:
- x_recon.clamp_(-1., 1.)
- if quantize_denoised:
- x_recon, _, [_, _, indices] = self.first_stage_model.quantize(x_recon)
- model_mean, posterior_variance, posterior_log_variance = self.q_posterior(x_start=x_recon, x_t=x, t=t)
- if return_codebook_ids:
- return model_mean, posterior_variance, posterior_log_variance, logits
- elif return_x0:
- return model_mean, posterior_variance, posterior_log_variance, x_recon
- else:
- return model_mean, posterior_variance, posterior_log_variance
-
- @torch.no_grad()
- def p_sample(self, x, c, t, clip_denoised=False, repeat_noise=False,
- return_codebook_ids=False, quantize_denoised=False, return_x0=False,
- temperature=1., noise_dropout=0., score_corrector=None, corrector_kwargs=None):
- b, *_, device = *x.shape, x.device
- outputs = self.p_mean_variance(x=x, c=c, t=t, clip_denoised=clip_denoised,
- return_codebook_ids=return_codebook_ids,
- quantize_denoised=quantize_denoised,
- return_x0=return_x0,
- score_corrector=score_corrector, corrector_kwargs=corrector_kwargs)
- if return_codebook_ids:
- raise DeprecationWarning("Support dropped.")
- model_mean, _, model_log_variance, logits = outputs
- elif return_x0:
- model_mean, _, model_log_variance, x0 = outputs
- else:
- model_mean, _, model_log_variance = outputs
-
- noise = noise_like(x.shape, device, repeat_noise) * temperature
- if noise_dropout > 0.:
- noise = torch.nn.functional.dropout(noise, p=noise_dropout)
- # no noise when t == 0
- nonzero_mask = (1 - (t == 0).float()).reshape(b, *((1,) * (len(x.shape) - 1)))
-
- if return_codebook_ids:
- return model_mean + nonzero_mask * (0.5 * model_log_variance).exp() * noise, logits.argmax(dim=1)
- if return_x0:
- return model_mean + nonzero_mask * (0.5 * model_log_variance).exp() * noise, x0
- else:
- return model_mean + nonzero_mask * (0.5 * model_log_variance).exp() * noise
-
- @torch.no_grad()
- def progressive_denoising(self, cond, shape, verbose=True, callback=None, quantize_denoised=False,
- img_callback=None, mask=None, x0=None, temperature=1., noise_dropout=0.,
- score_corrector=None, corrector_kwargs=None, batch_size=None, x_T=None, start_T=None,
- log_every_t=None):
- if not log_every_t:
- log_every_t = self.log_every_t
- timesteps = self.num_timesteps
- if batch_size is not None:
- b = batch_size if batch_size is not None else shape[0]
- shape = [batch_size] + list(shape)
- else:
- b = batch_size = shape[0]
- if x_T is None:
- img = torch.randn(shape, device=self.device)
- else:
- img = x_T
- intermediates = []
- if cond is not None:
- if isinstance(cond, dict):
- cond = {key: cond[key][:batch_size] if not isinstance(cond[key], list) else
- list(map(lambda x: x[:batch_size], cond[key])) for key in cond}
- else:
- cond = [c[:batch_size] for c in cond] if isinstance(cond, list) else cond[:batch_size]
-
- if start_T is not None:
- timesteps = min(timesteps, start_T)
- iterator = tqdm(reversed(range(0, timesteps)), desc='Progressive Generation',
- total=timesteps) if verbose else reversed(
- range(0, timesteps))
- if type(temperature) == float:
- temperature = [temperature] * timesteps
-
- for i in iterator:
- ts = torch.full((b,), i, device=self.device, dtype=torch.long)
- if self.shorten_cond_schedule:
- assert self.model.conditioning_key != 'hybrid'
- tc = self.cond_ids[ts].to(cond.device)
- cond = self.q_sample(x_start=cond, t=tc, noise=torch.randn_like(cond))
-
- img, x0_partial = self.p_sample(img, cond, ts,
- clip_denoised=self.clip_denoised,
- quantize_denoised=quantize_denoised, return_x0=True,
- temperature=temperature[i], noise_dropout=noise_dropout,
- score_corrector=score_corrector, corrector_kwargs=corrector_kwargs)
- if mask is not None:
- assert x0 is not None
- img_orig = self.q_sample(x0, ts)
- img = img_orig * mask + (1. - mask) * img
-
- if i % log_every_t == 0 or i == timesteps - 1:
- intermediates.append(x0_partial)
- if callback: callback(i)
- if img_callback: img_callback(img, i)
- return img, intermediates
-
- @torch.no_grad()
- def p_sample_loop(self, cond, shape, return_intermediates=False,
- x_T=None, verbose=True, callback=None, timesteps=None, quantize_denoised=False,
- mask=None, x0=None, img_callback=None, start_T=None,
- log_every_t=None):
-
- if not log_every_t:
- log_every_t = self.log_every_t
- device = self.betas.device
- b = shape[0]
- if x_T is None:
- img = torch.randn(shape, device=device)
- else:
- img = x_T
-
- intermediates = [img]
- if timesteps is None:
- timesteps = self.num_timesteps
-
- if start_T is not None:
- timesteps = min(timesteps, start_T)
- iterator = tqdm(reversed(range(0, timesteps)), desc='Sampling t', total=timesteps) if verbose else reversed(
- range(0, timesteps))
-
- if mask is not None:
- assert x0 is not None
- assert x0.shape[2:3] == mask.shape[2:3] # spatial size has to match
-
- for i in iterator:
- ts = torch.full((b,), i, device=device, dtype=torch.long)
- if self.shorten_cond_schedule:
- assert self.model.conditioning_key != 'hybrid'
- tc = self.cond_ids[ts].to(cond.device)
- cond = self.q_sample(x_start=cond, t=tc, noise=torch.randn_like(cond))
-
- img = self.p_sample(img, cond, ts,
- clip_denoised=self.clip_denoised,
- quantize_denoised=quantize_denoised)
- if mask is not None:
- img_orig = self.q_sample(x0, ts)
- img = img_orig * mask + (1. - mask) * img
-
- if i % log_every_t == 0 or i == timesteps - 1:
- intermediates.append(img)
- if callback: callback(i)
- if img_callback: img_callback(img, i)
-
- if return_intermediates:
- return img, intermediates
- return img
-
- @torch.no_grad()
- def sample(self, cond, batch_size=16, return_intermediates=False, x_T=None,
- verbose=True, timesteps=None, quantize_denoised=False,
- mask=None, x0=None, shape=None, **kwargs):
- if shape is None:
- shape = (batch_size, self.channels, self.image_size, self.image_size)
- if cond is not None:
- if isinstance(cond, dict):
- cond = {key: cond[key][:batch_size] if not isinstance(cond[key], list) else
- list(map(lambda x: x[:batch_size], cond[key])) for key in cond}
- else:
- cond = [c[:batch_size] for c in cond] if isinstance(cond, list) else cond[:batch_size]
- return self.p_sample_loop(cond,
- shape,
- return_intermediates=return_intermediates, x_T=x_T,
- verbose=verbose, timesteps=timesteps, quantize_denoised=quantize_denoised,
- mask=mask, x0=x0)
-
- @torch.no_grad()
- def sample_log(self, cond, batch_size, ddim, ddim_steps, **kwargs):
- if ddim:
- ddim_sampler = DDIMSampler(self)
- shape = (self.channels, self.image_size, self.image_size)
- samples, intermediates = ddim_sampler.sample(ddim_steps, batch_size,
- shape, cond, verbose=False, **kwargs)
-
- else:
- samples, intermediates = self.sample(cond=cond, batch_size=batch_size,
- return_intermediates=True, **kwargs)
-
- return samples, intermediates
-
- @torch.no_grad()
- def get_unconditional_conditioning(self, batch_size, null_label=None):
- if null_label is not None:
- xc = null_label
- if isinstance(xc, ListConfig):
- xc = list(xc)
- if isinstance(xc, dict) or isinstance(xc, list):
- c = self.get_learned_conditioning(xc)
- else:
- if hasattr(xc, "to"):
- xc = xc.to(self.device)
- c = self.get_learned_conditioning(xc)
- else:
- if self.cond_stage_key in ["class_label", "cls"]:
- xc = self.cond_stage_model.get_unconditional_conditioning(batch_size, device=self.device)
- return self.get_learned_conditioning(xc)
- else:
- raise NotImplementedError("todo")
- if isinstance(c, list): # in case the encoder gives us a list
- for i in range(len(c)):
- c[i] = repeat(c[i], '1 ... -> b ...', b=batch_size).to(self.device)
- else:
- c = repeat(c, '1 ... -> b ...', b=batch_size).to(self.device)
- return c
-
- @torch.no_grad()
- def log_images(self, batch, N=8, n_row=4, sample=True, ddim_steps=50, ddim_eta=0., return_keys=None,
- quantize_denoised=True, inpaint=True, plot_denoise_rows=False, plot_progressive_rows=True,
- plot_diffusion_rows=True, unconditional_guidance_scale=1., unconditional_guidance_label=None,
- use_ema_scope=True,
- **kwargs):
- ema_scope = self.ema_scope if use_ema_scope else nullcontext
- use_ddim = ddim_steps is not None
-
- log = dict()
- z, c, x, xrec, xc = self.get_input(batch, self.first_stage_key,
- return_first_stage_outputs=True,
- force_c_encode=True,
- return_original_cond=True,
- bs=N)
- N = min(x.shape[0], N)
- n_row = min(x.shape[0], n_row)
- log["inputs"] = x
- log["reconstruction"] = xrec
- if self.model.conditioning_key is not None:
- if hasattr(self.cond_stage_model, "decode"):
- xc = self.cond_stage_model.decode(c)
- log["conditioning"] = xc
- elif self.cond_stage_key in ["caption", "txt"]:
- xc = log_txt_as_img((x.shape[2], x.shape[3]), batch[self.cond_stage_key], size=x.shape[2] // 25)
- log["conditioning"] = xc
- elif self.cond_stage_key in ['class_label', "cls"]:
- try:
- xc = log_txt_as_img((x.shape[2], x.shape[3]), batch["human_label"], size=x.shape[2] // 25)
- log['conditioning'] = xc
- except KeyError:
- # probably no "human_label" in batch
- pass
- elif isimage(xc):
- log["conditioning"] = xc
- if ismap(xc):
- log["original_conditioning"] = self.to_rgb(xc)
-
- if plot_diffusion_rows:
- # get diffusion row
- diffusion_row = list()
- z_start = z[:n_row]
- for t in range(self.num_timesteps):
- if t % self.log_every_t == 0 or t == self.num_timesteps - 1:
- t = repeat(torch.tensor([t]), '1 -> b', b=n_row)
- t = t.to(self.device).long()
- noise = torch.randn_like(z_start)
- z_noisy = self.q_sample(x_start=z_start, t=t, noise=noise)
- diffusion_row.append(self.decode_first_stage(z_noisy))
-
- diffusion_row = torch.stack(diffusion_row) # n_log_step, n_row, C, H, W
- diffusion_grid = rearrange(diffusion_row, 'n b c h w -> b n c h w')
- diffusion_grid = rearrange(diffusion_grid, 'b n c h w -> (b n) c h w')
- diffusion_grid = make_grid(diffusion_grid, nrow=diffusion_row.shape[0])
- log["diffusion_row"] = diffusion_grid
-
- if sample:
- # get denoise row
- with ema_scope("Sampling"):
- samples, z_denoise_row = self.sample_log(cond=c, batch_size=N, ddim=use_ddim,
- ddim_steps=ddim_steps, eta=ddim_eta)
- # samples, z_denoise_row = self.sample(cond=c, batch_size=N, return_intermediates=True)
- x_samples = self.decode_first_stage(samples)
- log["samples"] = x_samples
- if plot_denoise_rows:
- denoise_grid = self._get_denoise_row_from_list(z_denoise_row)
- log["denoise_row"] = denoise_grid
-
- if quantize_denoised and not isinstance(self.first_stage_model, AutoencoderKL) and not isinstance(
- self.first_stage_model, IdentityFirstStage):
- # also display when quantizing x0 while sampling
- with ema_scope("Plotting Quantized Denoised"):
- samples, z_denoise_row = self.sample_log(cond=c, batch_size=N, ddim=use_ddim,
- ddim_steps=ddim_steps, eta=ddim_eta,
- quantize_denoised=True)
- # samples, z_denoise_row = self.sample(cond=c, batch_size=N, return_intermediates=True,
- # quantize_denoised=True)
- x_samples = self.decode_first_stage(samples.to(self.device))
- log["samples_x0_quantized"] = x_samples
-
- if unconditional_guidance_scale > 1.0:
- uc = self.get_unconditional_conditioning(N, unconditional_guidance_label)
- if self.model.conditioning_key == "crossattn-adm":
- uc = {"c_crossattn": [uc], "c_adm": c["c_adm"]}
- with ema_scope("Sampling with classifier-free guidance"):
- samples_cfg, _ = self.sample_log(cond=c, batch_size=N, ddim=use_ddim,
- ddim_steps=ddim_steps, eta=ddim_eta,
- unconditional_guidance_scale=unconditional_guidance_scale,
- unconditional_conditioning=uc,
- )
- x_samples_cfg = self.decode_first_stage(samples_cfg)
- log[f"samples_cfg_scale_{unconditional_guidance_scale:.2f}"] = x_samples_cfg
-
- if inpaint:
- # make a simple center square
- b, h, w = z.shape[0], z.shape[2], z.shape[3]
- mask = torch.ones(N, h, w).to(self.device)
- # zeros will be filled in
- mask[:, h // 4:3 * h // 4, w // 4:3 * w // 4] = 0.
- mask = mask[:, None, ...]
- with ema_scope("Plotting Inpaint"):
- samples, _ = self.sample_log(cond=c, batch_size=N, ddim=use_ddim, eta=ddim_eta,
- ddim_steps=ddim_steps, x0=z[:N], mask=mask)
- x_samples = self.decode_first_stage(samples.to(self.device))
- log["samples_inpainting"] = x_samples
- log["mask"] = mask
-
- # outpaint
- mask = 1. - mask
- with ema_scope("Plotting Outpaint"):
- samples, _ = self.sample_log(cond=c, batch_size=N, ddim=use_ddim, eta=ddim_eta,
- ddim_steps=ddim_steps, x0=z[:N], mask=mask)
- x_samples = self.decode_first_stage(samples.to(self.device))
- log["samples_outpainting"] = x_samples
-
- if plot_progressive_rows:
- with ema_scope("Plotting Progressives"):
- img, progressives = self.progressive_denoising(c,
- shape=(self.channels, self.image_size, self.image_size),
- batch_size=N)
- prog_row = self._get_denoise_row_from_list(progressives, desc="Progressive Generation")
- log["progressive_row"] = prog_row
-
- if return_keys:
- if np.intersect1d(list(log.keys()), return_keys).shape[0] == 0:
- return log
- else:
- return {key: log[key] for key in return_keys}
- return log
-
- def configure_optimizers(self):
- lr = self.learning_rate
- params = list(self.model.parameters())
- if self.cond_stage_trainable:
- print(f"{self.__class__.__name__}: Also optimizing conditioner params!")
- params = params + list(self.cond_stage_model.parameters())
- if self.learn_logvar:
- print('Diffusion model optimizing logvar')
- params.append(self.logvar)
- opt = torch.optim.AdamW(params, lr=lr)
- if self.use_scheduler:
- assert 'target' in self.scheduler_config
- scheduler = instantiate_from_config(self.scheduler_config)
-
- print("Setting up LambdaLR scheduler...")
- scheduler = [
- {
- 'scheduler': LambdaLR(opt, lr_lambda=scheduler.schedule),
- 'interval': 'step',
- 'frequency': 1
- }]
- return [opt], scheduler
- return opt
-
- @torch.no_grad()
- def to_rgb(self, x):
- x = x.float()
- if not hasattr(self, "colorize"):
- self.colorize = torch.randn(3, x.shape[1], 1, 1).to(x)
- x = nn.functional.conv2d(x, weight=self.colorize)
- x = 2. * (x - x.min()) / (x.max() - x.min()) - 1.
- return x
-
-
-class DiffusionWrapper(pl.LightningModule):
- def __init__(self, diff_model_config, conditioning_key):
- super().__init__()
- self.diffusion_model = instantiate_from_config(diff_model_config)
- self.conditioning_key = conditioning_key
- assert self.conditioning_key in [None, 'concat', 'crossattn', 'hybrid', 'adm', 'hybrid-adm', 'crossattn-adm']
-
- def forward(self, x, t, c_concat: list = None, c_crossattn: list = None, c_adm=None, **kwargs):
- if self.conditioning_key is None:
- out = self.diffusion_model(x, t, **kwargs)
- elif self.conditioning_key == 'concat':
- xc = torch.cat([x] + c_concat, dim=1)
- out = self.diffusion_model(xc, t, **kwargs)
- elif self.conditioning_key == 'crossattn':
- cc = torch.cat(c_crossattn, 1)
- out = self.diffusion_model(x, t, context=cc, **kwargs)
- elif self.conditioning_key == 'hybrid':
- xc = torch.cat([x] + c_concat, dim=1)
- cc = torch.cat(c_crossattn, 1)
- out = self.diffusion_model(xc, t, context=cc, **kwargs)
- elif self.conditioning_key == 'hybrid-adm':
- assert c_adm is not None
- xc = torch.cat([x] + c_concat, dim=1)
- cc = torch.cat(c_crossattn, 1)
- out = self.diffusion_model(xc, t, context=cc, y=c_adm, **kwargs)
- elif self.conditioning_key == 'crossattn-adm':
- assert c_adm is not None
- cc = torch.cat(c_crossattn, 1)
- out = self.diffusion_model(x, t, context=cc, y=c_adm, **kwargs)
- elif self.conditioning_key == 'adm':
- cc = c_crossattn[0]
- out = self.diffusion_model(x, t, y=cc, **kwargs)
- else:
- raise NotImplementedError()
-
- return out
diff --git a/spaces/Adapting/YouTube-Downloader/tube/__init__.py b/spaces/Adapting/YouTube-Downloader/tube/__init__.py
deleted file mode 100644
index c6e4d00584b3f35e6fdf290af6c6c49ed89ee5b3..0000000000000000000000000000000000000000
--- a/spaces/Adapting/YouTube-Downloader/tube/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from .download import download_yt
-from .utils import clear_cache
-from .var import OUTPUT_DIR
\ No newline at end of file
diff --git a/spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/ui/alphamaskimage/AlphaMaskImage.d.ts b/spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/ui/alphamaskimage/AlphaMaskImage.d.ts
deleted file mode 100644
index 892d49c9e59447c2f5ca8cca2d7d39f795a5c0df..0000000000000000000000000000000000000000
--- a/spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/ui/alphamaskimage/AlphaMaskImage.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import AlphaMaskImage from '../../../plugins/alphamaskimage';
-export default AlphaMaskImage;
\ No newline at end of file
diff --git a/spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/ui/colorinput/colorinputbase/ColorInputBase.d.ts b/spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/ui/colorinput/colorinputbase/ColorInputBase.d.ts
deleted file mode 100644
index b607ad0a73bb8629d56d198b91c079362ad12c2a..0000000000000000000000000000000000000000
--- a/spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/ui/colorinput/colorinputbase/ColorInputBase.d.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import Sizer from '../../sizer/Sizer';
-import RoundRectangle from '../../roundrectangle/RoundRectangle'
-import CanvasInput from '../../canvasinput/CanvasInput';
-
-export default ColorInputBase;
-
-declare namespace ColorInputBase {
- interface ISwatchConfig extends RoundRectangle.IConfig {
- size?: number,
- }
-
- interface IConfig extends Sizer.IConfig {
- background?: Phaser.GameObjects.GameObject,
-
- swatch?: Phaser.GameObjects.GameObject | ISwatchConfig,
- swatchSize?: number,
- squareExpandSwatch?: boolean,
-
- inputText?: CanvasInput.IConfig,
-
- valuechangeCallback: (newValue: number, oldValue: number, colorPicker: ColorInputBase) => void,
-
- value?: number | string
- }
-}
-
-declare class ColorInputBase extends Sizer {
- constructor(
- scene: Phaser.Scene,
- config?: ColorInputBase.IConfig
- );
-
- setValue(value: number): this;
- value: number;
-
- setColor(color: number): this;
- color: number;
-}
\ No newline at end of file
diff --git a/spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/ui/simpledropdownlist/Factory.js b/spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/ui/simpledropdownlist/Factory.js
deleted file mode 100644
index 99884b42bffd6ab0a62a524f6a96cc3fa4a1f3e8..0000000000000000000000000000000000000000
--- a/spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/ui/simpledropdownlist/Factory.js
+++ /dev/null
@@ -1,13 +0,0 @@
-import SimpleDropDownList from './SimpleDropDownList.js';
-import ObjectFactory from '../ObjectFactory.js';
-import SetValue from '../../../plugins/utils/object/SetValue.js';
-
-ObjectFactory.register('simpleDropDownList', function (config, creators) {
- var gameObject = new SimpleDropDownList(this.scene, config, creators);
- this.scene.add.existing(gameObject);
- return gameObject;
-});
-
-SetValue(window, 'RexPlugins.UI.SimpleDropDownList', SimpleDropDownList);
-
-export default SimpleDropDownList;
\ No newline at end of file
diff --git a/spaces/Alcedo/yunmedia/resources/chatgpt-plugin/js/chunk-vendors-legacy.9281b25c.js b/spaces/Alcedo/yunmedia/resources/chatgpt-plugin/js/chunk-vendors-legacy.9281b25c.js
deleted file mode 100644
index e3dfb3b424dd6df7a98d684727fc2ef850240c2e..0000000000000000000000000000000000000000
--- a/spaces/Alcedo/yunmedia/resources/chatgpt-plugin/js/chunk-vendors-legacy.9281b25c.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/*!
-
-=========================================================
-* Vue Notus - v1.1.0 based on Tailwind Starter Kit by Creative Tim
-=========================================================
-
-* Product Page: https://www.creative-tim.com/product/vue-notus
-* Copyright 2021 Creative Tim (https://www.creative-tim.com)
-* Licensed under MIT (https://github.com/creativetimofficial/vue-notus/blob/main/LICENSE.md)
-
-* Tailwind Starter Kit Page: https://www.creative-tim.com/learning-lab/tailwind-starter-kit/presentation
-
-* Coded by Creative Tim
-
-=========================================================
-
-* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-*/
-(self["webpackChunkvue_notus"]=self["webpackChunkvue_notus"]||[]).push([[998],{27543:function(e,t,n){"use strict";var r=n(11947);t.Z=o;var i=r(n(19649)),s=r(n(78317));function o(){return{install:function(e){e.vMdParser.use(i.default),e.use((0,s.default)())}}}},19649:function(e,t,n){"use strict";var r=n(11947);t.__esModule=!0,t["default"]=s;var i=r(n(22960));function s(e){e.extendMarkdown((function(e){e.use(i.default)}))}},78317:function(e,t,n){"use strict";var r=n(11947);t.__esModule=!0,t["default"]=l;var i=r(n(20640));function s(e){return e.classList.contains("v-md-copy-code-btn")}function o(e){return e.classList.contains("v-md-pre-wrapper")?e:o(e.parentNode)}function a(e){var t="v-md-editor-preview";return e.classList.contains(t)?e:e.querySelector("."+t)}function l(){return{install:function(e){e.mixins||(e.mixins=[]),e.mixins.push({emits:["copy-code-success"],mounted:function(){var e=this;this.$nextTick((function(){var t=a(e.$el);t.addEventListener("click",e.handleCopyCodeClick)}))},beforeUnmount:function(){var e=a(this.$el);e.removeEventListener("click",this.handleCopyCodeClick)},methods:{handleCopyCodeClick:function(e){var t=e.target;if(s(t)){var n=o(t.parentNode);if(n){var r=n.querySelector("code").innerText;(0,i.default)(r),this.$emit("copy-code-success",r)}}}}})}}}},31233:function(e,t){"use strict";function n(e,t){e.insert((function(){var e=":",n=":";return{text:""+e+t+n}}))}t.__esModule=!0,t["default"]=n},17988:function(e,t,n){"use strict";var r=n(11947);t.__esModule=!0,t["default"]=o;var i=r(n(70326)),s=r(n(31233));function o(e){var t=e.emojiJson,n=e.parser;return function(e){var r=void 0===e?{}:e,o=r.name,a=void 0===o?"emoji":o,l=r.icon,c=void 0===l?"v-md-icon-emoji":l,u=r.text,d=r.title,h=void 0===d?function(e){return e.langConfig.emoji}:d,p=r.customEmoji,f=(0,i.default)({commandName:a,title:h,text:u,icon:c,emojiJson:t});return{install:function(e){"v-md-editor"===e.name&&(e.command(a,s.default),e.toolbar(a,f),e.lang.add({"zh-CN":{emoji:"插入emoji表情"},"en-US":{emoji:"Insert emoji"}})),e.vMdParser.use(n,{customEmoji:p})}}}}},58043:function(e,t,n){"use strict";var r=n(11947);t.Z=void 0;var i=r(n(42676)),s=r(n(17988)),o=r(n(38741)),a=(0,s.default)({emojiJson:i.default,parser:o.default});t.Z=a},93225:function(e,t){"use strict";function n(e){return function(t,n){void 0===n&&(n={}),t.extendMarkdown((function(t){t.use(e),n.customEmoji&&(t.renderer.rules.emoji=function(e,t){return''})}))}}t.__esModule=!0,t["default"]=n},38741:function(e,t,n){"use strict";var r=n(11947);t.__esModule=!0,t["default"]=void 0;var i=r(n(6308)),s=r(n(93225)),o=(0,s.default)(i.default);t["default"]=o},70326:function(e,t){"use strict";function n(e,t){return Object.keys(e).map((function(n){return{name:n,text:e[n],class:"v-md-emoji-panel-item",action:function(e){e.execCommand(t,n)}}}))}function r(e){var t=e.commandName,r=e.emojiJson,i=e.text,s=e.title,o=e.icon;return{title:s,icon:o,text:i,menus:{mode:"panel",items:n(r,t)}}}t.__esModule=!0,t.generatorMenuItems=n,t["default"]=r},35245:function(e,t,n){"use strict";var r=n(11947);t.Z=void 0;var i=r(n(30821)),s=r(n(89975)),o=(0,i.default)(s.default);t.Z=o},30821:function(e,t){"use strict";function n(e){return function(t){return{install:function(n){n.vMdParser.use(e,t)}}}}t.__esModule=!0,t["default"]=n},89975:function(e,t,n){"use strict";var r=n(11947);t.__esModule=!0,t["default"]=void 0;var i=r(n(18106)),s="undefined"===typeof window;s||window.katex||console.error("Please import resources katex from cdn");var o=(0,i.default)(s?null:window.katex);t["default"]=o},18106:function(e,t,n){"use strict";var r=n(11947);t.__esModule=!0,t["default"]=o;var i=r(n(99514)),s=r(n(56325));function o(e){return function(t,n){t.extendMarkdown((function(t){e&&t.use(s.default,(0,i.default)({},n,{katex:e}))}))}}},23375:function(e,t,n){"use strict";var r=n(11947);t.Z=void 0;var i=r(n(37307)),s="undefined"===typeof window;s||window.mermaid||console.error("Please import resources mermaid from cdn");var o=(0,i.default)(s?null:window.mermaid);t.Z=o},37307:function(e,t,n){"use strict";var r=n(11947);t.__esModule=!0,t["default"]=u;var i=r(n(94684)),s=r(n(44569)),o=r(n(31812)),a=n(81166),l=n(37060);function c(e){var t="v-md-editor-preview";return e.classList.contains(t)?e:e.querySelector("."+t)}function u(e){function t(){return n.apply(this,arguments)}function n(){return n=(0,s.default)(i.default.mark((function t(){var n,r,s;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(l.inBrowser){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,this.$nextTick();case 4:if(n=c(this.$el),r=n.querySelectorAll(".v-md-mermaid"),r.length){t.next=8;break}return t.abrupt("return");case 8:s=!1,r.forEach((function(t){try{s=e.parse(t.innerText)}catch(n){n.str||console.log(n)}s&&e.init(null,t)}));case 10:case"end":return t.stop()}}),t,this)}))),n.apply(this,arguments)}return function(n){var r=void 0===n?{}:n,i=r.mermaidInitializeOptions,s=void 0===i?{}:i,l={altFontFamily:"sans-serif",flowchart:{htmlLabels:!0,useMaxWidth:!0},fontFamily:"sans-serif",gantt:{leftPadding:75,rightPadding:20},securityLevel:"loose",sequence:{boxMargin:8,diagramMarginX:8,diagramMarginY:8,useMaxWidth:!0},startOnLoad:!1};return(0,a.deepAssign)(l,s),{install:function(n){n.vMdParser.use(o.default),n.mixins||(n.mixins=[]);var r={created:function(){e.initialize(l)},watch:{html:{immediate:!0,handler:t}}};"v-md-editor"===n.name?n.Preview.mixins.push(r):n.mixins.push(r)}}}}},31812:function(e,t,n){"use strict";var r=n(11947);t.__esModule=!0,t["default"]=s;var i=r(n(63596));function s(e){e.extendMarkdown((function(e){e&&e.use(i.default)}))}},42104:function(e,t,n){(function(t,r){e.exports=r(n(70821))})("undefined"!==typeof self&&self,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=9)}([function(t,n){t.exports=e},,function(e,t,n){"use strict";n.d(t,"f",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return l})),n.d(t,"e",(function(){return c})),n.d(t,"b",(function(){return u}));var r=Object.prototype.toString,i=function(e){return"[object Object]"===r.call(e)};function s(e,t){return Object.keys(t).forEach((function(n){e[n]=t[n]})),e}function o(e){for(var t={},n=0;nn?"down":"up",c=o/100*(r-n),u=function e(){n+=c,"down"===l&&n>=r||"up"===l&&n<=r?(i(r),window.cancelAnimationFrame(t),a&&window.requestAnimationFrame(a)):(i(n),window.requestAnimationFrame(e))};window.requestAnimationFrame(u)}function s(e){var t=e.scrollTarget,n=e.scrollToTop,s=e.percent,o=void 0===s?10:s,a=e.onScrollEnd,l=Object(r["a"])(t);i({currentScrollTop:l,scrollToTop:n,scrollFn:function(e){return Object(r["b"])(t,e)},percent:o,onScrollEnd:a})}},function(e,t,n){"use strict";n.r(t);var r=n(0);function i(e,t,n,i,s,o){return Object(r["openBlock"])(),Object(r["createBlock"])("div",{class:"v-md-editor-preview",style:{tabSize:e.tabSize,"-moz-tab-size":e.tabSize,"-o-tab-size":e.tabSize},onClick:t[1]||(t[1]=function(){return e.handlePreviewClick.apply(e,arguments)})},[Object(r["createVNode"])("div",{class:[e.previewClass],innerHTML:e.html},null,10,["innerHTML"])],4)}var s=n(7),o=n(13),a=function(){function e(){this.lang=new o["a"]}var t=e.prototype;return t.defaultMarkdownLoader=function(e){return e},t.use=function(e,t){return"function"===typeof e?e(this,t):e.install(this,t),this},t.theme=function(e){this.themeConfig=e},t.extendMarkdown=function(e){if(!this.themeConfig)return console.error("Please use theme before using plugins");var t=this.themeConfig.markdownParser;e(t)},t.parse=function(e){var t,n=this.themeConfig.markdownParser,r=(null==n||null==(t=n.render)?void 0:t.bind(n))||this.defaultMarkdownLoader;return"function"===typeof r&&r!==this.defaultMarkdownLoader||console.error("Please configure your markdown parser"),r(e)},e}(),l=n(16),c={name:"v-md-preview",mixins:[l["a"]],props:{text:{type:String,default:""},theme:Object,beforeChange:Function},emits:["change"],data:function(){return{html:""}},watch:{text:function(){this.handleTextChange()},langConfig:function(){this.handleTextChange()}},computed:{vMdParser:function(){return this.$options.vMdParser},previewClass:function(){return this.vMdParser.themeConfig.previewClass},langConfig:function(){return this.vMdParser.lang.langConfig}},created:function(){this.handleTextChange()},methods:{handleTextChange:function(){var e=this,t=function(t){e.html=s["a"].process(e.$options.vMdParser.parse(t)),e.$emit("change",t,e.html)};this.beforeChange?this.beforeChange(this.text,t):t(this.text)}}},u=new a;u.lang.config=Object(r["reactive"])(u.lang.config),c.vMdParser=new a;var d=c;d.render=i;var h=d,p=(n(18),"2.3.15"),f=function(e){e.component(h.name,h)};h.version=p,h.install=f,h.xss=s["a"],h.use=function(e,t){return"function"===typeof e?e(h,t):e.install(h,t),h};t["default"]=h},,function(e,t,n){var r=n(19),i=n(22),s=n(26);function o(e,t){var n=new s(t);return n.process(e)}for(var a in t=e.exports=o,t.filterXSS=o,t.FilterXSS=s,r)t[a]=r[a];for(var a in i)t[a]=i[a];function l(){return"undefined"!==typeof self&&"undefined"!==typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope}"undefined"!==typeof window&&(window.filterXSS=e.exports),l()&&(self.filterXSS=e.exports)},,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2),i=Object.prototype.hasOwnProperty;function s(e,t,n){var s=t[n];void 0!==s&&null!==s&&(i.call(e,n)&&Object(r["f"])(s)?e[n]=o(Object(e[n]),t[n]):e[n]=s)}function o(e,t){return Object.keys(t).forEach((function(n){s(e,t,n)})),e}var a=function(){function e(e){void 0===e&&(e={}),this.config={lang:"zh-CN",langConfig:{"zh-CN":{}}},this.options=e}var t=e.prototype;return t.use=function(e,t){var n;this.config.lang=e,this.add((n={},n[e]=t,n)),this.options.afterUse&&this.options.afterUse(e,t)},t.add=function(e){void 0===e&&(e={}),o(this.config.langConfig,e)},e}()},function(e,t,n){var r=n(20),i=n(24);function s(e,t){var n=new i(t);return n.process(e)}for(var o in t=e.exports=s,t.FilterCSS=i,r)t[o]=r[o];"undefined"!==typeof window&&(window.filterCSS=e.exports)},function(e,t){e.exports={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n/g,m=/"/g,b=/"/g,_=/([a-zA-Z0-9]*);?/gim,y=/:?/gim,v=/&newline;?/gim,E=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,x=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,S=/u\s*r\s*l\s*\(.*/gi;function w(e){return e.replace(m,""")}function T(e){return e.replace(b,'"')}function A(e){return e.replace(_,(function(e,t){return"x"===t[0]||"X"===t[0]?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))}))}function I(e){return e.replace(y,":").replace(v," ")}function C(e){for(var t="",n=0,r=e.length;n/g;function D(e){var t=e.split("");return t=t.filter((function(e){var t=e.charCodeAt(0);return 127!==t&&(!(t<=31)||(10===t||13===t))})),t.join("")}t.whiteList=o(),t.getDefaultWhiteList=o,t.onTag=l,t.onIgnoreTag=c,t.onTagAttr=u,t.onIgnoreTagAttr=d,t.safeAttrValue=p,t.escapeHtml=h,t.escapeQuote=w,t.unescapeQuote=T,t.escapeHtmlEntities=A,t.escapeDangerHtml5Entities=I,t.clearNonPrintableCharacter=C,t.friendlyAttrValue=R,t.escapeAttrValue=k,t.onIgnoreTagStripAll=P,t.StripTagBody=O,t.stripCommentTag=N,t.stripBlankChar=D,t.cssFilter=a,t.getDefaultCSSWhiteList=i},function(e,t){function n(){var e={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return e}function r(e,t,n){}function i(e,t,n){}var s=/javascript\s*\:/gim;function o(e,t){return s.test(t)?"":t}t.whiteList=n(),t.getDefaultWhiteList=n,t.onAttr=r,t.onIgnoreAttr=i,t.safeAttrValue=o},function(e,t){e.exports={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n"===p){r+=n(e.slice(o,a)),h=e.slice(a,c+1),d=i(h),r+=t(a,r.length,d,h,s(h)),o=c+1,a=!1;continue}if('"'===p||"'"===p){var f=1,g=e.charAt(c-f);while(""===g.trim()||"="===g){if("="===g){l=p;continue e}g=e.charAt(c-++f)}}}else if(p===l){l=!1;continue}}return o0;t--){var n=e[t];if(" "!==n)return"="===n?t:-1}}function d(e){return'"'===e[0]&&'"'===e[e.length-1]||"'"===e[0]&&"'"===e[e.length-1]}function h(e){return d(e)?e.substr(1,e.length-2):e}t.parseTag=o,t.parseAttr=l},,function(e,t,n){var r=n(20),i=n(25);n(21);function s(e){return void 0===e||null===e}function o(e){var t={};for(var n in e)t[n]=e[n];return t}function a(e){e=o(e||{}),e.whiteList=e.whiteList||r.whiteList,e.onAttr=e.onAttr||r.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||r.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||r.safeAttrValue,this.options=e}a.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,n=t.options,r=n.whiteList,o=n.onAttr,a=n.onIgnoreAttr,l=n.safeAttrValue,c=i(e,(function(e,t,n,i,c){var u=r[n],d=!1;if(!0===u?d=u:"function"===typeof u?d=u(i):u instanceof RegExp&&(d=u.test(i)),!0!==d&&(d=!1),i=l(n,i),i){var h={position:t,sourcePosition:e,source:c,isWhite:d};if(d){var p=o(n,i,h);return s(p)?n+":"+i:p}p=a(n,i,h);return s(p)?void 0:p}}));return c},e.exports=a},function(e,t,n){var r=n(21);function i(e,t){e=r.trimRight(e),";"!==e[e.length-1]&&(e+=";");var n=e.length,i=!1,s=0,o=0,a="";function l(){if(!i){var n=r.trim(e.slice(s,o)),l=n.indexOf(":");if(-1!==l){var c=r.trim(n.slice(0,l)),u=r.trim(n.slice(l+1));if(c){var d=t(s,a.length,c,u,n);d&&(a+=d+"; ")}}}s=o+1}for(;o";var y=u(i),v=r[n],E=a(y.html,(function(e,t){var r=-1!==l.indexOf(v,e),i=h(n,e,t,r);if(!c(i))return i;if(r)return t=f(n,e,t,m),t?e+'="'+t+'"':e;i=p(n,e,t,r);return c(i)?void 0:i}));i="<"+n;return E&&(i+=" "+E),y.closing&&(i+=" /"),i+=">",i}_=d(n,i,b);return c(_)?g(i):_}),g);return b&&(_=b.remove(_)),_},e.exports=h}])["default"]}))},31986:function(e){!function(t,n){e.exports=n()}("undefined"!=typeof self&&self,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=86)}([function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function i(e,t){return r.call(e,t)}function s(e){return!(e>=55296&&e<=57343)&&!(e>=64976&&e<=65007)&&65535!=(65535&e)&&65534!=(65535&e)&&!(e>=0&&e<=8)&&11!==e&&!(e>=14&&e<=31)&&!(e>=127&&e<=159)&&!(e>1114111)}function o(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var a=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=new RegExp(a.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,u=n(7),d=/[&<>"]/,h=/[&<>"]/g,p={"&":"&","<":"<",">":">",'"':"""};function f(e){return p[e]}var g=/[.?*+^$[\]\\(){}|-]/g,m=n(3);t.lib={},t.lib.mdurl=n(8),t.lib.ucmicro=n(26),t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(n){e[n]=t[n]}))}})),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=i,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(a,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(l,(function(e,t,n){return t||function(e,t){var n=0;return i(u,t)?u[t]:35===t.charCodeAt(0)&&c.test(t)&&s(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?o(n):e}(e,n)}))},t.isValidEntityCode=s,t.fromCodePoint=o,t.escapeHtml=function(e){return d.test(e)?e.replace(h,f):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return m.test(e)},t.escapeRE=function(e){return e.replace(g,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t'+r+" "}}t.b=function(){var e=new i.a;return e.set({html:!0,breaks:!0,linkify:!1,typographer:!0}),e}},function(e,t){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(e,t,n){"use strict";function r(){this.__rules__=[],this.__cache__=null}r.prototype.__find__=function(e){for(var t=0;t=0&&(n=this.attrs[t][1]),n},r.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},e.exports=r},function(e,t,n){"use strict";const r=/[\u0000-\u001f]/g,i=/[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'“”‘’–—<>,.?/]+/g,s=/[\u0300-\u036F]/g;e.exports=function(e){return e.normalize("NFKD").replace(s,"").replace(r,"").replace(i,"-").replace(/\-{2,}/g,"-").replace(/^\-+|\-+$/g,"").replace(/^(\d)/,"_$1").toLowerCase()}},function(e,t,n){"use strict";e.exports=n(21)},function(e,t,n){"use strict";e.exports.encode=n(22),e.exports.decode=n(23),e.exports.format=n(24),e.exports.parse=n(25)},function(e,t){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e,t){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e,t){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},function(e,t,n){"use strict";var r="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",i="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",s=new RegExp("^(?:"+r+"|"+i+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?][\\s\\S]*?[?]>|]*>|)"),o=new RegExp("^(?:"+r+"|"+i+")");e.exports.HTML_TAG_RE=s,e.exports.HTML_OPEN_CLOSE_TAG_RE=o},function(e,t,n){"use strict";function r(e,t){var n,r,i,s,o,a=[],l=t.length;for(n=0;n=0;n--)95!==(r=t[n]).marker&&42!==r.marker||-1!==r.end&&(i=t[r.end],a=n>0&&t[n-1].end===r.end+1&&t[n-1].marker===r.marker&&t[n-1].token===r.token-1&&t[r.end+1].token===i.token+1,o=String.fromCharCode(r.marker),(s=e.tokens[r.token]).type=a?"strong_open":"em_open",s.tag=a?"strong":"em",s.nesting=1,s.markup=a?o+o:o,s.content="",(s=e.tokens[i.token]).type=a?"strong_close":"em_close",s.tag=a?"strong":"em",s.nesting=-1,s.markup=a?o+o:o,s.content="",a&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--))}e.exports.tokenize=function(e,t){var n,r,i=e.pos,s=e.src.charCodeAt(i);if(t)return!1;if(95!==s&&42!==s)return!1;for(r=e.scanDelims(e.pos,42===s),n=0;n=0?u[d]:u[u.length+d]);var u,d;if(void 0===c)return r;for(let h in n)if("shift"!==h&&"position"!==h){if(void 0===c[h])return r;if("children"===h&&o(n.children)){if(0===c.children.length)return r;let e,t=n.children,i=c.children;if(t.every((e=>void 0!==e.position))){if(e=t.every((e=>s(i,e.position,e).match)),e){let e=l(t).position;r.j=e>=0?e:i.length+e}}else for(let n=0;ns(i,n,e).match)),e){r.j=n;break}if(!1===e)return r}else switch(typeof n[h]){case"boolean":case"number":case"string":if(c[h]!==n[h])return r;break;case"function":if(!n[h](c[h]))return r;break;case"object":if(a(n[h])){if(!1===n[h].every((e=>e(c[h]))))return r;break}default:throw new Error(`Unknown type of pattern test (key: ${h}). Test should be of type boolean, number, string, function or array of functions.`)}}return r.match=!0,r}function o(e){return Array.isArray(e)&&e.length&&e.every((e=>"object"==typeof e))}function a(e){return Array.isArray(e)&&e.length&&e.every((e=>"function"==typeof e))}function l(e){return e.slice(-1)[0]||{}}e.exports=function(e,t){let n=Object.assign({},i);n=Object.assign(n,t);const o=r(n);e.core.ruler.before("linkify","curly_attributes",(function(e){let t=e.tokens;for(let n=0;n{let r=s(t,n,e);return null!==r.j&&(i=r.j),r.match}))&&(r.transform(t,n,i),"inline attributes"!==r.name&&"inline nesting 0"!==r.name||e--)}}))}},function(e,t,n){"use strict";e.exports=n(20)},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return g}));var r=n(1),i=n(15),s=n.n(i),o=function(e,t){var n=(void 0===t?{}:t).lineMarkup,r=void 0===n?"data-line":n,i=function(e,t,n,r,i){return i.renderToken(e,t,n)};function s(e){return function(t,n,i,s,o){var a=t[n];return a.attrPush([r,a.map[0]+1]),e(t,n,i,s,o)}}function o(e){return function(t,n,i,s,o){var a=e(t,n,i,s,o),l=t[n].map[0]+1;return"'+a+" "}}var a={table_open:s,blockquote_open:s,bullet_list_open:s,ordered_list_open:s,reference_open:s,heading_open:s,lheading_open:s,paragraph_open:s,hr:s,html_block:o,code_block:o,fence:o};Object.keys(a).forEach((function(t){var n=e.renderer.rules[t]||i;e.renderer.rules[t]=a[t](n)}))},a=function(e,t){void 0===t&&(t={});var n=t.getMarks;n&&e.core.ruler.push("anchor",(function(e){var t={},r=e.tokens;r.filter((function(e){return"heading_open"===e.type})).forEach((function(e){var i=r[r.indexOf(e)+1].content,s=Number(e.tag.substr(1));t[i]=i in t?Number(t[i])+1:"";var o=n(i,s,t[i]);o&&o.forEach((function(t){var n=t.attr,r=t.value;e.attrPush([n,r])}))}))}))},l={includeLevel:[2,3],containerClass:"table-of-contents",listClass:"table-of-content-list",listItemClass:"table-of-content-list-item",markerPattern:/^\[\[toc\]\]/im,listType:"ul",getAnchorAttrs:function(){return[]},format:void 0,forceFullToc:!1,containerHeaderHtml:void 0,containerFooterHtml:void 0,transformLink:void 0},c=function(e,t){var n,i=Object(r.a)({},l,t),s=i.markerPattern;function o(e,t,n){for(var r,s,a=[],l="",c=t.length,u=e;ur){l+=(s=o(u,t,n))[1],u=s[0];continue}if(p",a.push(l),[u,"<"+i.listType+' class="'+i.listClass+'">'+a.join("")+""+i.listType+">"];p==r&&(l+="",a.push(l))}else r=p;var f=h.children.reduce((function(e,t){return e+t.content}),""),g=h.content,m=n[g]=g in n?Number(n[g])+1:"",b=i.getAnchorAttrs(g,p,m);l='- \n ",l+=f,l+="",u++}else u++}return l+=""===l?"":"
",a.push(l),[u,"<"+i.listType+' class="'+i.listClass+'">'+a.join("")+""+i.listType+">"]}e.renderer.rules.toc_open=function(e,t){var n='';return i.containerHeaderHtml&&(n+=i.containerHeaderHtml),n},e.renderer.rules.toc_close=function(e,t){var n="";return i.containerFooterHtml&&(n=i.containerFooterHtml),n+" "},e.renderer.rules.toc_body=function(e,t){var r={};if(i.forceFullToc){for(var s="",a=0,l=n&&n.tokens&&n.tokens.length;a |