diff --git a/.babelrc b/.babelrc deleted file mode 100644 index 2a6c007..0000000 --- a/.babelrc +++ /dev/null @@ -1,33 +0,0 @@ -{ - "presets": ["stage-0", "react"], - "plugins": [ - "transform-class-properties", - "transform-es2015-template-literals", - "transform-es2015-literals", - "transform-es2015-function-name", - "transform-es2015-arrow-functions", - "transform-es2015-block-scoped-functions", - "transform-es2015-classes", - "transform-es2015-object-super", - "transform-es2015-shorthand-properties", - "transform-es2015-computed-properties", - "transform-es2015-for-of", - "transform-es2015-sticky-regex", - "transform-es2015-unicode-regex", - "check-es2015-constants", - "transform-es2015-spread", - "transform-es2015-parameters", - "transform-es2015-destructuring", - "transform-es2015-block-scoping", - "transform-es2015-typeof-symbol", - ["transform-regenerator", { "async": false, "asyncGenerators": false }] - ], - "env": { - "test": { - "presets": ["stage-0", "react", "es2015"], - "plugins": [ - "transform-class-properties" - ] - } - } -} diff --git a/.browserslistrc b/.browserslistrc new file mode 100644 index 0000000..cedbd17 --- /dev/null +++ b/.browserslistrc @@ -0,0 +1,5 @@ +> 0.5% +last 2 versions +Firefox ESR +ie 11 +not dead diff --git a/.env b/.env new file mode 100644 index 0000000..82781ca --- /dev/null +++ b/.env @@ -0,0 +1,9 @@ +BROWSER=false +PORT=8081 +SKIP_PREFLIGHT_CHECK=true +REACT_APP_DHIS2_BASE_URL=https://dev.eyeseetea.com/play +REACT_APP_DHIS2_AUTH='admin:district' + +CYPRESS_DHIS2_AUTH='admin:district' +CYPRESS_EXTERNAL_API="https://dev.eyeseetea.com/play" +CYPRESS_ROOT_URL=http://localhost:8081 diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..ba7cc18 --- /dev/null +++ b/.env.production @@ -0,0 +1 @@ +GENERATE_SOURCEMAP=false diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..f00f19e --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +/**/*.d.ts +/src/locales diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..40478c0 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,54 @@ +/** @format */ + +module.exports = { + extends: [ + "react-app", + "eslint:recommended", + "plugin:react/recommended", + "plugin:cypress/recommended", + "plugin:@typescript-eslint/recommended", + ], + parser: "@typescript-eslint/parser", + rules: { + "no-console": ["warn", { allow: ["debug", "warn", "error"] }], + "@typescript-eslint/camelcase": "off", + "@typescript-eslint/explicit-function-return-type": ["off"], + "unused-imports/no-unused-imports": "warn", + "@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }], + "react/prop-types": "off", + "react/display-name": "off", + "react/react-in-jsx-scope": "off", + "no-unused-expressions": "off", + "no-useless-concat": "off", + "no-useless-constructor": "off", + "no-unexpected-multiline": "off", + "default-case": "off", + "@typescript-eslint/no-use-before-define": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-empty-interface": "off", + "@typescript-eslint/ban-ts-ignore": "off", + "@typescript-eslint/no-empty-function": "off", + "@typescript-eslint/explicit-module-boundary-types": "off", + "@typescript-eslint/ban-types": "off", + "@typescript-eslint/ban-ts-comment": "off", + "@typescript-eslint/no-var-requires": "off", + "@typescript-eslint/indent": "off", + "@typescript-eslint/member-delimiter-style": "off", + "@typescript-eslint/type-annotation-spacing": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "no-use-before-define": "off", + "no-debugger": "warn", + "no-extra-semi": "off", + "no-mixed-spaces-and-tabs": "off", + "react-hooks/rules-of-hooks": "error", + "react-hooks/exhaustive-deps": "warn", + }, + plugins: ["cypress", "@typescript-eslint", "react-hooks", "unused-imports"], + env: { "cypress/globals": true }, + settings: { + react: { + pragma: "React", + version: "16.6.0", + }, + }, +}; diff --git a/.githooks/dep-check b/.githooks/dep-check new file mode 100755 index 0000000..b72bcdc --- /dev/null +++ b/.githooks/dep-check @@ -0,0 +1,10 @@ +#!/bin/sh + +changed () { + git diff --name-only HEAD@{1} HEAD | grep "^$1" > /dev/null 2>&1 +} + +if changed 'yarn.lock'; then + echo "Lockfile changes detected. Installing updates..." + yarn install +fi diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..7b3ce9d --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,9 @@ +### :pushpin: References + +- **Issue:** Closes #? + +### :memo: Implementation + +### :art: Screenshots + +### :fire: Testing diff --git a/.gitignore b/.gitignore index b1b36af..f93cc1a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,26 +1,40 @@ -*.iml -.idea/* -package-lock.json -node_modules* -.sass-cache -src/css/* -coverage/* +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules + +# testing +/coverage + +# production manifest.webapp -*.zip +/build -# TODO: Jshint is a dependency of the git hook which installs these files on install... -.jshintignore -.jshintrc +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local +*.sublime-project +*.sublime-workspace +*.code-workspace +*.zip -# Build folders 'build' for building the project 'target' being for the Maven deploy -build/* -target/* +npm-debug.log* +yarn-debug.log* +yarn-error.log* -npm-debug.log -stats.json +src/locales/ +src/react-app.d.ts +src/react-app-env.d.ts +bak +.eslintcache -.vscode* +# cypress +cypress/screenshots/ +cypress/videos/ +cypress/fixtures/ -# Ignore config.js -config.js -app-config.json +# IntelliJ +.idea/* diff --git a/.husky/.gitignore b/.husky/.gitignore new file mode 100644 index 0000000..31354ec --- /dev/null +++ b/.husky/.gitignore @@ -0,0 +1 @@ +_ diff --git a/.husky/post-merge b/.husky/post-merge new file mode 100755 index 0000000..d3b6c10 --- /dev/null +++ b/.husky/post-merge @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +./.githooks/dep-check diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100755 index 0000000..085ecbb --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +yarn prettify && yarn lint && yarn update-po && yarn test diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..b6fcbef --- /dev/null +++ b/.prettierignore @@ -0,0 +1,4 @@ +build +node_modules +*.min.js +*.min.css diff --git a/.prettierrc.js b/.prettierrc.js index 9ba9d26..b54667b 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1,18 +1,18 @@ /** @format */ module.exports = { - printWidth: 100, + printWidth: 120, tabWidth: 4, useTabs: false, semi: true, singleQuote: false, - trailingComma: 'es5', + trailingComma: "es5", bracketSpacing: true, jsxBracketSameLine: false, - arrowParens: 'avoid', + arrowParens: "avoid", rangeStart: 0, rangeEnd: Infinity, - proseWrap: 'preserve', + proseWrap: "preserve", requirePragma: false, insertPragma: false, -} \ No newline at end of file +}; diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + 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. + + + Copyright (C) + + 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: + + Copyright (C) + 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 af24b46..53f3ee4 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,90 @@ -# User App +## Setup -User App is a Dhis2 Web Application that provides an easy and integrated way to do common operations on Dhis2 users which would be burdensome to perform using the in-built Dhis2 User management application. +Install dependencies: -## Features +``` +$ yarn install +``` -- Landing page: it displays a list of users with some attributes information. The list allows sorting by some fields (click the column header) and single/multiple selections. You can also filter by name, role, groups and see only users you can manage. -- Show details: it behaves as the regular show details in any Dhis2 instance. It shows a right side panel with some information about the user. This is also the action by default when clicking a row. -- Assign to organisation units capture: Implemented for single and multiple selections\* allows setting Data capture and maintenance organisation units. -- Assign to organisation units output: Implemented for single and multiple selections\* allows setting Data output and analysis organisation units. -- Assign roles: Implemented for single and multiple selections\* allows assigning the roles to a user/s. -- Assign to groups: Implemented for single and multiple selections\* allows assigning the user groups for a user/s. -- Shortcut to regular dhis2 user management app -- Replicate user: Implemented for single mode allows creating multiple users using a single users as starting point. Currently, two modes are available: 'From Template' and 'From table'. +## Development -\*In single mode, it works as the regular Dhis2 vanilla feature. For multiple selections, the changes can be saved using one of two strategies: merge or replace. The merge strategy will add the selected entities (organisation units, roles, etc) to the current values each user had, no values will be removed. Replace on the other hand overwrites any previous values and keep only those selected in this dialog. +Start the development server: -## Installation +``` +$ PORT=8081 REACT_APP_DHIS2_BASE_URL="http://localhost:8080" yarn start +``` -Just download the [zip file available for each release](https://github.com/EyeSeeTea/user-extended-app/releases) and install it in your Dhis2 instance using the App management application. +Now in your browser, go to `http://localhost:8081`. + +Notes: + +- Requests to DHIS2 will be transparently proxied (see `src/setupProxy.js`) from `http://localhost:8081/dhis2/path` to `http://localhost:8080/path` to avoid CORS and cross-domain problems. + +- The optional environment variable `REACT_APP_DHIS2_AUTH=USERNAME:PASSWORD` forces some credentials to be used by the proxy. This variable is usually not set, so the app has the same user logged in at `REACT_APP_DHIS2_BASE_URL`. + +- The optional environment variable `REACT_APP_PROXY_LOG_LEVEL` can be helpful to debug the proxyfied requests (accepts: "warn" | "debug" | "info" | "error" | "silent") + +- Create a file `.env.local` (copy it from `.env`) to customize environment variables so you can simply run `yarn start`. + +- [why-did-you-render](https://github.com/welldone-software/why-did-you-render) is installed, but it does not work when using standard react scripts (`yarn start`). Instead, use `yarn craco-start` to debug re-renders with WDYR. Note that hot reloading does not work out-of-the-box with [craco](https://github.com/gsoft-inc/craco). + +## Tests + +### Unit tests + +``` +$ yarn test +``` + +### Integration tests (Cypress) + +Create the required users for testing (`cypress/support/App.ts`) in your instance and run: + +``` +$ export CYPRESS_EXTERNAL_API="http://localhost:8080" +$ export CYPRESS_ROOT_URL=http://localhost:8081 + +# non-interactive +$ yarn cy:e2e:run + +# interactive UI +$ yarn cy:e2e:open +``` + +## Build app ZIP + +``` +$ yarn build +``` + +## Some development tips + +### Structure + +- `i18n/`: Contains literal translations (gettext format) +- `public/`: Main app folder with a `index.html`, exposes the APP, contains the feedback-tool. +- `src/pages`: Main React components. +- `src/domain`: Domain layer of the app (clean architecture) +- `src/data`: Data of the app (clean architecture) +- `src/components`: Reusable React components. +- `src/types`: `.d.ts` file types for modules without TS definitions. +- `src/utils`: Misc utilities. +- `src/locales`: Auto-generated, do not update or add to the version control. +- `cypress/integration/`: Cypress integration tests. + +### i18n + +``` +$ yarn localize +``` + +### App context + +The file `src/contexts/app-context.ts` holds some general context so typical infrastructure objects (`api`, `d2`, ...) are readily available. Add your own global objects if necessary. + +### Scripts + +Check the example script, entry `"script-example"`in `package.json`->scripts and `src/scripts/example.ts`. ## Documentation @@ -31,6 +98,3 @@ You can find a detailed user and developer guide [here](https://docs.google.com/ We’d like to hear your thoughts on the app in general, improvements, new features or any of the technologies being used. Just drop as a line at hello@eyeseetea.com and let us know! If you prefer, you can also create a new issue on our GitHub repository. Note that you will have to register and be logged in to GitHub to create a new issue. -## License - -This app is licensed under GPLv3. Please respect the terms of that license. diff --git a/app-config/app-config-default.json b/app-config/app-config-default.json deleted file mode 100644 index 951c24f..0000000 --- a/app-config/app-config-default.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "appKey": "User-Extended-App", - "appearance": { - "header": { - "showTitle": true, - "styles": { - "background": "#276696" - } - }, - "showShareButton": true - }, - "feedback": { - "token": ["03242fc6b0c5a48582", "2e6b8d3e8337b5a0b95fe2"], - "createIssue": true, - "sendToDhis2UserGroups": [], - "issues": { - "repository": "EyeSeeTea/user-extended-app-blessed", - "title": "[User feedback] {title}", - "body": "## dhis2\n\nUsername: {username}\n\n{body}" - }, - "snapshots": { - "repository": "EyeSeeTeaBotTest/snapshots", - "branch": "master" - }, - "feedbackOptions": {} - } -} diff --git a/app-config/app-config-nrc.json b/app-config/app-config-nrc.json deleted file mode 100644 index 6e69f04..0000000 --- a/app-config/app-config-nrc.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "appKey": "User-Extended-App", - "appearance": { - "header": { - "showTitle": true, - "styles": { - "background": "#3c3c3c" - } - }, - "showShareButton": false - }, - "feedback": { - "token": ["03242fc6b0c5a48582", "2e6b8d3e8337b5a0b95fe2"], - "createIssue": false, - "sendToDhis2UserGroups": ["GL_GlobalAdministrator", "GL_LocalindicatorAdmin"], - "issues": { - "repository": "EyeSeeTea/user-extended-app-blessed", - "title": "[User feedback] {title}", - "body": "## dhis2\n\nUsername: {username}\n\n{body}" - }, - "snapshots": { - "repository": "EyeSeeTeaBotTest/snapshots", - "branch": "master" - }, - "feedbackOptions": {} - } -} diff --git a/app-config/app-config-who.json b/app-config/app-config-who.json deleted file mode 100644 index dbcdd98..0000000 --- a/app-config/app-config-who.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "appKey": "User-Extended-App", - "appearance": { - "header": { - "showTitle": true, - "styles": { - "background": "#276696" - } - }, - "showShareButton": false - }, - "feedback": { - "token": ["03242fc6b0c5a48582", "2e6b8d3e8337b5a0b95fe2"], - "createIssue": true, - "sendToDhis2UserGroups": [], - "issues": { - "repository": "EyeSeeTea/user-extended-app-blessed", - "title": "[User feedback] {title}", - "body": "## dhis2\n\nUsername: {username}\n\n{body}" - }, - "snapshots": { - "repository": "EyeSeeTeaBotTest/snapshots", - "branch": "master" - }, - "feedbackOptions": {} - } -} diff --git a/app-config/app-config.example.json b/app-config/app-config.example.json deleted file mode 100644 index f2b226f..0000000 --- a/app-config/app-config.example.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "appKey": "User-Extended-App", - "appearance": { - "header": { - "showTitle": true, - "styles": { - "background": "#3c3c3c" - } - }, - "showShareButton": true - }, - "feedback": { - "token": ["03242fc6b0c5a48582", "2e6b8d3e8337b5a0b95fe2"], - "createIssue": true, - "sendToDhis2UserGroups": ["Administrators"], - "issues": { - "repository": "tokland/feedback-test", - "title": "[User feedback] {title}", - "body": "## dhis2\n\nUsername: {username}\n\n{body}" - }, - "snapshots": { - "repository": "EyeSeeTeaBotTest/snapshots", - "branch": "master" - }, - "feedbackOptions": {} - } -} diff --git a/app-favicon.ico b/app-favicon.ico deleted file mode 100644 index 4488d8e..0000000 Binary files a/app-favicon.ico and /dev/null differ diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 0000000..5824cd5 --- /dev/null +++ b/babel.config.js @@ -0,0 +1,3 @@ +module.exports = { + presets: ["@babel/typescript", ["babel-preset-react-app", { runtime: "automatic" }]], +}; diff --git a/config/fileMock.js b/config/fileMock.js new file mode 100644 index 0000000..e929565 --- /dev/null +++ b/config/fileMock.js @@ -0,0 +1,3 @@ +// Turns file imports into dummy objects + +module.exports = "test-file-stub"; diff --git a/config/styleMock.js b/config/styleMock.js new file mode 100644 index 0000000..efa0d3c --- /dev/null +++ b/config/styleMock.js @@ -0,0 +1,3 @@ +// Turns style imports into empty objects + +module.exports = {}; diff --git a/config/testHelpers.js b/config/testHelpers.js new file mode 100644 index 0000000..6735d32 --- /dev/null +++ b/config/testHelpers.js @@ -0,0 +1,8 @@ +export function getD2Stub() { + return { + system: { + systemInfo: {}, + }, + currentUser: {}, + }; +} diff --git a/config/testSetup.ts b/config/testSetup.ts new file mode 100644 index 0000000..16018ff --- /dev/null +++ b/config/testSetup.ts @@ -0,0 +1,13 @@ +import { TextDecoder, TextEncoder } from "util"; + +global.console = { + error: console.error, + info: console.info, + log: jest.fn(), + warn: jest.fn(), + debug: jest.fn(), +}; + +// Polyfill for encoding which isn't present globally in jsdom +global.TextEncoder = TextEncoder; +global.TextDecoder = TextDecoder; diff --git a/craco.config.js b/craco.config.js new file mode 100644 index 0000000..65d0311 --- /dev/null +++ b/craco.config.js @@ -0,0 +1,30 @@ +/* Required for CRA 4, see https://github.com/welldone-software/why-did-you-render/issues/154#issuecomment-773905769 */ + +module.exports = { + babel: { + loaderOptions: babelLoaderOptions => { + const origBabelPresetCRAIndex = babelLoaderOptions.presets.findIndex(preset => { + return preset[0].includes("babel-preset-react-app"); + }); + + const origBabelPresetCRA = babelLoaderOptions.presets[origBabelPresetCRAIndex]; + + babelLoaderOptions.presets[origBabelPresetCRAIndex] = function overridenPresetCRA(api, opts, env) { + const babelPresetCRAResult = require(origBabelPresetCRA[0])(api, origBabelPresetCRA[1], env); + + babelPresetCRAResult.presets.forEach(preset => { + // detect @babel/preset-react with {development: true, runtime: 'automatic'} + const isReactPreset = + preset && preset[1] && preset[1].runtime === "automatic" && preset[1].development === true; + if (isReactPreset) { + preset[1].importSource = "@welldone-software/why-did-you-render"; + } + }); + + return babelPresetCRAResult; + }; + + return babelLoaderOptions; + }, + }, +}; diff --git a/css/font-awesome/css/font-awesome.min.css b/css/font-awesome/css/font-awesome.min.css deleted file mode 100644 index ec53d4d..0000000 --- a/css/font-awesome/css/font-awesome.min.css +++ /dev/null @@ -1,4 +0,0 @@ -/*! - * Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome - * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.2.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"} \ No newline at end of file diff --git a/css/font-awesome/fonts/FontAwesome.otf b/css/font-awesome/fonts/FontAwesome.otf deleted file mode 100644 index 81c9ad9..0000000 Binary files a/css/font-awesome/fonts/FontAwesome.otf and /dev/null differ diff --git a/css/font-awesome/fonts/fontawesome-webfont.eot b/css/font-awesome/fonts/fontawesome-webfont.eot deleted file mode 100644 index 84677bc..0000000 Binary files a/css/font-awesome/fonts/fontawesome-webfont.eot and /dev/null differ diff --git a/css/font-awesome/fonts/fontawesome-webfont.svg b/css/font-awesome/fonts/fontawesome-webfont.svg deleted file mode 100644 index d907b25..0000000 --- a/css/font-awesome/fonts/fontawesome-webfont.svg +++ /dev/null @@ -1,520 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/css/font-awesome/fonts/fontawesome-webfont.ttf b/css/font-awesome/fonts/fontawesome-webfont.ttf deleted file mode 100644 index 96a3639..0000000 Binary files a/css/font-awesome/fonts/fontawesome-webfont.ttf and /dev/null differ diff --git a/css/font-awesome/fonts/fontawesome-webfont.woff b/css/font-awesome/fonts/fontawesome-webfont.woff deleted file mode 100644 index 628b6a5..0000000 Binary files a/css/font-awesome/fonts/fontawesome-webfont.woff and /dev/null differ diff --git a/css/fonts/LiberationSans-Bold-webfont.eot b/css/fonts/LiberationSans-Bold-webfont.eot deleted file mode 100644 index 35fbccd..0000000 Binary files a/css/fonts/LiberationSans-Bold-webfont.eot and /dev/null differ diff --git a/css/fonts/LiberationSans-Bold-webfont.svg b/css/fonts/LiberationSans-Bold-webfont.svg deleted file mode 100644 index 47a2314..0000000 --- a/css/fonts/LiberationSans-Bold-webfont.svg +++ /dev/null @@ -1,154 +0,0 @@ - - - - -This is a custom SVG webfont generated by Font Squirrel. -Copyright : Digitized data 2007 Ascender Corporation All rights reserved -Designer : Steve Matteson -Foundry : Ascender Corporation -Foundry URL : httpwwwascendercorpcom - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/css/fonts/LiberationSans-Bold-webfont.ttf b/css/fonts/LiberationSans-Bold-webfont.ttf deleted file mode 100644 index 24a4eff..0000000 Binary files a/css/fonts/LiberationSans-Bold-webfont.ttf and /dev/null differ diff --git a/css/fonts/LiberationSans-Bold-webfont.woff b/css/fonts/LiberationSans-Bold-webfont.woff deleted file mode 100644 index 6e9d870..0000000 Binary files a/css/fonts/LiberationSans-Bold-webfont.woff and /dev/null differ diff --git a/css/fonts/LiberationSans-Regular-webfont.eot b/css/fonts/LiberationSans-Regular-webfont.eot deleted file mode 100644 index ca5f4a4..0000000 Binary files a/css/fonts/LiberationSans-Regular-webfont.eot and /dev/null differ diff --git a/css/fonts/LiberationSans-Regular-webfont.svg b/css/fonts/LiberationSans-Regular-webfont.svg deleted file mode 100644 index 193d756..0000000 --- a/css/fonts/LiberationSans-Regular-webfont.svg +++ /dev/null @@ -1,262 +0,0 @@ - - - - -This is a custom SVG webfont generated by Font Squirrel. -Copyright : Digitized data 2007 Ascender Corporation All rights reserved -Designer : Steve Matteson -Foundry : Ascender Corporation -Foundry URL : httpwwwascendercorpcom - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/css/fonts/LiberationSans-Regular-webfont.ttf b/css/fonts/LiberationSans-Regular-webfont.ttf deleted file mode 100644 index 0d28f4a..0000000 Binary files a/css/fonts/LiberationSans-Regular-webfont.ttf and /dev/null differ diff --git a/css/fonts/LiberationSans-Regular-webfont.woff b/css/fonts/LiberationSans-Regular-webfont.woff deleted file mode 100644 index 9fff1a7..0000000 Binary files a/css/fonts/LiberationSans-Regular-webfont.woff and /dev/null differ diff --git a/css/fonts/padauk-bold-webfont.eot b/css/fonts/padauk-bold-webfont.eot deleted file mode 100644 index 26093f6..0000000 Binary files a/css/fonts/padauk-bold-webfont.eot and /dev/null differ diff --git a/css/fonts/padauk-bold-webfont.svg b/css/fonts/padauk-bold-webfont.svg deleted file mode 100644 index 92538d6..0000000 --- a/css/fonts/padauk-bold-webfont.svg +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/css/fonts/padauk-bold-webfont.ttf b/css/fonts/padauk-bold-webfont.ttf deleted file mode 100644 index 6a5d403..0000000 Binary files a/css/fonts/padauk-bold-webfont.ttf and /dev/null differ diff --git a/css/fonts/padauk-bold-webfont.woff b/css/fonts/padauk-bold-webfont.woff deleted file mode 100644 index 5c1fcdd..0000000 Binary files a/css/fonts/padauk-bold-webfont.woff and /dev/null differ diff --git a/css/fonts/padauk-webfont.eot b/css/fonts/padauk-webfont.eot deleted file mode 100644 index 5b1a269..0000000 Binary files a/css/fonts/padauk-webfont.eot and /dev/null differ diff --git a/css/fonts/padauk-webfont.svg b/css/fonts/padauk-webfont.svg deleted file mode 100644 index 9e1c1e9..0000000 --- a/css/fonts/padauk-webfont.svg +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/css/fonts/padauk-webfont.ttf b/css/fonts/padauk-webfont.ttf deleted file mode 100644 index aff6a06..0000000 Binary files a/css/fonts/padauk-webfont.ttf and /dev/null differ diff --git a/css/fonts/padauk-webfont.woff b/css/fonts/padauk-webfont.woff deleted file mode 100644 index deddae4..0000000 Binary files a/css/fonts/padauk-webfont.woff and /dev/null differ diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-100.eot b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-100.eot deleted file mode 100644 index 949f90c..0000000 Binary files a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-100.eot and /dev/null differ diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-100.svg b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-100.svg deleted file mode 100644 index d1e02c3..0000000 --- a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-100.svg +++ /dev/null @@ -1,313 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-100.ttf b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-100.ttf deleted file mode 100644 index 231fe5b..0000000 Binary files a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-100.ttf and /dev/null differ diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-100.woff b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-100.woff deleted file mode 100644 index 48f3bfd..0000000 Binary files a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-100.woff and /dev/null differ diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-100.woff2 b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-100.woff2 deleted file mode 100644 index b359a9c..0000000 Binary files a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-100.woff2 and /dev/null differ diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-300.eot b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-300.eot deleted file mode 100644 index 488d2a9..0000000 Binary files a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-300.eot and /dev/null differ diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-300.svg b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-300.svg deleted file mode 100644 index 52b2832..0000000 --- a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-300.svg +++ /dev/null @@ -1,314 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-300.ttf b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-300.ttf deleted file mode 100644 index 183072b..0000000 Binary files a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-300.ttf and /dev/null differ diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-300.woff b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-300.woff deleted file mode 100644 index c94ed97..0000000 Binary files a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-300.woff and /dev/null differ diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-300.woff2 b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-300.woff2 deleted file mode 100644 index 091b412..0000000 Binary files a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-300.woff2 and /dev/null differ diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-500.eot b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-500.eot deleted file mode 100644 index 73a0dd1..0000000 Binary files a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-500.eot and /dev/null differ diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-500.svg b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-500.svg deleted file mode 100644 index 2b98916..0000000 --- a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-500.svg +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-500.ttf b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-500.ttf deleted file mode 100644 index 28a6a07..0000000 Binary files a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-500.ttf and /dev/null differ diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-500.woff b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-500.woff deleted file mode 100644 index a4891eb..0000000 Binary files a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-500.woff and /dev/null differ diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-500.woff2 b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-500.woff2 deleted file mode 100644 index 7be7c33..0000000 Binary files a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-500.woff2 and /dev/null differ diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-700.eot b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-700.eot deleted file mode 100644 index b38d2c1..0000000 Binary files a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-700.eot and /dev/null differ diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-700.svg b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-700.svg deleted file mode 100644 index fc8d42f..0000000 --- a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-700.svg +++ /dev/null @@ -1,310 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-700.ttf b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-700.ttf deleted file mode 100644 index 8a2825f..0000000 Binary files a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-700.ttf and /dev/null differ diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-700.woff b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-700.woff deleted file mode 100644 index e4dd762..0000000 Binary files a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-700.woff and /dev/null differ diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-700.woff2 b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-700.woff2 deleted file mode 100644 index 4d7272a..0000000 Binary files a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-700.woff2 and /dev/null differ diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-900.eot b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-900.eot deleted file mode 100644 index 734b92e..0000000 Binary files a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-900.eot and /dev/null differ diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-900.svg b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-900.svg deleted file mode 100644 index 65a4c0e..0000000 --- a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-900.svg +++ /dev/null @@ -1,304 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-900.ttf b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-900.ttf deleted file mode 100644 index 1077c72..0000000 Binary files a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-900.ttf and /dev/null differ diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-900.woff b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-900.woff deleted file mode 100644 index f0107f9..0000000 Binary files a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-900.woff and /dev/null differ diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-900.woff2 b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-900.woff2 deleted file mode 100644 index 3fd24c3..0000000 Binary files a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-900.woff2 and /dev/null differ diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-regular.eot b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-regular.eot deleted file mode 100644 index 474eca1..0000000 Binary files a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-regular.eot and /dev/null differ diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-regular.svg b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-regular.svg deleted file mode 100644 index ed55c10..0000000 --- a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-regular.svg +++ /dev/null @@ -1,308 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-regular.ttf b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-regular.ttf deleted file mode 100644 index 7cb17c9..0000000 Binary files a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-regular.ttf and /dev/null differ diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-regular.woff b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-regular.woff deleted file mode 100644 index 37da772..0000000 Binary files a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-regular.woff and /dev/null differ diff --git a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-regular.woff2 b/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-regular.woff2 deleted file mode 100644 index 70994a2..0000000 Binary files a/css/fonts/roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-regular.woff2 and /dev/null differ diff --git a/css/fonts/roboto.css b/css/fonts/roboto.css deleted file mode 100644 index beb81dc..0000000 --- a/css/fonts/roboto.css +++ /dev/null @@ -1,72 +0,0 @@ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 100; - src: url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-100.eot'); - src: local('Roboto Thin'), local('Roboto-Thin'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-100.eot?#iefix') format('embedded-opentype'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-100.woff2') format('woff2'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-100.woff') format('woff'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-100.ttf') format('truetype'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-100.svg#Roboto') format('svg'); -} -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 300; - src: url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-300.eot'); - src: local('Roboto Light'), local('Roboto-Light'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-300.eot?#iefix') format('embedded-opentype'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-300.woff2') format('woff2'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-300.woff') format('woff'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-300.ttf') format('truetype'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-300.svg#Roboto') format('svg'); -} -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 400; - src: url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-regular.eot'); - src: local('Roboto'), local('Roboto-Regular'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-regular.eot?#iefix') format('embedded-opentype'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-regular.woff2') format('woff2'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-regular.woff') format('woff'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-regular.ttf') format('truetype'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-regular.svg#Roboto') format('svg'); -} -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 500; - src: url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-500.eot'); - src: local('Roboto Medium'), local('Roboto-Medium'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-500.eot?#iefix') format('embedded-opentype'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-500.woff2') format('woff2'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-500.woff') format('woff'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-500.ttf') format('truetype'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-500.svg#Roboto') format('svg'); -} -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 700; - src: url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-700.eot'); - src: local('Roboto Bold'), local('Roboto-Bold'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-700.eot?#iefix') format('embedded-opentype'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-700.woff2') format('woff2'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-700.woff') format('woff'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-700.ttf') format('truetype'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-700.svg#Roboto') format('svg'); -} -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 900; - src: url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-900.eot'); - src: local('Roboto Black'), local('Roboto-Black'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-900.eot?#iefix') format('embedded-opentype'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-900.woff2') format('woff2'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-900.woff') format('woff'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-900.ttf') format('truetype'), - url('roboto-v15-latin-ext_latin/roboto-v15-latin-ext_latin-900.svg#Roboto') format('svg'); -} \ No newline at end of file diff --git a/css/material-design-icons/material-icons.css b/css/material-design-icons/material-icons.css deleted file mode 100644 index 43c889d..0000000 --- a/css/material-design-icons/material-icons.css +++ /dev/null @@ -1,38 +0,0 @@ -@font-face { - font-family: 'Material Icons'; - font-style: normal; - font-weight: 400; - src: url(MaterialIcons-Regular.eot); /* For IE6-8 */ - src: local('Material Icons'), - local('MaterialIcons-Regular'), - url(MaterialIcons-Regular.woff2) format('woff2'), - url(MaterialIcons-Regular.woff) format('woff'), - url(MaterialIcons-Regular.ttf) format('truetype'); -} - -.material-icons { - font-family: 'Material Icons'; - font-weight: normal; - font-style: normal; - font-size: 24px; /* Preferred icon size */ - display: inline-block; - width: 1em; - height: 1em; - line-height: 1; - text-transform: none; - letter-spacing: normal; - word-wrap: normal; - white-space: nowrap; - direction: ltr; - - /* Support for all WebKit browsers. */ - -webkit-font-smoothing: antialiased; - /* Support for Safari and Chrome. */ - text-rendering: optimizeLegibility; - - /* Support for Firefox. */ - -moz-osx-font-smoothing: grayscale; - - /* Support for IE. */ - font-feature-settings: 'liga'; -} diff --git a/cypress.json b/cypress.json new file mode 100644 index 0000000..5c76f68 --- /dev/null +++ b/cypress.json @@ -0,0 +1,4 @@ +{ + "defaultCommandTimeout": 10000, + "projectId": "4jhtej" +} diff --git a/cypress/fixtures/example.json b/cypress/fixtures/example.json new file mode 100644 index 0000000..519902d --- /dev/null +++ b/cypress/fixtures/example.json @@ -0,0 +1,5 @@ +{ + "name": "Using fixtures to represent data", + "email": "hello@cypress.io", + "body": "Fixtures are a great way to mock data for responses to routes" +} diff --git a/cypress/integration/landing-page.spec.ts b/cypress/integration/landing-page.spec.ts new file mode 100644 index 0000000..14f062e --- /dev/null +++ b/cypress/integration/landing-page.spec.ts @@ -0,0 +1,19 @@ +import { App } from "../support/App"; + +describe("Landing page", () => { + let app: App; + + beforeEach(() => { + app = App.get({ user: "basic" }); + }); + + it("should have a John section", () => { + app.clickOnText("John"); + app.shouldContainText("Hello John"); + }); + + it("should have a Mary section", () => { + app.clickOnText("Mary"); + app.shouldContainText("Mary"); + }); +}); diff --git a/cypress/plugins/index.js b/cypress/plugins/index.js new file mode 100644 index 0000000..92a4dd9 --- /dev/null +++ b/cypress/plugins/index.js @@ -0,0 +1,11 @@ +// https://on.cypress.io/plugins-guide + +module.exports = (on, config) => { + // `on` is used to hook into various events Cypress emits + // `config` is the resolved Cypress config + on("task", { + logRequest(req) { + console.debug(req, config); + }, + }); +}; diff --git a/cypress/support/App.ts b/cypress/support/App.ts new file mode 100644 index 0000000..969c09a --- /dev/null +++ b/cypress/support/App.ts @@ -0,0 +1,57 @@ +import { getApiUrl } from "./commands"; + +const users = { + admin: { username: "cypress-admin", password: "Testing123$" }, + basic: { username: "cypress-basic", password: "Testing123$" }, +}; + +export class App { + /* Constructors */ + + static get(options: { user: UserKey }): App { + const app = new App(); + app.load(users[options.user]); + return app; + } + + /* Generic Helpers */ + + load(auth: { username: string; password: string }) { + cy.request({ method: "GET", url: getApiUrl("/api/me"), auth, log: true }).then(res => { + expect(res.status).to.equal(200); + }); + + cy.visit("/"); + } + + shouldContainText(text: string, options?: { clickable: boolean }) { + if (options?.clickable) { + cy.contains(text).should("have.css", "cursor", "pointer"); + } else { + cy.contains(text); + } + } + + shouldNotContainText(text: string) { + cy.findByText(text).should("not.exist"); + } + + shouldNotShowText(text: string) { + cy.findByText(text).should("not.be.visible"); + } + + clickOnText(text: string) { + cy.contains(text).click(); + } + + /* MUI helpers */ + + selectOptionSelector(options: { label: string; select: string }) { + const { label, select } = options; + this.shouldContainText(label); + this.clickOnText(label); + cy.findByRole("presentation").findByText(select).click(); + } +} + +type UserKey = keyof typeof users; diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts new file mode 100644 index 0000000..a4c9065 --- /dev/null +++ b/cypress/support/commands.ts @@ -0,0 +1,28 @@ +import "@testing-library/cypress/add-commands"; +import * as qs from "qs"; + +const appUrl: string = Cypress.env("ROOT_URL") || ""; + +const dhis2Url: string = appUrl + "/dhis2"; + +function setup() { + Cypress.config("baseUrl", appUrl); + + Cypress.Cookies.defaults({ preserve: "JSESSIONID" }); + + Cypress.on("uncaught:exception", (err, runnable) => { + console.error("uncaught:exception", { err, runnable }); + // returning false here prevents Cypress from failing the test + return false; + }); +} + +setup(); + +/* Public interface */ + +export function getApiUrl(path: string, params?: Record) { + const baseUrl = dhis2Url.replace(/\/$/, "") + "/" + path.replace(/^\//, ""); + const queryString = qs.stringify(params || {}, { arrayFormat: "repeat", addQueryPrefix: true }); + return baseUrl + queryString; +} diff --git a/cypress/support/index.js b/cypress/support/index.js new file mode 100644 index 0000000..64e1fd1 --- /dev/null +++ b/cypress/support/index.js @@ -0,0 +1,2 @@ +import "./commands"; +import "cypress-xpath"; diff --git a/cypress/support/utils.ts b/cypress/support/utils.ts new file mode 100644 index 0000000..b883885 --- /dev/null +++ b/cypress/support/utils.ts @@ -0,0 +1,35 @@ +import * as _ from "lodash"; +import { DataValue } from "./DataValue"; + +type Name = string; + +interface DataValueDef { + name: Name; + value: string; + comment?: string; +} + +export function indexDataValues( + dataValueDefs: DataValueDef[] +): Record { + const obj = _.keyBy(dataValueDefs, o => o.name); + return obj as Record>; +} + +export function getExpectedDataValues(options: { + dataValues: Record; + orgUnit: Name; + period: string | number; +}): DataValue[] { + const { dataValues, orgUnit, period } = options; + + return _(dataValues) + .values() + .map(dv => ({ + dataElement: dv.name, + period: period.toString(), + orgUnit, + value: dv.value, + })) + .value(); +} diff --git a/cypress/tsconfig.json b/cypress/tsconfig.json new file mode 100644 index 0000000..421731d --- /dev/null +++ b/cypress/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "target": "es2015", + "lib": ["dom", "dom.iterable", "es2015"], + "strict": true, + "moduleResolution": "node", + "types": ["cypress", "@testing-library/cypress"] + }, + "include": ["**/*.ts"] +} diff --git a/i18n/en.pot b/i18n/en.pot new file mode 100644 index 0000000..f2e4221 --- /dev/null +++ b/i18n/en.pot @@ -0,0 +1,348 @@ +msgid "" +msgstr "" +"Project-Id-Version: i18next-conv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" +"POT-Creation-Date: 2022-02-17T08:02:57.121Z\n" +"PO-Revision-Date: 2022-02-17T08:02:57.121Z\n" + +msgid "Enable users" +msgstr "" + +msgid "Disable users" +msgstr "" + +msgid "Remove users" +msgstr "" + +msgid "Copy to clipboard" +msgstr "" + +msgid "Close" +msgstr "" + +msgid "User {{user}} replicated successfully {{n}} times" +msgstr "" + +msgid "Replicate {{user}}" +msgstr "" + +msgid "Replicate" +msgstr "" + +msgid "Value should be between {{min}} and {{max}}" +msgstr "" + +msgid "Username. Example for two users: admin.$index -> admin.1, admin.2" +msgstr "" + +msgid "Replicate error" +msgstr "" + +msgid "Settings" +msgstr "" + +msgid "Columns to show in table" +msgstr "" + +msgid "Column" +msgstr "" + +msgid "Type" +msgstr "" + +msgid "Created" +msgstr "" + +msgid "Updated" +msgstr "" + +msgid "Deleted" +msgstr "" + +msgid "Ignored" +msgstr "" + +msgid "Total" +msgstr "" + +msgid "Identifier" +msgstr "" + +msgid "Message" +msgstr "" + +msgid "Import Results" +msgstr "" + +msgid "Ok" +msgstr "" + +msgid "Users" +msgstr "" + +msgid "Import" +msgstr "" + +msgid "Status" +msgstr "" + +msgid "Summary" +msgstr "" + +msgid "Messages" +msgstr "" + +msgid "JSON Response" +msgstr "" + +msgid "Saving users" +msgstr "" + +msgid "Update strategy: " +msgstr "" + +msgid "Merge" +msgstr "" + +msgid "Replace" +msgstr "" + +msgid "Search" +msgstr "" + +msgid "Assign roles to {{usernames}}" +msgstr "" + +msgid "Assign groups to {{usernames}}" +msgstr "" + +msgid "Back" +msgstr "" + +msgid "Help" +msgstr "" + +msgid "General info" +msgstr "" + +msgid "Assignment" +msgstr "" + +msgid "Other information" +msgstr "" + +msgid "Error saving user" +msgstr "" + +msgid "Save" +msgstr "" + +msgid "Cancel" +msgstr "" + +msgid "Please provide a valid identifier" +msgstr "" + +msgid "Please provide a valid email" +msgstr "" + +msgid "Password should contain at least one lowercase letter" +msgstr "" + +msgid "Password should contain at least one UPPERCASE letter" +msgstr "" + +msgid "Password should contain at least one number" +msgstr "" + +msgid "Password should have at least one special character" +msgstr "" + +msgid "Please provide a valid phone number" +msgstr "" + +msgid "Please provide a valid international phone number (+0123456789)" +msgstr "" + +msgid "First Name" +msgstr "" + +msgid "Name" +msgstr "" + +msgid "Password" +msgstr "" + +msgid "Account expiration date" +msgstr "" + +msgid "Surname" +msgstr "" + +msgid "Username" +msgstr "" + +msgid "Email" +msgstr "" + +msgid "Phone Number" +msgstr "" + +msgid "WhatsApp" +msgstr "" + +msgid "Facebook Messenger" +msgstr "" + +msgid "Skype" +msgstr "" + +msgid "Telegram" +msgstr "" + +msgid "Twitter" +msgstr "" + +msgid "Disabled" +msgstr "" + +msgid "External authentication only (OpenID or LDAP)" +msgstr "" + +msgid "User Roles" +msgstr "" + +msgid "User Groups" +msgstr "" + +msgid "Organisation Units" +msgstr "" + +msgid "Data View Organisation Units" +msgstr "" + +msgid "Open ID" +msgstr "" + +msgid "LDAP identifier" +msgstr "" + +msgid "Interface language" +msgstr "" + +msgid "Database language" +msgstr "" + +msgid "Api URL" +msgstr "" + +msgid "Last updated" +msgstr "" + +msgid "Last login" +msgstr "" + +msgid "ID" +msgstr "" + +msgid "API URL" +msgstr "" + +msgid "Roles" +msgstr "" + +msgid "Groups" +msgstr "" + +msgid "OU Capture" +msgstr "" + +msgid "OU Output" +msgstr "" + +msgid "Details" +msgstr "" + +msgid "Edit" +msgstr "" + +msgid "Copy in user" +msgstr "" + +msgid "Assign to organisation units" +msgstr "" + +msgid "Assign to data view organisation units" +msgstr "" + +msgid "Assign roles" +msgstr "" + +msgid "Assign groups" +msgstr "" + +msgid "Enable" +msgstr "" + +msgid "Disable" +msgstr "" + +msgid "Remove" +msgstr "" + +msgid "Replicate user from template" +msgstr "" + +msgid "Replicate user from table" +msgstr "" + +msgid "Search by name or username..." +msgstr "" + +msgid "First name" +msgstr "" + +msgid "Organisation units" +msgstr "" + +msgid "Data view organisation units" +msgstr "" + +msgid "And {{overflow}} more..." +msgstr "" + +msgid "Edit users" +msgstr "" + +msgid "Column settings" +msgstr "" + +msgid "Error saving users" +msgstr "" + +msgid "Add user" +msgstr "" + +msgid "Delete" +msgstr "" + +msgid "Edit user" +msgstr "" + +msgid "New user" +msgstr "" + +msgid "Network error" +msgstr "" + +msgid "Unable to load user {{id}}" +msgstr "" + +msgid "Open in user management" +msgstr "" + +msgid " and {{overflow}} more..." +msgstr "" diff --git a/i18n/es.po b/i18n/es.po new file mode 100644 index 0000000..938351d --- /dev/null +++ b/i18n/es.po @@ -0,0 +1,349 @@ +msgid "" +msgstr "" +"Project-Id-Version: i18next-conv\n" +"POT-Creation-Date: 2022-02-17T08:02:57.121Z\n" +"PO-Revision-Date: 2018-10-25T09:02:35.143Z\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" + +msgid "Enable users" +msgstr "" + +msgid "Disable users" +msgstr "" + +msgid "Remove users" +msgstr "Eliminar usuarios" + +msgid "Copy to clipboard" +msgstr "" + +msgid "Close" +msgstr "" + +msgid "User {{user}} replicated successfully {{n}} times" +msgstr "" + +msgid "Replicate {{user}}" +msgstr "Replicar {{user}}" + +msgid "Replicate" +msgstr "Replicar" + +msgid "Value should be between {{min}} and {{max}}" +msgstr "" + +msgid "Username. Example for two users: admin.$index -> admin.1, admin.2" +msgstr "" + +msgid "Replicate error" +msgstr "Replicar error" + +msgid "Settings" +msgstr "" + +msgid "Columns to show in table" +msgstr "" + +msgid "Column" +msgstr "" + +msgid "Type" +msgstr "" + +msgid "Created" +msgstr "" + +msgid "Updated" +msgstr "" + +msgid "Deleted" +msgstr "" + +msgid "Ignored" +msgstr "" + +msgid "Total" +msgstr "" + +msgid "Identifier" +msgstr "" + +msgid "Message" +msgstr "" + +msgid "Import Results" +msgstr "" + +msgid "Ok" +msgstr "" + +msgid "Users" +msgstr "" + +msgid "Import" +msgstr "" + +msgid "Status" +msgstr "" + +msgid "Summary" +msgstr "" + +msgid "Messages" +msgstr "" + +msgid "JSON Response" +msgstr "" + +msgid "Saving users" +msgstr "" + +msgid "Update strategy: " +msgstr "" + +msgid "Merge" +msgstr "" + +msgid "Replace" +msgstr "" + +msgid "Search" +msgstr "" + +msgid "Assign roles to {{usernames}}" +msgstr "" + +msgid "Assign groups to {{usernames}}" +msgstr "" + +msgid "Back" +msgstr "Volver" + +msgid "Help" +msgstr "Ayuda" + +msgid "General info" +msgstr "" + +msgid "Assignment" +msgstr "" + +msgid "Other information" +msgstr "" + +msgid "Error saving user" +msgstr "" + +msgid "Save" +msgstr "" + +msgid "Cancel" +msgstr "" + +msgid "Please provide a valid identifier" +msgstr "" + +msgid "Please provide a valid email" +msgstr "" + +msgid "Password should contain at least one lowercase letter" +msgstr "" + +msgid "Password should contain at least one UPPERCASE letter" +msgstr "" + +msgid "Password should contain at least one number" +msgstr "" + +msgid "Password should have at least one special character" +msgstr "" + +msgid "Please provide a valid phone number" +msgstr "" + +msgid "Please provide a valid international phone number (+0123456789)" +msgstr "" + +msgid "First Name" +msgstr "" + +msgid "Name" +msgstr "" + +msgid "Password" +msgstr "" + +msgid "Account expiration date" +msgstr "" + +msgid "Surname" +msgstr "" + +msgid "Username" +msgstr "" + +msgid "Email" +msgstr "" + +msgid "Phone Number" +msgstr "" + +msgid "WhatsApp" +msgstr "" + +msgid "Facebook Messenger" +msgstr "" + +msgid "Skype" +msgstr "" + +msgid "Telegram" +msgstr "" + +msgid "Twitter" +msgstr "" + +msgid "Disabled" +msgstr "" + +msgid "External authentication only (OpenID or LDAP)" +msgstr "" + +msgid "User Roles" +msgstr "" + +msgid "User Groups" +msgstr "" + +msgid "Organisation Units" +msgstr "" + +msgid "Data View Organisation Units" +msgstr "" + +msgid "Open ID" +msgstr "" + +msgid "LDAP identifier" +msgstr "" + +msgid "Interface language" +msgstr "" + +msgid "Database language" +msgstr "" + +msgid "Api URL" +msgstr "" + +msgid "Last updated" +msgstr "" + +msgid "Last login" +msgstr "" + +msgid "ID" +msgstr "" + +msgid "API URL" +msgstr "" + +msgid "Roles" +msgstr "" + +msgid "Groups" +msgstr "" + +msgid "OU Capture" +msgstr "" + +msgid "OU Output" +msgstr "" + +msgid "Details" +msgstr "Detalles" + +msgid "Edit" +msgstr "" + +msgid "Copy in user" +msgstr "" + +msgid "Assign to organisation units" +msgstr "" + +msgid "Assign to data view organisation units" +msgstr "" + +msgid "Assign roles" +msgstr "" + +msgid "Assign groups" +msgstr "" + +msgid "Enable" +msgstr "" + +msgid "Disable" +msgstr "" + +msgid "Remove" +msgstr "" + +msgid "Replicate user from template" +msgstr "" + +msgid "Replicate user from table" +msgstr "" + +msgid "Search by name or username..." +msgstr "" + +msgid "First name" +msgstr "" + +msgid "Organisation units" +msgstr "" + +msgid "Data view organisation units" +msgstr "" + +msgid "And {{overflow}} more..." +msgstr "" + +msgid "Edit users" +msgstr "" + +msgid "Column settings" +msgstr "" + +msgid "Error saving users" +msgstr "" + +msgid "Add user" +msgstr "" + +msgid "Delete" +msgstr "" + +msgid "Edit user" +msgstr "" + +#, fuzzy +msgid "New user" +msgstr "Eliminar usuarios" + +msgid "Network error" +msgstr "" + +msgid "Unable to load user {{id}}" +msgstr "" + +msgid "Open in user management" +msgstr "" + +msgid " and {{overflow}} more..." +msgstr "" diff --git a/includes/feedback-tool/feedback-dhis2.js b/includes/feedback-tool/feedback-dhis2.js deleted file mode 100644 index b6f709e..0000000 --- a/includes/feedback-tool/feedback-dhis2.js +++ /dev/null @@ -1,135 +0,0 @@ -"use strict"; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -(function e(t, n, r) { - function s(o, u) { - if (!n[o]) { - if (!t[o]) { - var a = typeof require == "function" && require;if (!u && a) return a(o, !0);if (i) return i(o, !0);throw new Error("Cannot find module '" + o + "'"); - }var f = n[o] = { exports: {} };t[o][0].call(f.exports, function (e) { - var n = t[o][1][e];return s(n ? n : e); - }, f, f.exports, e, t, n, r); - }return n[o].exports; - }var i = typeof require == "function" && require;for (var o = 0; o < r.length; o++) { - s(r[o]); - }return s; -})({ 1: [function (require, module, exports) { - /* - Dhis2+Github module for https://github.com/eisnerd/feedback-tool - - Requires FeedBackToolGithub - */ - - var groupBy = function groupBy(xs, fn) { - return xs.reduce(function (rv, x) { - (rv[fn(x)] = rv[fn(x)] || []).push(x); - return rv; - }, {}); - }; - - var FeedBackToolDhis2 = function () { - function FeedBackToolDhis2(d2, appKey, options) { - _classCallCheck(this, FeedBackToolDhis2); - - this.d2 = d2; - this.appKey = appKey; - this.options = options; - } - - _createClass(FeedBackToolDhis2, [{ - key: "init", - value: function init() { - var _this = this; - - var locale = this.d2.currentUser.userSettings.settings.keyUiLocale || "en"; - var throwError = function throwError(msg) { - throw new Error(msg); - }; - var init = function init(i18nProperties) { - $.feedbackGithub(Object.assign({}, _this.options, { - postFunction: _this.sendFeedbackToUserGroups.bind(_this), - feedbackOptions: { i18nProperties: i18nProperties }, - username: _this.d2.currentUser.username - })); - }; - - fetch("includes/feedback-tool/i18n/" + locale + ".properties", { credentials: 'same-origin' }).then(function (res) { - return res.status.toString().match(/^2..$/) ? res : throwError("Cannot find locale"); - }).then(function (res) { - return res.text(); - }).then(init).catch(function () { - return init(); - }); - } - }, { - key: "sendFeedbackToUserGroups", - value: function sendFeedbackToUserGroups(payload) { - var _this2 = this; - - var userGroupNames = this.options.sendToDhis2UserGroups; - if (userGroupNames.length === 0) return Promise.resolve(); - - var title = payload.title, - body = payload.body; - - var currentApp = this.d2.system.installedApps.find(function (app) { - return app.key === _this2.appKey; - }); - var fullTitle = currentApp ? "[" + currentApp.name + "] " + title : title; - var fullBody = payload.issueURL ? body + "\n\n---\n" + payload.issueURL : body; - - return this.getUserGroups(userGroupNames).then(function (userGroups) { - return _this2.sendMessage(fullTitle, fullBody, userGroups.toArray()); - }).catch(function (err) { - alert("Cannot send dhis2 message"); - }); - } - }, { - key: "getUserGroups", - value: function getUserGroups(names) { - return this.d2.models.userGroups.list({ - filter: "name:in:[" + names.join(",") + "]", - paging: false - }); - } - }, { - key: "sendMessage", - value: function sendMessage(subject, text, recipients) { - var api = this.d2.Api.getApi(); - var recipientsByModel = groupBy(recipients, function (recipient) { - return recipient.modelDefinition.name; - }); - var ids = function ids(objs) { - return objs && objs.map(function (obj) { - return { id: obj.id }; - }); - }; - - var message = { - subject: subject, - text: text, - users: ids(recipientsByModel.user), - userGroups: ids(recipientsByModel.userGroup), - organisationUnits: ids(recipientsByModel.organisationUnit) - }; - - if (recipients.length == 0) { - return Promise.resolve(); - } else { - return api.post("/messageConversations", message); - } - } - }]); - - return FeedBackToolDhis2; - }(); - - $.feedbackDhis2 = function (d2, appKey, options) { - var feedBackToolDhis2 = new FeedBackToolDhis2(d2, appKey, options); - feedBackToolDhis2.init(); - return feedBackToolDhis2; - }; - }, {}] }, {}, [1]); \ No newline at end of file diff --git a/includes/feedback-tool/feedback-github.js b/includes/feedback-tool/feedback-github.js deleted file mode 100644 index 65a0781..0000000 --- a/includes/feedback-tool/feedback-github.js +++ /dev/null @@ -1,161 +0,0 @@ -"use strict"; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -(function e(t, n, r) { - function s(o, u) { - if (!n[o]) { - if (!t[o]) { - var a = typeof require == "function" && require;if (!u && a) return a(o, !0);if (i) return i(o, !0);throw new Error("Cannot find module '" + o + "'"); - }var f = n[o] = { exports: {} };t[o][0].call(f.exports, function (e) { - var n = t[o][1][e];return s(n ? n : e); - }, f, f.exports, e, t, n, r); - }return n[o].exports; - }var i = typeof require == "function" && require;for (var o = 0; o < r.length; o++) { - s(r[o]); - }return s; -})({ 1: [function (require, module, exports) { - /* - Github module for https://github.com/eisnerd/feedback-tool - - You need a personal token that will be used both as a reporter user and to upload screenshot - images. Steps: - - - Create a specific github user. - - Create a project (i.e.) snapshots to store images. - - Create a personal token: - - User -> Settings -> Developer Settings -> Personal access tokens -> Generate new token - - Description: Upload screenshots for feedback.js - - Select scopes: repo -> public_repo. - - Generate token. - - This token should be kept secret, outside of any public repository. If that's too much of a - hassle, it should be encoded somehow in the source. That's not secure (anyone could take - it and upload files to our snapshot repo), but at least you won't get it automatically - revoked by github. - - Usage: - - $.feedbackGithub({ - token: "PERSONAL_TOKEN" | ["PERSONAL_", "TOKEN"], - createIssue: true, - postFunction: ({title, body}) => { }, - username: "USERNAME", - issues: { - repository: "ORG/PROJECT_WHERE_ISSUES_WILL_BE_CREATED", - title: "[User feedback] {title}", - body: "## Some report\n{body}", - }, - snapshots: { - repository: "ORG2/PROJECT_WHERE_SNAPSHOTS_WILL_BE_UPLOADED_TO", - branch: "master", - }, - feedbackOptions: {}, - }); - */ - - function interpolate(template, namespace) { - return template.replace(/{([^{}]*)}/g, function (a, b) { - var r = namespace[b]; - return typeof r === 'string' || typeof r === 'number' ? r : a; - }); - }; - - var FeedBackToolGithub = function () { - function FeedBackToolGithub(options) { - _classCallCheck(this, FeedBackToolGithub); - - this.options = options; - this.token = typeof options.token === "string" ? options.token : options.token.join(""); - } - - _createClass(FeedBackToolGithub, [{ - key: "init", - value: function init() { - $.feedback(Object.assign({}, { - postFunction: this._sendReport.bind(this) - }, this.options.feedbackOptions || {})); - } - }, { - key: "_setAuthHeader", - value: function _setAuthHeader(xhr) { - xhr.setRequestHeader("Authorization", "token " + this.token); - } - }, { - key: "_sendReport", - value: function _sendReport(data) { - var _this = this; - - // data.post.img = "data:image/png;base64,iVBORw0KG..." - var imgBase64 = data.post.img.split(",")[1]; - var uid = new Date().getTime() + parseInt(Math.random() * 1e6).toString(); - var postFunction = this.options.postFunction || function () {}; - - return this._uploadFile("screenshot-" + uid + ".png", imgBase64).then(function (url) { - return _this._getPayload(data, url); - }).then(function (payload) { - if (_this.options.createIssue) { - _this._postIssue(payload).then(postFunction); - } else { - postFunction(payload); - } - }).then(data.success, data.error); - } - }, { - key: "_uploadFile", - value: function _uploadFile(filename, contents) { - var payload = { - "message": "feedback.js snapshot", - "branch": this.options.snapshots.branch, - "content": contents - }; - - return $.ajax({ - url: 'https://api.github.com/repos/' + this.options.snapshots.repository + '/contents/' + filename, - type: "PUT", - beforeSend: this._setAuthHeader.bind(this), - dataType: 'json', - data: JSON.stringify(payload) - }).then(function (res) { - return res.content.download_url; - }); - } - }, { - key: "_getPayload", - value: function _getPayload(data, screenshotUrl) { - var info = data.post; - var browser = info.browser; - var body = ["## Browser", "- Name: " + browser.appCodeName, "- Version: " + browser.appVersion, "- Platform: " + browser.platform, "", "## User report", "URL: " + info.url, "", info.note, "", "![See screenshot here]( " + screenshotUrl + " )"].join("\n"); - var bodyNamespace = { body: body, username: this.options.username }; - - return { - "title": interpolate(this.options.issues.title, { title: info.title }), - "body": this.options.issues.body ? interpolate(this.options.issues.body, bodyNamespace) : body - }; - } - }, { - key: "_postIssue", - value: function _postIssue(payload) { - return $.ajax({ - type: "POST", - url: 'https://api.github.com/repos/' + this.options.issues.repository + '/issues', - beforeSend: this._setAuthHeader.bind(this), - dataType: 'json', - data: JSON.stringify(payload) - }).then(function (res) { - return Object.assign(payload, { issueURL: res.html_url }); - }); - } - }]); - - return FeedBackToolGithub; - }(); - - $.feedbackGithub = function (options) { - var feedBackToolGithub = new FeedBackToolGithub(options); - feedBackToolGithub.init(); - return feedBackToolGithub; - }; - }, {}] }, {}, [1]); \ No newline at end of file diff --git a/includes/feedback-tool/feedback.css b/includes/feedback-tool/feedback.css deleted file mode 100644 index a6fb972..0000000 --- a/includes/feedback-tool/feedback.css +++ /dev/null @@ -1,369 +0,0 @@ -.feedback-btn { - font-size: 14px; - position: fixed; - bottom: -3px; - right: 200px; - width: auto; -} -#feedback-module p { - font-size: 13px; - margin-bottom: 25px; -} -#feedback-note-tmp { - width: 444px; - height: auto; - min-height: 90px; - outline: none; - font-family: Roboto, sans-serif; - padding: 4px; -} -#feedback-note-tmp:focus, -#feedback-note:focus { - border: 1px solid #64b7cc; -} -#feedback-canvas { - position: absolute; - top: 0; - left: 0; -} -#feedback-welcome { - top: 30%; - left: 50%; - margin-left: -270px; - display: block; - position: fixed; -} -.feedback-logo { - width: 34px; - margin-bottom: 16px; - font-size: 22px; - font-weight: bold; - line-height: 32px; - height: 32px; -} -.feedback-next-btn { - width: 72px; - height: 29px; - line-height: 27px; - float: right; - font-size: 13px; - padding: 0 8px; -} -.feedback-back-btn { - width: 72px; - height: 29px; - line-height: 27px; - float: right; - font-size: 13px; - padding: 0 8px; - margin-right: 20px; -} -.feedback-submit-btn { - width: 72px; - height: 29px; - line-height: 27px; - float: right; - font-size: 13px; - padding: 0 8px; -} -.feedback-close-btn { - width: 72px; - height: 29px; - line-height: 27px; - float: right; - font-size: 13px; - padding: 0 8px; -} -.feedback-helper { - background: rgba(0, 0, 0, 0); - cursor: default; -} -.feedback-helper[data-type="highlight"] > .feedback-helper-inner { - background: rgba(0, 68, 255, 0.1); -} -#feedback-close { - cursor: pointer; - position: absolute; - background: url(icons.png) 0px -64px; - width: 30px; - height: 30px; -} -.feedback-wizard-close { - cursor: pointer; - position: absolute; - top: 2px; - right: 2px; - background: url(icons.png) 0px -34px; - width: 30px; - height: 30px; - -webkit-opacity: 0.65; - -moz-opacity: 0.65; - opacity: 0.65; -} -.feedback-wizard-close:hover { - opacity: 1; -} -#feedback-welcome-error, -#feedback-overview-error { - display: none; - color: #f13e3e; - float: right; - margin-right: 30px; - font-size: 13px; - line-height: 29px; -} -#feedback-overview-error { - margin-top: 20px; -} -#feedback-highlighter { - display: none; - bottom: 100px; - right: 100px; - position: fixed; - width: 540px; - height: 275px; -} -#feedback-overview { - display: none; - top: 10%; - left: 50%; - margin-left: -420px; - position: fixed; - width: 840px!important; - height: auto; -} -#feedback-submit-error, -#feedback-submit-success { - top: 30%; - left: 50%; - margin-left: -300px; - display: block; - position: fixed; - width: 600px; - height: auto; -} -.feedback-btn { - padding: 10px; - outline: 0; - background-clip: padding-box; - -webkit-box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); - box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); - z-index: 40000; -} -.feedback-btn-gray { - text-align: center; - cursor: pointer; - font-family: Roboto, sans-serif; - border: 1px solid #dcdcdc; - border: 1px solid rgba(0, 0, 0, 0.1); - color: white; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - -moz-background-clip: padding; - -webkit-background-clip: padding-box; - background-clip: padding-box; - background-color: #ff9800; - font-weight: 600; - letter-spacing: 0.5px; -} -.feedback-btn-gray:hover { - border: 2px solid #ff9800; -} -.feedback-btn-blue { - text-align: center; - cursor: pointer; - font-family: Roboto, sans-serif; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - -moz-background-clip: padding; - -webkit-background-clip: padding-box; - background-clip: padding-box; - background-color: #357ae8; - background-color: #4d90fe; - background: -webkit-gradient(linear, left top, left bottom, from(#4d90fe), to(#357ae8)); - background: -webkit-linear-gradient(top, #4d90fe, #357ae8); - background: -moz-linear-gradient(top, #4d90fe, #357ae8); - background: -ms-linear-gradient(top, #4d90fe, #357ae8); - background: -o-linear-gradient(top, #4d90fe, #357ae8); - border: 1px solid #2f5bb7; - color: #fff; -} -#feedback-note-tmp, -#feedback-note { - resize: none; -} -#feedback-welcome, -#feedback-highlighter, -#feedback-overview, -#feedback-submit-success, -#feedback-submit-error { - font-family: Roboto, sans-serif; - z-index: 40000; - padding: 30px 42px; - width: 540px; - border: 1px solid rgba(0, 0, 0, 0.333); - outline: 0; - -webkit-box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); - box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); - background: #fff; - background-clip: padding-box; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - -webkit-transform: translateZ(); - -moz-transform: translateZ(); - -ms-transform: translateZ(); - -o-transform: translateZ(); -} -.feedback-sethighlight, -.feedback-setblackout { - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - background-color: #f5f5f5; - background: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#f1f1f1)); - background: -webkit-linear-gradient(top, #f5f5f5, #f1f1f1); - background: -moz-linear-gradient(top, #f5f5f5, #f1f1f1); - background: -ms-linear-gradient(top, #f5f5f5, #f1f1f1); - background: -o-linear-gradient(top, #f5f5f5, #f1f1f1); - color: #444; - border: 1px solid #dcdcdc; - border: 1px solid rgba(0, 0, 0, 0.1); - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - -moz-background-clip: padding; - -webkit-background-clip: padding-box; - background-clip: padding-box; - cursor: default; - font-size: 11px; - font-weight: bold; - text-align: center; - white-space: nowrap; - margin-right: 16px; - height: 30px; - line-height: 28px; - min-width: 90px; - outline: 0; - padding: 0 8px; - display: inline-block; - float: left; -} -.feedback-setblackout { - margin-top: 10px; - clear: both; -} -.feedback-sethighlight div { - background: url(icons.png) 0px -94px; - width: 16px; - height: 16px; - margin-top: 7px; - float: left; -} -.feedback-setblackout div { - background: url(icons.png) -16px -94px; - width: 16px; - height: 16px; - margin-top: 7px; - float: left; -} -.feedback-sethighlight:hover, -.feedback-setblackout:hover { - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - background-color: #f8f8f8; - background: -webkit-gradient(linear, left top, left bottom, from(#f8f8f8), to(#f1f1f1)); - background: -webkit-linear-gradient(top, #f8f8f8, #f1f1f1); - background: -moz-linear-gradient(top, #f8f8f8, #f1f1f1); - background: -ms-linear-gradient(top, #f8f8f8, #f1f1f1); - background: -o-linear-gradient(top, #f8f8f8, #f1f1f1); - border: 1px solid #c6c6c6; - color: #333; -} -.feedback-active { - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); - background-color: #eee; - background: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#e0e0e0)); - background: -webkit-linear-gradient(top, #eee, #e0e0e0); - background: -moz-linear-gradient(top, #eee, #e0e0e0); - background: -ms-linear-gradient(top, #eee, #e0e0e0); - background: -o-linear-gradient(top, #eee, #e0e0e0); - border: 1px solid #ccc; - color: #333; -} -#feedback-highlighter label { - float: left; - margin: 0 0 0 10px; - line-height: 30px; - font-size: 13px; - font-weight: normal; -} -#feedback-highlighter label.lower { - margin-top: 10px; -} -.feedback-buttons { - float: right; - margin-top: 20px; - clear: both; -} -#feedback-module h3 { - font-weight: bold; - font-size: 15px; - margin: 8px 0; -} -#feedback-title { - width: 314px; - padding: 0px 10px; - height: 20px; -} -.feedback-additional { - margin-bottom: 20px !important; -} -#feedback-overview-description { - float: left; -} -#feedback-note { - width: 314px; - padding: 10px; - height: 150px; - outline: none; - font-family: Roboto, sans-serif; - line-height: 20px; -} -#feedback-overview-screenshot { - float: right; -} -.feedback-screenshot { - max-width: 396px; - padding: 1px; - border: 1px solid #adadad; -} -#feedback-overview-description-text span { - font-size: 14px; - margin: 8px 0; - color: #666; - padding-left: 10px; - background: url(icons.png) -30px -34px no-repeat; - margin-left: 26px; -} -#feedback-browser-info, -#feedback-page-info, -#feedback-page-structure, -#feedback-additional-none { - margin-top: 16px; - display: none; -} -.feedback-spinner { - position: relative; - z-index: 10000000; - background: url(spinner.gif); - width: 32px; - height: 32px; -} diff --git a/includes/feedback-tool/feedback.js b/includes/feedback-tool/feedback.js deleted file mode 100644 index 7adfb6b..0000000 --- a/includes/feedback-tool/feedback.js +++ /dev/null @@ -1,4427 +0,0 @@ -"use strict"; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -(function e(t, n, r) { - function s(o, u) { - if (!n[o]) { - if (!t[o]) { - var a = typeof require == "function" && require;if (!u && a) return a(o, !0);if (i) return i(o, !0);throw new Error("Cannot find module '" + o + "'"); - }var f = n[o] = { exports: {} };t[o][0].call(f.exports, function (e) { - var n = t[o][1][e];return s(n ? n : e); - }, f, f.exports, e, t, n, r); - }return n[o].exports; - }var i = typeof require == "function" && require;for (var o = 0; o < r.length; o++) { - s(r[o]); - }return s; -})({ 1: [function (require, module, exports) { - module.exports = "# Global\nsend_feedback=Send Feedback\ntitle=Feedback\nsubmit=Submit\nok=OK\nnext=Next\nback=Back\ndescription=Description\nscreenshot=Screenshot\n\n# highlighter template\nhighlighter_click_and_drag_on_page=Click and drag on the page to help us better understand your feedback. You can move this dialog if it's in the way\nhighlighter_highlight=Highlight\nhighlighter_identify_areas=Highlight areas relevant to your feedback\nhighlighter_blackout=Black out\nhighlighter_blackout_information=Black out any personal information\n\n# overview template\noverview_title=Title\noverview_additional=Additional info\noverview_additional_none=None\noverview_additional_browser=Browser Info\noverview_additional_page_info=Page Info\noverview_additional_page_structure=Page Structure\noverview_enter_fields=Please enter a title and description\n\n# submitError template\nsubmit_error_message=Sadly an error occured while sending your feedback. Please try again\n\n# submitSuccess template\nsubmit_success_message=Thank you for your feedback\n"; - }, {}], 2: [function (require, module, exports) { - (function (global) { - /* - html2canvas 0.5.0-beta4 - Copyright (c) 2016 Niklas von Hertzen - - Released under License - */ - - (function (f) { - if ((typeof exports === "undefined" ? "undefined" : _typeof(exports)) === "object" && typeof module !== "undefined") { - module.exports = f(); - } else if (typeof define === "function" && define.amd) { - define([], f); - } else { - var g;if (typeof window !== "undefined") { - g = window; - } else if (typeof global !== "undefined") { - g = global; - } else if (typeof self !== "undefined") { - g = self; - } else { - g = this; - }g.html2canvas = f(); - } - })(function () { - var define, module, exports;return function e(t, n, r) { - function s(o, u) { - if (!n[o]) { - if (!t[o]) { - var a = typeof require == "function" && require;if (!u && a) return a(o, !0);if (i) return i(o, !0);var f = new Error("Cannot find module '" + o + "'");throw f.code = "MODULE_NOT_FOUND", f; - }var l = n[o] = { exports: {} };t[o][0].call(l.exports, function (e) { - var n = t[o][1][e];return s(n ? n : e); - }, l, l.exports, e, t, n, r); - }return n[o].exports; - }var i = typeof require == "function" && require;for (var o = 0; o < r.length; o++) { - s(r[o]); - }return s; - }({ 1: [function (_dereq_, module, exports) { - (function (global) { - /*! https://mths.be/punycode v1.4.0 by @mathias */ - ;(function (root) { - - /** Detect free variables */ - var freeExports = (typeof exports === "undefined" ? "undefined" : _typeof(exports)) == 'object' && exports && !exports.nodeType && exports; - var freeModule = (typeof module === "undefined" ? "undefined" : _typeof(module)) == 'object' && module && !module.nodeType && module; - var freeGlobal = (typeof global === "undefined" ? "undefined" : _typeof(global)) == 'object' && global; - if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal) { - root = freeGlobal; - } - - /** - * The `punycode` object. - * @name punycode - * @type Object - */ - var punycode, - - - /** Highest positive signed 32-bit float value */ - maxInt = 2147483647, - // aka. 0x7FFFFFFF or 2^31-1 - - /** Bootstring parameters */ - base = 36, - tMin = 1, - tMax = 26, - skew = 38, - damp = 700, - initialBias = 72, - initialN = 128, - // 0x80 - delimiter = '-', - // '\x2D' - - /** Regular expressions */ - regexPunycode = /^xn--/, - regexNonASCII = /[^\x20-\x7E]/, - // unprintable ASCII chars + non-ASCII chars - regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, - // RFC 3490 separators - - /** Error messages */ - errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' - }, - - - /** Convenience shortcuts */ - baseMinusTMin = base - tMin, - floor = Math.floor, - stringFromCharCode = String.fromCharCode, - - - /** Temporary variable */ - key; - - /*--------------------------------------------------------------------------*/ - - /** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ - function error(type) { - throw new RangeError(errors[type]); - } - - /** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ - function map(array, fn) { - var length = array.length; - var result = []; - while (length--) { - result[length] = fn(array[length]); - } - return result; - } - - /** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {Array} A new string of characters returned by the callback - * function. - */ - function mapDomain(string, fn) { - var parts = string.split('@'); - var result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - string = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - string = string.replace(regexSeparators, '\x2E'); - var labels = string.split('.'); - var encoded = map(labels, fn).join('.'); - return result + encoded; - } - - /** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ - function ucs2decode(string) { - var output = [], - counter = 0, - length = string.length, - value, - extra; - while (counter < length) { - value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // high surrogate, and there is a next character - extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { - // low surrogate - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // unmatched surrogate; only append this code unit, in case the next - // code unit is the high surrogate of a surrogate pair - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; - } - - /** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ - function ucs2encode(array) { - return map(array, function (value) { - var output = ''; - if (value > 0xFFFF) { - value -= 0x10000; - output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); - value = 0xDC00 | value & 0x3FF; - } - output += stringFromCharCode(value); - return output; - }).join(''); - } - - /** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ - function basicToDigit(codePoint) { - if (codePoint - 48 < 10) { - return codePoint - 22; - } - if (codePoint - 65 < 26) { - return codePoint - 65; - } - if (codePoint - 97 < 26) { - return codePoint - 97; - } - return base; - } - - /** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ - function digitToBasic(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); - } - - /** - * Bias adaptation function as per section 3.4 of RFC 3492. - * https://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ - function adapt(delta, numPoints, firstTime) { - var k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); - } - - /** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ - function decode(input) { - // Don't use UCS-2 - var output = [], - inputLength = input.length, - out, - i = 0, - n = initialN, - bias = initialBias, - basic, - j, - index, - oldi, - w, - k, - digit, - t, - - /** Cached calculation results */ - baseMinusT; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - - for (j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for (index = basic > 0 ? basic + 1 : 0; index < inputLength;) /* no final expression */{ - - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - for (oldi = i, w = 1, k = base;; /* no condition */k += base) { - - if (index >= inputLength) { - error('invalid-input'); - } - - digit = basicToDigit(input.charCodeAt(index++)); - - if (digit >= base || digit > floor((maxInt - i) / w)) { - error('overflow'); - } - - i += digit * w; - t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - - if (digit < t) { - break; - } - - baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error('overflow'); - } - - w *= baseMinusT; - } - - out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error('overflow'); - } - - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output - output.splice(i++, 0, n); - } - - return ucs2encode(output); - } - - /** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ - function encode(input) { - var n, - delta, - handledCPCount, - basicLength, - bias, - j, - m, - q, - k, - t, - currentValue, - output = [], - - /** `inputLength` will hold the number of code points in `input`. */ - inputLength, - - /** Cached calculation results */ - handledCPCountPlusOne, - baseMinusT, - qMinusT; - - // Convert the input in UCS-2 to Unicode - input = ucs2decode(input); - - // Cache the length - inputLength = input.length; - - // Initialize the state - n = initialN; - delta = 0; - bias = initialBias; - - // Handle the basic code points - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue < 0x80) { - output.push(stringFromCharCode(currentValue)); - } - } - - handledCPCount = basicLength = output.length; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string - if it is not empty - with a delimiter - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - for (m = maxInt, j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's state to , - // but guard against overflow - handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - - if (currentValue < n && ++delta > maxInt) { - error('overflow'); - } - - if (currentValue == n) { - // Represent delta as a generalized variable-length integer - for (q = delta, k = base;; /* no condition */k += base) { - t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - if (q < t) { - break; - } - qMinusT = q - t; - baseMinusT = base - t; - output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); - delta = 0; - ++handledCPCount; - } - } - - ++delta; - ++n; - } - return output.join(''); - } - - /** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, i.e. - * it doesn't matter if you call it on a string that has already been - * converted to Unicode. - * @memberOf punycode - * @param {String} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ - function toUnicode(input) { - return mapDomain(input, function (string) { - return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; - }); - } - - /** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ - function toASCII(input) { - return mapDomain(input, function (string) { - return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; - }); - } - - /*--------------------------------------------------------------------------*/ - - /** Define the public API */ - punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '1.3.2', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode - }; - - /** Expose `punycode` */ - // Some AMD build optimizers, like r.js, check for specific condition patterns - // like the following: - if (typeof define == 'function' && _typeof(define.amd) == 'object' && define.amd) { - define('punycode', function () { - return punycode; - }); - } else if (freeExports && freeModule) { - if (module.exports == freeExports) { - // in Node.js, io.js, or RingoJS v0.8.0+ - freeModule.exports = punycode; - } else { - // in Narwhal or RingoJS v0.7.0- - for (key in punycode) { - punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); - } - } - } else { - // in Rhino or a web browser - root.punycode = punycode; - } - })(this); - }).call(this, typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}); - }, {}], 2: [function (_dereq_, module, exports) { - var log = _dereq_('./log'); - - function restoreOwnerScroll(ownerDocument, x, y) { - if (ownerDocument.defaultView && (x !== ownerDocument.defaultView.pageXOffset || y !== ownerDocument.defaultView.pageYOffset)) { - ownerDocument.defaultView.scrollTo(x, y); - } - } - - function cloneCanvasContents(canvas, clonedCanvas) { - try { - if (clonedCanvas) { - clonedCanvas.width = canvas.width; - clonedCanvas.height = canvas.height; - clonedCanvas.getContext("2d").putImageData(canvas.getContext("2d").getImageData(0, 0, canvas.width, canvas.height), 0, 0); - } - } catch (e) { - log("Unable to copy canvas content from", canvas, e); - } - } - - function cloneNode(node, javascriptEnabled) { - var clone = node.nodeType === 3 ? document.createTextNode(node.nodeValue) : node.cloneNode(false); - - var child = node.firstChild; - while (child) { - if (javascriptEnabled === true || child.nodeType !== 1 || child.nodeName !== 'SCRIPT') { - clone.appendChild(cloneNode(child, javascriptEnabled)); - } - child = child.nextSibling; - } - - if (node.nodeType === 1) { - clone._scrollTop = node.scrollTop; - clone._scrollLeft = node.scrollLeft; - if (node.nodeName === "CANVAS") { - cloneCanvasContents(node, clone); - } else if (node.nodeName === "TEXTAREA" || node.nodeName === "SELECT") { - clone.value = node.value; - } - } - - return clone; - } - - function initNode(node) { - if (node.nodeType === 1) { - node.scrollTop = node._scrollTop; - node.scrollLeft = node._scrollLeft; - - var child = node.firstChild; - while (child) { - initNode(child); - child = child.nextSibling; - } - } - } - - module.exports = function (ownerDocument, containerDocument, width, height, options, x, y) { - var documentElement = cloneNode(ownerDocument.documentElement, options.javascriptEnabled); - var container = containerDocument.createElement("iframe"); - - container.className = "html2canvas-container"; - container.style.visibility = "hidden"; - container.style.position = "fixed"; - container.style.left = "-10000px"; - container.style.top = "0px"; - container.style.border = "0"; - container.width = width; - container.height = height; - container.scrolling = "no"; // ios won't scroll without it - containerDocument.body.appendChild(container); - - return new Promise(function (resolve) { - var documentClone = container.contentWindow.document; - - /* Chrome doesn't detect relative background-images assigned in inline - - <%= htmlWebpackPlugin.options.vendorScripts %> - - -
- - - - - - - - - diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..9888899 --- /dev/null +++ b/jest.config.js @@ -0,0 +1,23 @@ +module.exports = { + collectCoverageFrom: ["src/**/*.js"], + testPathIgnorePatterns: ["/node_modules/", "/cypress"], + transformIgnorePatterns: ["/node_modules/(?!@eyeseetea/d2-ui-components)"], + modulePaths: ["src"], + moduleDirectories: ["node_modules"], + moduleNameMapper: { + "\\.(css|scss)$": "/config/styleMock.js", + "\\.(jpg|jpeg|png|svg)$": "/config/fileMock.js", + }, + transform: { + "^.+\\.[t|j]sx?$": "babel-jest", + }, + testRegex: "((\\.|/)(test|spec))\\.(jsx?|tsx?)$", + moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"], + testEnvironment: "jsdom", + globals: { + window: true, + document: true, + navigator: true, + Element: true, + }, +}; diff --git a/package.json b/package.json index d78f5b1..2889e94 100644 --- a/package.json +++ b/package.json @@ -1,129 +1,132 @@ { - "name": "d2-user-extended-app", - "version": "0.7.1", - "description": "DHIS2 Extended User app", - "main": "src/index.html", - "license": "GPL-3.0", - "author": { - "name": "EyeSeeTea Team", - "email": "hello@eyeseetea.com", - "url": "https://github.com/EyeSeeTea/user-extended-app" - }, - "scripts": { - "prestart": "d2-manifest package.json manifest.webapp", - "start": "webpack-dev-server", - "test": "karma start test/config/karma.config.js --single-run true", - "test-watch": "karma start test/config/karma.config.js", - "lint": "eslint src && eslint --env node,mocha --global expect,sinon --rule 'no-unused-expressions: 0' test && scss-lint", - "__prebuild": "npm test && npm run lint", - "build": "rm -rf build && webpack && npm run manifest", - "postbuild": "cp -rv app-config.json src/i18n css includes icon.png app-favicon.ico node_modules/babel-polyfill/dist/polyfill.min.js node_modules/jquery/dist/jquery.min.js ./build/", - "build-webapp": "yarn build && rm -f User-Extended-App.zip && cd build && zip -r ../User-Extended-App.zip *", - "prettify": "prettier \"{src,scss}/**/*.{js,jsx,ts,tsx,json,css,scss}\" --write", - "validate": "npm ls", - "manifest": "d2-manifest package.json build/manifest.webapp", - "clean-i18n": "resources/scripts/clean-i18n-translations.js src/i18n/" - }, - "devDependencies": { - "babel-cli": "^6.26.0", - "babel-core": "^6.8.0", - "babel-eslint": "^6.0.4", - "babel-loader": "^6.2.4", - "babel-preset-es2015": "^6.6.0", - "babel-preset-react": "^6.5.0", - "babel-preset-stage-0": "^6.5.0", - "chai": "3.0.0", - "classnames": "^2.2.3", - "coveralls": "2.11.4", - "css-loader": "^0.23.1", - "d2": "27.0.0-8", - "d2-manifest": "^1.0.0-2", - "d2-ui": "github:EyeSeeTea/d2-ui#user-extended-app", - "d2-utilizr": "0.2.9", - "d3-color": "1.0.2", - "eslint": "^3.6.0", - "eslint-config-dhis2": "^2.0.2", - "eslint-plugin-react": "^6.3.0", - "fbjs": "^0.2.1", - "html-webpack-plugin": "^3.2.0", - "http-proxy": "git+https://github.com/nicolayr/node-http-proxy.git", - "istanbul": "0.3.18", - "jquery": "^3.3.1", - "karma": "0.13.9", - "karma-babel-preprocessor": "5.2.1", - "karma-chai": "0.1.0", - "karma-coverage": "0.5.0", - "karma-mocha": "0.2.0", - "karma-mocha-reporter": "1.1.1", - "karma-sinon": "1.0.4", - "karma-sinon-chai": "1.0.0", - "karma-sourcemap-loader": "0.3.5", - "karma-webpack": "1.7.0", - "lodash.isequal": "^4.5.0", - "lodash.isfinite": "^3.3.1", - "lodash.isnumber": "^3.0.3", - "loglevel": "^1.4.0", - "material-ui": "^0.17", - "mocha": "2.2.5", - "moment": "^2.19.1", - "node-sass": "^3.7.0", - "phantomjs-polyfill": "0.0.1", - "precommit-hook": "3.0.0", - "prettier": "^1.18.2", - "react": "15.4.2", - "react-dnd": "^2.1.4", - "react-dnd-html5-backend": "^2.1.2", - "react-dom": "15.4.2", - "react-moment": "^0.6.5", - "react-router": "^2.5.2", - "react-style-proptype": "^3.2.1", - "react-tap-event-plugin": "^2.0.1", - "rx": "^4.1.0", - "rxjs": "^5.2.0", - "sass-loader": "^3.2.0", - "sinon": "^1.17.4", - "sinon-chai": "2.8.0", - "style-loader": "^0.13.1", - "unescape-js": "^1.1.0", - "webpack": "^1.13.0", - "webpack-dev-server": "^1.14.1", - "webpack-visualizer-plugin": "^0.1.5" - }, - "dependencies": { - "babel-polyfill": "^6.8.0", - "file-dialog": "^0.0.7", - "file-saver": "^1.3.8", - "immutability-helper": "^2.6.4", - "immutable": "^3.8.2", - "jquery": "^3.3.1", - "memoize-weak": "^1.0.2", - "papaparse": "^4.6.0", - "prop-types": "^15.5.10", - "react-animate-height": "^2.0.4", - "react-copy-to-clipboard": "^5.0.1", - "url-loader": "^1.1.1" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/EyeSeeTea/user-extended-app.git" - }, - "bugs": { - "url": "https://github.com/EyeSeeTea/user-extended-app/issues" - }, - "homepage": "https://github.com/EyeSeeTea/user-extended-app", - "manifest.webapp": { - "name": "User Extended App", - "icons": { - "48": "icon.png" + "name": "user-extended-app", + "description": "DHIS2 Extended User app", + "version": "1.1.0", + "license": "GPL-3.0", + "author": "EyeSeeTea team", + "homepage": ".", + "repository": { + "type": "git", + "url": "git+https://github.com/EyeSeeTea/user-extended-app.git" }, - "developer": { - "url": "http://eyeseetea.com/", - "name": "EyeSeeTea Ltd" + "dependencies": { + "@dhis2/app-runtime": "3.2.6", + "@dhis2/d2-i18n": "1.1.0", + "@dhis2/d2-i18n-extract": "1.0.8", + "@dhis2/d2-i18n-generate": "1.2.0", + "@dhis2/ui": "7.8.1", + "@eyeseetea/d2-api": "1.11.0", + "@eyeseetea/d2-ui-components": "2.6.12-beta.4", + "@material-ui/core": "4.12.3", + "@material-ui/icons": "4.11.2", + "@types/react-virtualized-auto-sizer": "1.0.1", + "@types/react-window": "1.8.5", + "axios": "0.24.0", + "classnames": "2.3.1", + "d2": "27.0.0-8", + "d2-manifest": "1.0.0", + "d2-ui": "29.0.35", + "d2-utilizr": "0.2.16", + "file-dialog": "0.0.8", + "file-saver": "2.0.5", + "fluture": "14.0.0", + "immutable": "4.0.0", + "lodash": "4.17.21", + "loglevel": "1.8.0", + "material-ui": "0.20.2", + "md5.js": "1.3.5", + "memoize-weak": "1.0.2", + "moment": "2.29.1", + "papaparse": "5.3.1", + "prop-types": "15.7.2", + "purify-ts": "1.1.0", + "purify-ts-extra-codec": "0.6.0", + "qs": "6.10.1", + "react": "17.0.2", + "react-dom": "17.0.2", + "react-json-view": "1.21.3", + "react-moment": "1.1.1", + "react-router-dom": "6.0.2", + "react-scripts": "4.0.3", + "react-virtualized-auto-sizer": "1.0.6", + "react-window": "1.8.6", + "rx": "4.1.0", + "rxjs": "6.6.7", + "styled-components": "5.3.3", + "styled-jsx": "4.0.1", + "use-deep-compare-effect": "1.8.1" }, - "activities": { - "dhis": { - "href": "*" - } + "devDependencies": { + "@babel/core": "7.16.0", + "@babel/preset-typescript": "7.16.0", + "@testing-library/cypress": "8.0.2", + "@testing-library/jest-dom": "5.15.1", + "@testing-library/react": "12.1.2", + "@types/jest": "27.0.3", + "@types/lodash": "4.14.177", + "@types/material-ui": "0.21.12", + "@types/node": "16.11.10", + "@types/react": "17.0.37", + "@types/react-dom": "17.0.11", + "@types/react-router-dom": "5.3.2", + "@types/styled-components": "5.1.15", + "@typescript-eslint/eslint-plugin": "5.4.0", + "@typescript-eslint/parser": "5.4.0", + "@welldone-software/why-did-you-render": "6.2.3", + "cmd-ts": "0.7.0", + "craco": "0.0.3", + "cypress-xpath": "1.6.2", + "eslint": "8.3.0", + "eslint-config-react-app": "6.0.0", + "eslint-plugin-cypress": "2.12.1", + "eslint-plugin-flowtype": "8.0.3", + "eslint-plugin-import": "2.25.3", + "eslint-plugin-jsx-a11y": "6.5.1", + "eslint-plugin-react": "7.27.1", + "eslint-plugin-react-hooks": "4.3.0", + "eslint-plugin-unused-imports": "2.0.0", + "http-proxy-middleware": "2.0.1", + "husky": "7.0.4", + "jest": "27.3.1", + "prettier": "2.5.0", + "ts-jest": "27.0.7", + "ts-node": "10.4.0", + "typescript": "4.5.2" + }, + "scripts": { + "start": "react-scripts start", + "craco-start": "craco start", + "prebuild": "yarn localize && yarn test", + "build-folder": "rm -rf build/ && d2-manifest package.json manifest.webapp && react-scripts build && yarn run manifest && cp -r i18n icon.png build", + "build": "yarn build-folder && rm -f $npm_package_name.zip && cd build && zip --quiet -r ../$npm_package_name.zip *", + "test": "jest --passWithNoTests", + "lint": "eslint src cypress --ext .js,.jsx,.ts,.tsx", + "eject": "react-scripts eject", + "prettify": "prettier \"./**/*.{js,jsx,json,css,ts,tsx}\" --write", + "extract-pot": "yarn d2-i18n-extract -p src/ -o i18n/", + "localize": "yarn update-po && d2-i18n-generate -n user-extended-app -p ./i18n/ -o ./src/locales/", + "update-po": "yarn extract-pot && for pofile in i18n/*.po; do msgmerge --backup=off -U $pofile i18n/en.pot; done", + "manifest": "d2-manifest package.json build/manifest.webapp", + "cy:verify": "cypress verify", + "cy:e2e:open": "NODE_ENV=test CYPRESS_E2E=true cypress open", + "cy:e2e:run": "NODE_ENV=test CYPRESS_E2E=true cypress run --browser chrome", + "prepare": "husky install", + "script-example": "npx ts-node src/scripts/example.ts" + }, + "manifest.webapp": { + "name": "User Extended App", + "description": "User Extended App", + "icons": { + "48": "icon.png" + }, + "developer": { + "url": "https://www.eyeseetea.com/", + "name": "EyeSeeTea team" + }, + "activities": { + "dhis": { + "href": "*" + } + } } - } } diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..ca3f04a Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/feedback-tool/feedback-dhis2.min.js b/public/feedback-tool/feedback-dhis2.min.js new file mode 100644 index 0000000..a2f1344 --- /dev/null +++ b/public/feedback-tool/feedback-dhis2.min.js @@ -0,0 +1 @@ +"use strict";function _classCallCheck(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function e(e,n){for(var t=0;t.feedback-helper-inner{background:rgba(0,68,255,.1)}#feedback-close{background:url(icons.png) 0 -64px}.feedback-wizard-close{top:2px;right:2px;background:url(icons.png) 0 -34px;-webkit-opacity:.65;-moz-opacity:.65;opacity:.65}.feedback-wizard-close:hover{opacity:1}#feedback-overview-error,#feedback-welcome-error{display:none;color:#f13e3e;float:right;margin-right:30px;font-size:13px;line-height:29px}.feedback-btn-blue,.feedback-btn-gray{cursor:pointer;color:#fff;text-align:center;font-family:Roboto,sans-serif}#feedback-overview-error{margin-top:20px}#feedback-highlighter{display:none;bottom:100px;right:100px;position:fixed;height:275px}#feedback-overview{display:none;top:10%;left:50%;margin-left:-420px;position:fixed;width:840px!important;height:auto}#feedback-submit-error,#feedback-submit-success{top:30%;left:50%;margin-left:-300px;display:block;position:fixed;height:auto}.feedback-btn{padding:10px;outline:0;background-clip:padding-box;-webkit-box-shadow:0 4px 16px rgba(0,0,0,.2);-moz-box-shadow:0 4px 16px rgba(0,0,0,.2);box-shadow:0 4px 16px rgba(0,0,0,.2);z-index:40000}.feedback-btn-gray{border:1px solid #dcdcdc;border:1px solid rgba(0,0,0,.1);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;background-color:#ff9800;font-weight:600;letter-spacing:.5px}.feedback-btn-gray:hover{border:2px solid #ff9800}.feedback-btn-blue{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;background-color:#4d90fe;background:-webkit-gradient(linear,left top,left bottom,from(#4d90fe),to(#357ae8));background:-webkit-linear-gradient(top,#4d90fe,#357ae8);background:-moz-linear-gradient(top,#4d90fe,#357ae8);background:-ms-linear-gradient(top,#4d90fe,#357ae8);background:-o-linear-gradient(top,#4d90fe,#357ae8);border:1px solid #2f5bb7}#feedback-note,#feedback-note-tmp{resize:none}#feedback-highlighter,#feedback-overview,#feedback-submit-error,#feedback-submit-success,#feedback-welcome{font-family:Roboto,sans-serif;z-index:40000;padding:30px 42px;width:540px;border:1px solid rgba(0,0,0,.333);outline:0;-webkit-box-shadow:0 4px 16px rgba(0,0,0,.2);-moz-box-shadow:0 4px 16px rgba(0,0,0,.2);box-shadow:0 4px 16px rgba(0,0,0,.2);background:#fff;background-clip:padding-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transform:translateZ();-moz-transform:translateZ();-ms-transform:translateZ();-o-transform:translateZ()}.feedback-setblackout,.feedback-sethighlight{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background-color:#f5f5f5;background:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#f1f1f1));background:-webkit-linear-gradient(top,#f5f5f5,#f1f1f1);background:-moz-linear-gradient(top,#f5f5f5,#f1f1f1);background:-ms-linear-gradient(top,#f5f5f5,#f1f1f1);background:-o-linear-gradient(top,#f5f5f5,#f1f1f1);color:#444;border:1px solid #dcdcdc;border:1px solid rgba(0,0,0,.1);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;cursor:default;font-size:11px;font-weight:700;text-align:center;white-space:nowrap;margin-right:16px;height:30px;line-height:28px;min-width:90px;outline:0;padding:0 8px;display:inline-block;float:left}.feedback-setblackout{margin-top:10px;clear:both}.feedback-sethighlight div{background:url(icons.png) 0 -94px;width:16px;height:16px;margin-top:7px;float:left}.feedback-setblackout div{background:url(icons.png) -16px -94px;width:16px;height:16px;margin-top:7px;float:left}.feedback-setblackout:hover,.feedback-sethighlight:hover{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background-color:#f8f8f8;background:-webkit-gradient(linear,left top,left bottom,from(#f8f8f8),to(#f1f1f1));background:-webkit-linear-gradient(top,#f8f8f8,#f1f1f1);background:-moz-linear-gradient(top,#f8f8f8,#f1f1f1);background:-ms-linear-gradient(top,#f8f8f8,#f1f1f1);background:-o-linear-gradient(top,#f8f8f8,#f1f1f1);border:1px solid #c6c6c6;color:#333}.feedback-active{-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);background-color:#eee;background:-webkit-gradient(linear,left top,left bottom,from(#eee),to(#e0e0e0));background:-webkit-linear-gradient(top,#eee,#e0e0e0);background:-moz-linear-gradient(top,#eee,#e0e0e0);background:-ms-linear-gradient(top,#eee,#e0e0e0);background:-o-linear-gradient(top,#eee,#e0e0e0);border:1px solid #ccc;color:#333}#feedback-highlighter label{float:left;margin:0 0 0 10px;line-height:30px;font-size:13px;font-weight:400}#feedback-highlighter label.lower{margin-top:10px}.feedback-buttons{float:right;margin-top:20px;clear:both}#feedback-module h3{font-weight:700;font-size:15px;margin:8px 0}#feedback-title{width:314px;padding:0 10px}.feedback-additional{margin-bottom:20px!important}#feedback-overview-description{float:left}#feedback-note{width:314px;padding:10px;height:150px;outline:0;font-family:Roboto,sans-serif;line-height:20px}#feedback-overview-screenshot{float:right}.feedback-screenshot{max-width:396px;padding:1px;border:1px solid #adadad}#feedback-overview-description-text span{font-size:14px;margin:8px 0 8px 26px;color:#666;padding-left:10px;background:url(icons.png) -30px -34px no-repeat}#feedback-additional-none,#feedback-browser-info,#feedback-page-info,#feedback-page-structure{margin-top:16px;display:none}.feedback-spinner{position:absolute;top:0;left:0;z-index:10000000;background:url(spinner.gif);width:32px;height:32px} \ No newline at end of file diff --git a/public/feedback-tool/feedback.min.js b/public/feedback-tool/feedback.min.js new file mode 100644 index 0000000..e329fd9 --- /dev/null +++ b/public/feedback-tool/feedback.min.js @@ -0,0 +1,6 @@ +"use strict";function _classCallCheck(A,e){if(!(A instanceof e))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function A(A,e){for(var t=0;t0&&o[o.length-1])&&(6===t[0]||2===t[0])){B=0;continue}if(3===t[0]&&(!o||t[1]>o[0]&&t[1]=1&&(t-=1),t<1/6?(e-A)*t*6+A:t<.5?e:t<2/3?6*(e-A)*(2/3-t)+A:A}function n(A){return A.type!==h.FUNCTION||un[A.name]}for(var s=function(A,e){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,e){A.__proto__=e}||function(A,e){for(var t in e)e.hasOwnProperty(t)&&(A[t]=e[t])})(A,e)},o=function(){return o=Object.assign||function(A){for(var e,t=1,r=arguments.length;t=55296&&n<=56319&&t>10)+55296,o%1024+56320)),(n+1===t||r.length>16384)&&(s+=String.fromCharCode.apply(String,r),r.length=0)}return s},Q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l="undefined"==typeof Uint8Array?[]:new Uint8Array(256),w=0;w>4,c[B++]=(15&r)<<4|n>>2,c[B++]=(3&n)<<6|63&s;return a},d=function(A){for(var e=A.length,t=[],r=0;r>C,H=1<>C,m=p+K,b=m,v=32,I=b+v,T=65536>>f,R=1<=0){if(A<55296||A>56319&&A<=65535)return e=this.index[A>>C],e=(e<>C)],e=(e<>f),e=this.index[e],e+=A>>C&y,e=this.index[e],e=(e<_?(n.push(!0),o-=_):n.push(!1),["normal","auto","loose"].indexOf(e)!==-1&&[8208,8211,12316,12448].indexOf(A)!==-1)return r.push(s),t.push(AA);if(o===z||o===Y){if(0===s)return r.push(s),t.push(wA);var i=t[s-1];return SA.indexOf(i)===-1?(r.push(r[s-1]),t.push(i)):(r.push(s),t.push(wA))}return r.push(s),o===hA?t.push("strict"===e?sA:EA):o===KA?t.push(wA):o===lA?t.push(wA):o===mA?A>=131072&&A<=196605||A>=196608&&A<=262141?t.push(EA):t.push(wA):void t.push(o)}),[r,t,n]},kA=function(A,e,t,r){var n=r[t];if(Array.isArray(A)?A.indexOf(n)!==-1:A===n)for(var s=t;s<=r.length;){s++;var o=r[s];if(o===e)return!0;if(o!==W)break}if(n===W)for(var s=t;s>0;){s--;var i=r[s];if(Array.isArray(A)?A.indexOf(i)!==-1:A===i)for(var B=t;B<=r.length;){B++;var o=r[B];if(o===e)return!0;if(o!==W)break}if(i!==W)break}return!1},xA=function(A,e){for(var t=A;t>=0;){var r=e[t];if(r!==W)return r;t--}return 0},PA=function(A,e,t,r,n){if(0===t[r])return vA;var s=r-1;if(Array.isArray(n)&&n[s]===!0)return vA;var o=s-1,i=s+1,B=e[s],a=o>=0?e[o]:0,c=e[i];if(B===x&&c===P)return vA;if(yA.indexOf(B)!==-1)return bA;if(yA.indexOf(c)!==-1)return vA;if(LA.indexOf(c)!==-1)return vA;if(xA(s,e)===J)return IA;if(TA.get(A[s])===Y&&(c===EA||c===gA||c===dA))return vA;if(B===X||c===X)return vA;if(B===G)return vA;if([W,j,$].indexOf(B)===-1&&c===G)return vA;if([eA,tA,rA,BA,QA].indexOf(c)!==-1)return vA;if(xA(s,e)===oA)return vA;if(kA(iA,oA,s,e))return vA;if(kA([eA,tA],sA,s,e))return vA;if(kA(q,q,s,e))return vA;if(B===W)return IA;if(B===iA||c===iA)return vA;if(c===AA||B===AA)return IA;if([j,$,sA].indexOf(c)!==-1||B===Z)return vA;if(a===fA&&MA.indexOf(B)!==-1)return vA;if(B===QA&&c===fA)return vA;if(c===nA&&RA.concat(nA,rA,aA,EA,gA,dA).indexOf(B)!==-1)return vA;if(RA.indexOf(c)!==-1&&B===aA||RA.indexOf(B)!==-1&&c===aA)return vA;if(B===uA&&[EA,gA,dA].indexOf(c)!==-1||[EA,gA,dA].indexOf(B)!==-1&&c===cA)return vA;if(RA.indexOf(B)!==-1&&OA.indexOf(c)!==-1||OA.indexOf(B)!==-1&&RA.indexOf(c)!==-1)return vA;if([uA,cA].indexOf(B)!==-1&&(c===aA||[oA,$].indexOf(c)!==-1&&e[i+1]===aA)||[oA,$].indexOf(B)!==-1&&c===aA||B===aA&&[aA,QA,BA].indexOf(c)!==-1)return vA;if([aA,QA,BA,eA,tA].indexOf(c)!==-1)for(var u=s;u>=0;){var Q=e[u];if(Q===aA)return vA;if([QA,BA].indexOf(Q)===-1)break;u--}if([uA,cA].indexOf(c)!==-1)for(var u=[eA,tA].indexOf(B)!==-1?o:s;u>=0;){var Q=e[u];if(Q===aA)return vA;if([QA,BA].indexOf(Q)===-1)break;u--}if(FA===B&&[FA,pA,UA,CA].indexOf(c)!==-1||[pA,UA].indexOf(B)!==-1&&[pA,HA].indexOf(c)!==-1||[HA,CA].indexOf(B)!==-1&&c===HA)return vA;if(DA.indexOf(B)!==-1&&[nA,cA].indexOf(c)!==-1||DA.indexOf(c)!==-1&&B===uA)return vA;if(RA.indexOf(B)!==-1&&RA.indexOf(c)!==-1)return vA;if(B===BA&&RA.indexOf(c)!==-1)return vA;if(RA.concat(aA).indexOf(B)!==-1&&c===oA||RA.concat(aA).indexOf(c)!==-1&&B===tA)return vA;if(B===NA&&c===NA){for(var l=t[s],w=1;l>0&&(l--,e[l]===NA);)w++;if(w%2!==0)return vA}return B===gA&&c===dA?vA:IA},zA=function(A,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var t=_A(A,e.lineBreak),r=t[0],n=t[1],s=t[2];"break-all"!==e.wordBreak&&"break-word"!==e.wordBreak||(n=n.map(function(A){return[aA,wA,KA].indexOf(A)!==-1?EA:A}));var o="keep-all"===e.wordBreak?s.map(function(e,t){return e&&A[t]>=19968&&A[t]<=40959}):void 0;return[r,n,o]},VA=function(){function A(A,e,t,r){this.codePoints=A,this.required=e===bA,this.start=t,this.end=r}return A.prototype.slice=function(){return u.apply(void 0,this.codePoints.slice(this.start,this.end))},A}(),XA=function(A,e){var t=c(A),r=zA(t,e),n=r[0],s=r[1],o=r[2],i=t.length,B=0,a=0;return{next:function(){if(a>=i)return{done:!0,value:null};for(var A=vA;a=_e&&A<=57},je=function(A){return A>=55296&&A<=57343},Ze=function(A){return qe(A)||A>=Xe&&A<=Ge||A>=ke&&A<=Pe},$e=function(A){return A>=ke&&A<=Ve},At=function(A){return A>=Xe&&A<=Ye},et=function(A){return $e(A)||At(A)},tt=function(A){return A>=He},rt=function(A){return A===jA||A===Ae||A===ee},nt=function(A){return et(A)||tt(A)||A===ce},st=function(A){return nt(A)||qe(A)||A===ue},ot=function(A){return A>=Re&&A<=ye||A===Le||A>=Oe&&A<=Se||A===De},it=function(A,e){return A===$A&&e!==jA},Bt=function(A,e,t){return A===ue?nt(e)||it(e,t):!!nt(A)||!(A!==$A||!it(A,e))},at=function(A,e,t){return A===me||A===ue?!!qe(e)||e===Te&&qe(t):qe(A===Te?e:A)},ct=function(A){var e=0,t=1;A[e]!==me&&A[e]!==ue||(A[e]===ue&&(t=-1),e++);for(var r=[];qe(A[e]);)r.push(A[e++]);var n=r.length?parseInt(u.apply(void 0,r),10):0;A[e]===Te&&e++;for(var s=[];qe(A[e]);)s.push(A[e++]);var o=s.length,i=o?parseInt(u.apply(void 0,s),10):0;A[e]!==Je&&A[e]!==xe||e++;var B=1;A[e]!==me&&A[e]!==ue||(A[e]===ue&&(B=-1),e++);for(var a=[];qe(A[e]);)a.push(A[e++]);var c=a.length?parseInt(u.apply(void 0,a),10):0;return t*(n+i*Math.pow(10,-o))*Math.pow(10,B*c)},ut={type:h.LEFT_PARENTHESIS_TOKEN},Qt={type:h.RIGHT_PARENTHESIS_TOKEN},lt={type:h.COMMA_TOKEN},wt={type:h.SUFFIX_MATCH_TOKEN},ht={type:h.PREFIX_MATCH_TOKEN},gt={type:h.COLUMN_TOKEN},dt={type:h.DASH_MATCH_TOKEN},Ut={type:h.INCLUDE_MATCH_TOKEN},Ct={type:h.LEFT_CURLY_BRACKET_TOKEN},ft={type:h.RIGHT_CURLY_BRACKET_TOKEN},Et={type:h.SUBSTRING_MATCH_TOKEN},Ft={type:h.BAD_URL_TOKEN},pt={type:h.BAD_STRING_TOKEN},Ht={type:h.CDO_TOKEN},Nt={type:h.CDC_TOKEN},Kt={type:h.COLON_TOKEN},mt={type:h.SEMICOLON_TOKEN},bt={type:h.LEFT_SQUARE_BRACKET_TOKEN},vt={type:h.RIGHT_SQUARE_BRACKET_TOKEN},It={type:h.WHITESPACE_TOKEN},Tt={type:h.EOF_TOKEN},Rt=function(){function A(){this._value=[]}return A.prototype.write=function(A){this._value=this._value.concat(c(A))},A.prototype.read=function(){for(var A=[],e=this.consumeToken();e!==Tt;)A.push(e),e=this.consumeToken();return A},A.prototype.consumeToken=function(){var A=this.consumeCodePoint();switch(A){case te:return this.consumeStringToken(te);case ne:var e=this.peekCodePoint(0),t=this.peekCodePoint(1),r=this.peekCodePoint(2);if(st(e)||it(t,r)){var n=Bt(e,t,r)?WA:GA,s=this.consumeName();return{type:h.HASH_TOKEN,value:s,flags:n}}break;case se:if(this.peekCodePoint(0)===re)return this.consumeCodePoint(),wt;break;case ie:return this.consumeStringToken(ie);case Be:return ut;case ae:return Qt;case Ke:if(this.peekCodePoint(0)===re)return this.consumeCodePoint(),Et;break;case me:if(at(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case be:return lt;case ue:var o=A,i=this.peekCodePoint(0),B=this.peekCodePoint(1);if(at(o,i,B))return this.reconsumeCodePoint(A),this.consumeNumericToken();if(Bt(o,i,B))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();if(i===ue&&B===we)return this.consumeCodePoint(),this.consumeCodePoint(),Nt;break;case Te:if(at(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case ZA:if(this.peekCodePoint(0)===Ke)for(this.consumeCodePoint();;){var a=this.consumeCodePoint();if(a===Ke&&(a=this.consumeCodePoint(),a===ZA))return this.consumeToken();if(a===Me)return this.consumeToken()}break;case ve:return Kt;case Ie:return mt;case le:if(this.peekCodePoint(0)===Qe&&this.peekCodePoint(1)===ue&&this.peekCodePoint(2)===ue)return this.consumeCodePoint(),this.consumeCodePoint(),Ht;break;case he:var c=this.peekCodePoint(0),Q=this.peekCodePoint(1),l=this.peekCodePoint(2);if(Bt(c,Q,l)){var s=this.consumeName();return{type:h.AT_KEYWORD_TOKEN,value:s}}break;case ge:return bt;case $A:if(it(A,this.peekCodePoint(0)))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();break;case de:return vt;case Ue:if(this.peekCodePoint(0)===re)return this.consumeCodePoint(),ht;break;case Ce:return Ct;case Ee:return ft;case ze:case We:var w=this.peekCodePoint(0),g=this.peekCodePoint(1);return w!==me||!Ze(g)&&g!==fe||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(A),this.consumeIdentLikeToken();case Fe:if(this.peekCodePoint(0)===re)return this.consumeCodePoint(),dt;if(this.peekCodePoint(0)===Fe)return this.consumeCodePoint(),gt;break;case pe:if(this.peekCodePoint(0)===re)return this.consumeCodePoint(),Ut;break;case Me:return Tt}return rt(A)?(this.consumeWhiteSpace(),It):qe(A)?(this.reconsumeCodePoint(A),this.consumeNumericToken()):nt(A)?(this.reconsumeCodePoint(A),this.consumeIdentLikeToken()):{type:h.DELIM_TOKEN,value:u(A)}},A.prototype.consumeCodePoint=function(){var A=this._value.shift();return"undefined"==typeof A?-1:A},A.prototype.reconsumeCodePoint=function(A){this._value.unshift(A)},A.prototype.peekCodePoint=function(A){return A>=this._value.length?-1:this._value[A]},A.prototype.consumeUnicodeRangeToken=function(){for(var A=[],e=this.consumeCodePoint();Ze(e)&&A.length<6;)A.push(e),e=this.consumeCodePoint();for(var t=!1;e===fe&&A.length<6;)A.push(e),e=this.consumeCodePoint(),t=!0;if(t){var r=parseInt(u.apply(void 0,A.map(function(A){return A===fe?_e:A})),16),n=parseInt(u.apply(void 0,A.map(function(A){return A===fe?Ge:A})),16);return{type:h.UNICODE_RANGE_TOKEN,start:r,end:n}}var s=parseInt(u.apply(void 0,A),16);if(this.peekCodePoint(0)===ue&&Ze(this.peekCodePoint(1))){this.consumeCodePoint(),e=this.consumeCodePoint();for(var o=[];Ze(e)&&o.length<6;)o.push(e),e=this.consumeCodePoint();var n=parseInt(u.apply(void 0,o),16);return{type:h.UNICODE_RANGE_TOKEN,start:s,end:n}}return{type:h.UNICODE_RANGE_TOKEN,start:s,end:s}},A.prototype.consumeIdentLikeToken=function(){var A=this.consumeName();return"url"===A.toLowerCase()&&this.peekCodePoint(0)===Be?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Be?(this.consumeCodePoint(),{type:h.FUNCTION_TOKEN,value:A}):{type:h.IDENT_TOKEN,value:A}},A.prototype.consumeUrlToken=function(){var A=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Me)return{type:h.URL_TOKEN,value:""};var e=this.peekCodePoint(0);if(e===ie||e===te){var t=this.consumeStringToken(this.consumeCodePoint());return t.type===h.STRING_TOKEN&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Me||this.peekCodePoint(0)===ae)?(this.consumeCodePoint(),{type:h.URL_TOKEN,value:t.value}):(this.consumeBadUrlRemnants(),Ft)}for(;;){var r=this.consumeCodePoint();if(r===Me||r===ae)return{type:h.URL_TOKEN,value:u.apply(void 0,A)};if(rt(r))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Me||this.peekCodePoint(0)===ae?(this.consumeCodePoint(),{type:h.URL_TOKEN,value:u.apply(void 0,A)}):(this.consumeBadUrlRemnants(),Ft);if(r===te||r===ie||r===Be||ot(r))return this.consumeBadUrlRemnants(),Ft;if(r===$A){if(!it(r,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),Ft;A.push(this.consumeEscapedCodePoint())}else A.push(r)}},A.prototype.consumeWhiteSpace=function(){for(;rt(this.peekCodePoint(0));)this.consumeCodePoint()},A.prototype.consumeBadUrlRemnants=function(){for(;;){var A=this.consumeCodePoint();if(A===ae||A===Me)return;it(A,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},A.prototype.consumeStringSlice=function(A){for(var e=6e4,t="";A>0;){var r=Math.min(e,A);t+=u.apply(void 0,this._value.splice(0,r)),A-=r}return this._value.shift(),t},A.prototype.consumeStringToken=function(A){for(var e="",t=0;;){var r=this._value[t];if(r===Me||void 0===r||r===A)return e+=this.consumeStringSlice(t),{type:h.STRING_TOKEN,value:e};if(r===jA)return this._value.splice(0,t),pt;if(r===$A){var n=this._value[t+1];n!==Me&&void 0!==n&&(n===jA?(e+=this.consumeStringSlice(t),t=-1,this._value.shift()):it(r,n)&&(e+=this.consumeStringSlice(t),e+=u(this.consumeEscapedCodePoint()),t=-1))}t++}},A.prototype.consumeNumber=function(){var A=[],e=YA,t=this.peekCodePoint(0);for(t!==me&&t!==ue||A.push(this.consumeCodePoint());qe(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(t===Te&&qe(r))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=qA;qe(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0),r=this.peekCodePoint(1);var n=this.peekCodePoint(2);if((t===Je||t===xe)&&((r===me||r===ue)&&qe(n)||qe(r)))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=qA;qe(this.peekCodePoint(0));)A.push(this.consumeCodePoint());return[ct(A),e]},A.prototype.consumeNumericToken=function(){var A=this.consumeNumber(),e=A[0],t=A[1],r=this.peekCodePoint(0),n=this.peekCodePoint(1),s=this.peekCodePoint(2);if(Bt(r,n,s)){var o=this.consumeName();return{type:h.DIMENSION_TOKEN,number:e,flags:t,unit:o}}return r===oe?(this.consumeCodePoint(),{type:h.PERCENTAGE_TOKEN,number:e,flags:t}):{type:h.NUMBER_TOKEN,number:e,flags:t}},A.prototype.consumeEscapedCodePoint=function(){var A=this.consumeCodePoint();if(Ze(A)){for(var e=u(A);Ze(this.peekCodePoint(0))&&e.length<6;)e+=u(this.consumeCodePoint());rt(this.peekCodePoint(0))&&this.consumeCodePoint();var t=parseInt(e,16);return 0===t||je(t)||t>1114111?Ne:t}return A===Me?Ne:A},A.prototype.consumeName=function(){for(var A="";;){var e=this.consumeCodePoint();if(st(e))A+=u(e);else{if(!it(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),A;A+=u(this.consumeEscapedCodePoint())}}},A}(),yt=function(){function A(A){this._tokens=A}return A.create=function(e){var t=new Rt;return t.write(e),new A(t.read())},A.parseValue=function(e){return A.create(e).parseComponentValue()},A.parseValues=function(e){return A.create(e).parseComponentValues()},A.prototype.parseComponentValue=function(){for(var A=this.consumeToken();A.type===h.WHITESPACE_TOKEN;)A=this.consumeToken();if(A.type===h.EOF_TOKEN)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(A);var e=this.consumeComponentValue();do A=this.consumeToken();while(A.type===h.WHITESPACE_TOKEN);if(A.type===h.EOF_TOKEN)return e;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},A.prototype.parseComponentValues=function(){for(var A=[];;){var e=this.consumeComponentValue();if(e.type===h.EOF_TOKEN)return A;A.push(e),A.push()}},A.prototype.consumeComponentValue=function(){var A=this.consumeToken();switch(A.type){case h.LEFT_CURLY_BRACKET_TOKEN:case h.LEFT_SQUARE_BRACKET_TOKEN:case h.LEFT_PARENTHESIS_TOKEN:return this.consumeSimpleBlock(A.type);case h.FUNCTION_TOKEN:return this.consumeFunction(A)}return A},A.prototype.consumeSimpleBlock=function(A){for(var e={type:A,values:[]},t=this.consumeToken();;){if(t.type===h.EOF_TOKEN||Pt(t,A))return e;this.reconsumeToken(t),e.values.push(this.consumeComponentValue()),t=this.consumeToken()}},A.prototype.consumeFunction=function(A){for(var e={name:A.value,values:[],type:h.FUNCTION};;){var t=this.consumeToken();if(t.type===h.EOF_TOKEN||t.type===h.RIGHT_PARENTHESIS_TOKEN)return e;this.reconsumeToken(t),e.values.push(this.consumeComponentValue())}},A.prototype.consumeToken=function(){var A=this._tokens.shift();return"undefined"==typeof A?Tt:A},A.prototype.reconsumeToken=function(A){this._tokens.unshift(A)},A}(),Lt=function(A){return A.type===h.DIMENSION_TOKEN},Ot=function(A){return A.type===h.NUMBER_TOKEN},St=function(A){return A.type===h.IDENT_TOKEN},Dt=function(A){return A.type===h.STRING_TOKEN},Mt=function(A,e){return St(A)&&A.value===e},_t=function(A){return A.type!==h.WHITESPACE_TOKEN},kt=function(A){return A.type!==h.WHITESPACE_TOKEN&&A.type!==h.COMMA_TOKEN},xt=function(A){var e=[],t=[];return A.forEach(function(A){if(A.type===h.COMMA_TOKEN){if(0===t.length)throw new Error("Error parsing function args, zero tokens for arg");return e.push(t),void(t=[])}A.type!==h.WHITESPACE_TOKEN&&t.push(A)}),t.length&&e.push(t),e},Pt=function(A,e){return e===h.LEFT_CURLY_BRACKET_TOKEN&&A.type===h.RIGHT_CURLY_BRACKET_TOKEN||(e===h.LEFT_SQUARE_BRACKET_TOKEN&&A.type===h.RIGHT_SQUARE_BRACKET_TOKEN||e===h.LEFT_PARENTHESIS_TOKEN&&A.type===h.RIGHT_PARENTHESIS_TOKEN)},zt=function(A){return A.type===h.NUMBER_TOKEN||A.type===h.DIMENSION_TOKEN},Vt=function(A){return A.type===h.PERCENTAGE_TOKEN||zt(A)},Xt=function(A){return A.length>1?[A[0],A[1]]:[A[0]]},Jt={type:h.NUMBER_TOKEN,number:0,flags:YA},Gt={type:h.PERCENTAGE_TOKEN,number:50,flags:YA},Wt={type:h.PERCENTAGE_TOKEN,number:100,flags:YA},Yt=function(A,e,t){var r=A[0],n=A[1];return[qt(r,e),qt("undefined"!=typeof n?n:r,t)]},qt=function(A,e){if(A.type===h.PERCENTAGE_TOKEN)return A.number/100*e;if(Lt(A))switch(A.unit){case"rem":case"em":return 16*A.number;case"px":default:return A.number}return A.number},jt="deg",Zt="grad",$t="rad",Ar="turn",er={name:"angle",parse:function(A){if(A.type===h.DIMENSION_TOKEN)switch(A.unit){case jt:return Math.PI*A.number/180;case Zt:return Math.PI/200*A.number;case $t:return A.number;case Ar:return 2*Math.PI*A.number}throw new Error("Unsupported angle type")}},tr=function(A){return A.type===h.DIMENSION_TOKEN&&(A.unit===jt||A.unit===Zt||A.unit===$t||A.unit===Ar)},rr=function(A){var e=A.filter(St).map(function(A){return A.value}).join(" ");switch(e){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Jt,Jt];case"to top":case"bottom":return nr(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Jt,Wt];case"to right":case"left":return nr(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Wt,Wt];case"to bottom":case"top":return nr(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Wt,Jt];case"to left":case"right":return nr(270)}return 0},nr=function(A){return Math.PI*A/180},sr={name:"color",parse:function(A){if(A.type===h.FUNCTION){var e=Qr[A.name];if("undefined"==typeof e)throw new Error('Attempting to parse an unsupported color function "'+A.name+'"');return e(A.values)}if(A.type===h.HASH_TOKEN){if(3===A.value.length){var t=A.value.substring(0,1),r=A.value.substring(1,2),n=A.value.substring(2,3);return Br(parseInt(t+t,16),parseInt(r+r,16),parseInt(n+n,16),1)}if(4===A.value.length){var t=A.value.substring(0,1),r=A.value.substring(1,2),n=A.value.substring(2,3),s=A.value.substring(3,4);return Br(parseInt(t+t,16),parseInt(r+r,16),parseInt(n+n,16),parseInt(s+s,16)/255)}if(6===A.value.length){var t=A.value.substring(0,2),r=A.value.substring(2,4),n=A.value.substring(4,6);return Br(parseInt(t,16),parseInt(r,16),parseInt(n,16),1)}if(8===A.value.length){var t=A.value.substring(0,2),r=A.value.substring(2,4),n=A.value.substring(4,6),s=A.value.substring(6,8);return Br(parseInt(t,16),parseInt(r,16),parseInt(n,16),parseInt(s,16)/255)}}if(A.type===h.IDENT_TOKEN){var o=lr[A.value.toUpperCase()];if("undefined"!=typeof o)return o}return lr.TRANSPARENT}},or=function(A){return 0===(255&A)},ir=function(A){var e=255&A,t=255&A>>8,r=255&A>>16,n=255&A>>24;return e<255?"rgba("+n+","+r+","+t+","+e/255+")":"rgb("+n+","+r+","+t+")"},Br=function(A,e,t,r){return(A<<24|e<<16|t<<8|Math.round(255*r)<<0)>>>0},ar=function(A,e){if(A.type===h.NUMBER_TOKEN)return A.number;if(A.type===h.PERCENTAGE_TOKEN){var t=3===e?1:255;return 3===e?A.number/100*t:Math.round(A.number/100*t)}return 0},cr=function(A){var e=A.filter(kt);if(3===e.length){var t=e.map(ar),r=t[0],n=t[1],s=t[2];return Br(r,n,s,1)}if(4===e.length){var o=e.map(ar),r=o[0],n=o[1],s=o[2],i=o[3];return Br(r,n,s,i)}return 0},ur=function(A){var e=A.filter(kt),t=e[0],n=e[1],s=e[2],o=e[3],i=(t.type===h.NUMBER_TOKEN?nr(t.number):er.parse(t))/(2*Math.PI),B=Vt(n)?n.number/100:0,a=Vt(s)?s.number/100:0,c="undefined"!=typeof o&&Vt(o)?qt(o,1):1;if(0===B)return Br(255*a,255*a,255*a,1);var u=a<=.5?a*(B+1):a+B-a*B,Q=2*a-u,l=r(Q,u,i+1/3),w=r(Q,u,i),g=r(Q,u,i-1/3);return Br(255*l,255*w,255*g,c)},Qr={hsl:ur,hsla:ur,rgb:cr,rgba:cr},lr={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199};!function(A){A[A.VALUE=0]="VALUE",A[A.LIST=1]="LIST",A[A.IDENT_VALUE=2]="IDENT_VALUE",A[A.TYPE_VALUE=3]="TYPE_VALUE",A[A.TOKEN_VALUE=4]="TOKEN_VALUE"}(JA||(JA={}));var wr;!function(A){A[A.BORDER_BOX=0]="BORDER_BOX",A[A.PADDING_BOX=1]="PADDING_BOX",A[A.CONTENT_BOX=2]="CONTENT_BOX"}(wr||(wr={}));var hr,gr={name:"background-clip",initialValue:"border-box",prefix:!1,type:JA.LIST,parse:function(A){return A.map(function(A){if(St(A))switch(A.value){case"padding-box":return wr.PADDING_BOX;case"content-box":return wr.CONTENT_BOX}return wr.BORDER_BOX})}},dr={name:"background-color",initialValue:"transparent",prefix:!1,type:JA.TYPE_VALUE,format:"color"},Ur=function(A){var e=sr.parse(A[0]),t=A[1];return t&&Vt(t)?{color:e,stop:t}:{color:e,stop:null}},Cr=function(A,e){var t=A[0],r=A[A.length-1];null===t.stop&&(t.stop=Jt),null===r.stop&&(r.stop=Wt);for(var n=[],s=0,o=0;os?n.push(B):n.push(s),s=B}else n.push(null)}for(var a=null,o=0;oA.optimumDistance)?{optimumCorner:e,optimumDistance:i}:A},{optimumDistance:n?1/0:-(1/0),optimumCorner:null}).optimumCorner},Hr=function(A,e,t,r,n){var s=0,o=0;switch(A.size){case Bn.CLOSEST_SIDE:A.shape===nn.CIRCLE?s=o=Math.min(Math.abs(e),Math.abs(e-r),Math.abs(t),Math.abs(t-n)):A.shape===nn.ELLIPSE&&(s=Math.min(Math.abs(e),Math.abs(e-r)),o=Math.min(Math.abs(t),Math.abs(t-n)));break;case Bn.CLOSEST_CORNER:if(A.shape===nn.CIRCLE)s=o=Math.min(Fr(e,t),Fr(e,t-n),Fr(e-r,t),Fr(e-r,t-n));else if(A.shape===nn.ELLIPSE){var i=Math.min(Math.abs(t),Math.abs(t-n))/Math.min(Math.abs(e),Math.abs(e-r)),B=pr(r,n,e,t,!0),a=B[0],c=B[1];s=Fr(a-e,(c-t)/i),o=i*s}break;case Bn.FARTHEST_SIDE:A.shape===nn.CIRCLE?s=o=Math.max(Math.abs(e),Math.abs(e-r),Math.abs(t),Math.abs(t-n)):A.shape===nn.ELLIPSE&&(s=Math.max(Math.abs(e),Math.abs(e-r)),o=Math.max(Math.abs(t),Math.abs(t-n)));break;case Bn.FARTHEST_CORNER:if(A.shape===nn.CIRCLE)s=o=Math.max(Fr(e,t),Fr(e,t-n),Fr(e-r,t),Fr(e-r,t-n));else if(A.shape===nn.ELLIPSE){var i=Math.max(Math.abs(t),Math.abs(t-n))/Math.max(Math.abs(e),Math.abs(e-r)),u=pr(r,n,e,t,!1),a=u[0],c=u[1];s=Fr(a-e,(c-t)/i),o=i*s}}return Array.isArray(A.size)&&(s=qt(A.size[0],r),o=2===A.size.length?qt(A.size[1],n):s),[s,o]},Nr=function(A){var e=nr(180),t=[];return xt(A).forEach(function(A,r){if(0===r){var n=A[0];if(n.type===h.IDENT_TOKEN&&"to"===n.value)return void(e=rr(A));if(tr(n))return void(e=er.parse(n))}var s=Ur(A);t.push(s)}),{angle:e,stops:t,type:hr.LINEAR_GRADIENT}},Kr=function(A){var e=nr(180),t=[];return xt(A).forEach(function(A,r){if(0===r){var n=A[0];if(n.type===h.IDENT_TOKEN&&["top","left","right","bottom"].indexOf(n.value)!==-1)return void(e=rr(A));if(tr(n))return void(e=(er.parse(n)+nr(270))%nr(360))}var s=Ur(A);t.push(s)}),{angle:e,stops:t,type:hr.LINEAR_GRADIENT}},mr=function(A){var e=123;if(A.createRange){var t=A.createRange();if(t.getBoundingClientRect){var r=A.createElement("boundtest");r.style.height=e+"px",r.style.display="block",A.body.appendChild(r),t.selectNode(r);var n=t.getBoundingClientRect(),s=Math.round(n.height);if(A.body.removeChild(r),s===e)return!0}}return!1},br=function(){return"undefined"!=typeof(new Image).crossOrigin},vr=function(){return"string"==typeof(new XMLHttpRequest).responseType},Ir=function(A){var e=new Image,t=A.createElement("canvas"),r=t.getContext("2d");if(!r)return!1;e.src="data:image/svg+xml,";try{r.drawImage(e,0,0),t.toDataURL()}catch(n){return!1}return!0},Tr=function(A){return 0===A[0]&&255===A[1]&&0===A[2]&&255===A[3]},Rr=function(A){var e=A.createElement("canvas"),t=100;e.width=t,e.height=t;var r=e.getContext("2d");if(!r)return Promise.reject(!1);r.fillStyle="rgb(0, 255, 0)",r.fillRect(0,0,t,t);var n=new Image,s=e.toDataURL();n.src=s;var o=yr(t,t,0,0,n);return r.fillStyle="red",r.fillRect(0,0,t,t),Lr(o).then(function(e){r.drawImage(e,0,0);var n=r.getImageData(0,0,t,t).data;r.fillStyle="red",r.fillRect(0,0,t,t);var o=A.createElement("div");return o.style.backgroundImage="url("+s+")",o.style.height=t+"px",Tr(n)?Lr(yr(t,t,0,0,o)):Promise.reject(!1)}).then(function(A){return r.drawImage(A,0,0),Tr(r.getImageData(0,0,t,t).data)})["catch"](function(){return!1})},yr=function(A,e,t,r,n){var s="http://www.w3.org/2000/svg",o=document.createElementNS(s,"svg"),i=document.createElementNS(s,"foreignObject");return o.setAttributeNS(null,"width",A.toString()),o.setAttributeNS(null,"height",e.toString()),i.setAttributeNS(null,"width","100%"),i.setAttributeNS(null,"height","100%"),i.setAttributeNS(null,"x",t.toString()),i.setAttributeNS(null,"y",r.toString()),i.setAttributeNS(null,"externalResourcesRequired","true"),o.appendChild(i),i.appendChild(n),o},Lr=function(A){return new Promise(function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(A))})},Or={get SUPPORT_RANGE_BOUNDS(){var A=mr(document);return Object.defineProperty(Or,"SUPPORT_RANGE_BOUNDS",{value:A}),A},get SUPPORT_SVG_DRAWING(){var A=Ir(document);return Object.defineProperty(Or,"SUPPORT_SVG_DRAWING",{value:A}),A},get SUPPORT_FOREIGNOBJECT_DRAWING(){var A="function"==typeof Array.from&&"function"==typeof window.fetch?Rr(document):Promise.resolve(!1);return Object.defineProperty(Or,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:A}),A},get SUPPORT_CORS_IMAGES(){var A=br();return Object.defineProperty(Or,"SUPPORT_CORS_IMAGES",{value:A}),A},get SUPPORT_RESPONSE_TYPE(){var A=vr();return Object.defineProperty(Or,"SUPPORT_RESPONSE_TYPE",{value:A}),A},get SUPPORT_CORS_XHR(){var A="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Or,"SUPPORT_CORS_XHR",{value:A}),A}},Sr=function(){function A(A){var e=A.id,t=A.enabled;this.id=e,this.enabled=t,this.start=Date.now()}return A.prototype.debug=function(){for(var A=[],e=0;e0&&setTimeout(function(){return e("Timed out ("+o._options.imageTimeout+"ms) loading image")},o._options.imageTimeout)})];case 3:return[2,t.sent()]}})})},A.prototype.has=function(A){return"undefined"!=typeof this._cache[A]},A.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},A.prototype.proxy=function(A){var e=this,t=this._options.proxy;if(!t)throw new Error("No proxy defined");var r=A.substring(0,256);return new Promise(function(n,s){var o=Or.SUPPORT_RESPONSE_TYPE?"blob":"text",i=new XMLHttpRequest;if(i.onload=function(){if(200===i.status)if("text"===o)n(i.response);else{var A=new FileReader;A.addEventListener("load",function(){return n(A.result)},!1),A.addEventListener("error",function(A){return s(A)},!1),A.readAsDataURL(i.response)}else s("Failed to proxy resource "+r+" with status code "+i.status)},i.onerror=s,i.open("GET",t+"?url="+encodeURIComponent(A)+"&responseType="+o),"text"!==o&&i instanceof XMLHttpRequest&&(i.responseType=o),e._options.imageTimeout){var B=e._options.imageTimeout;i.timeout=B,i.ontimeout=function(){return s("Timed out ("+B+"ms) proxying "+r)}}i.send()})},A}(),_r=/^data:image\/svg\+xml/i,kr=/^data:image\/.*;base64,/i,xr=/^data:image\/.*/i,Pr=function(A){return Or.SUPPORT_SVG_DRAWING||!Jr(A)},zr=function(A){return xr.test(A)},Vr=function(A){return kr.test(A)},Xr=function(A){return"blob"===A.substr(0,4)},Jr=function(A){return"svg"===A.substr(-3).toLowerCase()||_r.test(A)},Gr=function(A){var e=nr(180),t=[],r=hr.LINEAR_GRADIENT,n=nn.CIRCLE,s=Bn.FARTHEST_CORNER,o=[];return xt(A).forEach(function(A,e){var n=A[0];if(0===e){if(St(n)&&"linear"===n.value)return void(r=hr.LINEAR_GRADIENT);if(St(n)&&"radial"===n.value)return void(r=hr.RADIAL_GRADIENT)}if(n.type===h.FUNCTION)if("from"===n.name){var s=sr.parse(n.values[0]);t.push({stop:Jt,color:s})}else if("to"===n.name){var s=sr.parse(n.values[0]);t.push({stop:Wt,color:s})}else if("color-stop"===n.name){var o=n.values.filter(kt);if(2===o.length){var s=sr.parse(o[1]),i=o[0];Ot(i)&&t.push({stop:{type:h.PERCENTAGE_TOKEN,number:100*i.number,flags:i.flags},color:s})}}}),r===hr.LINEAR_GRADIENT?{angle:(e+nr(180))%nr(360),stops:t,type:r}:{size:s,shape:n,stops:t,position:o,type:r}},Wr="closest-side",Yr="farthest-side",qr="closest-corner",jr="farthest-corner",Zr="circle",$r="ellipse",An="cover",en="contain",tn=function(A){var e=nn.CIRCLE,t=Bn.FARTHEST_CORNER,r=[],n=[];return xt(A).forEach(function(A,s){var o=!0;if(0===s){var i=!1;o=A.reduce(function(A,r){if(i)if(St(r))switch(r.value){case"center":return n.push(Gt),A;case"top":case"left":return n.push(Jt),A;case"right":case"bottom":return n.push(Wt),A}else(Vt(r)||zt(r))&&n.push(r);else if(St(r))switch(r.value){case Zr:return e=nn.CIRCLE,!1;case $r:return e=nn.ELLIPSE,!1;case"at":return i=!0,!1;case Wr:return t=Bn.CLOSEST_SIDE,!1;case An:case Yr:return t=Bn.FARTHEST_SIDE,!1;case en:case qr:return t=Bn.CLOSEST_CORNER,!1;case jr:return t=Bn.FARTHEST_CORNER,!1}else if(zt(r)||Vt(r))return Array.isArray(t)||(t=[]),t.push(r),!1;return A},o)}if(o){var B=Ur(A);r.push(B)}}),{size:t,shape:e,stops:r,position:n,type:hr.RADIAL_GRADIENT}},rn=function(A){var e=nn.CIRCLE,t=Bn.FARTHEST_CORNER,r=[],n=[];return xt(A).forEach(function(A,s){var o=!0;if(0===s?o=A.reduce(function(A,e){if(St(e))switch(e.value){case"center":return n.push(Gt),!1;case"top":case"left":return n.push(Jt),!1;case"right":case"bottom":return n.push(Wt),!1}else if(Vt(e)||zt(e))return n.push(e),!1;return A},o):1===s&&(o=A.reduce(function(A,r){if(St(r))switch(r.value){case Zr:return e=nn.CIRCLE,!1;case $r:return e=nn.ELLIPSE,!1;case en:case Wr:return t=Bn.CLOSEST_SIDE,!1;case Yr:return t=Bn.FARTHEST_SIDE,!1;case qr:return t=Bn.CLOSEST_CORNER,!1;case An:case jr:return t=Bn.FARTHEST_CORNER,!1}else if(zt(r)||Vt(r))return Array.isArray(t)||(t=[]),t.push(r),!1;return A},o)),o){var i=Ur(A);r.push(i)}}),{size:t,shape:e,stops:r,position:n,type:hr.RADIAL_GRADIENT}};!function(A){A[A.URL=0]="URL",A[A.LINEAR_GRADIENT=1]="LINEAR_GRADIENT",A[A.RADIAL_GRADIENT=2]="RADIAL_GRADIENT"}(hr||(hr={}));var nn,sn=function(A){return A.type===hr.LINEAR_GRADIENT},on=function(A){return A.type===hr.RADIAL_GRADIENT};!function(A){A[A.CIRCLE=0]="CIRCLE",A[A.ELLIPSE=1]="ELLIPSE"}(nn||(nn={}));var Bn;!function(A){A[A.CLOSEST_SIDE=0]="CLOSEST_SIDE",A[A.FARTHEST_SIDE=1]="FARTHEST_SIDE",A[A.CLOSEST_CORNER=2]="CLOSEST_CORNER",A[A.FARTHEST_CORNER=3]="FARTHEST_CORNER"}(Bn||(Bn={}));var an,cn={name:"image",parse:function(A){if(A.type===h.URL_TOKEN){var e={url:A.value,type:hr.URL};return Dr.getInstance().addImage(A.value),e}if(A.type===h.FUNCTION){var t=un[A.name];if("undefined"==typeof t)throw new Error('Attempting to parse an unsupported image function "'+A.name+'"');return t(A.values)}throw new Error("Unsupported image type")}},un={"linear-gradient":Nr,"-moz-linear-gradient":Kr,"-ms-linear-gradient":Kr,"-o-linear-gradient":Kr,"-webkit-linear-gradient":Kr,"radial-gradient":tn,"-moz-radial-gradient":rn,"-ms-radial-gradient":rn,"-o-radial-gradient":rn,"-webkit-radial-gradient":rn,"-webkit-gradient":Gr},Qn={name:"background-image",initialValue:"none",type:JA.LIST,prefix:!1,parse:function(A){if(0===A.length)return[];var e=A[0];return e.type===h.IDENT_TOKEN&&"none"===e.value?[]:A.filter(function(A){return kt(A)&&n(A)}).map(cn.parse)}},ln={name:"background-origin",initialValue:"border-box",prefix:!1,type:JA.LIST,parse:function(A){return A.map(function(A){if(St(A))switch(A.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},wn={name:"background-position",initialValue:"0% 0%",type:JA.LIST,prefix:!1,parse:function(A){return xt(A).map(function(A){return A.filter(Vt)}).map(Xt)}};!function(A){A[A.REPEAT=0]="REPEAT",A[A.NO_REPEAT=1]="NO_REPEAT",A[A.REPEAT_X=2]="REPEAT_X",A[A.REPEAT_Y=3]="REPEAT_Y"}(an||(an={}));var hn,gn={name:"background-repeat",initialValue:"repeat",prefix:!1,type:JA.LIST,parse:function(A){return xt(A).map(function(A){return A.filter(St).map(function(A){return A.value}).join(" ")}).map(dn)}},dn=function(A){switch(A){case"no-repeat":return an.NO_REPEAT;case"repeat-x":case"repeat no-repeat":return an.REPEAT_X;case"repeat-y":case"no-repeat repeat":return an.REPEAT_Y;case"repeat":default:return an.REPEAT}};!function(A){A.AUTO="auto",A.CONTAIN="contain",A.COVER="cover"}(hn||(hn={}));var Un,Cn={name:"background-size",initialValue:"0",prefix:!1,type:JA.LIST,parse:function(A){return xt(A).map(function(A){return A.filter(fn)})}},fn=function(A){return St(A)||Vt(A)},En=function(A){return{name:"border-"+A+"-color",initialValue:"transparent",prefix:!1,type:JA.TYPE_VALUE,format:"color"}},Fn=En("top"),pn=En("right"),Hn=En("bottom"),Nn=En("left"),Kn=function(A){return{name:"border-radius-"+A,initialValue:"0 0",prefix:!1,type:JA.LIST,parse:function(A){return Xt(A.filter(Vt))}}},mn=Kn("top-left"),bn=Kn("top-right"),vn=Kn("bottom-right"),In=Kn("bottom-left");!function(A){A[A.NONE=0]="NONE",A[A.SOLID=1]="SOLID"}(Un||(Un={}));var Tn,Rn=function(A){return{name:"border-"+A+"-style",initialValue:"solid",prefix:!1,type:JA.IDENT_VALUE,parse:function(A){switch(A){case"none":return Un.NONE}return Un.SOLID}}},yn=Rn("top"),Ln=Rn("right"),On=Rn("bottom"),Sn=Rn("left"),Dn=function(A){return{name:"border-"+A+"-width",initialValue:"0",type:JA.VALUE,prefix:!1,parse:function(A){return Lt(A)?A.number:0}}},Mn=Dn("top"),_n=Dn("right"),kn=Dn("bottom"),xn=Dn("left"),Pn={name:"color",initialValue:"transparent",prefix:!1,type:JA.TYPE_VALUE,format:"color"},zn={name:"display",initialValue:"inline-block",prefix:!1,type:JA.LIST,parse:function(A){return A.filter(St).reduce(function(A,e){return A|Vn(e.value)},0)}},Vn=function(A){switch(A){case"block":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0};!function(A){A[A.NONE=0]="NONE",A[A.LEFT=1]="LEFT",A[A.RIGHT=2]="RIGHT",A[A.INLINE_START=3]="INLINE_START",A[A.INLINE_END=4]="INLINE_END"}(Tn||(Tn={}));var Xn,Jn={name:"float",initialValue:"none",prefix:!1,type:JA.IDENT_VALUE,parse:function(A){switch(A){case"left":return Tn.LEFT;case"right":return Tn.RIGHT;case"inline-start":return Tn.INLINE_START;case"inline-end":return Tn.INLINE_END}return Tn.NONE}},Gn={name:"letter-spacing",initialValue:"0",prefix:!1,type:JA.VALUE,parse:function(A){return A.type===h.IDENT_TOKEN&&"normal"===A.value?0:A.type===h.NUMBER_TOKEN?A.number:A.type===h.DIMENSION_TOKEN?A.number:0}};!function(A){A.NORMAL="normal",A.STRICT="strict"}(Xn||(Xn={}));var Wn,Yn={name:"line-break",initialValue:"normal",prefix:!1,type:JA.IDENT_VALUE,parse:function(A){switch(A){case"strict":return Xn.STRICT;case"normal":default:return Xn.NORMAL}}},qn={name:"line-height",initialValue:"normal",prefix:!1,type:JA.TOKEN_VALUE},jn=function(A,e){return St(A)&&"normal"===A.value?1.2*e:A.type===h.NUMBER_TOKEN?e*A.number:Vt(A)?qt(A,e):e},Zn={name:"list-style-image",initialValue:"none",type:JA.VALUE,prefix:!1,parse:function(A){return A.type===h.IDENT_TOKEN&&"none"===A.value?null:cn.parse(A)}};!function(A){A[A.INSIDE=0]="INSIDE",A[A.OUTSIDE=1]="OUTSIDE"}(Wn||(Wn={}));var $n,As={name:"list-style-position",initialValue:"outside",prefix:!1,type:JA.IDENT_VALUE,parse:function(A){switch(A){case"inside":return Wn.INSIDE;case"outside":default:return Wn.OUTSIDE}}};!function(A){A[A.NONE=-1]="NONE",A[A.DISC=0]="DISC",A[A.CIRCLE=1]="CIRCLE",A[A.SQUARE=2]="SQUARE",A[A.DECIMAL=3]="DECIMAL",A[A.CJK_DECIMAL=4]="CJK_DECIMAL",A[A.DECIMAL_LEADING_ZERO=5]="DECIMAL_LEADING_ZERO",A[A.LOWER_ROMAN=6]="LOWER_ROMAN",A[A.UPPER_ROMAN=7]="UPPER_ROMAN",A[A.LOWER_GREEK=8]="LOWER_GREEK",A[A.LOWER_ALPHA=9]="LOWER_ALPHA",A[A.UPPER_ALPHA=10]="UPPER_ALPHA",A[A.ARABIC_INDIC=11]="ARABIC_INDIC",A[A.ARMENIAN=12]="ARMENIAN",A[A.BENGALI=13]="BENGALI",A[A.CAMBODIAN=14]="CAMBODIAN",A[A.CJK_EARTHLY_BRANCH=15]="CJK_EARTHLY_BRANCH",A[A.CJK_HEAVENLY_STEM=16]="CJK_HEAVENLY_STEM",A[A.CJK_IDEOGRAPHIC=17]="CJK_IDEOGRAPHIC",A[A.DEVANAGARI=18]="DEVANAGARI",A[A.ETHIOPIC_NUMERIC=19]="ETHIOPIC_NUMERIC",A[A.GEORGIAN=20]="GEORGIAN",A[A.GUJARATI=21]="GUJARATI",A[A.GURMUKHI=22]="GURMUKHI",A[A.HEBREW=22]="HEBREW",A[A.HIRAGANA=23]="HIRAGANA",A[A.HIRAGANA_IROHA=24]="HIRAGANA_IROHA",A[A.JAPANESE_FORMAL=25]="JAPANESE_FORMAL",A[A.JAPANESE_INFORMAL=26]="JAPANESE_INFORMAL",A[A.KANNADA=27]="KANNADA",A[A.KATAKANA=28]="KATAKANA",A[A.KATAKANA_IROHA=29]="KATAKANA_IROHA",A[A.KHMER=30]="KHMER",A[A.KOREAN_HANGUL_FORMAL=31]="KOREAN_HANGUL_FORMAL",A[A.KOREAN_HANJA_FORMAL=32]="KOREAN_HANJA_FORMAL",A[A.KOREAN_HANJA_INFORMAL=33]="KOREAN_HANJA_INFORMAL",A[A.LAO=34]="LAO",A[A.LOWER_ARMENIAN=35]="LOWER_ARMENIAN",A[A.MALAYALAM=36]="MALAYALAM",A[A.MONGOLIAN=37]="MONGOLIAN",A[A.MYANMAR=38]="MYANMAR",A[A.ORIYA=39]="ORIYA",A[A.PERSIAN=40]="PERSIAN",A[A.SIMP_CHINESE_FORMAL=41]="SIMP_CHINESE_FORMAL",A[A.SIMP_CHINESE_INFORMAL=42]="SIMP_CHINESE_INFORMAL",A[A.TAMIL=43]="TAMIL",A[A.TELUGU=44]="TELUGU",A[A.THAI=45]="THAI",A[A.TIBETAN=46]="TIBETAN",A[A.TRAD_CHINESE_FORMAL=47]="TRAD_CHINESE_FORMAL",A[A.TRAD_CHINESE_INFORMAL=48]="TRAD_CHINESE_INFORMAL",A[A.UPPER_ARMENIAN=49]="UPPER_ARMENIAN",A[A.DISCLOSURE_OPEN=50]="DISCLOSURE_OPEN",A[A.DISCLOSURE_CLOSED=51]="DISCLOSURE_CLOSED"}($n||($n={}));var es,ts={name:"list-style-type",initialValue:"none",prefix:!1,type:JA.IDENT_VALUE,parse:function(A){switch(A){case"disc":return $n.DISC;case"circle":return $n.CIRCLE;case"square":return $n.SQUARE;case"decimal":return $n.DECIMAL;case"cjk-decimal":return $n.CJK_DECIMAL;case"decimal-leading-zero":return $n.DECIMAL_LEADING_ZERO;case"lower-roman":return $n.LOWER_ROMAN;case"upper-roman":return $n.UPPER_ROMAN;case"lower-greek":return $n.LOWER_GREEK;case"lower-alpha":return $n.LOWER_ALPHA;case"upper-alpha":return $n.UPPER_ALPHA;case"arabic-indic":return $n.ARABIC_INDIC;case"armenian":return $n.ARMENIAN;case"bengali":return $n.BENGALI;case"cambodian":return $n.CAMBODIAN;case"cjk-earthly-branch":return $n.CJK_EARTHLY_BRANCH;case"cjk-heavenly-stem":return $n.CJK_HEAVENLY_STEM;case"cjk-ideographic":return $n.CJK_IDEOGRAPHIC;case"devanagari":return $n.DEVANAGARI;case"ethiopic-numeric":return $n.ETHIOPIC_NUMERIC;case"georgian":return $n.GEORGIAN;case"gujarati":return $n.GUJARATI;case"gurmukhi":return $n.GURMUKHI;case"hebrew":return $n.HEBREW;case"hiragana":return $n.HIRAGANA;case"hiragana-iroha":return $n.HIRAGANA_IROHA;case"japanese-formal":return $n.JAPANESE_FORMAL;case"japanese-informal":return $n.JAPANESE_INFORMAL;case"kannada":return $n.KANNADA;case"katakana":return $n.KATAKANA;case"katakana-iroha":return $n.KATAKANA_IROHA;case"khmer":return $n.KHMER;case"korean-hangul-formal":return $n.KOREAN_HANGUL_FORMAL;case"korean-hanja-formal":return $n.KOREAN_HANJA_FORMAL;case"korean-hanja-informal":return $n.KOREAN_HANJA_INFORMAL;case"lao":return $n.LAO;case"lower-armenian":return $n.LOWER_ARMENIAN;case"malayalam":return $n.MALAYALAM;case"mongolian":return $n.MONGOLIAN;case"myanmar":return $n.MYANMAR;case"oriya":return $n.ORIYA;case"persian":return $n.PERSIAN;case"simp-chinese-formal":return $n.SIMP_CHINESE_FORMAL;case"simp-chinese-informal":return $n.SIMP_CHINESE_INFORMAL;case"tamil":return $n.TAMIL;case"telugu":return $n.TELUGU;case"thai":return $n.THAI;case"tibetan":return $n.TIBETAN;case"trad-chinese-formal":return $n.TRAD_CHINESE_FORMAL;case"trad-chinese-informal":return $n.TRAD_CHINESE_INFORMAL;case"upper-armenian":return $n.UPPER_ARMENIAN;case"disclosure-open":return $n.DISCLOSURE_OPEN;case"disclosure-closed":return $n.DISCLOSURE_CLOSED;case"none":default:return $n.NONE}}},rs=function(A){return{name:"margin-"+A,initialValue:"0",prefix:!1,type:JA.TOKEN_VALUE}},ns=rs("top"),ss=rs("right"),os=rs("bottom"),is=rs("left");!function(A){A[A.VISIBLE=0]="VISIBLE",A[A.HIDDEN=1]="HIDDEN",A[A.SCROLL=2]="SCROLL",A[A.AUTO=3]="AUTO"}(es||(es={}));var Bs,as={name:"overflow",initialValue:"visible",prefix:!1,type:JA.LIST,parse:function(A){return A.filter(St).map(function(A){switch(A.value){case"hidden":return es.HIDDEN;case"scroll":return es.SCROLL;case"auto":return es.AUTO;case"visible":default:return es.VISIBLE}})}};!function(A){A.NORMAL="normal",A.BREAK_WORD="break-word"}(Bs||(Bs={}));var cs,us={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:JA.IDENT_VALUE,parse:function(A){switch(A){case"break-word":return Bs.BREAK_WORD;case"normal":default:return Bs.NORMAL}}},Qs=function(A){return{name:"padding-"+A,initialValue:"0",prefix:!1,type:JA.TYPE_VALUE,format:"length-percentage"}},ls=Qs("top"),ws=Qs("right"),hs=Qs("bottom"),gs=Qs("left");!function(A){A[A.LEFT=0]="LEFT",A[A.CENTER=1]="CENTER",A[A.RIGHT=2]="RIGHT"}(cs||(cs={}));var ds,Us={name:"text-align",initialValue:"left",prefix:!1,type:JA.IDENT_VALUE,parse:function(A){switch(A){case"right":return cs.RIGHT;case"center":case"justify":return cs.CENTER;case"left":default:return cs.LEFT}}};!function(A){A[A.STATIC=0]="STATIC",A[A.RELATIVE=1]="RELATIVE",A[A.ABSOLUTE=2]="ABSOLUTE",A[A.FIXED=3]="FIXED",A[A.STICKY=4]="STICKY"}(ds||(ds={}));var Cs,fs={name:"position",initialValue:"static",prefix:!1,type:JA.IDENT_VALUE,parse:function(A){switch(A){case"relative":return ds.RELATIVE;case"absolute":return ds.ABSOLUTE;case"fixed":return ds.FIXED;case"sticky":return ds.STICKY}return ds.STATIC}},Es={name:"text-shadow",initialValue:"none",type:JA.LIST,prefix:!1,parse:function(A){return 1===A.length&&Mt(A[0],"none")?[]:xt(A).map(function(A){for(var e={color:lr.TRANSPARENT,offsetX:Jt,offsetY:Jt,blur:Jt},t=0,r=0;r1?1:0],this.overflowWrap=to(us,A.overflowWrap),this.paddingTop=to(ls,A.paddingTop),this.paddingRight=to(ws,A.paddingRight),this.paddingBottom=to(hs,A.paddingBottom),this.paddingLeft=to(gs,A.paddingLeft),this.position=to(fs,A.position),this.textAlign=to(Us,A.textAlign),this.textDecorationColor=to(Ds,A.textDecorationColor||A.color),this.textDecorationLine=to(Ms,A.textDecorationLine),this.textShadow=to(Es,A.textShadow),this.textTransform=to(ps,A.textTransform),this.transform=to(Hs,A.transform),this.transformOrigin=to(Is,A.transformOrigin),this.visibility=to(Rs,A.visibility),this.wordBreak=to(Ls,A.wordBreak),this.zIndex=to(Os,A.zIndex)}return A.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===Fs.VISIBLE},A.prototype.isTransparent=function(){return or(this.backgroundColor)},A.prototype.isTransformed=function(){return null!==this.transform},A.prototype.isPositioned=function(){return this.position!==ds.STATIC},A.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},A.prototype.isFloating=function(){return this["float"]!==Tn.NONE},A.prototype.isInlineLevel=function(){return Js(this.display,4)||Js(this.display,33554432)||Js(this.display,268435456)||Js(this.display,536870912)||Js(this.display,67108864)||Js(this.display,134217728)},A}(),Ao=function(){function A(A){this.content=to(Gs,A.content),this.quotes=to(qs,A.quotes)}return A}(),eo=function(){function A(A){this.counterIncrement=to(Ws,A.counterIncrement),this.counterReset=to(Ys,A.counterReset)}return A}(),to=function(A,e){var t=new Rt,r=null!==e&&"undefined"!=typeof e?e.toString():A.initialValue;t.write(r);var n=new yt(t.read());switch(A.type){case JA.IDENT_VALUE:var s=n.parseComponentValue();return A.parse(St(s)?s.value:A.initialValue);case JA.VALUE:return A.parse(n.parseComponentValue());case JA.LIST:return A.parse(n.parseComponentValues());case JA.TOKEN_VALUE:return n.parseComponentValue();case JA.TYPE_VALUE:switch(A.format){case"angle":return er.parse(n.parseComponentValue());case"color":return sr.parse(n.parseComponentValue());case"image":return cn.parse(n.parseComponentValue());case"length":var o=n.parseComponentValue();return zt(o)?o:Jt;case"length-percentage":var i=n.parseComponentValue();return Vt(i)?i:Jt}}throw new Error("Attempting to parse unsupported css format type "+A.format)},ro=function(){function A(A){this.styles=new $s(window.getComputedStyle(A,null)),this.textNodes=[],this.elements=[],null!==this.styles.transform&&xo(A)&&(A.style.transform="none"),this.bounds=B(A),this.flags=0}return A}(),no=function(){function A(A,e){this.text=A,this.bounds=e}return A}(),so=function(A,e,t){var r=Bo(A,e),n=[],s=0;return r.forEach(function(A){if(e.textDecorationLine.length||A.trim().length>0)if(Or.SUPPORT_RANGE_BOUNDS)n.push(new no(A,io(t,s,A.length)));else{var r=t.splitText(A.length);n.push(new no(A,oo(t))),t=r}else Or.SUPPORT_RANGE_BOUNDS||(t=t.splitText(A.length));s+=A.length}),n},oo=function(A){var e=A.ownerDocument;if(e){var t=e.createElement("html2canvaswrapper");t.appendChild(A.cloneNode(!0));var r=A.parentNode;if(r){r.replaceChild(t,A);var n=B(t);return t.firstChild&&r.replaceChild(t.firstChild,t),n}}return new i(0,0,0,0)},io=function(A,e,t){var r=A.ownerDocument;if(!r)throw new Error("Node has no owner document");var n=r.createRange();return n.setStart(A,e),n.setEnd(A,e+t),i.fromClientRect(n.getBoundingClientRect())},Bo=function(A,e){return 0!==e.letterSpacing?c(A).map(function(A){return u(A)}):ao(A,e)},ao=function(A,e){for(var t,r=XA(A,{lineBreak:e.lineBreak,wordBreak:e.overflowWrap===Bs.BREAK_WORD?"break-word":e.wordBreak}),n=[];!(t=r.next()).done;)t.value&&n.push(t.value.slice());return n},co=function(){function A(A,e){this.text=uo(A.data,e.textTransform),this.textBounds=so(this.text,e,A)}return A}(),uo=function(A,e){switch(e){case Cs.LOWERCASE:return A.toLowerCase();case Cs.CAPITALIZE:return A.replace(Qo,lo);case Cs.UPPERCASE:return A.toUpperCase();default:return A}},Qo=/(^|\s|:|-|\(|\))([a-z])/g,lo=function(A,e,t){return A.length>0?e+t.toUpperCase():A},wo=function(e){function t(A){var t=e.call(this,A)||this;return t.src=A.currentSrc||A.src,t.intrinsicWidth=A.naturalWidth,t.intrinsicHeight=A.naturalHeight,Dr.getInstance().addImage(t.src),t}return A(t,e),t}(ro),ho=function(e){function t(A){var t=e.call(this,A)||this;return t.canvas=A,t.intrinsicWidth=A.width,t.intrinsicHeight=A.height,t}return A(t,e),t}(ro),go=function(e){function t(A){var t=e.call(this,A)||this,r=new XMLSerializer;return t.svg="data:image/svg+xml,"+encodeURIComponent(r.serializeToString(A)),t.intrinsicWidth=A.width.baseVal.value,t.intrinsicHeight=A.height.baseVal.value,Dr.getInstance().addImage(t.svg),t}return A(t,e),t}(ro),Uo=function(e){function t(A){var t=e.call(this,A)||this;return t.value=A.value,t}return A(t,e),t}(ro),Co=function(e){function t(A){var t=e.call(this,A)||this;return t.start=A.start,t.reversed="boolean"==typeof A.reversed&&A.reversed===!0,t}return A(t,e),t}(ro),fo=[{type:h.DIMENSION_TOKEN,flags:0,unit:"px",number:3}],Eo=[{type:h.PERCENTAGE_TOKEN,flags:0,number:50}],Fo=function(A){return A.width>A.height?new i(A.left+(A.width-A.height)/2,A.top,A.height,A.height):A.width0)e.textNodes.push(new co(r,e.styles));else if(ko(r)){var s=Oo(r);s.styles.isVisible()&&(Do(r,s,t)?s.flags|=4:Mo(s.styles)&&(s.flags|=2),yo.indexOf(r.tagName)!==-1&&(s.flags|=8),e.elements.push(s),$o(r)||Jo(r)||Ai(r)||vB(r,s,t))}},Oo=function(A){return Yo(A)?new wo(A):Wo(A)?new ho(A):Jo(A)?new go(A):Po(A)?new Uo(A):zo(A)?new Co(A):Vo(A)?new bo(A):Ai(A)?new vo(A):$o(A)?new Io(A):qo(A)?new Ro(A):new ro(A)},So=function(A){var e=Oo(A);return e.flags|=4,Lo(A,e,e),e},Do=function(A,e,t){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||Go(A)&&t.styles.isTransparent()},Mo=function(A){return A.isPositioned()||A.isFloating()},_o=function(A){return A.nodeType===Node.TEXT_NODE},ko=function(A){return A.nodeType===Node.ELEMENT_NODE},xo=function(A){return"undefined"!=typeof A.style},Po=function(A){return"LI"===A.tagName},zo=function(A){return"OL"===A.tagName},Vo=function(A){return"INPUT"===A.tagName},Xo=function(A){return"HTML"===A.tagName},Jo=function(A){return"svg"===A.tagName},Go=function(A){return"BODY"===A.tagName},Wo=function(A){return"CANVAS"===A.tagName},Yo=function(A){return"IMG"===A.tagName},qo=function(A){return"IFRAME"===A.tagName},jo=function(A){return"STYLE"===A.tagName},Zo=function(A){return"SCRIPT"===A.tagName},$o=function(A){return"TEXTAREA"===A.tagName},Ai=function(A){return"SELECT"===A.tagName},ei=function(){function A(){this.counters={}}return A.prototype.getCounterValue=function(A){var e=this.counters[A];return e&&e.length?e[e.length-1]:1},A.prototype.getCounterValues=function(A){var e=this.counters[A];return e?e:[]},A.prototype.pop=function(A){var e=this;A.forEach(function(A){return e.counters[A].pop()})},A.prototype.parse=function(A){var e=this,t=A.counterIncrement,r=A.counterReset,n=!0;null!==t&&t.forEach(function(A){var t=e.counters[A.counter];t&&0!==A.increment&&(n=!1,t[Math.max(0,t.length-1)]+=A.increment)});var s=[];return n&&r.forEach(function(A){var t=e.counters[A.counter];s.push(A.counter),t||(t=e.counters[A.counter]=[]),t.push(A.reset)}),s},A}(),ti={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},ri={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},ni={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},si={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},oi=function(A,e,t,r,n,s){return At?Ci(A,n,s.length>0):r.integers.reduce(function(e,t,n){for(;A>=t;)A-=t,e+=r.values[n];return e},"")+s},ii=function(A,e,t,r){var n="";do t||A--,n=r(A)+n,A/=e;while(A*e>=e);return n},Bi=function(A,e,t,r,n){var s=t-e+1;return(A<0?"-":"")+(ii(Math.abs(A),s,r,function(A){return u(Math.floor(A%s)+e)})+n)},ai=function(A,e,t){void 0===t&&(t=". ");var r=e.length;return ii(Math.abs(A),r,!1,function(A){return e[Math.floor(A%r)]})+t},ci=1,ui=2,Qi=4,li=8,wi=function(A,e,t,r,n,s){if(A<-9999||A>9999)return Ci(A,$n.CJK_DECIMAL,n.length>0);var o=Math.abs(A),i=n;if(0===o)return e[0]+i;for(var B=0;o>0&&B<=4;B++){var a=o%10;0===a&&Js(s,ci)&&""!==i?i=e[a]+i:a>1||1===a&&0===B||1===a&&1===B&&Js(s,ui)||1===a&&1===B&&Js(s,Qi)&&A>100||1===a&&B>1&&Js(s,li)?i=e[a]+(B>0?t[B-1]:"")+i:1===a&&B>0&&(i=t[B-1]+i),o=Math.floor(o/10)}return(A<0?r:"")+i},hi="十百千萬",gi="拾佰仟萬",di="マイナス",Ui="마이너스",Ci=function(A,e,t){var r=t?". ":"",n=t?"、":"",s=t?", ":"",o=t?" ":"";switch(e){case $n.DISC:return"•"+o;case $n.CIRCLE:return"◦"+o;case $n.SQUARE:return"◾"+o;case $n.DECIMAL_LEADING_ZERO:var i=Bi(A,48,57,!0,r);return i.length<4?"0"+i:i;case $n.CJK_DECIMAL:return ai(A,"〇一二三四五六七八九",n);case $n.LOWER_ROMAN:return oi(A,1,3999,ti,$n.DECIMAL,r).toLowerCase();case $n.UPPER_ROMAN:return oi(A,1,3999,ti,$n.DECIMAL,r);case $n.LOWER_GREEK:return Bi(A,945,969,!1,r);case $n.LOWER_ALPHA:return Bi(A,97,122,!1,r);case $n.UPPER_ALPHA:return Bi(A,65,90,!1,r);case $n.ARABIC_INDIC:return Bi(A,1632,1641,!0,r);case $n.ARMENIAN:case $n.UPPER_ARMENIAN:return oi(A,1,9999,ri,$n.DECIMAL,r);case $n.LOWER_ARMENIAN:return oi(A,1,9999,ri,$n.DECIMAL,r).toLowerCase();case $n.BENGALI:return Bi(A,2534,2543,!0,r);case $n.CAMBODIAN:case $n.KHMER:return Bi(A,6112,6121,!0,r);case $n.CJK_EARTHLY_BRANCH:return ai(A,"子丑寅卯辰巳午未申酉戌亥",n);case $n.CJK_HEAVENLY_STEM:return ai(A,"甲乙丙丁戊己庚辛壬癸",n);case $n.CJK_IDEOGRAPHIC:case $n.TRAD_CHINESE_INFORMAL:return wi(A,"零一二三四五六七八九",hi,"負",n,ui|Qi|li);case $n.TRAD_CHINESE_FORMAL:return wi(A,"零壹貳參肆伍陸柒捌玖",gi,"負",n,ci|ui|Qi|li);case $n.SIMP_CHINESE_INFORMAL:return wi(A,"零一二三四五六七八九",hi,"负",n,ui|Qi|li);case $n.SIMP_CHINESE_FORMAL:return wi(A,"零壹贰叁肆伍陆柒捌玖",gi,"负",n,ci|ui|Qi|li);case $n.JAPANESE_INFORMAL:return wi(A,"〇一二三四五六七八九","十百千万",di,n,0);case $n.JAPANESE_FORMAL:return wi(A,"零壱弐参四伍六七八九","拾百千万",di,n,ci|ui|Qi);case $n.KOREAN_HANGUL_FORMAL:return wi(A,"영일이삼사오육칠팔구","십백천만",Ui,s,ci|ui|Qi);case $n.KOREAN_HANJA_INFORMAL:return wi(A,"零一二三四五六七八九","十百千萬",Ui,s,0);case $n.KOREAN_HANJA_FORMAL:return wi(A,"零壹貳參四五六七八九","拾百千",Ui,s,ci|ui|Qi);case $n.DEVANAGARI:return Bi(A,2406,2415,!0,r);case $n.GEORGIAN:return oi(A,1,19999,si,$n.DECIMAL,r);case $n.GUJARATI:return Bi(A,2790,2799,!0,r);case $n.GURMUKHI:return Bi(A,2662,2671,!0,r);case $n.HEBREW:return oi(A,1,10999,ni,$n.DECIMAL,r);case $n.HIRAGANA:return ai(A,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case $n.HIRAGANA_IROHA:return ai(A,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case $n.KANNADA:return Bi(A,3302,3311,!0,r);case $n.KATAKANA:return ai(A,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",n);case $n.KATAKANA_IROHA:return ai(A,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",n);case $n.LAO:return Bi(A,3792,3801,!0,r);case $n.MONGOLIAN:return Bi(A,6160,6169,!0,r);case $n.MYANMAR:return Bi(A,4160,4169,!0,r);case $n.ORIYA:return Bi(A,2918,2927,!0,r);case $n.PERSIAN:return Bi(A,1776,1785,!0,r);case $n.TAMIL:return Bi(A,3046,3055,!0,r);case $n.TELUGU:return Bi(A,3174,3183,!0,r);case $n.THAI:return Bi(A,3664,3673,!0,r);case $n.TIBETAN:return Bi(A,3872,3881,!0,r);case $n.DECIMAL:default:return Bi(A,48,57,!0,r)}},fi="data-html2canvas-ignore",Ei=function(){function A(A,e){if(this.options=e,this.scrolledElements=[],this.referenceElement=A,this.counters=new ei,this.quoteDepth=0,!A.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(A.ownerDocument.documentElement)}return A.prototype.toIFrame=function(A,r){var n=this,s=pi(A,r);if(!s.contentWindow)return Promise.reject("Unable to find iframe window");var o=A.defaultView.pageXOffset,i=A.defaultView.pageYOffset,B=s.contentWindow,a=B.document,c=Hi(s).then(function(){return e(n,void 0,void 0,function(){var A;return t(this,function(e){switch(e.label){case 0:return this.scrolledElements.forEach(bi),B&&(B.scrollTo(r.left,r.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||B.scrollY===r.top&&B.scrollX===r.left||(a.documentElement.style.top=-r.top+"px",a.documentElement.style.left=-r.left+"px",a.documentElement.style.position="absolute")),A=this.options.onclone,"undefined"==typeof this.clonedReferenceElement?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:a.fonts&&a.fonts.ready?[4,a.fonts.ready]:[3,2];case 1:e.sent(),e.label=2;case 2:return"function"==typeof A?[2,Promise.resolve().then(function(){return A(a)}).then(function(){return s})]:[2,s]}})})});return a.open(),a.write(Ki(document.doctype)+""),mi(this.referenceElement.ownerDocument,o,i),a.replaceChild(a.adoptNode(this.documentElement),a.documentElement),a.close(),c},A.prototype.createElementClone=function(A){return Wo(A)?this.createCanvasClone(A):jo(A)?this.createStyleClone(A):A.cloneNode(!1)},A.prototype.createStyleClone=function(A){try{var e=A.sheet;if(e&&e.cssRules){var t=[].slice.call(e.cssRules,0).reduce(function(A,e){return e&&"string"==typeof e.cssText?A+e.cssText:A},""),r=A.cloneNode(!1);return r.textContent=t,r}}catch(n){if(Sr.getInstance(this.options.id).error("Unable to access cssRules property",n),"SecurityError"!==n.name)throw n}return A.cloneNode(!1)},A.prototype.createCanvasClone=function(A){if(this.options.inlineImages&&A.ownerDocument){var e=A.ownerDocument.createElement("img");try{return e.src=A.toDataURL(),e}catch(t){Sr.getInstance(this.options.id).info("Unable to clone canvas contents, canvas is tainted")}}var r=A.cloneNode(!1);try{r.width=A.width,r.height=A.height;var n=A.getContext("2d"),s=r.getContext("2d");return s&&(n?s.putImageData(n.getImageData(0,0,A.width,A.height),0,0):s.drawImage(A,0,0)),r}catch(t){}return r},A.prototype.cloneNode=function(A){if(_o(A))return document.createTextNode(A.data);if(!A.ownerDocument)return A.cloneNode(!1);var e=A.ownerDocument.defaultView;if(xo(A)&&e){var t=this.createElementClone(A),r=e.getComputedStyle(A),n=e.getComputedStyle(A,":before"),s=e.getComputedStyle(A,":after");this.referenceElement===A&&(this.clonedReferenceElement=t),Go(t)&&Li(t);for(var o=this.counters.parse(new eo(r)),i=this.resolvePseudoContent(A,t,n,Vs.BEFORE),B=A.firstChild;B;B=B.nextSibling)ko(B)&&(Zo(B)||B.hasAttribute(fi)||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(B))||this.options.copyStyles&&ko(B)&&jo(B)||t.appendChild(this.cloneNode(B));i&&t.insertBefore(i,t.firstChild);var a=this.resolvePseudoContent(A,t,s,Vs.AFTER);return a&&t.appendChild(a),this.counters.pop(o),r&&this.options.copyStyles&&!qo(A)&&Ni(r,t),0===A.scrollTop&&0===A.scrollLeft||this.scrolledElements.push([t,A.scrollLeft,A.scrollTop]),($o(A)||Ai(A))&&($o(t)||Ai(t))&&(t.value=A.value),t}return A.cloneNode(!1)},A.prototype.resolvePseudoContent=function(A,e,t,r){var n=this;if(t){var s=t.content,o=e.ownerDocument;if(o&&s&&"none"!==s&&"-moz-alt-content"!==s&&"none"!==t.display){this.counters.parse(new eo(t));var i=new Ao(t),B=o.createElement("html2canvaspseudoelement");return Ni(t,B),i.content.forEach(function(e){if(e.type===h.STRING_TOKEN)B.appendChild(o.createTextNode(e.value));else if(e.type===h.URL_TOKEN){var t=o.createElement("img");t.src=e.value,t.style.opacity="1",B.appendChild(t)}else if(e.type===h.FUNCTION){if("attr"===e.name){var r=e.values.filter(St);r.length&&B.appendChild(o.createTextNode(A.getAttribute(r[0].value)||""))}else if("counter"===e.name){var s=e.values.filter(kt),a=s[0],c=s[1];if(a&&St(a)){var u=n.counters.getCounterValue(a.value),Q=c&&St(c)?ts.parse(c.value):$n.DECIMAL;B.appendChild(o.createTextNode(Ci(u,Q,!1)))}}else if("counters"===e.name){var l=e.values.filter(kt),a=l[0],w=l[1],c=l[2];if(a&&St(a)){var g=n.counters.getCounterValues(a.value),d=c&&St(c)?ts.parse(c.value):$n.DECIMAL,U=w&&w.type===h.STRING_TOKEN?w.value:"",C=g.map(function(A){return Ci(A,d,!1)}).join(U);B.appendChild(o.createTextNode(C))}}}else if(e.type===h.IDENT_TOKEN)switch(e.value){case"open-quote":B.appendChild(o.createTextNode(js(i.quotes,n.quoteDepth++,!0)));break;case"close-quote":B.appendChild(o.createTextNode(js(i.quotes,--n.quoteDepth,!1)));break;default:B.appendChild(o.createTextNode(e.value))}}),B.className=Ti+" "+Ri,e.className+=r===Vs.BEFORE?" "+Ti:" "+Ri,B}}},A.destroy=function(A){return!!A.parentNode&&(A.parentNode.removeChild(A),!0)},A}();!function(A){A[A.BEFORE=0]="BEFORE",A[A.AFTER=1]="AFTER"}(Vs||(Vs={}));var Fi,pi=function(A,e){var t=A.createElement("iframe");return t.className="html2canvas-container",t.style.visibility="hidden",t.style.position="fixed",t.style.left="-10000px",t.style.top="0px",t.style.border="0",t.width=e.width.toString(),t.height=e.height.toString(),t.scrolling="no",t.setAttribute(fi,"true"),A.body.appendChild(t),t},Hi=function(A){return new Promise(function(e,t){var r=A.contentWindow;if(!r)return t("No window assigned for iframe");var n=r.document;r.onload=A.onload=n.onreadystatechange=function(){r.onload=A.onload=n.onreadystatechange=null;var t=setInterval(function(){n.body.childNodes.length>0&&"complete"===n.readyState&&(clearInterval(t),e(A))},50)}})},Ni=function(A,e){for(var t=A.length-1;t>=0;t--){var r=A.item(t);"content"!==r&&e.style.setProperty(r,A.getPropertyValue(r))}return e},Ki=function(A){var e="";return A&&(e+=""),e},mi=function(A,e,t){A&&A.defaultView&&(e!==A.defaultView.pageXOffset||t!==A.defaultView.pageYOffset)&&A.defaultView.scrollTo(e,t)},bi=function(A){var e=A[0],t=A[1],r=A[2];e.scrollLeft=t,e.scrollTop=r},vi=":before",Ii=":after",Ti="___html2canvas___pseudoelement_before",Ri="___html2canvas___pseudoelement_after",yi='{\n content: "" !important;\n display: none !important;\n}',Li=function(A){Oi(A,"."+Ti+vi+yi+"\n ."+Ri+Ii+yi)},Oi=function(A,e){var t=A.ownerDocument;if(t){var r=t.createElement("style");r.textContent=e,A.appendChild(r)}};!function(A){A[A.VECTOR=0]="VECTOR",A[A.BEZIER_CURVE=1]="BEZIER_CURVE"}(Fi||(Fi={}));var Si,Di=function(A,e){return A.length===e.length&&A.some(function(A,t){return A===e[t]})},Mi=function(A,e,t,r,n){return A.map(function(A,s){switch(s){case 0:return A.add(e,t);case 1:return A.add(e+r,t);case 2:return A.add(e+r,t+n);case 3:return A.add(e,t+n)}return A})},_i=function(){function A(A,e){this.type=Fi.VECTOR,this.x=A,this.y=e}return A.prototype.add=function(e,t){return new A(this.x+e,this.y+t)},A}(),ki=function(A,e,t){return new _i(A.x+(e.x-A.x)*t,A.y+(e.y-A.y)*t)},xi=function(){function A(A,e,t,r){this.type=Fi.BEZIER_CURVE,this.start=A,this.startControl=e,this.endControl=t,this.end=r}return A.prototype.subdivide=function(e,t){var r=ki(this.start,this.startControl,e),n=ki(this.startControl,this.endControl,e),s=ki(this.endControl,this.end,e),o=ki(r,n,e),i=ki(n,s,e),B=ki(o,i,e);return t?new A(this.start,r,o,B):new A(B,i,s,this.end)},A.prototype.add=function(e,t){return new A(this.start.add(e,t),this.startControl.add(e,t),this.endControl.add(e,t),this.end.add(e,t))},A.prototype.reverse=function(){return new A(this.end,this.endControl,this.startControl,this.start)},A}(),Pi=function(A){return A.type===Fi.BEZIER_CURVE},zi=function(){function A(A){var e=A.styles,t=A.bounds,r=Yt(e.borderTopLeftRadius,t.width,t.height),n=r[0],s=r[1],o=Yt(e.borderTopRightRadius,t.width,t.height),i=o[0],B=o[1],a=Yt(e.borderBottomRightRadius,t.width,t.height),c=a[0],u=a[1],Q=Yt(e.borderBottomLeftRadius,t.width,t.height),l=Q[0],w=Q[1],h=[];h.push((n+i)/t.width),h.push((l+c)/t.width),h.push((s+w)/t.height),h.push((B+u)/t.height);var g=Math.max.apply(Math,h);g>1&&(n/=g,s/=g,i/=g,B/=g,c/=g,u/=g,l/=g,w/=g);var d=t.width-i,U=t.height-u,C=t.width-c,f=t.height-w,E=e.borderTopWidth,F=e.borderRightWidth,p=e.borderBottomWidth,H=e.borderLeftWidth,N=qt(e.paddingTop,A.bounds.width),K=qt(e.paddingRight,A.bounds.width),m=qt(e.paddingBottom,A.bounds.width),b=qt(e.paddingLeft,A.bounds.width);this.topLeftBorderBox=n>0||s>0?Vi(t.left,t.top,n,s,Si.TOP_LEFT):new _i(t.left,t.top),this.topRightBorderBox=i>0||B>0?Vi(t.left+d,t.top,i,B,Si.TOP_RIGHT):new _i(t.left+t.width,t.top),this.bottomRightBorderBox=c>0||u>0?Vi(t.left+C,t.top+U,c,u,Si.BOTTOM_RIGHT):new _i(t.left+t.width,t.top+t.height),this.bottomLeftBorderBox=l>0||w>0?Vi(t.left,t.top+f,l,w,Si.BOTTOM_LEFT):new _i(t.left,t.top+t.height),this.topLeftPaddingBox=n>0||s>0?Vi(t.left+H,t.top+E,Math.max(0,n-H),Math.max(0,s-E),Si.TOP_LEFT):new _i(t.left+H,t.top+E),this.topRightPaddingBox=i>0||B>0?Vi(t.left+Math.min(d,t.width+H),t.top+E,d>t.width+H?0:i-H,B-E,Si.TOP_RIGHT):new _i(t.left+t.width-F,t.top+E),this.bottomRightPaddingBox=c>0||u>0?Vi(t.left+Math.min(C,t.width-H),t.top+Math.min(U,t.height+E),Math.max(0,c-F),u-p,Si.BOTTOM_RIGHT):new _i(t.left+t.width-F,t.top+t.height-p),this.bottomLeftPaddingBox=l>0||w>0?Vi(t.left+H,t.top+f,Math.max(0,l-H),w-p,Si.BOTTOM_LEFT):new _i(t.left+H,t.top+t.height-p),this.topLeftContentBox=n>0||s>0?Vi(t.left+H+b,t.top+E+N,Math.max(0,n-(H+b)),Math.max(0,s-(E+N)),Si.TOP_LEFT):new _i(t.left+H+b,t.top+E+N),this.topRightContentBox=i>0||B>0?Vi(t.left+Math.min(d,t.width+H+b),t.top+E+N,d>t.width+H+b?0:i-H+b,B-(E+N),Si.TOP_RIGHT):new _i(t.left+t.width-(F+K),t.top+E+N),this.bottomRightContentBox=c>0||u>0?Vi(t.left+Math.min(C,t.width-(H+b)),t.top+Math.min(U,t.height+E+N),Math.max(0,c-(F+K)),u-(p+m),Si.BOTTOM_RIGHT):new _i(t.left+t.width-(F+K),t.top+t.height-(p+m)),this.bottomLeftContentBox=l>0||w>0?Vi(t.left+H+b,t.top+f,Math.max(0,l-(H+b)),w-(p+m),Si.BOTTOM_LEFT):new _i(t.left+H+b,t.top+t.height-(p+m))}return A}();!function(A){A[A.TOP_LEFT=0]="TOP_LEFT",A[A.TOP_RIGHT=1]="TOP_RIGHT",A[A.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",A[A.BOTTOM_LEFT=3]="BOTTOM_LEFT"}(Si||(Si={}));var Vi=function(A,e,t,r,n){var s=4*((Math.sqrt(2)-1)/3),o=t*s,i=r*s,B=A+t,a=e+r;switch(n){case Si.TOP_LEFT:return new xi(new _i(A,a),new _i(A,a-i),new _i(B-o,e),new _i(B,e));case Si.TOP_RIGHT:return new xi(new _i(A,e),new _i(A+o,e),new _i(B,a-i),new _i(B,a));case Si.BOTTOM_RIGHT:return new xi(new _i(B,e),new _i(B,e+i),new _i(A+o,a),new _i(A,a));case Si.BOTTOM_LEFT:default:return new xi(new _i(B,a),new _i(B-o,a),new _i(A,e+i),new _i(A,e))}},Xi=function(A){return[A.topLeftBorderBox,A.topRightBorderBox,A.bottomRightBorderBox,A.bottomLeftBorderBox]},Ji=function(A){return[A.topLeftContentBox,A.topRightContentBox,A.bottomRightContentBox,A.bottomLeftContentBox]},Gi=function(A){return[A.topLeftPaddingBox,A.topRightPaddingBox,A.bottomRightPaddingBox,A.bottomLeftPaddingBox]},Wi=function(){function A(A,e,t){this.type=0,this.offsetX=A,this.offsetY=e,this.matrix=t,this.target=6}return A}(),Yi=function(){function A(A,e){this.type=1,this.target=e,this.path=A}return A}(),qi=function(A){return 0===A.type},ji=function(A){return 1===A.type},Zi=function(){function A(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return A}(),$i=function(){function A(A,e){if(this.container=A,this.effects=e.slice(0),this.curves=new zi(A),null!==A.styles.transform){var t=A.bounds.left+A.styles.transformOrigin[0].number,r=A.bounds.top+A.styles.transformOrigin[1].number,n=A.styles.transform;this.effects.push(new Wi(t,r,n))}if(A.styles.overflowX!==es.VISIBLE){var s=Xi(this.curves),o=Gi(this.curves);Di(s,o)?this.effects.push(new Yi(s,6)):(this.effects.push(new Yi(s,2)),this.effects.push(new Yi(o,4)))}}return A.prototype.getParentEffects=function(){var A=this.effects.slice(0);if(this.container.styles.overflowX!==es.VISIBLE){var e=Xi(this.curves),t=Gi(this.curves);Di(e,t)||A.push(new Yi(t,6))}return A},A}(),AB=function IB(A,e,t,r){A.container.elements.forEach(function(n){var s=Js(n.flags,4),o=Js(n.flags,2),i=new $i(n,A.getParentEffects());Js(n.styles.display,2048)&&r.push(i);var B=Js(n.flags,8)?[]:r;if(s||o){var a=s||n.styles.isPositioned()?t:e,c=new Zi(i);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var u=n.styles.zIndex.order;if(u<0){var Q=0;a.negativeZIndex.some(function(A,e){return u>A.element.container.styles.zIndex.order?(Q=e,!1):Q>0}),a.negativeZIndex.splice(Q,0,c)}else if(u>0){var l=0;a.positiveZIndex.some(function(A,e){return u>A.element.container.styles.zIndex.order?(l=e+1,!1):l>0}),a.positiveZIndex.splice(l,0,c)}else a.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else n.styles.isFloating()?a.nonPositionedFloats.push(c):a.nonPositionedInlineLevel.push(c);IB(i,c,s?c:t,B)}else n.styles.isInlineLevel()?e.inlineLevel.push(i):e.nonInlineLevel.push(i),IB(i,e,t,B);Js(n.flags,8)&&eB(n,B)})},eB=function(A,e){for(var t=A instanceof Co?A.start:1,r=A instanceof Co&&A.reversed,n=0;n0&&A.intrinsicHeight>0){var r=oB(A),n=Gi(e);this.path(n),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(t,0,0,A.intrinsicWidth,A.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},A.prototype.renderNodeContent=function(r){return e(this,void 0,void 0,function(){var e,n,s,o,B,a,c,u,c,Q,l,w,h,g,d,U,C,c,f,E,g;return t(this,function(t){switch(t.label){case 0:this.applyEffects(r.effects,4),e=r.container,n=r.curves,s=e.styles,o=0,B=e.textNodes,t.label=1;case 1:return o0&&l>0&&(w=n.ctx.createPattern(F,"repeat"),n.renderRepeat(a,w,c,u))):on(r)&&(N=aB(A,e,[null,null,null]),a=N[0],K=N[1],m=N[2],Q=N[3],l=N[4],b=0===r.position.length?[Gt]:r.position,c=qt(b[0],Q),u=qt(b[b.length-1],l),v=Hr(r,c,u,Q,l),I=v[0],T=v[1],I>0&&I>0&&(R=n.ctx.createRadialGradient(K+c,m+u,0,K+c,m+u,I),Cr(r.stops,2*I).forEach(function(A){return R.addColorStop(A.stop,ir(A.color))}),n.path(a),n.ctx.fillStyle=R,I!==T?(y=A.bounds.left+.5*A.bounds.width,L=A.bounds.top+.5*A.bounds.height,O=T/I,S=1/O,n.ctx.save(),n.ctx.translate(y,L),n.ctx.transform(1,0,0,O,0,0),n.ctx.translate(-y,-L),n.ctx.fillRect(K,S*(m-L)+L,Q,l*S),n.ctx.restore()):n.ctx.fill())),t.label=6;case 6:return e--,[2]}})},n=this,s=0,o=A.styles.backgroundImage.slice(0).reverse(),B.label=1;case 1:return s",{"class":"feedback-spinner"}))},u=function(){e(".feedback-spinner").remove()};e.feedback=function(A){function s(){R=!1,e(document).off("mouseenter mouseleave",".feedback-helper"),e(document).off("mouseup keyup"),e(document).off("mousedown",".feedback-setblackout"),e(document).off("mousedown",".feedback-sethighlight"),e(document).off("mousedown click","#feedback-close"),e(document).off("mousedown","#feedback-canvas"),e(document).off("click","#feedback-highlighter-next"),e(document).off("click","#feedback-highlighter-back"),e(document).off("click","#feedback-welcome-next"),e(document).off("click","#feedback-overview-back"),e(document).off("mouseleave","body"),e(document).off("mouseenter",".feedback-helper"),e(document).off("selectstart dragstart",document),e("#feedback-module").off("click",".feedback-wizard-close,.feedback-close-btn"),e(document).off("click","#feedback-submit"),h.highlightElement&&(e(document).off("click","#feedback-canvas"),e(document).off("mousemove","#feedback-canvas")),e('[data-highlighted="true"]').removeAttr("data-highlight-id").removeAttr("data-highlighted"),e("#feedback-module").remove(),e(".feedback-btn").show(),h.onClose.call(this)}function Q(A,t){t="undefined"==typeof t||t,A.clearRect(0,0,e("#feedback-canvas").width(),e("#feedback-canvas").height()),A.fillStyle="rgba(102,102,102,0.5)",A.fillRect(0,0,e("#feedback-canvas").width(),e("#feedback-canvas").height()),e(".feedback-helper").each(function(){"highlight"==e(this).attr("data-type")&&t&&l(A,parseInt(e(this).css("left"),10),parseInt(e(this).css("top"),10),e(this).width(),e(this).height())}),e(".feedback-helper").each(function(){"highlight"==e(this).attr("data-type")&&A.clearRect(parseInt(e(this).css("left"),10),parseInt(e(this).css("top"),10),e(this).width(),e(this).height())}),e(".feedback-helper").each(function(){"blackout"==e(this).attr("data-type")&&(A.fillStyle="rgba(0,0,0,1)",A.fillRect(parseInt(e(this).css("left"),10),parseInt(e(this).css("top"),10),e(this).width(),e(this).height()))})}function l(A,e,t,r,n){A.strokeStyle=h.strokeStyle,A.shadowColor=h.shadowColor,A.shadowOffsetX=h.shadowOffsetX,A.shadowOffsetY=h.shadowOffsetY,A.shadowBlur=h.shadowBlur,A.lineJoin=h.lineJoin,A.lineWidth=h.lineWidth,A.strokeRect(e,t,r,n),A.shadowOffsetX=0,A.shadowOffsetY=0,A.shadowBlur=0,A.lineWidth=1}var w=B(A.i18nProperties||i),h=e.extend({ajaxURL:"",postBrowserInfo:!0,postHTML:!0,postURL:!0,proxy:void 0,letterRendering:!1,descriptionTemplate:"",initButtonText:w.send_feedback,strokeStyle:"black",shadowColor:"black",shadowOffsetX:1,shadowOffsetY:1,shadowBlur:10,lineJoin:"bevel",lineWidth:3,feedbackButton:".feedback-btn",isDraggable:!0,onScreenshotTaken:function(){},tpl:{highlighter:a(t.highlighter,w),overview:a(t.overview,w),submitSuccess:a(t.submitSuccess,w),submitError:a(t.submitError,w)},onClose:function(){},screenshotStroke:!0,highlightElement:!0},A),g=!!window.HTMLCanvasElement,d=".feedback-btn"==h.feedbackButton,U=void 0,C=void 0,f=void 0,E=void 0,F=void 0,p=void 0,H=void 0,N=void 0,K=void 0,m=void 0,b=void 0,v=void 0,I=void 0,T=void 0,R=void 0;g&&(d&&e("body").append('"),e(document).on("click",h.feedbackButton,function(){e("div[tabindex='-1']").removeAttr("tabindex"),d&&e(this).hide();var A=!1,t="",i=e(document).height(),B=e(document).width(),a='
';a+=h.tpl.highlighter+h.tpl.overview+'
',e("body").append(a);var w=new o(e("#feedback-highlighter").get(0)),g=new o(e("#feedback-highlighter").get(0).parentNode);if(U={position:"absolute",left:"0px",top:"0px"},C={width:B,height:i},e("#feedback-module").css(U),e("#feedback-canvas").attr(C).css("z-index","30000"),e("#feedback-highlighter-back").remove(),A=!0,e("#feedback-canvas").css("cursor","crosshair"),e("#feedback-helpers").show(),e("#feedback-welcome").hide(),e("#feedback-highlighter").show(),h.isDraggable){var R=null;w.on_pointer_events(function(A){var t=A.touches?A.touches[0]:A,r=e("#feedback-highlighter").addClass("feedback-draggable"),n=r.outerHeight(),s=r.outerWidth(),o=r.offset().top+n-t.pageY,i=r.offset().left+s-t.pageX;r.css("z-index",4e4),R=function(A){var t=A.touches?A.touches[0]:A;f=t.pageY+o-n,E=t.pageX+i-s,F=n-t.pageY,p=s-t.pageX,E<0&&(E=0),f<0&&(f=0),p>e(window).width()&&(E=e(window).width()-s),E>e(window).width()-s&&(E=e(window).width()-s),F>e(document).height()&&(f=e(document).height()-n),f>e(document).height()-n&&(f=e(document).height()-n),e(".feedback-draggable").offset({top:f,left:E}).on("mouseup",function(){e(this).removeClass("feedback-draggable")})},g.on_pointer_events(R,"move"),A.preventDefault()},"down").on_pointer_events(function(A){e("#feedback-highlighter").removeClass("feedback-draggable"),g.off_pointer_events(R,"move")},"up")}var y=e("#feedback-canvas")[0].getContext("2d");if(y.fillStyle="rgba(102,102,102,0.5)",y.fillRect(0,0,e("#feedback-canvas").width(),e("#feedback-canvas").height()),H={},N=!1,K=1,m={},h.postBrowserInfo&&(m.browser={},m.browser.appCodeName=navigator.appCodeName,m.browser.appName=navigator.appName,m.browser.appVersion=navigator.appVersion,m.browser.cookieEnabled=navigator.cookieEnabled,m.browser.onLine=navigator.onLine,m.browser.platform=navigator.platform,m.browser.userAgent=navigator.userAgent,m.browser.plugins=[],e.each(navigator.plugins,function(A){m.browser.plugins.push(navigator.plugins[A].name)}),e("#feedback-browser-info").show()),h.postURL&&(m.url=document.URL,e("#feedback-page-info").show()),h.postHTML&&(m.html=e("html").html(),e("#feedback-page-structure").show()),h.postBrowserInfo||h.postURL||h.postHTML||e("#feedback-additional-none").show(),e(document).on("mousedown","#feedback-canvas",function(t){A&&(H.startX=t.pageX-e(this).offset().left,H.startY=t.pageY-e(this).offset().top,H.w=0,H.h=0,N=!0)}),e(document).on("mouseup",function(){if(A){N=!1;var t=H.startY,r=H.startX,n=H.w,s=H.h;if(b="highlight",0==n||0==s)return;n<0&&(r+=n,n*=-1),s<0&&(t+=s,s*=-1),t+s>e(document).height()&&(s=e(document).height()-t),r+n>e(document).width()&&(n=e(document).width()-r),0==K&&(b="blackout"),e("#feedback-helpers").append(''),Q(y),H.w=0}}),e(document).on("mousemove",function(t){A&&N&&(e("#feedback-highlighter").css("cursor","default"),H.w=t.pageX-e("#feedback-canvas").offset().left-H.startX,H.h=t.pageY-e("#feedback-canvas").offset().top-H.startY,y.clearRect(0,0,e("#feedback-canvas").width(),e("#feedback-canvas").height()),y.fillStyle="rgba(102,102,102,0.5)",y.fillRect(0,0,e("#feedback-canvas").width(),e("#feedback-canvas").height()),e(".feedback-helper").each(function(){"highlight"==e(this).attr("data-type")&&l(y,parseInt(e(this).css("left"),10),parseInt(e(this).css("top"),10),e(this).width(),e(this).height())}),1==K&&(l(y,H.startX,H.startY,H.w,H.h),y.clearRect(H.startX,H.startY,H.w,H.h)),e(".feedback-helper").each(function(){"highlight"==e(this).attr("data-type")&&y.clearRect(parseInt(e(this).css("left"),10),parseInt(e(this).css("top"),10),e(this).width(),e(this).height())}),e(".feedback-helper").each(function(){"blackout"==e(this).attr("data-type")&&(y.fillStyle="rgba(0,0,0,1)",y.fillRect(parseInt(e(this).css("left"),10),parseInt(e(this).css("top"),10),e(this).width(),e(this).height()))}),0==K&&(y.fillStyle="rgba(0,0,0,0.5)",y.fillRect(H.startX,H.startY,H.w,H.h)))}),h.highlightElement){var L=[],O=[],S=0;e(document).on("mousemove click","#feedback-canvas",function(t){if(A){Q(y),O=[],e("#feedback-canvas").css("cursor","crosshair"),e("* :not(body,script,iframe,div,section,.feedback-btn,#feedback-module *)").each(function(){"true"!==e(this).attr("data-highlighted")&&t.pageX>e(this).offset().left&&t.pageXe(this).offset().top+parseInt(e(this).css("padding-top"),10)&&t.pageY