diff --git a/.babelrc b/.babelrc index aef13b0f4..da23eb94d 100644 --- a/.babelrc +++ b/.babelrc @@ -3,15 +3,12 @@ "plugins": [ "transform-runtime", "transform-decorators-legacy", - "transform-react-display-name", - ["system-import-transformer", {"modules": "common"}] + "transform-react-display-name", ["system-import-transformer", { + "modules": "common" + }], + "transform-react-require", "external-helpers", "transform-export-extensions" ], "env": { - "development": { - "plugins": [ - "typecheck" - ] - }, "production": { "plugins": [ "transform-react-inline-elements", diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..905229f48 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,42 @@ +version: 2 +jobs: + build: + docker: + - image: circleci/node:latest + steps: + - checkout + - run: + name: install + command: npm install + - run: + name: rebuildSass + command: npm rebuild node-sass + - run: + name: build + command: npm run build + - run: + name: bundlesize + command: npm run bundlesize + test: + docker: + - image: circleci/node:latest + steps: + - checkout + - run: + name: install + command: npm install + - run: + name: lint + command: npm run lint + - run: + name: jest + command: npm run jest -- --forceExit --detectOpenHandles --runInBand + - run: + name: typescript + command: npm run type +workflows: + version: 2 + test_and_build: + jobs: + - build + - test diff --git a/.env b/.env index 2c85a0ee9..ff2ce6946 100644 --- a/.env +++ b/.env @@ -1,9 +1,11 @@ NODE_ENV=development PORT=8000 -API_URL=http://staging.quran.com:3000 +API_URL=https://staging.quran.com:3000 ONE_QURAN_URL=http://localhost:3030 SEGMENTS_KEY= SENTRY_KEY_CLIENT= SENTRY_KEY_SERVER= # Quran.com - development app, no need to worry! FACEBOOK_APP_ID=1599019233731707 +FONTS_URL=//quran-1f14.kxcdn.com +AUDIO_CDN=//audio.qurancdn.com diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index e69de29bb..000000000 diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index e9c306bef..000000000 --- a/.eslintrc +++ /dev/null @@ -1,53 +0,0 @@ -{ - "extends": "airbnb", - "parser": "babel-eslint", - "rules": { - "comma-dangle": 0, - "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], - "import/no-extraneous-dependencies": 0, - "import/prefer-default-export": 1, - "import/extensions": 0, - "import/no-unresolved": 0, - "property": 0, - "no-mixed-operators": 0, - "strict": 0 - }, - "ecmaFeatures": { - "classes": true, - "jsx": true - }, - "plugins": [ - "react", - "mocha" - ], - "settings": { - "import/resolver": "webpack" - }, - "parserOptions":{ - "ecmaFeatures": { - "experimentalObjectRestSpread": true - } - }, - "globals": { - "__DEVELOPMENT__": true, - "__CLIENT__": true, - "__SERVER__": true, - "__DISABLE_SSR__": true, - "__DEVTOOLS__": true, - "socket": true, - "webpackIsomorphicTools": true, - ga: true, - Raven: true, - mixpanel: true, - "expect": true, - "browser": true, - "import": true, - "FB": true, - "window": true, - sinon: true - }, - "env": { - "mocha": true, - "amd": true - } -} diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 000000000..d587009ee --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,11 @@ +const path = require('path'); + +const paths = [path.join(__dirname, './config/eslint/base.js')]; + +paths.push(path.join(__dirname, './config/eslint/typescript.js')); + +paths.push(path.join(__dirname, './config/eslint/prettier.js')); + +module.exports = { + extends: paths, +}; diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 94% rename from CONTRIBUTING.md rename to .github/CONTRIBUTING.md index 4b545569f..2e6de0e8d 100644 --- a/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,12 +1,13 @@ # Contributing -You want to help? You rock! Now, take a moment to be sure your contributions make sense to everyone else. +Thank you very much for your interest to help. We could use as much help as possible from our community. ## Reporting Issues Found a problem? Want a new feature? - See if your issue or idea has [already been reported]. +- File a new issue in Github. ## Submitting Pull Requests diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 000000000..50fb39f19 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,26 @@ + + +**I'm submitting a ...** + +- [ ] bug report +- [ ] feature request +- [ ] other + +**Current behavior:** + + +**Expected / new behavior:** + + +**For issue, please provide steps to reproduce it:** +- Steps +- to +- reproduce + +**Anything else:** + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..45573b558 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,12 @@ +### Title of change +_why the change and what has changed_ + +### Checklist + +- [ ] Unit tests written +- [ ] Manually tested +- [ ] Prettier & ESLint were run +- [ ] New dependencies are included in `package-lock.json` + +### Screenshot +_insert screenshot if needed_ diff --git a/.gitignore b/.gitignore index 54d5ca4a0..8d11bd280 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,5 @@ selenium-debug.log webpack-stats.debug.json *.DS_Store .vscode +coverage/ +.awcache diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29bb..000000000 diff --git a/.jshintignore b/.jshintignore deleted file mode 100644 index 3c3629e64..000000000 --- a/.jshintignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index 997b3f7d4..000000000 --- a/.jshintrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "node": true, - - "curly": true, - "latedef": true, - "quotmark": true, - "undef": true, - "unused": true, - "trailing": true -} diff --git a/.nvmrc b/.nvmrc index 798e38995..486db3361 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -6.3.0 +8.9.1 diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 000000000..36594731e --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,8 @@ +module.exports = { + useTabs: false, + printWidth: 80, + tabWidth: 2, + singleQuote: true, + trailingComma: 'es5', + jsxBracketSameLine: false, +}; diff --git a/.storybook/config.js b/.storybook/config.js new file mode 100644 index 000000000..66b72b70c --- /dev/null +++ b/.storybook/config.js @@ -0,0 +1,29 @@ +import React from 'react'; +import { configure, addDecorator } from '@storybook/react'; +import { withInfo } from '@storybook/addon-info'; + +import { ThemeProvider } from 'styled-components'; +import { IntlProvider } from 'react-intl'; + +import getLocalMessages from '../src/helpers/setLocal'; +import theme from '../src/theme'; + +global.__CLIENT__ = true; + +addDecorator((story, context) => withInfo('common info')(story)(context)); + +addDecorator(story => + + + {story()} + + +); + +const req = require.context('../src/components', true, /\.stories\.js$/); + +function loadStories() { + req.keys().forEach(filename => req(filename)); +} + +configure(loadStories, module); diff --git a/.storybook/preview-head.html b/.storybook/preview-head.html new file mode 100644 index 000000000..71146a17b --- /dev/null +++ b/.storybook/preview-head.html @@ -0,0 +1 @@ + diff --git a/.storybook/webpack.config.js b/.storybook/webpack.config.js new file mode 100644 index 000000000..3186d4cdd --- /dev/null +++ b/.storybook/webpack.config.js @@ -0,0 +1,22 @@ +// you can use this file to add your custom webpack plugins, loaders and anything you like. +// This is just the basic way to add additional webpack configurations. +// For more information refer the docs: https://storybook.js.org/configurations/custom-webpack-config + +// IMPORTANT +// When you add this file, we won't add the default configurations which is similar +// to "React Create App". This only has babel loader to load JavaScript. + +module.exports = { + resolve: { + extensions: ['.js'], + modules: ['src', 'node_modules'] + }, + plugins: [ + // your custom plugins + ], + module: { + rules: [ + // add your custom rules. + ] + } +}; diff --git a/.stylelintrc.js b/.stylelintrc.js new file mode 100644 index 000000000..24f4ba5b1 --- /dev/null +++ b/.stylelintrc.js @@ -0,0 +1,7 @@ +module.exports = { + rules: { + 'unit-no-unknown': true, + 'no-duplicate-selectors': true, + 'block-no-empty': true, + }, +}; diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e14961bd0..000000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -sudo: false -language: node_js -env: TEST_SUITE=unit -# Node version is handled inside `.nvmrc` file & travis picks it up automatically because it uses `nvm` -# https://docs.travis-ci.com/user/languages/javascript-with-nodejs#Using-.nvmrc -cache: - directories: - - node_modules -install: - - npm install -notifications: - email: false - -script: "npm run test:ci:$TEST_SUITE" diff --git a/Dockerfile b/Dockerfile index a43d27e73..f0d80881d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ -FROM node:6.3 +FROM node:8.9 ENV NODE_ENV production ENV API_URL http://api.quran.com:3000 -ENV SENTRY_KEY_CLIENT https://44c105328ae544ae9928f9eb74b40061@app.getsentry.com/80639 -ENV SENTRY_KEY_SERVER https://44c105328ae544ae9928f9eb74b40061:41ca814d33124e04ab450104c3938cb1@app.getsentry.com/80639 -# It's okay because it's only the APP ID -ENV FACEBOOK_APP_ID 1557596491207315 +ENV SENTRY_KEY_CLIENT https://app.getsentry.com +ENV SENTRY_KEY_SERVER https://app.getsentry.com + +ENV FACEBOOK_APP_ID appid ENV ONE_QURAN_URL https://one.quran.com ENV PORT 8000 ENV NODE_PATH "./src" diff --git a/LICENSE.md b/LICENSE.md index d932105ee..527297d18 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,21 +1,674 @@ -MIT License - -Copyright (c) 2016 Quran.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + Quran.com is a Quran reading application. + Copyright (C) 2017 Quran.com + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Quran.com Copyright (C) 2017 Quran.com + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/README.md b/README.md index 8df3ca96f..d54857fe9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Quran.com [![SLACK](http://i.imgur.com/Lk5HsBo.png)](https://quranslack.herokuapp.com) +# Quran.com [![CircleCI](https://circleci.com/gh/quran/quran.com-frontend.svg?style=svg)](https://circleci.com/gh/quran/common-components) This project is the frontend for Quran.com. It is built using [Reactjs] + [Redux] + [Expressjs] + [Webpack]. It is isomorphic (javascript shared @@ -15,38 +15,32 @@ Read the [contributing] section before creating an issue. - Ensure you have [nodejs] installed - Get the source by running `git clone https://github.com/quran/quran.com-frontend/` or creating a [fork] - Run `npm install` to do first time installation of all dependencies -- Run `npm run dev` to start the dev server. Make sure you have pm2 installed globally! `npm install -g pm2` +- Run `npm run dev` to start the dev server. - Open `http://localhost:8000` in your browser to see the app. ## Staging To see the app with the latest changes, see the [staging] site. Production releases are made periodically when staging is stable and well tested. ## Backend -The API source is at https://github.com/quran/quran-api-rails +The API source is at https://github.com/quran/quran.com-api -DB is private, message @mmahalwy for access. +DB is private. Message on Slack to requrest access. The dev server uses the staging API by default. If you want to use a local API server, follow the instructions in the API repo and run the server locally then update the API_URL field in app.json to point to the local address. ## Slack -Signup at https://quranslack.herokuapp.com to be added to the Slack group +Create an issue with your email for us to add you to the Slack group ## Design We currently use InvisionApp. Again, contact me if you'd like access to it. -## Making sure main.js is small -Follow: https://www.npmjs.com/package/webpack-bundle-size-analyzer -``` -env NODE_ENV=development webpack --json > bundle-stats.json -subl bundle-stats.json #so that you can the output -analyze-bundle-size bundle-stats.json -``` [Reactjs]: https://facebook.github.io/react/docs/getting-started.html [Redux]: http://redux.js.org/ +[styled-components]: http://styled-components.com [Expressjs]: http://expressjs.com/en/starter/hello-world.html [Webpack]: http://webpack.github.io/docs/what-is-webpack.html [nodejs]: https://nodejs.org/en/ -[contributing]: CONTRIBUTING.md +[contributing]: .github/CONTRIBUTING.md [fork]: https://help.github.com/articles/fork-a-repo/ [staging]: https://staging.quran.com diff --git a/app.json b/app.json deleted file mode 100644 index 4d1f8761f..000000000 --- a/app.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "quran.com-frontend", - "scripts": { - }, - "env": { - "API_URL": "http://api.quran.com:3000", - "USE_LOCAL_ASSETS": "true" - }, - "formation": { - }, - "addons": [ - - ], - "buildpacks": [ - ] -} diff --git a/bin/server.js b/bin/server.js deleted file mode 100644 index 303749064..000000000 --- a/bin/server.js +++ /dev/null @@ -1,38 +0,0 @@ -require('dotenv').load(); -require('app-module-path').addPath(__dirname); -require('app-module-path').addPath('../src'); - -var fs = require('fs'); -var path = require('path'); -var webpackIsomorphicTools = require('webpack-isomorphic-tools'); -var babelrc = fs.readFileSync('./.babelrc'); -var rootDir = path.resolve(__dirname, '..'); -var config; - -try { - config = JSON.parse(babelrc); -} catch (err) { - console.error('==> ERROR: Error parsing your .babelrc.'); - console.error(err); -} - -require('babel-register')(config); - -global.__CLIENT__ = false; -global.__SERVER__ = true; -global.__DEVELOPMENT__ = process.env.NODE_ENV !== 'production'; - -if (__DEVELOPMENT__) { - if (!require('piping')({ - hook: true, - ignore: /(\/\.|~$|\.json|\.scss$)/i - })) { - return; - } -} - -global.webpack_isomorphic_tools = new webpackIsomorphicTools(require('../webpack/isomorphic-tools-configuration')) -.development(process.env.NODE_ENV === 'development') -.server(rootDir, function() { - require('../src/server.js').default(); -}); diff --git a/bin/server.prod.js b/bin/server.prod.js deleted file mode 100644 index 880fbbfa5..000000000 --- a/bin/server.prod.js +++ /dev/null @@ -1,17 +0,0 @@ -require('dotenv').load(); -require('app-module-path').addPath(__dirname); -require('app-module-path').addPath('../dist'); - -var webpackIsomorphicTools = require('webpack-isomorphic-tools'); -var path = require('path'); -var rootDir = path.resolve(__dirname, '../dist'); - -global.__CLIENT__ = false; -global.__SERVER__ = true; -global.__DEVELOPMENT__ = process.env.NODE_ENV !== 'production'; - -global.webpack_isomorphic_tools = new webpackIsomorphicTools(require('../webpack/isomorphic-tools-configuration')) -.development(__DEVELOPMENT__) -.server(rootDir, function() { - require('../dist/server.js').default(); -}); diff --git a/config/components/ClientConfig.tsx b/config/components/ClientConfig.tsx new file mode 100644 index 000000000..f716b549c --- /dev/null +++ b/config/components/ClientConfig.tsx @@ -0,0 +1,43 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import serialize from 'serialize-javascript'; +import filterWithRules from '../../shared/utils/objects/filterWithRules'; +import values from '../values'; + +// Filter the config down to the properties that are allowed to be included +// in the HTML response. +const clientConfig = filterWithRules( + // These are the rules used to filter the config. + values.clientConfigFilter, + // The config values to filter. + values +); + +const serializedClientConfig = serialize(clientConfig); + +type Props = { + nonce: string; +}; +/** + * A react component that generates a script tag that binds the allowed + * values to the window so that config values can be read within the + * browser. + * + * They get bound to window.__CLIENT_CONFIG__ + */ +const ClientConfig: React.SFC = ({ nonce }: Props) => ( + */ -if (/(MSIE [7-9]\.|Opera.*Version\/(10\.[5-9]|(11|12)\.)|Chrome\/([1-9]|10)\.|Version\/[2-4][\.0-9]+ Safari\/|Version\/(4\.0\.[4-9]|4\.[1-9]|5\.0)[\.0-9]+? Mobile\/.*Safari\/|Android ([1-2]|4\.[2-9].*Version\/4)\.|BlackBerry.*WebKit)/.test(navigator.userAgent) && !/(IEMobile)/.test(navigator.userAgent)) { - +if ( + /(MSIE [7-9]\.|Opera.*Version\/(10\.[5-9]|(11|12)\.)|Chrome\/([1-9]|10)\.|Version\/[2-4][\.0-9]+ Safari\/|Version\/(4\.0\.[4-9]|4\.[1-9]|5\.0)[\.0-9]+? Mobile\/.*Safari\/|Android ([1-2]|4\.[2-9].*Version\/4)\.|BlackBerry.*WebKit)/.test( + navigator.userAgent + ) && + !/(IEMobile)/.test(navigator.userAgent) +) { if (/Android 4\.[2-9].*Version\/4/.test(navigator.userAgent)) { var ss_android = document.createElement('style'); - ss_android.innerHTML = '.ss-icon,[class^="ss-"],[class*=" ss-"],[class^="ss-"]:before,[class*=" ss-"]:before,[class^="ss-"].right:after[class*=" ss-"].right:after{text-rendering:auto!important}'; + ss_android.innerHTML = + '.ss-icon,[class^="ss-"],[class*=" ss-"],[class^="ss-"]:before,[class*=" ss-"]:before,[class^="ss-"].right:after[class*=" ss-"].right:after{text-rendering:auto!important}'; document.body.appendChild(ss_android); } - var ss_set={'notifications disabled':'\uD83D\uDD15','notificationsdisabled':'\uD83D\uDD15','notification disabled':'\uD83D\uDD15','notificationdisabled':'\uD83D\uDD15','telephone disabled':'\uE300','telephonedisabled':'\uE300','writing disabled':'\uE071','writingdisabled':'\uE071','pencil disabled':'\uE071','remove calendar':'\uF071','calendar remove':'\uF071','delete calendar':'\uF073','calendar delete':'\uF073','pencildisabled':'\uE071','phone disabled':'\uE300','medium battery':'\uEA11','battery medium':'\uEA11','download cloud':'\uEB00','cloud download':'\uEB00','removecalendar':'\uF071','calendarremove':'\uF071','check calendar':'\uF072','calendar check':'\uF072','deletecalendar':'\uF073','calendardelete':'\uF073','navigate right':'\u25BB','phonedisabled':'\uE300','call disabled':'\uE300','ellipsis chat':'\uE399','female avatar':'\uD83D\uDC67','shopping cart':'\uE500','mediumbattery':'\uEA11','batterymedium':'\uEA11','empty battery':'\uEA13','battery empty':'\uEA13','downloadcloud':'\uEB00','clouddownload':'\uEB00','notifications':'\uD83D\uDD14','bell disabled':'\uD83D\uDD15','checkcalendar':'\uF072','calendarcheck':'\uF072','navigateright':'\u25BB','navigate down':'\uF501','navigate left':'\u25C5','calldisabled':'\uE300','ellipsischat':'\uE399','femaleavatar':'\uD83D\uDC67','shoppingcart':'\uE500','fast forward':'\u23E9','skip forward':'\u23ED','mobile phone':'\uD83D\uDCF1','full battery':'\uD83D\uDD0B','battery full':'\uD83D\uDD0B','high battery':'\uEA10','battery high':'\uEA10','emptybattery':'\uEA13','batteryempty':'\uEA13','upload cloud':'\uEB40','cloud upload':'\uEB40','rotate right':'\u21BB','notification':'\uD83D\uDD14','belldisabled':'\uD83D\uDD15','add calendar':'\uF070','calendar add':'\uF070','navigatedown':'\uF501','navigateleft':'\u25C5','direct right':'\u25B9','thumbs down':'\uD83D\uDC4E','male avatar':'\uD83D\uDC64','female user':'\uD83D\uDC67','credit card':'\uD83D\uDCB3','dollar sign':'\uD83D\uDCB2','high volume':'\uD83D\uDD0A','volume high':'\uD83D\uDD0A','photographs':'\uD83C\uDF04','videocamera':'\uD83D\uDCF9','fastforward':'\u23E9','skipforward':'\u23ED','rotate left':'\u21BA','mobilephone':'\uD83D\uDCF1','fullbattery':'\uD83D\uDD0B','batteryfull':'\uD83D\uDD0B','highbattery':'\uEA10','batteryhigh':'\uEA10','low battery':'\uEA12','battery low':'\uEA12','uploadcloud':'\uEB40','cloudupload':'\uEB40','rotateright':'\u21BB','information':'\u2139','addcalendar':'\uF070','calendaradd':'\uF070','remove date':'\uF071','delete date':'\uF073','navigate up':'\uF500','directright':'\u25B9','direct down':'\u25BE','direct left':'\u25C3','screenshot':'\u2316','visibility':'\uD83D\uDC40','attachment':'\uD83D\uDCCE','disapprove':'\uD83D\uDC4E','thumbsdown':'\uD83D\uDC4E','half heart':'\uE1A0','eyedropper':'\uE200','maleavatar':'\uD83D\uDC64','femaleuser':'\uD83D\uDC67','creditcard':'\uD83D\uDCB3','dollarsign':'\uD83D\uDCB2','navigation':'\uE670','directions':'\uE672','hard drive':'\uE7B0','microphone':'\uD83C\uDFA4','low volume':'\uD83D\uDD09','volume low':'\uD83D\uDD09','highvolume':'\uD83D\uDD0A','volumehigh':'\uD83D\uDD0A','photograph':'\uD83C\uDF04','rotateleft':'\u21BA','thumbnails':'\uE9A3','cell phone':'\uD83D\uDCF1','smartphone':'\uD83D\uDCF1','lowbattery':'\uEA12','batterylow':'\uEA12','connection':'\uEB85','pull quote':'\u201C','removedate':'\uF071','check date':'\uF072','deletedate':'\uF073','down right':'\u2B0A','navigateup':'\uF500','descending':'\u25BE','directdown':'\u25BE','directleft':'\u25C3','crosshair':'\u2316','paperclip':'\uD83D\uDCCE','backspace':'\u232B','thumbs up':'\uD83D\uDC4D','halfheart':'\uE1A0','half star':'\uE1A1','telephone':'\uD83D\uDCDE','male user':'\uD83D\uDC64','bar chart':'\uD83D\uDCCA','pie chart':'\uE570','buildings':'\uD83C\uDFE2','warehouse':'\uE602','harddrive':'\uE7B0','musicnote':'\u266B','lowvolume':'\uD83D\uDD09','volumelow':'\uD83D\uDD09','skip back':'\u23EE','open book':'\uD83D\uDCD6','newspaper':'\uD83D\uDCF0','cellphone':'\uD83D\uDCF1','lightbulb':'\uD83D\uDCA1','pullquote':'\u201C','checkmark':'\u2713','dashboard':'\uF000','stopwatch':'\u23F1','checkdate':'\uF072','briefcase':'\uD83D\uDCBC','downright':'\u2B0A','down left':'\u2B0B','ascending':'\u25B4','direct up':'\u25B4','zoom out':'\uE003','unlocked':'\uD83D\uDD13','insecure':'\uD83D\uDD13','trashcan':'\uE0D0','keywords':'\uE100','bookmark':'\uD83D\uDD16','thumbsup':'\uD83D\uDC4D','favorite':'\u22C6','halfstar':'\uE1A1','end call':'\uE300','facetime':'\uE320','envelope':'\u2709','ellipsis':'\u2026','maleuser':'\uD83D\uDC64','barchart':'\uD83D\uDCCA','piechart':'\uE570','navigate':'\uE670','signpost':'\uE672','location':'\uE6D0','database':'\uE7A0','pictures':'\uD83C\uDF04','skipback':'\u23EE','openbook':'\uD83D\uDCD6','notebook':'\uD83D\uDCD3','computer':'\uD83D\uDCBB','download':'\uEB01','transfer':'\u21C6','document':'\uD83D\uDCC4','typeface':'\uED01','redirect':'\u21AA','contract':'\uEE01','question':'\u2753','sign out':'\uEE02','subtract':'\u002D','settings':'\u2699','calendar':'\uD83D\uDCC5','add date':'\uF070','up right':'\u2B08','downleft':'\u2B0B','previous':'\u25C5','directup':'\u25B4','dropdown':'\u25BE','zoom in':'\uE002','zoomout':'\uE003','visible':'\uD83D\uDC40','compose':'\uD83D\uDCDD','private':'\uD83D\uDD12','keyword':'\uE100','approve':'\uD83D\uDC4D','dislike':'\uD83D\uDC4E','windows':'\uE202','endcall':'\uE300','comment':'\uD83D\uDCAC','avatars':'\uD83D\uDC65','package':'\uD83D\uDCE6','compass':'\uE671','dictate':'\uD83C\uDFA4','speaker':'\uD83D\uDD08','airplay':'\uE800','picture':'\uD83C\uDF04','shuffle':'\uD83D\uDD00','columns':'\uE9A2','desktop':'\uD83D\uDCBB','display':'\uD83D\uDCBB','monitor':'\uD83D\uDCBB','battery':'\uD83D\uDD0B','refresh':'\u21BB','syncing':'\uEB82','loading':'\uEB83','printer':'\u2399','warning':'\u26A0','caution':'\u26D4','log out':'\uEE02','signout':'\uEE02','checked':'\u2713','adddate':'\uF070','droplet':'\uD83D\uDCA7','upright':'\u2B08','forward':'\u27A1','up left':'\u2B09','descend':'\u25BE','retweet':'\uF600','cursor':'\uE001','search':'\uD83D\uDD0E','zoomin':'\uE002','attach':'\uD83D\uDCCE','pencil':'\u270E','eraser':'\u2710','locked':'\uD83D\uDD12','secure':'\uD83D\uDD12','unlock':'\uD83D\uDD13','public':'\uD83D\uDD13','target':'\u25CE','tagged':'\uE100','sample':'\uE200','layers':'\uE202','stroke':'\uE241','avatar':'\uD83D\uDC64','locate':'\uE670','volume':'\uD83D\uDD08','camera':'\uD83D\uDCF7','images':'\uD83C\uDF04','photos':'\uD83C\uDF04','videos':'\uD83D\uDCF9','record':'\u25CF','rewind':'\u23EA','repeat':'\uD83D\uDD01','replay':'\u21BA','filter':'\uE9B0','funnel':'\uE9B0','laptop':'\uEA00','tablet':'\uEA01','iphone':'\uD83D\uDCF1','mobile':'\uD83D\uDCF1','upload':'\uEB41','folder':'\uD83D\uDCC1','layout':'\uEDA0','action':'\uEE00','expand':'\u2922','logout':'\uEE02','hyphen':'\u002D','remove':'\u002D','delete':'\u2421','upleft':'\u2B09','ascend':'\u25B4','write':'\u270E','erase':'\u2710','trash':'\uE0D0','heart':'\u2665','zelda':'\uE1A0','phone':'\uD83D\uDCDE','reply':'\u21A9','email':'\u2709','inbox':'\uD83D\uDCE5','users':'\uD83D\uDC65','price':'\uD83D\uDCB2','house':'\u2302','globe':'\uD83C\uDF0E','earth':'\uD83C\uDF0E','world':'\uD83C\uDF0E','music':'\u266B','audio':'\u266B','sound':'\uD83D\uDD08','image':'\uD83C\uDF04','photo':'\uD83C\uDF04','video':'\uD83D\uDCF9','pause':'\uE8A0','eject':'\u23CF','merge':'\uEB81','nodes':'\uEB85','quote':'\u201C','print':'\u2399','share':'\uEE00','visit':'\uEE00','alert':'\u26A0','minus':'\u002D','check':'\u2713','close':'\u2421','clock':'\u23F2','timer':'\u23F1','plane':'\u2708','cloud':'\u2601','flask':'\uF4C0','right':'\u27A1','zoom':'\uE002','view':'\uD83D\uDC40','look':'\uD83D\uDC40','link':'\uD83D\uDD17','move':'\uE070','edit':'\u270E','lock':'\uD83D\uDD12','tags':'\uE100','flag':'\u2691','like':'\uD83D\uDC4D','love':'\u2665','star':'\u22C6','crop':'\uE201','fill':'\uE240','call':'\uD83D\uDCDE','send':'\uE350','mail':'\u2709','chat':'\uD83D\uDCAC','talk':'\uD83D\uDCAC','user':'\uD83D\uDC64','cart':'\uE500','cost':'\uD83D\uDCB2','home':'\u2302','city':'\uD83C\uDFE2','play':'\u25B6','stop':'\u25A0','skip':'\u23ED','undo':'\u21BA','book':'\uD83D\uDCD5','news':'\uD83D\uDCF0','grid':'\uE9A0','rows':'\uE9A1','ipad':'\uEA01','cell':'\uD83D\uDCF1','idea':'\uD83D\uDCA1','fork':'\uEB80','redo':'\u21BB','sync':'\uEB82','wifi':'\uEB84','file':'\uD83D\uDCC4','page':'\uD83D\uDCC4','text':'\uED00','font':'\uED01','list':'\uED50','help':'\u2753','info':'\u2139','exit':'\uEE02','plus':'\u002B','gear':'\u2699','bell':'\uD83D\uDD14','time':'\u23F2','date':'\uD83D\uDCC5','work':'\uD83D\uDCBC','drop':'\uD83D\uDCA7','down':'\u2B07','left':'\u2B05','back':'\u2B05','next':'\u25BB','eye':'\uD83D\uDC40','key':'\uD83D\uDD11','ban':'\uD83D\uDEAB','tag':'\uE100','rss':'\uE310','box':'\uD83D\uDCE6','map':'\uE673','pin':'\uD83D\uDCCD','hdd':'\uE7B0','mic':'\uD83C\uDFA4','fax':'\uD83D\uDCE0','out':'\uEE00','add':'\u002B','cog':'\u2699','up':'\u2B06'}; + var ss_set = { + 'notifications disabled': '\uD83D\uDD15', + notificationsdisabled: '\uD83D\uDD15', + 'notification disabled': '\uD83D\uDD15', + notificationdisabled: '\uD83D\uDD15', + 'telephone disabled': '\uE300', + telephonedisabled: '\uE300', + 'writing disabled': '\uE071', + writingdisabled: '\uE071', + 'pencil disabled': '\uE071', + 'remove calendar': '\uF071', + 'calendar remove': '\uF071', + 'delete calendar': '\uF073', + 'calendar delete': '\uF073', + pencildisabled: '\uE071', + 'phone disabled': '\uE300', + 'medium battery': '\uEA11', + 'battery medium': '\uEA11', + 'download cloud': '\uEB00', + 'cloud download': '\uEB00', + removecalendar: '\uF071', + calendarremove: '\uF071', + 'check calendar': '\uF072', + 'calendar check': '\uF072', + deletecalendar: '\uF073', + calendardelete: '\uF073', + 'navigate right': '\u25BB', + phonedisabled: '\uE300', + 'call disabled': '\uE300', + 'ellipsis chat': '\uE399', + 'female avatar': '\uD83D\uDC67', + 'shopping cart': '\uE500', + mediumbattery: '\uEA11', + batterymedium: '\uEA11', + 'empty battery': '\uEA13', + 'battery empty': '\uEA13', + downloadcloud: '\uEB00', + clouddownload: '\uEB00', + notifications: '\uD83D\uDD14', + 'bell disabled': '\uD83D\uDD15', + checkcalendar: '\uF072', + calendarcheck: '\uF072', + navigateright: '\u25BB', + 'navigate down': '\uF501', + 'navigate left': '\u25C5', + calldisabled: '\uE300', + ellipsischat: '\uE399', + femaleavatar: '\uD83D\uDC67', + shoppingcart: '\uE500', + 'fast forward': '\u23E9', + 'skip forward': '\u23ED', + 'mobile phone': '\uD83D\uDCF1', + 'full battery': '\uD83D\uDD0B', + 'battery full': '\uD83D\uDD0B', + 'high battery': '\uEA10', + 'battery high': '\uEA10', + emptybattery: '\uEA13', + batteryempty: '\uEA13', + 'upload cloud': '\uEB40', + 'cloud upload': '\uEB40', + 'rotate right': '\u21BB', + notification: '\uD83D\uDD14', + belldisabled: '\uD83D\uDD15', + 'add calendar': '\uF070', + 'calendar add': '\uF070', + navigatedown: '\uF501', + navigateleft: '\u25C5', + 'direct right': '\u25B9', + 'thumbs down': '\uD83D\uDC4E', + 'male avatar': '\uD83D\uDC64', + 'female user': '\uD83D\uDC67', + 'credit card': '\uD83D\uDCB3', + 'dollar sign': '\uD83D\uDCB2', + 'high volume': '\uD83D\uDD0A', + 'volume high': '\uD83D\uDD0A', + photographs: '\uD83C\uDF04', + videocamera: '\uD83D\uDCF9', + fastforward: '\u23E9', + skipforward: '\u23ED', + 'rotate left': '\u21BA', + mobilephone: '\uD83D\uDCF1', + fullbattery: '\uD83D\uDD0B', + batteryfull: '\uD83D\uDD0B', + highbattery: '\uEA10', + batteryhigh: '\uEA10', + 'low battery': '\uEA12', + 'battery low': '\uEA12', + uploadcloud: '\uEB40', + cloudupload: '\uEB40', + rotateright: '\u21BB', + information: '\u2139', + addcalendar: '\uF070', + calendaradd: '\uF070', + 'remove date': '\uF071', + 'delete date': '\uF073', + 'navigate up': '\uF500', + directright: '\u25B9', + 'direct down': '\u25BE', + 'direct left': '\u25C3', + screenshot: '\u2316', + visibility: '\uD83D\uDC40', + attachment: '\uD83D\uDCCE', + disapprove: '\uD83D\uDC4E', + thumbsdown: '\uD83D\uDC4E', + 'half heart': '\uE1A0', + eyedropper: '\uE200', + maleavatar: '\uD83D\uDC64', + femaleuser: '\uD83D\uDC67', + creditcard: '\uD83D\uDCB3', + dollarsign: '\uD83D\uDCB2', + navigation: '\uE670', + directions: '\uE672', + 'hard drive': '\uE7B0', + microphone: '\uD83C\uDFA4', + 'low volume': '\uD83D\uDD09', + 'volume low': '\uD83D\uDD09', + highvolume: '\uD83D\uDD0A', + volumehigh: '\uD83D\uDD0A', + photograph: '\uD83C\uDF04', + rotateleft: '\u21BA', + thumbnails: '\uE9A3', + 'cell phone': '\uD83D\uDCF1', + smartphone: '\uD83D\uDCF1', + lowbattery: '\uEA12', + batterylow: '\uEA12', + connection: '\uEB85', + 'pull quote': '\u201C', + removedate: '\uF071', + 'check date': '\uF072', + deletedate: '\uF073', + 'down right': '\u2B0A', + navigateup: '\uF500', + descending: '\u25BE', + directdown: '\u25BE', + directleft: '\u25C3', + crosshair: '\u2316', + paperclip: '\uD83D\uDCCE', + backspace: '\u232B', + 'thumbs up': '\uD83D\uDC4D', + halfheart: '\uE1A0', + 'half star': '\uE1A1', + telephone: '\uD83D\uDCDE', + 'male user': '\uD83D\uDC64', + 'bar chart': '\uD83D\uDCCA', + 'pie chart': '\uE570', + buildings: '\uD83C\uDFE2', + warehouse: '\uE602', + harddrive: '\uE7B0', + musicnote: '\u266B', + lowvolume: '\uD83D\uDD09', + volumelow: '\uD83D\uDD09', + 'skip back': '\u23EE', + 'open book': '\uD83D\uDCD6', + newspaper: '\uD83D\uDCF0', + cellphone: '\uD83D\uDCF1', + lightbulb: '\uD83D\uDCA1', + pullquote: '\u201C', + checkmark: '\u2713', + dashboard: '\uF000', + stopwatch: '\u23F1', + checkdate: '\uF072', + briefcase: '\uD83D\uDCBC', + downright: '\u2B0A', + 'down left': '\u2B0B', + ascending: '\u25B4', + 'direct up': '\u25B4', + 'zoom out': '\uE003', + unlocked: '\uD83D\uDD13', + insecure: '\uD83D\uDD13', + trashcan: '\uE0D0', + keywords: '\uE100', + bookmark: '\uD83D\uDD16', + thumbsup: '\uD83D\uDC4D', + favorite: '\u22C6', + halfstar: '\uE1A1', + 'end call': '\uE300', + facetime: '\uE320', + envelope: '\u2709', + ellipsis: '\u2026', + maleuser: '\uD83D\uDC64', + barchart: '\uD83D\uDCCA', + piechart: '\uE570', + navigate: '\uE670', + signpost: '\uE672', + location: '\uE6D0', + database: '\uE7A0', + pictures: '\uD83C\uDF04', + skipback: '\u23EE', + openbook: '\uD83D\uDCD6', + notebook: '\uD83D\uDCD3', + computer: '\uD83D\uDCBB', + download: '\uEB01', + transfer: '\u21C6', + document: '\uD83D\uDCC4', + typeface: '\uED01', + redirect: '\u21AA', + contract: '\uEE01', + question: '\u2753', + 'sign out': '\uEE02', + subtract: '\u002D', + settings: '\u2699', + calendar: '\uD83D\uDCC5', + 'add date': '\uF070', + 'up right': '\u2B08', + downleft: '\u2B0B', + previous: '\u25C5', + directup: '\u25B4', + dropdown: '\u25BE', + 'zoom in': '\uE002', + zoomout: '\uE003', + visible: '\uD83D\uDC40', + compose: '\uD83D\uDCDD', + private: '\uD83D\uDD12', + keyword: '\uE100', + approve: '\uD83D\uDC4D', + dislike: '\uD83D\uDC4E', + windows: '\uE202', + endcall: '\uE300', + comment: '\uD83D\uDCAC', + avatars: '\uD83D\uDC65', + package: '\uD83D\uDCE6', + compass: '\uE671', + dictate: '\uD83C\uDFA4', + speaker: '\uD83D\uDD08', + airplay: '\uE800', + picture: '\uD83C\uDF04', + shuffle: '\uD83D\uDD00', + columns: '\uE9A2', + desktop: '\uD83D\uDCBB', + display: '\uD83D\uDCBB', + monitor: '\uD83D\uDCBB', + battery: '\uD83D\uDD0B', + refresh: '\u21BB', + syncing: '\uEB82', + loading: '\uEB83', + printer: '\u2399', + warning: '\u26A0', + caution: '\u26D4', + 'log out': '\uEE02', + signout: '\uEE02', + checked: '\u2713', + adddate: '\uF070', + droplet: '\uD83D\uDCA7', + upright: '\u2B08', + forward: '\u27A1', + 'up left': '\u2B09', + descend: '\u25BE', + retweet: '\uF600', + cursor: '\uE001', + search: '\uD83D\uDD0E', + zoomin: '\uE002', + attach: '\uD83D\uDCCE', + pencil: '\u270E', + eraser: '\u2710', + locked: '\uD83D\uDD12', + secure: '\uD83D\uDD12', + unlock: '\uD83D\uDD13', + public: '\uD83D\uDD13', + target: '\u25CE', + tagged: '\uE100', + sample: '\uE200', + layers: '\uE202', + stroke: '\uE241', + avatar: '\uD83D\uDC64', + locate: '\uE670', + volume: '\uD83D\uDD08', + camera: '\uD83D\uDCF7', + images: '\uD83C\uDF04', + photos: '\uD83C\uDF04', + videos: '\uD83D\uDCF9', + record: '\u25CF', + rewind: '\u23EA', + repeat: '\uD83D\uDD01', + replay: '\u21BA', + filter: '\uE9B0', + funnel: '\uE9B0', + laptop: '\uEA00', + tablet: '\uEA01', + iphone: '\uD83D\uDCF1', + mobile: '\uD83D\uDCF1', + upload: '\uEB41', + folder: '\uD83D\uDCC1', + layout: '\uEDA0', + action: '\uEE00', + expand: '\u2922', + logout: '\uEE02', + hyphen: '\u002D', + remove: '\u002D', + delete: '\u2421', + upleft: '\u2B09', + ascend: '\u25B4', + write: '\u270E', + erase: '\u2710', + trash: '\uE0D0', + heart: '\u2665', + zelda: '\uE1A0', + phone: '\uD83D\uDCDE', + reply: '\u21A9', + email: '\u2709', + inbox: '\uD83D\uDCE5', + users: '\uD83D\uDC65', + price: '\uD83D\uDCB2', + house: '\u2302', + globe: '\uD83C\uDF0E', + earth: '\uD83C\uDF0E', + world: '\uD83C\uDF0E', + music: '\u266B', + audio: '\u266B', + sound: '\uD83D\uDD08', + image: '\uD83C\uDF04', + photo: '\uD83C\uDF04', + video: '\uD83D\uDCF9', + pause: '\uE8A0', + eject: '\u23CF', + merge: '\uEB81', + nodes: '\uEB85', + quote: '\u201C', + print: '\u2399', + share: '\uEE00', + visit: '\uEE00', + alert: '\u26A0', + minus: '\u002D', + check: '\u2713', + close: '\u2421', + clock: '\u23F2', + timer: '\u23F1', + plane: '\u2708', + cloud: '\u2601', + flask: '\uF4C0', + right: '\u27A1', + zoom: '\uE002', + view: '\uD83D\uDC40', + look: '\uD83D\uDC40', + link: '\uD83D\uDD17', + move: '\uE070', + edit: '\u270E', + lock: '\uD83D\uDD12', + tags: '\uE100', + flag: '\u2691', + like: '\uD83D\uDC4D', + love: '\u2665', + star: '\u22C6', + crop: '\uE201', + fill: '\uE240', + call: '\uD83D\uDCDE', + send: '\uE350', + mail: '\u2709', + chat: '\uD83D\uDCAC', + talk: '\uD83D\uDCAC', + user: '\uD83D\uDC64', + cart: '\uE500', + cost: '\uD83D\uDCB2', + home: '\u2302', + city: '\uD83C\uDFE2', + play: '\u25B6', + stop: '\u25A0', + skip: '\u23ED', + undo: '\u21BA', + book: '\uD83D\uDCD5', + news: '\uD83D\uDCF0', + grid: '\uE9A0', + rows: '\uE9A1', + ipad: '\uEA01', + cell: '\uD83D\uDCF1', + idea: '\uD83D\uDCA1', + fork: '\uEB80', + redo: '\u21BB', + sync: '\uEB82', + wifi: '\uEB84', + file: '\uD83D\uDCC4', + page: '\uD83D\uDCC4', + text: '\uED00', + font: '\uED01', + list: '\uED50', + help: '\u2753', + info: '\u2139', + exit: '\uEE02', + plus: '\u002B', + gear: '\u2699', + bell: '\uD83D\uDD14', + time: '\u23F2', + date: '\uD83D\uDCC5', + work: '\uD83D\uDCBC', + drop: '\uD83D\uDCA7', + down: '\u2B07', + left: '\u2B05', + back: '\u2B05', + next: '\u25BB', + eye: '\uD83D\uDC40', + key: '\uD83D\uDD11', + ban: '\uD83D\uDEAB', + tag: '\uE100', + rss: '\uE310', + box: '\uD83D\uDCE6', + map: '\uE673', + pin: '\uD83D\uDCCD', + hdd: '\uE7B0', + mic: '\uD83C\uDFA4', + fax: '\uD83D\uDCE0', + out: '\uEE00', + add: '\u002B', + cog: '\u2699', + up: '\u2B06' + }; if (typeof ss_icons !== 'object' || typeof ss_icons !== 'object') { var ss_icons = ss_set; var ss_keywords = []; - for (var i in ss_set) { ss_keywords.push(i); }; + for (var i in ss_set) { + ss_keywords.push(i); + } } else { - for (var i in ss_set) { ss_icons[i] = ss_set[i]; ss_keywords.push(i); } - }; - + for (var i in ss_set) { + ss_icons[i] = ss_set[i]; + ss_keywords.push(i); + } + } if (typeof ss_legacy !== 'function') { - /* domready.js */ - !function(a,b){typeof module!="undefined"?module.exports=b():typeof define=="function"&&typeof define.amd=="object"?define(b):this[a]=b()}("ss_ready",function(a){function m(a){l=1;while(a=b.shift())a()}var b=[],c,d=!1,e=document,f=e.documentElement,g=f.doScroll,h="DOMContentLoaded",i="addEventListener",j="onreadystatechange",k="readyState",l=/^loade|c/.test(e[k]);return e[i]&&e[i](h,c=function(){e.removeEventListener(h,c,d),m()},d),g&&e.attachEvent(j,c=function(){/^c/.test(e[k])&&(e.detachEvent(j,c),m())}),a=g?function(c){self!=top?l?c():b.push(c):function(){try{f.doScroll("left")}catch(b){return setTimeout(function(){a(c)},50)}c()}()}:function(a){l?a():b.push(a)}}) + !(function(a, b) { + typeof module != 'undefined' + ? (module.exports = b()) + : typeof define == 'function' && typeof define.amd == 'object' + ? define(b) + : (this[a] = b()); + })('ss_ready', function(a) { + function m(a) { + l = 1; + while ((a = b.shift())) a(); + } + var b = [], + c, + d = !1, + e = document, + f = e.documentElement, + g = f.doScroll, + h = 'DOMContentLoaded', + i = 'addEventListener', + j = 'onreadystatechange', + k = 'readyState', + l = /^loade|c/.test(e[k]); + return e[i] && + e[i]( + h, + (c = function() { + e.removeEventListener(h, c, d), m(); + }), + d + ), g && + e.attachEvent( + j, + (c = function() { + /^c/.test(e[k]) && (e.detachEvent(j, c), m()); + }) + ), (a = g + ? function(c) { + self != top + ? l ? c() : b.push(c) + : (function() { + try { + f.doScroll('left'); + } catch (b) { + return setTimeout(function() { + a(c); + }, 50); + } + c(); + })(); + } + : function(a) { + l ? a() : b.push(a); + }); + }); var ss_legacy = function(node) { - if (!node instanceof Object) return false; if (node.length) { - for (var i=0; i + + + diff --git a/static/images/juzTopArt.svg b/static/images/juzTopArt.svg new file mode 100644 index 000000000..7af9c4320 --- /dev/null +++ b/static/images/juzTopArt.svg @@ -0,0 +1,471 @@ + + + + diff --git a/tests.webpack.js b/tests.webpack.js deleted file mode 100644 index 0d5e8e350..000000000 --- a/tests.webpack.js +++ /dev/null @@ -1,3 +0,0 @@ -require('babel-polyfill'); -var testContext = require.context('./src', true, /(\.spec|spec)\.js$/); -testContext.keys().forEach(testContext); diff --git a/tests/__mocks__/fileMock.js b/tests/__mocks__/fileMock.js new file mode 100644 index 000000000..86059f362 --- /dev/null +++ b/tests/__mocks__/fileMock.js @@ -0,0 +1 @@ +module.exports = 'test-file-stub'; diff --git a/tests/fixtures/ayah.json b/tests/fixtures/ayah.json deleted file mode 100644 index fd83ab92e..000000000 --- a/tests/fixtures/ayah.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "verseKey": "2:1", - "ayahIndex": 8, - "chapterId": 2, - "ayahNum": 1, - "pageNum": 2, - "juzNum": 1, - "hizbNum": 1, - "rubNum": 1, - "mediaContent": [], - "text": "الم", - "sajdah": null, - "words": [ - { - "verseKey": "2:1", - "resourceId": 1, - "position": 1, - "wordId": 30, - "pageNum": 2, - "lineNum": 3, - "codeDec": 64337, - "codeHex": "fb51", - "charType": 1, - "className": "p2", - "code": "ﭑ", - "tokenId": 16542, - "translation": "Alif Laam Meem", - "transliteration": "alif-lam-meem" - }, - { - "verseKey": "2:1", - "resourceId": 1, - "position": 2, - "wordId": null, - "pageNum": 2, - "lineNum": 3, - "codeDec": 64338, - "codeHex": "fb52", - "charType": 2, - "className": "p2", - "code": "ﭒ" - } - ], - "textTashkeel": "الم", - "content": [ - { - "text": "Alif, Lam, Meem.", - "resource": { - "subType": "translation", - "cardinalityType": "1_ayah", - "name": "Sahih International" - } - } - ], - "audio": { - "mp3": { - "format": "mp3", - "duration": 7.65, - "reciter": { - "reciterId": 6, - "path": "Alafasy", - "slug": "alafasy", - "english": "Mishari Rashid al-`Afasy", - "arabic": "مشاري راشد العفاسي" - }, - "url": "http://verses.quran.com/Alafasy/mp3/002001.mp3" - }, - "ogg": { - "format": "ogg", - "duration": 7.604, - "reciter": { - "reciterId": 6, - "path": "Alafasy", - "slug": "alafasy", - "english": "Mishari Rashid al-`Afasy", - "arabic": "مشاري راشد العفاسي" - }, - "url": "http://verses.quran.com/Alafasy/ogg/002001.ogg" - } - } -} diff --git a/tests/fixtures/chapterInfos.ts b/tests/fixtures/chapterInfos.ts new file mode 100644 index 000000000..7af1282ef --- /dev/null +++ b/tests/fixtures/chapterInfos.ts @@ -0,0 +1,8 @@ +// eslint-disable-next-line import/prefer-default-export +export const chapterInfo = { + source: 'source', + text: 'text', + shortText: 'shortText', + languageName: 'english', + chapterId: 1, +}; diff --git a/tests/fixtures/chapters.ts b/tests/fixtures/chapters.ts new file mode 100644 index 000000000..daff83472 --- /dev/null +++ b/tests/fixtures/chapters.ts @@ -0,0 +1,47 @@ +export const chapter = { + id: 1, + chapterNumber: 1, + bismillahPre: false, + revelationOrder: 5, + revelationPlace: 'makkah', + nameComplex: 'Al-Fātiĥah', + nameArabic: 'الفاتحة', + nameSimple: 'Al-Fatihah', + versesCount: 7, + translatedName: { + languageName: 'english', + name: 'The Opener', + }, + languageName: 'english', + pages: [1, 2], +}; + +export const chapter2 = { + id: 2, + chapterNumber: 2, + bismillahPre: true, + revelationOrder: 87, + revelationPlace: 'madinah', + nameComplex: 'Al-Baqarah', + nameArabic: 'البقرة', + nameSimple: 'Al-Baqarah', + versesCount: 286, + pages: [2, 49], + translatedName: { languageName: 'english', name: 'The Cow' }, +}; + +export const chapter3 = { + id: 3, + chapterNumber: 3, + bismillahPre: true, + revelationOrder: 89, + revelationPlace: 'madinah', + nameComplex: 'Āli `Imrān', + nameArabic: 'آل عمران', + nameSimple: "Ali 'Imran", + versesCount: 200, + pages: [50, 76], + translatedName: { languageName: 'english', name: 'Family of Imran' }, +}; + +export const chapters = [chapter, chapter2, chapter3]; diff --git a/tests/fixtures/getAyahs.js b/tests/fixtures/getAyahs.js deleted file mode 100644 index d7e069327..000000000 --- a/tests/fixtures/getAyahs.js +++ /dev/null @@ -1 +0,0 @@ -export default [{"ayah_key":"2:1","ayah_index":8,"surah_id":2,"ayah_num":1,"page_num":2,"juz_num":1,"hizb_num":1,"rub_num":1,"text":"الم","sajdah":null,"quran":[{"ayah_key":"2:1","word":{"position":1,"line":3,"arabic":"الم","id":30,"translation":"Alif Laam Meem"},"char":{"page":2,"font":"p2","code_hex":"fb51","type_id":1,"type":"word","code_dec":64337,"line":3,"code":"\u0026#xfb51;"}},{"ayah_key":"2:1","word":{"position":2,"line":3,"arabic":null,"id":null,"translation":null},"char":{"page":2,"font":"p2","code_hex":"fb52","type_id":2,"type":"end","code_dec":64338,"line":3,"code":"\u0026#xfb52;"}}],"content":[{"id":19,"name":"Sahih International","slug":"sahih_international","lang":"en","dir":"ltr","ayah_key":"2:1","text":"Alif, Lam, Meem."}],"audio":{"ayah_key":"2:1","ogg":{"url":"http://verses.quran.com/Alafasy/ogg/002001.ogg","duration":7.604,"mime_type":"audio/ogg"},"mp3":{"url":"http://verses.quran.com/Alafasy/mp3/002001.mp3","duration":7.65,"mime_type":"audio/mpeg"}}},{"ayah_key":"2:2","ayah_index":9,"surah_id":2,"ayah_num":2,"page_num":2,"juz_num":1,"hizb_num":1,"rub_num":1,"text":"ذلك الكتاب لا ريب فيه هدى للمتقين","sajdah":null,"quran":[{"ayah_key":"2:2","word":{"position":1,"line":3,"arabic":"ذَٰلِكَ","id":31,"translation":"That"},"char":{"page":2,"font":"p2","code_hex":"fb53","type_id":1,"type":"word","code_dec":64339,"line":3,"code":"\u0026#xfb53;"}},{"ayah_key":"2:2","word":{"position":2,"line":3,"arabic":"الْكِتَابُ","id":32,"translation":"(is) the book"},"char":{"page":2,"font":"p2","code_hex":"fb54","type_id":1,"type":"word","code_dec":64340,"line":3,"code":"\u0026#xfb54;"}},{"ayah_key":"2:2","word":{"position":3,"line":3,"arabic":"لَا","id":33,"translation":"no"},"char":{"page":2,"font":"p2","code_hex":"fb55","type_id":1,"type":"word","code_dec":64341,"line":3,"code":"\u0026#xfb55;"}},{"ayah_key":"2:2","word":{"position":4,"line":3,"arabic":"رَيْبَ","id":34,"translation":"doubt"},"char":{"page":2,"font":"p2","code_hex":"fb56","type_id":1,"type":"word","code_dec":64342,"line":3,"code":"\u0026#xfb56;"}},{"ayah_key":"2:2","word":{"position":5,"line":3,"arabic":null,"id":null,"translation":null},"char":{"page":2,"font":"p2","code_hex":"fb57","type_id":3,"type":"pause","code_dec":64343,"line":3,"code":"\u0026#xfb57;"}},{"ayah_key":"2:2","word":{"position":6,"line":3,"arabic":"فِيهِ","id":35,"translation":"in it"},"char":{"page":2,"font":"p2","code_hex":"fb58","type_id":1,"type":"word","code_dec":64344,"line":3,"code":"\u0026#xfb58;"}},{"ayah_key":"2:2","word":{"position":7,"line":3,"arabic":null,"id":null,"translation":null},"char":{"page":2,"font":"p2","code_hex":"fb59","type_id":3,"type":"pause","code_dec":64345,"line":3,"code":"\u0026#xfb59;"}},{"ayah_key":"2:2","word":{"position":8,"line":3,"arabic":"هُدًى","id":36,"translation":"a Guidance"},"char":{"page":2,"font":"p2","code_hex":"fb5a","type_id":1,"type":"word","code_dec":64346,"line":3,"code":"\u0026#xfb5a;"}},{"ayah_key":"2:2","word":{"position":9,"line":4,"arabic":"لِلْمُتَّقِينَ","id":37,"translation":"for the God-conscious"},"char":{"page":2,"font":"p2","code_hex":"fb5b","type_id":1,"type":"word","code_dec":64347,"line":4,"code":"\u0026#xfb5b;"}},{"ayah_key":"2:2","word":{"position":10,"line":4,"arabic":null,"id":null,"translation":null},"char":{"page":2,"font":"p2","code_hex":"fb5c","type_id":2,"type":"end","code_dec":64348,"line":4,"code":"\u0026#xfb5c;"}}],"content":[{"id":19,"name":"Sahih International","slug":"sahih_international","lang":"en","dir":"ltr","ayah_key":"2:2","text":"This is the Book about which there is no doubt, a guidance for those conscious of Allah -"}],"audio":{"ayah_key":"2:2","ogg":{"url":"http://verses.quran.com/Alafasy/ogg/002002.ogg","duration":8.932,"mime_type":"audio/ogg"},"mp3":{"url":"http://verses.quran.com/Alafasy/mp3/002002.mp3","duration":8.98,"mime_type":"audio/mpeg"}}},{"ayah_key":"2:3","ayah_index":10,"surah_id":2,"ayah_num":3,"page_num":2,"juz_num":1,"hizb_num":1,"rub_num":1,"text":"الذين يؤمنون بالغيب ويقيمون الصلاة ومما رزقناهم ينفقون","sajdah":null,"quran":[{"ayah_key":"2:3","word":{"position":1,"line":4,"arabic":"الَّذِينَ","id":38,"translation":"Those who"},"char":{"page":2,"font":"p2","code_hex":"fb5d","type_id":1,"type":"word","code_dec":64349,"line":4,"code":"\u0026#xfb5d;"}},{"ayah_key":"2:3","word":{"position":2,"line":4,"arabic":"يُؤْمِنُونَ","id":39,"translation":"believe"},"char":{"page":2,"font":"p2","code_hex":"fb5e","type_id":1,"type":"word","code_dec":64350,"line":4,"code":"\u0026#xfb5e;"}},{"ayah_key":"2:3","word":{"position":3,"line":4,"arabic":"بِالْغَيْبِ","id":40,"translation":"in the unseen"},"char":{"page":2,"font":"p2","code_hex":"fb5f","type_id":1,"type":"word","code_dec":64351,"line":4,"code":"\u0026#xfb5f;"}},{"ayah_key":"2:3","word":{"position":4,"line":4,"arabic":"وَيُقِيمُونَ","id":41,"translation":"and establish"},"char":{"page":2,"font":"p2","code_hex":"fb60","type_id":1,"type":"word","code_dec":64352,"line":4,"code":"\u0026#xfb60;"}},{"ayah_key":"2:3","word":{"position":5,"line":4,"arabic":"الصَّلَاةَ","id":42,"translation":"the prayer"},"char":{"page":2,"font":"p2","code_hex":"fb61","type_id":1,"type":"word","code_dec":64353,"line":4,"code":"\u0026#xfb61;"}},{"ayah_key":"2:3","word":{"position":6,"line":5,"arabic":"وَمِمَّا","id":43,"translation":"and out of what"},"char":{"page":2,"font":"p2","code_hex":"fb62","type_id":1,"type":"word","code_dec":64354,"line":5,"code":"\u0026#xfb62;"}},{"ayah_key":"2:3","word":{"position":7,"line":5,"arabic":"رَزَقْنَاهُمْ","id":44,"translation":"We have provided them"},"char":{"page":2,"font":"p2","code_hex":"fb63","type_id":1,"type":"word","code_dec":64355,"line":5,"code":"\u0026#xfb63;"}},{"ayah_key":"2:3","word":{"position":8,"line":5,"arabic":"يُنْفِقُونَ","id":45,"translation":"they spend"},"char":{"page":2,"font":"p2","code_hex":"fb64","type_id":1,"type":"word","code_dec":64356,"line":5,"code":"\u0026#xfb64;"}},{"ayah_key":"2:3","word":{"position":9,"line":5,"arabic":null,"id":null,"translation":null},"char":{"page":2,"font":"p2","code_hex":"fb65","type_id":2,"type":"end","code_dec":64357,"line":5,"code":"\u0026#xfb65;"}}],"content":[{"id":19,"name":"Sahih International","slug":"sahih_international","lang":"en","dir":"ltr","ayah_key":"2:3","text":"Who believe in the unseen, establish prayer, and spend out of what We have provided for them,"}],"audio":{"ayah_key":"2:3","ogg":{"url":"http://verses.quran.com/Alafasy/ogg/002003.ogg","duration":11.368,"mime_type":"audio/ogg"},"mp3":{"url":"http://verses.quran.com/Alafasy/mp3/002003.mp3","duration":11.41,"mime_type":"audio/mpeg"}}},{"ayah_key":"2:4","ayah_index":11,"surah_id":2,"ayah_num":4,"page_num":2,"juz_num":1,"hizb_num":1,"rub_num":1,"text":"والذين يؤمنون بما انزل اليك وما انزل من قبلك وبالاخرة هم يوقنون","sajdah":null,"quran":[{"ayah_key":"2:4","word":{"position":1,"line":5,"arabic":"وَالَّذِينَ","id":46,"translation":"And those who"},"char":{"page":2,"font":"p2","code_hex":"fb66","type_id":1,"type":"word","code_dec":64358,"line":5,"code":"\u0026#xfb66;"}},{"ayah_key":"2:4","word":{"position":2,"line":5,"arabic":"يُؤْمِنُونَ","id":47,"translation":"believe"},"char":{"page":2,"font":"p2","code_hex":"fb67","type_id":1,"type":"word","code_dec":64359,"line":5,"code":"\u0026#xfb67;"}},{"ayah_key":"2:4","word":{"position":3,"line":5,"arabic":"بِمَا","id":48,"translation":"in what"},"char":{"page":2,"font":"p2","code_hex":"fb68","type_id":1,"type":"word","code_dec":64360,"line":5,"code":"\u0026#xfb68;"}},{"ayah_key":"2:4","word":{"position":4,"line":5,"arabic":"أُنْزِلَ","id":49,"translation":"(is) sent down"},"char":{"page":2,"font":"p2","code_hex":"fb69","type_id":1,"type":"word","code_dec":64361,"line":5,"code":"\u0026#xfb69;"}},{"ayah_key":"2:4","word":{"position":5,"line":6,"arabic":"إِلَيْكَ","id":50,"translation":"to you"},"char":{"page":2,"font":"p2","code_hex":"fb6a","type_id":1,"type":"word","code_dec":64362,"line":6,"code":"\u0026#xfb6a;"}},{"ayah_key":"2:4","word":{"position":6,"line":6,"arabic":"وَمَا","id":51,"translation":"and what"},"char":{"page":2,"font":"p2","code_hex":"fb6b","type_id":1,"type":"word","code_dec":64363,"line":6,"code":"\u0026#xfb6b;"}},{"ayah_key":"2:4","word":{"position":7,"line":6,"arabic":"أُنْزِلَ","id":52,"translation":"was sent down"},"char":{"page":2,"font":"p2","code_hex":"fb6c","type_id":1,"type":"word","code_dec":64364,"line":6,"code":"\u0026#xfb6c;"}},{"ayah_key":"2:4","word":{"position":8,"line":6,"arabic":"مِنْ","id":53,"translation":"from"},"char":{"page":2,"font":"p2","code_hex":"fb6d","type_id":1,"type":"word","code_dec":64365,"line":6,"code":"\u0026#xfb6d;"}},{"ayah_key":"2:4","word":{"position":9,"line":6,"arabic":"قَبْلِكَ","id":54,"translation":"before you"},"char":{"page":2,"font":"p2","code_hex":"fb6e","type_id":1,"type":"word","code_dec":64366,"line":6,"code":"\u0026#xfb6e;"}},{"ayah_key":"2:4","word":{"position":10,"line":6,"arabic":"وَبِالْآخِرَةِ","id":55,"translation":"and in the Hereafter"},"char":{"page":2,"font":"p2","code_hex":"fb6f","type_id":1,"type":"word","code_dec":64367,"line":6,"code":"\u0026#xfb6f;"}},{"ayah_key":"2:4","word":{"position":11,"line":6,"arabic":"هُمْ","id":56,"translation":"they"},"char":{"page":2,"font":"p2","code_hex":"fb70","type_id":1,"type":"word","code_dec":64368,"line":6,"code":"\u0026#xfb70;"}},{"ayah_key":"2:4","word":{"position":12,"line":6,"arabic":"يُوقِنُونَ","id":57,"translation":"firmly believe"},"char":{"page":2,"font":"p2","code_hex":"fb71","type_id":1,"type":"word","code_dec":64369,"line":6,"code":"\u0026#xfb71;"}},{"ayah_key":"2:4","word":{"position":13,"line":6,"arabic":null,"id":null,"translation":null},"char":{"page":2,"font":"p2","code_hex":"fb72","type_id":2,"type":"end","code_dec":64370,"line":6,"code":"\u0026#xfb72;"}}],"content":[{"id":19,"name":"Sahih International","slug":"sahih_international","lang":"en","dir":"ltr","ayah_key":"2:4","text":"And who believe in what has been revealed to you, [O Muhammad], and what was revealed before you, and of the Hereafter they are certain [in faith]."}],"audio":{"ayah_key":"2:4","ogg":{"url":"http://verses.quran.com/Alafasy/ogg/002004.ogg","duration":15.773,"mime_type":"audio/ogg"},"mp3":{"url":"http://verses.quran.com/Alafasy/mp3/002004.mp3","duration":15.83,"mime_type":"audio/mpeg"}}},{"ayah_key":"2:5","ayah_index":12,"surah_id":2,"ayah_num":5,"page_num":2,"juz_num":1,"hizb_num":1,"rub_num":1,"text":"اولئك على هدى من ربهم واولئك هم المفلحون","sajdah":null,"quran":[{"ayah_key":"2:5","word":{"position":1,"line":7,"arabic":"أُولَٰئِكَ","id":58,"translation":"Those"},"char":{"page":2,"font":"p2","code_hex":"fb73","type_id":1,"type":"word","code_dec":64371,"line":7,"code":"\u0026#xfb73;"}},{"ayah_key":"2:5","word":{"position":2,"line":7,"arabic":"عَلَىٰ","id":59,"translation":"(are) on"},"char":{"page":2,"font":"p2","code_hex":"fb74","type_id":1,"type":"word","code_dec":64372,"line":7,"code":"\u0026#xfb74;"}},{"ayah_key":"2:5","word":{"position":3,"line":7,"arabic":"هُدًى","id":60,"translation":"Guidance"},"char":{"page":2,"font":"p2","code_hex":"fb75","type_id":1,"type":"word","code_dec":64373,"line":7,"code":"\u0026#xfb75;"}},{"ayah_key":"2:5","word":{"position":4,"line":7,"arabic":"مِنْ","id":61,"translation":"from"},"char":{"page":2,"font":"p2","code_hex":"fb76","type_id":1,"type":"word","code_dec":64374,"line":7,"code":"\u0026#xfb76;"}},{"ayah_key":"2:5","word":{"position":5,"line":7,"arabic":"رَبِّهِمْ","id":62,"translation":"their Lord"},"char":{"page":2,"font":"p2","code_hex":"fb77","type_id":1,"type":"word","code_dec":64375,"line":7,"code":"\u0026#xfb77;"}},{"ayah_key":"2:5","word":{"position":6,"line":7,"arabic":null,"id":null,"translation":null},"char":{"page":2,"font":"p2","code_hex":"fb78","type_id":3,"type":"pause","code_dec":64376,"line":7,"code":"\u0026#xfb78;"}},{"ayah_key":"2:5","word":{"position":7,"line":7,"arabic":"وَأُولَٰئِكَ","id":63,"translation":"and those "},"char":{"page":2,"font":"p2","code_hex":"fb79","type_id":1,"type":"word","code_dec":64377,"line":7,"code":"\u0026#xfb79;"}},{"ayah_key":"2:5","word":{"position":8,"line":8,"arabic":"هُمُ","id":64,"translation":"they"},"char":{"page":2,"font":"p2","code_hex":"fb7a","type_id":1,"type":"word","code_dec":64378,"line":8,"code":"\u0026#xfb7a;"}},{"ayah_key":"2:5","word":{"position":9,"line":8,"arabic":"الْمُفْلِحُونَ","id":65,"translation":"(are) the successful ones"},"char":{"page":2,"font":"p2","code_hex":"fb7b","type_id":1,"type":"word","code_dec":64379,"line":8,"code":"\u0026#xfb7b;"}},{"ayah_key":"2:5","word":{"position":10,"line":8,"arabic":null,"id":null,"translation":null},"char":{"page":2,"font":"p2","code_hex":"fb7c","type_id":2,"type":"end","code_dec":64380,"line":8,"code":"\u0026#xfb7c;"}}],"content":[{"id":19,"name":"Sahih International","slug":"sahih_international","lang":"en","dir":"ltr","ayah_key":"2:5","text":"Those are upon [right] guidance from their Lord, and it is those who are the successful."}],"audio":{"ayah_key":"2:5","ogg":{"url":"http://verses.quran.com/Alafasy/ogg/002005.ogg","duration":11.323,"mime_type":"audio/ogg"},"mp3":{"url":"http://verses.quran.com/Alafasy/mp3/002005.mp3","duration":11.36,"mime_type":"audio/mpeg"}}},{"ayah_key":"2:6","ayah_index":13,"surah_id":2,"ayah_num":6,"page_num":3,"juz_num":1,"hizb_num":1,"rub_num":1,"text":"ان الذين كفروا سواء عليهم اانذرتهم ام لم تنذرهم لا يؤمنون","sajdah":null,"quran":[{"ayah_key":"2:6","word":{"position":1,"line":1,"arabic":"إِنَّ","id":66,"translation":"Indeed"},"char":{"page":3,"font":"p3","code_hex":"fb51","type_id":1,"type":"word","code_dec":64337,"line":1,"code":"\u0026#xfb51;"}},{"ayah_key":"2:6","word":{"position":2,"line":1,"arabic":"الَّذِينَ","id":67,"translation":"those who"},"char":{"page":3,"font":"p3","code_hex":"fb52","type_id":1,"type":"word","code_dec":64338,"line":1,"code":"\u0026#xfb52;"}},{"ayah_key":"2:6","word":{"position":3,"line":1,"arabic":"كَفَرُوا","id":68,"translation":"disbelieve[d]"},"char":{"page":3,"font":"p3","code_hex":"fb53","type_id":1,"type":"word","code_dec":64339,"line":1,"code":"\u0026#xfb53;"}},{"ayah_key":"2:6","word":{"position":4,"line":1,"arabic":"سَوَاءٌ","id":69,"translation":"(it) is same"},"char":{"page":3,"font":"p3","code_hex":"fb54","type_id":1,"type":"word","code_dec":64340,"line":1,"code":"\u0026#xfb54;"}},{"ayah_key":"2:6","word":{"position":5,"line":1,"arabic":"عَلَيْهِمْ","id":70,"translation":"to them"},"char":{"page":3,"font":"p3","code_hex":"fb55","type_id":1,"type":"word","code_dec":64341,"line":1,"code":"\u0026#xfb55;"}},{"ayah_key":"2:6","word":{"position":6,"line":1,"arabic":"أَأَنْذَرْتَهُمْ","id":71,"translation":"whether you warn them"},"char":{"page":3,"font":"p3","code_hex":"fb56","type_id":1,"type":"word","code_dec":64342,"line":1,"code":"\u0026#xfb56;"}},{"ayah_key":"2:6","word":{"position":7,"line":1,"arabic":"أَمْ","id":72,"translation":"or"},"char":{"page":3,"font":"p3","code_hex":"fb57","type_id":1,"type":"word","code_dec":64343,"line":1,"code":"\u0026#xfb57;"}},{"ayah_key":"2:6","word":{"position":8,"line":1,"arabic":"لَمْ","id":73,"translation":"not"},"char":{"page":3,"font":"p3","code_hex":"fb58","type_id":1,"type":"word","code_dec":64344,"line":1,"code":"\u0026#xfb58;"}},{"ayah_key":"2:6","word":{"position":9,"line":1,"arabic":"تُنْذِرْهُمْ","id":74,"translation":"you warn them"},"char":{"page":3,"font":"p3","code_hex":"fb59","type_id":1,"type":"word","code_dec":64345,"line":1,"code":"\u0026#xfb59;"}},{"ayah_key":"2:6","word":{"position":10,"line":2,"arabic":"لَا","id":75,"translation":"not"},"char":{"page":3,"font":"p3","code_hex":"fb5a","type_id":1,"type":"word","code_dec":64346,"line":2,"code":"\u0026#xfb5a;"}},{"ayah_key":"2:6","word":{"position":11,"line":2,"arabic":"يُؤْمِنُونَ","id":76,"translation":"they believe"},"char":{"page":3,"font":"p3","code_hex":"fb5b","type_id":1,"type":"word","code_dec":64347,"line":2,"code":"\u0026#xfb5b;"}},{"ayah_key":"2:6","word":{"position":12,"line":2,"arabic":null,"id":null,"translation":null},"char":{"page":3,"font":"p3","code_hex":"fb5c","type_id":2,"type":"end","code_dec":64348,"line":2,"code":"\u0026#xfb5c;"}}],"content":[{"id":19,"name":"Sahih International","slug":"sahih_international","lang":"en","dir":"ltr","ayah_key":"2:6","text":"Indeed, those who disbelieve - it is all the same for them whether you warn them or do not warn them - they will not believe."}],"audio":{"ayah_key":"2:6","ogg":{"url":"http://verses.quran.com/Alafasy/ogg/002006.ogg","duration":12.574,"mime_type":"audio/ogg"},"mp3":{"url":"http://verses.quran.com/Alafasy/mp3/002006.mp3","duration":12.61,"mime_type":"audio/mpeg"}}},{"ayah_key":"2:7","ayah_index":14,"surah_id":2,"ayah_num":7,"page_num":3,"juz_num":1,"hizb_num":1,"rub_num":1,"text":"ختم الله على قلوبهم وعلى سمعهم وعلى ابصارهم غشاوة ولهم عذاب عظيم","sajdah":null,"quran":[{"ayah_key":"2:7","word":{"position":1,"line":2,"arabic":"خَتَمَ","id":77,"translation":"Has set a seal"},"char":{"page":3,"font":"p3","code_hex":"fb5d","type_id":1,"type":"word","code_dec":64349,"line":2,"code":"\u0026#xfb5d;"}},{"ayah_key":"2:7","word":{"position":2,"line":2,"arabic":"اللَّهُ","id":78,"translation":"Allah"},"char":{"page":3,"font":"p3","code_hex":"fb5e","type_id":1,"type":"word","code_dec":64350,"line":2,"code":"\u0026#xfb5e;"}},{"ayah_key":"2:7","word":{"position":3,"line":2,"arabic":"عَلَىٰ","id":79,"translation":"on"},"char":{"page":3,"font":"p3","code_hex":"fb5f","type_id":1,"type":"word","code_dec":64351,"line":2,"code":"\u0026#xfb5f;"}},{"ayah_key":"2:7","word":{"position":4,"line":2,"arabic":"قُلُوبِهِمْ","id":80,"translation":"their hearts"},"char":{"page":3,"font":"p3","code_hex":"fb60","type_id":1,"type":"word","code_dec":64352,"line":2,"code":"\u0026#xfb60;"}},{"ayah_key":"2:7","word":{"position":5,"line":2,"arabic":"وَعَلَىٰ","id":81,"translation":"and on"},"char":{"page":3,"font":"p3","code_hex":"fb61","type_id":1,"type":"word","code_dec":64353,"line":2,"code":"\u0026#xfb61;"}},{"ayah_key":"2:7","word":{"position":6,"line":2,"arabic":"سَمْعِهِمْ","id":82,"translation":"their hearing"},"char":{"page":3,"font":"p3","code_hex":"fb62","type_id":1,"type":"word","code_dec":64354,"line":2,"code":"\u0026#xfb62;"}},{"ayah_key":"2:7","word":{"position":7,"line":2,"arabic":null,"id":null,"translation":null},"char":{"page":3,"font":"p3","code_hex":"fb63","type_id":3,"type":"pause","code_dec":64355,"line":2,"code":"\u0026#xfb63;"}},{"ayah_key":"2:7","word":{"position":8,"line":2,"arabic":"وَعَلَىٰ","id":83,"translation":"and on"},"char":{"page":3,"font":"p3","code_hex":"fb64","type_id":1,"type":"word","code_dec":64356,"line":2,"code":"\u0026#xfb64;"}},{"ayah_key":"2:7","word":{"position":9,"line":3,"arabic":"أَبْصَارِهِمْ","id":84,"translation":"their vision"},"char":{"page":3,"font":"p3","code_hex":"fb65","type_id":1,"type":"word","code_dec":64357,"line":3,"code":"\u0026#xfb65;"}},{"ayah_key":"2:7","word":{"position":10,"line":3,"arabic":"غِشَاوَةٌ","id":85,"translation":"(is) a veil"},"char":{"page":3,"font":"p3","code_hex":"fb66","type_id":1,"type":"word","code_dec":64358,"line":3,"code":"\u0026#xfb66;"}},{"ayah_key":"2:7","word":{"position":11,"line":3,"arabic":null,"id":null,"translation":null},"char":{"page":3,"font":"p3","code_hex":"fb67","type_id":3,"type":"pause","code_dec":64359,"line":3,"code":"\u0026#xfb67;"}},{"ayah_key":"2:7","word":{"position":12,"line":3,"arabic":"وَلَهُمْ","id":86,"translation":"And for them"},"char":{"page":3,"font":"p3","code_hex":"fb68","type_id":1,"type":"word","code_dec":64360,"line":3,"code":"\u0026#xfb68;"}},{"ayah_key":"2:7","word":{"position":13,"line":3,"arabic":"عَذَابٌ","id":87,"translation":"(is) a punishment"},"char":{"page":3,"font":"p3","code_hex":"fb69","type_id":1,"type":"word","code_dec":64361,"line":3,"code":"\u0026#xfb69;"}},{"ayah_key":"2:7","word":{"position":14,"line":3,"arabic":"عَظِيمٌ","id":88,"translation":"great"},"char":{"page":3,"font":"p3","code_hex":"fb6a","type_id":1,"type":"word","code_dec":64362,"line":3,"code":"\u0026#xfb6a;"}},{"ayah_key":"2:7","word":{"position":15,"line":3,"arabic":null,"id":null,"translation":null},"char":{"page":3,"font":"p3","code_hex":"fb6b","type_id":2,"type":"end","code_dec":64363,"line":3,"code":"\u0026#xfb6b;"}}],"content":[{"id":19,"name":"Sahih International","slug":"sahih_international","lang":"en","dir":"ltr","ayah_key":"2:7","text":"Allah has set a seal upon their hearts and upon their hearing, and over their vision is a veil. And for them is a great punishment."}],"audio":{"ayah_key":"2:7","ogg":{"url":"http://verses.quran.com/Alafasy/ogg/002007.ogg","duration":13.261,"mime_type":"audio/ogg"},"mp3":{"url":"http://verses.quran.com/Alafasy/mp3/002007.mp3","duration":13.32,"mime_type":"audio/mpeg"}}},{"ayah_key":"2:8","ayah_index":15,"surah_id":2,"ayah_num":8,"page_num":3,"juz_num":1,"hizb_num":1,"rub_num":1,"text":"ومن الناس من يقول امنا بالله وباليوم الاخر وما هم بمؤمنين","sajdah":null,"quran":[{"ayah_key":"2:8","word":{"position":1,"line":3,"arabic":"وَمِنَ","id":89,"translation":"And of"},"char":{"page":3,"font":"p3","code_hex":"fb6c","type_id":1,"type":"word","code_dec":64364,"line":3,"code":"\u0026#xfb6c;"}},{"ayah_key":"2:8","word":{"position":2,"line":3,"arabic":"النَّاسِ","id":90,"translation":"the people"},"char":{"page":3,"font":"p3","code_hex":"fb6d","type_id":1,"type":"word","code_dec":64365,"line":3,"code":"\u0026#xfb6d;"}},{"ayah_key":"2:8","word":{"position":3,"line":4,"arabic":"مَنْ","id":91,"translation":"(are some) who"},"char":{"page":3,"font":"p3","code_hex":"fb6e","type_id":1,"type":"word","code_dec":64366,"line":4,"code":"\u0026#xfb6e;"}},{"ayah_key":"2:8","word":{"position":4,"line":4,"arabic":"يَقُولُ","id":92,"translation":"say"},"char":{"page":3,"font":"p3","code_hex":"fb6f","type_id":1,"type":"word","code_dec":64367,"line":4,"code":"\u0026#xfb6f;"}},{"ayah_key":"2:8","word":{"position":5,"line":4,"arabic":"آمَنَّا","id":93,"translation":"We believed"},"char":{"page":3,"font":"p3","code_hex":"fb70","type_id":1,"type":"word","code_dec":64368,"line":4,"code":"\u0026#xfb70;"}},{"ayah_key":"2:8","word":{"position":6,"line":4,"arabic":"بِاللَّهِ","id":94,"translation":"in Allah"},"char":{"page":3,"font":"p3","code_hex":"fb71","type_id":1,"type":"word","code_dec":64369,"line":4,"code":"\u0026#xfb71;"}},{"ayah_key":"2:8","word":{"position":7,"line":4,"arabic":"وَبِالْيَوْمِ","id":95,"translation":"and in the Day"},"char":{"page":3,"font":"p3","code_hex":"fb72","type_id":1,"type":"word","code_dec":64370,"line":4,"code":"\u0026#xfb72;"}},{"ayah_key":"2:8","word":{"position":8,"line":4,"arabic":"الْآخِرِ","id":96,"translation":"[the] Last"},"char":{"page":3,"font":"p3","code_hex":"fb73","type_id":1,"type":"word","code_dec":64371,"line":4,"code":"\u0026#xfb73;"}},{"ayah_key":"2:8","word":{"position":9,"line":4,"arabic":"وَمَا","id":97,"translation":"but not"},"char":{"page":3,"font":"p3","code_hex":"fb74","type_id":1,"type":"word","code_dec":64372,"line":4,"code":"\u0026#xfb74;"}},{"ayah_key":"2:8","word":{"position":10,"line":4,"arabic":"هُمْ","id":98,"translation":"they"},"char":{"page":3,"font":"p3","code_hex":"fb75","type_id":1,"type":"word","code_dec":64373,"line":4,"code":"\u0026#xfb75;"}},{"ayah_key":"2:8","word":{"position":11,"line":4,"arabic":"بِمُؤْمِنِينَ","id":99,"translation":"(are) believers (at all)"},"char":{"page":3,"font":"p3","code_hex":"fb76","type_id":1,"type":"word","code_dec":64374,"line":4,"code":"\u0026#xfb76;"}},{"ayah_key":"2:8","word":{"position":12,"line":4,"arabic":null,"id":null,"translation":null},"char":{"page":3,"font":"p3","code_hex":"fb77","type_id":2,"type":"end","code_dec":64375,"line":4,"code":"\u0026#xfb77;"}}],"content":[{"id":19,"name":"Sahih International","slug":"sahih_international","lang":"en","dir":"ltr","ayah_key":"2:8","text":"And of the people are some who say, \"We believe in Allah and the Last Day,\" but they are not believers."}],"audio":{"ayah_key":"2:8","ogg":{"url":"http://verses.quran.com/Alafasy/ogg/002008.ogg","duration":11.999,"mime_type":"audio/ogg"},"mp3":{"url":"http://verses.quran.com/Alafasy/mp3/002008.mp3","duration":12.04,"mime_type":"audio/mpeg"}}},{"ayah_key":"2:9","ayah_index":16,"surah_id":2,"ayah_num":9,"page_num":3,"juz_num":1,"hizb_num":1,"rub_num":1,"text":"يخادعون الله والذين امنوا وما يخدعون الا انفسهم وما يشعرون","sajdah":null,"quran":[{"ayah_key":"2:9","word":{"position":1,"line":5,"arabic":"يُخَادِعُونَ","id":100,"translation":"They seek to deceive"},"char":{"page":3,"font":"p3","code_hex":"fb78","type_id":1,"type":"word","code_dec":64376,"line":5,"code":"\u0026#xfb78;"}},{"ayah_key":"2:9","word":{"position":2,"line":5,"arabic":"اللَّهَ","id":101,"translation":"Allah"},"char":{"page":3,"font":"p3","code_hex":"fb79","type_id":1,"type":"word","code_dec":64377,"line":5,"code":"\u0026#xfb79;"}},{"ayah_key":"2:9","word":{"position":3,"line":5,"arabic":"وَالَّذِينَ","id":102,"translation":"and those who"},"char":{"page":3,"font":"p3","code_hex":"fb7a","type_id":1,"type":"word","code_dec":64378,"line":5,"code":"\u0026#xfb7a;"}},{"ayah_key":"2:9","word":{"position":4,"line":5,"arabic":"آمَنُوا","id":103,"translation":"believe[d]"},"char":{"page":3,"font":"p3","code_hex":"fb7b","type_id":1,"type":"word","code_dec":64379,"line":5,"code":"\u0026#xfb7b;"}},{"ayah_key":"2:9","word":{"position":5,"line":5,"arabic":"وَمَا","id":104,"translation":"and not"},"char":{"page":3,"font":"p3","code_hex":"fb7c","type_id":1,"type":"word","code_dec":64380,"line":5,"code":"\u0026#xfb7c;"}},{"ayah_key":"2:9","word":{"position":6,"line":5,"arabic":"يَخْدَعُونَ","id":105,"translation":"they deceive"},"char":{"page":3,"font":"p3","code_hex":"fb7d","type_id":1,"type":"word","code_dec":64381,"line":5,"code":"\u0026#xfb7d;"}},{"ayah_key":"2:9","word":{"position":7,"line":5,"arabic":"إِلَّا","id":106,"translation":"except"},"char":{"page":3,"font":"p3","code_hex":"fb7e","type_id":1,"type":"word","code_dec":64382,"line":5,"code":"\u0026#xfb7e;"}},{"ayah_key":"2:9","word":{"position":8,"line":5,"arabic":"أَنْفُسَهُمْ","id":107,"translation":"themselves"},"char":{"page":3,"font":"p3","code_hex":"fb7f","type_id":1,"type":"word","code_dec":64383,"line":5,"code":"\u0026#xfb7f;"}},{"ayah_key":"2:9","word":{"position":9,"line":6,"arabic":"وَمَا","id":108,"translation":"and not"},"char":{"page":3,"font":"p3","code_hex":"fb80","type_id":1,"type":"word","code_dec":64384,"line":6,"code":"\u0026#xfb80;"}},{"ayah_key":"2:9","word":{"position":10,"line":6,"arabic":"يَشْعُرُونَ","id":109,"translation":"they realize (it)"},"char":{"page":3,"font":"p3","code_hex":"fb81","type_id":1,"type":"word","code_dec":64385,"line":6,"code":"\u0026#xfb81;"}},{"ayah_key":"2:9","word":{"position":11,"line":6,"arabic":null,"id":null,"translation":null},"char":{"page":3,"font":"p3","code_hex":"fb82","type_id":2,"type":"end","code_dec":64386,"line":6,"code":"\u0026#xfb82;"}}],"content":[{"id":19,"name":"Sahih International","slug":"sahih_international","lang":"en","dir":"ltr","ayah_key":"2:9","text":"They [think to] deceive Allah and those who believe, but they deceive not except themselves and perceive [it] not."}],"audio":{"ayah_key":"2:9","ogg":{"url":"http://verses.quran.com/Alafasy/ogg/002009.ogg","duration":12.527,"mime_type":"audio/ogg"},"mp3":{"url":"http://verses.quran.com/Alafasy/mp3/002009.mp3","duration":12.59,"mime_type":"audio/mpeg"}}},{"ayah_key":"2:10","ayah_index":17,"surah_id":2,"ayah_num":10,"page_num":3,"juz_num":1,"hizb_num":1,"rub_num":1,"text":"في قلوبهم مرض فزادهم الله مرضا ولهم عذاب اليم بما كانوا يكذبون","sajdah":null,"quran":[{"ayah_key":"2:10","word":{"position":1,"line":6,"arabic":"فِي","id":110,"translation":"In"},"char":{"page":3,"font":"p3","code_hex":"fb83","type_id":1,"type":"word","code_dec":64387,"line":6,"code":"\u0026#xfb83;"}},{"ayah_key":"2:10","word":{"position":2,"line":6,"arabic":"قُلُوبِهِمْ","id":111,"translation":"their hearts"},"char":{"page":3,"font":"p3","code_hex":"fb84","type_id":1,"type":"word","code_dec":64388,"line":6,"code":"\u0026#xfb84;"}},{"ayah_key":"2:10","word":{"position":3,"line":6,"arabic":"مَرَضٌ","id":112,"translation":"(is) a disease"},"char":{"page":3,"font":"p3","code_hex":"fb85","type_id":1,"type":"word","code_dec":64389,"line":6,"code":"\u0026#xfb85;"}},{"ayah_key":"2:10","word":{"position":4,"line":6,"arabic":"فَزَادَهُمُ","id":113,"translation":"so has increased them"},"char":{"page":3,"font":"p3","code_hex":"fb86","type_id":1,"type":"word","code_dec":64390,"line":6,"code":"\u0026#xfb86;"}},{"ayah_key":"2:10","word":{"position":5,"line":6,"arabic":"اللَّهُ","id":114,"translation":"Allah"},"char":{"page":3,"font":"p3","code_hex":"fb87","type_id":1,"type":"word","code_dec":64391,"line":6,"code":"\u0026#xfb87;"}},{"ayah_key":"2:10","word":{"position":6,"line":6,"arabic":"مَرَضًا","id":115,"translation":"(in) disease"},"char":{"page":3,"font":"p3","code_hex":"fb88","type_id":1,"type":"word","code_dec":64392,"line":6,"code":"\u0026#xfb88;"}},{"ayah_key":"2:10","word":{"position":7,"line":6,"arabic":null,"id":null,"translation":null},"char":{"page":3,"font":"p3","code_hex":"fb89","type_id":3,"type":"pause","code_dec":64393,"line":6,"code":"\u0026#xfb89;"}},{"ayah_key":"2:10","word":{"position":8,"line":7,"arabic":"وَلَهُمْ","id":116,"translation":"and for them"},"char":{"page":3,"font":"p3","code_hex":"fb8a","type_id":1,"type":"word","code_dec":64394,"line":7,"code":"\u0026#xfb8a;"}},{"ayah_key":"2:10","word":{"position":9,"line":7,"arabic":"عَذَابٌ","id":117,"translation":"(is) a punishment"},"char":{"page":3,"font":"p3","code_hex":"fb8b","type_id":1,"type":"word","code_dec":64395,"line":7,"code":"\u0026#xfb8b;"}},{"ayah_key":"2:10","word":{"position":10,"line":7,"arabic":"أَلِيمٌ","id":118,"translation":"painful"},"char":{"page":3,"font":"p3","code_hex":"fb8c","type_id":1,"type":"word","code_dec":64396,"line":7,"code":"\u0026#xfb8c;"}},{"ayah_key":"2:10","word":{"position":11,"line":7,"arabic":"بِمَا","id":119,"translation":"because"},"char":{"page":3,"font":"p3","code_hex":"fb8d","type_id":1,"type":"word","code_dec":64397,"line":7,"code":"\u0026#xfb8d;"}},{"ayah_key":"2:10","word":{"position":12,"line":7,"arabic":"كَانُوا","id":120,"translation":"they used to"},"char":{"page":3,"font":"p3","code_hex":"fb8e","type_id":1,"type":"word","code_dec":64398,"line":7,"code":"\u0026#xfb8e;"}},{"ayah_key":"2:10","word":{"position":13,"line":7,"arabic":"يَكْذِبُونَ","id":121,"translation":"[they] lie"},"char":{"page":3,"font":"p3","code_hex":"fb8f","type_id":1,"type":"word","code_dec":64399,"line":7,"code":"\u0026#xfb8f;"}},{"ayah_key":"2:10","word":{"position":14,"line":7,"arabic":null,"id":null,"translation":null},"char":{"page":3,"font":"p3","code_hex":"fb90","type_id":2,"type":"end","code_dec":64400,"line":7,"code":"\u0026#xfb90;"}}],"content":[{"id":19,"name":"Sahih International","slug":"sahih_international","lang":"en","dir":"ltr","ayah_key":"2:10","text":"In their hearts is disease, so Allah has increased their disease; and for them is a painful punishment because they [habitually] used to lie."}],"audio":{"ayah_key":"2:10","ogg":{"url":"http://verses.quran.com/Alafasy/ogg/002010.ogg","duration":13.537,"mime_type":"audio/ogg"},"mp3":{"url":"http://verses.quran.com/Alafasy/mp3/002010.mp3","duration":13.58,"mime_type":"audio/mpeg"}}},{"ayah_key":"2:11","ayah_index":18,"surah_id":2,"ayah_num":11,"page_num":3,"juz_num":1,"hizb_num":1,"rub_num":1,"text":"واذا قيل لهم لا تفسدوا في الارض قالوا انما نحن مصلحون","sajdah":null,"quran":[{"ayah_key":"2:11","word":{"position":1,"line":7,"arabic":"وَإِذَا","id":122,"translation":"And when"},"char":{"page":3,"font":"p3","code_hex":"fb91","type_id":1,"type":"word","code_dec":64401,"line":7,"code":"\u0026#xfb91;"}},{"ayah_key":"2:11","word":{"position":2,"line":7,"arabic":"قِيلَ","id":123,"translation":"it is said"},"char":{"page":3,"font":"p3","code_hex":"fb92","type_id":1,"type":"word","code_dec":64402,"line":7,"code":"\u0026#xfb92;"}},{"ayah_key":"2:11","word":{"position":3,"line":7,"arabic":"لَهُمْ","id":124,"translation":"to them"},"char":{"page":3,"font":"p3","code_hex":"fb93","type_id":1,"type":"word","code_dec":64403,"line":7,"code":"\u0026#xfb93;"}},{"ayah_key":"2:11","word":{"position":4,"line":8,"arabic":"لَا","id":125,"translation":"(Do) not"},"char":{"page":3,"font":"p3","code_hex":"fb94","type_id":1,"type":"word","code_dec":64404,"line":8,"code":"\u0026#xfb94;"}},{"ayah_key":"2:11","word":{"position":5,"line":8,"arabic":"تُفْسِدُوا","id":126,"translation":"spread corruption"},"char":{"page":3,"font":"p3","code_hex":"fb95","type_id":1,"type":"word","code_dec":64405,"line":8,"code":"\u0026#xfb95;"}},{"ayah_key":"2:11","word":{"position":6,"line":8,"arabic":"فِي","id":127,"translation":"in"},"char":{"page":3,"font":"p3","code_hex":"fb96","type_id":1,"type":"word","code_dec":64406,"line":8,"code":"\u0026#xfb96;"}},{"ayah_key":"2:11","word":{"position":7,"line":8,"arabic":"الْأَرْضِ","id":128,"translation":"the earth"},"char":{"page":3,"font":"p3","code_hex":"fb97","type_id":1,"type":"word","code_dec":64407,"line":8,"code":"\u0026#xfb97;"}},{"ayah_key":"2:11","word":{"position":8,"line":8,"arabic":"قَالُوا","id":129,"translation":"they say"},"char":{"page":3,"font":"p3","code_hex":"fb98","type_id":1,"type":"word","code_dec":64408,"line":8,"code":"\u0026#xfb98;"}},{"ayah_key":"2:11","word":{"position":9,"line":8,"arabic":"إِنَّمَا","id":130,"translation":"Only"},"char":{"page":3,"font":"p3","code_hex":"fb99","type_id":1,"type":"word","code_dec":64409,"line":8,"code":"\u0026#xfb99;"}},{"ayah_key":"2:11","word":{"position":10,"line":8,"arabic":"نَحْنُ","id":131,"translation":"we"},"char":{"page":3,"font":"p3","code_hex":"fb9a","type_id":1,"type":"word","code_dec":64410,"line":8,"code":"\u0026#xfb9a;"}},{"ayah_key":"2:11","word":{"position":11,"line":8,"arabic":"مُصْلِحُونَ","id":132,"translation":"(are) reformers"},"char":{"page":3,"font":"p3","code_hex":"fb9b","type_id":1,"type":"word","code_dec":64411,"line":8,"code":"\u0026#xfb9b;"}},{"ayah_key":"2:11","word":{"position":12,"line":8,"arabic":null,"id":null,"translation":null},"char":{"page":3,"font":"p3","code_hex":"fb9c","type_id":2,"type":"end","code_dec":64412,"line":8,"code":"\u0026#xfb9c;"}}],"content":[{"id":19,"name":"Sahih International","slug":"sahih_international","lang":"en","dir":"ltr","ayah_key":"2:11","text":"And when it is said to them, \"Do not cause corruption on the earth,\" they say, \"We are but reformers.\""}],"audio":{"ayah_key":"2:11","ogg":{"url":"http://verses.quran.com/Alafasy/ogg/002011.ogg","duration":10.623,"mime_type":"audio/ogg"},"mp3":{"url":"http://verses.quran.com/Alafasy/mp3/002011.mp3","duration":10.68,"mime_type":"audio/mpeg"}}},{"ayah_key":"2:12","ayah_index":19,"surah_id":2,"ayah_num":12,"page_num":3,"juz_num":1,"hizb_num":1,"rub_num":1,"text":"الا انهم هم المفسدون ولكن لا يشعرون","sajdah":null,"quran":[{"ayah_key":"2:12","word":{"position":1,"line":9,"arabic":"أَلَا","id":133,"translation":"Beware"},"char":{"page":3,"font":"p3","code_hex":"fb9d","type_id":1,"type":"word","code_dec":64413,"line":9,"code":"\u0026#xfb9d;"}},{"ayah_key":"2:12","word":{"position":2,"line":9,"arabic":"إِنَّهُمْ","id":134,"translation":"indeed they"},"char":{"page":3,"font":"p3","code_hex":"fb9e","type_id":1,"type":"word","code_dec":64414,"line":9,"code":"\u0026#xfb9e;"}},{"ayah_key":"2:12","word":{"position":3,"line":9,"arabic":"هُمُ","id":135,"translation":"themselves"},"char":{"page":3,"font":"p3","code_hex":"fb9f","type_id":1,"type":"word","code_dec":64415,"line":9,"code":"\u0026#xfb9f;"}},{"ayah_key":"2:12","word":{"position":4,"line":9,"arabic":"الْمُفْسِدُونَ","id":136,"translation":"(are) the ones who spread corruption"},"char":{"page":3,"font":"p3","code_hex":"fba0","type_id":1,"type":"word","code_dec":64416,"line":9,"code":"\u0026#xfba0;"}},{"ayah_key":"2:12","word":{"position":5,"line":9,"arabic":"وَلَٰكِنْ","id":137,"translation":"[and] but"},"char":{"page":3,"font":"p3","code_hex":"fba1","type_id":1,"type":"word","code_dec":64417,"line":9,"code":"\u0026#xfba1;"}},{"ayah_key":"2:12","word":{"position":6,"line":9,"arabic":"لَا","id":138,"translation":"not"},"char":{"page":3,"font":"p3","code_hex":"fba2","type_id":1,"type":"word","code_dec":64418,"line":9,"code":"\u0026#xfba2;"}},{"ayah_key":"2:12","word":{"position":7,"line":9,"arabic":"يَشْعُرُونَ","id":139,"translation":"they realize (it)"},"char":{"page":3,"font":"p3","code_hex":"fba3","type_id":1,"type":"word","code_dec":64419,"line":9,"code":"\u0026#xfba3;"}},{"ayah_key":"2:12","word":{"position":8,"line":9,"arabic":null,"id":null,"translation":null},"char":{"page":3,"font":"p3","code_hex":"fba4","type_id":2,"type":"end","code_dec":64420,"line":9,"code":"\u0026#xfba4;"}}],"content":[{"id":19,"name":"Sahih International","slug":"sahih_international","lang":"en","dir":"ltr","ayah_key":"2:12","text":"Unquestionably, it is they who are the corrupters, but they perceive [it] not."}],"audio":{"ayah_key":"2:12","ogg":{"url":"http://verses.quran.com/Alafasy/ogg/002012.ogg","duration":9.087,"mime_type":"audio/ogg"},"mp3":{"url":"http://verses.quran.com/Alafasy/mp3/002012.mp3","duration":9.14,"mime_type":"audio/mpeg"}}},{"ayah_key":"2:13","ayah_index":20,"surah_id":2,"ayah_num":13,"page_num":3,"juz_num":1,"hizb_num":1,"rub_num":1,"text":"واذا قيل لهم امنوا كما امن الناس قالوا انؤمن كما امن السفهاء الا انهم هم السفهاء ولكن لا يعلمون","sajdah":null,"quran":[{"ayah_key":"2:13","word":{"position":1,"line":9,"arabic":"وَإِذَا","id":140,"translation":"And when"},"char":{"page":3,"font":"p3","code_hex":"fba5","type_id":1,"type":"word","code_dec":64421,"line":9,"code":"\u0026#xfba5;"}},{"ayah_key":"2:13","word":{"position":2,"line":9,"arabic":"قِيلَ","id":141,"translation":"it is said"},"char":{"page":3,"font":"p3","code_hex":"fba6","type_id":1,"type":"word","code_dec":64422,"line":9,"code":"\u0026#xfba6;"}},{"ayah_key":"2:13","word":{"position":3,"line":10,"arabic":"لَهُمْ","id":142,"translation":"to them"},"char":{"page":3,"font":"p3","code_hex":"fba7","type_id":1,"type":"word","code_dec":64423,"line":10,"code":"\u0026#xfba7;"}},{"ayah_key":"2:13","word":{"position":4,"line":10,"arabic":"آمِنُوا","id":143,"translation":"Believe"},"char":{"page":3,"font":"p3","code_hex":"fba8","type_id":1,"type":"word","code_dec":64424,"line":10,"code":"\u0026#xfba8;"}},{"ayah_key":"2:13","word":{"position":5,"line":10,"arabic":"كَمَا","id":144,"translation":"as"},"char":{"page":3,"font":"p3","code_hex":"fba9","type_id":1,"type":"word","code_dec":64425,"line":10,"code":"\u0026#xfba9;"}},{"ayah_key":"2:13","word":{"position":6,"line":10,"arabic":"آمَنَ","id":145,"translation":"believed"},"char":{"page":3,"font":"p3","code_hex":"fbaa","type_id":1,"type":"word","code_dec":64426,"line":10,"code":"\u0026#xfbaa;"}},{"ayah_key":"2:13","word":{"position":7,"line":10,"arabic":"النَّاسُ","id":146,"translation":"the people"},"char":{"page":3,"font":"p3","code_hex":"fbab","type_id":1,"type":"word","code_dec":64427,"line":10,"code":"\u0026#xfbab;"}},{"ayah_key":"2:13","word":{"position":8,"line":10,"arabic":"قَالُوا","id":147,"translation":"they say"},"char":{"page":3,"font":"p3","code_hex":"fbac","type_id":1,"type":"word","code_dec":64428,"line":10,"code":"\u0026#xfbac;"}},{"ayah_key":"2:13","word":{"position":9,"line":10,"arabic":"أَنُؤْمِنُ","id":148,"translation":"Should we believe"},"char":{"page":3,"font":"p3","code_hex":"fbad","type_id":1,"type":"word","code_dec":64429,"line":10,"code":"\u0026#xfbad;"}},{"ayah_key":"2:13","word":{"position":10,"line":10,"arabic":"كَمَا","id":149,"translation":"as"},"char":{"page":3,"font":"p3","code_hex":"fbae","type_id":1,"type":"word","code_dec":64430,"line":10,"code":"\u0026#xfbae;"}},{"ayah_key":"2:13","word":{"position":11,"line":10,"arabic":"آمَنَ","id":150,"translation":"believed"},"char":{"page":3,"font":"p3","code_hex":"fbaf","type_id":1,"type":"word","code_dec":64431,"line":10,"code":"\u0026#xfbaf;"}},{"ayah_key":"2:13","word":{"position":12,"line":10,"arabic":"السُّفَهَاءُ","id":151,"translation":"the fools"},"char":{"page":3,"font":"p3","code_hex":"fbb0","type_id":1,"type":"word","code_dec":64432,"line":10,"code":"\u0026#xfbb0;"}},{"ayah_key":"2:13","word":{"position":13,"line":10,"arabic":null,"id":null,"translation":null},"char":{"page":3,"font":"p3","code_hex":"fbb1","type_id":3,"type":"pause","code_dec":64433,"line":10,"code":"\u0026#xfbb1;"}},{"ayah_key":"2:13","word":{"position":14,"line":11,"arabic":"أَلَا","id":152,"translation":"Beware"},"char":{"page":3,"font":"p3","code_hex":"fbd3","type_id":1,"type":"word","code_dec":64467,"line":11,"code":"\u0026#xfbd3;"}},{"ayah_key":"2:13","word":{"position":15,"line":11,"arabic":"إِنَّهُمْ","id":153,"translation":"certainly they"},"char":{"page":3,"font":"p3","code_hex":"fbd4","type_id":1,"type":"word","code_dec":64468,"line":11,"code":"\u0026#xfbd4;"}},{"ayah_key":"2:13","word":{"position":16,"line":11,"arabic":"هُمُ","id":154,"translation":"themselves"},"char":{"page":3,"font":"p3","code_hex":"fbd5","type_id":1,"type":"word","code_dec":64469,"line":11,"code":"\u0026#xfbd5;"}},{"ayah_key":"2:13","word":{"position":17,"line":11,"arabic":"السُّفَهَاءُ","id":155,"translation":"(are) the fools"},"char":{"page":3,"font":"p3","code_hex":"fbd6","type_id":1,"type":"word","code_dec":64470,"line":11,"code":"\u0026#xfbd6;"}},{"ayah_key":"2:13","word":{"position":18,"line":11,"arabic":"وَلَٰكِنْ","id":156,"translation":"[and] but"},"char":{"page":3,"font":"p3","code_hex":"fbd7","type_id":1,"type":"word","code_dec":64471,"line":11,"code":"\u0026#xfbd7;"}},{"ayah_key":"2:13","word":{"position":19,"line":11,"arabic":"لَا","id":157,"translation":"not"},"char":{"page":3,"font":"p3","code_hex":"fbd8","type_id":1,"type":"word","code_dec":64472,"line":11,"code":"\u0026#xfbd8;"}},{"ayah_key":"2:13","word":{"position":20,"line":11,"arabic":"يَعْلَمُونَ","id":158,"translation":"they know"},"char":{"page":3,"font":"p3","code_hex":"fbd9","type_id":1,"type":"word","code_dec":64473,"line":11,"code":"\u0026#xfbd9;"}},{"ayah_key":"2:13","word":{"position":21,"line":11,"arabic":null,"id":null,"translation":null},"char":{"page":3,"font":"p3","code_hex":"fbda","type_id":2,"type":"end","code_dec":64474,"line":11,"code":"\u0026#xfbda;"}}],"content":[{"id":19,"name":"Sahih International","slug":"sahih_international","lang":"en","dir":"ltr","ayah_key":"2:13","text":"And when it is said to them, \"Believe as the people have believed,\" they say, \"Should we believe as the foolish have believed?\" Unquestionably, it is they who are the foolish, but they know [it] not."}],"audio":{"ayah_key":"2:13","ogg":{"url":"http://verses.quran.com/Alafasy/ogg/002013.ogg","duration":24.907,"mime_type":"audio/ogg"},"mp3":{"url":"http://verses.quran.com/Alafasy/mp3/002013.mp3","duration":24.97,"mime_type":"audio/mpeg"}}},{"ayah_key":"2:14","ayah_index":21,"surah_id":2,"ayah_num":14,"page_num":3,"juz_num":1,"hizb_num":1,"rub_num":1,"text":"واذا لقوا الذين امنوا قالوا امنا واذا خلوا الى شياطينهم قالوا انا معكم انما نحن مستهزئون","sajdah":null,"quran":[{"ayah_key":"2:14","word":{"position":1,"line":11,"arabic":"وَإِذَا","id":159,"translation":"And when"},"char":{"page":3,"font":"p3","code_hex":"fbdb","type_id":1,"type":"word","code_dec":64475,"line":11,"code":"\u0026#xfbdb;"}},{"ayah_key":"2:14","word":{"position":2,"line":11,"arabic":"لَقُوا","id":160,"translation":"they meet"},"char":{"page":3,"font":"p3","code_hex":"fbdc","type_id":1,"type":"word","code_dec":64476,"line":11,"code":"\u0026#xfbdc;"}},{"ayah_key":"2:14","word":{"position":3,"line":12,"arabic":"الَّذِينَ","id":161,"translation":"those who"},"char":{"page":3,"font":"p3","code_hex":"fbdd","type_id":1,"type":"word","code_dec":64477,"line":12,"code":"\u0026#xfbdd;"}},{"ayah_key":"2:14","word":{"position":4,"line":12,"arabic":"آمَنُوا","id":162,"translation":"believe[d]"},"char":{"page":3,"font":"p3","code_hex":"fbde","type_id":1,"type":"word","code_dec":64478,"line":12,"code":"\u0026#xfbde;"}},{"ayah_key":"2:14","word":{"position":5,"line":12,"arabic":"قَالُوا","id":163,"translation":"they say"},"char":{"page":3,"font":"p3","code_hex":"fbdf","type_id":1,"type":"word","code_dec":64479,"line":12,"code":"\u0026#xfbdf;"}},{"ayah_key":"2:14","word":{"position":6,"line":12,"arabic":"آمَنَّا","id":164,"translation":"We believe[d]"},"char":{"page":3,"font":"p3","code_hex":"fbe0","type_id":1,"type":"word","code_dec":64480,"line":12,"code":"\u0026#xfbe0;"}},{"ayah_key":"2:14","word":{"position":7,"line":12,"arabic":"وَإِذَا","id":165,"translation":"But when"},"char":{"page":3,"font":"p3","code_hex":"fbe1","type_id":1,"type":"word","code_dec":64481,"line":12,"code":"\u0026#xfbe1;"}},{"ayah_key":"2:14","word":{"position":8,"line":12,"arabic":"خَلَوْا","id":166,"translation":"they are alone"},"char":{"page":3,"font":"p3","code_hex":"fbe2","type_id":1,"type":"word","code_dec":64482,"line":12,"code":"\u0026#xfbe2;"}},{"ayah_key":"2:14","word":{"position":9,"line":12,"arabic":"إِلَىٰ","id":167,"translation":"with"},"char":{"page":3,"font":"p3","code_hex":"fbe3","type_id":1,"type":"word","code_dec":64483,"line":12,"code":"\u0026#xfbe3;"}},{"ayah_key":"2:14","word":{"position":10,"line":12,"arabic":"شَيَاطِينِهِمْ","id":168,"translation":"their evil ones"},"char":{"page":3,"font":"p3","code_hex":"fbe4","type_id":1,"type":"word","code_dec":64484,"line":12,"code":"\u0026#xfbe4;"}},{"ayah_key":"2:14","word":{"position":11,"line":12,"arabic":"قَالُوا","id":169,"translation":"they say"},"char":{"page":3,"font":"p3","code_hex":"fbe5","type_id":1,"type":"word","code_dec":64485,"line":12,"code":"\u0026#xfbe5;"}},{"ayah_key":"2:14","word":{"position":12,"line":12,"arabic":"إِنَّا","id":170,"translation":"Indeed, we"},"char":{"page":3,"font":"p3","code_hex":"fbe6","type_id":1,"type":"word","code_dec":64486,"line":12,"code":"\u0026#xfbe6;"}},{"ayah_key":"2:14","word":{"position":13,"line":13,"arabic":"مَعَكُمْ","id":171,"translation":"(are) with you"},"char":{"page":3,"font":"p3","code_hex":"fbe7","type_id":1,"type":"word","code_dec":64487,"line":13,"code":"\u0026#xfbe7;"}},{"ayah_key":"2:14","word":{"position":14,"line":13,"arabic":"إِنَّمَا","id":172,"translation":"only"},"char":{"page":3,"font":"p3","code_hex":"fbe8","type_id":1,"type":"word","code_dec":64488,"line":13,"code":"\u0026#xfbe8;"}},{"ayah_key":"2:14","word":{"position":15,"line":13,"arabic":"نَحْنُ","id":173,"translation":"we"},"char":{"page":3,"font":"p3","code_hex":"fbe9","type_id":1,"type":"word","code_dec":64489,"line":13,"code":"\u0026#xfbe9;"}},{"ayah_key":"2:14","word":{"position":16,"line":13,"arabic":"مُسْتَهْزِئُونَ","id":174,"translation":"(are) mockers"},"char":{"page":3,"font":"p3","code_hex":"fbea","type_id":1,"type":"word","code_dec":64490,"line":13,"code":"\u0026#xfbea;"}},{"ayah_key":"2:14","word":{"position":17,"line":13,"arabic":null,"id":null,"translation":null},"char":{"page":3,"font":"p3","code_hex":"fbeb","type_id":2,"type":"end","code_dec":64491,"line":13,"code":"\u0026#xfbeb;"}}],"content":[{"id":19,"name":"Sahih International","slug":"sahih_international","lang":"en","dir":"ltr","ayah_key":"2:14","text":"And when they meet those who believe, they say, \"We believe\"; but when they are alone with their evil ones, they say, \"Indeed, we are with you; we were only mockers.\""}],"audio":{"ayah_key":"2:14","ogg":{"url":"http://verses.quran.com/Alafasy/ogg/002014.ogg","duration":23.708,"mime_type":"audio/ogg"},"mp3":{"url":"http://verses.quran.com/Alafasy/mp3/002014.mp3","duration":23.77,"mime_type":"audio/mpeg"}}},{"ayah_key":"2:15","ayah_index":22,"surah_id":2,"ayah_num":15,"page_num":3,"juz_num":1,"hizb_num":1,"rub_num":1,"text":"الله يستهزئ بهم ويمدهم في طغيانهم يعمهون","sajdah":null,"quran":[{"ayah_key":"2:15","word":{"position":1,"line":13,"arabic":"اللَّهُ","id":175,"translation":"Allah"},"char":{"page":3,"font":"p3","code_hex":"fbec","type_id":1,"type":"word","code_dec":64492,"line":13,"code":"\u0026#xfbec;"}},{"ayah_key":"2:15","word":{"position":2,"line":13,"arabic":"يَسْتَهْزِئُ","id":176,"translation":"mocks"},"char":{"page":3,"font":"p3","code_hex":"fbed","type_id":1,"type":"word","code_dec":64493,"line":13,"code":"\u0026#xfbed;"}},{"ayah_key":"2:15","word":{"position":3,"line":13,"arabic":"بِهِمْ","id":177,"translation":"at them"},"char":{"page":3,"font":"p3","code_hex":"fbee","type_id":1,"type":"word","code_dec":64494,"line":13,"code":"\u0026#xfbee;"}},{"ayah_key":"2:15","word":{"position":4,"line":13,"arabic":"وَيَمُدُّهُمْ","id":178,"translation":"and prolongs them"},"char":{"page":3,"font":"p3","code_hex":"fbef","type_id":1,"type":"word","code_dec":64495,"line":13,"code":"\u0026#xfbef;"}},{"ayah_key":"2:15","word":{"position":5,"line":14,"arabic":"فِي","id":179,"translation":"in"},"char":{"page":3,"font":"p3","code_hex":"fbf0","type_id":1,"type":"word","code_dec":64496,"line":14,"code":"\u0026#xfbf0;"}},{"ayah_key":"2:15","word":{"position":6,"line":14,"arabic":"طُغْيَانِهِمْ","id":180,"translation":"their transgression"},"char":{"page":3,"font":"p3","code_hex":"fbf1","type_id":1,"type":"word","code_dec":64497,"line":14,"code":"\u0026#xfbf1;"}},{"ayah_key":"2:15","word":{"position":7,"line":14,"arabic":"يَعْمَهُونَ","id":181,"translation":"they wander blindly"},"char":{"page":3,"font":"p3","code_hex":"fbf2","type_id":1,"type":"word","code_dec":64498,"line":14,"code":"\u0026#xfbf2;"}},{"ayah_key":"2:15","word":{"position":8,"line":14,"arabic":null,"id":null,"translation":null},"char":{"page":3,"font":"p3","code_hex":"fbf3","type_id":2,"type":"end","code_dec":64499,"line":14,"code":"\u0026#xfbf3;"}}],"content":[{"id":19,"name":"Sahih International","slug":"sahih_international","lang":"en","dir":"ltr","ayah_key":"2:15","text":"[But] Allah mocks them and prolongs them in their transgression [while] they wander blindly."}],"audio":{"ayah_key":"2:15","ogg":{"url":"http://verses.quran.com/Alafasy/ogg/002015.ogg","duration":7.888,"mime_type":"audio/ogg"},"mp3":{"url":"http://verses.quran.com/Alafasy/mp3/002015.mp3","duration":7.94,"mime_type":"audio/mpeg"}}},{"ayah_key":"2:16","ayah_index":23,"surah_id":2,"ayah_num":16,"page_num":3,"juz_num":1,"hizb_num":1,"rub_num":1,"text":"اولئك الذين اشتروا الضلالة بالهدى فما ربحت تجارتهم وما كانوا مهتدين","sajdah":null,"quran":[{"ayah_key":"2:16","word":{"position":1,"line":14,"arabic":"أُولَٰئِكَ","id":182,"translation":"Those"},"char":{"page":3,"font":"p3","code_hex":"fbf4","type_id":1,"type":"word","code_dec":64500,"line":14,"code":"\u0026#xfbf4;"}},{"ayah_key":"2:16","word":{"position":2,"line":14,"arabic":"الَّذِينَ","id":183,"translation":"(are) the ones who"},"char":{"page":3,"font":"p3","code_hex":"fbf5","type_id":1,"type":"word","code_dec":64501,"line":14,"code":"\u0026#xfbf5;"}},{"ayah_key":"2:16","word":{"position":3,"line":14,"arabic":"اشْتَرَوُا","id":184,"translation":"bought"},"char":{"page":3,"font":"p3","code_hex":"fbf6","type_id":1,"type":"word","code_dec":64502,"line":14,"code":"\u0026#xfbf6;"}},{"ayah_key":"2:16","word":{"position":4,"line":14,"arabic":"الضَّلَالَةَ","id":185,"translation":"[the] astraying"},"char":{"page":3,"font":"p3","code_hex":"fbf7","type_id":1,"type":"word","code_dec":64503,"line":14,"code":"\u0026#xfbf7;"}},{"ayah_key":"2:16","word":{"position":5,"line":15,"arabic":"بِالْهُدَىٰ","id":186,"translation":"for [the] guidance"},"char":{"page":3,"font":"p3","code_hex":"fbf8","type_id":1,"type":"word","code_dec":64504,"line":15,"code":"\u0026#xfbf8;"}},{"ayah_key":"2:16","word":{"position":6,"line":15,"arabic":"فَمَا","id":187,"translation":"So not"},"char":{"page":3,"font":"p3","code_hex":"fbf9","type_id":1,"type":"word","code_dec":64505,"line":15,"code":"\u0026#xfbf9;"}},{"ayah_key":"2:16","word":{"position":7,"line":15,"arabic":"رَبِحَتْ","id":188,"translation":"profited"},"char":{"page":3,"font":"p3","code_hex":"fbfa","type_id":1,"type":"word","code_dec":64506,"line":15,"code":"\u0026#xfbfa;"}},{"ayah_key":"2:16","word":{"position":8,"line":15,"arabic":"تِجَارَتُهُمْ","id":189,"translation":"their commerce"},"char":{"page":3,"font":"p3","code_hex":"fbfb","type_id":1,"type":"word","code_dec":64507,"line":15,"code":"\u0026#xfbfb;"}},{"ayah_key":"2:16","word":{"position":9,"line":15,"arabic":"وَمَا","id":190,"translation":"and not"},"char":{"page":3,"font":"p3","code_hex":"fbfc","type_id":1,"type":"word","code_dec":64508,"line":15,"code":"\u0026#xfbfc;"}},{"ayah_key":"2:16","word":{"position":10,"line":15,"arabic":"كَانُوا","id":191,"translation":"were they"},"char":{"page":3,"font":"p3","code_hex":"fbfd","type_id":1,"type":"word","code_dec":64509,"line":15,"code":"\u0026#xfbfd;"}},{"ayah_key":"2:16","word":{"position":11,"line":15,"arabic":"مُهْتَدِينَ","id":192,"translation":"guided-ones"},"char":{"page":3,"font":"p3","code_hex":"fbfe","type_id":1,"type":"word","code_dec":64510,"line":15,"code":"\u0026#xfbfe;"}},{"ayah_key":"2:16","word":{"position":12,"line":15,"arabic":null,"id":null,"translation":null},"char":{"page":3,"font":"p3","code_hex":"fbff","type_id":2,"type":"end","code_dec":64511,"line":15,"code":"\u0026#xfbff;"}}],"content":[{"id":19,"name":"Sahih International","slug":"sahih_international","lang":"en","dir":"ltr","ayah_key":"2:16","text":"Those are the ones who have purchased error [in exchange] for guidance, so their transaction has brought no profit, nor were they guided."}],"audio":{"ayah_key":"2:16","ogg":{"url":"http://verses.quran.com/Alafasy/ogg/002016.ogg","duration":12.517,"mime_type":"audio/ogg"},"mp3":{"url":"http://verses.quran.com/Alafasy/mp3/002016.mp3","duration":12.56,"mime_type":"audio/mpeg"}}},{"ayah_key":"2:17","ayah_index":24,"surah_id":2,"ayah_num":17,"page_num":4,"juz_num":1,"hizb_num":1,"rub_num":1,"text":"مثلهم كمثل الذي استوقد نارا فلما اضاءت ما حوله ذهب الله بنورهم وتركهم في ظلمات لا يبصرون","sajdah":null,"quran":[{"ayah_key":"2:17","word":{"position":1,"line":1,"arabic":"مَثَلُهُمْ","id":193,"translation":"Their example"},"char":{"page":4,"font":"p4","code_hex":"fb51","type_id":1,"type":"word","code_dec":64337,"line":1,"code":"\u0026#xfb51;"}},{"ayah_key":"2:17","word":{"position":2,"line":1,"arabic":"كَمَثَلِ","id":194,"translation":"(is) like (the) example"},"char":{"page":4,"font":"p4","code_hex":"fb52","type_id":1,"type":"word","code_dec":64338,"line":1,"code":"\u0026#xfb52;"}},{"ayah_key":"2:17","word":{"position":3,"line":1,"arabic":"الَّذِي","id":195,"translation":"(of) the one who"},"char":{"page":4,"font":"p4","code_hex":"fb53","type_id":1,"type":"word","code_dec":64339,"line":1,"code":"\u0026#xfb53;"}},{"ayah_key":"2:17","word":{"position":4,"line":1,"arabic":"اسْتَوْقَدَ","id":196,"translation":"kindled"},"char":{"page":4,"font":"p4","code_hex":"fb54","type_id":1,"type":"word","code_dec":64340,"line":1,"code":"\u0026#xfb54;"}},{"ayah_key":"2:17","word":{"position":5,"line":1,"arabic":"نَارًا","id":197,"translation":"a fire"},"char":{"page":4,"font":"p4","code_hex":"fb55","type_id":1,"type":"word","code_dec":64341,"line":1,"code":"\u0026#xfb55;"}},{"ayah_key":"2:17","word":{"position":6,"line":1,"arabic":"فَلَمَّا","id":198,"translation":"then, when"},"char":{"page":4,"font":"p4","code_hex":"fb56","type_id":1,"type":"word","code_dec":64342,"line":1,"code":"\u0026#xfb56;"}},{"ayah_key":"2:17","word":{"position":7,"line":1,"arabic":"أَضَاءَتْ","id":199,"translation":"it illuminated"},"char":{"page":4,"font":"p4","code_hex":"fb57","type_id":1,"type":"word","code_dec":64343,"line":1,"code":"\u0026#xfb57;"}},{"ayah_key":"2:17","word":{"position":8,"line":1,"arabic":"مَا","id":200,"translation":"what"},"char":{"page":4,"font":"p4","code_hex":"fb58","type_id":1,"type":"word","code_dec":64344,"line":1,"code":"\u0026#xfb58;"}},{"ayah_key":"2:17","word":{"position":9,"line":1,"arabic":"حَوْلَهُ","id":201,"translation":"(was) around him"},"char":{"page":4,"font":"p4","code_hex":"fb59","type_id":1,"type":"word","code_dec":64345,"line":1,"code":"\u0026#xfb59;"}},{"ayah_key":"2:17","word":{"position":10,"line":2,"arabic":"ذَهَبَ","id":202,"translation":"took away"},"char":{"page":4,"font":"p4","code_hex":"fb5a","type_id":1,"type":"word","code_dec":64346,"line":2,"code":"\u0026#xfb5a;"}},{"ayah_key":"2:17","word":{"position":11,"line":2,"arabic":"اللَّهُ","id":203,"translation":"Allah"},"char":{"page":4,"font":"p4","code_hex":"fb5b","type_id":1,"type":"word","code_dec":64347,"line":2,"code":"\u0026#xfb5b;"}},{"ayah_key":"2:17","word":{"position":12,"line":2,"arabic":"بِنُورِهِمْ","id":204,"translation":"their light"},"char":{"page":4,"font":"p4","code_hex":"fb5c","type_id":1,"type":"word","code_dec":64348,"line":2,"code":"\u0026#xfb5c;"}},{"ayah_key":"2:17","word":{"position":13,"line":2,"arabic":"وَتَرَكَهُمْ","id":205,"translation":"and left them"},"char":{"page":4,"font":"p4","code_hex":"fb5d","type_id":1,"type":"word","code_dec":64349,"line":2,"code":"\u0026#xfb5d;"}},{"ayah_key":"2:17","word":{"position":14,"line":2,"arabic":"فِي","id":206,"translation":"in"},"char":{"page":4,"font":"p4","code_hex":"fb5e","type_id":1,"type":"word","code_dec":64350,"line":2,"code":"\u0026#xfb5e;"}},{"ayah_key":"2:17","word":{"position":15,"line":2,"arabic":"ظُلُمَاتٍ","id":207,"translation":"darkness[es]"},"char":{"page":4,"font":"p4","code_hex":"fb5f","type_id":1,"type":"word","code_dec":64351,"line":2,"code":"\u0026#xfb5f;"}},{"ayah_key":"2:17","word":{"position":16,"line":2,"arabic":"لَا","id":208,"translation":"(so) not"},"char":{"page":4,"font":"p4","code_hex":"fb60","type_id":1,"type":"word","code_dec":64352,"line":2,"code":"\u0026#xfb60;"}},{"ayah_key":"2:17","word":{"position":17,"line":2,"arabic":"يُبْصِرُونَ","id":209,"translation":"(do) they see"},"char":{"page":4,"font":"p4","code_hex":"fb61","type_id":1,"type":"word","code_dec":64353,"line":2,"code":"\u0026#xfb61;"}},{"ayah_key":"2:17","word":{"position":18,"line":2,"arabic":null,"id":null,"translation":null},"char":{"page":4,"font":"p4","code_hex":"fb62","type_id":2,"type":"end","code_dec":64354,"line":2,"code":"\u0026#xfb62;"}}],"content":[{"id":19,"name":"Sahih International","slug":"sahih_international","lang":"en","dir":"ltr","ayah_key":"2:17","text":"Their example is that of one who kindled a fire, but when it illuminated what was around him, Allah took away their light and left them in darkness [so] they could not see."}],"audio":{"ayah_key":"2:17","ogg":{"url":"http://verses.quran.com/Alafasy/ogg/002017.ogg","duration":21.71,"mime_type":"audio/ogg"},"mp3":{"url":"http://verses.quran.com/Alafasy/mp3/002017.mp3","duration":21.76,"mime_type":"audio/mpeg"}}},{"ayah_key":"2:18","ayah_index":25,"surah_id":2,"ayah_num":18,"page_num":4,"juz_num":1,"hizb_num":1,"rub_num":1,"text":"صم بكم عمي فهم لا يرجعون","sajdah":null,"quran":[{"ayah_key":"2:18","word":{"position":1,"line":2,"arabic":"صُمٌّ","id":210,"translation":"Deaf"},"char":{"page":4,"font":"p4","code_hex":"fb63","type_id":1,"type":"word","code_dec":64355,"line":2,"code":"\u0026#xfb63;"}},{"ayah_key":"2:18","word":{"position":2,"line":3,"arabic":"بُكْمٌ","id":211,"translation":"dumb"},"char":{"page":4,"font":"p4","code_hex":"fb64","type_id":1,"type":"word","code_dec":64356,"line":3,"code":"\u0026#xfb64;"}},{"ayah_key":"2:18","word":{"position":3,"line":3,"arabic":"عُمْيٌ","id":212,"translation":"blind"},"char":{"page":4,"font":"p4","code_hex":"fb65","type_id":1,"type":"word","code_dec":64357,"line":3,"code":"\u0026#xfb65;"}},{"ayah_key":"2:18","word":{"position":4,"line":3,"arabic":"فَهُمْ","id":213,"translation":"so they"},"char":{"page":4,"font":"p4","code_hex":"fb66","type_id":1,"type":"word","code_dec":64358,"line":3,"code":"\u0026#xfb66;"}},{"ayah_key":"2:18","word":{"position":5,"line":3,"arabic":"لَا","id":214,"translation":"not"},"char":{"page":4,"font":"p4","code_hex":"fb67","type_id":1,"type":"word","code_dec":64359,"line":3,"code":"\u0026#xfb67;"}},{"ayah_key":"2:18","word":{"position":6,"line":3,"arabic":"يَرْجِعُونَ","id":215,"translation":"[they] will not return"},"char":{"page":4,"font":"p4","code_hex":"fb68","type_id":1,"type":"word","code_dec":64360,"line":3,"code":"\u0026#xfb68;"}},{"ayah_key":"2:18","word":{"position":7,"line":3,"arabic":null,"id":null,"translation":null},"char":{"page":4,"font":"p4","code_hex":"fb69","type_id":2,"type":"end","code_dec":64361,"line":3,"code":"\u0026#xfb69;"}}],"content":[{"id":19,"name":"Sahih International","slug":"sahih_international","lang":"en","dir":"ltr","ayah_key":"2:18","text":"Deaf, dumb and blind - so they will not return [to the right path]."}],"audio":{"ayah_key":"2:18","ogg":{"url":"http://verses.quran.com/Alafasy/ogg/002018.ogg","duration":7.762,"mime_type":"audio/ogg"},"mp3":{"url":"http://verses.quran.com/Alafasy/mp3/002018.mp3","duration":7.81,"mime_type":"audio/mpeg"}}},{"ayah_key":"2:19","ayah_index":26,"surah_id":2,"ayah_num":19,"page_num":4,"juz_num":1,"hizb_num":1,"rub_num":1,"text":"او كصيب من السماء فيه ظلمات ورعد وبرق يجعلون اصابعهم في اذانهم من الصواعق حذر الموت والله محيط بالكافرين","sajdah":null,"quran":[{"ayah_key":"2:19","word":{"position":1,"line":3,"arabic":"أَوْ","id":216,"translation":"Or"},"char":{"page":4,"font":"p4","code_hex":"fb6a","type_id":1,"type":"word","code_dec":64362,"line":3,"code":"\u0026#xfb6a;"}},{"ayah_key":"2:19","word":{"position":2,"line":3,"arabic":"كَصَيِّبٍ","id":217,"translation":"like a rainstorm"},"char":{"page":4,"font":"p4","code_hex":"fb6b","type_id":1,"type":"word","code_dec":64363,"line":3,"code":"\u0026#xfb6b;"}},{"ayah_key":"2:19","word":{"position":3,"line":3,"arabic":"مِنَ","id":218,"translation":"from"},"char":{"page":4,"font":"p4","code_hex":"fb6c","type_id":1,"type":"word","code_dec":64364,"line":3,"code":"\u0026#xfb6c;"}},{"ayah_key":"2:19","word":{"position":4,"line":3,"arabic":"السَّمَاءِ","id":219,"translation":"the sky"},"char":{"page":4,"font":"p4","code_hex":"fb6d","type_id":1,"type":"word","code_dec":64365,"line":3,"code":"\u0026#xfb6d;"}},{"ayah_key":"2:19","word":{"position":5,"line":3,"arabic":"فِيهِ","id":220,"translation":"in it (are)"},"char":{"page":4,"font":"p4","code_hex":"fb6e","type_id":1,"type":"word","code_dec":64366,"line":3,"code":"\u0026#xfb6e;"}},{"ayah_key":"2:19","word":{"position":6,"line":4,"arabic":"ظُلُمَاتٌ","id":221,"translation":"darkness[es]"},"char":{"page":4,"font":"p4","code_hex":"fb6f","type_id":1,"type":"word","code_dec":64367,"line":4,"code":"\u0026#xfb6f;"}},{"ayah_key":"2:19","word":{"position":7,"line":4,"arabic":"وَرَعْدٌ","id":222,"translation":"and thunder"},"char":{"page":4,"font":"p4","code_hex":"fb70","type_id":1,"type":"word","code_dec":64368,"line":4,"code":"\u0026#xfb70;"}},{"ayah_key":"2:19","word":{"position":8,"line":4,"arabic":"وَبَرْقٌ","id":223,"translation":"and lightning"},"char":{"page":4,"font":"p4","code_hex":"fb71","type_id":1,"type":"word","code_dec":64369,"line":4,"code":"\u0026#xfb71;"}},{"ayah_key":"2:19","word":{"position":9,"line":4,"arabic":"يَجْعَلُونَ","id":224,"translation":"They put"},"char":{"page":4,"font":"p4","code_hex":"fb72","type_id":1,"type":"word","code_dec":64370,"line":4,"code":"\u0026#xfb72;"}},{"ayah_key":"2:19","word":{"position":10,"line":4,"arabic":"أَصَابِعَهُمْ","id":225,"translation":"their fingers"},"char":{"page":4,"font":"p4","code_hex":"fb73","type_id":1,"type":"word","code_dec":64371,"line":4,"code":"\u0026#xfb73;"}},{"ayah_key":"2:19","word":{"position":11,"line":4,"arabic":"فِي","id":226,"translation":"in"},"char":{"page":4,"font":"p4","code_hex":"fb74","type_id":1,"type":"word","code_dec":64372,"line":4,"code":"\u0026#xfb74;"}},{"ayah_key":"2:19","word":{"position":12,"line":4,"arabic":"آذَانِهِمْ","id":227,"translation":"their ears"},"char":{"page":4,"font":"p4","code_hex":"fb75","type_id":1,"type":"word","code_dec":64373,"line":4,"code":"\u0026#xfb75;"}},{"ayah_key":"2:19","word":{"position":13,"line":4,"arabic":"مِنَ","id":228,"translation":"from"},"char":{"page":4,"font":"p4","code_hex":"fb76","type_id":1,"type":"word","code_dec":64374,"line":4,"code":"\u0026#xfb76;"}},{"ayah_key":"2:19","word":{"position":14,"line":4,"arabic":"الصَّوَاعِقِ","id":229,"translation":"the thunderclaps"},"char":{"page":4,"font":"p4","code_hex":"fb77","type_id":1,"type":"word","code_dec":64375,"line":4,"code":"\u0026#xfb77;"}},{"ayah_key":"2:19","word":{"position":15,"line":5,"arabic":"حَذَرَ","id":230,"translation":"(in) fear (of)"},"char":{"page":4,"font":"p4","code_hex":"fb78","type_id":1,"type":"word","code_dec":64376,"line":5,"code":"\u0026#xfb78;"}},{"ayah_key":"2:19","word":{"position":16,"line":5,"arabic":"الْمَوْتِ","id":231,"translation":"[the] death"},"char":{"page":4,"font":"p4","code_hex":"fb79","type_id":1,"type":"word","code_dec":64377,"line":5,"code":"\u0026#xfb79;"}},{"ayah_key":"2:19","word":{"position":17,"line":5,"arabic":null,"id":null,"translation":null},"char":{"page":4,"font":"p4","code_hex":"fb7a","type_id":3,"type":"pause","code_dec":64378,"line":5,"code":"\u0026#xfb7a;"}},{"ayah_key":"2:19","word":{"position":18,"line":5,"arabic":"وَاللَّهُ","id":232,"translation":"And Allah"},"char":{"page":4,"font":"p4","code_hex":"fb7b","type_id":1,"type":"word","code_dec":64379,"line":5,"code":"\u0026#xfb7b;"}},{"ayah_key":"2:19","word":{"position":19,"line":5,"arabic":"مُحِيطٌ","id":233,"translation":"(is) [the One Who] encompasses"},"char":{"page":4,"font":"p4","code_hex":"fb7c","type_id":1,"type":"word","code_dec":64380,"line":5,"code":"\u0026#xfb7c;"}},{"ayah_key":"2:19","word":{"position":20,"line":5,"arabic":"بِالْكَافِرِينَ","id":234,"translation":"the disbelievers"},"char":{"page":4,"font":"p4","code_hex":"fb7d","type_id":1,"type":"word","code_dec":64381,"line":5,"code":"\u0026#xfb7d;"}},{"ayah_key":"2:19","word":{"position":21,"line":5,"arabic":null,"id":null,"translation":null},"char":{"page":4,"font":"p4","code_hex":"fb7e","type_id":2,"type":"end","code_dec":64382,"line":5,"code":"\u0026#xfb7e;"}}],"content":[{"id":19,"name":"Sahih International","slug":"sahih_international","lang":"en","dir":"ltr","ayah_key":"2:19","text":"Or [it is] like a rainstorm from the sky within which is darkness, thunder and lightning. They put their fingers in their ears against the thunderclaps in dread of death. But Allah is encompassing of the disbelievers."}],"audio":{"ayah_key":"2:19","ogg":{"url":"http://verses.quran.com/Alafasy/ogg/002019.ogg","duration":25.419,"mime_type":"audio/ogg"},"mp3":{"url":"http://verses.quran.com/Alafasy/mp3/002019.mp3","duration":25.46,"mime_type":"audio/mpeg"}}},{"ayah_key":"2:20","ayah_index":27,"surah_id":2,"ayah_num":20,"page_num":4,"juz_num":1,"hizb_num":1,"rub_num":1,"text":"يكاد البرق يخطف ابصارهم كلما اضاء لهم مشوا فيه واذا اظلم عليهم قاموا ولو شاء الله لذهب بسمعهم وابصارهم ان الله على كل شيء قدير","sajdah":null,"quran":[{"ayah_key":"2:20","word":{"position":1,"line":5,"arabic":"يَكَادُ","id":235,"translation":"Almost"},"char":{"page":4,"font":"p4","code_hex":"fb7f","type_id":1,"type":"word","code_dec":64383,"line":5,"code":"\u0026#xfb7f;"}},{"ayah_key":"2:20","word":{"position":2,"line":5,"arabic":"الْبَرْقُ","id":236,"translation":"the lightning"},"char":{"page":4,"font":"p4","code_hex":"fb80","type_id":1,"type":"word","code_dec":64384,"line":5,"code":"\u0026#xfb80;"}},{"ayah_key":"2:20","word":{"position":3,"line":5,"arabic":"يَخْطَفُ","id":237,"translation":"snatches away"},"char":{"page":4,"font":"p4","code_hex":"fb81","type_id":1,"type":"word","code_dec":64385,"line":5,"code":"\u0026#xfb81;"}},{"ayah_key":"2:20","word":{"position":4,"line":6,"arabic":"أَبْصَارَهُمْ","id":238,"translation":"their sight"},"char":{"page":4,"font":"p4","code_hex":"fb82","type_id":1,"type":"word","code_dec":64386,"line":6,"code":"\u0026#xfb82;"}},{"ayah_key":"2:20","word":{"position":5,"line":6,"arabic":null,"id":null,"translation":null},"char":{"page":4,"font":"p4","code_hex":"fb83","type_id":3,"type":"pause","code_dec":64387,"line":6,"code":"\u0026#xfb83;"}},{"ayah_key":"2:20","word":{"position":6,"line":6,"arabic":"كُلَّمَا","id":239,"translation":"Whenever"},"char":{"page":4,"font":"p4","code_hex":"fb84","type_id":1,"type":"word","code_dec":64388,"line":6,"code":"\u0026#xfb84;"}},{"ayah_key":"2:20","word":{"position":7,"line":6,"arabic":"أَضَاءَ","id":240,"translation":"it flashes"},"char":{"page":4,"font":"p4","code_hex":"fb85","type_id":1,"type":"word","code_dec":64389,"line":6,"code":"\u0026#xfb85;"}},{"ayah_key":"2:20","word":{"position":8,"line":6,"arabic":"لَهُمْ","id":241,"translation":"for them"},"char":{"page":4,"font":"p4","code_hex":"fb86","type_id":1,"type":"word","code_dec":64390,"line":6,"code":"\u0026#xfb86;"}},{"ayah_key":"2:20","word":{"position":9,"line":6,"arabic":"مَشَوْا","id":242,"translation":"they walk"},"char":{"page":4,"font":"p4","code_hex":"fb87","type_id":1,"type":"word","code_dec":64391,"line":6,"code":"\u0026#xfb87;"}},{"ayah_key":"2:20","word":{"position":10,"line":6,"arabic":"فِيهِ","id":243,"translation":"in it"},"char":{"page":4,"font":"p4","code_hex":"fb88","type_id":1,"type":"word","code_dec":64392,"line":6,"code":"\u0026#xfb88;"}},{"ayah_key":"2:20","word":{"position":11,"line":6,"arabic":"وَإِذَا","id":244,"translation":"and when"},"char":{"page":4,"font":"p4","code_hex":"fb89","type_id":1,"type":"word","code_dec":64393,"line":6,"code":"\u0026#xfb89;"}},{"ayah_key":"2:20","word":{"position":12,"line":6,"arabic":"أَظْلَمَ","id":245,"translation":"it darkens"},"char":{"page":4,"font":"p4","code_hex":"fb8a","type_id":1,"type":"word","code_dec":64394,"line":6,"code":"\u0026#xfb8a;"}},{"ayah_key":"2:20","word":{"position":13,"line":6,"arabic":"عَلَيْهِمْ","id":246,"translation":"on them"},"char":{"page":4,"font":"p4","code_hex":"fb8b","type_id":1,"type":"word","code_dec":64395,"line":6,"code":"\u0026#xfb8b;"}},{"ayah_key":"2:20","word":{"position":14,"line":6,"arabic":"قَامُوا","id":247,"translation":"they stand (still)"},"char":{"page":4,"font":"p4","code_hex":"fb8c","type_id":1,"type":"word","code_dec":64396,"line":6,"code":"\u0026#xfb8c;"}},{"ayah_key":"2:20","word":{"position":15,"line":6,"arabic":null,"id":null,"translation":null},"char":{"page":4,"font":"p4","code_hex":"fb8d","type_id":3,"type":"pause","code_dec":64397,"line":6,"code":"\u0026#xfb8d;"}},{"ayah_key":"2:20","word":{"position":16,"line":7,"arabic":"وَلَوْ","id":248,"translation":"And if"},"char":{"page":4,"font":"p4","code_hex":"fb8e","type_id":1,"type":"word","code_dec":64398,"line":7,"code":"\u0026#xfb8e;"}},{"ayah_key":"2:20","word":{"position":17,"line":7,"arabic":"شَاءَ","id":249,"translation":"had willed"},"char":{"page":4,"font":"p4","code_hex":"fb8f","type_id":1,"type":"word","code_dec":64399,"line":7,"code":"\u0026#xfb8f;"}},{"ayah_key":"2:20","word":{"position":18,"line":7,"arabic":"اللَّهُ","id":250,"translation":"Allah"},"char":{"page":4,"font":"p4","code_hex":"fb90","type_id":1,"type":"word","code_dec":64400,"line":7,"code":"\u0026#xfb90;"}},{"ayah_key":"2:20","word":{"position":19,"line":7,"arabic":"لَذَهَبَ","id":251,"translation":"He would certainly have taken away"},"char":{"page":4,"font":"p4","code_hex":"fb91","type_id":1,"type":"word","code_dec":64401,"line":7,"code":"\u0026#xfb91;"}},{"ayah_key":"2:20","word":{"position":20,"line":7,"arabic":"بِسَمْعِهِمْ","id":252,"translation":"their hearing"},"char":{"page":4,"font":"p4","code_hex":"fb92","type_id":1,"type":"word","code_dec":64402,"line":7,"code":"\u0026#xfb92;"}},{"ayah_key":"2:20","word":{"position":21,"line":7,"arabic":"وَأَبْصَارِهِمْ","id":253,"translation":"and their sight"},"char":{"page":4,"font":"p4","code_hex":"fb93","type_id":1,"type":"word","code_dec":64403,"line":7,"code":"\u0026#xfb93;"}},{"ayah_key":"2:20","word":{"position":22,"line":7,"arabic":null,"id":null,"translation":null},"char":{"page":4,"font":"p4","code_hex":"fb94","type_id":3,"type":"pause","code_dec":64404,"line":7,"code":"\u0026#xfb94;"}},{"ayah_key":"2:20","word":{"position":23,"line":7,"arabic":"إِنَّ","id":254,"translation":"Indeed"},"char":{"page":4,"font":"p4","code_hex":"fb95","type_id":1,"type":"word","code_dec":64405,"line":7,"code":"\u0026#xfb95;"}},{"ayah_key":"2:20","word":{"position":24,"line":7,"arabic":"اللَّهَ","id":255,"translation":"Allah"},"char":{"page":4,"font":"p4","code_hex":"fb96","type_id":1,"type":"word","code_dec":64406,"line":7,"code":"\u0026#xfb96;"}},{"ayah_key":"2:20","word":{"position":25,"line":7,"arabic":"عَلَىٰ","id":256,"translation":"(is) on"},"char":{"page":4,"font":"p4","code_hex":"fb97","type_id":1,"type":"word","code_dec":64407,"line":7,"code":"\u0026#xfb97;"}},{"ayah_key":"2:20","word":{"position":26,"line":7,"arabic":"كُلِّ","id":257,"translation":"every"},"char":{"page":4,"font":"p4","code_hex":"fb98","type_id":1,"type":"word","code_dec":64408,"line":7,"code":"\u0026#xfb98;"}},{"ayah_key":"2:20","word":{"position":27,"line":8,"arabic":"شَيْءٍ","id":258,"translation":"thing"},"char":{"page":4,"font":"p4","code_hex":"fb99","type_id":1,"type":"word","code_dec":64409,"line":8,"code":"\u0026#xfb99;"}},{"ayah_key":"2:20","word":{"position":28,"line":8,"arabic":"قَدِيرٌ","id":259,"translation":"All-Powerful"},"char":{"page":4,"font":"p4","code_hex":"fb9a","type_id":1,"type":"word","code_dec":64410,"line":8,"code":"\u0026#xfb9a;"}},{"ayah_key":"2:20","word":{"position":29,"line":8,"arabic":null,"id":null,"translation":null},"char":{"page":4,"font":"p4","code_hex":"fb9b","type_id":2,"type":"end","code_dec":64411,"line":8,"code":"\u0026#xfb9b;"}}],"content":[{"id":19,"name":"Sahih International","slug":"sahih_international","lang":"en","dir":"ltr","ayah_key":"2:20","text":"The lightning almost snatches away their sight. Every time it lights [the way] for them, they walk therein; but when darkness comes over them, they stand [still]. And if Allah had willed, He could have taken away their hearing and their sight. Indeed, Allah is over all things competent."}],"audio":{"ayah_key":"2:20","ogg":{"url":"http://verses.quran.com/Alafasy/ogg/002020.ogg","duration":30.395,"mime_type":"audio/ogg"},"mp3":{"url":"http://verses.quran.com/Alafasy/mp3/002020.mp3","duration":30.45,"mime_type":"audio/mpeg"}}}]; diff --git a/tests/fixtures/getSurahs.js b/tests/fixtures/getSurahs.js deleted file mode 100644 index 53b411c94..000000000 --- a/tests/fixtures/getSurahs.js +++ /dev/null @@ -1,2168 +0,0 @@ -export default [ - { - "bismillah_pre": false, - "page": [ - 1, - 1 - ], - "ayat": 7, - "name": { - "arabic": "الفاتحة", - "simple": "Al-Fatihah", - "complex": "Al-Fātiĥah", - "english": "The Opener" - }, - "revelation": { - "order": 5, - "place": "makkah" - }, - "id": 1 - }, - { - "bismillah_pre": true, - "page": [ - 2, - 49 - ], - "ayat": 286, - "name": { - "arabic": "البقرة", - "simple": "Al-Baqarah", - "complex": "Al-Baqarah", - "english": "The Cow" - }, - "revelation": { - "order": 87, - "place": "madinah" - }, - "id": 2 - }, - { - "bismillah_pre": true, - "page": [ - 50, - 76 - ], - "ayat": 200, - "name": { - "arabic": "آل عمران", - "simple": "Ali 'Imran", - "complex": "Āli `Imrān", - "english": "Family of Imran" - }, - "revelation": { - "order": 89, - "place": "madinah" - }, - "id": 3 - }, - { - "bismillah_pre": true, - "page": [ - 77, - 106 - ], - "ayat": 176, - "name": { - "arabic": "النساء", - "simple": "An-Nisa", - "complex": "An-Nisā", - "english": "The Women" - }, - "revelation": { - "order": 92, - "place": "madinah" - }, - "id": 4 - }, - { - "bismillah_pre": true, - "page": [ - 106, - 127 - ], - "ayat": 120, - "name": { - "arabic": "المائدة", - "simple": "Al-Ma'idah", - "complex": "Al-Mā'idah", - "english": "The Table Spread" - }, - "revelation": { - "order": 112, - "place": "madinah" - }, - "id": 5 - }, - { - "bismillah_pre": true, - "page": [ - 128, - 150 - ], - "ayat": 165, - "name": { - "arabic": "الأنعام", - "simple": "Al-An'am", - "complex": "Al-'An`ām", - "english": "The Cattle" - }, - "revelation": { - "order": 55, - "place": "makkah" - }, - "id": 6 - }, - { - "bismillah_pre": true, - "page": [ - 151, - 176 - ], - "ayat": 206, - "name": { - "arabic": "الأعراف", - "simple": "Al-A'raf", - "complex": "Al-'A`rāf", - "english": "The Heights" - }, - "revelation": { - "order": 39, - "place": "makkah" - }, - "id": 7 - }, - { - "bismillah_pre": true, - "page": [ - 177, - 186 - ], - "ayat": 75, - "name": { - "arabic": "الأنفال", - "simple": "Al-Anfal", - "complex": "Al-'Anfāl", - "english": "The Spoils of War" - }, - "revelation": { - "order": 88, - "place": "madinah" - }, - "id": 8 - }, - { - "bismillah_pre": false, - "page": [ - 187, - 207 - ], - "ayat": 129, - "name": { - "arabic": "التوبة", - "simple": "At-Tawbah", - "complex": "At-Tawbah", - "english": "The Repentance" - }, - "revelation": { - "order": 113, - "place": "madinah" - }, - "id": 9 - }, - { - "bismillah_pre": true, - "page": [ - 208, - 221 - ], - "ayat": 109, - "name": { - "arabic": "يونس", - "simple": "Yunus", - "complex": "Yūnus", - "english": "Jonah" - }, - "revelation": { - "order": 51, - "place": "makkah" - }, - "id": 10 - }, - { - "bismillah_pre": true, - "page": [ - 221, - 235 - ], - "ayat": 123, - "name": { - "arabic": "هود", - "simple": "Hud", - "complex": "Hūd", - "english": "Hud" - }, - "revelation": { - "order": 52, - "place": "makkah" - }, - "id": 11 - }, - { - "bismillah_pre": true, - "page": [ - 235, - 248 - ], - "ayat": 111, - "name": { - "arabic": "يوسف", - "simple": "Yusuf", - "complex": "Yūsuf", - "english": "Joseph" - }, - "revelation": { - "order": 53, - "place": "makkah" - }, - "id": 12 - }, - { - "bismillah_pre": true, - "page": [ - 249, - 255 - ], - "ayat": 43, - "name": { - "arabic": "الرعد", - "simple": "Ar-Ra'd", - "complex": "Ar-Ra`d", - "english": "The Thunder" - }, - "revelation": { - "order": 96, - "place": "madinah" - }, - "id": 13 - }, - { - "bismillah_pre": true, - "page": [ - 255, - 261 - ], - "ayat": 52, - "name": { - "arabic": "ابراهيم", - "simple": "Ibrahim", - "complex": "Ibrāhīm", - "english": "Abrahim" - }, - "revelation": { - "order": 72, - "place": "makkah" - }, - "id": 14 - }, - { - "bismillah_pre": true, - "page": [ - 262, - 267 - ], - "ayat": 99, - "name": { - "arabic": "الحجر", - "simple": "Al-Hijr", - "complex": "Al-Ĥijr", - "english": "The Rocky Tract" - }, - "revelation": { - "order": 54, - "place": "makkah" - }, - "id": 15 - }, - { - "bismillah_pre": true, - "page": [ - 267, - 281 - ], - "ayat": 128, - "name": { - "arabic": "النحل", - "simple": "An-Nahl", - "complex": "An-Naĥl", - "english": "The Bee" - }, - "revelation": { - "order": 70, - "place": "makkah" - }, - "id": 16 - }, - { - "bismillah_pre": true, - "page": [ - 282, - 293 - ], - "ayat": 111, - "name": { - "arabic": "الإسراء", - "simple": "Al-Isra", - "complex": "Al-'Isrā", - "english": "The Night Journey" - }, - "revelation": { - "order": 50, - "place": "makkah" - }, - "id": 17 - }, - { - "bismillah_pre": true, - "page": [ - 293, - 304 - ], - "ayat": 110, - "name": { - "arabic": "الكهف", - "simple": "Al-Kahf", - "complex": "Al-Kahf", - "english": "The Cave" - }, - "revelation": { - "order": 69, - "place": "makkah" - }, - "id": 18 - }, - { - "bismillah_pre": true, - "page": [ - 305, - 312 - ], - "ayat": 98, - "name": { - "arabic": "مريم", - "simple": "Maryam", - "complex": "Maryam", - "english": "Mary" - }, - "revelation": { - "order": 44, - "place": "makkah" - }, - "id": 19 - }, - { - "bismillah_pre": true, - "page": [ - 312, - 321 - ], - "ayat": 135, - "name": { - "arabic": "طه", - "simple": "Taha", - "complex": "Ţāhā", - "english": "Ta-Ha" - }, - "revelation": { - "order": 45, - "place": "makkah" - }, - "id": 20 - }, - { - "bismillah_pre": true, - "page": [ - 322, - 331 - ], - "ayat": 112, - "name": { - "arabic": "الأنبياء", - "simple": "Al-Anbya", - "complex": "Al-'Anbyā", - "english": "The Prophets" - }, - "revelation": { - "order": 73, - "place": "makkah" - }, - "id": 21 - }, - { - "bismillah_pre": true, - "page": [ - 332, - 341 - ], - "ayat": 78, - "name": { - "arabic": "الحج", - "simple": "Al-Haj", - "complex": "Al-Ĥaj", - "english": "The Pilgrimage" - }, - "revelation": { - "order": 103, - "place": "madinah" - }, - "id": 22 - }, - { - "bismillah_pre": true, - "page": [ - 342, - 349 - ], - "ayat": 118, - "name": { - "arabic": "المؤمنون", - "simple": "Al-Mu'minun", - "complex": "Al-Mu'minūn", - "english": "The Believers" - }, - "revelation": { - "order": 74, - "place": "makkah" - }, - "id": 23 - }, - { - "bismillah_pre": true, - "page": [ - 350, - 359 - ], - "ayat": 64, - "name": { - "arabic": "النور", - "simple": "An-Nur", - "complex": "An-Nūr", - "english": "The Light" - }, - "revelation": { - "order": 102, - "place": "madinah" - }, - "id": 24 - }, - { - "bismillah_pre": true, - "page": [ - 359, - 366 - ], - "ayat": 77, - "name": { - "arabic": "الفرقان", - "simple": "Al-Furqan", - "complex": "Al-Furqān", - "english": "The Criterian" - }, - "revelation": { - "order": 42, - "place": "makkah" - }, - "id": 25 - }, - { - "bismillah_pre": true, - "page": [ - 367, - 376 - ], - "ayat": 227, - "name": { - "arabic": "الشعراء", - "simple": "Ash-Shu'ara", - "complex": "Ash-Shu`arā", - "english": "The Poets" - }, - "revelation": { - "order": 47, - "place": "makkah" - }, - "id": 26 - }, - { - "bismillah_pre": true, - "page": [ - 377, - 385 - ], - "ayat": 93, - "name": { - "arabic": "النمل", - "simple": "An-Naml", - "complex": "An-Naml", - "english": "The Ant" - }, - "revelation": { - "order": 48, - "place": "makkah" - }, - "id": 27 - }, - { - "bismillah_pre": true, - "page": [ - 385, - 396 - ], - "ayat": 88, - "name": { - "arabic": "القصص", - "simple": "Al-Qasas", - "complex": "Al-Qaşaş", - "english": "The Stories" - }, - "revelation": { - "order": 49, - "place": "makkah" - }, - "id": 28 - }, - { - "bismillah_pre": true, - "page": [ - 396, - 404 - ], - "ayat": 69, - "name": { - "arabic": "العنكبوت", - "simple": "Al-'Ankabut", - "complex": "Al-`Ankabūt", - "english": "The Spider" - }, - "revelation": { - "order": 85, - "place": "makkah" - }, - "id": 29 - }, - { - "bismillah_pre": true, - "page": [ - 404, - 410 - ], - "ayat": 60, - "name": { - "arabic": "الروم", - "simple": "Ar-Rum", - "complex": "Ar-Rūm", - "english": "The Romans" - }, - "revelation": { - "order": 84, - "place": "makkah" - }, - "id": 30 - }, - { - "bismillah_pre": true, - "page": [ - 411, - 414 - ], - "ayat": 34, - "name": { - "arabic": "لقمان", - "simple": "Luqman", - "complex": "Luqmān", - "english": "Luqman" - }, - "revelation": { - "order": 57, - "place": "makkah" - }, - "id": 31 - }, - { - "bismillah_pre": true, - "page": [ - 415, - 417 - ], - "ayat": 30, - "name": { - "arabic": "السجدة", - "simple": "As-Sajdah", - "complex": "As-Sajdah", - "english": "The Prostration" - }, - "revelation": { - "order": 75, - "place": "makkah" - }, - "id": 32 - }, - { - "bismillah_pre": true, - "page": [ - 418, - 427 - ], - "ayat": 73, - "name": { - "arabic": "الأحزاب", - "simple": "Al-Ahzab", - "complex": "Al-'Aĥzāb", - "english": "The Combined Forces" - }, - "revelation": { - "order": 90, - "place": "madinah" - }, - "id": 33 - }, - { - "bismillah_pre": true, - "page": [ - 428, - 434 - ], - "ayat": 54, - "name": { - "arabic": "سبإ", - "simple": "Saba", - "complex": "Saba", - "english": "Sheba" - }, - "revelation": { - "order": 58, - "place": "makkah" - }, - "id": 34 - }, - { - "bismillah_pre": true, - "page": [ - 434, - 440 - ], - "ayat": 45, - "name": { - "arabic": "فاطر", - "simple": "Fatir", - "complex": "Fāţir", - "english": "Originator" - }, - "revelation": { - "order": 43, - "place": "makkah" - }, - "id": 35 - }, - { - "bismillah_pre": true, - "page": [ - 440, - 445 - ], - "ayat": 83, - "name": { - "arabic": "يس", - "simple": "Ya-Sin", - "complex": "Yā-Sīn", - "english": "Ya Sin" - }, - "revelation": { - "order": 41, - "place": "makkah" - }, - "id": 36 - }, - { - "bismillah_pre": true, - "page": [ - 446, - 452 - ], - "ayat": 182, - "name": { - "arabic": "الصافات", - "simple": "As-Saffat", - "complex": "Aş-Şāffāt", - "english": "Those who set the Ranks" - }, - "revelation": { - "order": 56, - "place": "makkah" - }, - "id": 37 - }, - { - "bismillah_pre": true, - "page": [ - 453, - 458 - ], - "ayat": 88, - "name": { - "arabic": "ص", - "simple": "Sad", - "complex": "Şād", - "english": "The Letter \"Saad\"" - }, - "revelation": { - "order": 38, - "place": "makkah" - }, - "id": 38 - }, - { - "bismillah_pre": true, - "page": [ - 458, - 467 - ], - "ayat": 75, - "name": { - "arabic": "الزمر", - "simple": "Az-Zumar", - "complex": "Az-Zumar", - "english": "The Troops" - }, - "revelation": { - "order": 59, - "place": "makkah" - }, - "id": 39 - }, - { - "bismillah_pre": true, - "page": [ - 467, - 476 - ], - "ayat": 85, - "name": { - "arabic": "غافر", - "simple": "Ghafir", - "complex": "Ghāfir", - "english": "The Forgiver" - }, - "revelation": { - "order": 60, - "place": "makkah" - }, - "id": 40 - }, - { - "bismillah_pre": true, - "page": [ - 477, - 482 - ], - "ayat": 54, - "name": { - "arabic": "فصلت", - "simple": "Fussilat", - "complex": "Fuşşilat", - "english": "Explained in Detail" - }, - "revelation": { - "order": 61, - "place": "makkah" - }, - "id": 41 - }, - { - "bismillah_pre": true, - "page": [ - 483, - 489 - ], - "ayat": 53, - "name": { - "arabic": "الشورى", - "simple": "Ash-Shuraa", - "complex": "Ash-Shūraá", - "english": "The Consultation" - }, - "revelation": { - "order": 62, - "place": "makkah" - }, - "id": 42 - }, - { - "bismillah_pre": true, - "page": [ - 489, - 495 - ], - "ayat": 89, - "name": { - "arabic": "الزخرف", - "simple": "Az-Zukhruf", - "complex": "Az-Zukhruf", - "english": "The Ornaments of Gold" - }, - "revelation": { - "order": 63, - "place": "makkah" - }, - "id": 43 - }, - { - "bismillah_pre": true, - "page": [ - 496, - 498 - ], - "ayat": 59, - "name": { - "arabic": "الدخان", - "simple": "Ad-Dukhan", - "complex": "Ad-Dukhān", - "english": "The Smoke" - }, - "revelation": { - "order": 64, - "place": "makkah" - }, - "id": 44 - }, - { - "bismillah_pre": true, - "page": [ - 499, - 502 - ], - "ayat": 37, - "name": { - "arabic": "الجاثية", - "simple": "Al-Jathiyah", - "complex": "Al-Jāthiyah", - "english": "The Crouching" - }, - "revelation": { - "order": 65, - "place": "makkah" - }, - "id": 45 - }, - { - "bismillah_pre": true, - "page": [ - 502, - 506 - ], - "ayat": 35, - "name": { - "arabic": "الأحقاف", - "simple": "Al-Ahqaf", - "complex": "Al-'Aĥqāf", - "english": "The Wind-Curved Sandhills" - }, - "revelation": { - "order": 66, - "place": "makkah" - }, - "id": 46 - }, - { - "bismillah_pre": true, - "page": [ - 507, - 510 - ], - "ayat": 38, - "name": { - "arabic": "محمد", - "simple": "Muhammad", - "complex": "Muĥammad", - "english": "Muhammad" - }, - "revelation": { - "order": 95, - "place": "madinah" - }, - "id": 47 - }, - { - "bismillah_pre": true, - "page": [ - 511, - 515 - ], - "ayat": 29, - "name": { - "arabic": "الفتح", - "simple": "Al-Fath", - "complex": "Al-Fatĥ", - "english": "The Victory" - }, - "revelation": { - "order": 111, - "place": "madinah" - }, - "id": 48 - }, - { - "bismillah_pre": true, - "page": [ - 515, - 517 - ], - "ayat": 18, - "name": { - "arabic": "الحجرات", - "simple": "Al-Hujurat", - "complex": "Al-Ĥujurāt", - "english": "The Rooms" - }, - "revelation": { - "order": 106, - "place": "madinah" - }, - "id": 49 - }, - { - "bismillah_pre": true, - "page": [ - 518, - 520 - ], - "ayat": 45, - "name": { - "arabic": "ق", - "simple": "Qaf", - "complex": "Qāf", - "english": "The Letter \"Qaf\"" - }, - "revelation": { - "order": 34, - "place": "makkah" - }, - "id": 50 - }, - { - "bismillah_pre": true, - "page": [ - 520, - 523 - ], - "ayat": 60, - "name": { - "arabic": "الذاريات", - "simple": "Adh-Dhariyat", - "complex": "Adh-Dhāriyāt", - "english": "The Winnowing Winds" - }, - "revelation": { - "order": 67, - "place": "makkah" - }, - "id": 51 - }, - { - "bismillah_pre": true, - "page": [ - 523, - 525 - ], - "ayat": 49, - "name": { - "arabic": "الطور", - "simple": "At-Tur", - "complex": "Aţ-Ţūr", - "english": "The Mount" - }, - "revelation": { - "order": 76, - "place": "makkah" - }, - "id": 52 - }, - { - "bismillah_pre": true, - "page": [ - 526, - 528 - ], - "ayat": 62, - "name": { - "arabic": "النجم", - "simple": "An-Najm", - "complex": "An-Najm", - "english": "The Star" - }, - "revelation": { - "order": 23, - "place": "makkah" - }, - "id": 53 - }, - { - "bismillah_pre": true, - "page": [ - 528, - 531 - ], - "ayat": 55, - "name": { - "arabic": "القمر", - "simple": "Al-Qamar", - "complex": "Al-Qamar", - "english": "The Moon" - }, - "revelation": { - "order": 37, - "place": "makkah" - }, - "id": 54 - }, - { - "bismillah_pre": true, - "page": [ - 531, - 534 - ], - "ayat": 78, - "name": { - "arabic": "الرحمن", - "simple": "Ar-Rahman", - "complex": "Ar-Raĥmān", - "english": "The Beneficent" - }, - "revelation": { - "order": 97, - "place": "madinah" - }, - "id": 55 - }, - { - "bismillah_pre": true, - "page": [ - 534, - 537 - ], - "ayat": 96, - "name": { - "arabic": "الواقعة", - "simple": "Al-Waqi'ah", - "complex": "Al-Wāqi`ah", - "english": "The Inevitable" - }, - "revelation": { - "order": 46, - "place": "makkah" - }, - "id": 56 - }, - { - "bismillah_pre": true, - "page": [ - 537, - 541 - ], - "ayat": 29, - "name": { - "arabic": "الحديد", - "simple": "Al-Hadid", - "complex": "Al-Ĥadīd", - "english": "The Iron" - }, - "revelation": { - "order": 94, - "place": "madinah" - }, - "id": 57 - }, - { - "bismillah_pre": true, - "page": [ - 542, - 545 - ], - "ayat": 22, - "name": { - "arabic": "المجادلة", - "simple": "Al-Mujadila", - "complex": "Al-Mujādila", - "english": "The Pleading Woman" - }, - "revelation": { - "order": 105, - "place": "madinah" - }, - "id": 58 - }, - { - "bismillah_pre": true, - "page": [ - 545, - 548 - ], - "ayat": 24, - "name": { - "arabic": "الحشر", - "simple": "Al-Hashr", - "complex": "Al-Ĥashr", - "english": "The Exile" - }, - "revelation": { - "order": 101, - "place": "madinah" - }, - "id": 59 - }, - { - "bismillah_pre": true, - "page": [ - 549, - 551 - ], - "ayat": 13, - "name": { - "arabic": "الممتحنة", - "simple": "Al-Mumtahanah", - "complex": "Al-Mumtaĥanah", - "english": "She that is to be examined" - }, - "revelation": { - "order": 91, - "place": "madinah" - }, - "id": 60 - }, - { - "bismillah_pre": true, - "page": [ - 551, - 552 - ], - "ayat": 14, - "name": { - "arabic": "الصف", - "simple": "As-Saf", - "complex": "Aş-Şaf", - "english": "The Ranks" - }, - "revelation": { - "order": 109, - "place": "madinah" - }, - "id": 61 - }, - { - "bismillah_pre": true, - "page": [ - 553, - 554 - ], - "ayat": 11, - "name": { - "arabic": "الجمعة", - "simple": "Al-Jumu'ah", - "complex": "Al-Jumu`ah", - "english": "The Congregation, Friday" - }, - "revelation": { - "order": 110, - "place": "madinah" - }, - "id": 62 - }, - { - "bismillah_pre": true, - "page": [ - 554, - 555 - ], - "ayat": 11, - "name": { - "arabic": "المنافقون", - "simple": "Al-Munafiqun", - "complex": "Al-Munāfiqūn", - "english": "The Hypocrites" - }, - "revelation": { - "order": 104, - "place": "madinah" - }, - "id": 63 - }, - { - "bismillah_pre": true, - "page": [ - 556, - 557 - ], - "ayat": 18, - "name": { - "arabic": "التغابن", - "simple": "At-Taghabun", - "complex": "At-Taghābun", - "english": "The Mutual Disillusion" - }, - "revelation": { - "order": 108, - "place": "madinah" - }, - "id": 64 - }, - { - "bismillah_pre": true, - "page": [ - 558, - 559 - ], - "ayat": 12, - "name": { - "arabic": "الطلاق", - "simple": "At-Talaq", - "complex": "Aţ-Ţalāq", - "english": "The Divorce" - }, - "revelation": { - "order": 99, - "place": "madinah" - }, - "id": 65 - }, - { - "bismillah_pre": true, - "page": [ - 560, - 561 - ], - "ayat": 12, - "name": { - "arabic": "التحريم", - "simple": "At-Tahrim", - "complex": "At-Taĥrīm", - "english": "The Prohibtiion" - }, - "revelation": { - "order": 107, - "place": "madinah" - }, - "id": 66 - }, - { - "bismillah_pre": true, - "page": [ - 562, - 564 - ], - "ayat": 30, - "name": { - "arabic": "الملك", - "simple": "Al-Mulk", - "complex": "Al-Mulk", - "english": "The Sovereignty" - }, - "revelation": { - "order": 77, - "place": "makkah" - }, - "id": 67 - }, - { - "bismillah_pre": true, - "page": [ - 564, - 566 - ], - "ayat": 52, - "name": { - "arabic": "القلم", - "simple": "Al-Qalam", - "complex": "Al-Qalam", - "english": "The Pen" - }, - "revelation": { - "order": 2, - "place": "makkah" - }, - "id": 68 - }, - { - "bismillah_pre": true, - "page": [ - 566, - 568 - ], - "ayat": 52, - "name": { - "arabic": "الحاقة", - "simple": "Al-Haqqah", - "complex": "Al-Ĥāqqah", - "english": "The Reality" - }, - "revelation": { - "order": 78, - "place": "makkah" - }, - "id": 69 - }, - { - "bismillah_pre": true, - "page": [ - 568, - 570 - ], - "ayat": 44, - "name": { - "arabic": "المعارج", - "simple": "Al-Ma'arij", - "complex": "Al-Ma`ārij", - "english": "The Ascending Stairways" - }, - "revelation": { - "order": 79, - "place": "makkah" - }, - "id": 70 - }, - { - "bismillah_pre": true, - "page": [ - 570, - 571 - ], - "ayat": 28, - "name": { - "arabic": "نوح", - "simple": "Nuh", - "complex": "Nūĥ", - "english": "Noah" - }, - "revelation": { - "order": 71, - "place": "makkah" - }, - "id": 71 - }, - { - "bismillah_pre": true, - "page": [ - 572, - 573 - ], - "ayat": 28, - "name": { - "arabic": "الجن", - "simple": "Al-Jinn", - "complex": "Al-Jinn", - "english": "The Jinn" - }, - "revelation": { - "order": 40, - "place": "makkah" - }, - "id": 72 - }, - { - "bismillah_pre": true, - "page": [ - 574, - 575 - ], - "ayat": 20, - "name": { - "arabic": "المزمل", - "simple": "Al-Muzzammil", - "complex": "Al-Muzzammil", - "english": "The Enshrouded One" - }, - "revelation": { - "order": 3, - "place": "makkah" - }, - "id": 73 - }, - { - "bismillah_pre": true, - "page": [ - 575, - 577 - ], - "ayat": 56, - "name": { - "arabic": "المدثر", - "simple": "Al-Muddaththir", - "complex": "Al-Muddaththir", - "english": "The Cloaked One" - }, - "revelation": { - "order": 4, - "place": "makkah" - }, - "id": 74 - }, - { - "bismillah_pre": true, - "page": [ - 577, - 578 - ], - "ayat": 40, - "name": { - "arabic": "القيامة", - "simple": "Al-Qiyamah", - "complex": "Al-Qiyāmah", - "english": "The Resurrection" - }, - "revelation": { - "order": 31, - "place": "makkah" - }, - "id": 75 - }, - { - "bismillah_pre": true, - "page": [ - 578, - 580 - ], - "ayat": 31, - "name": { - "arabic": "الانسان", - "simple": "Al-Insan", - "complex": "Al-'Insān", - "english": "The Man" - }, - "revelation": { - "order": 98, - "place": "madinah" - }, - "id": 76 - }, - { - "bismillah_pre": true, - "page": [ - 580, - 581 - ], - "ayat": 50, - "name": { - "arabic": "المرسلات", - "simple": "Al-Mursalat", - "complex": "Al-Mursalāt", - "english": "The Emissaries" - }, - "revelation": { - "order": 33, - "place": "makkah" - }, - "id": 77 - }, - { - "bismillah_pre": true, - "page": [ - 582, - 583 - ], - "ayat": 40, - "name": { - "arabic": "النبإ", - "simple": "An-Naba", - "complex": "An-Naba", - "english": "The Tidings" - }, - "revelation": { - "order": 80, - "place": "makkah" - }, - "id": 78 - }, - { - "bismillah_pre": true, - "page": [ - 583, - 584 - ], - "ayat": 46, - "name": { - "arabic": "النازعات", - "simple": "An-Nazi'at", - "complex": "An-Nāzi`āt", - "english": "Those who drag forth" - }, - "revelation": { - "order": 81, - "place": "makkah" - }, - "id": 79 - }, - { - "bismillah_pre": true, - "page": [ - 585, - 585 - ], - "ayat": 42, - "name": { - "arabic": "عبس", - "simple": "'Abasa", - "complex": "`Abasa", - "english": "He Frowned" - }, - "revelation": { - "order": 24, - "place": "makkah" - }, - "id": 80 - }, - { - "bismillah_pre": true, - "page": [ - 586, - 586 - ], - "ayat": 29, - "name": { - "arabic": "التكوير", - "simple": "At-Takwir", - "complex": "At-Takwīr", - "english": "The Overthrowing" - }, - "revelation": { - "order": 7, - "place": "makkah" - }, - "id": 81 - }, - { - "bismillah_pre": true, - "page": [ - 587, - 587 - ], - "ayat": 19, - "name": { - "arabic": "الإنفطار", - "simple": "Al-Infitar", - "complex": "Al-'Infiţār", - "english": "The Cleaving" - }, - "revelation": { - "order": 82, - "place": "makkah" - }, - "id": 82 - }, - { - "bismillah_pre": true, - "page": [ - 587, - 589 - ], - "ayat": 36, - "name": { - "arabic": "المطففين", - "simple": "Al-Mutaffifin", - "complex": "Al-Muţaffifīn", - "english": "The Defrauding" - }, - "revelation": { - "order": 86, - "place": "makkah" - }, - "id": 83 - }, - { - "bismillah_pre": true, - "page": [ - 589, - 589 - ], - "ayat": 25, - "name": { - "arabic": "الإنشقاق", - "simple": "Al-Inshiqaq", - "complex": "Al-'Inshiqāq", - "english": "The Sundering" - }, - "revelation": { - "order": 83, - "place": "makkah" - }, - "id": 84 - }, - { - "bismillah_pre": true, - "page": [ - 590, - 590 - ], - "ayat": 22, - "name": { - "arabic": "البروج", - "simple": "Al-Buruj", - "complex": "Al-Burūj", - "english": "The Mansions of the Stars" - }, - "revelation": { - "order": 27, - "place": "makkah" - }, - "id": 85 - }, - { - "bismillah_pre": true, - "page": [ - 591, - 591 - ], - "ayat": 17, - "name": { - "arabic": "الطارق", - "simple": "At-Tariq", - "complex": "Aţ-Ţāriq", - "english": "The Nightcommer" - }, - "revelation": { - "order": 36, - "place": "makkah" - }, - "id": 86 - }, - { - "bismillah_pre": true, - "page": [ - 591, - 592 - ], - "ayat": 19, - "name": { - "arabic": "الأعلى", - "simple": "Al-A'la", - "complex": "Al-'A`lá", - "english": "The Most High" - }, - "revelation": { - "order": 8, - "place": "makkah" - }, - "id": 87 - }, - { - "bismillah_pre": true, - "page": [ - 592, - 592 - ], - "ayat": 26, - "name": { - "arabic": "الغاشية", - "simple": "Al-Ghashiyah", - "complex": "Al-Ghāshiyah", - "english": "The Overwhelming" - }, - "revelation": { - "order": 68, - "place": "makkah" - }, - "id": 88 - }, - { - "bismillah_pre": true, - "page": [ - 593, - 594 - ], - "ayat": 30, - "name": { - "arabic": "الفجر", - "simple": "Al-Fajr", - "complex": "Al-Fajr", - "english": "The Dawn" - }, - "revelation": { - "order": 10, - "place": "makkah" - }, - "id": 89 - }, - { - "bismillah_pre": true, - "page": [ - 594, - 594 - ], - "ayat": 20, - "name": { - "arabic": "البلد", - "simple": "Al-Balad", - "complex": "Al-Balad", - "english": "The City" - }, - "revelation": { - "order": 35, - "place": "makkah" - }, - "id": 90 - }, - { - "bismillah_pre": true, - "page": [ - 595, - 595 - ], - "ayat": 15, - "name": { - "arabic": "الشمس", - "simple": "Ash-Shams", - "complex": "Ash-Shams", - "english": "The Sun" - }, - "revelation": { - "order": 26, - "place": "makkah" - }, - "id": 91 - }, - { - "bismillah_pre": true, - "page": [ - 595, - 596 - ], - "ayat": 21, - "name": { - "arabic": "الليل", - "simple": "Al-Layl", - "complex": "Al-Layl", - "english": "The Night" - }, - "revelation": { - "order": 9, - "place": "makkah" - }, - "id": 92 - }, - { - "bismillah_pre": true, - "page": [ - 596, - 596 - ], - "ayat": 11, - "name": { - "arabic": "الضحى", - "simple": "Ad-Duhaa", - "complex": "Ađ-Đuĥaá", - "english": "The Morning Hours" - }, - "revelation": { - "order": 11, - "place": "makkah" - }, - "id": 93 - }, - { - "bismillah_pre": true, - "page": [ - 596, - 596 - ], - "ayat": 8, - "name": { - "arabic": "الشرح", - "simple": "Ash-Sharh", - "complex": "Ash-Sharĥ", - "english": "The Relief" - }, - "revelation": { - "order": 12, - "place": "makkah" - }, - "id": 94 - }, - { - "bismillah_pre": true, - "page": [ - 597, - 597 - ], - "ayat": 8, - "name": { - "arabic": "التين", - "simple": "At-Tin", - "complex": "At-Tīn", - "english": "The Fig" - }, - "revelation": { - "order": 28, - "place": "makkah" - }, - "id": 95 - }, - { - "bismillah_pre": true, - "page": [ - 597, - 597 - ], - "ayat": 19, - "name": { - "arabic": "العلق", - "simple": "Al-'Alaq", - "complex": "Al-`Alaq", - "english": "The Clot" - }, - "revelation": { - "order": 1, - "place": "makkah" - }, - "id": 96 - }, - { - "bismillah_pre": true, - "page": [ - 598, - 598 - ], - "ayat": 5, - "name": { - "arabic": "القدر", - "simple": "Al-Qadr", - "complex": "Al-Qadr", - "english": "The Power" - }, - "revelation": { - "order": 25, - "place": "makkah" - }, - "id": 97 - }, - { - "bismillah_pre": true, - "page": [ - 598, - 599 - ], - "ayat": 8, - "name": { - "arabic": "البينة", - "simple": "Al-Bayyinah", - "complex": "Al-Bayyinah", - "english": "The Clear Proof" - }, - "revelation": { - "order": 100, - "place": "madinah" - }, - "id": 98 - }, - { - "bismillah_pre": true, - "page": [ - 599, - 599 - ], - "ayat": 8, - "name": { - "arabic": "الزلزلة", - "simple": "Az-Zalzalah", - "complex": "Az-Zalzalah", - "english": "The Earthquake" - }, - "revelation": { - "order": 93, - "place": "madinah" - }, - "id": 99 - }, - { - "bismillah_pre": true, - "page": [ - 599, - 600 - ], - "ayat": 11, - "name": { - "arabic": "العاديات", - "simple": "Al-'Adiyat", - "complex": "Al-`Ādiyāt", - "english": "The Courser" - }, - "revelation": { - "order": 14, - "place": "makkah" - }, - "id": 100 - }, - { - "bismillah_pre": true, - "page": [ - 600, - 600 - ], - "ayat": 11, - "name": { - "arabic": "القارعة", - "simple": "Al-Qari'ah", - "complex": "Al-Qāri`ah", - "english": "The Calamity" - }, - "revelation": { - "order": 30, - "place": "makkah" - }, - "id": 101 - }, - { - "bismillah_pre": true, - "page": [ - 600, - 600 - ], - "ayat": 8, - "name": { - "arabic": "التكاثر", - "simple": "At-Takathur", - "complex": "At-Takāthur", - "english": "The Rivalry in world increase" - }, - "revelation": { - "order": 16, - "place": "makkah" - }, - "id": 102 - }, - { - "bismillah_pre": true, - "page": [ - 601, - 601 - ], - "ayat": 3, - "name": { - "arabic": "العصر", - "simple": "Al-'Asr", - "complex": "Al-`Aşr", - "english": "The Declining Day" - }, - "revelation": { - "order": 13, - "place": "makkah" - }, - "id": 103 - }, - { - "bismillah_pre": true, - "page": [ - 601, - 601 - ], - "ayat": 9, - "name": { - "arabic": "الهمزة", - "simple": "Al-Humazah", - "complex": "Al-Humazah", - "english": "The Traducer" - }, - "revelation": { - "order": 32, - "place": "makkah" - }, - "id": 104 - }, - { - "bismillah_pre": true, - "page": [ - 601, - 601 - ], - "ayat": 5, - "name": { - "arabic": "الفيل", - "simple": "Al-Fil", - "complex": "Al-Fīl", - "english": "The Elephant" - }, - "revelation": { - "order": 19, - "place": "makkah" - }, - "id": 105 - }, - { - "bismillah_pre": true, - "page": [ - 602, - 602 - ], - "ayat": 4, - "name": { - "arabic": "قريش", - "simple": "Quraysh", - "complex": "Quraysh", - "english": "Quraysh" - }, - "revelation": { - "order": 29, - "place": "makkah" - }, - "id": 106 - }, - { - "bismillah_pre": true, - "page": [ - 602, - 602 - ], - "ayat": 7, - "name": { - "arabic": "الماعون", - "simple": "Al-Ma'un", - "complex": "Al-Mā`ūn", - "english": "The Small Kindesses" - }, - "revelation": { - "order": 17, - "place": "makkah" - }, - "id": 107 - }, - { - "bismillah_pre": true, - "page": [ - 602, - 602 - ], - "ayat": 3, - "name": { - "arabic": "الكوثر", - "simple": "Al-Kawthar", - "complex": "Al-Kawthar", - "english": "The Abundance" - }, - "revelation": { - "order": 15, - "place": "makkah" - }, - "id": 108 - }, - { - "bismillah_pre": true, - "page": [ - 603, - 603 - ], - "ayat": 6, - "name": { - "arabic": "الكافرون", - "simple": "Al-Kafirun", - "complex": "Al-Kāfirūn", - "english": "The Disbelievers" - }, - "revelation": { - "order": 18, - "place": "makkah" - }, - "id": 109 - }, - { - "bismillah_pre": true, - "page": [ - 603, - 603 - ], - "ayat": 3, - "name": { - "arabic": "النصر", - "simple": "An-Nasr", - "complex": "An-Naşr", - "english": "The Divine Support" - }, - "revelation": { - "order": 114, - "place": "madinah" - }, - "id": 110 - }, - { - "bismillah_pre": true, - "page": [ - 603, - 603 - ], - "ayat": 5, - "name": { - "arabic": "المسد", - "simple": "Al-Masad", - "complex": "Al-Masad", - "english": "The Palm Fiber" - }, - "revelation": { - "order": 6, - "place": "makkah" - }, - "id": 111 - }, - { - "bismillah_pre": true, - "page": [ - 604, - 604 - ], - "ayat": 4, - "name": { - "arabic": "الإخلاص", - "simple": "Al-Ikhlas", - "complex": "Al-'Ikhlāş", - "english": "The Sincerity" - }, - "revelation": { - "order": 22, - "place": "makkah" - }, - "id": 112 - }, - { - "bismillah_pre": true, - "page": [ - 604, - 604 - ], - "ayat": 5, - "name": { - "arabic": "الفلق", - "simple": "Al-Falaq", - "complex": "Al-Falaq", - "english": "The Daybreak" - }, - "revelation": { - "order": 20, - "place": "makkah" - }, - "id": 113 - }, - { - "bismillah_pre": true, - "page": [ - 604, - 604 - ], - "ayat": 6, - "name": { - "arabic": "الناس", - "simple": "An-Nas", - "complex": "An-Nās", - "english": "The Mankind" - }, - "revelation": { - "order": 21, - "place": "makkah" - }, - "id": 114 - } -] diff --git a/tests/fixtures/juzs.ts b/tests/fixtures/juzs.ts new file mode 100644 index 000000000..5d704543f --- /dev/null +++ b/tests/fixtures/juzs.ts @@ -0,0 +1,6 @@ +// eslint-disable-next-line import/prefer-default-export +export const juz = { + id: 1, + juzNumber: 1, + verseMapping: { '1': '1-7', '2': '1-141' }, +}; diff --git a/tests/fixtures/segments.ts b/tests/fixtures/segments.ts new file mode 100644 index 000000000..fb5e1f345 --- /dev/null +++ b/tests/fixtures/segments.ts @@ -0,0 +1,15 @@ +// eslint-disable-next-line import/prefer-default-export +export const segment = { + words: { + '0': { startTime: 0.06, endTime: 0.61, duration: 0.55 }, + '1': { startTime: 0.62, endTime: 1.31, duration: 0.69 }, + '2': { startTime: 1.32, endTime: 2.45, duration: 1.13 }, + '3': { startTime: 2.46, endTime: 5.97, duration: 3.51 }, + }, + intervals: [ + [0.06, 0.61, '0'], + [0.62, 1.31, '1'], + [1.32, 2.45, '2'], + [2.46, 5.97, '3'], + ], +}; diff --git a/tests/fixtures/verse.ts b/tests/fixtures/verse.ts new file mode 100644 index 000000000..8bb9bf471 --- /dev/null +++ b/tests/fixtures/verse.ts @@ -0,0 +1,172 @@ +import { ChapterId } from '../../src/types'; + +export const getVerse = (chapterId: ChapterId, verseNumber: number) => ({ + id: verseNumber, + verseNumber, + chapterId, + verseKey: `${chapterId}:${verseNumber}`, + textMadani: 'بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ', + textIndopak: 'بِسْمِ اللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ', + textSimple: 'بسم الله الرحمن الرحيم', + juzNumber: 1, + hizbNumber: 1, + rubNumber: 1, + sajdah: null, + sajdahNumber: null, + pageNumber: 1, + translations: [ + { + id: 722482, + languageName: 'english', + text: 'In the Name of Allah—the Most Compassionate, Most Merciful.', + resourceName: 'Dr. Mustafa Khattab', + resourceId: 102, + }, + ], + mediaContents: [ + { + url: 'https://www.youtube.com/embed/JyLuLv2hrAo?autoplay=1', + embedText: + '', + provider: 'YouTube', + authorName: 'Bayyinah', + }, + ], + words: [ + { + id: 1, + position: 1, + textMadani: 'بِسْمِ', + textIndopak: null, + textSimple: 'بسم', + verseKey: `${chapterId}:${verseNumber}`, + className: 'p1', + lineNumber: 2, + pageNumber: 1, + code: 'ﭑ', + codeV3: 'ﭑ', + charType: 'word', + audio: { url: 'verses/wbw/001_001_001.mp3' }, + translation: { + id: 1, + languageName: 'english', + text: 'In (the) name', + resourceName: null, + resourceId: 59, + }, + transliteration: { + id: 1, + languageName: 'english', + text: 'In (the) name', + resourceName: null, + resourceId: 59, + }, + }, + { + id: 2, + position: 2, + textMadani: 'اللَّهِ', + textIndopak: null, + textSimple: 'الله', + verseKey: `${chapterId}:${verseNumber}`, + className: 'p1', + lineNumber: 2, + pageNumber: 1, + code: 'ﭒ', + codeV3: 'ﭒ', + charType: 'word', + audio: { url: 'verses/wbw/001_001_002.mp3' }, + translation: { + id: 2, + languageName: 'english', + text: '(of) Allah', + resourceName: null, + resourceId: 59, + }, + transliteration: { + id: 2, + languageName: 'english', + text: '(of) Allah', + resourceName: null, + resourceId: 59, + }, + }, + { + id: 3, + position: 3, + textMadani: 'الرَّحْمَٰنِ', + textIndopak: null, + textSimple: 'الرحمان', + verseKey: `${chapterId}:${verseNumber}`, + className: 'p1', + lineNumber: 2, + pageNumber: 1, + code: 'ﭓ', + codeV3: 'ﭓ', + charType: 'word', + audio: { url: 'verses/wbw/001_001_003.mp3' }, + translation: { + id: 3, + languageName: 'english', + text: 'the Most Gracious', + resourceName: null, + resourceId: 59, + }, + transliteration: { + id: 3, + languageName: 'english', + text: 'the Most Gracious', + resourceName: null, + resourceId: 59, + }, + }, + { + id: 4, + position: 4, + textMadani: 'الرَّحِيمِ', + textIndopak: null, + textSimple: 'الرحيم', + verseKey: `${chapterId}:${verseNumber}`, + className: 'p1', + lineNumber: 2, + pageNumber: 1, + code: 'ﭔ', + codeV3: 'ﭔ', + charType: 'word', + audio: { url: 'verses/wbw/001_001_004.mp3' }, + translation: { + id: 4, + languageName: 'english', + text: 'the Most Merciful', + resourceName: null, + resourceId: 59, + }, + transliteration: { + id: 4, + languageName: 'english', + text: 'the Most Merciful', + resourceName: null, + resourceId: 59, + }, + }, + { + id: 5, + position: 5, + textMadani: null, + textIndopak: null, + textSimple: null, + verseKey: `${chapterId}:${verseNumber}`, + className: 'p1', + lineNumber: 2, + pageNumber: 1, + code: 'ﭕ', + codeV3: 'ꀁ', + charType: 'end', + audio: { url: null }, + translation: null, + transliteration: null, + }, + ], +}); + +export default getVerse(1, 1); diff --git a/tests/helpers/AudioStub.js b/tests/helpers/AudioStub.js deleted file mode 100644 index b6dba3682..000000000 --- a/tests/helpers/AudioStub.js +++ /dev/null @@ -1,50 +0,0 @@ -let loadeddata = new Event('loadeddata'); -let timeupdate = new Event('timeupdate'); -let ended = new Event('ended'); -let play = new Event('play'); -let pause = new Event('pause'); - -export default class AudioStub { - constructor(url, time) { - this.element = document.createElement('div'); - - this.element.currentSrc = url; - this.element.currentTime = 0; - this.element.duration = time || 1000; - this.element.state = 'paused'; - - setTimeout(() => { - this.element.dispatchEvent(loadeddata); - }, 500); - - this.element.play = () => { - this.element.state = 'playing'; - this.element.dispatchEvent(play); - this.incrementTime(); - }; - - this.element.pause = () => { - this.element.state = 'paused'; - this.element.dispatchEvent(pause); - clearInterval(this.incrementTime()); - } - - return this.element; - } - - incrementTime() { - return setInterval(() => { - this.element.currentTime = this.element.currentTime + 100; - this.element.dispatchEvent(timeupdate); - - if (this.element.currentTime === 1000) { - this.element.pause(); - this.element.dispatchEvent(ended); - } - }, 100) - } - - paused() { - return this.element.state === 'paused'; - } -}; diff --git a/tests/helpers/intl-enzyme-test-helper.js b/tests/helpers/intl-enzyme-test-helper.js deleted file mode 100644 index 238b98887..000000000 --- a/tests/helpers/intl-enzyme-test-helper.js +++ /dev/null @@ -1,40 +0,0 @@ - -/** - * Based on: https://gist.github.com/mirague/c05f4da0d781a9b339b501f1d5d33c37/ - * - * Components using the react-intl module require access to the intl context. - * This is not available when mounting single components in Enzyme. - * These helper functions aim to address that and wrap a valid, - * English-locale intl context around them. - */ - -import React from 'react'; -import { IntlProvider, intlShape } from 'react-intl'; -import { mount, shallow } from 'enzyme'; - - -// Create the IntlProvider to retrieve context for wrapping around. -// NOTE: Phantomjs requires usage of `var` -var intlProvider = new IntlProvider({ locale: 'en' }, {}); // eslint-disable-line -var intl = intlProvider.getChildContext(); // eslint-disable-line - -/** - * When using React-Intl `injectIntl` on components, props.intl is required. - */ -function nodeWithIntlProp(node) { - return React.cloneElement(node, intl); -} - -/** - * Export these methods. - */ -export function shallowWithIntl(node) { - return shallow(nodeWithIntlProp(node), { context: intl }); -} - -export function mountWithIntl(node) { - return mount(nodeWithIntlProp(node), { - context: intl, - childContextTypes: { intl: intlShape } - }); -} diff --git a/tests/polyfill/Event.js b/tests/polyfill/Event.js deleted file mode 100644 index df2a77fae..000000000 --- a/tests/polyfill/Event.js +++ /dev/null @@ -1,12 +0,0 @@ -// https://github.com/Raynos/DOM-shim/blob/master/src/all/interfaces/Event.js - -if (typeof window.Event !== 'function') { - window.Event = function constructor(type, dict) { - var e = document.createEvent("Events"); - dict = dict || {}; - dict.bubbles = dict.bubbles || false; - dict.catchable = dict.catchable || false; - e.initEvent(type, dict.bubbles, dict.catchable); - return e; - } -} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 000000000..5a0246150 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "outDir": "./dist/", + "sourceMap": true, + "noImplicitAny": true, + "module": "esnext", + "moduleResolution": "node", + "target": "es6", + "jsx": "react", + "allowJs": true, + "lib": ["es2015", "es2017", "dom"], + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "keyofStringsOnly": true, + "strictNullChecks": true + }, + "include": [ + "./src/**/*", + "./config/**/*" + ], + "exclude": [ + "./tests/**/*", + "./src/**/_tests_/**/*", + "*.scss" + ] +} diff --git a/webpack/.stylelintrc b/webpack/.stylelintrc deleted file mode 100644 index c96c3f3e9..000000000 --- a/webpack/.stylelintrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "rules": { - "unit-no-unknown": true, - "no-duplicate-selectors": true, - "block-no-empty": true - } -} diff --git a/webpack/dev.config.js b/webpack/dev.config.js deleted file mode 100644 index c7fac04cd..000000000 --- a/webpack/dev.config.js +++ /dev/null @@ -1,188 +0,0 @@ -require('dotenv').load(); -const webpack = require('webpack'); -const path = require('path'); -const IsomorphicPlugin = require('webpack-isomorphic-tools/plugin'); -const isomorphicToolsConfig = require('./isomorphic-tools-configuration'); - -const webpackIsomorphicToolsPlugin = new IsomorphicPlugin( - isomorphicToolsConfig -); - -const root = path.resolve(__dirname, '..'); - -module.exports = { - context: root, - resolve: { - extensions: ['.js'], - modules: ['src', 'node_modules'] - }, - entry: [ - 'babel-polyfill', - - 'react-hot-loader/patch', - // 'webpack-hot-middleware/client?path=http://localhost:8080/__webpack_hmr', - 'webpack-dev-server/client?http://localhost:8080', - 'webpack/hot/only-dev-server', - `bootstrap-loader/lib/bootstrap.loader?configFilePath=${root}/src/styles/bootstrap.config.json!bootstrap-loader/no-op.js`, - './src/client.js' - ], - devServer: { - hot: true, - quiet: true, - noInfo: true, - inline: true, - lazy: false, - stats: 'verbose', - - headers: { - 'Access-Control-Allow-Origin': '*' - }, - // enable HMR on the server - - contentBase: path.resolve('./build'), - // match the output path - - publicPath: 'http://localhost:8080/public/' - // match the output `publicPath` - }, - output: { - path: path.resolve('./build'), - publicPath: 'http://localhost:8080/public/', - filename: '[name].js', - chunkFilename: '[name]-chunk.js' - }, - module: { - rules: [ - { - test: /\.js$/, - exclude: /node_modules/, - use: [ - { - loader: 'babel-loader', - options: { - babelrc: false, - plugins: [ - 'react-hot-loader/babel', - 'transform-runtime', - // 'add-module-exports', - 'transform-react-display-name', - 'typecheck', - 'react-hot-loader/babel', - 'syntax-dynamic-import' - ], - presets: [['es2015', { modules: false }], 'stage-2', 'react'], - cacheDirectory: true - } - } - ] - }, - { - test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, - loader: 'url-loader?name=fonts/[name].[ext]&limit=10000&mimetype=application/font-woff' - }, - { - test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, - loader: 'url-loader?name=fonts/[name].[ext]&limit=10000&mimetype=application/font-woff' - }, - { - test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, - loader: 'url-loader?name=fonts/[name].[ext]&limit=10000&mimetype=application/octet-stream' - }, - { - test: /\.otf(\?v=\d+\.\d+\.\d+)?$/, - loader: 'url-loader?name=fonts/[name].[ext]&limit=10000&mimetype=application/octet-stream' - }, - { - test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, - loader: 'file-loader?name=fonts/[name].[ext]' - }, - { - test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, - loader: 'url-loader?name=images/[name].[ext]&limit=10000&mimetype=image/svg+xml' - }, - { - test: webpackIsomorphicToolsPlugin.regular_expression('images'), - loader: 'url-loader?name=images/[name].[ext]&limit=10240' - }, - { - test: /\.scss$/, - use: [ - 'style-loader', - { - loader: 'css-loader', - options: { - modules: true, - importLoaders: 2, - sourceMap: true, - localIdentName: '[path][name]__[local]--[hash:base64:5]' - } - }, - { - loader: 'postcss-loader', - options: { - plugins() { - return [ - require('precss'), // eslint-disable-line - require('autoprefixer') // eslint-disable-line - ]; - } - } - }, - 'sass-loader?outputStyle=expanded&sourceMap' - ] - } - ] - }, - plugins: [ - new webpack.HotModuleReplacementPlugin(), - new webpack.NoEmitOnErrorsPlugin(), - new webpack.NamedModulesPlugin(), - // new DashboardPlugin(), - new webpack.ProvidePlugin({ - $: 'jquery', - jQuery: 'jquery', - 'windows.jQuery': 'jquery' - }), - new webpack.DefinePlugin({ - 'process.env.BROWSER': true, - 'process.env.API_URL': JSON.stringify(process.env.API_URL), - 'process.env.ONE_QURAN_URL': JSON.stringify(process.env.ONE_QURAN_URL), - 'process.env.FACEBOOK_APP_ID': JSON.stringify( - process.env.FACEBOOK_APP_ID - ), - 'process.env.SEGMENTS_KEY': JSON.stringify(process.env.SEGMENTS_KEY), - 'process.env.SENTRY_KEY_CLIENT': JSON.stringify( - process.env.SENTRY_KEY_CLIENT - ), - 'process.env.SENTRY_KEY_SERVER': JSON.stringify( - process.env.SENTRY_KEY_SERVER - ), - __SERVER__: false, - __CLIENT__: true, - __DEVELOPMENT__: true, - __DEVTOOLS__: true - }), - new webpack.EnvironmentPlugin(['NODE_ENV']), - webpackIsomorphicToolsPlugin.development() - ], - stats: { - colors: true, - reasons: true, - hash: true, - timings: true, - chunks: true, - chunkModules: true, - cachedAssets: true, - depth: true, - entrypoints: true - }, - devtool: 'source-map', - cache: true, - node: { - setImmediate: false, - console: true, - fs: 'empty', - net: 'empty', - tls: 'empty' - } -}; diff --git a/webpack/isomorphic-tools-configuration.js b/webpack/isomorphic-tools-configuration.js deleted file mode 100644 index 042724069..000000000 --- a/webpack/isomorphic-tools-configuration.js +++ /dev/null @@ -1,96 +0,0 @@ -const WebpackIsomorphicToolsPlugin = require('webpack-isomorphic-tools/plugin'); - -// see this link for more info on what all of this means -// https://github.com/halt-hammerzeit/webpack-isomorphic-tools -module.exports = { - - // when adding "js" extension to asset types - // and then enabling debug mode, it may cause a weird error: - // - // [0] npm run start-prod exited with code 1 - // Sending SIGTERM to other processes.. - // - // debug: true, - - assets: { - images: { - extensions: [ - 'jpeg', - 'jpg', - 'png', - 'gif' - ], - parser: WebpackIsomorphicToolsPlugin.url_loader_parser - }, - fonts: { - extensions: [ - 'woff', - 'woff2', - 'ttf', - 'eot' - ], - parser: WebpackIsomorphicToolsPlugin.url_loader_parser - }, - svg: { - extension: 'svg', - parser: WebpackIsomorphicToolsPlugin.url_loader_parser - }, - // this whole "bootstrap" asset type is only used once in development mode. - // the only place it's used is the Html.js file - // where a