├── .editorconfig ├── .env ├── .eslintrc.json ├── .firebaserc ├── .gitignore ├── .prettierrc ├── LICENSE ├── README.md ├── firebase.json ├── now.json ├── package.json ├── public ├── banner.jpg ├── favicon.ico ├── index.html └── manifest.json ├── src ├── Assets │ ├── Animations │ │ ├── connecting.json │ │ ├── index.js │ │ ├── no-connection.json │ │ ├── on-lose.json │ │ └── on-win.json │ ├── Audio │ │ ├── data.json │ │ └── index.js │ ├── Images │ │ ├── background-ar.jpg │ │ ├── background.jpg │ │ ├── index.js │ │ └── logo.png │ ├── authors.json │ └── stylesheets │ │ ├── Account.scss │ │ ├── Landing.scss │ │ ├── Leaderboard.scss │ │ ├── Player.scss │ │ ├── PrivacyPolicy.scss │ │ ├── Signup.scss │ │ └── index.scss ├── Components │ ├── About.js │ ├── Account │ │ ├── AccountRow.js │ │ └── index.js │ ├── AfterPlay.js │ ├── FAB.js │ ├── InputDialog.js │ ├── Login.js │ └── Signup.js ├── Containers │ ├── Landing.js │ ├── Leaderboard.js │ ├── MonitorConnection.js │ ├── Player.js │ └── PrivacyPolicy.js ├── Firebase.js ├── Helpers.js ├── Navigation.js ├── Theme.js ├── i18n │ ├── ar.json │ ├── en.json │ └── index.js ├── index.js └── serviceWorker.js └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | trim_trailing_spaces = true 8 | insert_final_newline = true 9 | 10 | # trailing spaces in markdown indicate word wrap 11 | [*.md] 12 | trim_trailing_spaces = false 13 | max_line_length = 80 -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | REACT_APP_API_KEY= 2 | REACT_APP_AUTH_DOMAIN= 3 | REACT_APP_DATABASE_URL= 4 | REACT_APP_PROJECT_ID= 5 | REACT_APP_STORAGE_BUCKET= 6 | REACT_APP_MESSAGING_SENDER_ID= 7 | REACT_APP_APP_ID= -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint", 3 | "env": { 4 | "browser": true 5 | }, 6 | "plugins": ["react", "prettier"], 7 | "extends": [ 8 | "react-app", 9 | "eslint:recommended", 10 | "plugin:react/recommended", 11 | "plugin:prettier/recommended" 12 | ], 13 | "rules": { 14 | "prettier/prettier": "error" 15 | }, 16 | "globals": { 17 | "require": true 18 | } 19 | } -------------------------------------------------------------------------------- /.firebaserc: -------------------------------------------------------------------------------- 1 | { 2 | "projects": { 3 | "default": "learn-quran-remastered" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | 25 | /package-lock.json 26 | /.firebase 27 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all", 4 | "jsxBracketSameLine": true 5 | } 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Learn Quran Web 2 | This repository contains [the website for Learn Quran](https://learn-quran.now.sh). Please refer to the [learn-quran/native](https://github.com/learn-quran/native) respository for the best experience on mobile devices, available [Android](https://play.google.com/store/apps/details?id=com.shbool.learnquran) only, because I can't afford to pay for Apple's Developer Program 😅. 3 | 4 | *[To know more about the platform itself](https://github.com/learn-quran/learn-quran).* 5 | 6 | ## Stack 📚 7 | - **[React](https://reactjs.org)** 8 | - **[Firebase](https://firebase.google.com)** 9 | - **[Material UI](https://material-ui.com)** 10 | - **[Sass](https://github.com/sass)** 11 | 12 | ## Contributing 🤝 13 | Contributions, issues and feature requests are welcome!
14 | Take a look at the "Running Locally" section 👇 to get started. 15 | 16 | ## Running Locally 🖥 17 | 1. Follow steps 1 and 2 from [Google's Tutorial](https://firebase.google.com/docs/web/setup). 18 | 2. Set your Firebase config accordingly in the `.env` file. 19 | - If you don't know how to get your Firebase project config, [see this](https://support.google.com/firebase/answer/7015592). 20 | - If you'd like to know more about why all the variables are structured like this `REACT_APP_`, check out [this docuemnt by Facebook](https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables). 21 | 3. Download all the dependencies using by running either `$ npm install` or `$ yarn`. 22 | 4. Run the development server on `localhost:3000` by excuting either `$ npm run start` or `$ yarn start`. 23 | 24 | ## Show your support 🥰 25 | Give this project a ⭐️ if you like it! 26 | 27 | ## LICENSE 📝 28 | This project is Licensed under the [GNU General Public License v3.0](https://choosealicense.com/licenses/gpl-3.0/). 29 | -------------------------------------------------------------------------------- /firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "hosting": { 3 | "public": "build", 4 | "ignore": [ 5 | "firebase.json", 6 | "**/.*", 7 | "**/node_modules/**" 8 | ], 9 | "rewrites": [ 10 | { 11 | "source": "**", 12 | "destination": "/index.html" 13 | } 14 | ], 15 | "headers": [ 16 | {"source": "/service-worker.js", "headers": [{"key": "Cache-Control", "value": "no-cache"}]} 17 | ], 18 | "redirects": [ 19 | { 20 | "source": "/**", 21 | "destination": "https://learn-quran.now.sh", 22 | "type": 301 23 | } 24 | ] 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /now.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "learn-quran", 3 | "version": 2, 4 | "build": { 5 | "env": { 6 | "REACT_APP_API_KEY": "@api_key", 7 | "REACT_APP_AUTH_DOMAIN": "@auth_domain", 8 | "REACT_APP_DATABASE_URL": "@database_url", 9 | "REACT_APP_PROJECT_ID": "@project_id", 10 | "REACT_APP_STORAGE_BUCKET": "@storage_bucket", 11 | "REACT_APP_MESSAGING_SENDER_ID": "@messaging_sender_id", 12 | "REACT_APP_APP_ID": "@app_id" 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "learn-quran", 3 | "version": "0.1.0", 4 | "author": "Mohammad Shbool <@mohshbool> (https://github.com/mohshbool)", 5 | "homepage": "https://learn-quran-remastered.now.sh", 6 | "license": "GPL-3.0", 7 | "scripts": { 8 | "start": "react-scripts start", 9 | "build": "GENERATE_SOURCEMAP=false react-scripts build", 10 | "test": "react-scripts test", 11 | "eject": "react-scripts eject", 12 | "deploy": "yarn build && firebase deploy" 13 | }, 14 | "dependencies": { 15 | "@material-ui/core": "^4.0.2", 16 | "@material-ui/icons": "^4.2.1", 17 | "firebase": "^6.0.4", 18 | "formik": "^1.5.7", 19 | "i18next": "^15.1.3", 20 | "jss": "10.0.0-alpha.16", 21 | "jss-rtl": "^0.2.3", 22 | "moment": "^2.24.0", 23 | "node-sass": "^4.12.0", 24 | "prop-types": "^15.7.2", 25 | "react": "^16.8.6", 26 | "react-audio-player": "^0.11.1", 27 | "react-dom": "^16.8.6", 28 | "react-i18next": "^10.10.0", 29 | "react-lottie": "^1.2.3", 30 | "react-router-dom": "^5.0.0", 31 | "react-scripts": "3.0.1", 32 | "react-spinners": "^0.5.4", 33 | "react-toastify": "^5.1.1", 34 | "yup": "^0.27.0" 35 | }, 36 | "eslintConfig": { 37 | "extends": "react-app" 38 | }, 39 | "browserslist": { 40 | "production": [ 41 | ">0.2%", 42 | "not dead", 43 | "not op_mini all" 44 | ], 45 | "development": [ 46 | "last 1 chrome version", 47 | "last 1 firefox version", 48 | "last 1 safari version" 49 | ] 50 | }, 51 | "devDependencies": { 52 | "eslint-config-prettier": "^4.3.0", 53 | "eslint-plugin-prettier": "^3.1.0", 54 | "prettier": "^1.17.1", 55 | "react-hot-loader": "^4.12.8" 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /public/banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learn-quran/web/274f84e7212e90b9ee18406b78b4cc0cb1a2d8c6/public/banner.jpg -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learn-quran/web/274f84e7212e90b9ee18406b78b4cc0cb1a2d8c6/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | Learn Quran 17 | 18 | 19 | 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Learn Quran", 3 | "name": "Learn Quran", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /src/Assets/Animations/connecting.json: -------------------------------------------------------------------------------- 1 | {"v":"4.6.3","fr":30,"ip":0,"op":61,"w":800,"h":600,"nm":"wifi wiper 2","ddd":0,"assets":[{"id":"comp_41","layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Dial","ks":{"o":{"a":0,"k":100},"r":{"a":1,"k":[{"i":{"x":[0.12],"y":[1]},"o":{"x":[0.88],"y":[0]},"n":["0p12_1_0p88_0"],"t":0,"s":[3],"e":[-71]},{"i":{"x":[0.12],"y":[1]},"o":{"x":[0.88],"y":[0]},"n":["0p12_1_0p88_0"],"t":30,"s":[-71],"e":[3]},{"t":60}]},"p":{"a":0,"k":[400.863,351.029,0]},"a":{"a":0,"k":[2.863,49.029,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"shapes":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[83.006,-69.165],[2.863,48.529]],"c":false}},"nm":"Path 1","mn":"ADBE Vector Shape - Group"},{"ty":"tm","s":{"a":0,"k":0,"ix":1},"e":{"a":0,"k":74,"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim"},{"ty":"st","c":{"a":0,"k":[0.9294118,0.9294118,0.9294118,1]},"o":{"a":0,"k":100},"w":{"a":0,"k":10},"lc":2,"lj":1,"ml":10,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke"}],"ip":0,"op":61,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":3,"ty":4,"nm":"bars - Group 2","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[400.5,266,0]},"a":{"a":0,"k":[400,223.26,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"shapes":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-27.15,0],[-20.79,-14.34]],"o":[[20.79,-14.34],[27.15,0],[0,0]],"v":[[326.86,203.73],[400,181],[473.14,203.73]],"c":false}},"nm":"Path 1","mn":"ADBE Vector Shape - Group"},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.13],"y":[1]},"o":{"x":[0.87],"y":[0]},"n":["0p13_1_0p87_0"],"t":0,"s":[100],"e":[0]},{"i":{"x":[0.11],"y":[0.11]},"o":{"x":[0.87],"y":[0.87]},"n":["0p11_0p11_0p87_0p87"],"t":30,"s":[0],"e":[0]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.89],"y":[0]},"n":["0p833_1_0p89_0"],"t":45,"s":[0],"e":[100]},{"t":60}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.13],"y":[1]},"o":{"x":[0.89],"y":[0]},"n":["0p13_1_0p89_0"],"t":15,"s":[100],"e":[0]},{"i":{"x":[0.13],"y":[1]},"o":{"x":[0.87],"y":[0]},"n":["0p13_1_0p87_0"],"t":30,"s":[0],"e":[100]},{"t":60}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim"},{"ty":"st","c":{"a":0,"k":[0.9294118,0.9294118,0.9294118,1]},"o":{"a":0,"k":100},"w":{"a":0,"k":16},"lc":1,"lj":1,"ml":10,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke"}],"ip":0,"op":61,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":4,"ty":4,"nm":"bars - Group 3","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[400.5,266,0]},"a":{"a":0,"k":[400,223.26,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"shapes":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-21.9,0],[-16.76,-11.56]],"o":[[16.76,-11.56],[21.9,0],[0,0]],"v":[[341.03,224.33],[400,206],[458.97,224.33]],"c":false}},"nm":"Path 1","mn":"ADBE Vector Shape - Group"},{"ty":"st","c":{"a":0,"k":[0.9294118,0.9294118,0.9294118,1]},"o":{"a":0,"k":100},"w":{"a":0,"k":16},"lc":1,"lj":1,"ml":10,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke"},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.13],"y":[1]},"o":{"x":[0.87],"y":[0]},"n":["0p13_1_0p87_0"],"t":0,"s":[100],"e":[0]},{"i":{"x":[0.11],"y":[0.11]},"o":{"x":[0.87],"y":[0.87]},"n":["0p11_0p11_0p87_0p87"],"t":30,"s":[0],"e":[0]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.89],"y":[0]},"n":["0p833_1_0p89_0"],"t":45,"s":[0],"e":[100]},{"t":60}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.13],"y":[1]},"o":{"x":[0.89],"y":[0]},"n":["0p13_1_0p89_0"],"t":15,"s":[100],"e":[0]},{"i":{"x":[0.13],"y":[1]},"o":{"x":[0.87],"y":[0]},"n":["0p13_1_0p87_0"],"t":30,"s":[0],"e":[100]},{"t":60}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":3,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim"}],"ip":0,"op":61,"st":1,"bm":0,"sr":1},{"ddd":0,"ind":5,"ty":4,"nm":"bars - Group 4","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[400.5,266,0]},"a":{"a":0,"k":[400,223.26,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"shapes":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-16.64,0],[-12.73,-8.78]],"o":[[12.73,-8.78],[16.64,0],[0,0]],"v":[[355.21,244.92],[400,231],[444.79,244.92]],"c":false}},"nm":"Path 1","mn":"ADBE Vector Shape - Group"},{"ty":"st","c":{"a":0,"k":[0.9294118,0.9294118,0.9294118,1]},"o":{"a":0,"k":100},"w":{"a":0,"k":16},"lc":1,"lj":1,"ml":10,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke"},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.13],"y":[1]},"o":{"x":[0.87],"y":[0]},"n":["0p13_1_0p87_0"],"t":0,"s":[100],"e":[0]},{"i":{"x":[0.11],"y":[0.11]},"o":{"x":[0.87],"y":[0.87]},"n":["0p11_0p11_0p87_0p87"],"t":30,"s":[0],"e":[0]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.89],"y":[0]},"n":["0p833_1_0p89_0"],"t":45,"s":[0],"e":[100]},{"t":60}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.13],"y":[1]},"o":{"x":[0.89],"y":[0]},"n":["0p13_1_0p89_0"],"t":15,"s":[100],"e":[0]},{"i":{"x":[0.13],"y":[1]},"o":{"x":[0.87],"y":[0]},"n":["0p13_1_0p87_0"],"t":30,"s":[0],"e":[100]},{"t":60}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":3,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim"}],"ip":0,"op":61,"st":2,"bm":0,"sr":1},{"ddd":0,"ind":6,"ty":4,"nm":"bars - Group 5","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[400.5,266,0]},"a":{"a":0,"k":[400,223.26,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"shapes":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-11.37,0],[-8.7,-6.01]],"o":[[8.7,-6.01],[11.37,0],[0,0]],"v":[[369.38,265.52],[400,256],[430.62,265.52]],"c":false}},"nm":"Path 1","mn":"ADBE Vector Shape - Group"},{"ty":"st","c":{"a":0,"k":[0.9294118,0.9294118,0.9294118,1]},"o":{"a":0,"k":100},"w":{"a":0,"k":16},"lc":1,"lj":1,"ml":10,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke"},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.13],"y":[1]},"o":{"x":[0.87],"y":[0]},"n":["0p13_1_0p87_0"],"t":0,"s":[100],"e":[0]},{"i":{"x":[0.11],"y":[0.11]},"o":{"x":[0.87],"y":[0.87]},"n":["0p11_0p11_0p87_0p87"],"t":30,"s":[0],"e":[0]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.89],"y":[0]},"n":["0p833_1_0p89_0"],"t":45,"s":[0],"e":[100]},{"t":60}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.13],"y":[1]},"o":{"x":[0.89],"y":[0]},"n":["0p13_1_0p89_0"],"t":15,"s":[100],"e":[0]},{"i":{"x":[0.13],"y":[1]},"o":{"x":[0.87],"y":[0]},"n":["0p13_1_0p87_0"],"t":30,"s":[0],"e":[100]},{"t":60}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":3,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim"}],"ip":0,"op":61,"st":3,"bm":0,"sr":1},{"ddd":0,"ind":7,"ty":4,"nm":"center","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[400,300,0]},"a":{"a":0,"k":[400,300,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,9.389],[9.389,0],[0,-9.389],[-9.389,0]],"o":[[0,-9.389],[-9.389,0],[0,9.389],[9.389,0]],"v":[[17,0],[0,-17],[-17,0],[0,17]],"c":true}},"nm":"Path 1","mn":"ADBE Vector Shape - Group"},{"ty":"fl","c":{"a":0,"k":[0.9294118,0.9294118,0.9294118,1]},"o":{"a":0,"k":100},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"},{"ty":"tr","p":{"a":0,"k":[400,350],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 6","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group"}],"ip":0,"op":61,"st":0,"bm":0,"sr":1}]}],"layers":[{"ddd":0,"ind":1,"ty":0,"nm":"wifi wiper","refId":"comp_41","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[400,300,0]},"a":{"a":0,"k":[400,300,0]},"s":{"a":0,"k":[195,195,100]}},"ao":0,"w":800,"h":600,"ip":0,"op":61,"st":0,"bm":0,"sr":1}]} -------------------------------------------------------------------------------- /src/Assets/Animations/index.js: -------------------------------------------------------------------------------- 1 | import * as onWin from './on-win.json'; 2 | import * as onLose from './on-lose.json'; 3 | import * as connecting from './connecting.json'; 4 | import * as noConnection from './no-connection.json'; 5 | 6 | export { onWin, onLose, connecting, noConnection }; 7 | -------------------------------------------------------------------------------- /src/Assets/Animations/no-connection.json: -------------------------------------------------------------------------------- 1 | {"v":"5.1.1","fr":74,"ip":0,"op":193,"w":141,"h":112,"nm":"Comp 1","ddd":0,"assets":[],"fonts":{"list":[{"fName":"Lato-Bold","fFamily":"Lato","fStyle":"Bold","ascent":74.2996215820313}]},"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Layer 2/error2 Outlines","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[81.75,74,0],"ix":2},"a":{"a":0,"k":[2.5,40,0],"ix":1},"s":{"a":0,"k":[38.062,46.611,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[-1.145,0],[0,-1.144]],"o":[[0,0],[0,0],[0,-1.144],[1.145,0],[0,0]],"v":[[2.073,39.624],[-2.073,39.624],[-2.073,-37.553],[0,-39.624],[2.073,-37.553]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0.478,0.533,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[2.323,39.875],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":194,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":5,"nm":"Network Error","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[76.25,42,0],"ix":2},"a":{"a":0,"k":[46.5,-4,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":147,"s":[0,0,100],"e":[105,105,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":152,"s":[105,105,100],"e":[100,100,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":155,"s":[100,100,100],"e":[105,105,100]},{"t":157}],"ix":6}},"ao":0,"t":{"d":{"k":[{"s":{"s":13,"f":"Lato-Bold","t":"Network Error","j":0,"tr":0,"lh":15.6,"ls":0,"fc":[0.96,0.12,0.12]},"t":0}]},"p":{},"m":{"g":1,"a":{"a":0,"k":[0,0],"ix":2}},"a":[]},"ip":147,"op":194,"st":147,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Layer 1/error2 Outlines","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":81,"s":[0],"e":[-26]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":94,"s":[-26],"e":[26]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p833_1_0p333_0"],"t":106,"s":[26],"e":[319]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"n":["0p833_1_0p167_0"],"t":124,"s":[319],"e":[414]},{"t":147}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":107,"s":[82.25,47,0],"e":[96,78.5,0],"to":[2.29166674613953,5.25,0],"ti":[-4.375,-4.41666650772095,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":124,"s":[96,78.5,0],"e":[108.5,73.5,0],"to":[4.375,4.41666650772095,0],"ti":[-3.625,-1.41666662693024,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":137,"s":[108.5,73.5,0],"e":[117.75,87,0],"to":[3.625,1.41666662693024,0],"ti":[-1.54166662693024,-2.25,0]},{"t":147}],"ix":2},"a":{"a":0,"k":[29,25.5,0],"ix":1},"s":{"a":0,"k":[35.293,35.293,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[1.037,-8.539],[0.54,8.538],[-0.541,8.538],[-1.038,-8.539]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0.23,-0.237],[-0.009,-0.329],[0,0],[-0.669,0],[0,0],[-0.02,0.669],[0,0],[0.23,0.236],[0.33,0],[0,0]],"o":[[-0.23,0.236],[0,0],[0.02,0.668],[0,0],[0.669,0],[0,0],[0.01,-0.329],[-0.23,-0.237],[0,0],[-0.33,0]],"v":[[-2.317,-9.781],[-2.664,-8.892],[-2.145,8.962],[-0.917,10.154],[0.916,10.154],[2.144,8.962],[2.663,-8.892],[2.316,-9.781],[1.436,-10.154],[-1.436,-10.154]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[28.703,26.116],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":4,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[1.1,0],[0,0],[0,0.946],[-0.877,0],[0,-0.992]],"o":[[0,0],[-0.854,0],[0,-0.947],[0.919,0],[0,0.741]],"v":[[0,1.607],[-0.04,1.607],[-1.49,0.001],[0,-1.607],[1.49,0.001]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[1.828,0],[0,-1.837],[-1.748,0],[0,0],[0,1.867]],"o":[[-1.771,0],[0,1.836],[0,0],[1.799,0],[0,-1.898]],"v":[[0,-3.222],[-3.105,0.001],[-0.04,3.222],[0,3.222],[3.105,0.001]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0.478,0.533,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[28.703,40.443],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":4,"cix":2,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.034,-0.061],[0.017,0],[0,0],[0.034,0.06],[-0.009,0.015],[0,0],[-0.069,0],[-0.008,-0.014],[0,0]],"o":[[-0.035,0.06],[0,0],[-0.017,0],[-0.035,-0.061],[0,0],[0.009,-0.014],[0.07,0],[0,0],[0.009,0.015]],"v":[[20.035,17.319],[19.931,17.379],[-19.93,17.379],[-20.034,17.319],[-20.034,17.199],[-0.104,-17.319],[0,-17.378],[0.104,-17.319],[20.035,17.199]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0.628,0],[0.314,-0.544],[0,0],[-0.314,-0.544],[-0.628,0],[0,0],[-0.313,0.543],[0.314,0.543],[0,0]],"o":[[-0.627,0],[0,0],[-0.314,0.543],[0.314,0.543],[0,0],[0.626,0],[0.314,-0.544],[0,0],[-0.314,-0.543]],"v":[[0,-18.994],[-1.503,-18.125],[-21.433,16.391],[-21.433,18.127],[-19.93,18.994],[19.931,18.994],[21.433,18.127],[21.433,16.391],[1.503,-18.126]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0.478,0.533,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[28.702,26.987],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 3","np":4,"cix":2,"ix":3,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-0.386,-0.224],[-0.223,0.387],[0,0],[-0.07,0],[-0.008,-0.015],[0,0],[-0.28,0],[-0.127,0.073],[0.222,0.387],[0,0],[0.628,0],[0.314,-0.544],[0,0]],"o":[[0.386,0.223],[0,0],[0.008,-0.014],[0.07,0],[0,0],[0.15,0.26],[0.136,0],[0.387,-0.223],[0,0],[-0.314,-0.544],[-0.627,0],[0,0],[-0.224,0.387]],"v":[[-15.91,13.605],[-14.807,13.309],[-0.105,-12.152],[-0.001,-12.212],[0.104,-12.152],[14.807,13.312],[15.508,13.716],[15.911,13.608],[16.206,12.504],[1.503,-12.959],[-0.001,-13.828],[-1.504,-12.959],[-16.204,12.501]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0.478,0.533,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[28.703,14.078],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 4","np":2,"cix":2,"ix":4,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.313,0.543],[0,0],[0.387,-0.222],[-0.224,-0.387],[0,0],[0.034,-0.06],[0.018,0],[0,0],[0.035,0.06],[-0.009,0.014],[0,0],[0.386,0.223],[0.223,-0.386],[0,0],[-0.313,-0.543],[-0.628,0],[0,0],[-0.313,0.544]],"o":[[0,0],[-0.223,-0.386],[-0.386,0.224],[0,0],[0.007,0.014],[-0.036,0.06],[0,0],[-0.017,0],[-0.035,-0.06],[0,0],[0.224,-0.386],[-0.386,-0.223],[0,0],[-0.313,0.543],[0.314,0.544],[0,0],[0.628,0],[0.313,-0.543]],"v":[[28.139,7.882],[17.833,-9.967],[16.73,-10.264],[16.436,-9.16],[26.742,8.689],[26.742,8.809],[26.636,8.87],[-26.637,8.87],[-26.74,8.809],[-26.74,8.689],[-16.441,-9.148],[-16.736,-10.251],[-17.839,-9.956],[-28.139,7.882],[-28.139,9.617],[-26.635,10.486],[26.636,10.486],[28.139,9.617]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0.478,0.533,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[28.703,39.368],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 5","np":2,"cix":2,"ix":5,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0.007,-0.236],[0,0],[0.228,0],[0,0],[0.006,0.228],[0,0],[-0.237,0]],"o":[[0.236,0],[0,0],[-0.007,0.228],[0,0],[-0.228,0],[0,0],[-0.007,-0.236],[0,0]],"v":[[1.436,-9.346],[1.856,-8.914],[1.337,8.938],[0.916,9.346],[-0.917,9.346],[-1.337,8.938],[-1.856,-8.914],[-1.436,-9.346]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0.478,0.533,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[28.703,26.116],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 6","np":2,"cix":2,"ix":6,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-1.325,0],[0,-1.402],[1.402,0],[0,0],[0,1.362]],"o":[[1.402,0],[0,1.362],[0,0],[-1.323,0],[0,-1.402]],"v":[[0,-2.415],[2.298,0.001],[0,2.415],[-0.04,2.415],[-2.298,0.001]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[28.703,40.443],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 7","np":2,"cix":2,"ix":7,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.357,0.619],[0,0],[0.357,-0.618],[0,0],[0,0],[0,0]],"o":[[0,0],[-0.358,-0.618],[0,0],[0,0],[0,0],[0.714,-0.001]],"v":[[11.125,16.871],[-8.805,-17.646],[-10.413,-17.646],[-11.482,-15.792],[8.241,18.264],[10.321,18.264]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0.478,0.533,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[38.312,26.911],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 8","np":2,"cix":2,"ix":8,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-0.357,0.619],[0,0],[-0.357,-0.618],[0,0],[0.714,0],[0,0]],"o":[[0,0],[0.357,-0.618],[0,0],[0.357,0.619],[0,0],[-0.715,0]],"v":[[-20.734,16.871],[-0.804,-17.646],[0.803,-17.646],[20.734,16.871],[19.93,18.264],[-19.93,18.264]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0.478,0.533,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[28.703,26.91],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 9","np":2,"cix":2,"ix":9,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.357,0.619],[0,0],[0.357,-0.618],[0,0],[0,0],[0,0]],"o":[[0,0],[-0.358,-0.618],[0,0],[0,0],[0,0],[0.714,0]],"v":[[14.426,22.678],[-12.21,-23.453],[-13.818,-23.453],[-14.783,-21.778],[11.689,24.071],[13.622,24.071]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[41.716,24.975],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 10","np":2,"cix":2,"ix":10,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-0.357,0.619],[0,0],[-0.357,-0.618],[0,0],[0.714,0],[0,0]],"o":[[0,0],[0.357,-0.618],[0,0],[0.357,0.619],[0,0],[-0.715,0]],"v":[[-27.44,22.678],[-0.804,-23.453],[0.803,-23.453],[27.44,22.678],[26.636,24.071],[-26.636,24.071]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[28.703,24.975],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 11","np":2,"cix":2,"ix":11,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":194,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Layer 5/erro Outlines","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[94.75,85.5,0],"ix":2},"a":{"a":0,"k":[12,6.5,0],"ix":1},"s":{"a":0,"k":[127.544,127.544,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[5.253,1.788],[4.333,1.723],[2.872,1.617],[-5.253,1.027],[0.05,-1.788],[5.077,1.378]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.773000021542,0.764999988032,0.791999966491,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[16.665,5.949],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[5.253,3.732],[4.333,3.667],[2.872,3.561],[-5.253,2.971],[-3.313,-2.133],[-3.004,-2.949],[-2.704,-3.732],[0.05,0.156],[5.077,3.322]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.532999973671,0.525,0.560999971278,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[16.665,4.005],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"cix":2,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[7.549,1.607],[7.374,1.195],[2.346,-1.971],[-0.408,-5.859],[-0.426,-5.88],[-7.803,-3.622],[-8.195,-1.245],[-8.475,0.452],[-9.146,4.503],[-9.262,5.193],[-9.376,5.88],[9.376,5.88]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.670999983245,0.666999966491,0.689999988032,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[14.369,6.131],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 3","np":2,"cix":2,"ix":3,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[3.115,-3.643],[-1.07,-1.469],[-3.115,3.643],[2.984,3.643]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.470999983245,0.46699999641,0.497999991623,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[3.364,8.369],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 4","np":2,"cix":2,"ix":4,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":194,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"Layer 4/erro Outlines","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":0,"s":[0],"e":[1800]},{"t":81}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":0,"s":[-14.5,84,0],"e":[73.75,83.25,0],"to":[14.7083330154419,-0.125,0],"ti":[-14.7083330154419,0.125,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"n":"0p667_0p667_0p333_0p333","t":81,"s":[73.75,83.25,0],"e":[73.75,83.25,0],"to":[0,0,0],"ti":[0,0,0]},{"t":92}],"ix":2},"a":{"a":0,"k":[13.5,13.5,0],"ix":1},"s":{"a":0,"k":[68.362,68.362,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[7.149,0],[0,-7.152],[-7.152,0],[-2.224,1.795],[0,0],[2.516,0],[0,6.02],[-6.023,0],[0,-6.024],[1.701,-1.925],[0,0],[0,3.328]],"o":[[-7.152,0],[0,7.149],[3.078,0],[0,0],[-1.849,1.433],[-6.023,0],[0,-6.024],[6.021,0],[0,2.765],[0,0],[2.067,-2.295],[0,-7.152]],"v":[[0.002,-12.947],[-12.947,0.001],[0.002,12.947],[8.13,10.077],[6.687,8.633],[0.002,10.924],[-10.924,0.001],[0.002,-10.921],[10.923,0.001],[8.189,7.221],[9.624,8.658],[12.947,0.001]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.992156862745,0.647058823529,0.105882352941,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[13.196,13.196],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.427,0.022],[0.022,-0.426],[1.04,-0.906],[1.785,0.153],[0.036,-0.426],[-0.427,-0.036],[-0.28,0],[-1.214,1.055],[-0.114,2.16]],"o":[[-0.437,-0.023],[-0.092,1.731],[-1.074,0.933],[-0.438,-0.049],[-0.037,0.427],[0.291,0.027],[1.851,0],[1.365,-1.188],[0.023,-0.426]],"v":[[3.519,-3.755],[2.705,-3.023],[0.975,1.007],[-3.398,2.197],[-4.236,2.902],[-3.531,3.74],[-2.675,3.777],[1.99,2.176],[4.25,-2.941]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.694117647059,0.447058823529,0.094117647059,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[17.519,17.092],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"cix":2,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":194,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"Layer 6/erro Outlines","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":0,"s":[0],"e":[1800]},{"t":81}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":0,"s":[-42.75,84.5,0],"e":[51.5,83.75,0],"to":[15.7083330154419,-0.125,0],"ti":[-15.75,0.75000107288361,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":81,"s":[51.5,83.75,0],"e":[51.75,80,0],"to":[3.14999581974007e-10,-1.50000012411056e-11,0],"ti":[-0.04166666790843,-0.04166666790843,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":88,"s":[51.75,80,0],"e":[51.75,84,0],"to":[0.04166666790843,0.04166666790843,0],"ti":[0,-0.66666668653488,0]},{"t":98}],"ix":2},"a":{"a":0,"k":[13.5,13.5,0],"ix":1},"s":{"a":0,"k":[68.362,68.362,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[1.073,0.933],[0.091,1.73],[0.412,-0.024],[-0.023,-0.427],[-1.364,-1.188],[-1.851,0],[-0.291,0.027],[0.038,0.426],[0.428,-0.048]],"o":[[-1.04,-0.905],[-0.022,-0.427],[-0.428,0.023],[0.113,2.159],[1.215,1.056],[0.28,0],[0.427,-0.036],[-0.037,-0.426],[-1.788,0.154]],"v":[[-0.974,1.007],[-2.703,-3.021],[-3.517,-3.754],[-4.25,-2.939],[-1.991,2.176],[2.675,3.778],[3.531,3.74],[4.235,2.903],[3.398,2.198]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.694117647059,0.447533760819,0.095271046956,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[8.931,17.091],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[7.149,0],[2.261,-1.926],[0,0],[-2.64,0],[0,-6.024],[6.023,0],[0,6.02],[-1.568,1.89],[0,0],[0,-3.209],[-7.149,0],[0,7.149]],"o":[[-3.2,0],[0,0],[1.891,-1.562],[6.023,0],[0,6.02],[-6.023,0],[0,-2.645],[0,0],[-1.932,2.261],[0,7.149],[7.149,0],[0,-7.152]],"v":[[0,-12.947],[-8.392,-9.859],[-6.952,-8.419],[0,-10.921],[10.922,0.001],[0,10.924],[-10.922,0.001],[-8.409,-6.962],[-9.849,-8.402],[-12.948,0.001],[0,12.947],[12.948,0.001]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.992156862745,0.647751393038,0.105051900826,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[13.198,13.196],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"cix":2,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":194,"st":0,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"Layer 2/erro Outlines","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":81,"s":[0],"e":[7]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":89,"s":[7],"e":[0]},{"t":98}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":0,"s":[-28,74.25,0],"e":[63.693,73.5,0],"to":[13.6936912536621,0,0],"ti":[-18.0084609985352,0,0]},{"t":81}],"ix":2},"a":{"a":0,"k":[22,14,0],"ix":1},"s":{"a":0,"k":[68.362,68.362,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0.454],[-0.454,0],[0,0],[0,-0.455],[0.454,0],[0,0]],"o":[[0,-0.454],[0,0],[0.454,0],[0,0.454],[0,0],[-0.454,0]],"v":[[-19.628,-10.889],[-18.805,-11.713],[-10.779,-11.713],[-9.956,-10.889],[-10.779,-10.065],[-18.805,-10.065]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[-0.023,-0.044],[0,0],[-0.442,0.221],[0.221,0.442],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0.648,-0.875],[1.12,0],[0,-0.494],[-0.495,0],[-0.794,1.073],[0.04,0.131],[0.393,0],[0,0],[0.11,-0.384],[0,0],[0,0],[0,0],[0,0],[0,1.441],[1.442,0],[0,0],[0,-1.443],[-1.442,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.484,-0.097],[-0.059,0],[-0.084,0.425],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0.016,0.049],[0,0],[0.22,0.443],[0.442,-0.221],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0.138,0.799],[-0.443,0.599],[-0.495,0],[0,0.494],[1.702,0],[1.5,-2.026],[-0.115,-0.376],[0,0],[-0.399,0],[0,0],[0,0],[0,0],[0,0],[1.441,0],[0,-1.442],[0,0],[-1.442,0],[0,1.441],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.097,0.485],[0.059,0.012],[0.418,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[10.684,3.214],[11.861,7.136],[11.917,7.278],[14.21,11.864],[15.411,12.265],[15.811,11.064],[13.553,6.548],[12.346,2.523],[11.833,0.807],[10.214,-4.59],[12.247,-11.713],[18.88,-11.713],[18.482,-8.663],[16.158,-7.772],[15.262,-6.877],[16.158,-5.982],[19.921,-7.598],[20.452,-12.871],[19.596,-13.505],[11.572,-13.505],[10.712,-12.856],[8.604,-5.481],[-12.971,-5.481],[-13.77,-8.276],[-10.781,-8.276],[-8.165,-10.89],[-10.781,-13.506],[-18.805,-13.506],[-21.421,-10.89],[-18.805,-8.276],[-15.633,-8.276],[-14.566,-4.548],[-15.548,0.357],[-15.898,2.114],[-17.962,12.435],[-17.262,13.488],[-17.085,13.506],[-16.208,12.786],[-14.145,2.467],[-13.792,0.712],[-12.911,-3.688],[8.615,-3.688],[10.165,1.481]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[0.992156862745,0.647058823529,0.105882352941,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[21.671,13.756],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":4,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":194,"st":0,"bm":0}],"markers":[],"chars":[{"ch":"N","size":13,"style":"Bold","w":75.6,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.6,0],[0,0],[0,0],[0,0],[0,0],[0.05,1.05],[0.1,1.067],[0,0],[-0.7,-0.333],[-1.067,0],[0,0],[0,0],[0,0],[0,0],[-0.05,-1.116],[-0.134,-1.166],[0,0],[0.3,0.284],[0.316,0.15],[0.4,0.05]],"o":[[0,0],[0,0],[0,0],[0,0],[0,-0.866],[-0.05,-1.05],[0,0],[0.666,0.867],[0.7,0.334],[0,0],[0,0],[0,0],[0,0],[0,0.967],[0.05,1.117],[0,0],[-0.367,-0.466],[-0.3,-0.283],[-0.317,-0.15],[-0.4,-0.05]],"v":[[14.35,-72.3],[7.3,-72.3],[7.3,0],[19.15,0],[19.15,-44.4],[19.075,-47.275],[18.85,-50.45],[56.65,-2.3],[58.7,-0.5],[61.35,0],[68.3,0],[68.3,-72.3],[56.45,-72.3],[56.45,-28.35],[56.525,-25.225],[56.8,-21.8],[18.85,-70.15],[17.85,-71.275],[16.925,-71.925],[15.85,-72.225]],"c":true},"ix":2},"nm":"N","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"N","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Lato"},{"ch":"e","size":13,"style":"Bold","w":53.45,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[3.05,-1.333],[2.116,-2.283],[1.133,-3.083],[0,-3.5],[-1.3,-3.416],[-2.267,-2.316],[-3.067,-1.183],[-3.567,0],[-1.917,0.266],[-1.85,0.65],[-1.7,1.084],[-1.367,1.6],[0,0],[0.366,0.2],[0.5,0],[0.816,-0.466],[1.083,-0.566],[1.45,-0.466],[2,0],[2.466,2.467],[0.366,5.267],[0,0],[-0.367,0.15],[-0.217,0.35],[-0.084,0.617],[0,0.934],[1.1,2.884],[1.966,1.984],[2.716,1.034],[3.233,0]],"o":[[-3.05,1.334],[-2.117,2.284],[-1.134,3.084],[0,4.5],[1.3,3.417],[2.266,2.317],[3.066,1.183],[1.8,0],[1.916,-0.267],[1.85,-0.65],[1.7,-1.083],[0,0],[-0.267,-0.366],[-0.367,-0.2],[-0.767,0],[-0.817,0.467],[-1.084,0.567],[-1.45,0.467],[-4.067,0],[-2.467,-2.466],[0,0],[0.566,0],[0.366,-0.15],[0.216,-0.35],[0.083,-0.616],[0,-3.7],[-1.1,-2.883],[-1.967,-1.983],[-2.717,-1.033],[-3.834,0]],"v":[[17.475,-50.1],[9.725,-44.675],[4.85,-36.625],[3.15,-26.75],[5.1,-14.875],[10.45,-6.275],[18.45,-1.025],[28.4,0.75],[33.975,0.35],[39.625,-1.025],[44.95,-3.625],[49.55,-7.65],[45.95,-12.15],[45,-13],[43.7,-13.3],[41.325,-12.6],[38.475,-11.05],[34.675,-9.5],[29.5,-8.8],[19.7,-12.5],[15.45,-24.1],[47.15,-24.1],[48.55,-24.325],[49.425,-25.075],[49.875,-26.525],[50,-28.85],[48.35,-38.725],[43.75,-46.025],[36.725,-50.55],[27.8,-52.1]],"c":true},"ix":2},"nm":"e","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[-1.367,-0.616],[-0.9,-1.066],[-0.434,-1.416],[0,-1.6],[0,0],[-2.034,2.034],[-3.6,0]],"o":[[1.366,0.617],[0.9,1.067],[0.433,1.417],[0,0],[0.566,-3.733],[2.033,-2.033],[1.833,0]],"v":[[32.85,-42.325],[36.25,-39.8],[38.25,-36.075],[38.9,-31.55],[15.7,-31.55],[19.6,-40.2],[28.05,-43.25]],"c":true},"ix":2},"nm":"e","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"e","np":5,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Lato"},{"ch":"t","size":13,"style":"Bold","w":38.7,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-2.334,0.766],[-1.8,1.5],[0,0],[0.233,0.184],[0.366,0],[0.3,-0.183],[0.383,-0.2],[0.516,-0.183],[0.766,0],[0.8,0.9],[0,1.6],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0.483,-0.366],[0.133,-0.666],[0,0],[0,0],[0,0],[-0.484,-0.433],[-0.667,0],[0,0],[0,0],[-2.4,-2.516],[-4.434,0]],"o":[[2.333,-0.766],[0,0],[-0.267,-0.366],[-0.234,-0.183],[-0.3,0],[-0.3,0.184],[-0.384,0.2],[-0.517,0.184],[-1.334,0],[-0.8,-0.9],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.734,0],[-0.484,0.367],[0,0],[0,0],[0,0],[0,0.867],[0.483,0.434],[0,0],[0,0],[0,4.434],[2.4,2.517],[2.5,0]],"v":[[30.7,-0.35],[36.9,-3.75],[33.2,-9.75],[32.45,-10.575],[31.55,-10.85],[30.65,-10.575],[29.625,-10],[28.275,-9.425],[26.35,-9.15],[23.15,-10.5],[21.95,-14.25],[21.95,-42.05],[35.45,-42.05],[35.45,-50.85],[21.95,-50.85],[21.95,-67],[15.55,-67],[13.725,-66.45],[12.8,-64.9],[10.2,-50.9],[1.95,-49.55],[1.95,-44.65],[2.675,-42.7],[4.4,-42.05],[9.6,-42.05],[9.6,-13.4],[13.2,-2.975],[23.45,0.8]],"c":true},"ix":2},"nm":"t","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"t","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Lato"},{"ch":"w","size":13,"style":"Bold","w":79.1,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[-0.467,1.467],[0,0],[-0.234,0.984],[-0.2,1],[-0.25,-0.983],[-0.3,-0.966],[0,0],[-1.067,0],[0,0],[0,0],[0,0],[0.633,-0.433],[0.166,-0.666],[0,0],[0.283,-1.433],[0.233,-1.433],[0.35,1.35],[0.433,1.434],[0,0],[0.6,0.434],[0.9,0],[0,0],[0.6,-0.433],[0.2,-0.666],[0,0],[0.416,-1.433],[0.366,-1.433],[0.25,1.434],[0.4,1.5],[0,0],[0.633,0.434],[0.933,0],[0,0]],"o":[[0,0],[1.333,0],[0,0],[0.3,-1],[0.233,-0.983],[0.166,0.967],[0.25,0.984],[0,0],[0.466,1.467],[0,0],[0,0],[0,0],[-0.834,0],[-0.634,0.434],[0,0],[-0.434,1.534],[-0.284,1.434],[-0.334,-1.366],[-0.35,-1.35],[0,0],[-0.2,-0.666],[-0.6,-0.433],[0,0],[-0.8,0],[-0.6,0.434],[0,0],[-0.467,1.5],[-0.417,1.434],[-0.234,-1.433],[-0.25,-1.433],[0,0],[-0.167,-0.666],[-0.634,-0.433],[0,0],[0,0]],"v":[[16.6,0],[26.05,0],[28.75,-2.2],[38.1,-31.75],[38.9,-34.725],[39.55,-37.7],[40.175,-34.775],[41,-31.85],[50.25,-2.2],[52.55,0],[62.5,0],[78.75,-51.3],[69.4,-51.3],[67.2,-50.65],[66,-49],[58.4,-21.6],[57.325,-17.15],[56.55,-12.85],[55.525,-16.925],[54.35,-21.1],[45.95,-49.1],[44.75,-50.75],[42.5,-51.4],[37.05,-51.4],[34.95,-50.75],[33.75,-49.1],[25.25,-21.6],[23.925,-17.2],[22.75,-12.9],[22.025,-17.2],[21.05,-21.6],[13.7,-49],[12.5,-50.65],[10.15,-51.3],[0.35,-51.3]],"c":true},"ix":2},"nm":"w","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"w","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Lato"},{"ch":"o","size":13,"style":"Bold","w":56.85,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[3.133,-1.233],[2.216,-2.266],[1.216,-3.266],[0,-4.033],[-1.217,-3.266],[-2.217,-2.3],[-3.134,-1.233],[-3.834,0],[-3.117,1.233],[-2.2,2.3],[-1.2,3.267],[0,4.067],[1.2,3.267],[2.2,2.267],[3.116,1.234],[3.833,0]],"o":[[-3.134,1.234],[-2.217,2.267],[-1.217,3.267],[0,4.067],[1.216,3.267],[2.216,2.3],[3.133,1.233],[3.833,0],[3.116,-1.233],[2.2,-2.3],[1.2,-3.266],[0,-4.033],[-1.2,-3.266],[-2.2,-2.266],[-3.117,-1.233],[-3.834,0]],"v":[[18.05,-50.25],[10.025,-45],[4.875,-36.7],[3.05,-25.75],[4.875,-14.75],[10.025,-6.4],[18.05,-1.1],[28.5,0.75],[38.925,-1.1],[46.9,-6.4],[52,-14.75],[53.8,-25.75],[52,-36.7],[46.9,-45],[38.925,-50.25],[28.5,-52.1]],"c":true},"ix":2},"nm":"o","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[2.066,2.884],[0,5.5],[-2.067,2.917],[-4.334,0],[-2.05,-2.9],[0,-5.533],[2.05,-2.866],[4.266,0]],"o":[[-2.067,-2.883],[0,-5.5],[2.066,-2.916],[4.266,0],[2.05,2.9],[0,5.534],[-2.05,2.867],[-4.334,0]],"v":[[18.9,-13.075],[15.8,-25.65],[18.9,-38.275],[28.5,-42.65],[37.975,-38.3],[41.05,-25.65],[37.975,-13.05],[28.5,-8.75]],"c":true},"ix":2},"nm":"o","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"o","np":5,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Lato"},{"ch":"r","size":13,"style":"Bold","w":40.85,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[-1.834,1.417],[-2.567,0],[-0.867,-0.233],[-0.5,0],[-0.334,0.25],[-0.1,0.6],[0,0],[2.533,0],[2.466,-1.833],[1.833,-3.166],[0,0],[0.5,0.467],[1.266,0],[0,0],[0,0]],"o":[[0,0],[1.266,-2.733],[1.833,-1.416],[1.433,0],[0.866,0.234],[0.566,0],[0.333,-0.25],[0,0],[-1.667,-1.166],[-3.067,0],[-2.467,1.834],[0,0],[-0.167,-1.133],[-0.5,-0.466],[0,0],[0,0],[0,0]],"v":[[18.95,0],[18.95,-31.95],[23.6,-38.175],[30.2,-40.3],[33.65,-39.95],[35.7,-39.6],[37.05,-39.975],[37.7,-41.25],[39.3,-50.5],[33,-52.25],[24.7,-49.5],[18.25,-42],[17.5,-48.2],[16.5,-50.6],[13.85,-51.3],[6.6,-51.3],[6.6,0]],"c":true},"ix":2},"nm":"r","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"r","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Lato"},{"ch":"k","size":13,"style":"Bold","w":55.15,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[-0.5,-0.233],[-0.5,-0.766],[0,0],[-0.667,-0.333],[-0.967,0],[0,0],[0,0],[0.533,0.667],[0.7,0.5],[-0.6,0.584],[-0.567,0.7],[0,0],[0,0],[0.633,-0.383],[0.566,-0.666],[0,0],[0.466,-0.233],[0.833,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[1,0],[0.5,0.234],[0,0],[0.533,0.8],[0.666,0.334],[0,0],[0,0],[-0.534,-0.766],[-0.534,-0.666],[0.7,-0.433],[0.6,-0.583],[0,0],[0,0],[-1.034,0],[-0.634,0.384],[0,0],[-0.534,0.634],[-0.467,0.234],[0,0],[0,0],[0,0]],"v":[[6.75,-74.3],[6.75,0],[19.1,0],[19.1,-23.5],[21.9,-23.5],[24.15,-23.15],[25.65,-21.65],[38.7,-2.2],[40.5,-0.5],[42.95,0],[54.1,0],[37,-24.9],[35.4,-27.05],[33.55,-28.8],[35.5,-30.325],[37.25,-32.25],[53.2,-51.3],[41.9,-51.3],[39.4,-50.725],[37.6,-49.15],[24.85,-33.4],[23.35,-32.1],[21.4,-31.75],[19.1,-31.75],[19.1,-74.3]],"c":true},"ix":2},"nm":"k","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"k","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Lato"},{"ch":" ","size":13,"style":"Bold","w":19.3,"data":{},"fFamily":"Lato"},{"ch":"E","size":13,"style":"Bold","w":57.25,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[7.3,-72.3],[7.3,0],[52.9,0],[52.9,-10.75],[20.85,-10.75],[20.85,-31.2],[46.1,-31.2],[46.1,-41.55],[20.85,-41.55],[20.85,-61.6],[52.9,-61.6],[52.9,-72.3]],"c":true},"ix":2},"nm":"E","mn":"ADBE Vector Shape - Group","hd":false}],"nm":"E","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}]},"fFamily":"Lato"}]} -------------------------------------------------------------------------------- /src/Assets/Animations/on-lose.json: -------------------------------------------------------------------------------- 1 | {"v":"5.1.18","fr":29.9700012207031,"ip":0,"op":60.0000024438501,"w":58,"h":58,"nm":"Comp 1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"empty Outlines","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[29,29,0],"ix":2},"a":{"a":0,"k":[29,29,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.55,0],[0,0],[0,0.55],[-0.55,0],[0,0],[0,-0.55]],"o":[[0,0],[-0.55,0],[0,-0.55],[0,0],[0.55,0],[0,0.55]],"v":[[8.5,1],[-8.5,1],[-9.5,0],[-8.5,-1],[8.5,-1],[9.5,0]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.328999986836,0.328999986836,0.277999997606,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":0,"s":[28.25,37],"e":[28.25,33],"to":[0,-0.66666668653488],"ti":[0,0.66666668653488]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":10,"s":[28.25,33],"e":[28.25,33],"to":[0,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":15,"s":[28.25,33],"e":[28.25,44],"to":[0,1.83333337306976],"ti":[0,-1.83333337306976]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":20,"s":[28.25,44],"e":[28.25,44],"to":[0,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":35,"s":[28.25,44],"e":[28.25,33],"to":[0,-1.83333337306976],"ti":[0,1.83333337306976]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":40,"s":[28.25,33],"e":[28.25,33],"to":[0,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":45,"s":[28.25,33],"e":[28.25,37],"to":[0,0.66666668653488],"ti":[0,-0.66666668653488]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":50,"s":[28.25,37],"e":[28.25,37],"to":[0,0],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":55,"s":[28.25,37],"e":[28.25,37],"to":[0,0],"ti":[0,0]},{"t":59.0000024031193}],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":0,"s":[100,100],"e":[69,69]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":10,"s":[69,69],"e":[69,69]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":15,"s":[69,69],"e":[69,69]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":35,"s":[69,69],"e":[69,69]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":45,"s":[69,69],"e":[69,69]},{"t":55.0000022401959}],"ix":3},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":0,"s":[0],"e":[-12]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":10,"s":[-12],"e":[-12]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":15,"s":[-12],"e":[1]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":20,"s":[1],"e":[1]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":35,"s":[1],"e":[13]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":40,"s":[13],"e":[13]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":45,"s":[13],"e":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":50,"s":[0],"e":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":55,"s":[0],"e":[19]},{"t":59.0000024031193}],"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-1.381],[1.381,0],[0,1.381],[-1.381,0]],"o":[[0,1.381],[-1.381,0],[0,-1.381],[1.381,0]],"v":[[2.5,0],[0,2.5],[-2.5,0],[0,-2.5]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.328999986836,0.328999986836,0.277999997606,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":0,"s":[37.75,24.5],"e":[32.75,18.5],"to":[-0.83333331346512,-1],"ti":[0.83333331346512,-1.33333337306976]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":10,"s":[32.75,18.5],"e":[32.317,19.859],"to":[-0.14039172232151,0.22462674975395],"ti":[0.14257775247097,-0.65421944856644]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":15,"s":[32.317,19.859],"e":[32.75,32.5],"to":[-0.7037313580513,3.22907829284668],"ti":[-1.66305983066559,-1.94023656845093]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":20,"s":[32.75,32.5],"e":[33.762,33.254],"to":[0.25078782439232,0.29258579015732],"ti":[-0.41581165790558,-0.21069806814194]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":25,"s":[33.762,33.254],"e":[44.75,32.5],"to":[2.90023159980774,1.46959137916565],"ti":[-1.74921214580536,1.74921214580536]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":30,"s":[44.75,32.5],"e":[45.34,31.443],"to":[0.2598968744278,-0.2598968744278],"ti":[-0.13797041773796,0.43620339035988]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":35,"s":[45.34,31.443],"e":[44.75,20.5],"to":[0.92376166582108,-2.92053866386414],"ti":[0,1.7401031255722]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":40,"s":[44.75,20.5],"e":[44.75,20.5],"to":[0,-2],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":45,"s":[44.75,20.5],"e":[37.75,24.5],"to":[0,0],"ti":[0,0]},{"t":50.0000020365418}],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":50,"s":[100],"e":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":51,"s":[100],"e":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":53,"s":[0],"e":[100]},{"t":54.0000021994651}],"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"cix":2,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-1.381],[1.381,0],[0,1.381],[-1.381,0]],"o":[[0,1.381],[-1.381,0],[0,-1.381],[1.381,0]],"v":[[2.5,0],[0,2.5],[-2.5,0],[0,-2.5]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.328999986836,0.328999986836,0.277999997606,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":0,"s":[20,24.5],"e":[15,18.5],"to":[-0.83333331346512,-1],"ti":[0.83333331346512,-1.33333337306976]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":10,"s":[15,18.5],"e":[14.763,19.886],"to":[-0.07927326112986,0.12683720886707],"ti":[0.07540860027075,-0.75201451778412]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":15,"s":[14.763,19.886],"e":[15,32.5],"to":[-0.3389684855938,3.38037323951721],"ti":[-0.780821621418,-0.91095858812332]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":20,"s":[15,32.5],"e":[16.012,33.254],"to":[0.25078782439232,0.29258579015732],"ti":[-0.41581165790558,-0.21069806814194]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":25,"s":[16.012,33.254],"e":[27,32.5],"to":[2.90023159980774,1.46959137916565],"ti":[-1.74921214580536,1.74921214580536]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":30,"s":[27,32.5],"e":[27.59,31.443],"to":[0.2598968744278,-0.2598968744278],"ti":[-0.13797041773796,0.43620339035988]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":35,"s":[27.59,31.443],"e":[27,20.5],"to":[0.92376166582108,-2.92053866386414],"ti":[0,1.7401031255722]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":40,"s":[27,20.5],"e":[27,20.5],"to":[0,-2],"ti":[0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":45,"s":[27,20.5],"e":[20,24.5],"to":[0,0],"ti":[0,0]},{"t":50.0000020365418}],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":50,"s":[100],"e":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":51,"s":[100],"e":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":53,"s":[0],"e":[100]},{"t":54.0000021994651}],"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 3","np":2,"cix":2,"ix":3,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-12.426],[12.427,0],[0,12.427],[-12.426,0]],"o":[[0,12.427],[-12.426,0],[0,-12.426],[12.427,0]],"v":[[22.5,0],[0,22.5],[-22.5,0],[0,-22.5]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.972999961703,0.842999985639,0.46699999641,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[28.25,29],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 4","np":2,"cix":2,"ix":4,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":60.0000024438501,"st":0,"bm":0}],"markers":[]} -------------------------------------------------------------------------------- /src/Assets/Audio/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "al-imran": { 3 | "index": 3, 4 | "name": { 5 | "en": "Al-Imran", 6 | "ar": "سورة آل عمران" 7 | }, 8 | "assets": ["zllnbolz", "iq555uon", "vqxouvyz"] 9 | }, 10 | "ibrahim": { 11 | "index": 14, 12 | "name": { 13 | "en": "Ibrahim", 14 | "ar": "سورة ابراهيم" 15 | }, 16 | "assets": ["ge1djfwj", "swqfuh9t", "hkxrqzks"] 17 | }, 18 | "al-ahzab": { 19 | "index": 33, 20 | "name": { 21 | "en": "Al-Ahzab", 22 | "ar": "سورة الأحزاب" 23 | }, 24 | "assets": ["6hqdldyv", "521og0yo", "5g6063sl"] 25 | } 26 | } -------------------------------------------------------------------------------- /src/Assets/Audio/index.js: -------------------------------------------------------------------------------- 1 | import data from './data.json'; 2 | 3 | import { getRandomInt, shuffleArray } from '../../Helpers'; 4 | 5 | function getRandomDatom() { 6 | const values = Object.values(data); 7 | return values[getRandomInt(values.length)]; 8 | } 9 | 10 | function getRandomAsset(datom) { 11 | return datom.assets[getRandomInt(3)]; 12 | } 13 | 14 | function getFourRandomDatoms(datom) { 15 | let names = []; 16 | const values = Object.values(data); 17 | for (let _ = 0; _ < 3; _++) { 18 | const currVal = values[getRandomInt(values.length)]; 19 | if (currVal.index === datom.index) { 20 | _--; 21 | continue; 22 | } 23 | names.push({ ...currVal, disabled: false }); 24 | } 25 | names.push({ ...datom, disabled: false }); 26 | return shuffleArray(names); 27 | } 28 | 29 | export { getRandomDatom, getRandomAsset, getFourRandomDatoms }; 30 | -------------------------------------------------------------------------------- /src/Assets/Images/background-ar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learn-quran/web/274f84e7212e90b9ee18406b78b4cc0cb1a2d8c6/src/Assets/Images/background-ar.jpg -------------------------------------------------------------------------------- /src/Assets/Images/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learn-quran/web/274f84e7212e90b9ee18406b78b4cc0cb1a2d8c6/src/Assets/Images/background.jpg -------------------------------------------------------------------------------- /src/Assets/Images/index.js: -------------------------------------------------------------------------------- 1 | import logo from './logo.png'; 2 | 3 | export { logo }; 4 | -------------------------------------------------------------------------------- /src/Assets/Images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learn-quran/web/274f84e7212e90b9ee18406b78b4cc0cb1a2d8c6/src/Assets/Images/logo.png -------------------------------------------------------------------------------- /src/Assets/authors.json: -------------------------------------------------------------------------------- 1 | { 2 | "mohshbool": { 3 | "name": { 4 | "en": "Mohammad Shbool", 5 | "ar": "محمد الشبول" 6 | }, 7 | "urls": { 8 | "twitter": "https://www.twitter.com/mohshbool", 9 | "github": "https://www.github.com/mohshbool" 10 | } 11 | }, 12 | "asadmar": { 13 | "name": { 14 | "en": "Asad Marmash", 15 | "ar": "أسد مرمش" 16 | }, 17 | "urls": { 18 | "facebook": "https://www.facebook.com/asad.marmash1" 19 | } 20 | }, 21 | "sadeemkh": { 22 | "name": { 23 | "en": "Sadeem Khalaf", 24 | "ar": "سديم خلف" 25 | }, 26 | "urls": { 27 | "facebook": "https://www.facebook.com/sadeemkhalaf", 28 | "behance": "https://www.behance.net/Sadeem-Khalaf" 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /src/Assets/stylesheets/Account.scss: -------------------------------------------------------------------------------- 1 | .MuiDialog-root { 2 | .MuiDialog-paper { 3 | min-width: calc(18vw + 300px); 4 | .MuiTypography-h6 { 5 | display: flex; 6 | justify-content: space-between; 7 | .icon { 8 | -webkit-transition: -webkit-transform .25s ease-in-out; 9 | transition: transform .25s ease-in-out; 10 | } 11 | .icon:hover { 12 | -webkit-transform: rotate(180deg); 13 | transform: rotate(180deg); 14 | } 15 | } 16 | .MuiDialogContent-root { 17 | .MuiExpansionPanel-root { 18 | .MuiExpansionPanelSummary-content { 19 | display: flex; 20 | .field { 21 | flex: 2; 22 | } 23 | .field-value { 24 | flex: 3; 25 | } 26 | } 27 | .MuiCollapse-wrapperInner { 28 | .MuiExpansionPanelDetails-root { 29 | .form { 30 | position: relative; 31 | width: 100%; 32 | .form-conatiner { 33 | width: 100%; 34 | position: relative; 35 | display: flex; 36 | justify-content: space-around; 37 | align-items: center; 38 | .text-field { 39 | .MuiFormLabel-root, .MuiInputBase-root { 40 | color: black; 41 | &.Mui-focused .MuiOutlinedInput-notchedOutline{ 42 | border-color: #B9994E; 43 | } 44 | .MuiOutlinedInput-notchedOutline { 45 | border-color: black; 46 | } 47 | } 48 | .MuiFormLabel-root.Mui-focused { 49 | color: #B9994E; 50 | } 51 | } 52 | } 53 | } 54 | } 55 | } 56 | } 57 | .buttons-container { 58 | width: 100%; 59 | display: flex; 60 | justify-content: space-around; 61 | padding-top: 18px; 62 | padding-bottom: 12px; 63 | @media only screen and (max-width: 820px) { 64 | flex-direction: column; 65 | align-items: center; 66 | } 67 | .MuiButton-root { 68 | width: 45%; 69 | @media only screen and (max-width: 820px) { 70 | width: 90%; 71 | margin: 8px 0; 72 | } 73 | } 74 | } 75 | } 76 | .logout-button-container { 77 | width: 100%; 78 | display: flex; 79 | justify-content: center; 80 | align-items: center; 81 | padding: 12px 0; 82 | font-size: 1.05rem; 83 | @media only screen and (max-width: 820px) { 84 | padding: initial; 85 | } 86 | .MuiButton-root { 87 | width: 50%; 88 | @media only screen and (max-width: 820px) { 89 | width: 90%; 90 | } 91 | } 92 | } 93 | .MuiDialogActions-root { 94 | .submit-button { 95 | margin: 0 18px 6px 18px; 96 | } 97 | } 98 | } 99 | 100 | } -------------------------------------------------------------------------------- /src/Assets/stylesheets/Landing.scss: -------------------------------------------------------------------------------- 1 | .landing-content { 2 | width: 100vw; 3 | height: 100vh; 4 | display: flex; 5 | position: relative; 6 | justify-content: space-evenly; 7 | background-image: url('../Images/background.jpg'); 8 | background-repeat: no-repeat; 9 | background-position: bottom; 10 | background-size: cover; 11 | @media only screen and (max-width: 850px) { 12 | flex-direction: column; 13 | height: initial; 14 | } 15 | &.ar-bg { 16 | background-image: url('../Images/background-ar.jpg'); 17 | } 18 | .side { 19 | width: 50%; 20 | display: flex; 21 | position: relative; 22 | justify-content: center; 23 | align-items: center; 24 | @media only screen and (max-width: 850px) { 25 | width: 100%; 26 | } 27 | } 28 | .left { 29 | flex-direction: column; 30 | justify-content: flex-start; 31 | .android-container { 32 | display: flex; 33 | justify-content: center; 34 | align-items: center; 35 | width: 100%; 36 | padding: 5% 0 3% 0; 37 | .button { 38 | width: 65%; 39 | font-size: 1.2em; 40 | font-weight: 700; 41 | text-align: center; 42 | } 43 | } 44 | .logo-container { 45 | padding: 3% 0; 46 | .logo { 47 | width: 204px; 48 | height: 204px; 49 | } 50 | } 51 | .text-container { 52 | width: 80%; 53 | display: flex; 54 | flex-direction: column; 55 | justify-content: space-between; 56 | color: white; 57 | font-size: 1em; 58 | .header { 59 | font-size: 1.2em; 60 | font-weight: 700; 61 | text-transform: uppercase; 62 | color: rgb(189, 160, 93); 63 | text-align: center; 64 | } 65 | .sections { 66 | padding-top: 3%; 67 | .section { 68 | padding: 3% 0; 69 | .header { 70 | font-size: 1.1em; 71 | color: white; 72 | text-align: start; 73 | text-decoration-line: underline; 74 | span { 75 | font-size: 1.1em; 76 | } 77 | } 78 | .ascii { 79 | font-family: initial; 80 | font-weight: 100; 81 | overflow: hidden; 82 | text-overflow: ellipsis; 83 | white-space: nowrap; 84 | } 85 | } 86 | } 87 | } 88 | } 89 | .right { 90 | @media only screen and (max-width: 850px) { 91 | margin: 30px 0; 92 | } 93 | form { 94 | display: flex; 95 | width: 26rem; 96 | background-color: rgba(79, 79, 79, 0.8); 97 | border-radius: 13px; 98 | .form-container { 99 | display: flex; 100 | align-items: center; 101 | justify-content: space-around; 102 | flex-direction: column; 103 | padding: 2px 16px; 104 | width: 100%; 105 | &.login { 106 | justify-content: center; 107 | } 108 | .text-field-container { 109 | display: flex; 110 | flex-direction: column; 111 | width: 100%; 112 | .text-field { 113 | width: 100%; 114 | } 115 | } 116 | .buttons-container { 117 | display: flex; 118 | flex-direction: column; 119 | width: 100%; 120 | margin: 30px 0; 121 | .button { 122 | width: 80%; 123 | padding: 8px 18px; 124 | align-self: center; 125 | } 126 | .inner-buttons-container { 127 | display: flex; 128 | justify-content: center; 129 | width: 100%; 130 | margin: 24px 0; 131 | } 132 | } 133 | } 134 | } 135 | } 136 | } -------------------------------------------------------------------------------- /src/Assets/stylesheets/Leaderboard.scss: -------------------------------------------------------------------------------- 1 | .leaderboard-content { 2 | width: 100vw; 3 | height: 100vh; 4 | display: flex; 5 | position: relative; 6 | flex-direction: column; 7 | padding-top: 18px; 8 | .table-container { 9 | padding: 20px 28px; 10 | table { 11 | .MuiTableCell-head { 12 | font-size: 1rem !important; 13 | } 14 | .MuiTableCell-body { 15 | font-size: 0.9rem !important; 16 | } 17 | .current-user-row { 18 | background-color: rgba(254, 227, 193, 0.6); 19 | 20 | } 21 | } 22 | } 23 | .home-fab { 24 | position: fixed; 25 | top: 15px; 26 | left: 15px; 27 | } 28 | } -------------------------------------------------------------------------------- /src/Assets/stylesheets/Player.scss: -------------------------------------------------------------------------------- 1 | .player-content { 2 | position: relative; 3 | width: 100vw; 4 | height: 100vh; 5 | display: flex; 6 | flex-direction: column; 7 | justify-content: center; 8 | align-items: center; 9 | .your-points-container { 10 | display: flex; 11 | position: absolute; 12 | top: 15px; 13 | left: 10px; 14 | @media only screen and (max-width: 768px) { 15 | left: 50%; 16 | transform: translateX(-50%); 17 | } 18 | @media only screen and (max-width: 425px) { 19 | position: relative; 20 | padding-bottom: 15px; 21 | left: initial; 22 | transform: initial; 23 | } 24 | .your-points { 25 | padding: 4px 15px; 26 | } 27 | .points { 28 | background-color: rgba(254, 227, 193, 0.7); 29 | border-radius: 4px; 30 | padding: 4px 24px; 31 | } 32 | } 33 | .warning { 34 | font-size: 24px; 35 | padding: 32px 24px; 36 | } 37 | .reset-button:hover { 38 | -webkit-animation:spin 0.5s linear; 39 | -moz-animation:spin 0.5s linear; 40 | animation:spin 0.5s linear; 41 | } 42 | .slider-container { 43 | width: 30%; 44 | padding: 30px 0; 45 | @media only screen and (max-width: 768px) { 46 | width: 45%; 47 | } 48 | } 49 | .buttons-container { 50 | .buttons-row { 51 | display: flex; 52 | align-items: center; 53 | @media only screen and (max-width: 768px) { 54 | flex-direction: column; 55 | } 56 | .button { 57 | min-width: 9rem; 58 | margin: 10px 15px; 59 | font-size: 16px; 60 | } 61 | } 62 | } 63 | .after-play { 64 | width: 33%; 65 | display: flex; 66 | flex-direction: column; 67 | justify-content: center; 68 | align-items: center; 69 | .on-animation-container { 70 | width: 30vw; 71 | @media only screen and (max-width: 768px) { 72 | width: 45vw; 73 | } 74 | } 75 | .button { 76 | margin: 24px 0; 77 | } 78 | } 79 | } 80 | @-moz-keyframes spin { 100% { -moz-transform: rotate(360deg); } } 81 | @-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg); } } 82 | @keyframes spin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } } 83 | -------------------------------------------------------------------------------- /src/Assets/stylesheets/PrivacyPolicy.scss: -------------------------------------------------------------------------------- 1 | .privacy-content { 2 | padding: 32px 8vw; 3 | direction: ltr !important; 4 | * { 5 | font-family: inherit; 6 | } 7 | h1 { 8 | text-align: center; 9 | font-family: inherit; 10 | padding-bottom: 16px; 11 | } 12 | p { 13 | font-size: 1.2em; 14 | &:last-child { 15 | @media only screen and (max-width: 768px) { 16 | text-align: center; 17 | } 18 | } 19 | } 20 | strong { 21 | font-size: 1.45em; 22 | font-weight: 900; 23 | text-decoration: underline; 24 | } 25 | a { 26 | text-decoration: none; 27 | color: #4f4f4f; 28 | font-weight: 700; 29 | font-size: 1.05em; 30 | } 31 | } -------------------------------------------------------------------------------- /src/Assets/stylesheets/Signup.scss: -------------------------------------------------------------------------------- 1 | form { 2 | display: flex; 3 | width: 26rem; 4 | background-color: rgba(79, 79, 79, 0.8); 5 | border-radius: 13px; 6 | .form-container { 7 | display: flex; 8 | align-items: center; 9 | justify-content: space-around; 10 | flex-direction: column; 11 | padding: 2px 16px; 12 | width: 100%; 13 | &.login { 14 | justify-content: center; 15 | } 16 | .text-field-container { 17 | display: flex; 18 | flex-direction: column; 19 | width: 100%; 20 | .text-field { 21 | width: 100%; 22 | } 23 | } 24 | .buttons-container { 25 | display: flex; 26 | flex-direction: column; 27 | width: 100%; 28 | margin: 30px 0; 29 | button { 30 | width: 80%; 31 | padding: 8px 18px; 32 | align-self: center; 33 | } 34 | .inner-buttons-container { 35 | display: flex; 36 | justify-content: center; 37 | flex-direction: column; 38 | align-items: center; 39 | width: 100%; 40 | button { 41 | margin: 8px 0; 42 | } 43 | } 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /src/Assets/stylesheets/index.scss: -------------------------------------------------------------------------------- 1 | // React Toastify Stylesheet 2 | @import '~react-toastify/dist/ReactToastify.css'; 3 | 4 | * { 5 | box-sizing: border-box; 6 | } 7 | html { 8 | font-size: 100%; 9 | .Toastify__toast-container.ar > .Toastify__toast { 10 | direction: rtl; 11 | } 12 | body { 13 | margin: 0; 14 | font-size: 100%; 15 | .landing-content ~ .fab { 16 | @media only screen and (max-width: 850px) { 17 | position: absolute; 18 | top: 20px; 19 | bottom: initial; 20 | .main-fab { 21 | bottom: initial; 22 | top: -0.5rem; 23 | } 24 | .fab-wheel { 25 | bottom: initial; 26 | top: 0; 27 | .fab-action-1 { 28 | bottom: initial; 29 | top: 3rem; 30 | } 31 | .fab-action-2 { 32 | bottom: initial; 33 | top: 6.5rem; 34 | } 35 | } 36 | } 37 | } 38 | .fab { 39 | position: fixed; 40 | bottom: 20px; 41 | left: 20px; 42 | .main-fab { 43 | position: absolute !important; 44 | bottom: -0.5rem; 45 | left: -0.5rem; 46 | transition: all 0.3s ease; 47 | } 48 | .fab-wheel { 49 | position: absolute; 50 | bottom: 0; 51 | right: 0; 52 | transition: all 0.3s ease; 53 | transform-origin: bottom left; 54 | transform: scale(0); 55 | &.open { 56 | transform: scale(1); 57 | .fab-action { 58 | opacity: 1; 59 | } 60 | } 61 | &.signed-in { 62 | .fab-action-1 { 63 | bottom: 4rem; 64 | left: -0.5rem; 65 | } 66 | .fab-action-2 { 67 | bottom: 2.5rem; 68 | left: 2.5rem; 69 | } 70 | .fab-action-3 { 71 | bottom: 0; 72 | left: 5rem; 73 | } 74 | } 75 | .fab-action { 76 | position: absolute !important; 77 | transition: all 1s ease; 78 | opacity: 0; 79 | } 80 | .fab-action-1 { 81 | bottom: 3rem; 82 | left: -0.5rem; 83 | } 84 | .fab-action-2 { 85 | bottom: 6.5rem; 86 | left: -0.5rem; 87 | } 88 | } 89 | } 90 | .animation-container { 91 | width: 100vw; 92 | height: 100vh; 93 | display: flex; 94 | justify-content: center; 95 | align-content: center; 96 | background-color: #4F4F4F; 97 | .animation { 98 | width: 35%; 99 | @media only screen and (max-width: 850px) { 100 | width: 75%; 101 | } 102 | } 103 | } 104 | .info-icon { 105 | cursor: pointer; 106 | position: absolute; 107 | top: 20px; 108 | right: 20px; 109 | color: white; 110 | } 111 | .about { 112 | display: flex; 113 | position: relative; 114 | justify-content: space-between; 115 | padding: 5px 0 15px; 116 | @media only screen and (max-width: 850px) { 117 | align-items: center; 118 | flex-direction: column; 119 | } 120 | .author { 121 | display: flex; 122 | flex-direction: column; 123 | justify-content: space-evenly; 124 | align-items: center; 125 | text-align: center; 126 | width: 30%; 127 | padding: 12px 0; 128 | border-width: 0.1; 129 | border-radius: 8; 130 | border-color: '#ccc'; 131 | -webkit-box-shadow: 2px 2px 10px 1px rgba(0,0,0,0.5); 132 | -moz-box-shadow: 2px 2px 10px 1px rgba(0,0,0,0.5); 133 | box-shadow: 2px 2px 10px 1px rgba(0,0,0,0.5); 134 | @media only screen and (max-width: 850px) { 135 | width: 90%; 136 | margin: 10px 0; 137 | } 138 | .name { 139 | font-size: 1.2em; 140 | padding: 15px 8px; 141 | } 142 | .icons-container { 143 | padding: 8px 0 20px; 144 | display: flex; 145 | justify-content: space-evenly; 146 | width: 100%; 147 | svg { 148 | cursor: pointer; 149 | } 150 | } 151 | } 152 | } 153 | .en { 154 | font-family: 'Rajdhani', sans-serif; 155 | } 156 | .ar { 157 | font-family: 'Amiri', serif; 158 | } 159 | } 160 | } -------------------------------------------------------------------------------- /src/Components/About.js: -------------------------------------------------------------------------------- 1 | import React, { useState, Fragment } from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import { 4 | Dialog, 5 | DialogContent, 6 | DialogTitle, 7 | SvgIcon, 8 | Tooltip, 9 | Icon, 10 | } from '@material-ui/core'; 11 | import { useTranslation } from 'react-i18next'; 12 | 13 | import Authors from '../Assets/authors.json'; 14 | import { Info } from '@material-ui/icons'; 15 | //import facebook from '../Assets/Images/facebook-logo.svg'; 16 | 17 | const About = () => { 18 | const [open, setOpen] = useState(false); 19 | const { t } = useTranslation(); 20 | const openUrl = url => window.open(url, '_blank'); 21 | return ( 22 | 23 | 24 | setOpen(true)} className="info-icon" /> 25 | 26 | setOpen(false)} 29 | aria-labelledby="form-dialog-title"> 30 | 31 |
32 | {t('meet-the-people-behind-learn-quran')} 33 |
34 | setOpen(false)}> 35 | close 36 | 37 |
38 | 39 |
40 | {Object.values(Authors).map(({ name, urls }, i) => ( 41 |
42 |
43 | {name[t('lang-code')]} 44 |
45 |
46 | {urls.twitter && ( 47 | openUrl(urls.twitter)}> 50 | 59 | 60 | )} 61 | {urls.github && ( 62 | openUrl(urls.github)}> 65 | 87 | 88 | )} 89 | {urls.facebook && ( 90 | openUrl(urls.facebook)}> 93 | 98 | 99 | )} 100 | {urls.behance && ( 101 | openUrl(urls.behance)}> 104 | 122 | 123 | )} 124 |
125 |
126 | ))} 127 |
128 |
129 |
130 |
131 | ); 132 | }; 133 | About.propTypes = { 134 | title: PropTypes.string, 135 | variant: PropTypes.string, 136 | headerText: PropTypes.string, 137 | label: PropTypes.string, 138 | initialValue: PropTypes.string, 139 | textFieldType: PropTypes.string, 140 | submitButtonText: PropTypes.string, 141 | onSubmit: PropTypes.func, 142 | isSubmitting: PropTypes.bool, 143 | }; 144 | 145 | export default About; 146 | -------------------------------------------------------------------------------- /src/Components/Account/AccountRow.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react'; 2 | import PropTypes from 'prop-types'; 3 | 4 | import { 5 | ExpansionPanel, 6 | ExpansionPanelDetails, 7 | ExpansionPanelSummary, 8 | TextField, 9 | Button, 10 | Icon, 11 | } from '@material-ui/core'; 12 | 13 | const AccountRow = ({ 14 | isExpandable, 15 | field, 16 | fieldValue, 17 | onSubmit, 18 | textFieldType, 19 | buttonText, 20 | isSubmitting, 21 | }) => { 22 | const [expanded, setExpanded] = useState(false); 23 | const [value, setValue] = useState(fieldValue); 24 | const handleChange = ({ target }) => setValue(target.value); 25 | const handleSubmit = () => onSubmit(value); 26 | const handleKeyPress = ({ keyCode, charCode }) => { 27 | if (keyCode === 13 || charCode === 13) { 28 | onSubmit(value); 29 | } 30 | }; 31 | return ( 32 | setExpanded(!expanded)}> 36 | arrow_drop_down} 38 | aria-controls="panel1bh-content" 39 | id="panel1bh-header"> 40 |
{field}
41 |
{fieldValue}
42 |
43 | 44 |
45 |
46 | handleKeyPress(e)} 55 | /> 56 | 64 |
65 |
66 |
67 |
68 | ); 69 | }; 70 | AccountRow.propTypes = { 71 | isExpandable: PropTypes.bool, 72 | field: PropTypes.string, 73 | fieldValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), 74 | onSubmit: PropTypes.func, 75 | textFieldType: PropTypes.string, 76 | buttonText: PropTypes.string, 77 | isSubmitting: PropTypes.bool, 78 | }; 79 | AccountRow.defaultProps = { 80 | isExpandable: false, 81 | textFieldType: 'text', 82 | }; 83 | 84 | export default AccountRow; 85 | -------------------------------------------------------------------------------- /src/Components/Account/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { toast } from 'react-toastify'; 3 | 4 | import { 5 | Button, 6 | Dialog, 7 | DialogActions, 8 | DialogContent, 9 | DialogContentText, 10 | DialogTitle, 11 | Icon, 12 | Fab, 13 | Tooltip, 14 | } from '@material-ui/core'; 15 | import { AccountCircle } from '@material-ui/icons'; 16 | 17 | import PropTypes from 'prop-types'; 18 | import { withFirebase } from '../../Firebase'; 19 | import { withTranslation } from 'react-i18next'; 20 | 21 | import AccountRow from './AccountRow'; 22 | import InputDialog from '../InputDialog'; 23 | 24 | import '../../Assets/StyleSheets/Account.scss'; 25 | 26 | class Account extends React.Component { 27 | static propTypes = { 28 | firebase: PropTypes.object, 29 | t: PropTypes.func, 30 | }; 31 | constructor(props) { 32 | super(props); 33 | this.state = { 34 | isSubmitting: false, 35 | isModalOpen: false, 36 | user: false, 37 | }; 38 | } 39 | 40 | componentDidMount() { 41 | this.persistUserInfo(); 42 | } 43 | 44 | persistUserInfo = () => { 45 | const { firebase, t } = this.props; 46 | firebase 47 | .getUser() 48 | .then(user => { 49 | this.setState({ user: { ...user } }); 50 | }) 51 | .catch(() => { 52 | toast.error( 53 | t('something-went-wrong-please-close-the-tab-and-try-again'), 54 | ); 55 | }); 56 | }; 57 | 58 | handleOpenClick = () => { 59 | this.setState({ isModalOpen: true }); 60 | }; 61 | handleCloseClick = () => { 62 | this.setState({ isModalOpen: false }); 63 | }; 64 | 65 | onUsernameSubmit = username => { 66 | const { firebase, t } = this.props; 67 | if (username.length >= 3) { 68 | if (username.length <= 20) { 69 | if (username !== this.state.user.username) { 70 | if (/^(?:[\u0600-\u065f]+|[a-z]+)$/i.test(username)) { 71 | firebase 72 | .isUsernameDuplicated(username) 73 | .then(() => { 74 | this.setState({ isSubmitting: true }); 75 | firebase 76 | .updateUserOnDB({ username }, true) 77 | .then(() => 78 | toast.success(t('your-username-has-been-updated')), 79 | ) 80 | .catch(err => toast.error(t(err))) 81 | .finally(() => { 82 | this.setState({ isSubmitting: false }); 83 | this.persistUserInfo(); 84 | }); 85 | }) 86 | .catch(err => toast.error(t(err))); 87 | } else toast.error(t('username-can-only-contain-letters')); 88 | } 89 | } else toast.error(t('username-too-long')); 90 | } else toast.error(t('username-too-short')); 91 | }; 92 | onEmailSubmit = email => { 93 | const { firebase, t } = this.props; 94 | if ( 95 | // eslint-disable-next-line 96 | /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i.test(email) 97 | ) { 98 | if (email !== this.state.user.email) { 99 | this.setState({ isSubmitting: true }); 100 | firebase 101 | .updateUserEmail(email) 102 | .then(() => toast.success(t('your-email-has-been-updated'))) 103 | .catch(err => toast.error(t(err))) 104 | .finally(() => { 105 | this.setState({ isSubmitting: false }); 106 | this.persistUserInfo(); 107 | }); 108 | } 109 | } else toast.error(t('invalid-email')); 110 | }; 111 | onPasswordSubmit = (password, close) => { 112 | const { firebase, t } = this.props; 113 | if (password.length > 1) { 114 | if (password.length > 6) { 115 | this.setState({ isSubmitting: true }); 116 | firebase 117 | .updateUserPassword(password) 118 | .then(() => { 119 | toast.success(t('password-updated-successfully')); 120 | }) 121 | .catch(err => toast.error(t(err))) 122 | .finally(() => { 123 | this.setState({ isSubmitting: false }); 124 | close(); 125 | this.persistUserInfo(); 126 | }); 127 | } else toast.error(t('password-is-too-short')); 128 | } 129 | }; 130 | onReauthSubmit = (password, close) => { 131 | const { firebase, t } = this.props; 132 | if (password.length > 1 && password.length > 6) { 133 | this.setState({ isSubmitting: true }); 134 | firebase 135 | .reauthenticate(password) 136 | .then(() => { 137 | toast.success(t('account-reauthenticated-successfully')); 138 | }) 139 | .catch(err => toast.error(t(err))) 140 | .finally(() => { 141 | this.setState({ isSubmitting: false }); 142 | close(); 143 | }); 144 | } 145 | }; 146 | logout = () => this.props.firebase.auth().signOut(); 147 | 148 | render() { 149 | const { handleOpenClick, handleCloseClick, logout, state, props } = this; 150 | const { t } = props; 151 | return ( 152 | 153 | 154 | 159 | 160 | 161 | 162 | {!!state.user && ( 163 | 168 | 169 |
{t('edit-account')}
170 | 171 | close 172 | 173 |
174 | 175 | 176 | {t('edit-the-information-below-then-hit-save')} 177 | 178 | 186 | 195 |
196 | 207 | 218 |
219 |
220 | 227 |
228 |
229 | 230 |
231 | )} 232 |
233 | ); 234 | } 235 | } 236 | export default withTranslation()(withFirebase(Account)); 237 | -------------------------------------------------------------------------------- /src/Components/AfterPlay.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import Lottie from 'react-lottie'; 4 | import { Button } from '@material-ui/core'; 5 | 6 | const AfterPlay = ({ animationData, init, buttonText }) => { 7 | const defaultOptions = { 8 | autoplay: true, 9 | loop: false, 10 | }; 11 | return ( 12 |
13 |
14 | 20 |
21 | 28 |
29 | ); 30 | }; 31 | AfterPlay.propTypes = { 32 | animationData: PropTypes.object, 33 | init: PropTypes.func, 34 | buttonText: PropTypes.string, 35 | }; 36 | 37 | export default AfterPlay; 38 | -------------------------------------------------------------------------------- /src/Components/FAB.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react'; 2 | import { withRouter } from 'react-router-dom'; 3 | 4 | import { Fab, Tooltip, Menu, MenuItem } from '@material-ui/core'; 5 | import { 6 | Menu as MenuIcon, 7 | Language, 8 | InsertChartOutlined, 9 | } from '@material-ui/icons'; 10 | 11 | import PropTypes from 'prop-types'; 12 | import { withFirebase } from '../Firebase'; 13 | import { useTranslation } from 'react-i18next'; 14 | import Account from './Account'; 15 | 16 | const FAB = ({ firebase, history, user }) => { 17 | const [isOpen, changeIsOpen] = useState(false); 18 | const [menu, setMenu] = useState(null); 19 | const { t, i18n } = useTranslation(); 20 | const handleClick = e => setMenu(e.currentTarget); 21 | const handleClose = () => setMenu(null); 22 | const handleLanguageChange = language => { 23 | if ((localStorage.getItem('language') || 'en') !== language) { 24 | i18n.changeLanguage(language).then(() => { 25 | localStorage.setItem('language', language); 26 | handleClose(); 27 | if (firebase.isLoggedIn) { 28 | firebase 29 | .updateUserOnDB({ language }) 30 | .then(() => { 31 | window.location.reload(); 32 | }) 33 | .catch(() => {}); 34 | } else { 35 | window.location.reload(); 36 | } 37 | }); 38 | } 39 | }; 40 | const userStatus = user ? 'signed-in' : 'not-signed-in'; 41 | return ( 42 |
43 | 44 | changeIsOpen(!isOpen)}> 49 | 50 | 51 | 52 |
53 | 54 | 55 | 60 | 61 | 62 | 63 | 68 | handleLanguageChange('en')}> 69 | {t('english')} 70 | 71 | handleLanguageChange('ar')}> 72 | {t('arabic')} 73 | 74 | 75 | 76 | 77 | history.push('/leaderboard')}> 82 | 83 | 84 | 85 | {!!user && } 86 |
87 |
88 | ); 89 | }; 90 | FAB.propTypes = { 91 | firebase: PropTypes.object, 92 | history: PropTypes.object, 93 | user: PropTypes.object, 94 | }; 95 | 96 | export default withRouter(withFirebase(FAB)); 97 | -------------------------------------------------------------------------------- /src/Components/InputDialog.js: -------------------------------------------------------------------------------- 1 | import React, { useState, Fragment } from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import { 4 | Dialog, 5 | DialogActions, 6 | DialogContent, 7 | DialogContentText, 8 | DialogTitle, 9 | TextField, 10 | Button, 11 | Icon, 12 | } from '@material-ui/core'; 13 | 14 | const PasswordInputDialog = ({ 15 | title, 16 | variant, 17 | headerText, 18 | label, 19 | textFieldType, 20 | initialValue, 21 | submitButtonText, 22 | onSubmit, 23 | isSubmitting, 24 | }) => { 25 | const [open, setOpen] = useState(false); 26 | const [value, setValue] = useState(''); 27 | 28 | const handleClickOpen = () => { 29 | setOpen(true); 30 | setValue(initialValue || ''); 31 | }; 32 | const handleClose = () => setOpen(false); 33 | const handleChange = ({ target }) => setValue(target.value); 34 | const handleSubmit = () => { 35 | onSubmit(value, handleClose); 36 | setValue(''); 37 | }; 38 | const handleKeyPress = ({ keyCode, charCode }) => { 39 | if (keyCode === 13 || charCode === 13) { 40 | onSubmit(value, handleClose); 41 | } 42 | }; 43 | 44 | return ( 45 | 46 | 52 | 56 | 57 |
{title}
58 | 59 | close 60 | 61 |
62 | 63 | {headerText} 64 | handleKeyPress(e)} 75 | /> 76 | 77 | 78 | 86 | 87 |
88 |
89 | ); 90 | }; 91 | PasswordInputDialog.propTypes = { 92 | title: PropTypes.string, 93 | variant: PropTypes.string, 94 | headerText: PropTypes.string, 95 | label: PropTypes.string, 96 | initialValue: PropTypes.string, 97 | textFieldType: PropTypes.string, 98 | submitButtonText: PropTypes.string, 99 | onSubmit: PropTypes.func, 100 | isSubmitting: PropTypes.bool, 101 | }; 102 | 103 | export default PasswordInputDialog; 104 | -------------------------------------------------------------------------------- /src/Components/Login.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import * as Yup from 'yup'; 3 | import { Formik } from 'formik'; 4 | import { toast } from 'react-toastify'; 5 | import { withRouter } from 'react-router-dom'; 6 | import { useTranslation } from 'react-i18next'; 7 | import { TextField, Button } from '@material-ui/core'; 8 | 9 | import PropTypes from 'prop-types'; 10 | import { withFirebase } from '../Firebase'; 11 | 12 | import InputDialog from '../Components/InputDialog'; 13 | 14 | const LoginSchema = Yup.object().shape({ 15 | password: Yup.string().required('password-is-required'), 16 | email: Yup.string() 17 | .email('NO_MESSAGE') 18 | .required('email-is-required'), 19 | }); 20 | 21 | const Login = ({ 22 | firebase, 23 | history, 24 | isSubmitting, 25 | changeIsSubmitting, 26 | showLogin, 27 | }) => { 28 | const { t, i18n } = useTranslation(); 29 | const submit = values => { 30 | changeIsSubmitting(true); 31 | LoginSchema.validate(values, { 32 | strict: true, 33 | stripUnknown: true, 34 | }) 35 | .then(() => { 36 | firebase 37 | .signIn(values) 38 | .then(() => history.push('/')) 39 | .catch(error => { 40 | toast.error(t(error)); 41 | changeIsSubmitting(false); 42 | }); 43 | }) 44 | .catch(({ message }) => { 45 | if (message !== 'NO_MESSAGE') { 46 | toast.error(t(message)); 47 | } 48 | changeIsSubmitting(false); 49 | }); 50 | }; 51 | const handleKeyPress = ({ keyCode, charCode }, values) => { 52 | if (keyCode === 13 || charCode === 13) { 53 | submit(values); 54 | } 55 | }; 56 | 57 | const onResetPasswordSubmit = (email, close) => { 58 | if ( 59 | // eslint-disable-next-line 60 | /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i.test(email) 61 | ) { 62 | firebase 63 | .resetPassword(email, i18n.language) 64 | .then(() => { 65 | toast.success(t('email-sent')); 66 | close(); 67 | }) 68 | .catch(({ message }) => toast.error(t(message))); 69 | } else toast.error(t('invalid-email')); 70 | }; 71 | 72 | return ( 73 | ( 80 |
81 |
82 |
83 | 94 | handleKeyPress(e, values)} 105 | /> 106 |
107 |
108 | 116 |
117 | 124 | 137 |
138 |
139 |
140 |
141 | )} 142 | /> 143 | ); 144 | }; 145 | Login.propTypes = { 146 | firebase: PropTypes.object, 147 | history: PropTypes.object, 148 | isSubmitting: PropTypes.bool, 149 | changeIsSubmitting: PropTypes.func, 150 | showLogin: PropTypes.func, 151 | }; 152 | 153 | export default withRouter(withFirebase(Login)); 154 | -------------------------------------------------------------------------------- /src/Components/Signup.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import * as Yup from 'yup'; 3 | import { Formik } from 'formik'; 4 | import { toast } from 'react-toastify'; 5 | import { withRouter } from 'react-router-dom'; 6 | import { useTranslation } from 'react-i18next'; 7 | import { TextField, Button } from '@material-ui/core'; 8 | 9 | import PropTypes from 'prop-types'; 10 | import { withFirebase } from '../Firebase'; 11 | 12 | import '../Assets/StyleSheets/Signup.scss'; 13 | 14 | const SignupSchema = Yup.object().shape({ 15 | email: Yup.string() 16 | .required('email-is-required') 17 | .email('invalid-email'), 18 | username: Yup.string() 19 | .required('username-is-required') 20 | .min(3, 'username-too-short') 21 | .matches( 22 | /^(?:[\u0600-\u065f]+|[a-z]+)$/i, 23 | 'username-can-only-contain-letters', 24 | ), 25 | password: Yup.string() 26 | .required('password-is-required') 27 | .min(6, 'password-is-too-short'), 28 | passwordConfirmation: Yup.string().required( 29 | 'password-confirmation-is-required', 30 | ), 31 | }); 32 | 33 | const Signup = ({ 34 | firebase, 35 | history, 36 | isSubmitting, 37 | changeIsSubmitting, 38 | showLogin, 39 | }) => { 40 | const { t } = useTranslation(); 41 | const submit = values => { 42 | if (values.password !== values.passwordConfirmation) { 43 | toast.error(t('passwords-dont-match')); 44 | } else { 45 | changeIsSubmitting(true); 46 | SignupSchema.validate(values, { 47 | strict: true, 48 | stripUnknown: true, 49 | }) 50 | .then(() => { 51 | firebase 52 | .createUser({ 53 | ...values, 54 | language: localStorage.getItem('language'), 55 | }) 56 | .then(() => history.push('/')) 57 | .catch(error => { 58 | toast.error(t(error)); 59 | changeIsSubmitting(false); 60 | }); 61 | }) 62 | .catch(({ message }) => { 63 | if (message !== 'NO_MESSAGE') { 64 | toast.error(t(message)); 65 | } 66 | changeIsSubmitting(false); 67 | }); 68 | } 69 | }; 70 | const handleKeyPress = ({ keyCode, charCode }, values) => { 71 | if (keyCode === 13 || charCode === 13) { 72 | submit(values); 73 | } 74 | }; 75 | 76 | return ( 77 | ( 86 |
87 |
88 |
89 | 100 | 111 | 122 | handleKeyPress(e, values)} 133 | /> 134 |
135 |
136 | 144 |
145 | 152 |
153 |
154 |
155 |
156 | )} 157 | /> 158 | ); 159 | }; 160 | Signup.propTypes = { 161 | firebase: PropTypes.object, 162 | history: PropTypes.object, 163 | isSubmitting: PropTypes.bool, 164 | changeIsSubmitting: PropTypes.func, 165 | showLogin: PropTypes.func, 166 | }; 167 | 168 | export default withRouter(withFirebase(Signup)); 169 | -------------------------------------------------------------------------------- /src/Containers/Landing.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import { Button } from '@material-ui/core'; 4 | import { useTranslation } from 'react-i18next'; 5 | 6 | import Login from '../Components/Login'; 7 | import Signup from '../Components/Signup'; 8 | 9 | import { logo } from '../Assets/Images'; 10 | 11 | import '../Assets/StyleSheets/Landing.scss'; 12 | import About from '../Components/About'; 13 | 14 | const Landing = () => { 15 | const [isLogin, showLogin] = useState(false); 16 | const [isSubmitting, changeIsSubmitting] = useState(false); 17 | const { t } = useTranslation(); 18 | return ( 19 |
20 |
21 | {!!navigator.userAgent.match(/android/i) && ( 22 |
23 | 37 |
38 | )} 39 |
40 | Learn Quran 41 |
42 |
43 |
44 | {`${t('learn-quran')} `} 45 | {`${t( 46 | 'is-a-hybrid-platform-for-testing-your-knowledge-in-the-holy-quran', 47 | )}!`} 48 |
49 |
50 |
51 |
52 | {`${t('how-to-play')} `} 53 | 54 | 🎮 55 | 56 |
57 | {`${t('landing-page-how-to-play-paragprah')} `} 58 | ~(^-^)~ 59 |
60 |
61 |
62 | {`${t('inspiration')} `} 63 | 64 | ✨ 65 | 66 |
67 | {t('landing-page-inspiration-paragprah')} 68 |
69 |
70 |
71 |
72 |
73 | {isLogin ? ( 74 | 79 | ) : ( 80 | 85 | )} 86 |
87 | 88 |
89 | ); 90 | }; 91 | Login.propTypes = { 92 | firebase: PropTypes.object, 93 | history: PropTypes.object, 94 | }; 95 | 96 | export default Landing; 97 | -------------------------------------------------------------------------------- /src/Containers/Leaderboard.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import { withRouter } from 'react-router-dom'; 4 | import { ScaleLoader } from 'react-spinners'; 5 | 6 | import { 7 | Table, 8 | TableHead, 9 | TableBody, 10 | TableRow, 11 | TableCell, 12 | Tooltip, 13 | Fab, 14 | } from '@material-ui/core'; 15 | import { Home } from '@material-ui/icons'; 16 | 17 | import * as moment from 'moment'; 18 | import 'moment/locale/ar'; 19 | 20 | import { withTranslation } from 'react-i18next'; 21 | import { withFirebase } from '../Firebase'; 22 | import { objectToArray } from '../Helpers'; 23 | 24 | import '../Assets/StyleSheets/Leaderboard.scss'; 25 | 26 | class Leaderboard extends React.Component { 27 | constructor(props) { 28 | super(props); 29 | this.state = { 30 | users: [], 31 | currentUser: {}, 32 | }; 33 | } 34 | componentDidMount() { 35 | document.title = this.props.t('leaderboard'); 36 | this._mounted = true; 37 | const { firebase } = this.props; 38 | firebase 39 | .getLeaderboard() 40 | .then( 41 | users => 42 | this._mounted && this.setState({ users: objectToArray(users) }), 43 | ); 44 | firebase 45 | .getUser() 46 | .then(currentUser => this._mounted && this.setState({ currentUser })) 47 | .catch(() => {}); 48 | } 49 | componentWillUnmount() { 50 | this._mounted = false; 51 | } 52 | render() { 53 | const { users, currentUser } = this.state; 54 | const { t } = this.props; 55 | return users.length === 0 ? ( 56 | 57 | ) : ( 58 |
59 |
60 | 61 | 62 | 63 | {t('username')} 64 | {t('points')} 65 | {t('latest-try')} 66 | 67 | 68 | 69 | {users.map((item, index) => ( 70 | 75 | 76 | {item.username} 77 | 78 | {item.points} 79 | 80 | {item.lastPlayed === 'never-played' 81 | ? t(item.lastPlayed) 82 | : moment(item.lastPlayed).fromNow()} 83 | 84 | 85 | ))} 86 | 87 |
88 |
89 | 92 | this.props.history.push('/')}> 97 | 98 | 99 | 100 |
101 | ); 102 | } 103 | } 104 | Leaderboard.propTypes = { 105 | firebase: PropTypes.object, 106 | t: PropTypes.func, 107 | history: PropTypes.object, 108 | }; 109 | 110 | export default withRouter(withTranslation()(withFirebase(Leaderboard))); 111 | -------------------------------------------------------------------------------- /src/Containers/MonitorConnection.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Lottie from 'react-lottie'; 3 | import PropTypes from 'prop-types'; 4 | 5 | import { 6 | noConnection as noConnectionAnimation, 7 | connecting, 8 | } from '../Assets/Animations'; 9 | 10 | const MonitorConnection = ({ noConnection, loading, children }) => { 11 | return noConnection ? ( 12 |
13 |
14 | 21 |
22 |
23 | ) : loading ? ( 24 |
25 |
26 | 33 |
34 |
35 | ) : ( 36 | children 37 | ); 38 | }; 39 | MonitorConnection.propTypes = { 40 | noConnection: PropTypes.bool, 41 | loading: PropTypes.bool, 42 | children: PropTypes.node, 43 | }; 44 | 45 | export default MonitorConnection; 46 | -------------------------------------------------------------------------------- /src/Containers/Player.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import * as moment from 'moment'; 3 | import PropTypes from 'prop-types'; 4 | import ReactAudioPlayer from 'react-audio-player'; 5 | import { toast } from 'react-toastify'; 6 | import { Button, Grid, Slider, IconButton, Tooltip } from '@material-ui/core'; 7 | import { VolumeDown, VolumeUp, Refresh } from '@material-ui/icons'; 8 | 9 | import { 10 | getRandomDatom, 11 | getRandomAsset, 12 | getFourRandomDatoms, 13 | } from '../Assets/Audio'; 14 | import { onWin, onLose } from '../Assets/Animations'; 15 | 16 | import '../Assets/StyleSheets/Player.scss'; 17 | import { withTranslation } from 'react-i18next'; 18 | import { withFirebase } from '../Firebase'; 19 | import AfterPlay from '../Components/AfterPlay'; 20 | 21 | class Player extends React.Component { 22 | static propTypes = { 23 | firebase: PropTypes.object, 24 | t: PropTypes.func, 25 | }; 26 | 27 | constructor() { 28 | super(); 29 | this.state = { 30 | url: '', 31 | volume: 0.5, 32 | won: false, 33 | lost: false, 34 | user: {}, 35 | }; 36 | this.initalize(); 37 | } 38 | 39 | componentDidMount() { 40 | this.getAsset(); 41 | this.persistUserInfo(); 42 | } 43 | 44 | getAsset = () => { 45 | this.props.firebase 46 | .getAsset(getRandomAsset(this.datom)) 47 | .then(url => this.setState({ url })) 48 | .catch(() => { 49 | toast.error( 50 | this.props.t( 51 | 'something-went-wrong-please-close-the-tab-and-try-again', 52 | ), 53 | ); 54 | }); 55 | }; 56 | persistUserInfo = () => { 57 | const { firebase, t } = this.props; 58 | firebase 59 | .getUser() 60 | .then(user => { 61 | this.setState({ user: { ...user } }); 62 | }) 63 | .catch(() => { 64 | toast.error( 65 | t('something-went-wrong-please-close-the-tab-and-try-again'), 66 | ); 67 | }); 68 | }; 69 | initalize = (reset = false) => { 70 | this.datom = getRandomDatom(); 71 | this.datoms = getFourRandomDatoms(this.datom); 72 | this.points = 3; 73 | if (reset) { 74 | this.setState({ 75 | url: '', 76 | won: false, 77 | lost: false, 78 | }); 79 | this.getAsset(); 80 | } 81 | }; 82 | 83 | handleResetClick = () => { 84 | const el = this.audioComponent.audioEl; 85 | el.pause(); 86 | el.currentTime = 0; 87 | el.play(); 88 | }; 89 | handleVolumeChange = (_, volume) => this.setState({ volume }); 90 | handleAnswerClick = index => { 91 | const { t, firebase } = this.props; 92 | if (this.datoms[index].index === this.datom.index) { 93 | this.setState({ 94 | won: true, 95 | }); 96 | this.audioComponent.audioEl.pause(); 97 | firebase 98 | .updateUserPoints(this.points) 99 | .then(() => { 100 | toast.success( 101 | t('congratulations-you-earned-n-points', { points: this.points }), 102 | ); 103 | this.persistUserInfo(); 104 | }) 105 | .catch(() => { 106 | toast.error( 107 | t( 108 | 'there-was-an-error-adding-your-points-please-contact-us-to-fix-it', 109 | ), 110 | ); 111 | }); 112 | } else { 113 | toast.warn(t('try-again')); 114 | this.datoms[index].disabled = true; 115 | this.points -= 1; 116 | if (this.points === 0) { 117 | this.setState({ lost: true }); 118 | this.audioComponent.audioEl.pause(); 119 | } else { 120 | this.forceUpdate(); 121 | } 122 | } 123 | firebase.updateUserLastPlayed( 124 | moment() 125 | .locale('en') 126 | .format(), 127 | ); 128 | }; 129 | 130 | render() { 131 | const { volume, url, lost, won, user } = this.state; 132 | const { t } = this.props; 133 | return ( 134 |
135 | {!!user.uid && ( 136 |
137 |
{t('your-points')}
138 |
{user.points}
139 |
140 | )} 141 | {lost ? ( 142 | 147 | ) : won ? ( 148 | 153 | ) : ( 154 | 155 |
156 | {t('please-click-the-button-below-if-no-audio-is-playing')} 157 |
158 | 159 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 179 | 180 | 181 | 182 | 183 | 184 |
185 |
186 | 194 | 202 |
203 |
204 | 212 | 220 |
221 |
222 |
223 | )} 224 | (this.audioComponent = o)} 229 | /> 230 |
231 | ); 232 | } 233 | } 234 | 235 | export default withTranslation()(withFirebase(Player)); 236 | -------------------------------------------------------------------------------- /src/Containers/PrivacyPolicy.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | 4 | import { withTranslation } from 'react-i18next'; 5 | 6 | import '../Assets/StyleSheets/PrivacyPolicy.scss'; 7 | 8 | const PrivacyPolicy = ({ t }) => ( 9 |
10 |

Privacy Policy

11 |

12 | Mohammad Shbool built the Learn Quran app as an Open Source app. This 13 | SERVICE is provided by Mohammad Shbool at no cost and is intended for use 14 | as is. 15 |

16 |

17 | This page is used to inform visitors regarding my policies with the 18 | collection, use, and disclosure of Personal Information if anyone decided 19 | to use my Service. 20 |

21 |

22 | If you choose to use my Service, then you agree to the collection and use 23 | of information in relation to this policy. The Personal Information that I 24 | collect is used for providing and improving the Service. I will not use or 25 | share your information with anyone except as described in this Privacy 26 | Policy. 27 |

28 |

29 | The terms used in this Privacy Policy have the same meanings as in our 30 | Terms and Conditions, which is accessible at Learn Quran unless otherwise 31 | defined in this Privacy Policy. 32 |

33 |

34 | Information Collection and Use 35 |

36 |

37 | For a better experience, while using our Service, I may require you to 38 | provide us with certain personally identifiable information, including but 39 | not limited to email, username. The information that I request will be 40 | retained on your device and is not collected by me in any way. 41 |

42 |

43 | The app does use third party services that may collect information used to 44 | identify you. 45 |

46 |
47 |

48 | Link to privacy policy of third party service providers used by the app 49 |

50 |
51 |

52 | Log Data 53 |

54 |

55 | I want to inform you that whenever you use my Service, in a case of an 56 | error in the app I collect data and information (through third party 57 | products) on your phone called Log Data. This Log Data may include 58 | information such as your device Internet Protocol (“IP”) address, device 59 | name, operating system version, the configuration of the app when 60 | utilizing my Service, the time and date of your use of the Service, and 61 | other statistics. 62 |

63 |

64 | Cookies 65 |

66 |

67 | Cookies are files with a small amount of data that are commonly used as 68 | anonymous unique identifiers. These are sent to your browser from the 69 | websites that you visit and are stored on your device's internal 70 | memory. 71 |

72 |

73 | This Service does not use these “cookies” explicitly. However, the app may 74 | use third party code and libraries that use “cookies” to collect 75 | information and improve their services. You have the option to either 76 | accept or refuse these cookies and know when a cookie is being sent to 77 | your device. If you choose to refuse our cookies, you may not be able to 78 | use some portions of this Service. 79 |

80 |

81 | Service Providers 82 |

83 |

84 | I may employ third-party companies and individuals due to the following 85 | reasons: 86 |

87 |
    88 |
  • To facilitate our Service;
  • 89 |
  • To provide the Service on our behalf;
  • 90 |
  • To perform Service-related services; or
  • 91 |
  • To assist us in analyzing how our Service is used.
  • 92 |
93 |

94 | I want to inform users of this Service that these third parties have 95 | access to your Personal Information. The reason is to perform the tasks 96 | assigned to them on our behalf. However, they are obligated not to 97 | disclose or use the information for any other purpose. 98 |

99 |

100 | Security 101 |

102 |

103 | I value your trust in providing us your Personal Information, thus we are 104 | striving to use commercially acceptable means of protecting it. But 105 | remember that no method of transmission over the internet, or method of 106 | electronic storage is 100% secure and reliable, and I cannot guarantee its 107 | absolute security. 108 |

109 |

110 | Links to Other Sites 111 |

112 |

113 | This Service may contain links to other sites. If you click on a 114 | third-party link, you will be directed to that site. Note that these 115 | external sites are not operated by me. Therefore, I strongly advise you to 116 | review the Privacy Policy of these websites. I have no control over and 117 | assume no responsibility for the content, privacy policies, or practices 118 | of any third-party sites or services. 119 |

120 |

121 | Children’s Privacy 122 |

123 |

124 | These Services do not address anyone under the age of 13. I do not 125 | knowingly collect personally identifiable information from children under 126 | 13. In the case I discover that a child under 13 has provided me with 127 | personal information, I immediately delete this from our servers. If you 128 | are a parent or guardian and you are aware that your child has provided us 129 | with personal information, please contact me so that I will be able to do 130 | necessary actions. 131 |

132 |

133 | Changes to This Privacy Policy 134 |

135 |

136 | I may update our Privacy Policy from time to time. Thus, you are advised 137 | to review this page periodically for any changes. I will notify you of any 138 | changes by posting the new Privacy Policy on this page. These changes are 139 | effective immediately after they are posted on this page. 140 |

141 |

142 | Contact Us 143 |

144 |

145 | If you have any questions or suggestions about my Privacy Policy, do not 146 | hesitate to contact me at  147 | 148 | contactus.learnquran@gmail.com 149 | 150 |

151 |

152 | 153 | This Privacy Policy was originally generated by  154 | 155 | www.spanprivacypolicytemplate.net 156 | 157 | 158 |

159 |
160 | ); 161 | PrivacyPolicy.propTypes = { 162 | t: PropTypes.func, 163 | }; 164 | 165 | export default withTranslation()(PrivacyPolicy); 166 | -------------------------------------------------------------------------------- /src/Firebase.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable react/display-name */ 2 | import React from 'react'; 3 | import app from 'firebase/app'; 4 | import moment from 'moment'; 5 | 6 | // Firebase dependencies 7 | import 'firebase/auth'; 8 | import 'firebase/database'; 9 | import 'firebase/storage'; 10 | 11 | const config = { 12 | apiKey: process.env.REACT_APP_API_KEY, 13 | authDomain: process.env.REACT_APP_AUTH_DOMAIN, 14 | databaseURL: process.env.REACT_APP_DATABASE_URL, 15 | projectId: process.env.REACT_APP_PROJECT_ID, 16 | storageBucket: process.env.REACT_APP_STORAGE_BUCKET, 17 | messagingSenderId: process.env.REACT_APP_MESSAGING_SENDER_ID, 18 | appId: process.env.REACT_APP_APP_ID, 19 | }; 20 | 21 | class Firebase { 22 | constructor() { 23 | app.initializeApp(config); 24 | 25 | this.auth = app.auth; 26 | this.database = app.database(); 27 | this.storage = app.storage; 28 | this.isLoggedIn = false; 29 | } 30 | 31 | errors = [ 32 | 'check-your-internet-connection', 33 | 'auth/email-already-in-use', 34 | 'auth/user-disabled', 35 | 'auth/user-not-found', 36 | 'auth/wrong-password', 37 | 'auth/email-already-in-use', 38 | 'auth/invalid-email', 39 | 'auth/weak-password', 40 | 'username-already-exists', 41 | 'an-error-occured-please-try-again-later', 42 | 'auth/requires-recent-login', 43 | 'auth/user-mismatch', 44 | 'auth/user-not-found', 45 | 'auth/invalid-credential', 46 | ]; 47 | 48 | getErrorMessage = code => 49 | this.errors.includes(code) ? code : 'check-your-internet-connection'; 50 | 51 | signIn = ({ email, password }) => 52 | new Promise((resovle, reject) => { 53 | this.auth() 54 | .signInWithEmailAndPassword(email, password) 55 | .then(() => resovle()) 56 | .catch(({ code, message }) => { 57 | reject(this.getErrorMessage(code) || message); 58 | }); 59 | }); 60 | createUser = ({ email, password, username, language }) => 61 | new Promise((resolve, reject) => { 62 | this.isUsernameDuplicated(username) 63 | .then(() => { 64 | this.auth() 65 | .createUserWithEmailAndPassword(email, password) 66 | .then(({ user }) => { 67 | if (user && user.uid) { 68 | let updates = {}; 69 | updates['users/private/' + user.uid] = { 70 | uid: user.uid, 71 | email: email, 72 | language: language, 73 | username: username, 74 | points: 0, 75 | lastPlayed: 'never-played', 76 | createdAt: moment() 77 | .locale('en') 78 | .format(), 79 | }; 80 | updates['users/public/' + user.uid] = { 81 | username: username, 82 | points: 0, 83 | lastPlayed: 'never-played', 84 | }; 85 | this.database.ref().update(updates); 86 | resolve(); 87 | } 88 | }) 89 | .catch(({ code, message }) => { 90 | reject(this.getErrorMessage(code) || message); 91 | }); 92 | }) 93 | .catch(err => reject(err)); 94 | }); 95 | resetPassword = (email, lang) => 96 | new Promise((resolve, reject) => { 97 | const auth = this.auth(); 98 | auth.languageCode = lang; 99 | auth 100 | .sendPasswordResetEmail(email) 101 | .then(() => resolve()) 102 | .catch(error => reject(error.message)); 103 | }); 104 | getUser = () => 105 | new Promise((resolve, reject) => { 106 | this.database 107 | .ref(`users/private/${this.auth().currentUser.uid}`) 108 | .once('value') 109 | .then(snapshot => { 110 | resolve(snapshot.val()); 111 | }) 112 | .catch(error => reject(error.message)); 113 | }); 114 | isUsernameDuplicated = username => 115 | new Promise((resolve, reject) => { 116 | this.database 117 | .ref('users/public') 118 | .orderByChild('username') 119 | .equalTo(username) 120 | .once('value') 121 | .then(snapshot => { 122 | if (snapshot.val()) { 123 | reject('username-already-exists'); 124 | } else { 125 | resolve(); 126 | } 127 | }) 128 | .catch(({ code, message }) => { 129 | reject(this.getErrorMessage(code) || message); 130 | }); 131 | }); 132 | getLeaderboard = () => 133 | new Promise((resolve, reject) => { 134 | this.database 135 | .ref('users/public') 136 | .orderByChild('points') 137 | .once('value') 138 | .then(snapshot => { 139 | resolve(snapshot.val()); 140 | }); 141 | }); 142 | updateUserOnDB = (_updates, _public = false, _private = true) => 143 | new Promise((resolve, reject) => { 144 | if (!_public && !_private) return; 145 | const { uid } = this.auth().currentUser; 146 | const promises = []; 147 | if (_public) 148 | promises.push( 149 | this.database.ref(`users/public/${uid}`).update(_updates), 150 | ); 151 | if (_private) 152 | promises.push( 153 | this.database.ref(`users/private/${uid}`).update(_updates), 154 | ); 155 | Promise.all(promises) 156 | .then(() => resolve()) 157 | .catch(() => reject('an-error-occured-please-try-again-later')); 158 | }); 159 | updateUserEmail = email => 160 | new Promise((resolve, reject) => { 161 | this.auth() 162 | .currentUser.updateEmail(email) 163 | .then(() => this.updateUserOnDB({ email }).then(() => resolve())) 164 | .catch(({ code, message }) => { 165 | reject(this.getErrorMessage(code) || message); 166 | }); 167 | }); 168 | updateUserPassword = password => 169 | new Promise((resolve, reject) => { 170 | this.auth() 171 | .currentUser.updatePassword(password) 172 | .then(() => resolve()) 173 | .catch(({ code, message }) => { 174 | reject(this.getErrorMessage(code) || message); 175 | }); 176 | }); 177 | reauthenticate = password => 178 | new Promise((resolve, reject) => { 179 | const user = this.auth().currentUser; 180 | const credintial = this.auth.EmailAuthProvider.credential( 181 | user.email, 182 | password, 183 | ); 184 | user 185 | .reauthenticateWithCredential(credintial) 186 | .then(() => resolve()) 187 | .catch(({ code, message }) => { 188 | reject(this.getErrorMessage(code) || message); 189 | }); 190 | }); 191 | getAsset = assetId => 192 | new Promise((resolve, reject) => { 193 | this.storage() 194 | .ref(`audio/${assetId}.mp3`) 195 | .getDownloadURL() 196 | .then(url => resolve(url)) 197 | .catch(({ code, message }) => { 198 | reject(this.getErrorMessage(code) || message); 199 | }); 200 | }); 201 | updateUserPoints = newPoints => 202 | new Promise((resolve, reject) => { 203 | this.getUser() 204 | .then(({ points }) => { 205 | this.updateUserOnDB({ points: points + newPoints }, true) 206 | .then(() => resolve()) 207 | .catch(() => reject()); 208 | }) 209 | .catch(() => reject()); 210 | }); 211 | updateUserLastPlayed = lastPlayed => 212 | new Promise(() => { 213 | this.getUser() 214 | .then(({ points }) => { 215 | this.updateUserOnDB({ lastPlayed }, true) 216 | .then(() => {}) 217 | .catch(() => {}); 218 | }) 219 | .catch(() => {}); 220 | }); 221 | } 222 | 223 | const FirebaseContext = React.createContext(null); 224 | 225 | const withFirebase = Component => props => ( 226 | 227 | {firebase => } 228 | 229 | ); 230 | 231 | export { FirebaseContext, withFirebase }; 232 | export default Firebase; 233 | -------------------------------------------------------------------------------- /src/Helpers.js: -------------------------------------------------------------------------------- 1 | const objectToArray = object => { 2 | let array = []; 3 | for (let values of Object.values(object)) { 4 | if (Object.values(values).length >= 1) array.push(values); 5 | else continue; 6 | } 7 | return array; 8 | }; 9 | 10 | const getRandomInt = (max, min = 0) => 11 | Math.floor(Math.random() * (max - min - 1) + min); 12 | 13 | const shuffleArray = array => { 14 | const newArray = [...array]; 15 | for (let i = newArray.length - 1; i > 0; i--) { 16 | const j = Math.floor(Math.random() * (i + 1)); 17 | [newArray[i], newArray[j]] = [newArray[j], newArray[i]]; 18 | } 19 | return newArray; 20 | }; 21 | 22 | export { objectToArray, getRandomInt, shuffleArray }; 23 | -------------------------------------------------------------------------------- /src/Navigation.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Switch, Route, Redirect } from 'react-router-dom'; 3 | import PropTypes from 'prop-types'; 4 | 5 | import Leaderboard from './Containers/Leaderboard'; 6 | import Player from './Containers/Player'; 7 | 8 | import Landing from './Containers/Landing'; 9 | import PrivacyPolicy from './Containers/PrivacyPolicy'; 10 | 11 | const Navigation = ({ user }) => ( 12 | 13 | 14 | 15 | 16 | } /> 17 | 18 | ); 19 | Navigation.propTypes = { 20 | user: PropTypes.object, 21 | }; 22 | 23 | export { Navigation }; 24 | -------------------------------------------------------------------------------- /src/Theme.js: -------------------------------------------------------------------------------- 1 | import { createMuiTheme } from '@material-ui/core/styles'; 2 | 3 | function getTheme(lang) { 4 | const fontFamily = 5 | lang === 'en' ? "'Rajdhani', sans-serif" : "'Amiri', serif"; 6 | const root = { 7 | color: 'white', 8 | fontFamily, 9 | }; 10 | return createMuiTheme({ 11 | direction: lang === 'en' ? 'ltr' : 'rtl', 12 | palette: { 13 | primary: { 14 | main: '#B9994E', 15 | }, 16 | }, 17 | overrides: { 18 | MuiInputBase: { root }, 19 | MuiFormLabel: { root }, 20 | MuiOutlinedInput: { 21 | notchedOutline: { 22 | borderColor: 'white', 23 | }, 24 | }, 25 | MuiFormHelperText: { root }, 26 | MuiButton: { 27 | root: { 28 | fontFamily, 29 | fontSize: '0.95rem', 30 | textTransform: 'initial', 31 | }, 32 | containedPrimary: { 33 | color: 'white', 34 | }, 35 | }, 36 | }, 37 | }); 38 | } 39 | 40 | export { getTheme }; 41 | -------------------------------------------------------------------------------- /src/i18n/ar.json: -------------------------------------------------------------------------------- 1 | { 2 | "lang-code": "ar", 3 | "language": "اللغة", 4 | "english": "الأنجليزية", 5 | "arabic": "العربية", 6 | "home": "الصفحة الرئيسية", 7 | "username": "اسم المستخدم", 8 | "sign-up": "انشاء حساب", 9 | "log-in": "تسجيل الدخول", 10 | "account": "الحساب", 11 | "auth/email-already-in-use": "هذا البريد الإلكتروني تم استخدامه مسبقًا", 12 | "auth/user-disabled": "تم الغاء تفعيل حسابك", 13 | "auth/user-not-found": "اسم المستخدم او كلمة المرور غير صحيحان", 14 | "check-your-internet-connection": "تأكد من الإنترنت الخاص بك", 15 | "username-already-exists": "اسم المستخدم موجود مسبقًا", 16 | "auth/invalid-email": "صيغة البريد الإلكتروني خاطئة", 17 | "auth/weak-password": "كلمة المرور ضعيفة جدًا", 18 | "auth/wrong-password": "اسم المستخدم او كلمة المرور غير صحيحان", 19 | "an-error-occured-please-try-again-later": "حصل خطأ. يرجى المحاولة لاحقًا", 20 | "auth/requires-recent-login": "تغير البريد الإلكتروني او كلمة المرور يتطلب تسجيل دخول حديث. اضغط زر اعادة مصادقة الحساب وحاول مرة اخرى..", 21 | "auth/user-mismatch": "حصل خطأ اثناء اعادة مصادقة حسابك. يرجى تسجيل الخروج والمحاولة مرة أخرى.", 22 | "auth/invalid-credential": "حصل خطأ اثناء اعادة مصادقة حسابك. يرجى تسجيل الخروج والمحاولة مرة أخرى.", 23 | "email": "البريد الإلكتروني", 24 | "password": "كلمة المرور", 25 | "password-confirmation": "تأكيد كلمة المرور", 26 | "password-is-required": "كلمة المرور مطلوبة", 27 | "email-is-required": "البريد الإلكتروني مطلوب", 28 | "username-is-required": "اسم المستخدم مطلوب", 29 | "username-can-only-contain-letters" : "اسم المستخدم يمكن أن يحتوي احرف فقط.", 30 | "invalid-email": "البريد الإلكتروني غير صالح", 31 | "password-is-too-short": "كلمة المرور قصيرة جدًا", 32 | "password-confirmation-is-required": "يجب تأكيد كلمة المرور", 33 | "passwords-dont-match": "كلمتي المرور غير متطابقات", 34 | "this-will-be-used-on-the-leaderboard": "هذا سيستخدم على قائمة الصدارة.", 35 | "something-went-wrong-please-close-the-tab-and-try-again": "حصل خطأ. يرجى اغلاق الصفحة والمحاولة مجددًا.", 36 | "your-username-has-been-updated": "تم تغيير اسم المستخدم.", 37 | "username-too-short": "اسم المستخدم قصير جدًا.", 38 | "username-too-long": "اسم المستخدم طويل جدًا.", 39 | "edit-account": "تعديل الحساب", 40 | "your-email-has-been-updated": "تم تغيير البريد الإلكتروني.", 41 | "password-updated-successfully": "تم تغيير كلمة المرور بنجاح.", 42 | "account-reauthenticated-successfully": "تم اعادة مصادقة حسابك بنجاح", 43 | "edit-the-information-below-then-hit-save": "عدل المعلومات أدناه ثم اضغط حفظ.", 44 | "change-username": "تغيير اسم المستخدم", 45 | "change-email": "تغيير البريد الإلكتروني", 46 | "change-password": "تغيير كلمة المرور", 47 | "enter-your-new-password-below-you-need-to-be-recently-logged-in-to-change-your-password": "ادخل كلم المرور الجديدة ادناه. يجب ان تكون قد سجلت الدخول حديثًا لتغيير كلمة المرور.", 48 | "change": "تغيير", 49 | "re-authenticate-account": "أعد مصادقة الحساب.", 50 | "enter-your-password-below-to-re-authenticate-your-account": "أدخل كلمة المرور لإعادة مصادقة حسابك.", 51 | "re-authenticate": "أعد المصادقة", 52 | "your-points": "نقاطك", 53 | "points": "النقاط", 54 | "latest-try": "آخر محاولة", 55 | "already-have-an-account": "لديك حساب ؟ تسجيل الدخول", 56 | "dont-have-an-account": "ليس لدي حساب", 57 | "forgot-your-password": "نسيت كلمة المرور", 58 | "enter-your-email-below-to-send-instructions-to-reset-your-password": "الرجاء إدخال عنوان البريد الألكتروني أدناه لإرسال تعليمات نسيان كلمة المرور.", 59 | "send": "أرسال", 60 | "email-sent": "تم إرسال البريد الألكتروني", 61 | "congratulations-you-earned-n-points": "تهانينا! لقد حصلت على {{points}} نقاط", 62 | "learn-quran": "تَـعَـلَّـم الـقُـرآن", 63 | "is-a-hybrid-platform-for-testing-your-knowledge-in-the-holy-quran": "هي منصّة هجينة مفتوحة المصدر لإختبار معرفتك بالقرآن الكريم", 64 | "how-to-play": "كيف تلعب", 65 | "landing-page-how-to-play-paragprah": "عندما تقوم بإنشاء حساب سوف يتم تحويلك الى صفحة وسيتم تشغيل اية من سورة عشوائية من القرآن الكريم.هناك اربع اختيارات واحد منها فقط صحيح. الهدف هو ان تعرف من أي سورة الآية هذه مُختارة. حظًا موفقًا", 66 | "inspiration": "الإلهام", 67 | "landing-page-inspiration-paragprah": "صمم هذا المشروع بدايةً لأسباب تعليمية. قبل حوالي سنتين، اصدرت اول تطبيق/لعبة اندرويد مصنوعة باستخدام Unity. وكانت سيئة جدًا. اعادة صنع نفس التطبيق الذي صنعته مسبقًا جعلني آخذ نظرة جديدة على العملية والمجهود الذي قمت بعمله حينها.", 68 | "menu": "القائمة", 69 | "leaderboard": "قائمة الصدارة", 70 | "there-was-an-error-adding-your-points-please-contact-us-to-fix-it": "لقد حدث خطأ في إضافة نقاطك. الرجاء التواصل معنا لإصلاحه", 71 | "try-again": "حاول مُجددًا", 72 | "reset": "إعادة", 73 | "change-volume": "تعديل مُستوى الصوت", 74 | "play-again": "إلعب مرّة أُخرى", 75 | "log-out": "تسجيل الخروج", 76 | "resume-playing": "مُعاودة اللعب", 77 | "please-click-the-button-below-if-no-audio-is-playing": "الرجاء النقر على السهم أدناه لتشغيل الآية إن لم يكن هناك صوت", 78 | "about": "عـنّـا", 79 | "meet-the-people-behind-learn-quran": "القائمون على تَـعَـلَّـم الـقُـرآن ", 80 | "never-played": "لم يلعب مسبقًا", 81 | "download-android-app": "حمّل التطبيق على الأندرويد", 82 | "":"" 83 | } -------------------------------------------------------------------------------- /src/i18n/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "lang-code": "en", 3 | "language": "Language", 4 | "english": "English", 5 | "arabic": "Arabic", 6 | "home": "Home", 7 | "username": "Username", 8 | "sign-up": "Sign Up", 9 | "log-in": "Log In", 10 | "account": "Account", 11 | "auth/email-already-in-use": "This email address has already been taken", 12 | "auth/user-disabled": "Your account has been disabled", 13 | "auth/user-not-found": "Credentials are incorrect", 14 | "check-your-internet-connection": "Check your internet connection", 15 | "username-already-exists": "Username already exists", 16 | "auth/invalid-email": "Invalid e-mail address format", 17 | "auth/weak-password": "Password too weak", 18 | "auth/wrong-password": "Credentials are incorrect", 19 | "an-error-occured-please-try-again-later": "An error occured. Please try again later", 20 | "auth/requires-recent-login": "Changing the email or password requires a recent login. Click the re-authenticate button and try again.", 21 | "auth/user-mismatch": "Something went wrong with reauthenticating your account. Please sign out and try again", 22 | "auth/invalid-credential": "Something went wrong with reauthenticating your account. Please sign out and try again", 23 | "email": "Email", 24 | "password": "Password", 25 | "password-confirmation": "Password confirmation", 26 | "password-is-required": "Password is required", 27 | "email-is-required": "Email is required", 28 | "username-is-required": "Username is required", 29 | "username-can-only-contain-letters" : "Username can only contain letters", 30 | "invalid-email": "Invalid email", 31 | "password-is-too-short": "Password is too short", 32 | "password-confirmation-is-required": "Password confirmation is required", 33 | "passwords-dont-match": "Passwords don't match", 34 | "this-will-be-used-on-the-leaderboard": "This will be used on the leaderboard.", 35 | "something-went-wrong-please-close-the-tab-and-try-again": "Something went wrong. Please close the tab and try again.", 36 | "your-username-has-been-updated": "Your username has been updated", 37 | "username-too-short": "Username too short", 38 | "username-too-long": "Username too long", 39 | "edit-account": "Edit Account", 40 | "your-email-has-been-updated": "Your email has been updated.", 41 | "password-updated-successfully": "Password updated successfully", 42 | "account-reauthenticated-successfully": "Account reauthenticated successfully", 43 | "edit-the-information-below-then-hit-save": "Edit the information below then hit save", 44 | "change-username": "Change username", 45 | "change-email": "Change email", 46 | "change-password": "Change password", 47 | "enter-your-new-password-below-you-need-to-be-recently-logged-in-to-change-your-password": "Enter your new password below. You need to be recently logged-in to change your password.", 48 | "change": "Change", 49 | "re-authenticate-account": "Re-authenticate Account", 50 | "enter-your-password-below-to-re-authenticate-your-account": "Enter your password below to re-authenticate your account.", 51 | "re-authenticate": "Re-authenticate", 52 | "your-points": "Your Points", 53 | "points": "Points", 54 | "latest-try": "Latest Try", 55 | "already-have-an-account": "Already have an account", 56 | "dont-have-an-account": "Don't have an account", 57 | "forgot-your-password": "Forgot my password", 58 | "enter-your-email-below-to-send-instructions-to-reset-your-password": "ُEnter your email below to send password reset instructions to.", 59 | "send": "Send", 60 | "email-sent": "Email sent", 61 | "congratulations-you-earned-n-points": "Congratulations! You earned {{points}} points", 62 | "learn-quran": "Learn Quran", 63 | "is-a-hybrid-platform-for-testing-your-knowledge-in-the-holy-quran": "is a hybrid open-source platform for testing your knowledge in the Holy Quran", 64 | "how-to-play": "How to play", 65 | "landing-page-how-to-play-paragprah": "The idea is that once you create an account you'll be redirected to a page where an audio is playing, the aduio is an Aya (verse) of randomly chosen Sura from the Holy Quran. There are four choices, only one of which is correct. The goal is to guess what Sura the verse playing is from. Have fun!", 66 | "inspiration": "Inspiration", 67 | "landing-page-inspiration-paragprah": "This project was originally created for educational purposes. About two years ago I released my first Android app/game created with Unity, it was horrible, to say the least. Recreating the same app I made when I was first starting has really made me take another look at the process and effort I put in back then.", 68 | "menu": "Menu", 69 | "leaderboard": "Leaderboard", 70 | "there-was-an-error-adding-your-points-please-contact-us-to-fix-it": "There was an error adding your points. Please contact us to fix it", 71 | "try-again": "Try Again", 72 | "reset": "Reset", 73 | "change-volume": "Change Volume", 74 | "play-again": "Play Again", 75 | "log-out": "Log Out", 76 | "resume-playing": "Resume playing", 77 | "please-click-the-button-below-if-no-audio-is-playing": "Please click the button below if no audio is playing", 78 | "about": "About", 79 | "meet-the-people-behind-learn-quran": "Meet the people behind Learn Quran", 80 | "never-played": "Never Played", 81 | "download-android-app": "Download the Android app", 82 | "":"" 83 | } -------------------------------------------------------------------------------- /src/i18n/index.js: -------------------------------------------------------------------------------- 1 | import i18n from 'i18next'; 2 | import { initReactI18next } from 'react-i18next'; 3 | 4 | // Translations 5 | import en from './en.json'; 6 | import ar from './ar.json'; 7 | 8 | i18n.use(initReactI18next).init({ 9 | resources: { 10 | en: { translation: en }, 11 | ar: { translation: ar }, 12 | }, 13 | lng: localStorage.getItem('language') || 'en', 14 | fallbackLng: 'en', 15 | keySeparator: false, 16 | interpolation: { 17 | escapeValue: false, 18 | }, 19 | }); 20 | 21 | export default i18n; 22 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React, { Fragment } from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import { BrowserRouter as Router } from 'react-router-dom'; 4 | import { ToastContainer } from 'react-toastify'; 5 | 6 | import { StylesProvider, ThemeProvider, jssPreset } from '@material-ui/styles'; 7 | import { create } from 'jss'; 8 | import rtl from 'jss-rtl'; 9 | 10 | import Firebase, { FirebaseContext } from './Firebase'; 11 | import { Navigation } from './Navigation'; 12 | import MonitorConnection from './Containers/MonitorConnection'; 13 | import './i18n'; 14 | import { withTranslation } from 'react-i18next'; 15 | import * as moment from 'moment'; 16 | 17 | import PropTypes from 'prop-types'; 18 | import * as serviceWorker from './serviceWorker'; 19 | import './Assets/StyleSheets/index.scss'; 20 | import { getTheme } from './Theme'; 21 | import FAB from './Components/FAB'; 22 | 23 | class App extends React.Component { 24 | static propTypes = { 25 | firebase: PropTypes.object, 26 | t: PropTypes.func, 27 | i18n: PropTypes.object, 28 | }; 29 | constructor(props) { 30 | super(props); 31 | this.state = { 32 | noConnection: false, 33 | user: null, 34 | loading: true, 35 | }; 36 | this.connectedRef = props.firebase.database.ref('.info/connected'); 37 | } 38 | 39 | componentDidMount() { 40 | document.title = this.props.t('learn-quran'); 41 | if (!localStorage.getItem('language')) 42 | localStorage.setItem('language', 'en'); 43 | const { firebase, i18n } = this.props; 44 | const language = localStorage.getItem('language'); 45 | document.documentElement.lang = language; 46 | document.body.classList.add(language === 'en' ? 'ltr' : 'rtl'); 47 | document.body.classList.remove(language === 'en' ? 'rtl' : 'ltr'); 48 | document.body.setAttribute('dir', language === 'en' ? 'ltr' : 'rtl'); 49 | moment.locale(language); 50 | setTimeout(() => { 51 | this.connectedRef.on('value', snap => { 52 | const connected = snap.val(); 53 | clearTimeout(this.connectionTimer); 54 | this.setState({ loading: true, noConnection: false }); 55 | if (connected === true) { 56 | this.unsubscribe = firebase.auth().onAuthStateChanged(user => { 57 | firebase.isLoggedIn = !!user; 58 | this.setState({ loading: false, user: user ? user : null }); 59 | if (user) { 60 | firebase.getUser().then(({ language: userLanguage }) => { 61 | if ( 62 | language !== userLanguage || 63 | i18n.language !== userLanguage 64 | ) { 65 | i18n.changeLanguage(userLanguage).then(() => { 66 | localStorage.setItem('language', userLanguage); 67 | window.location.reload(); 68 | }); 69 | } 70 | }); 71 | } 72 | }); 73 | } else { 74 | this.connectionTimer = setTimeout( 75 | () => this.setState({ noConnection: true, loading: false }), 76 | 5000, 77 | ); 78 | } 79 | }); 80 | }, 1000); 81 | } 82 | componentWillUnmount() { 83 | this.unsubscribe(); 84 | this.connectedRef.off(); 85 | } 86 | 87 | render() { 88 | const { user, loading, noConnection } = this.state; 89 | const language = localStorage.getItem('language') || 'en'; 90 | const jss = create( 91 | language === 'en' 92 | ? { 93 | plugins: [...jssPreset().plugins], 94 | } 95 | : { 96 | plugins: [...jssPreset().plugins, rtl()], 97 | }, 98 | ); 99 | const theme = getTheme(language); 100 | 101 | return ( 102 | 103 | 104 | 105 | 106 | 107 | 108 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | ); 119 | } 120 | } 121 | 122 | const WrappedApp = withTranslation()(App); 123 | 124 | ReactDOM.render( 125 | 126 | 127 | {firebase => } 128 | 129 | , 130 | document.getElementById('root'), 131 | ); 132 | 133 | // If you want your app to work offline and load faster, you can change 134 | // unregister() to register() below. Note this comes with some pitfalls. 135 | // Learn more about service workers: https://bit.ly/CRA-PWA 136 | serviceWorker.unregister(); 137 | -------------------------------------------------------------------------------- /src/serviceWorker.js: -------------------------------------------------------------------------------- 1 | // This optional code is used to register a service worker. 2 | // register() is not called by default. 3 | 4 | // This lets the app load faster on subsequent visits in production, and gives 5 | // it offline capabilities. However, it also means that developers (and users) 6 | // will only see deployed updates on subsequent visits to a page, after all the 7 | // existing tabs open on the page have been closed, since previously cached 8 | // resources are updated in the background. 9 | 10 | // To learn more about the benefits of this model and instructions on how to 11 | // opt-in, read https://bit.ly/CRA-PWA 12 | 13 | const isLocalhost = Boolean( 14 | window.location.hostname === 'localhost' || 15 | // [::1] is the IPv6 localhost address. 16 | window.location.hostname === '[::1]' || 17 | // 127.0.0.1/8 is considered localhost for IPv4. 18 | window.location.hostname.match( 19 | /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ 20 | ) 21 | ); 22 | 23 | export function register(config) { 24 | if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { 25 | // The URL constructor is available in all browsers that support SW. 26 | const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href); 27 | if (publicUrl.origin !== window.location.origin) { 28 | // Our service worker won't work if PUBLIC_URL is on a different origin 29 | // from what our page is served on. This might happen if a CDN is used to 30 | // serve assets; see https://github.com/facebook/create-react-app/issues/2374 31 | return; 32 | } 33 | 34 | window.addEventListener('load', () => { 35 | const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; 36 | 37 | if (isLocalhost) { 38 | // This is running on localhost. Let's check if a service worker still exists or not. 39 | checkValidServiceWorker(swUrl, config); 40 | 41 | // Add some additional logging to localhost, pointing developers to the 42 | // service worker/PWA documentation. 43 | navigator.serviceWorker.ready.then(() => { 44 | console.log( 45 | 'This web app is being served cache-first by a service ' + 46 | 'worker. To learn more, visit https://bit.ly/CRA-PWA' 47 | ); 48 | }); 49 | } else { 50 | // Is not localhost. Just register service worker 51 | registerValidSW(swUrl, config); 52 | } 53 | }); 54 | } 55 | } 56 | 57 | function registerValidSW(swUrl, config) { 58 | navigator.serviceWorker 59 | .register(swUrl) 60 | .then(registration => { 61 | registration.onupdatefound = () => { 62 | const installingWorker = registration.installing; 63 | if (installingWorker == null) { 64 | return; 65 | } 66 | installingWorker.onstatechange = () => { 67 | if (installingWorker.state === 'installed') { 68 | if (navigator.serviceWorker.controller) { 69 | // At this point, the updated precached content has been fetched, 70 | // but the previous service worker will still serve the older 71 | // content until all client tabs are closed. 72 | console.log( 73 | 'New content is available and will be used when all ' + 74 | 'tabs for this page are closed. See https://bit.ly/CRA-PWA.' 75 | ); 76 | 77 | // Execute callback 78 | if (config && config.onUpdate) { 79 | config.onUpdate(registration); 80 | } 81 | } else { 82 | // At this point, everything has been precached. 83 | // It's the perfect time to display a 84 | // "Content is cached for offline use." message. 85 | console.log('Content is cached for offline use.'); 86 | 87 | // Execute callback 88 | if (config && config.onSuccess) { 89 | config.onSuccess(registration); 90 | } 91 | } 92 | } 93 | }; 94 | }; 95 | }) 96 | .catch(error => { 97 | console.error('Error during service worker registration:', error); 98 | }); 99 | } 100 | 101 | function checkValidServiceWorker(swUrl, config) { 102 | // Check if the service worker can be found. If it can't reload the page. 103 | fetch(swUrl) 104 | .then(response => { 105 | // Ensure service worker exists, and that we really are getting a JS file. 106 | const contentType = response.headers.get('content-type'); 107 | if ( 108 | response.status === 404 || 109 | (contentType != null && contentType.indexOf('javascript') === -1) 110 | ) { 111 | // No service worker found. Probably a different app. Reload the page. 112 | navigator.serviceWorker.ready.then(registration => { 113 | registration.unregister().then(() => { 114 | window.location.reload(); 115 | }); 116 | }); 117 | } else { 118 | // Service worker found. Proceed as normal. 119 | registerValidSW(swUrl, config); 120 | } 121 | }) 122 | .catch(() => { 123 | console.log( 124 | 'No internet connection found. App is running in offline mode.' 125 | ); 126 | }); 127 | } 128 | 129 | export function unregister() { 130 | if ('serviceWorker' in navigator) { 131 | navigator.serviceWorker.ready.then(registration => { 132 | registration.unregister(); 133 | }); 134 | } 135 | } 136 | --------------------------------------------------------------------------------