Version Description
- Bug: Fix fatal DateTimeZone error for older versions of PHP (GH#654)
Download this release
Release Info
Developer | Blue Liquid Designs |
Plugin | Gravity PDF |
Version | 4.2.1 |
Comparing to | |
See all releases |
Code changes from version 3.1.2 to 4.2.1
- CHANGELOG.txt +427 -0
- README.txt +288 -228
- api.php +635 -0
- bower_components/backbone.modelbinder/.bower.json +27 -0
- bower_components/backbone.modelbinder/Backbone.ModelBinder.min.js +5 -0
- bower_components/backbone.modelbinder/README.md +875 -0
- bower_components/backbone.modelbinder/component.json +15 -0
- bower_components/backbone.modelbinder/package.json +37 -0
- configuration.php +0 -300
- dist/assets/css/.gitkeep +0 -0
- dist/assets/css/gfpdf-admin-styles.min.css +1 -0
- dist/assets/css/gfpdf-styles.min.css +1 -0
- dist/assets/js/.gitkeep +0 -0
- dist/assets/js/app.bundle.min.js +1 -0
- dist/assets/js/gfpdf-backbone.min.js +1 -0
- dist/assets/js/gfpdf-entries.min.js +1 -0
- dist/assets/js/gfpdf-migration.min.js +1 -0
- dist/assets/js/gfpdf-settings.min.js +1 -0
- dist/assets/js/vendor.bundle.min.js +1 -0
- images/_notes/dwsync.xml +0 -5
- images/gravityformspdfextended.jpg +0 -0
- initialisation/README.txt +4 -0
- initialisation/template.css +173 -0
- installation-update-manager.php +0 -668
- mPDF.zip +0 -0
- pdf-common.php +0 -232
- pdf-configuration-indexer.php +0 -245
- pdf-entry-detail.php +0 -1165
- pdf-render.php +0 -253
- pdf-settings.php +0 -242
- pdf.php +419 -699
- render_to_pdf.php +0 -71
- resources/README.txt +4 -0
- {images → resources/images}/alpha.gif +0 -0
- {images → resources/images}/alpha.png +0 -0
- {images → resources/images}/alpha3.png +0 -0
- {images → resources/images}/bayeux1.jpg +0 -0
- {images → resources/images}/bg.jpg +0 -0
- {images → resources/images}/bgbarcode.png +0 -0
- {images → resources/images}/bgrock.jpg +0 -0
- {images → resources/images}/borders2FF.jpg +0 -0
- {images → resources/images}/borders2IE.jpg +0 -0
- {images → resources/images}/borders3FF.jpg +0 -0
- {images → resources/images}/borders3IE.jpg +0 -0
- {images → resources/images}/borders4FF.jpg +0 -0
- {images → resources/images}/borders4IE.jpg +0 -0
- {images → resources/images}/bordersFF.jpg +0 -0
- {images → resources/images}/bordersIE.jpg +0 -0
- {images → resources/images}/bordersMPDF2.jpg +0 -0
- {images → resources/images}/clematis.jpg +0 -0
- {images → resources/images}/firefox-48.png +0 -0
- {images → resources/images}/flowers-pattern.jpg +0 -0
- {images → resources/images}/goto.gif +0 -0
- resources/images/gravityformspdfextended.jpg +0 -0
- {images → resources/images}/img1.png +0 -0
- {images → resources/images}/img2.png +0 -0
- {images → resources/images}/img3.png +0 -0
- {images → resources/images}/img4.png +0 -0
- {images → resources/images}/img5.png +0 -0
- {images → resources/images}/klematis.jpg +0 -0
- {images → resources/images}/loading.gif +0 -0
- {images → resources/images}/mpdfstyleA4.css +0 -0
- {images → resources/images}/mpdfstylePaged.css +0 -0
- {images → resources/images}/mpdfstyletables.css +0 -0
- {images → resources/images}/quran282.jpg +0 -0
- {images → resources/images}/signature.png +0 -0
- {images → resources/images}/sunset.jpg +0 -0
- {images → resources/images}/sunsetv.jpg +0 -0
- {images → resources/images}/tiger.bmp +0 -0
- {images → resources/images}/tiger.gif +0 -0
- {images → resources/images}/tiger.jpg +0 -0
- {images → resources/images}/tiger.png +0 -0
- {images → resources/images}/tiger.svg +0 -0
- {images → resources/images}/tiger.wmf +0 -0
- {images → resources/images}/tiger2.png +0 -0
- {images → resources/images}/tiger2.wmf +0 -0
- {images → resources/images}/tiger24trns.png +0 -0
- {images → resources/images}/tiger300px300dpi.jpg +0 -0
- {images → resources/images}/tiger300px300dpi.png +0 -0
- {images → resources/images}/tiger300px72dpi.jpg +0 -0
- {images → resources/images}/tiger300px96dpi.jpg +0 -0
- {images → resources/images}/tiger300px96dpi.png +0 -0
- {images → resources/images}/tiger8trns.gif +0 -0
- {images → resources/images}/tiger8trns.png +0 -0
- {images → resources/images}/tigercmyk.jpg +0 -0
- {images → resources/images}/windmill.jpg +0 -0
- src/assets/css/gfpdf-admin-styles.css +17 -0
- src/assets/css/gfpdf-styles.css +983 -0
- src/assets/images/cap-paws-sitting.png +0 -0
- src/assets/images/gravitypdf-globe-black.png +0 -0
- src/assets/images/gravitypdf-globe-white.png +0 -0
- src/assets/images/paws-with-logo-small.png +0 -0
- src/assets/images/updating-advanced-template-selector.png +0 -0
- src/assets/images/updating-four-columns.png +0 -0
- src/assets/images/updating-merge-tags.png +0 -0
- src/assets/images/welcome-download-shortcode.png +0 -0
- src/assets/images/welcome-individual-pdf-settings.png +0 -0
- src/assets/images/welcome-manage-fonts.png +0 -0
- src/assets/images/welcome-notification-conditional.png +0 -0
- src/assets/images/welcome-pdf-settings-page.png +0 -0
- src/assets/js/gfpdf-backbone.js +1113 -0
- src/assets/js/gfpdf-entries.js +41 -0
- src/assets/js/gfpdf-migration.js +74 -0
- src/assets/js/gfpdf-settings.js +1453 -0
- src/assets/js/react/actionTypes/templates.js +35 -0
- src/assets/js/react/actions/templates.js +137 -0
- src/assets/js/react/bootstrap/templateBootstrap.js +179 -0
- src/assets/js/react/components/Dropzone.js +79 -0
- src/assets/js/react/components/Empty.js +37 -0
- src/assets/js/react/components/ShowMessage.js +167 -0
- src/assets/js/react/components/TemplateActivateButton.js +106 -0
- src/assets/js/react/components/TemplateButton.js +78 -0
- src/assets/js/react/components/TemplateCloseDialog.js +105 -0
- src/assets/js/react/components/TemplateContainer.js +122 -0
- src/assets/js/react/components/TemplateDeleteButton.js +153 -0
- src/assets/js/react/components/TemplateFooterActions.js +106 -0
- src/assets/js/react/components/TemplateHeaderNavigation.js +210 -0
- src/assets/js/react/components/TemplateHeaderTitle.js +49 -0
- src/assets/js/react/components/TemplateList.js +115 -0
- src/assets/js/react/components/TemplateListItem.js +170 -0
- src/assets/js/react/components/TemplateListItemComponents.js +61 -0
- src/assets/js/react/components/TemplateScreenshot.js +52 -0
- src/assets/js/react/components/TemplateScreenshots.js +54 -0
- src/assets/js/react/components/TemplateSearch.js +155 -0
- src/assets/js/react/components/TemplateSingle.js +174 -0
- src/assets/js/react/components/TemplateSingleComponents.js +180 -0
- src/assets/js/react/components/TemplateUploader.js +301 -0
- src/assets/js/react/gfpdf-main.js +63 -0
- src/assets/js/react/reducers/templateReducer.js +155 -0
- src/assets/js/react/router/templateRouter.js +122 -0
- src/assets/js/react/selectors/getTemplates.js +186 -0
- src/assets/js/react/utilities/versionCompare.js +153 -0
- src/assets/languages/README.MD +36 -0
- src/assets/languages/gravity-forms-pdf-extended-en_AU.mo +0 -0
- src/assets/languages/gravity-forms-pdf-extended-en_AU.po +2595 -0
- src/assets/languages/gravity-forms-pdf-extended-en_GB.mo +0 -0
- src/assets/languages/gravity-forms-pdf-extended-en_GB.po +937 -0
CHANGELOG.txt
ADDED
@@ -0,0 +1,427 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
= 3.7.7 =
|
2 |
+
* Bug - Ensure 'gfpdf_post_pdf_save' action gets triggered for all PDFs when resending notifications
|
3 |
+
* Housekeeping - Remove compress.php from mPDF package (unneeded)
|
4 |
+
|
5 |
+
= 3.7.6 =
|
6 |
+
* Bug - Added full support for all Gravity Forms notification events (includes Payment Complete, Payment Refund, Payment Failed, Payment Pending ect)
|
7 |
+
* Bug - Resolve mPDF PHP7 image parsing error due to a change in variable order parsing.
|
8 |
+
|
9 |
+
= 3.7.5 =
|
10 |
+
* Housekeeping - Tweak mPDF package to be PHP7 compatible.
|
11 |
+
|
12 |
+
= 3.7.4 =
|
13 |
+
* Housekeeping - Revert patch made in last update as Gravity Forms 1.9.9 fixes the issue internally.
|
14 |
+
|
15 |
+
= 3.7.3 =
|
16 |
+
* Bug - Gravity Forms 1.9 didn't automatically nl2br paragraph text mergetags. Fixed this issue in custom PDF templates.
|
17 |
+
|
18 |
+
= 3.7.2 =
|
19 |
+
* Bug - Updated $form_data['date_created'], $form_data['date_created_usa'], $form_data['misc']['date_time'], $form_data['misc']['time_24hr'] and $form_data['misc']['time_12hr'] to factor in the website's timezone settings.
|
20 |
+
|
21 |
+
= 3.7.1 =
|
22 |
+
* Housekeeping - Allow control over signature width in default template using the 'gfpdfe_signature_width' filter
|
23 |
+
* Housekeeping - Add better error checking when migrating PDF template folder
|
24 |
+
* Housekeeping - Add unit testing to the directory migration function
|
25 |
+
* Bug - Fixed backwards-compatiiblity PHP error when viewing custom PDF templates on Gravity Forms 1.8.3 or below.
|
26 |
+
* Bug - Ensure checkbox field names are included in the $form_data array
|
27 |
+
|
28 |
+
= 3.7.0 =
|
29 |
+
* Feature - Added 'default-show-section-content' configuration option. You can now display the section break content in the default template. Note: if this option is enabled and the section break is empty it will still be displayed on the PDF.
|
30 |
+
* Feature - Added hooks 'gfpdfe_template_location' and 'gfpdfe_template_location_uri' to change PDF template location
|
31 |
+
* Housekeeping - Migrate your template and configuration files. As of Gravity PDF 3.7 we'll be dropping the 'site_name' folder for single WordPress installs and changing the multisite install directory to the site ID.
|
32 |
+
* Housekeeping - Added $form_data['html_id'] key which has the HTML fields added by their ID (much like the signature_details_id key).
|
33 |
+
* Housekeeping - Add large number of unit tests
|
34 |
+
* Housekeeping - Derestrict certain pages software loads on.
|
35 |
+
* Housekeeping - Split up PDF viewing security components into smaller chunks (easier to unit test)
|
36 |
+
* Housekeeping - Remove CLI-checking override in RAM settings
|
37 |
+
* Housekeeping - Included directory paths by default on the system status page
|
38 |
+
* Housekeeping - Updated configuration.php examples to include new default config option and refined the copy
|
39 |
+
* Bug - Fixed issue initialising plugin when memory limit was set to -1 (unlimited)
|
40 |
+
* Bug - Fix Multisite migration problem where if an error was thrown for one of the sub sites it caused all of the sites to show an error (even if they were successful)
|
41 |
+
* Bug - Fix typo in example-template.php file
|
42 |
+
* Bug - Fix up notices in custom templates when using poll/survey/quiz add ons.
|
43 |
+
* Bug - Fix up notice in custom template when the form description is empty
|
44 |
+
* Bug - Fix up notices in mPDF template when using headers/footers
|
45 |
+
* Bug - Fix up error in PDF when signature field wasn't filled in
|
46 |
+
|
47 |
+
= 3.6.0 =
|
48 |
+
* Feature - Added support for Gravity Form's sub-field middle name (1.9Beta)
|
49 |
+
* Feature - Patch mPDF with full :nth-child support on TD and TR table cells
|
50 |
+
* Feature - Added $form_data[products_totals][subtotal] key (total price without shipping costs added)
|
51 |
+
* Feature - Added formated money to all product fields in the $form_data array
|
52 |
+
* Feature - Default templates: only show fields who's conditional logic is true. Perfect when used with default-show-html
|
53 |
+
* Housekeeping - Move PDF_EXTENDED_TEMPLATES folder to the /wp-content/upload/ directory. Get more info about the move (see http://developer.gravitypdf.com/news/migrating-template-directory-means/)
|
54 |
+
* Housekeeping - Refined when admin resources are loaded
|
55 |
+
* Housekeeping - Fixed typo during initial initialisation
|
56 |
+
* Housekeeping - Switched icons back to FontAwesome which is shipped by default with Gravity Forms
|
57 |
+
* Housekeeping - Display full path to mPDF tmp directory when there are issues writing to it
|
58 |
+
* Housekeeping - Modified font installation message.
|
59 |
+
* Housekeeping - Update example-header-and-footer_06.php and example-advanced-headers_07.php to better reflect current mPDF features
|
60 |
+
* Bug - Fixed issue pulling the correct configuration when multiple nodes were assigned to multiple forms
|
61 |
+
* Bug - Fixed number field formatting issue which always rounded to two decimal places
|
62 |
+
* Bug - Fixed JS namespace issue with WordPress Leads plugin
|
63 |
+
* Bug - Fixed error initialising fonts / backing up PDF_EXTENDED_TEMPLATES directory when using the glob() function
|
64 |
+
* Bug - Fix issue with PHP 5.0 and 5.1 array_replace_recursive function when used with an array inside the $gf_pdf_config array
|
65 |
+
* Bug - Fixed fatal error when logged in user attempts to view PDF they don't have access to
|
66 |
+
* Bug - Fixed issue in $form_data array where single-column list items where being returned as an array and not a HTML list.
|
67 |
+
* Bug - Prevent unauthorised users auto-initialising the software or migrating the templates folder
|
68 |
+
* Bug - Fixed up incorrect formatting issue when using custom font name
|
69 |
+
* Bug - Fixed issue displaying Times New Roman in PDF templates
|
70 |
+
|
71 |
+
= 3.5.11.1 =
|
72 |
+
* Bug - Fix issue saving and sending blank PDFs due to security fix
|
73 |
+
|
74 |
+
= 3.5.11 =
|
75 |
+
* Bug - Fix security issue which gave unauthorised users access to Gravity Form entires
|
76 |
+
|
77 |
+
= 3.5.10 =
|
78 |
+
* Housekeeping - Include individual scoring for Gravity Form Survey Likert field in the $form_data['survey'] array
|
79 |
+
* Bug - Fix fatal error when Gravity Forms isn't activated, but Gravity PDF is.
|
80 |
+
|
81 |
+
= 3.5.9 =
|
82 |
+
* Bug - Rollback recent changes that introduced the GFAPI as introduces errors for older versions of Gravity Forms. Will reintroduce in next major release and increase the minimum Gravity Forms version.
|
83 |
+
|
84 |
+
= 3.5.8 =
|
85 |
+
* Bug - Fixed issue affected some users where a depreciated function was causing a fatal error
|
86 |
+
|
87 |
+
= 3.5.7 =
|
88 |
+
* Bug - Fixed issue where the PDF settings page was blank for some users
|
89 |
+
|
90 |
+
= 3.5.6 =
|
91 |
+
* Bug - Fixed issue with last release that affected checks to see if Gravity Forms has submitting
|
92 |
+
* Bug - Fixed fatal error with servers using PHP5.2 or lower
|
93 |
+
* Bug - Fixed E_NOTICE for replacement array_replace_recursive() function in PHP5.2 or lower
|
94 |
+
* Bug - Fixed issue with AJAX spinner showing when submitting support request
|
95 |
+
|
96 |
+
= 3.5.5 =
|
97 |
+
* Housekeeping - Include French translation (thanks to Marie-Aude Koiransky-Ballouk)
|
98 |
+
* Housekeeping - Wrap 'Initialise Fonts' text in translation ready _e() function
|
99 |
+
* Housekeeping - Tidy up System Status CSS styles to accomidate translation text lengths
|
100 |
+
* Housekeeping - Fix E_NOTICE when viewing entry details page when form has no PDF configuration
|
101 |
+
* Bug - Fixed load_plugin_textdomain which was incorrectly called.
|
102 |
+
* Bug - Correctly check if the plugin is loaded correctly before letting the PDF class fully load
|
103 |
+
|
104 |
+
= 3.5.4 =
|
105 |
+
* Bug - Fixed issue with incorrect PDF name showing on the entry details page
|
106 |
+
* Bug - Fixed issue with custom fonts being inaccessible without manually reinstalling after upgrading.
|
107 |
+
* Housekeeping - Added in two new filters to modify the $mpdf object. 'gfpdfe_mpdf_class' and 'gfpdfe_mpdf_class_pre_render' (replaces the gfpdfe_pre_render_pdf filter).
|
108 |
+
|
109 |
+
= 3.5.3 =
|
110 |
+
* Bug - Mergetags braces ({}) were being encoded before conversion
|
111 |
+
* Bug - Fixed issue with empty string being passed to array filter
|
112 |
+
* Housekeeping - Enabled mergetag usage in the pdf_password and pdf_master_password configuration options
|
113 |
+
* Housekeeping - Correctly call $wpdb->prepare so the variables in are in the second argument
|
114 |
+
|
115 |
+
= 3.5.2 =
|
116 |
+
* Bug - Initialisation folder .htaccess file was preventing template.css from being loaded by the default templates.
|
117 |
+
|
118 |
+
= 3.5.1 =
|
119 |
+
* Bug - Fixed issue with core fonts Arial/Helvetica, Times/Times New Roman and Courier not displaying in the PDF.
|
120 |
+
* Bug - Fixed display issues for multiple PDFs on the details admin entry page
|
121 |
+
* Housekeeping - Made the details entry page PDF view consistent for single or multiple PDFs
|
122 |
+
* Housekeeping - Ensured all javascript files are minified and are correctly being used
|
123 |
+
* Housekeeping - Remove legacy notices from mPDF package
|
124 |
+
|
125 |
+
= 3.5.0 =
|
126 |
+
* Feature - No longer need to reinitialise every time the software is updated.
|
127 |
+
* Feature - Add auto-initialiser on initial installation for sites that have direct write access to their server files
|
128 |
+
* Feature - Add auto-initialiser on initial installation across entire multisite network for sites who have direct write access to their server files.
|
129 |
+
* Feature - Add auto-PDF_EXTENDED_TEMPLATES theme syncer for sites that have direct write access to their server files
|
130 |
+
* Feature - Correctly added language support. The .PO file is located in the /language/ folder if anyone would like to do a translation.
|
131 |
+
|
132 |
+
* Housekeeping - Restrict initialisation process to 64MB or greater to counter problems with users reporting a 'white screen' when running in a low-RAM environment.
|
133 |
+
* Housekeeping - Refractor the admin notices code
|
134 |
+
* Housekeeping - Create responsive PDF settings page
|
135 |
+
* Housekeeping - Minify CSS and Javascript files
|
136 |
+
* Housekeeping - Remove FontAwesome fonts from package and use Wordpress' build-in 'dashicons'
|
137 |
+
* Housekeeping - Refine action and error messages
|
138 |
+
* Housekeeping - Update initialisation tab copy for both pre- and post- initialisation
|
139 |
+
* Housekeeping - Use Gravity Forms get_ip() function instead of custom function
|
140 |
+
* Housekeeping - The in-built support form uses SSL once again (disabled in the past due to some servers being unable to verify the certificate).
|
141 |
+
|
142 |
+
* Bug - When testing write permissions, file_exist() is throwing false positives for some users which would generate a warning when unlink() is called. Hide warning using '@'.
|
143 |
+
|
144 |
+
= 3.4.1 =
|
145 |
+
* Bug - Fix typo that effected sites running PHP5.2 or below.
|
146 |
+
|
147 |
+
= 3.4.0.3 =
|
148 |
+
* Bug - Define array_replace_recursive() if it doesn't exist, as it is PHP 5.3 only.
|
149 |
+
|
150 |
+
= 3.4.0.2 =
|
151 |
+
* Housekeeping - Wrapped the View PDF and Download buttons in correct language functions - _e()
|
152 |
+
* Bug - Fix problem displaying the signature field
|
153 |
+
* Bug - Fix notice errors with new 'save' PDF hook
|
154 |
+
|
155 |
+
= 3.4.0.1 =
|
156 |
+
* Housekeeping - Add commas on the last line of every config node in the configuration.php file
|
157 |
+
* Housekeeping - Fix up initialisation error messages
|
158 |
+
* Bug - Fix up mPDF bugs - soft hyphens, watermarks over SVG images, inline CSS bug
|
159 |
+
|
160 |
+
= 3.4.0 =
|
161 |
+
* Feature - Added auto-print prompt ability when you add &print=1 to the PDF URL (see https://developer.gravitypdf.com/documentation/display-pdf-in-browser/ for details)
|
162 |
+
* Feature - Added ability to rotate absolute positioned text 180 degrees (previously only 90 and -90). Note: feature in beta
|
163 |
+
* Feature - Backup all template files that are overridden when initialising to a folder inside PDF_EXTENDED_TEMPLATES
|
164 |
+
* Feature - Added SSH initialisation support
|
165 |
+
* Feature - Allow MERGETAGS to be used in all PDF templates, including default template (but only in the HTML field).
|
166 |
+
* Feature - Updated mPDF to 3.7.1
|
167 |
+
* Feature - Enable text/image watermark support. Added new example template example-watermark09.php showing off its usage (see http://gravitypdf.com/documentation-v3-x-x/templates/watermarks/)
|
168 |
+
* Feature - Added full survey, poll and quiz support to both the default template and $form_data (see https://developer.gravitypdf.com/documentation/accessing-survey-poll-quiz-data/)
|
169 |
+
* Feature - Shortcodes will now be processed in all templates, including default template (but only in the HTML field).
|
170 |
+
* Feature - Added 'save' configuration option so PDFs are saved to the local disk when 'notifications' aren't enabled.
|
171 |
+
* Feature - Added 'dpi' configuration option to modify the PDF image DPI. Default 96dpi. Use 300dpi for printing.
|
172 |
+
* Feature - Added PDF/A1-b compliance option. Enable with 'pdfa1b' => true. See http://mpdf1.com/manual/index.php?tid=420&searchstring=pdf/a1-b for more details.
|
173 |
+
* Feature - Added PDF/X1-a compliance option. Enable with 'pdfx1a' => true. See http://mpdf1.com/manual/index.php?tid=481&searchstring=pdf/x-1a for more details.
|
174 |
+
* Feature - Added new constant option 'PDF_REPACK_FONT' which when enabled may improve function with some PostScript printers (disabled by default). Existing sites will need to add define('PDF_REPACK_FONT', true); to the bottom of their configuration.php file.
|
175 |
+
* Feature - Added a sleuth of new hooks and filters for developers. See https://developer.gravitypdf.com/documentation/filters-and-hooks/ for examples.
|
176 |
+
* Feature - Added $form_data['form_description'] key to $form_data array
|
177 |
+
* Feature - Update $form_data['products'] array key to field ID
|
178 |
+
* Feature - Added survey Likert output function for custom templates (much like the product table function). It can be used with the following command 'echo GFPDFEntryDetails::get_likert($form, $lead, $field_id);' where $field_id is substituted for the form field ID.
|
179 |
+
* Feature - Added field descriptions to the $form_data array under the $form_data['field_descriptions'] key.
|
180 |
+
* Feature - Added pre and post PDF generation filters and actions to pdf-render.php. These include gfpdfe_pre_render_pdf, gfpdfe_pdf_output_type, gfpdfe_pdf_filename and gfpdf_post_pdf_save.
|
181 |
+
* Feature: $form_data['signature'] et al. keys now contain the signature width and height attributes
|
182 |
+
|
183 |
+
* Housekeeping - Ensure the form and lead IDs are correctly passed throughout the render functions.
|
184 |
+
* Housekeeping - Update settings page link to match new Gravity Forms URL structure
|
185 |
+
* Housekeeping - Check if $lead['gfsurvey_score'] exists before assigning to $form_data array
|
186 |
+
* Housekeeping - Removed table and font checksum debugging from mPDF when WP_DEBUG enabled as they produced inaccurate results.
|
187 |
+
* Housekeeping - Fixed up mPDF logging location when WP_DEBUG enabled. Files now stored in wp-content/themes/Active_Theme_Folder/PDF_EXTENDED_TEMPLATES/output/ folder.
|
188 |
+
* Housekeeping - Removed API logging locally when WP_DEBUG is enabled.
|
189 |
+
* Housekeeping - Increase API timeout interval as some overseas users reported timeout issues
|
190 |
+
* Housekeeping - Modified mPDF functions Image() and purify_utf8_text() to validate the input data so we don't have to do it every time through the template.
|
191 |
+
* Housekeeping - Added ability to not re-deploy every update (not enabled this release as template files were all updated)
|
192 |
+
* Housekeeping - Additional checks on load to see if any of the required file/folder structure is missing. If so, re-initilise.
|
193 |
+
* Housekeeping - Save resources and turn off automatic rtl identification. Users must set the RTL option when configuring form
|
194 |
+
* Housekeeping - Turn off mPDFs packTableData setting, decreasing processing time when working with large tables.
|
195 |
+
* Housekeeping - $gf_pdf_default_configuration options now merge down into existing PDF nodes, instead of applying to only unassigned forms. $gf_pdf_config settings override any in $gf_pdf_default_configuration
|
196 |
+
* Housekeeping - Center aligned Survey Likery field results
|
197 |
+
* Housekeeping - Partially refactored the pdf-entry-detail.php code
|
198 |
+
* Housekeeping - All default and example templates have been tidied. This won't affect custom templates.
|
199 |
+
* Housekeeping - Set the gform_notification order number to 100 which will prevent other functions (example snippets from Gravity Forms, for instance) from overridding the attached PDF.
|
200 |
+
* Housekeeping - Fix spelling mistake on initialising fonts
|
201 |
+
* Housekeeping - Remove wpautop() function from Gravity Form HTML output, which was applied before rendering and was messing up the HTML markup.
|
202 |
+
* Housekeeping - Remove empty list rows from the $form_data['list'] array in single and multi-column lists.
|
203 |
+
* Housekeeping - Apply same CSS styles (padding, border and line height) to HTML fields as done to form values in default templates
|
204 |
+
* Housekeeping - Replaced arbitrary wrapper IDs in the default templates with the actual field ID
|
205 |
+
|
206 |
+
* Bug - Fixed signature rendering issue when custom signature size was being used
|
207 |
+
* Bug - Fixed static error types in helper/install-update-manager.php file.
|
208 |
+
* Bug - Fixed redeployment error message which wasn't showing correctly
|
209 |
+
* Bug - Fixed issue with PDF not attaching to notification using Paypal's delayed notification feature
|
210 |
+
* Bug - Fixed strict standard warning about calling GFPDF_Settings::settings_page();
|
211 |
+
* Bug - Fixed strict standard warning about calling GFPDFEntryDetail::pdf_get_lead_field_display();
|
212 |
+
* Bug - Fixed issue with Gravity Form Post Category field causing fatal error generating PDF
|
213 |
+
* Bug - Fixed number field formatting issue when displaying on PDF.
|
214 |
+
* Bug - Do additional check for PHP's MB_String regex functions before initialising ti prevent errors after initialising
|
215 |
+
* Bug - Fixed problem with multiple nodes assigned to a form using the same template
|
216 |
+
* Bug - Fixed path to fallback templates when not found
|
217 |
+
* Bug - Fixed problem with master password setting to user password
|
218 |
+
|
219 |
+
|
220 |
+
= 3.3.4 =
|
221 |
+
* Bug - Fixed issue linking to PDF from front end
|
222 |
+
* Housekeeping - Removed autoredirect to initialisation page
|
223 |
+
|
224 |
+
= 3.3.3 =
|
225 |
+
* Bug - Correctly call javascript to control admin area 'View PDFs' drop down
|
226 |
+
* Bug - Some users still reported incorrect RAM. Convert MB/KB/GB values to M/K/G as per the PHP documentation.
|
227 |
+
* Housekeeping - Show initilisation prompt on all admin area pages instead of only on the Gravity Forms pages
|
228 |
+
|
229 |
+
= 3.3.2.1 =
|
230 |
+
* Bug - Incorrectly showing assigned RAM to website
|
231 |
+
|
232 |
+
= 3.3.2 =
|
233 |
+
* Bug - Some hosts reported SSL certificate errors when using the support API. Disabled HTTPS for further investigation. Using hash-based verification for authentication.
|
234 |
+
* Housekeeping - Forgot to disable API debug feature after completing beta
|
235 |
+
|
236 |
+
= 3.3.1 =
|
237 |
+
* Bug - $form_data['list'] was mapped using an incremental key instead of via the field ID
|
238 |
+
|
239 |
+
= 3.3.0 =
|
240 |
+
* Feature - Overhauled the initialisation process so that the software better reviews the host for potential problems before initialisation. This should help debug issues and make users aware there could be a problem before they begin using the software.
|
241 |
+
* Feature - Overhauled the settings page to make it easier to access features of the software
|
242 |
+
* Feature - Added a Support tab to the settings page which allows users to securely (over HTTPS) submit a support ticket to the Gravity PDF support desk
|
243 |
+
* Feature - Changed select, multiselect and radio fields so that the default templates use the name rather than the value. $form_data now also includes the name and values for all these fields.
|
244 |
+
* Feature - $form_data now includes all miscellaneous lead information in the $form_data['misc'] array.
|
245 |
+
* Feature - $form_data now contains 24 and 12 hour time of entry submission.
|
246 |
+
* Feature - Added localisation support
|
247 |
+
* Compatibility - Added new multi-upload support which was added in Gravity Forms 1.8.
|
248 |
+
* Bug - Added 'aid' parametre to the PDF url when multiple configuration nodes present on a single form
|
249 |
+
* Bug - Fixed issue when Gravity Forms in No Conflict Mode
|
250 |
+
* Bug - Font config.php's array keys now in lower case
|
251 |
+
* Housekeeping - Moved all initialisation files to a folder called 'initialisation'.
|
252 |
+
* Housekeeping - Renamed the configuration.php file in the plugin folder to configuration.php.example to alleviate confusion for developers who unwittingly modify the plugin configuration file instead of the file in their active theme's PDF_EXTENDED_TEMPLATES folder.
|
253 |
+
* Housekeeping - Updated the plugin file system to a more MVC-style approach, with model and view folders.
|
254 |
+
* Housekeeping - Removed ability to directly access default and example template files.
|
255 |
+
* Housekeeping - Fixed PHP notices in default templates related to the default template-only configuration options
|
256 |
+
* Housekeeping - Update core styles to match Wordpress 3.8/Gravity Forms 1.8.
|
257 |
+
* Housekeeping - Updated header/footer examples to use @page in example.
|
258 |
+
|
259 |
+
= 3.2.0 =
|
260 |
+
* Feature - Can now view multiple PDFs assigned to a single form via the admin area. Note: You must provide a unique 'filename' parameter in configuration.php for multiple PDFs assigned to a single form.
|
261 |
+
* Feature - You can exclude a field from the default templates using the class name 'exclude'. See our [FAQ topic](https://gravitypdf.com/#faqs) for more details.
|
262 |
+
* Bug - Fixed issue viewing own PDF entry when logged in as anything lower than editor.
|
263 |
+
* Bug - Fixed data return bug in pdf-entry-details.php that was preventing all data returning correctly.
|
264 |
+
* Bug - Fixed PHP Warning when using products with no options
|
265 |
+
* Bug - Fixed issue with invalid characters being added to the PDF filename. Most notably the date mergetag.
|
266 |
+
* Bug - Limit filename length to 150 characters which should work on the majority of web servers.
|
267 |
+
* Bug - Fixed problem sending duplicate PDF when using mass resend notification feature
|
268 |
+
* Deprecated - Removed GF_FORM_ID and GF_LEAD_ID constants which were used in v2.x.x of the software. Ensure you follow [v2.x.x upgrade guide](https://developer.gravitypdf.com/news/version-2-3-migration-guide/) to your templates before upgrading.
|
269 |
+
|
270 |
+
= 3.1.4 =
|
271 |
+
* Bug - Fixed issue with plugin breaking website's when the Gravity Forms plugin wasn't activated.
|
272 |
+
* Housekeeping - The plugin now only supports Gravity Forms 1.7 or higher and Wordpress 3.5 or higher.
|
273 |
+
* Housekeeping - PDF template files can no longer be accessed directly. Instead, add &html=1 to the end of your URL when viewing a PDF.
|
274 |
+
* Extension - Added additional filters to allow the lead ID and notifications to be overridden.
|
275 |
+
|
276 |
+
= 3.1.3 =
|
277 |
+
* Feature - Added signature_details_id to $form_data array which maps a signatures field ID to the array.
|
278 |
+
* Extension - Added pre-PDF generator filter for use with extensions.
|
279 |
+
* Bug - Fixed issue with quotes in entry data breaking custom templates.
|
280 |
+
* Bug - Fixed issue with the plugin not correctly using the new default configuration template, if set.
|
281 |
+
* Bug - Fixed issue with signature not being removed correctly when only testing with file_exists(). Added second is_dir() test.
|
282 |
+
* Bug - Fixed issue with empty signature field not displaying when option 'default-show-empty' is set.
|
283 |
+
* Bug - Fixed initialisation prompt issue when the MPDF package wasn't unpacked.
|
284 |
+
|
285 |
+
= 3.1.2 =
|
286 |
+
* Feature - Added list array, file path, form ID and lead ID to $form_data array in custom templates
|
287 |
+
* Bug - Fixed initialisation prompt issue when updating plugin
|
288 |
+
* Bug - Fixed window.open issue which prevented a new window from opening when viewing a PDF in the admin area
|
289 |
+
* Bug - Fixed issue with product dropdown and radio button data showing the value instead of the name field.
|
290 |
+
* Bug - Fixed incorrect URL pointing to signature in $form_data
|
291 |
+
|
292 |
+
= 3.1.1 =
|
293 |
+
* Bug - Users whose server only supports FTP file manipulation using the WP_Filesystem API moved the files into the wrong directory due to FTP usually being rooted to the Wordpress home directory. To fix this the plugin attempts to determine the FTP directory, otherwise assumes it is the WP base directory.
|
294 |
+
* Bug - Initialisation error message was being called but the success message was also showing.
|
295 |
+
|
296 |
+
= 3.1.0 =
|
297 |
+
* Feature - Added defaults to configuration.php which allows users to define the default PDF settings for all Gravity Forms. See the [installation and configuration documentation](https://developer.gravitypdf.com/documentation/getting-started-with-gravity-pdf-configuration/) for more details.
|
298 |
+
* Feature - Added three new configuration options 'default-show-html', 'default-show-empty' and 'default-show-page-names' which allow different display options to the three default templates. See the [installation and configuration documentation](http://gravitypdf.com/documentation-v3-x-x/installation-and-configuration/#default-template) for more details.
|
299 |
+
* Feature - Added filter hooks 'gfpdfe_pdf_name' and 'gfpdfe_template' which allows developers to further modify a PDF name and template file, respectively, outside of the configuration.php. This is useful if you have a special case naming convention based on user input. See [https://developer.gravitypdf.com/documentation/filters-and-hooks/](https://developer.gravitypdf.com/documentation/filters-and-hooks/) for more details about using these filters.
|
300 |
+
* Feature - Custom font support. Any .ttf font file added to the PDF_EXTENDED_TEMPLATES/fonts/ folder will be automatically installed once the plugin has been initialised. Users also have the option to just initialise the fonts via the settings page. See the [font/language documentation ](https://developer.gravitypdf.com/documentation/language-support/#install-custom-fonts) for details.
|
301 |
+
* Compatability - Use Gravity Forms get_upload_root() and get_upload_url_root() instead of hard coding the signature upload directory in pdf-entry-detail.php
|
302 |
+
* Compatability - Changed deprecated functions get_themes() and get_theme() to wp_get_theme() (added in Wordpress v3.4).
|
303 |
+
* Compatability - The plugin now needs to be initialised on fresh installation and upgrade. This allows us to use the WP_Filesystem API for file manipulation.
|
304 |
+
* Compatability - Automatic copying of PDF_EXTENDED_TEMPLATES folder on a theme change was removed in favour of a user prompt. This allows us to take advantage of the WP_Filesystem API.
|
305 |
+
* Compatability - Added Wordpress compatibility checker (minimum now 3.4 or higher).
|
306 |
+
* Bug - Removed ZipArchive in favour of Wordpress's WP_Filesystem API unzip_file() command. Some users reported the plugin would stop their entire website working if this extension wasn't installed.
|
307 |
+
* Bug - Fixed Gravity Forms compatibility checker which wouldn't return the correct response.
|
308 |
+
* Bug - Fixed minor bug in pdf.php when using static call 'self' in add_filter hook. Changed to class name.
|
309 |
+
* Bug - Removed PHP notice about $even variable not being defined in pdf-entry-detail.php
|
310 |
+
* Bug - Prevent code from continuing to excecute after sending header redirect.
|
311 |
+
|
312 |
+
= 3.0.2 =
|
313 |
+
* Backwards Compatibility - While PHP 5.3 has was released a number of years ago it seems a number of hosts do not currently offer this version to their clients. In the interest of backwards compatibility we've re-written the plugin to again work with PHP 5+.
|
314 |
+
* Signature / Image Display Bug - All URLs have been converted to a path so images should now display correctly in PDF.
|
315 |
+
|
316 |
+
= 3.0.1 =
|
317 |
+
* Bug - Fixed issue that caused website to become unresponsive when Gravity Forms was disabled or upgraded
|
318 |
+
* Bug - New HTML fields weren't being displayed in $form_data array
|
319 |
+
* Feature - Options for default templates to disable HTML fields or empty fields (or both)
|
320 |
+
|
321 |
+
= 3.0.0 =
|
322 |
+
As of Gravity PDF v3.0.0 we have removed the DOMPDF package from our plugin and integrated the more advanced mPDF system. Along with a new HTML to PDF generator, we've rewritten the entire plugin's base code to make it more user friendly to both hobbyists and rock star web developers. Configuration time is cut in half and advanced features like adding security features is now accessible to users who have little experience with PHP.
|
323 |
+
|
324 |
+
New Features include:
|
325 |
+
|
326 |
+
* Language Support - almost all languages are supported including RTL (right to left) languages like Arabic and Hebrew and CJK languages - Chinese, Japanese and Korean.
|
327 |
+
* HTML Page Numbering
|
328 |
+
* Odd and even paging with mirrored margins (most commonly used in printing).
|
329 |
+
* Nested Tables
|
330 |
+
* Text-justification and hyphenation
|
331 |
+
* Table of Contents
|
332 |
+
* Index
|
333 |
+
* Bookmarks
|
334 |
+
* Watermarks
|
335 |
+
* Password protection
|
336 |
+
* UTF-8 encoded HTML
|
337 |
+
* Better system resource handling
|
338 |
+
|
339 |
+
A new HTML to PDF package wasn't the only change to this edition of the software. We have rewritten the entire configuration system and made it super easy to get the software up and running.
|
340 |
+
|
341 |
+
Users will no longer place code in their active theme's functions.php file. Instead, configuration will happen in a new file called configuration.php, inside the PDF_EXTENDED_TEMPLATES folder (in your active theme).
|
342 |
+
|
343 |
+
Other changes include
|
344 |
+
* Improved security - further restrictions were placed on non-administrators viewing template files.
|
345 |
+
* $form_data array tidied up - images won't be wrapped in anchor tags.
|
346 |
+
|
347 |
+
For more details [view the 3.x.x online documentation](https://developer.gravitypdf.com/).
|
348 |
+
|
349 |
+
= 2.2.3 =
|
350 |
+
* Bug - Fixed mb_string error in the updated DOMPDF package.
|
351 |
+
|
352 |
+
= 2.2.2 =
|
353 |
+
* DOMPDF - We updated to the latest version of DOMPDF - DOMPDF 0.6.0 beta 3.
|
354 |
+
* DOMPDF - We've enabled font subsetting by default which should help limit the increased PDF size when using DejaVu Sans (or any other font).
|
355 |
+
|
356 |
+
= 2.2.1 =
|
357 |
+
* Bug - Fixed HTML error which caused list items to distort on PDF
|
358 |
+
|
359 |
+
= 2.2.0 =
|
360 |
+
* Compatibility - Ensure compatibility with Gravity Forms 1.7. We've updated the functions.php code and remove gform_user_notification_attachments and gform_admin_notification_attachments hooks which are now deprecated. Functions gform_pdf_create and gform_add_attachment have been removed and replaced with gfpdfe_create_and_attach_pdf(). See upgrade documentation for details.
|
361 |
+
* Enhancement - Added deployment code switch so the template redeployment feature can be turned on and off. This release doesn't require redeployment.
|
362 |
+
* Enhancement - PDF_Generator() variables were getting long and complex so the third variable is now an array which will pass all the optional arguments. The new 1.7 compatible functions.php code includes this method by default. For backwards compatibility the function will still work with the variable structure prior to 2.2.0.
|
363 |
+
* Bug - Fixed error generated by legacy code in the function PDF_processing() which is located in render_to_pdf.php.
|
364 |
+
* Bug - Images and stylesheets will now try and be accessed with a local path instead of a URL. It fixes problem where some hosts were preventing read access from a URL. No template changes are required.
|
365 |
+
|
366 |
+
= 2.1.1 =
|
367 |
+
* Bug - Signatures stopped displaying after 2.1.0 update. Fixed issue.
|
368 |
+
* Bug - First time install code now won't execute if already have configuration variables in database
|
369 |
+
|
370 |
+
= 2.1.0 =
|
371 |
+
|
372 |
+
* Feature - Product table can now be accessed directly through custom templates by running GFPDFEntryDetail::product_table($form, $lead);. See documentation for more details.
|
373 |
+
* Feature - Update screen will ask you if you want to deploy new template files, instead of overriding your modified versions.
|
374 |
+
* Feature - Product subtotal, shipping and total have been added to $form_data['field'] array to make it easier to work with product details in the custom template.
|
375 |
+
* Feature - Added two new default template files. One displays field and name in two rows (like you see when viewing an entry in the admin area) and the other removes all styling. See documentation on use.
|
376 |
+
* Security - Tightened PDF template security so that custom templates couldn't be automatically generated by just anyone. Now only logged in users with the correct privileges and the user who submitted the form (matched against IP) can auto generate a PDF. See documentation on usage.
|
377 |
+
* Deprecated - Removed form data that was added directly to the $form_data array instead of $form_data['field'] array. Users upgrading will need to update their custom templates if not using field data from the $form_data[�field'] array. If using $form_data['field'] in your custom template this won't affect you.
|
378 |
+
* Bug - Fixed problem with default template not showing and displaying a timeout error. Removed table tags and replaced with divs that are styled appropriately.
|
379 |
+
* Bug - The new plugin theme folder will successfully create when upgrading. You won't have to deactivate and reactivate to get it working.
|
380 |
+
* Bug - some installs had plugins that included the function mb_string which is also included in DOMPDF. DOMPDF will now check if the function exists before creating it.
|
381 |
+
* Bug - Remove empty signature field from the default template.
|
382 |
+
* Bug - fixed problem with redirecting to login screen even when logged in while accessing template file through the browser window directly.
|
383 |
+
* Bug - fixed error where sample template would reimport itself automatically even after deleting it. Will now only reimport if any important changes to template need to be viewed straight after an update.
|
384 |
+
* Bug - Moved render_to_pdf.php constants to pdf.php so we can use the constants in the core files. Was previously generating an error.
|
385 |
+
* Housekeeping - Cleaned up core template files, moved functions into classes and added more in-file documentation.
|
386 |
+
* Housekeeping - moved install/upgrade code from pdf.php to installation-update-manager.php
|
387 |
+
* Housekeeping - changed pdf-entry-detail.php class name from GFEntryDetail to GFPDFEntryDetail to remove compatibility problems with Gravity Forms.
|
388 |
+
* Housekeeping - created pdf-settings.php file to house the settings page code.
|
389 |
+
|
390 |
+
= 2.0.1 =
|
391 |
+
* Fixed Signature bug when checking if image file exists using URL instead of filesystem path
|
392 |
+
* Fixed PHP Constants Notice
|
393 |
+
|
394 |
+
= 2.0.0 =
|
395 |
+
* Moved templates to active theme folder to prevent custom themes being removed on upgrade
|
396 |
+
* Allow PDFs to be saved using a custom name
|
397 |
+
* Fixed WP_Error bug when image/css file cannot be found
|
398 |
+
* Upgraded to latest version of DOMPDF
|
399 |
+
* Removed auto-load form bug which would see multiple instances of the example form loaded
|
400 |
+
* Created a number of constants to allow easier developer modification
|
401 |
+
* Plugin/Support moved to dedicated website.
|
402 |
+
* Pro/Business package offers the ability to write fields on an existing PDF.
|
403 |
+
|
404 |
+
= 1.2.3 =
|
405 |
+
* Fixed $wpdb->prepare error
|
406 |
+
|
407 |
+
= 1.2.2 =
|
408 |
+
* Fixed bug with tempalte shipping method MERGETAGS
|
409 |
+
* Fixed bug where attachment wasn't being sent
|
410 |
+
* Fixed problem when all_url_fopen was turned off on server and failed to retreive remote images. Now uses WP_HTTP class.
|
411 |
+
|
412 |
+
= 1.2.1 =
|
413 |
+
* Fixed path to custom css file included in PDF template
|
414 |
+
|
415 |
+
= 1.2.0 =
|
416 |
+
* Template files moved to the plugin's template folder
|
417 |
+
* Sample Form installed so developers have a working example to modify
|
418 |
+
* Fixed bug when using WordPress in another directory to the site
|
419 |
+
|
420 |
+
= 1.1.0 =
|
421 |
+
* Now compatible with Gravity Forms Signature Add-On
|
422 |
+
* Moved the field data functions out side of the Gravity Forms core so users can freely style their form information (located in pdf-entry-detail.php)
|
423 |
+
* Simplified the field data output
|
424 |
+
* Fixed bug when using product information
|
425 |
+
|
426 |
+
= 1.0.0 =
|
427 |
+
* First release.
|
README.txt
CHANGED
@@ -1,228 +1,288 @@
|
|
1 |
-
===
|
2 |
-
Contributors:
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
License
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
*
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
*
|
33 |
-
* HTML
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
=
|
89 |
-
* Bug
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
* Feature
|
94 |
-
* Feature
|
95 |
-
|
96 |
-
|
97 |
-
*
|
98 |
-
*
|
99 |
-
*
|
100 |
-
*
|
101 |
-
*
|
102 |
-
|
103 |
-
|
104 |
-
*
|
105 |
-
*
|
106 |
-
*
|
107 |
-
|
108 |
-
|
109 |
-
*
|
110 |
-
*
|
111 |
-
|
112 |
-
|
113 |
-
* Bug -
|
114 |
-
* Bug
|
115 |
-
*
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
*
|
124 |
-
*
|
125 |
-
*
|
126 |
-
*
|
127 |
-
|
128 |
-
|
129 |
-
*
|
130 |
-
*
|
131 |
-
*
|
132 |
-
*
|
133 |
-
*
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
*
|
141 |
-
*
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
*
|
147 |
-
|
148 |
-
|
149 |
-
*
|
150 |
-
*
|
151 |
-
|
152 |
-
|
153 |
-
* Bug
|
154 |
-
|
155 |
-
|
156 |
-
*
|
157 |
-
*
|
158 |
-
*
|
159 |
-
* Bug
|
160 |
-
* Bug
|
161 |
-
|
162 |
-
|
163 |
-
* Bug
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
*
|
169 |
-
*
|
170 |
-
*
|
171 |
-
*
|
172 |
-
*
|
173 |
-
*
|
174 |
-
|
175 |
-
|
176 |
-
*
|
177 |
-
*
|
178 |
-
*
|
179 |
-
*
|
180 |
-
|
181 |
-
|
182 |
-
*
|
183 |
-
*
|
184 |
-
*
|
185 |
-
|
186 |
-
|
187 |
-
* Fixed
|
188 |
-
* Fixed
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
*
|
194 |
-
*
|
195 |
-
*
|
196 |
-
*
|
197 |
-
*
|
198 |
-
*
|
199 |
-
|
200 |
-
|
201 |
-
*
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
*
|
206 |
-
*
|
207 |
-
|
208 |
-
|
209 |
-
*
|
210 |
-
|
211 |
-
=
|
212 |
-
*
|
213 |
-
*
|
214 |
-
*
|
215 |
-
|
216 |
-
|
217 |
-
*
|
218 |
-
*
|
219 |
-
*
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
*
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Gravity PDF ===
|
2 |
+
Contributors: blue-liquid-designs
|
3 |
+
Plugin URI: https://gravitypdf.com/
|
4 |
+
Donate link: https://gravitypdf.com/donate-to-plugin/
|
5 |
+
Tags: gravity, forms, pdf, automation, attachment, email
|
6 |
+
Requires at least: 4.4
|
7 |
+
Tested up to: 4.8
|
8 |
+
Stable tag: 4.2.1
|
9 |
+
License: GPLv2 or later
|
10 |
+
License URI: http://www.gnu.org/licenses/gpl.txt
|
11 |
+
|
12 |
+
Automatically generate, email and download PDF documents with Gravity Forms and Gravity PDF.
|
13 |
+
|
14 |
+
== Description ==
|
15 |
+
|
16 |
+
**Gravity PDF is the ultimate solution for generating digital PDF documents using Gravity Forms and WordPress.**
|
17 |
+
|
18 |
+
https://www.youtube.com/watch?v=z8zKKrjmNjY
|
19 |
+
|
20 |
+
The plugin ships with four highly-customisable PDF templates perfectly suited for displaying your user’s data. Within seconds you can personalise the documents with your company logo, change the font, size, colour and the paper size. If the templates don't suit, [have one tailor made just for you](https://gravitypdf.com/integration-services/) or [roll your own](https://gravitypdf.com/documentation/v4/developer-start-customising/).
|
21 |
+
|
22 |
+
> Digital document management with WordPress and Gravity Forms just became a breeze!
|
23 |
+
|
24 |
+
= Feature =
|
25 |
+
|
26 |
+
* There’s no third-party APIs needed when generating your PDFs. That means no chance of third-party data breaches, no monthly fees or rate limits. You control the software and the documents it generates.
|
27 |
+
* We support all languages, including complex symbol-based languages like Chinese and Japanese, as well as Right to Left (RTL) written languages such as Arabic and Hebrew.
|
28 |
+
* Automatically email your PDF when a user completes a form. Have it emailed to people in your organisation, the user, or both. You can also conditionally generate and email the PDF.
|
29 |
+
* Using Gravity Forms developer-licensed payment add-ons – like PayPal, Authorize.net or Stripe – you can restrict access to the PDF until after a payment is captured.
|
30 |
+
* [Protecting your user’s sensitive information is at the heart of Gravity PDF](https://gravitypdf.com/documentation/v4/user-pdf-security/). The plugin’s security settings give you granular control over who has access to the PDFs generated.
|
31 |
+
* Our [JavaScript-powered font manager](https://gravitypdf.com/documentation/v4/user-custom-fonts/) allows you to install and use your favourite fonts. Now you can keep in line with your corporate style guide, or create beautiful PDF typography.
|
32 |
+
* [The documentation](https://gravitypdf.com/documentation/v4/user-installation/) has everything from basic install instructions to advanced developer how-to guides. Our friendly team is also on hand to [provide FREE general support](https://gravitypdf.com/support/).
|
33 |
+
* PHP, HTML and CSS come easy? [You’ll find creating your own PDF templates a breeze](https://gravitypdf.com/documentation/v4/developer-start-customising/). If not, [we offer PDF design services](https://gravitypdf.com/integration-services/) tailored just for you. We can even auto-fill existing PDFs!
|
34 |
+
|
35 |
+
= Requirements =
|
36 |
+
|
37 |
+
Gravity PDF can be run on most shared web hosting without any issues. It requires **PHP 5.4+** (PHP 7.0+ recommended) and at least 64MB of WP Memory (128MB+ recommended). You'll also need to be running WordPress 4.2+ and have [Gravity Forms 1.9+](https://www.e-junkie.com/ecom/gb.php?cl=54585&c=ib&aff=235154) (affiliate link).
|
38 |
+
|
39 |
+
If you aren't sure Gravity PDF will meet your needs (and haven't got a Gravity Forms license yet) you can [try out the software via our demo site](https://demo.gravitypdf.com).
|
40 |
+
|
41 |
+
= Documentation & Support =
|
42 |
+
|
43 |
+
[We have extensive documentation on using Gravity PDF](https://gravitypdf.com/documentation/v4/five-minute-install/), and our friendly support team provides [FREE basic support via our website](https://gravitypdf.com/support/#contact-support) (we also check the WordPress.org forums but submitting a ticket via GravityPDF.com will get a faster response).
|
44 |
+
|
45 |
+
= Custom PDF Integration =
|
46 |
+
|
47 |
+
We offer **comprehensive PDF integration services** and do all the PDF development and integration into Gravity Forms for you. You tell us what you want and our friendly and experienced developers will design, develop and install custom PDF templates tailor specifically for you. We can even auto-fill your existing PDF documents. [Find out more at GravityPDF.com](https://gravitypdf.com/integration-services/).
|
48 |
+
|
49 |
+
= Contribute =
|
50 |
+
|
51 |
+
All development for Gravity PDF [is handled via GitHub](https://github.com/GravityPDF/gravity-pdf/). Opening new issues and submitting pull requests are welcome.
|
52 |
+
|
53 |
+
[Our public roadmap is available on Trello](https://trello.com/b/60YGv1J3/roadmap). We'd love it if you vote and comment on your favourite ideas.
|
54 |
+
|
55 |
+
You can also keep up to date with Gravity PDF by [subscribing to our newsletter](https://gravitypdf.com/#signup-top), [following us on Twitter](https://twitter.com/gravitypdf) or [liking us on Facebook](https://www.facebook.com/gravitypdf).
|
56 |
+
|
57 |
+
Also, if you enjoy using the software [we'd love it if you could give us a review!](https://wordpress.org/support/view/plugin-reviews/gravity-forms-pdf-extended)
|
58 |
+
|
59 |
+
*Note: When Gravity Forms isn't installed and you activate Gravity PDF we display a notice that includes an affiliate link to their website.*
|
60 |
+
|
61 |
+
== Installation ==
|
62 |
+
|
63 |
+
[You'll find detailed installation instructions on GravityPDF.com](https://gravitypdf.com/documentation/v4/user-installation/).
|
64 |
+
|
65 |
+
== Screenshots ==
|
66 |
+
|
67 |
+
1. Our on-boarding experience will have you up and running in 5 minutes flat.
|
68 |
+
2. Set up the global PDF settings then head straight to configuring your first PDF.
|
69 |
+
3. Control the default paper size, PDF template and font/size/colour.
|
70 |
+
4. Advanced security options give you granular control of PDF access.
|
71 |
+
5. Tools like the font manager and custom PDF installer are readily accessible.
|
72 |
+
6. Our JavaScript-powered font manager will make using custom fonts a breeze.
|
73 |
+
7. A snapshot of your form’s PDF setup.
|
74 |
+
8. When adding a new PDF all the important settings are up front in the “General” tab.
|
75 |
+
9. Override the default appearance settings on a per-PDF basis.
|
76 |
+
10. Each template has its own PDF settings for greater control of the look and feel of your document.
|
77 |
+
11. Header and Footer support is built-in.
|
78 |
+
12. Advanced format and security settings can be applied to individual PDFs.
|
79 |
+
13. PDFs can be accessed from the Gravity Forms entry list page.
|
80 |
+
14. They also appear on the individual entry pages for easy access.
|
81 |
+
15. Zadani is a minimalist business-style template that will generate a well-spaced document great for printing.
|
82 |
+
16. Rubix uses stylish containers to create an aesthetically pleasing design.
|
83 |
+
17. Focus Gravity providing a classic layout which epitomises Gravity Forms Print Preview. It’s the familiar layout you’ve come to love.
|
84 |
+
18. Blank Slate provides a print-friendly template focusing solely on the user-submitted data.
|
85 |
+
|
86 |
+
== Changelog ==
|
87 |
+
|
88 |
+
= 4.2.1 =
|
89 |
+
* Bug: Fix fatal DateTimeZone error for older versions of PHP (GH#654)
|
90 |
+
|
91 |
+
= 4.2.0 =
|
92 |
+
* Feature: Merge tags and shortcodes are displayed in the PDF for any administrative fields (GH#633)
|
93 |
+
* Feature: New field class 'pagebreak' forces a pagebreak in the PDF (GH#634)
|
94 |
+
* Feature: Instead of the field not showing at all, Gravity Perks Terms of Conditions field now shows the text "Not accepted"
|
95 |
+
when user hasn't agreed to terms (GH#636)
|
96 |
+
|
97 |
+
* Dev Feature: Add premium add-on and licensing infrastructure (GH#619)
|
98 |
+
* Dev Feature: [gravitypdf] shortcode debug messages can be toggled on and off for users with the 'gravityforms_view_entries' capability (GH#627)
|
99 |
+
* Dev Feature: Add filter 'gfpdf_field_label' to modify the PDF field labels (GH#621)
|
100 |
+
* Dev Feature: Add filter 'gfpdf_pdf_field_content' to modify the field markup before content is wrapped in the PDF markup (GH#620)
|
101 |
+
* Dev Feature: Add filters 'gfpdf_get_pdf_display_list', 'gfpdf_get_pdf_url', 'gfpdf_get_active_pdfs', 'gfpdf_override_pdf_bypass',
|
102 |
+
'gfpdf_maybe_attach_to_notification', 'gfpdf_maybe_always_save_pdf', 'gfpdf_form_data' and 'gfpdf_preprocess_template_arguments' for
|
103 |
+
greater control over the core PDF functionality. (GH#622)
|
104 |
+
* Dev Feature: Fix master password being overridden on PDF save after v3 to v4 migration (GH#624)
|
105 |
+
* Dev Feature: Allow master password field to be shown in the UI with the 'gfpdf_enable_master_password_field' fitler (GH#624)
|
106 |
+
* Dev Feature: Swapped 'error' log to 'warning' log when template config file not found (GH#613)
|
107 |
+
* Dev Feature: Upgrade all NPM modules to latest versions. PDF Template Manager now renders faster (GH#631)
|
108 |
+
* Dev Feature: Remove hard dependancy on the Helper_Interface_Config interface for the template configuration file (GH#632)
|
109 |
+
* Dev Feature: Added 'gfpdf_field_middleware' filter to control when a field should be displayed in the core PDF templates (GH#635)
|
110 |
+
* Dev Feature: Greater access to the Field_Product class internals (GH#642)
|
111 |
+
|
112 |
+
* Bug: Correctly exit the script when the PDF is downloaded / sent to the browser (GH#610)
|
113 |
+
* Bug: Don't auto-redirect to welcome / update screen on plugin install or upgrade which resolves a cached redirect issue (GH#612)
|
114 |
+
* Bug: Register two PDF endpoints to support both pretty and almost pretty permalinks at the same time (GH#614)
|
115 |
+
* Bug: Fix [gravitypdf] shortcode display error in GravityView when wrapped in another shortcode (GH#628)
|
116 |
+
* Bug: Add support for Gravity Forms 2.3 Merge Tags (GH#643)
|
117 |
+
* Bug: Fix background image relative paths (GH#645)
|
118 |
+
* Bug: Fix GravityView display issue when view is used on the front page (GH#639)
|
119 |
+
* Bug: Don't show selected product options in the product field when not grouping products together in PDF (GH#646)
|
120 |
+
* Bug: Fix edge case that caused PDF settings to be overridden when the form is updated (GH#648)
|
121 |
+
|
122 |
+
= 4.1.1 =
|
123 |
+
* Bug: Add check to see if headers are already sent before trying to redirect to the welcome / update page (GH#601)
|
124 |
+
* Bug: Fixed issue accessing the Advanced Template Manager in Safari browser (GH#603)
|
125 |
+
* Bug: Ensure the Advanced Template Manager notice and error messages have the correct styles in the Form PDF Settings pages (GH#604)
|
126 |
+
* Bug: Fix PDF generation problem using the legacy v3 URL structure (GH#605)
|
127 |
+
|
128 |
+
= 4.1.0 =
|
129 |
+
* Feature: Advanced PDF Template Manager. Upload, View, Select and Delete PDF templates with ease (GH#486)
|
130 |
+
* Feature: Add PDF Mergetags which output PDF URLs and compliment the [gravitypdf] shortcode which output HTML links (GH#404)
|
131 |
+
* Feature: Add four-column CSS Ready Class support to core PDFs. Note: if you have run "Setup Custom Templates" you will need to re-run it to take advantage of this feature (GH#461)
|
132 |
+
* Feature: Added support for the WP External Links plugin (GH#386)
|
133 |
+
* Feature: Added filter to show radio, checkbox, select, multiselect and product field values in core PDF templates (GH#600)
|
134 |
+
* Enhancement: Gravity PDF Review Notice now only shows up on Gravity Forms pages (#528)
|
135 |
+
* Enhancement: Convert all strings to American format so they can be correctly translated using Glotpress (GH#525)
|
136 |
+
* Enhancement: Added Australian, New Zealand and UK language packs (GH#525)
|
137 |
+
* Enhancement: Add support for Gravity Forms 2.2 Logging Module (GH#596)
|
138 |
+
* Dev Feature: Added 'Author URI' and 'Tags' headers to PDF template files which get displayed in the Advanced Template Manager (GH#558)
|
139 |
+
* Dev Feature: Include $this as eighth parameter in 'gfpdf_field_html_value' filter (GH#549)
|
140 |
+
* Dev Feature: Add 'gfpdf_field_section_break_html' filter to returned Section Field HTML for the PDF (GH#548)
|
141 |
+
* Dev Feature: Add actions before and after the core template HTML is generated; 'gfpdf_pre_html_fields' and 'gfpdf_post_html_fields' respectively (GH#546)
|
142 |
+
* Dev Feature: Template PHP Configuration files can impliment setUp and TearDown interfaces which fire when templates are installed or deleted through the Advanced Template Manager (GH#545)
|
143 |
+
* Dev Feature: Added Font Create and Delete endpoints to API – GPDFAPI::add_pdf_font() and GPDFAPI::delete_pdf_font() (GH#541)
|
144 |
+
* Dev Feature: Allow Rich Text Editor height to be controlled through the 'size' property when used in template config (GH#540)
|
145 |
+
* Dev Feature: Allow images in radio buttons using the new `'class' => 'image-radio-buttons'` property when used in template config (GH#539)
|
146 |
+
* Dev Changes: Use Gravity Forms copy of Chosen JS (GH#563)
|
147 |
+
* Dev Changes: All production CSS and JS saved to /dest/ directory as part of Advanced Template Manager update
|
148 |
+
* Dev Changes: Standardised all AJAX Authentication so Nonce and Capability checks are easily checked (GH#538)
|
149 |
+
* Dev Changes: Rename all instances of "depreciated" with "deprecated" in our files and classes (GH#535)
|
150 |
+
* Dev Changes: Contact our localised JS data to camelCase (GH#532)
|
151 |
+
* Dev Changes: Utilised PHP5.4 array syntax in code (GH#521)
|
152 |
+
* Bug: Reset Gravity Forms Merge Tag JS when PDF template changes (GH#551)
|
153 |
+
* Bug: Fix incorrect variable reference to $include_list_styles which uses 'gfpdf_include_list_styles' to change the behaviour (GH#547)
|
154 |
+
* Bug: Fix PHP notice in PDF when no products selected in form (GH#523)
|
155 |
+
* Bug: Fix issue with Gravity PDF update screen showing and not showing at incorrect times (GH#514)
|
156 |
+
* Bug: Fix false positive when checking if the PDF tmp directory is readable (GH#519)
|
157 |
+
* Bug: Fix error when using GLOB_BRACE flag in glob() function (GH#562)
|
158 |
+
* Bug: Remove OTF fonts from being uploaded due to poor support in Mpdf (GH#569)
|
159 |
+
* Bug: Additional PHP7.1 fixes merged from upstream Mpdf package
|
160 |
+
* Bug: Allow TTF file mime type to be correctly detected in WordPress 4.7.3 (GH#571)
|
161 |
+
* Bug: Ensure PDF Delete dialog shows up after being previously 'cancelled' (GH#588)
|
162 |
+
* Bug: Ensure duplicate mergetags aren't included after PDF template change (GH#589)
|
163 |
+
* Bug: Fix PHP Notice if there's no active capabilities for a role (GH#590)
|
164 |
+
|
165 |
+
= 4.0.6 =
|
166 |
+
* Correctly register our PDF link with the WP Rewrite API when "Almost Pretty" permalinks are active (GH#502)
|
167 |
+
* Correctly process mergetags in password field for Tier 2 PDF templates (GH#503)
|
168 |
+
* Allow mergetags to be saved in HTML attributes in our Header / Footer settings - DEV NOTE: all Rich Text Editor settings fields should be output with `wp_kses_post( $html )` (GH#492)
|
169 |
+
* Process mergetags before Header / Footer settings get passed to wp_kses_post() on output (GH#512)
|
170 |
+
* Renamed `check_wordpress()` method to `is_compatible_wordpress_version()` to prevent false positive using ConfigServer eXploit Scanner (GH#500)
|
171 |
+
* Explicitly set a forward slash after the home_url() when building PDF links (GH#511)
|
172 |
+
* Resolve incorrect page numbering in Mpdf's Table of Contents
|
173 |
+
* Change Helper_Misc->get_contrast() to choose white in more cases (GH#506)
|
174 |
+
|
175 |
+
= 4.0.5 =
|
176 |
+
* Add support for "Almost Pretty" permalinks for web servers that don't support Mod Rewrite (IIS) (GH#488)
|
177 |
+
* Add PHP 7.1 support – resolves two string-to-array issues (GH#495)
|
178 |
+
* Add <p> and <br> tags to Rich Text Paragraph field in PDF – using wpautop() (GH#490)
|
179 |
+
* Disable product table when enabling the 'individual_products' option in core templates (GH#493)
|
180 |
+
|
181 |
+
= 4.0.4 =
|
182 |
+
* Prevent Finder (Mac) and Ghostscript viewing / processing password-protected PDFs without a password (GH#467)
|
183 |
+
* Fix Font Manager display issues for users running a version of WP lower than 4.5 (GH#470)
|
184 |
+
* Ensure new lines in Header / Footer automatically convert to <p> or <br> tags using wpautop() (GH#472)
|
185 |
+
* Fix issue in $form_data where Radio / Checkbox fields wouldn't display site-owner entered HTML (GH#415)
|
186 |
+
* Fixed conflict with Enhanced Media Library plugin (GH#433)
|
187 |
+
* Fixed issue with encoded characters in saved PDF filename (GH#475)
|
188 |
+
* Fixed issue where PDF settings would always set to "active" when saved (GH#477)
|
189 |
+
* Fixed depreciation notice for multisites using WordPress 4.6 (GH#479)
|
190 |
+
* Apply esc_html() and esc_url() to PDF name and URL in admin area (GH#484)
|
191 |
+
|
192 |
+
= 4.0.3 =
|
193 |
+
* Fix incorrect product calculations when using decimal comma format eg. 1.000,50 (GH#442)
|
194 |
+
* Rename $config variable to $html_config in core templates (GH#451)
|
195 |
+
* Don't chain CSS in our default setters or set fixed font size in templates (GH#446)
|
196 |
+
* Fix display issues for certain characters with DejaVu Sans font family in PDFs (GH#456)
|
197 |
+
* Ensure QueryPath produces valid UTF-8 data after processing (GH#452)
|
198 |
+
* Re-running the Custom Template Setup will override working directory templates with same name (GH#457)
|
199 |
+
* Fixed legacy Name field PHP warnings (GH#448)
|
200 |
+
* Replace translations with their escaped function counterparts (GH#463)
|
201 |
+
* Duplicating PDFs will now be inactive by default (GH#458)
|
202 |
+
* Tweaked the "Show Page Names" field description (GH#449)
|
203 |
+
|
204 |
+
= 4.0.2 =
|
205 |
+
* Fixes issue displaying address fields in v4 PDFs (GH#429)
|
206 |
+
* Fixes internal logging issues and added Gravity Forms 1.1 support (GF#428)
|
207 |
+
* Fixes notice when form pagination information is not available (GH#437)
|
208 |
+
* Fixes notice when using GPDFAPI::product_table() on form that had no products (GH#438)
|
209 |
+
* Fixes caching issue with GravityView Enable Notifications plugin that caused PDF attachment not to be updated (GH#436)
|
210 |
+
|
211 |
+
= 4.0.1 =
|
212 |
+
* Fixes PHP notice when viewing PDF and Category field is empty (GH#419)
|
213 |
+
* Fixes PHP notice when viewing PDF and custom font directory is empty (GH#416)
|
214 |
+
* Fixes Font Manager / Help Search features due to Underscore.js conflict when PHP's deprecated ASP Tags enabled (GH#417)
|
215 |
+
* Allows radio and checkbox values to show HTML in PDFs (GH#415)
|
216 |
+
* Fixes PDF letter spacing issue with upper and lower case characters (GH#418)
|
217 |
+
* Fixes character display problems using core Arial font in PDFs (GH#420)
|
218 |
+
* Fixes documentation search error on PDF Help tab (GH#424)
|
219 |
+
* Add additional check when cleaning up TMP directory (GH#427)
|
220 |
+
|
221 |
+
= 4.0 =
|
222 |
+
|
223 |
+
* Minimum PHP version changed from PHP 5.2 to PHP 5.4. ENSURE YOUR WEB SERVER IS COMPATIBLE BEFORE UPDATING (Forms -> Settings -> PDF -> System Status)
|
224 |
+
* Minimum WordPress version changed from 3.9 to 4.2. ENSURE YOU ARE RUNNING THE MINIMUM VERISON OF WP BEFORE UPDATING (Forms -> Settings -> PDF -> System Status)
|
225 |
+
* Minimum Gravity Forms version changed from 1.8 to 1.9. ENSURE YOU ARE RUNNING THE MINIMUM VERISON OF GRAVITY FORMS BEFORE UPDATING (Forms -> Settings -> PDF -> System Status)
|
226 |
+
* Maintained backwards compatibility with v3 for 80% of users. Review our migration guide for additional information (https://gravitypdf.com/documentation/v4/v3-to-v4-migration/)
|
227 |
+
* Created full user interface for managing plugin settings. All settings are now stored in the database
|
228 |
+
* Overhaul PDF designs that ship with software. Now comes with 4 completely free templates (two are all-new and two are enhanced v3 favourites)
|
229 |
+
* Added CSS Ready class support in PDFs. Two and three column classes now work in PDF
|
230 |
+
* Users can apply conditional logic to PDFs via new UI
|
231 |
+
* Control font, size and colour via new UI
|
232 |
+
* Control paper size of generated PDF via new UI
|
233 |
+
* Control advanced security settings via new UI
|
234 |
+
* Control customisable PDF template options via new UI
|
235 |
+
* Control PDF header / footers via UI
|
236 |
+
* Control PDF background via UI
|
237 |
+
* Change PDF format (PDF/A-1b or PDF/X-1a) via UI
|
238 |
+
* Password Protect PDF via UI and change end-user privilages
|
239 |
+
* Added [gravitypdf] shortcode to allow users to display PDF links on confirmation pages, notifications, or anywhere else
|
240 |
+
* Allow user to change the action of the PDF link view in admin area (view or download)
|
241 |
+
* Added timeout parameter when unauthenticated user who submitted the form (matched by IP) attempts to access PDF. Defaults to 20 minutes
|
242 |
+
* Added ability to make a PDF "public". This disabled all security precautions on PDF. Use with caution.
|
243 |
+
* Deprecated configuration.php and created a migration feature which users can run if that file is detected. Removes /output/ directory during migration (where v3 stored PDFs saved to disk).
|
244 |
+
* Duplicating Gravity Form will also duplicate Gravity PDF settings assigned to that form. Importing / Exporting forms will also include PDF settings
|
245 |
+
* Better installation and upgrade experience for users with automated redirect to landing page after install / major update (can be disabled in settings)
|
246 |
+
* Created a font manager so users have a user interface to install and use their favourite fonts. Support for TTF and certain OTF font files
|
247 |
+
* Allow users to enable Right to Left language support from UI
|
248 |
+
* Created uninstaller which removes all trace of plugin from website
|
249 |
+
* Help tab allows users to live search our documentation
|
250 |
+
* Remove need to initialise the plugin when first installed
|
251 |
+
* Remove need to initialise fonts when uploaded to our /fonts/ directory
|
252 |
+
* Cleanup PDFs from disk when finished with them (also cleans up any stay files every 24 hours)
|
253 |
+
* Detect if our /tmp/ directory is accessible by browser and suggest ways to fix
|
254 |
+
* Allow all directories in /PDF_EXTENDED_TEMPLATES/ directory to be moved / renamed via filters (including the base directory)
|
255 |
+
* Create GPDFAPI class to allow devs to easily build ontop of plugin
|
256 |
+
* Cleaned up PDF template markup so developers can focus soley on their template code without any extra overhead. See our documentation for more details (https://gravitypdf.com/documentation/v4/developer-start-customising/)
|
257 |
+
* Enhanced PDF templates by allowing an image and configuration class
|
258 |
+
* Added large number of new actions and filters and provided documentation and examples for them on our website
|
259 |
+
* Allow developers to add or remove individual security layers via filters
|
260 |
+
* Updated mPDF from 5.7 to 6.1
|
261 |
+
* Added support for Gravity Forms Logging plugin
|
262 |
+
* Added better product data to $form_data['field']
|
263 |
+
* Added PHPDocs to all classes / methods / functions
|
264 |
+
* Fix PDF_EXTENDED_TEMPLATES location in legacy Multisite networks (WP3.5 or lower)
|
265 |
+
* Automatically make $field array available to PDF templates (array of current form fields accessible by field ID)
|
266 |
+
* Automatically make $settings array available to PDF templates (the current PDF configuration settigns)
|
267 |
+
* Automatically make $config array available to PDF templates (the initialised template config class - if any)
|
268 |
+
* Automatically make $form, $entry and $form_data available to PDF templates
|
269 |
+
* Automatically make $gfpdf object available to PDF templates (the main Gravity PDF object containing all our helper classes)
|
270 |
+
|
271 |
+
See [CHANGELOG.txt](https://github.com/GravityPDF/gravity-pdf/blob/master/CHANGELOG.txt) for v3 changelog history.
|
272 |
+
|
273 |
+
== Upgrade Notice ==
|
274 |
+
|
275 |
+
= 4.2.1 =
|
276 |
+
WARNING: The minimum WordPress version supported is now 4.4.
|
277 |
+
|
278 |
+
= 4.2.0 =
|
279 |
+
WARNING: The minimum WordPress version supported is now 4.4.
|
280 |
+
|
281 |
+
= 4.0.4 =
|
282 |
+
This patch fixes a PDF security by-passing issue. If you use the PDF Security settings update immediately.
|
283 |
+
|
284 |
+
= 4.0.3 =
|
285 |
+
The core PDF templates have been updated to version 1.1. If you've previously run the Custom Template Setup make sure you run it again to take advantage of the changes.
|
286 |
+
|
287 |
+
= 4.0 =
|
288 |
+
**WARNING**: This major release is not 100% backwards compatibile with v3. Review our upgrade guide AND do a full backup before proceeding with the update (https://goo.gl/htd6CK).
|
api.php
ADDED
@@ -0,0 +1,635 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* A public API developers can use to work with Gravity PDF (similar to Gravity Forms GFAPI class)
|
5 |
+
*
|
6 |
+
* This class is in the public namespace
|
7 |
+
*
|
8 |
+
*
|
9 |
+
* @package Gravity PDF
|
10 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
11 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
12 |
+
* @since 4.0
|
13 |
+
*/
|
14 |
+
|
15 |
+
/* Exit if accessed directly */
|
16 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
17 |
+
exit;
|
18 |
+
}
|
19 |
+
|
20 |
+
/*
|
21 |
+
This file is part of Gravity PDF.
|
22 |
+
|
23 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
24 |
+
|
25 |
+
This program is free software; you can redistribute it and/or modify
|
26 |
+
it under the terms of the GNU General Public License as published by
|
27 |
+
the Free Software Foundation; either version 2 of the License, or
|
28 |
+
(at your option) any later version.
|
29 |
+
|
30 |
+
This program is distributed in the hope that it will be useful,
|
31 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
32 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
33 |
+
GNU General Public License for more details.
|
34 |
+
|
35 |
+
You should have received a copy of the GNU General Public License
|
36 |
+
along with this program; if not, write to the Free Software
|
37 |
+
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
38 |
+
*/
|
39 |
+
|
40 |
+
/**
|
41 |
+
* An easy-to-use API developers can use to work with Gravity PDF
|
42 |
+
*
|
43 |
+
* See https://gravitypdf.com/documentation/v4/developer-api-whats-it-for/ for more information about this API
|
44 |
+
*
|
45 |
+
* @since 4.0
|
46 |
+
*/
|
47 |
+
final class GPDFAPI {
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Returns our public logger class which uses Monolog (a PSR-3 compatible logging interface - https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md)
|
51 |
+
*
|
52 |
+
* Log messages can be added with any of the following:
|
53 |
+
*
|
54 |
+
* $gfpdf->log->addDebug( $message, [$parameters = array()] )
|
55 |
+
* $gfpdf->log->addInfo( $message, [$parameters = array()] )
|
56 |
+
* $gfpdf->log->addNotice( $message, [$parameters = array()] )
|
57 |
+
* $gfpdf->log->addWarning( $message, [$parameters = array()] )
|
58 |
+
* $gfpdf->log->addError( $message, [$parameters = array()] )
|
59 |
+
* $gfpdf->log->addCritical( $message, [$parameters = array()] )
|
60 |
+
* $gfpdf->log->addAlert( $message, [$parameters = array()] )
|
61 |
+
* $gfpdf->log->addEmergency( $message, [$parameters = array()] )
|
62 |
+
*
|
63 |
+
* When in production Gravity PDF will only log to a file when the Gravity Forms Logging plugin is enabled and Gravity PDF is set to "Log errors only" ($log->addError() or higher) or "Log all messages" ($log->addNotice() or higher)
|
64 |
+
*
|
65 |
+
* See https://gravitypdf.com/documentation/v4/api_get_log_class/ for more information about this method
|
66 |
+
*
|
67 |
+
* @return \Monolog\Logger
|
68 |
+
*
|
69 |
+
* @since 4.0
|
70 |
+
*/
|
71 |
+
public static function get_log_class() {
|
72 |
+
global $gfpdf;
|
73 |
+
|
74 |
+
return $gfpdf->log;
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Returns our public notice queue system to make it easy to display errors and messages to the user.
|
79 |
+
*
|
80 |
+
* Usage:
|
81 |
+
* $notices->add_notice( String $message );
|
82 |
+
* $notices->add_error( String $error );
|
83 |
+
*
|
84 |
+
* This taps into the 'admin_notices' or 'network_admin_notices' WordPress hooks so you need to add your notices before then.
|
85 |
+
*
|
86 |
+
* See https://gravitypdf.com/documentation/v4/api_get_notice_class/ for more information about this method
|
87 |
+
*
|
88 |
+
* @return \GFPDF\Helper\Helper_Notices
|
89 |
+
*
|
90 |
+
* @since 4.0
|
91 |
+
*/
|
92 |
+
public static function get_notice_class() {
|
93 |
+
global $gfpdf;
|
94 |
+
|
95 |
+
return $gfpdf->notices;
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Returns our public data class which we use to store important global information related to Gravity PDF
|
100 |
+
*
|
101 |
+
* This uses PHP magic methods __set() and __get() to access and store information.
|
102 |
+
*
|
103 |
+
* Usage:
|
104 |
+
*
|
105 |
+
* $data->title; //returns "Gravity PDF"
|
106 |
+
* $data->title = 'Gravity PDF 4.0'; //sets $data->title to "Gravity PDF 4.0"
|
107 |
+
*
|
108 |
+
* Note: Our __get() magic method returns variables by reference
|
109 |
+
*
|
110 |
+
* See https://gravitypdf.com/documentation/v4/get_data_class/ for more information about this method
|
111 |
+
*
|
112 |
+
* @return \GFPDF\Helper\Helper_Data
|
113 |
+
*
|
114 |
+
* @since 4.0
|
115 |
+
*/
|
116 |
+
public static function get_data_class() {
|
117 |
+
global $gfpdf;
|
118 |
+
|
119 |
+
return $gfpdf->data;
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Returns our access layer class for all Gravity PDF Settings (both global and form specific)
|
124 |
+
*
|
125 |
+
* Note: Most relevant methods have been broken our and are avaiable through the GPDFAPI directly (GPDFAPI::get_pdf, GPDFAPI::get_plugin_settings ect)
|
126 |
+
*
|
127 |
+
* See https://gravitypdf.com/documentation/v4/api_get_options_class/ for more information about this method
|
128 |
+
*
|
129 |
+
* @return \GFPDF\Helper\Helper_Options_Fields
|
130 |
+
*
|
131 |
+
* @since 4.0
|
132 |
+
*/
|
133 |
+
public static function get_options_class() {
|
134 |
+
global $gfpdf;
|
135 |
+
|
136 |
+
return $gfpdf->options;
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Returns our miscellaneous methods (or common methods) used throughout the plugin.
|
141 |
+
*
|
142 |
+
* Usage:
|
143 |
+
*
|
144 |
+
* $misc->is_gfpdf_page();
|
145 |
+
*
|
146 |
+
* See https://gravitypdf.com/documentation/v4/api_get_misc_class/ for more information about this method
|
147 |
+
*
|
148 |
+
* @return \GFPDF\Helper\Helper_Misc
|
149 |
+
*
|
150 |
+
* @since 4.0
|
151 |
+
*/
|
152 |
+
public static function get_misc_class() {
|
153 |
+
global $gfpdf;
|
154 |
+
|
155 |
+
return $gfpdf->misc;
|
156 |
+
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Returns our templates methods used throughout the plugin.
|
160 |
+
*
|
161 |
+
* Usage:
|
162 |
+
*
|
163 |
+
* $templates->get_all_templates();
|
164 |
+
*
|
165 |
+
* See @TODO https://gravitypdf.com/documentation/v4/api_get_templates_class/ for more information about this method
|
166 |
+
*
|
167 |
+
* @return \GFPDF\Helper\Helper_Templates
|
168 |
+
*
|
169 |
+
* @since 4.1
|
170 |
+
*/
|
171 |
+
public static function get_templates_class() {
|
172 |
+
global $gfpdf;
|
173 |
+
|
174 |
+
return $gfpdf->templates;
|
175 |
+
}
|
176 |
+
|
177 |
+
/**
|
178 |
+
* Returns our abstracted Gravity Forms API class we use throughout the plugin
|
179 |
+
*
|
180 |
+
* While you could just use the GFAPI directly, some methods in this class have been cache-optimised and are specifically tuned for Gravity PDF.
|
181 |
+
* Note: not all the methods in the GFAPI are implimented.
|
182 |
+
*
|
183 |
+
* Usage:
|
184 |
+
*
|
185 |
+
* $gform->get_form( $form_id );
|
186 |
+
*
|
187 |
+
* See https://gravitypdf.com/documentation/v4/api_get_form_class/ for more information about this method
|
188 |
+
*
|
189 |
+
* @return \GFPDF\Helper\Helper_Form
|
190 |
+
*
|
191 |
+
* @since 4.0
|
192 |
+
*/
|
193 |
+
public static function get_form_class() {
|
194 |
+
global $gfpdf;
|
195 |
+
|
196 |
+
return $gfpdf->gform;
|
197 |
+
}
|
198 |
+
|
199 |
+
/**
|
200 |
+
* Returns the original Model/View/Controller class we initialised in our /src/bootstrap.php file
|
201 |
+
*
|
202 |
+
* This method acts like a faux singleton provider (but none of our classes are static or singletons themselves - hence the 'faux') as you get the originally initialised class back
|
203 |
+
*
|
204 |
+
* This is very useful when you want to remove any filters / actions we set in a controller's add_filters() or add_actions() methods
|
205 |
+
* You can also use to to easily access any public methods in our classes
|
206 |
+
*
|
207 |
+
* Note: This method only returns Controller_ / Model_ / View_ classes. Use the other methods above to access our Helper_ classes
|
208 |
+
*
|
209 |
+
* Usage:
|
210 |
+
*
|
211 |
+
* $class = GPDFAPI::get_mcv_class( 'Controller_PDF' );
|
212 |
+
*
|
213 |
+
* //if we have a class returned
|
214 |
+
* if( $class !== false ) {
|
215 |
+
* //remove a middleware filter
|
216 |
+
* remove_filter( 'gfpdf_pdf_middleware', array( $class, 'middle_active' ), 10 );
|
217 |
+
* }
|
218 |
+
*
|
219 |
+
* See https://gravitypdf.com/documentation/v4/api_get_mvc_class/ for more information about this method
|
220 |
+
*
|
221 |
+
* @param string $class_name The name of one of our MVC classes (no namespace)
|
222 |
+
*
|
223 |
+
* @return object|bool Will return your object if found, otherwise false
|
224 |
+
*
|
225 |
+
* @since 4.0
|
226 |
+
*/
|
227 |
+
public static function get_mvc_class( $class_name ) {
|
228 |
+
global $gfpdf;
|
229 |
+
|
230 |
+
return $gfpdf->singleton->get_class( $class_name );
|
231 |
+
}
|
232 |
+
|
233 |
+
/**
|
234 |
+
* Returns a new instance of one of our PDF generating code (model or view)
|
235 |
+
*
|
236 |
+
* @param string $type Type of class to return. Valid options include 'view' or 'model'
|
237 |
+
*
|
238 |
+
* @return object|WP_Error
|
239 |
+
*
|
240 |
+
* @since 4.0
|
241 |
+
*/
|
242 |
+
public static function get_pdf_class( $type = 'view' ) {
|
243 |
+
|
244 |
+
if ( $type === 'view' ) {
|
245 |
+
return static::get_mvc_class( 'View_PDF' );
|
246 |
+
}
|
247 |
+
|
248 |
+
if ( $type === 'model' ) {
|
249 |
+
return static::get_mvc_class( 'Model_PDF' );
|
250 |
+
}
|
251 |
+
|
252 |
+
return new WP_Error( 'invalid_type', esc_html__( 'The $type parameter is invalid. Only "view" and "model" are accepted', 'gravity-forms-pdf-extended' ) );
|
253 |
+
}
|
254 |
+
|
255 |
+
/**
|
256 |
+
* Gets a list of current PDFs setup for a particular Gravity Form
|
257 |
+
*
|
258 |
+
* See https://gravitypdf.com/documentation/v4/api_get_form_pdfs/ for more information about this method
|
259 |
+
*
|
260 |
+
* @param integer $form_id The Gravity Form ID
|
261 |
+
*
|
262 |
+
* @return array|WP_Error Array of PDF settings or WP_Error
|
263 |
+
*
|
264 |
+
* @since 4.0
|
265 |
+
*/
|
266 |
+
public static function get_form_pdfs( $form_id ) {
|
267 |
+
$options = static::get_options_class();
|
268 |
+
|
269 |
+
return $options->get_form_pdfs( $form_id );
|
270 |
+
}
|
271 |
+
|
272 |
+
/**
|
273 |
+
* Gets a specific Gravity Form PDF configuration
|
274 |
+
*
|
275 |
+
* See https://gravitypdf.com/documentation/v4/api_get_pdf/ for more information about this method
|
276 |
+
*
|
277 |
+
* @param integer $form_id The Gravity Form ID
|
278 |
+
* @param string $pdf_id The PDF ID
|
279 |
+
*
|
280 |
+
* @return array|WP_Error Array of PDF settings or WP_Error
|
281 |
+
* @since 4.0
|
282 |
+
*/
|
283 |
+
public static function get_pdf( $form_id, $pdf_id ) {
|
284 |
+
$options = static::get_options_class();
|
285 |
+
|
286 |
+
return $options->get_pdf( $form_id, $pdf_id );
|
287 |
+
}
|
288 |
+
|
289 |
+
/**
|
290 |
+
* Add a new PDF to a Gravity Form
|
291 |
+
*
|
292 |
+
* See https://gravitypdf.com/documentation/v4/api_add_pdf/ for more information about this method
|
293 |
+
*
|
294 |
+
* @param integer $form_id The Gravity Form ID
|
295 |
+
* @param array $settings The settings for the PDF
|
296 |
+
*
|
297 |
+
* @return boolean / String The PDF ID on success, false on failure
|
298 |
+
*
|
299 |
+
* @since 4.0
|
300 |
+
*/
|
301 |
+
public static function add_pdf( $form_id, $settings = [] ) {
|
302 |
+
$options = static::get_options_class();
|
303 |
+
|
304 |
+
return $options->add_pdf( $form_id, $settings );
|
305 |
+
}
|
306 |
+
|
307 |
+
/**
|
308 |
+
* Updates an existing Gravity Form PDF. Passing an empty $settings array will delete the PDF
|
309 |
+
*
|
310 |
+
* See https://gravitypdf.com/documentation/v4/api_update_pdf/ for more information about this method
|
311 |
+
*
|
312 |
+
* @param integer $form_id The Gravity Form ID
|
313 |
+
* @param string $pdf_id The PDF ID
|
314 |
+
* @param array $settings The settings for the PDF
|
315 |
+
*
|
316 |
+
* @return boolean True on success, false on failure
|
317 |
+
*
|
318 |
+
* @since 4.0
|
319 |
+
*/
|
320 |
+
public static function update_pdf( $form_id, $pdf_id, $settings = [] ) {
|
321 |
+
$options = static::get_options_class();
|
322 |
+
|
323 |
+
return $options->update_pdf( $form_id, $pdf_id, $settings );
|
324 |
+
}
|
325 |
+
|
326 |
+
/**
|
327 |
+
* Deletes a specific Gravity Form PDF configuration
|
328 |
+
*
|
329 |
+
* See https://gravitypdf.com/documentation/v4/api_delete_pdf/ for more information about this method
|
330 |
+
*
|
331 |
+
* @param integer $form_id The Gravity Form ID
|
332 |
+
* @param string $pdf_id The PDF ID
|
333 |
+
*
|
334 |
+
* @return boolean True on success, false on failure
|
335 |
+
*
|
336 |
+
* @since 4.0
|
337 |
+
*/
|
338 |
+
public static function delete_pdf( $form_id, $pdf_id ) {
|
339 |
+
$options = static::get_options_class();
|
340 |
+
|
341 |
+
return $options->delete_pdf( $form_id, $pdf_id );
|
342 |
+
}
|
343 |
+
|
344 |
+
/**
|
345 |
+
* Retrieve an array of the global Gravity PDF settings (this doesn't include individual form configuration details - see GPDFAPI::get_form_pdfs)
|
346 |
+
*
|
347 |
+
* See https://gravitypdf.com/documentation/v4/api_get_plugin_settings/ for more information about this method
|
348 |
+
*
|
349 |
+
* @return array
|
350 |
+
*
|
351 |
+
* @since 4.0
|
352 |
+
*/
|
353 |
+
public static function get_plugin_settings() {
|
354 |
+
$options = static::get_options_class();
|
355 |
+
|
356 |
+
return $options->get_settings();
|
357 |
+
}
|
358 |
+
|
359 |
+
/**
|
360 |
+
* Get an option from the global Gravity PDF settings. If it doesn't exist the $default value will be returned
|
361 |
+
*
|
362 |
+
* See https://gravitypdf.com/documentation/v4/api_get_plugin_option/ for more information about this method
|
363 |
+
*
|
364 |
+
* @param string $key The Gravity PDF option key
|
365 |
+
* @param mixed $default What's returned if the option doesn't exist
|
366 |
+
*
|
367 |
+
* @return mixed
|
368 |
+
*
|
369 |
+
* @since 4.0
|
370 |
+
*/
|
371 |
+
public static function get_plugin_option( $key, $default = '' ) {
|
372 |
+
$options = static::get_options_class();
|
373 |
+
|
374 |
+
return $options->get_option( $key, $default );
|
375 |
+
}
|
376 |
+
|
377 |
+
/**
|
378 |
+
* Add a new Global option to Gravity PDF
|
379 |
+
*
|
380 |
+
* If option already exists a WP_Error is returned
|
381 |
+
* In most cases you'll want to use GPDFAPI::update_plugin_option() instead
|
382 |
+
*
|
383 |
+
* See https://gravitypdf.com/documentation/v4/api_add_plugin_option/ for more information about this method
|
384 |
+
*
|
385 |
+
* @param string $key The option key to add
|
386 |
+
* @param mixed $value
|
387 |
+
*
|
388 |
+
* @return boolean|WP_Error
|
389 |
+
*
|
390 |
+
* @since 4.0
|
391 |
+
*/
|
392 |
+
public static function add_plugin_option( $key, $value ) {
|
393 |
+
$options = static::get_options_class();
|
394 |
+
|
395 |
+
/* Check the option doesn't already exist */
|
396 |
+
if ( null !== $options->get_option( $key, null ) ) {
|
397 |
+
return new WP_Error( 'option_exists', esc_html__( 'The option key %s already exists. Use GPDFAPI::update_plugin_option instead', 'gravity-forms-pdf-extended' ) );
|
398 |
+
}
|
399 |
+
|
400 |
+
return static::update_plugin_option( $key, $value );
|
401 |
+
}
|
402 |
+
|
403 |
+
/**
|
404 |
+
* Updates a Gravity PDF global option. Will create option if it doesn't exist.
|
405 |
+
*
|
406 |
+
* If $value is falsy (determined by empty() ) the option is deleted.
|
407 |
+
*
|
408 |
+
* See https://gravitypdf.com/documentation/v4/api_update_plugin_option/ for more information about this method
|
409 |
+
*
|
410 |
+
* @param string $key The option key to update
|
411 |
+
* @param mixed $value
|
412 |
+
*
|
413 |
+
* @return boolean|WP_Error
|
414 |
+
*
|
415 |
+
* @since 4.0
|
416 |
+
*/
|
417 |
+
public static function update_plugin_option( $key, $value ) {
|
418 |
+
$options = static::get_options_class();
|
419 |
+
|
420 |
+
return $options->update_option( $key, $value );
|
421 |
+
}
|
422 |
+
|
423 |
+
/**
|
424 |
+
* Delete's a Gravity PDF global option.
|
425 |
+
*
|
426 |
+
* See https://gravitypdf.com/documentation/v4/api_delete_plugin_option/ for more information about this method
|
427 |
+
*
|
428 |
+
* @param string $key The option key to delete
|
429 |
+
*
|
430 |
+
* @return boolean
|
431 |
+
*
|
432 |
+
* @since 4.0
|
433 |
+
*/
|
434 |
+
public static function delete_plugin_option( $key ) {
|
435 |
+
$options = static::get_options_class();
|
436 |
+
|
437 |
+
return $options->delete_option( $key );
|
438 |
+
}
|
439 |
+
|
440 |
+
/**
|
441 |
+
* When provided the Gravity Form entry ID and PDF ID, this method will correctly generate the PDF, save it to disk,
|
442 |
+
* trigger appropriate actions and return the absolute path to the PDF.
|
443 |
+
*
|
444 |
+
* See https://gravitypdf.com/documentation/v4/api_create_pdf/ for more information about this method
|
445 |
+
*
|
446 |
+
* @param integer $entry_id The Gravity Form entry ID
|
447 |
+
* @param string $pdf_id The Gravity PDF ID number (the pid number in the URL when viewing a setting in the admin area)
|
448 |
+
*
|
449 |
+
* @return mixed Return the full path to the PDF, or a WP_Error on failure
|
450 |
+
*
|
451 |
+
* @since 4.0
|
452 |
+
*/
|
453 |
+
public static function create_pdf( $entry_id, $pdf_id ) {
|
454 |
+
|
455 |
+
$form_class = static::get_form_class();
|
456 |
+
|
457 |
+
/* Get our entry */
|
458 |
+
$entry = $form_class->get_entry( $entry_id );
|
459 |
+
|
460 |
+
if ( is_wp_error( $entry ) ) {
|
461 |
+
return new WP_Error( 'invalid_entry', 'Make sure to pass in a valid Gravity Forms Entry ID' );
|
462 |
+
}
|
463 |
+
|
464 |
+
/* Get our settings */
|
465 |
+
$setting = static::get_pdf( $entry['form_id'], $pdf_id );
|
466 |
+
|
467 |
+
if ( is_wp_error( $setting ) ) {
|
468 |
+
return new WP_Error( 'invalid_pdf_setting', 'Could not located the PDF Settings. Ensure you pass in a valid PDF ID.' );
|
469 |
+
}
|
470 |
+
|
471 |
+
$pdf = static::get_mvc_class( 'Model_PDF' );
|
472 |
+
|
473 |
+
return $pdf->generate_and_save_pdf( $entry, $setting );
|
474 |
+
}
|
475 |
+
|
476 |
+
/**
|
477 |
+
* Generates the current entry's HTML product table
|
478 |
+
*
|
479 |
+
* See https://gravitypdf.com/documentation/v4/api_product_table/ for more information about this method
|
480 |
+
*
|
481 |
+
* @param array $entry The Gravity Form entry
|
482 |
+
* @param boolean $return Whether to output or return the HTML
|
483 |
+
*
|
484 |
+
* @return string|void The product table or null
|
485 |
+
*
|
486 |
+
* @since 4.0
|
487 |
+
*/
|
488 |
+
public static function product_table( $entry, $return = false ) {
|
489 |
+
global $gfpdf;
|
490 |
+
|
491 |
+
$products = new GFPDF\Helper\Fields\Field_Products( new GF_Field(), $entry, $gfpdf->gform, $gfpdf->misc );
|
492 |
+
|
493 |
+
if ( ! $products->is_empty() ) {
|
494 |
+
|
495 |
+
if ( $return ) {
|
496 |
+
return $products->html();
|
497 |
+
}
|
498 |
+
|
499 |
+
echo $products->html();
|
500 |
+
}
|
501 |
+
|
502 |
+
return null;
|
503 |
+
}
|
504 |
+
|
505 |
+
/**
|
506 |
+
* Generates a likert table
|
507 |
+
*
|
508 |
+
* See https://gravitypdf.com/documentation/v4/likert_table/ for more information about this method
|
509 |
+
*
|
510 |
+
* @param array $entry The Gravity Form entry
|
511 |
+
* @param integer $field_id The likert field ID
|
512 |
+
* @param boolean $return Whether to output or return the HTML
|
513 |
+
*
|
514 |
+
* @return Mixed The likert table or null
|
515 |
+
*
|
516 |
+
* @since 4.0
|
517 |
+
*/
|
518 |
+
public static function likert_table( $entry, $field_id, $return = false ) {
|
519 |
+
global $gfpdf;
|
520 |
+
|
521 |
+
/* Get our form */
|
522 |
+
$form = $gfpdf->gform->get_form( $entry['form_id'] );
|
523 |
+
|
524 |
+
/* Check for errors */
|
525 |
+
if ( is_wp_error( $form ) ) {
|
526 |
+
return null;
|
527 |
+
}
|
528 |
+
|
529 |
+
/* Find our field ID, if any */
|
530 |
+
foreach ( $form['fields'] as $field ) {
|
531 |
+
|
532 |
+
if ( $field->id == $field_id && $field->inputType == 'likert' ) {
|
533 |
+
|
534 |
+
/* Output our likert */
|
535 |
+
$likert = new GFPDF\Helper\Fields\Field_Likert( $field, $entry, $gfpdf->gform, $gfpdf->misc );
|
536 |
+
|
537 |
+
if ( $return ) {
|
538 |
+
return $likert->html();
|
539 |
+
}
|
540 |
+
|
541 |
+
echo $likert->html();
|
542 |
+
break;
|
543 |
+
}
|
544 |
+
}
|
545 |
+
|
546 |
+
return null;
|
547 |
+
}
|
548 |
+
|
549 |
+
/**
|
550 |
+
* Installs a PDF font on the file system
|
551 |
+
*
|
552 |
+
* See https://gravitypdf.com/documentation/v4/api_add_pdf_font/ for more information about this method
|
553 |
+
*
|
554 |
+
* @param array $font The font information to add.
|
555 |
+
*
|
556 |
+
* This array needs to be in the following format:
|
557 |
+
*
|
558 |
+
* Array (
|
559 |
+
* 'font_name' => 'Lato',
|
560 |
+
* 'regular' => '/full/path/to/font/Lato-Regular.ttf',
|
561 |
+
* 'italics' => '/full/path/to/font/Lato-Italic.ttf',
|
562 |
+
* 'bold' => '/full/path/to/font/Lato-Bold.ttf',
|
563 |
+
* 'bolditalics' => '/full/path/to/font/Lato-BoldItalic.ttf',
|
564 |
+
* )
|
565 |
+
*
|
566 |
+
* Only the 'font_name' and 'regular' keys are required.
|
567 |
+
* All fonts should be referenced with the full server path.
|
568 |
+
* Currently, only .ttf fonts are supported.
|
569 |
+
* The font name can only contain alphanumeric characters, or a space
|
570 |
+
*
|
571 |
+
* @return bool|WP_Error
|
572 |
+
*
|
573 |
+
* @since 4.1
|
574 |
+
*/
|
575 |
+
public static function add_pdf_font( $font ) {
|
576 |
+
$settings = GPDFAPI::get_mvc_class( 'Model_Settings' );
|
577 |
+
|
578 |
+
if ( ! isset( $font['font_name'] ) || ! $settings->is_font_name_valid( $font['font_name'] ) ) {
|
579 |
+
return new WP_Error( 'invalid_font_name', 'Font name is not valid. Alphanumeric characters and spaces only.' );
|
580 |
+
}
|
581 |
+
|
582 |
+
if ( ! $settings->is_font_name_unique( $font['font_name'] ) ) {
|
583 |
+
return new WP_Error( 'font_name_not_unique', 'A font with the same name already exists.' );
|
584 |
+
}
|
585 |
+
|
586 |
+
$results = $settings->install_fonts( $font );
|
587 |
+
|
588 |
+
if ( isset( $results['errors'] ) ) {
|
589 |
+
return new WP_Error( 'font_installation_error', implode( "\n\n", $results['errors'] ) );
|
590 |
+
}
|
591 |
+
|
592 |
+
return true;
|
593 |
+
}
|
594 |
+
|
595 |
+
/**
|
596 |
+
* Deletes one of the v4 fonts that is installed
|
597 |
+
*
|
598 |
+
* See https://gravitypdf.com/documentation/v4/delete_pdf_font/ for more information about this method
|
599 |
+
*
|
600 |
+
* @param string $font_name The font that should be deleted
|
601 |
+
*
|
602 |
+
* @return bool|WP_Error
|
603 |
+
*
|
604 |
+
* @since 4.1
|
605 |
+
*/
|
606 |
+
public static function delete_pdf_font( $font_name ) {
|
607 |
+
$settings = GPDFAPI::get_mvc_class( 'Model_Settings' );
|
608 |
+
$options = GPDFAPI::get_options_class();
|
609 |
+
$misc = GPDFAPI::get_misc_class();
|
610 |
+
$data = GPDFAPI::get_data_class();
|
611 |
+
|
612 |
+
$fonts = $options->get_option( 'custom_fonts' );
|
613 |
+
$font_id = $settings->get_font_id_by_name( $font_name );
|
614 |
+
|
615 |
+
if ( ! isset( $fonts[ $font_id ] ) ) {
|
616 |
+
return new WP_Error( 'font_not_installed', 'Font not installed.' );
|
617 |
+
}
|
618 |
+
|
619 |
+
/* Remove the font files */
|
620 |
+
if ( ! $settings->remove_font_file( $fonts[ $font_id ] ) ) {
|
621 |
+
return new WP_Error( 'font_delete_failure', 'There was a problem deleting the font files.' );
|
622 |
+
}
|
623 |
+
|
624 |
+
/* Cleanup our fontdata directory to prevent caching issues with mPDF */
|
625 |
+
$misc->cleanup_dir( $data->template_fontdata_location );
|
626 |
+
|
627 |
+
/* Update the database */
|
628 |
+
unset( $fonts[ $font_id ] );
|
629 |
+
if ( ! $options->update_option( 'custom_fonts', $fonts ) ) {
|
630 |
+
return new WP_Error( 'font_delete_db_failure', 'There was a problem deleting the font from the database.' );
|
631 |
+
}
|
632 |
+
|
633 |
+
return true;
|
634 |
+
}
|
635 |
+
}
|
bower_components/backbone.modelbinder/.bower.json
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "backbone.modelBinder",
|
3 |
+
"version": "1.1.0",
|
4 |
+
"main": [
|
5 |
+
"Backbone.ModelBinder.js"
|
6 |
+
],
|
7 |
+
"dependencies": {
|
8 |
+
"backbone": ">=0.9.0",
|
9 |
+
"underscore": ">=1.3.1",
|
10 |
+
"jquery": ">=1.7.1"
|
11 |
+
},
|
12 |
+
"repository": {
|
13 |
+
"type": "git",
|
14 |
+
"url": "git://github.com/theironcook/Backbone.ModelBinder.git"
|
15 |
+
},
|
16 |
+
"homepage": "https://github.com/theironcook/Backbone.ModelBinder",
|
17 |
+
"_release": "1.1.0",
|
18 |
+
"_resolution": {
|
19 |
+
"type": "version",
|
20 |
+
"tag": "1.1.0",
|
21 |
+
"commit": "f490f9e1f92b0aa427caef43d3591fc79b2188d0"
|
22 |
+
},
|
23 |
+
"_source": "git://github.com/theironcook/Backbone.ModelBinder.git",
|
24 |
+
"_target": "~1.1.0",
|
25 |
+
"_originalSource": "backbone.modelbinder",
|
26 |
+
"_direct": true
|
27 |
+
}
|
bower_components/backbone.modelbinder/Backbone.ModelBinder.min.js
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Backbone.ModelBinder v1.1.0
|
2 |
+
// (c) 2015 Bart Wood
|
3 |
+
// Distributed Under MIT License
|
4 |
+
|
5 |
+
!function(t){"function"==typeof define&&define.amd?define(["underscore","jquery","backbone"],t):"undefined"!=typeof module&&module.exports?module.exports=t(require("underscore"),require("jquery"),require("backbone")):t(_,jQuery,Backbone)}(function(t,e,i){if(!i)throw"Please include Backbone.js before Backbone.ModelBinder.js";return i.ModelBinder=function(){t.bindAll.apply(t,[this].concat(t.functions(this)))},i.ModelBinder.SetOptions=function(t){i.ModelBinder.options=t},i.ModelBinder.VERSION="1.1.0",i.ModelBinder.Constants={},i.ModelBinder.Constants.ModelToView="ModelToView",i.ModelBinder.Constants.ViewToModel="ViewToModel",t.extend(i.ModelBinder.prototype,{bind:function(t,i,n,o){this.unbind(),this._model=t,this._rootEl=i,this._setOptions(o),this._model||this._throwException("model must be specified"),this._rootEl||this._throwException("rootEl must be specified"),n?(this._attributeBindings=e.extend(!0,{},n),this._initializeAttributeBindings(),this._initializeElBindings()):this._initializeDefaultBindings(),this._bindModelToView(),this._bindViewToModel()},bindCustomTriggers:function(t,e,i,n,o){this._triggers=i,this.bind(t,e,n,o)},unbind:function(){this._unbindModelToView(),this._unbindViewToModel(),this._attributeBindings&&(delete this._attributeBindings,this._attributeBindings=void 0)},_setOptions:function(e){this._options=t.extend({boundAttribute:"name"},i.ModelBinder.options,e),this._options.modelSetOptions||(this._options.modelSetOptions={}),this._options.modelSetOptions.changeSource="ModelBinder",this._options.changeTriggers||(this._options.changeTriggers={"":"change","[contenteditable]":"blur"}),this._options.initialCopyDirection||(this._options.initialCopyDirection=i.ModelBinder.Constants.ModelToView)},_initializeAttributeBindings:function(){var e,i,n,o,s;for(e in this._attributeBindings){for(i=this._attributeBindings[e],t.isString(i)?n={elementBindings:[{selector:i}]}:t.isArray(i)?n={elementBindings:i}:t.isObject(i)?n={elementBindings:[i]}:this._throwException("Unsupported type passed to Model Binder "+n),o=0;o<n.elementBindings.length;o++)s=n.elementBindings[o],s.attributeBinding=n;n.attributeName=e,this._attributeBindings[e]=n}},_initializeDefaultBindings:function(){var t,i,n,o,s;for(this._attributeBindings={},i=e("["+this._options.boundAttribute+"]",this._rootEl),t=0;t<i.length;t++)n=i[t],o=e(n).attr(this._options.boundAttribute),this._attributeBindings[o]?this._attributeBindings[o].elementBindings.push({attributeBinding:this._attributeBindings[o],boundEls:[n]}):(s={attributeName:o},s.elementBindings=[{attributeBinding:s,boundEls:[n]}],this._attributeBindings[o]=s)},_initializeElBindings:function(){var t,i,n,o,s,r,d;for(t in this._attributeBindings)for(i=this._attributeBindings[t],n=0;n<i.elementBindings.length;n++)if(o=i.elementBindings[n],s=""===o.selector?e(this._rootEl):e(o.selector,this._rootEl),0===s.length)this._throwException("Bad binding found. No elements returned for binding selector "+o.selector);else for(o.boundEls=[],r=0;r<s.length;r++)d=s[r],o.boundEls.push(d)},_bindModelToView:function(){this._model.on("change",this._onModelChange,this),this._options.initialCopyDirection===i.ModelBinder.Constants.ModelToView&&this.copyModelAttributesToView()},copyModelAttributesToView:function(e){var i,n;for(i in this._attributeBindings)(void 0===e||-1!==t.indexOf(e,i))&&(n=this._attributeBindings[i],this._copyModelToView(n))},copyViewValuesToModel:function(){var t,i,n,o,s,r;for(t in this._attributeBindings)for(i=this._attributeBindings[t],n=0;n<i.elementBindings.length;n++)if(o=i.elementBindings[n],this._isBindingUserEditable(o))if(this._isBindingRadioGroup(o))r=this._getRadioButtonGroupCheckedEl(o),r&&this._copyViewToModel(o,r);else for(s=0;s<o.boundEls.length;s++)r=e(o.boundEls[s]),this._isElUserEditable(r)&&this._copyViewToModel(o,r)},_unbindModelToView:function(){this._model&&(this._model.off("change",this._onModelChange),this._model=void 0)},_bindViewToModel:function(){t.each(this._options.changeTriggers,function(t,i){e(this._rootEl).on(t,i,this._onElChanged)},this),this._options.initialCopyDirection===i.ModelBinder.Constants.ViewToModel&&this.copyViewValuesToModel()},_unbindViewToModel:function(){this._options&&this._options.changeTriggers&&t.each(this._options.changeTriggers,function(t,i){e(this._rootEl).off(t,i,this._onElChanged)},this)},_onElChanged:function(t){var i,n,o,s;for(i=e(t.target)[0],n=this._getElBindings(i),o=0;o<n.length;o++)s=n[o],this._isBindingUserEditable(s)&&this._copyViewToModel(s,i)},_isBindingUserEditable:function(t){return void 0===t.elAttribute||"text"===t.elAttribute||"html"===t.elAttribute},_isElUserEditable:function(t){var e=t.attr("contenteditable");return e||t.is("input")||t.is("select")||t.is("textarea")},_isBindingRadioGroup:function(t){var i,n,o=t.boundEls.length>0;for(i=0;i<t.boundEls.length;i++)if(n=e(t.boundEls[i]),"radio"!==n.attr("type")){o=!1;break}return o},_getRadioButtonGroupCheckedEl:function(t){var i,n;for(i=0;i<t.boundEls.length;i++)if(n=e(t.boundEls[i]),"radio"===n.attr("type")&&n.prop("checked"))return n;return void 0},_getElBindings:function(t){var e,i,n,o,s,r,d=[];for(e in this._attributeBindings)for(i=this._attributeBindings[e],n=0;n<i.elementBindings.length;n++)for(o=i.elementBindings[n],s=0;s<o.boundEls.length;s++)r=o.boundEls[s],r===t&&d.push(o);return d},_onModelChange:function(){var t,e;for(t in this._model.changedAttributes())e=this._attributeBindings[t],e&&this._copyModelToView(e)},_copyModelToView:function(t){var n,o,s,r,d,l;for(d=this._model.get(t.attributeName),n=0;n<t.elementBindings.length;n++)for(o=t.elementBindings[n],s=0;s<o.boundEls.length;s++)r=o.boundEls[s],r._isSetting||(l=this._getConvertedValue(i.ModelBinder.Constants.ModelToView,o,d),this._setEl(e(r),o,l))},_setEl:function(t,e,i){e.elAttribute?this._setElAttribute(t,e,i):this._setElValue(t,i)},_setElAttribute:function(e,n,o){switch(n.elAttribute){case"html":e.html(o);break;case"text":e.text(o);break;case"enabled":e.prop("disabled",!o);break;case"displayed":e[o?"show":"hide"]();break;case"hidden":e[o?"hide":"show"]();break;case"css":e.css(n.cssAttribute,o);break;case"class":var s=this._model.previous(n.attributeBinding.attributeName),r=this._model.get(n.attributeBinding.attributeName);t.isUndefined(s)&&t.isUndefined(r)||(s=this._getConvertedValue(i.ModelBinder.Constants.ModelToView,n,s),e.removeClass(s)),o&&e.addClass(o);break;default:e.attr(n.elAttribute,o)}},_setElValue:function(t,e){if(t.attr("type"))switch(t.attr("type")){case"radio":t.prop("checked",t.val()===e);break;case"checkbox":t.prop("checked",!!e);break;case"file":break;default:t.val(e)}else t.is("input")||t.is("select")||t.is("textarea")?t.val(e||(0===e?"0":"")):t.text(e||(0===e?"0":""))},_copyViewToModel:function(t,n){var o,s,r;n._isSetting||(n._isSetting=!0,o=this._setModel(t,e(n)),n._isSetting=!1,o&&t.converter&&(s=this._model.get(t.attributeBinding.attributeName),r=this._getConvertedValue(i.ModelBinder.Constants.ModelToView,t,s),this._setEl(e(n),t,r)))},_getElValue:function(t,e){switch(e.attr("type")){case"checkbox":return e.prop("checked")?!0:!1;default:return void 0!==e.attr("contenteditable")?e.html():e.val()}},_setModel:function(t,e){var n={},o=this._getElValue(t,e);return o=this._getConvertedValue(i.ModelBinder.Constants.ViewToModel,t,o),n[t.attributeBinding.attributeName]=o,this._model.set(n,this._options.modelSetOptions)},_getConvertedValue:function(t,e,i){return e.converter?i=e.converter(t,i,e.attributeBinding.attributeName,this._model,e.boundEls):this._options.converter&&(i=this._options.converter(t,i,e.attributeBinding.attributeName,this._model,e.boundEls)),i},_throwException:function(t){if(!this._options.suppressThrows)throw t;"undefined"!=typeof console&&console.error&&console.error(t)}}),i.ModelBinder.CollectionConverter=function(e){if(this._collection=e,!this._collection)throw"Collection must be defined";t.bindAll(this,"convert")},t.extend(i.ModelBinder.CollectionConverter.prototype,{convert:function(t,e){return t===i.ModelBinder.Constants.ModelToView?e?e.id:void 0:this._collection.get(e)}}),i.ModelBinder.createDefaultBindings=function(t,i,n,o){var s,r,d,l,a={};for(s=e("["+i+"]",t),r=0;r<s.length;r++)if(d=s[r],l=e(d).attr(i),!a[l]){var u={selector:"["+i+'="'+l+'"]'};a[l]=u,n&&(a[l].converter=n),o&&(a[l].elAttribute=o)}return a},i.ModelBinder.combineBindings=function(e,i){return t.each(i,function(t,i){var n={selector:t.selector};t.converter&&(n.converter=t.converter),t.elAttribute&&(n.elAttribute=t.elAttribute),e[i]=e[i]?[e[i],n]:n}),e},i.ModelBinder});
|
bower_components/backbone.modelbinder/README.md
ADDED
@@ -0,0 +1,875 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Special thanks to [Derick Bailey](http://lostechies.com/derickbailey) for creating predecessor to this plugin.
|
2 |
+
I've been able to reuse unit tests he created for his [Backbone.ModelBinding](https://github.com/derickbailey/backbone.modelbinding) plugin.
|
3 |
+
|
4 |
+
|
5 |
+
### Rationale
|
6 |
+
Backbone is a great platform for writing client side applications but I've found that as views grow in complexity, synchronizing my models and views can be a pain.
|
7 |
+
I've spent the past few months trying to use existing view-model binding libraries that others were kind enough to create and share with the world.
|
8 |
+
Unfortunately in the majority of my backbone application I wasn't able to leverage the existing view-model binding libraries due to various limitations.
|
9 |
+
|
10 |
+
I created a new `Backbone.ModelBinder` class that I have leveraged in the majority of a large client side application.
|
11 |
+
The ModelBinder class helped me remove a lot of cluttered boilerplate code that existed to synchronize my models and views.
|
12 |
+
As my application became more asynchronous, the ModelBinder saves me from a lot of pain by automatically displaying model attributes in the view as they are asynchronously loaded.
|
13 |
+
Hopefully you'll find the ModelBinder useful too.
|
14 |
+
|
15 |
+
The `Backbone.ModelBinder` class:
|
16 |
+
|
17 |
+
* Is as simple as possible yet still flexible and powerful
|
18 |
+
* Leverages the exact same jQuery syntax that the Backbone.View event blocks use
|
19 |
+
* Allows you to define type formatting and type conversion in your bindings
|
20 |
+
* Provides a simple javascript only solution rather than mixing binding syntax in html templates and javascript files. I personally find mixing binding logic in my html files to be messy and confusing.
|
21 |
+
|
22 |
+
<br>
|
23 |
+
You can use this ModelBinder class to bind backbone model attributes to:
|
24 |
+
|
25 |
+
* Read-only html elements such as `<span>`, `<div>` etc.
|
26 |
+
* Html element attributes such as enabled, displayed, style etc.
|
27 |
+
* Editable form elements such as `<input>`, `<textarea>` etc. This type of binding is bidirectional between the html elements and the Model's attributes.
|
28 |
+
|
29 |
+
<br>
|
30 |
+
###The ModelBinder is more efficient###
|
31 |
+
It seems like many of the backbone view examples I've seen register for the model's change event and then re-render the entire view like the example shown below.
|
32 |
+
|
33 |
+
````
|
34 |
+
SomeView = Backbone.View.extend({
|
35 |
+
initialize: function(){
|
36 |
+
this.model.on('change', this.render, this);
|
37 |
+
},
|
38 |
+
|
39 |
+
render: function() {
|
40 |
+
this.$el.html(this.template(this.model.toJSON()));
|
41 |
+
return this;
|
42 |
+
}
|
43 |
+
});
|
44 |
+
````
|
45 |
+
If the model changes frequently the above type of code will be wasteful because so many DOM elements are just thrown away. Converting the model to json is also an unnecessary conversion.
|
46 |
+
|
47 |
+
The ModelBinder eliminates these ineffeciencies by listening for model changes like the above code. But it doesn't recreate the entire set of DOM elements. Instead, it will change the content of existing DOM elements.
|
48 |
+
|
49 |
+
|
50 |
+
<br>
|
51 |
+
## Prerequisites
|
52 |
+
|
53 |
+
* Backbone.js v1.0.0 or higher
|
54 |
+
* Underscore.js v1.4.4 or higher
|
55 |
+
* jQuery v1.8.3 or higher
|
56 |
+
|
57 |
+
|
58 |
+
<br>
|
59 |
+
### Availability
|
60 |
+
You can download the zip/tarball as normal and include it with your other JS assets, but you can now alternatively link to it on [CDNJS](http://www.cdnjs.com/), the free to use, community maintained CDN.
|
61 |
+
|
62 |
+
To do this, just drop a reference to the minified version of the plugin into your document's `<head>` as follows, replacing the version number with whatever the latest one is:
|
63 |
+
````
|
64 |
+
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/backbone.modelbinder/1.0.4/Backbone.ModelBinder.min.js"></script>
|
65 |
+
````
|
66 |
+
|
67 |
+
|
68 |
+
<br>
|
69 |
+
##Defining Binding Scope with jQuery##
|
70 |
+
|
71 |
+
One of the most powerful capabilities of the ModelBinder class is that it allows you to define scope when you create your bindings using jQuery.
|
72 |
+
|
73 |
+
* If your views are simple (no nested Views etc.) you can rely on default scoping rules that are based off of the html `name` attribute.
|
74 |
+
* If your views are more complex you can explicitly define scoping rules with jQuery selectors. Scoping will allow you to handle nested views or have the ModelBinder only manage parts of your Views and your own custom code can handle the more complicated problems.
|
75 |
+
|
76 |
+
Both scoping mechanisms will be discussed throughout the rest of this document.
|
77 |
+
|
78 |
+
***
|
79 |
+
|
80 |
+
##Basic ModelBinder functionality##
|
81 |
+
|
82 |
+
The `ModelBinder` class contains all of the logic to facilitate bi-directional view-model binding.
|
83 |
+
|
84 |
+
The ModelBinder class exposes 3 public functions shown below:
|
85 |
+
|
86 |
+
```javascript
|
87 |
+
// no arguments passed to the constructor
|
88 |
+
constructor();
|
89 |
+
|
90 |
+
// model is required, it is the backbone Model you're binding to
|
91 |
+
// rootEl is required, is the root html element containing the elements you want to bind to
|
92 |
+
// bindings is optional, it's discussed a bit later
|
93 |
+
// options, discussed at the bottom of the document
|
94 |
+
bind(model, rootEl, bindings, options);
|
95 |
+
|
96 |
+
// unbinds the Model with the elements found under rootEl - defined when calling bind()
|
97 |
+
unbind();
|
98 |
+
```
|
99 |
+
|
100 |
+
<br>
|
101 |
+
The `bind()` function's 3rd argument `bindings` is optional. The `bindings` arg is useful for defining binding scope and formatting and will be discussed later.
|
102 |
+
If `bindings` is not defined, then `bind()` will locate all of the child elements under the rootEl that define a `name` attribute.
|
103 |
+
Each of the elements with a `name` attribute will be bound to the model's attributes - the value of the element's name attribute will be used as the model's attribute name.
|
104 |
+
|
105 |
+
In the example below, the model's address attribute will be bound to the input text field with the name of 'address'. This binding is bi-directional between the view and the model.
|
106 |
+
|
107 |
+
````
|
108 |
+
<!-- The html -->
|
109 |
+
<input type="text" name="address"/>
|
110 |
+
````
|
111 |
+
|
112 |
+
````
|
113 |
+
<!-- The javascript -->
|
114 |
+
SomeView = Backbone.View.extend({
|
115 |
+
render: function(){
|
116 |
+
this.modelBinder.bind(this.model, this.el);
|
117 |
+
}
|
118 |
+
});
|
119 |
+
````
|
120 |
+
|
121 |
+
<br>
|
122 |
+
## Binding after elements created, rootEl ##
|
123 |
+
|
124 |
+
The bind() functions `rootEl` parameter should contain all of the elements that you want to bind to.
|
125 |
+
Your rootEl might be the view.el property or it could be any valid html element. It does not matter if the rootEl is displayed in a browser.
|
126 |
+
|
127 |
+
The example below shows how the rootEl argument is the result of the jQuery selection "#outerDiv". This will work just like the previous example.
|
128 |
+
|
129 |
+
````
|
130 |
+
<!-- The html -->
|
131 |
+
<div id="outerDiv">
|
132 |
+
<input type="text" name="address"/>
|
133 |
+
</div>
|
134 |
+
````
|
135 |
+
|
136 |
+
````
|
137 |
+
<!-- The javascript -->
|
138 |
+
SomeView = Backbone.View.extend({
|
139 |
+
render: function(){
|
140 |
+
this.modelBinder.bind(this.model, this.$('#outerDiv'));
|
141 |
+
}
|
142 |
+
});
|
143 |
+
````
|
144 |
+
|
145 |
+
<br>
|
146 |
+
## Elements are recursively bound ##
|
147 |
+
|
148 |
+
If you do not pass the `bindings` 3rd parameter to the bind() function, <b>all</b> child elements under the rootEl with a "name" attribute are bound.
|
149 |
+
This includes any nested child elements that define the "name" attribute.
|
150 |
+
|
151 |
+
In the example below, the "address" and the "city" elements will be bound to the model.
|
152 |
+
|
153 |
+
````
|
154 |
+
<!-- The html -->
|
155 |
+
<div id="outerDiv">
|
156 |
+
<input type="text" name="address"/>
|
157 |
+
<div id="divTwo">
|
158 |
+
<input type="text" name="city"/>
|
159 |
+
</div>
|
160 |
+
</div>
|
161 |
+
````
|
162 |
+
|
163 |
+
````
|
164 |
+
<!-- The javascript -->
|
165 |
+
SomeView = Backbone.View.extend({
|
166 |
+
render: function(){
|
167 |
+
this.modelBinder.bind(this.model, this.el);
|
168 |
+
}
|
169 |
+
});
|
170 |
+
````
|
171 |
+
|
172 |
+
|
173 |
+
<br>
|
174 |
+
## Binding multiple html elements to the same model attribute ##
|
175 |
+
|
176 |
+
In the example below, the `<span>` and the `<input>` elements are both bound to the model.firstName attribute.
|
177 |
+
If you modified the firstName input element you would see the span automatically updated because the Model would have been updated.
|
178 |
+
|
179 |
+
````
|
180 |
+
<!-- The html -->
|
181 |
+
Welcome, <span name="firstName"></span>
|
182 |
+
|
183 |
+
Edit your information:
|
184 |
+
<input type="text" name="firstName"/>
|
185 |
+
````
|
186 |
+
|
187 |
+
````
|
188 |
+
<!-- The javascript -->
|
189 |
+
SomeView = Backbone.View.extend({
|
190 |
+
render: function(){
|
191 |
+
this.modelBinder.bind(this.model, this.el);
|
192 |
+
}
|
193 |
+
});
|
194 |
+
````
|
195 |
+
|
196 |
+
<br>
|
197 |
+
If your View element definitions are simple you can rely on having properly defined "name" attributes in your html elements that match your Model attribute names.
|
198 |
+
Remember that **all** of the rootEl's child elements (recursive) with a "name" attribute will be bound to your Model.
|
199 |
+
|
200 |
+
If your views require formatting, conversion or more scoping due to nested or complex views you'll need to define a `bindings` parameter to the `bind()` function as discussed in the next section.
|
201 |
+
|
202 |
+
|
203 |
+
***
|
204 |
+
|
205 |
+
##The bindings parameter to the bind() function##
|
206 |
+
|
207 |
+
For more complicated things like formatting or defining scope for composite or nested Views you'll need to define a `bindings` parameter - the optional 3rd parameter to the `bind()` function.
|
208 |
+
The bindings parameter is a javascript hash object.
|
209 |
+
|
210 |
+
The bindings hash keys are the model's attribute names and the values, in the simplest case, are jQuery selectors that must return at least 1 html element.
|
211 |
+
|
212 |
+
The example below binds model.address to the element with the id="address":
|
213 |
+
|
214 |
+
````
|
215 |
+
<input type='text' id='address'/>
|
216 |
+
|
217 |
+
var bindings = {address: '#address'};
|
218 |
+
modelBinder.bind(this.model, this.el, bindings);
|
219 |
+
````
|
220 |
+
|
221 |
+
The example below binds model.homeAddress to the element with name="homeAddress" and model.workAddress to the element with name="workAddress":
|
222 |
+
|
223 |
+
````
|
224 |
+
<input type="text" name="homeAddress"/>
|
225 |
+
<input type="text" name="workAddress "/>
|
226 |
+
|
227 |
+
var bindings = {homeAddress: '[name=homeAddress]', workAddress : '[name=workAddress ]'};
|
228 |
+
modelBinder.bind(this.model, this.el, bindings);
|
229 |
+
````
|
230 |
+
|
231 |
+
The example below binds model.city to `<input type="text" id="city"/>`:
|
232 |
+
|
233 |
+
````
|
234 |
+
var bindings = {city: '#city'};
|
235 |
+
modelBinder.bind(this.model, this.el, bindings);
|
236 |
+
````
|
237 |
+
|
238 |
+
You can use any jQuery selector that you like, as long as the selector returns at least a single element.
|
239 |
+
In the example below, both the `<span>` and the `<input>` elements are bound to the model.firstName attribute.
|
240 |
+
In this situation, you could also eliminate the bindings and get the same behavior.
|
241 |
+
|
242 |
+
````
|
243 |
+
<!-- The html -->
|
244 |
+
Welcome, <span name="firstName"></span>
|
245 |
+
|
246 |
+
Edit your information:
|
247 |
+
<input type="text" name="firstName"/>
|
248 |
+
````
|
249 |
+
|
250 |
+
````
|
251 |
+
<!-- The javascript -->
|
252 |
+
var bindings = {firstName: '[name=firstName]'};
|
253 |
+
modelBinder.bind(this.model, this.el, bindings);
|
254 |
+
````
|
255 |
+
|
256 |
+
<br>
|
257 |
+
Here are a few more examples of the bindings hash syntax.
|
258 |
+
|
259 |
+
````
|
260 |
+
Html bindings entry
|
261 |
+
-----------------------------------------------------------------------------------------------
|
262 |
+
<input type="text" id="firstName"/> firstName: '#firstName'
|
263 |
+
|
264 |
+
<input type="text" name="firstName"/> firstName: '[name=firstName]'
|
265 |
+
|
266 |
+
<select name="operatorSelectEl"> operator: '[name=operatorSelectEl]'
|
267 |
+
<option value="1">Dan</option>
|
268 |
+
<option value="2">Eli</option>
|
269 |
+
<option value="3">Frank</option>
|
270 |
+
</select>
|
271 |
+
|
272 |
+
<input type="radio" name="isOk" value="yes"> isOk: '[name=isOk]'
|
273 |
+
|
274 |
+
<input type="text" class="myTestClass" myTestAttribute: '[class~=myTestClass]'
|
275 |
+
name="address"/>
|
276 |
+
````
|
277 |
+
|
278 |
+
<br>
|
279 |
+
## You can define multiple jQuery selectors ##
|
280 |
+
|
281 |
+
The binding entries can be defined as strings as shown in all previous examples but internally the string is converted to the type of entry shown below.
|
282 |
+
|
283 |
+
````
|
284 |
+
firstName: {selector: '#firstName'}
|
285 |
+
````
|
286 |
+
|
287 |
+
The jQuery string is a hash parameter named `selector`.
|
288 |
+
You can define arrays of `selector` arguments in your bindings as shown in the example below.
|
289 |
+
|
290 |
+
````
|
291 |
+
firstName: [{selector: '#firstName'}, {selector: '#title'}]
|
292 |
+
````
|
293 |
+
|
294 |
+
In the example above, model.firstName is bound to an element with the id of "firstName" and an element with the id of "title".
|
295 |
+
To define multiple selectors, just define them as an array.
|
296 |
+
|
297 |
+
The jQuery bindings leverage the jQuery delegate mechanism - which means they should be fairly efficient.
|
298 |
+
|
299 |
+
##Binding to the Root Element##
|
300 |
+
|
301 |
+
Sometimes, in rare cases, your views are so simple that you just want to bind
|
302 |
+
to the root element itself. For example, if your view is an `<li>` tag, it
|
303 |
+
makes sense to have the inner HTML simply be the appropriate model value.
|
304 |
+
|
305 |
+
In those cases, simply use an empty string as your selector:
|
306 |
+
|
307 |
+
````
|
308 |
+
firstName: { selector: '' }
|
309 |
+
````
|
310 |
+
|
311 |
+
<br>
|
312 |
+
***
|
313 |
+
|
314 |
+
##Formatting and converting values##
|
315 |
+
|
316 |
+
The bindings can also define a `converter` parameter.
|
317 |
+
A converter is simply a function that is called whenever a model's attribute is copied to an html element or when an html elements value is copied into a model's attribute.
|
318 |
+
|
319 |
+
Converters help you format values in your views but help keep them clean in your models.
|
320 |
+
|
321 |
+
A simple of example of using a converter to format a phone number is shown below.
|
322 |
+
|
323 |
+
````
|
324 |
+
var phoneConverter = function(direction, value){
|
325 |
+
// direction is either ModelToView or ViewToModel
|
326 |
+
// Return either a formatted value for the view or an un-formatted value for the model
|
327 |
+
};
|
328 |
+
|
329 |
+
var bindings = {phoneNumber: {selector: '[name=phoneNumber]', converter: phoneConverter}}
|
330 |
+
modelBinder.bind(this.model, this.el, bindings );
|
331 |
+
````
|
332 |
+
|
333 |
+
<br>
|
334 |
+
A converter function is passed 4 parameters.
|
335 |
+
|
336 |
+
* direction - either ModelToView or ViewToModel
|
337 |
+
* value - the model's attribute value or the view element's value
|
338 |
+
* attribute Name
|
339 |
+
* model - this is more useful when you're dealing with calculated attributes
|
340 |
+
* els - an array of the els that were bound to the converter
|
341 |
+
|
342 |
+
If your binding to a read-only element like a `<div>` you'll just ignore the direction parameter - it's always ModelToView.
|
343 |
+
In most cases, you'll be able to ignore the attribute name and model parameters but they can be helpful in some situations discussed later.
|
344 |
+
|
345 |
+
The Model parameter can be quite helpful in complicated situations.
|
346 |
+
The els array allows a developer to manually modify the els directly when a converter is invoked.
|
347 |
+
Be very careful when accessing the els directly because any state you set into the els might be overwritten by the ModelBinder after the converter is finished.
|
348 |
+
For example, if a converter is called with the direction 'ModelToView' and inside the converter the code updates the el values directly those values will be overwritten with the value returned from the converter function.
|
349 |
+
The els array is more valuable if you need to set other properties etc. on the els. In most situations you should not need the els parameter.
|
350 |
+
|
351 |
+
|
352 |
+
<br>
|
353 |
+
Converters can be used for simple formatting operations like phone numbers but they can also be used for more advanced situations like when you want to convert between a model and some description of the model.
|
354 |
+
You might want to display a list of models in a `<select>` element - a converter could allow you to convert between a model and a model's id making this type of binding easy to do.
|
355 |
+
|
356 |
+
The example below shows how this could work. The `CollectionConverter` shown is defined in the ModelBinder.js file.
|
357 |
+
|
358 |
+
````
|
359 |
+
<!-- The html -->
|
360 |
+
<select name="nestedModel">
|
361 |
+
<option value="">Please Select Something</option>
|
362 |
+
<% _.each(nestedModelChoices, function (modelChoice) { %>
|
363 |
+
<option value="<%= modelChoice.id %>"><%= modelChoice.description %></option>
|
364 |
+
<% }); %>
|
365 |
+
</select>
|
366 |
+
````
|
367 |
+
|
368 |
+
````
|
369 |
+
<!-- The javascript -->
|
370 |
+
SomeView = Backbone.View.extend({
|
371 |
+
render: function(){
|
372 |
+
// An example of what might be passed to the template function
|
373 |
+
var nestedModelChoices = [{id: 1, description: 'This is One'}, {id: 2, description: 'This is Two'}];
|
374 |
+
|
375 |
+
$(this.el).html(this.template({nestedModelChoices: nestedModelChoices}));
|
376 |
+
|
377 |
+
var binder = new Backbone.ModelBinder();
|
378 |
+
|
379 |
+
var bindingsHash = {nestedModel: { selector: '[name=nestedModel]',
|
380 |
+
converter: new Backbone.ModelBinder.CollectionConverter(nestedModelChoices).convert} };
|
381 |
+
|
382 |
+
binder.bind(this.model, this.el, bindingsHash);
|
383 |
+
````
|
384 |
+
|
385 |
+
<br>
|
386 |
+
## Converters can display calculated attributes ##
|
387 |
+
|
388 |
+
Sometimes your models will have computed attributes.
|
389 |
+
You could cache computed values inside a model's attribute collection and it would be bound like any other attribute.
|
390 |
+
I favor this solution but it's not perfect because when you save models back to the server, the calculated attributes are sent.
|
391 |
+
|
392 |
+
If your model's computed attribute is calculated via a function we can use a converter for the binding.
|
393 |
+
In the example below, we have a simple computed attribute named hoursLeft calculated by the function calculateHoursLeft().
|
394 |
+
|
395 |
+
````
|
396 |
+
SomeModel = Backbone.Model.extend({
|
397 |
+
defaults: {currentHours: 3, totalHours: 8},
|
398 |
+
|
399 |
+
calculateHoursLeft: function(){
|
400 |
+
return this.get('totalHours') - this.get('currentHours');
|
401 |
+
}
|
402 |
+
})
|
403 |
+
|
404 |
+
// Here is how how we could create a binding for a calculated attribute
|
405 |
+
var bindings = {currentHours: {selector: '[name=hoursLeft]', converter: this.model.calculateHoursLeft}};
|
406 |
+
modelBinder.bind(this.model, this.el, bindings);
|
407 |
+
````
|
408 |
+
|
409 |
+
In the example above, we are binding to the model's attribute 'currentHours' because when currentHours changes the hoursLeft calculated value will change - the converter will be invoked at that time.
|
410 |
+
The converter is simply the model's calculateHoursLeft() function. The function just ignores the parameters passed to it and calculates the hours left.
|
411 |
+
|
412 |
+
<br>
|
413 |
+
If the currentHours attribute is also bound to another html element you could specify an array of element bindings in the binding definition like the example shown below.
|
414 |
+
|
415 |
+
````
|
416 |
+
var bindings = {currentHours: [ {selector: '[name=hoursLeft]', converter: this.model.calculateHoursLeft},
|
417 |
+
{selector: '[name=currentHours]']};
|
418 |
+
modelBinder.bind(this.model, this.el, bindings);
|
419 |
+
````
|
420 |
+
|
421 |
+
If converters need any other special logic they can be defined in another function outside of the Model because the converter function is passed the Model as a parameter.
|
422 |
+
|
423 |
+
|
424 |
+
|
425 |
+
<br>
|
426 |
+
|
427 |
+
***
|
428 |
+
|
429 |
+
##Binding to html element attributes##
|
430 |
+
|
431 |
+
You can also define bindings to be bound to any html element's attribute like enabled, class, style or any other attribute you define.
|
432 |
+
The example below shows how to use the `elAttribute` option. In this example, the address element will be enabled depending on what the Model.isAddressEnabled attribute is.
|
433 |
+
|
434 |
+
````
|
435 |
+
var bindings = {isAddressEnabled: {selector: '[name=address]', elAttribute: 'enabled'}};
|
436 |
+
modelBinder.bind(this.model, this.el, bindings);
|
437 |
+
````
|
438 |
+
|
439 |
+
<br>
|
440 |
+
You could also extend the example above to be a bit more complicated. Let's pretend the Model has an attribute called customerType and if customerType == 'residential' we want the address to enabled, otherwise we want it disabled. We can handle this type of binding by leveraging both `converter` and `elAttribute`. The example below shows how this would work. When the Model.customerType is updated, the address input element's enabled attribute would be updated.
|
441 |
+
|
442 |
+
````
|
443 |
+
var addressEnabledConverter = function(direction, value) { return value === 'residential'; };
|
444 |
+
|
445 |
+
var bindings = {customerType: {selector: '[name=address]', elAttribute: 'enabled', converter: addressEnabledConverter}};
|
446 |
+
modelBinder.bind(this.model, this.el, bindings);
|
447 |
+
````
|
448 |
+
|
449 |
+
<br>
|
450 |
+
You could also bind to an element's class property as shown in the example below.
|
451 |
+
|
452 |
+
````
|
453 |
+
<!-- The html -->
|
454 |
+
<div id="patientPic" class="patientPic"></div>
|
455 |
+
````
|
456 |
+
|
457 |
+
````
|
458 |
+
<!-- The javascript -->
|
459 |
+
var bindings = {gender: {selector: '#patientPicture', elAttribute: 'class'}};
|
460 |
+
modelBinder.bind(this.model, this.el, bindings);
|
461 |
+
````
|
462 |
+
|
463 |
+
In this example, the model.gender value is either "M" or "F". The CSS files define styles for "patientPic" with either "M" or "F" to show the correct type of avatar.
|
464 |
+
|
465 |
+
|
466 |
+
<br>
|
467 |
+
|
468 |
+
***
|
469 |
+
|
470 |
+
##Proper scope helps you bind to complex nested views##
|
471 |
+
|
472 |
+
Sometimes you'll have nested models displayed in nested views.
|
473 |
+
An example of a nested backbone model is shown below. The personModel has a nested homeAddressModel.
|
474 |
+
|
475 |
+
````
|
476 |
+
var personModel = new Backbone.Model({firstName: 'Herman', lastName: 'Munster'});
|
477 |
+
var homeAddressModel = new Backbone.Model({street: '1313 Mockingbird Lane', city: 'Mockingbird Heights'});
|
478 |
+
|
479 |
+
personModel.set({homeAddress: homeAddressModel});
|
480 |
+
````
|
481 |
+
|
482 |
+
In the example above, the nested model is also a backbone.Model but sometimes your nested models are raw javascript objects. I'll talk about that situation a bit later.
|
483 |
+
|
484 |
+
You can bind to this type of nested backbone model fairly easily with the ModelBinder.
|
485 |
+
|
486 |
+
There are 2 basic ways to bind nested Models in a View:
|
487 |
+
|
488 |
+
1. With a scoped `rootEl` that only contains html elements specific to the nested Model.
|
489 |
+
2. With scoped bindings selectors in the bindings hash.
|
490 |
+
|
491 |
+
<br>
|
492 |
+
##Nested View option 1: A scoped `rootEl`##
|
493 |
+
|
494 |
+
If your nested view can be defined under a single parent element such as a `<div>` you can pass that parent element as the `rootEl` for your nested ModelBinder as shown in the example below.
|
495 |
+
It refers to the personModel and homeAddressModels defined in a previous code snippet.
|
496 |
+
|
497 |
+
````
|
498 |
+
<!-- html -->
|
499 |
+
<div id="personFields">
|
500 |
+
<input type="text" name="firstName"/>
|
501 |
+
<input type="text" name="lastName"/>
|
502 |
+
</div>
|
503 |
+
<div id="homeAddressFields">
|
504 |
+
<input type="text" name="street"/>
|
505 |
+
<input type="text" name="city"/>
|
506 |
+
</div>
|
507 |
+
````
|
508 |
+
|
509 |
+
````
|
510 |
+
<!-- javascript -->
|
511 |
+
personBinder.bind(this.personModel, this.$('#personFields'));
|
512 |
+
addressBinder.bind(this.personModel.get('homeAddress'), this.$('#homeAddressFields'));
|
513 |
+
````
|
514 |
+
|
515 |
+
In the example above, the nested homeAddressModel is bound to the correct fields because they are scoped by a single parent element.
|
516 |
+
The personModel bindings also needed to be separately scoped as well.
|
517 |
+
|
518 |
+
If the personModel fields were defined on a level that also included the homeAddressFields then the homeAddressFields would have appeared in the personModel.
|
519 |
+
The next option shows how to avoid that situation.
|
520 |
+
|
521 |
+
<br>
|
522 |
+
##Nested View option 2: scoped bindings##
|
523 |
+
|
524 |
+
If your parent and nested Model html elements cannot live under their own parent elements then you'll need to define the `bindings` with jQuery selectors that are properly scoped as shown in the example below.
|
525 |
+
|
526 |
+
````
|
527 |
+
<!-- Html -->
|
528 |
+
<input type="text" name="firstName"/>
|
529 |
+
<input type="text" name="lastName"/>
|
530 |
+
<input type="text" name="street"/>
|
531 |
+
<input type="text" name="city"/>
|
532 |
+
````
|
533 |
+
|
534 |
+
````
|
535 |
+
<!-- javascript -->
|
536 |
+
var personBindings = {firstName: '[name=firstName]', lastName: '[name=lastName]'};
|
537 |
+
personBinder.bind(this.personModel, this.el, personBindings);
|
538 |
+
|
539 |
+
var addressBindings = {street: '[name=street]', city: '[name=city]'};
|
540 |
+
addressBinder.bind(this.personModel.get('homeAddress'), this.el, addressBindings);
|
541 |
+
````
|
542 |
+
|
543 |
+
|
544 |
+
<br>
|
545 |
+
|
546 |
+
***
|
547 |
+
|
548 |
+
##The ModelBinder can be a partial solution##
|
549 |
+
|
550 |
+
In some situations, you might have very complex views where you only want some of your view's elements bound by the ModelBinder.
|
551 |
+
To limit the scope of which fields are bound, you just need to properly scope your bindings hash.
|
552 |
+
|
553 |
+
In the example below, the modelBinder will ignore the "phone" and "fax" elements.
|
554 |
+
|
555 |
+
````
|
556 |
+
<!-- Html -->
|
557 |
+
<input type="text" name="firstName"/>
|
558 |
+
<input type="text" name="lastName"/>
|
559 |
+
<input type="text" name="phone"/>
|
560 |
+
<input type="text" name="fax"/>
|
561 |
+
````
|
562 |
+
|
563 |
+
````
|
564 |
+
<!-- javascript -->
|
565 |
+
var personBindings = {firstName: '[name=firstName]', lastName: '[name=lastName]'};
|
566 |
+
modelBinder.bind(this.personModel, this.el, personBindings);
|
567 |
+
````
|
568 |
+
|
569 |
+
|
570 |
+
<br>
|
571 |
+
|
572 |
+
***
|
573 |
+
|
574 |
+
##Quickly create and modify bindings##
|
575 |
+
|
576 |
+
In some situations, you might have a large amount of elements that need to be bound but only a few of them need a converter or elAttribute defined.
|
577 |
+
You probably don't want to define all of the element bindings manually just to add a converter to a few of them.
|
578 |
+
The utility function Backbone.ModelBinder.createDefaultBindings can help you in this situation.
|
579 |
+
|
580 |
+
The Backbone.ModelBinder.createDefaultBindings( ) is shown below.
|
581 |
+
|
582 |
+
````
|
583 |
+
// A static helper function to create a default set of bindings that you can customize before calling the bind() function
|
584 |
+
// rootEl - where to find all of the bound elements
|
585 |
+
// attributeType - probably 'name' or 'id' in most cases
|
586 |
+
// converter(optional) - the default converter you want applied to all your bindings
|
587 |
+
// elAttribute(optional) - the default elAttribute you want applied to all your bindings
|
588 |
+
Backbone.ModelBinder.createDefaultBindings = function(rootEl, attributeType, converter, elAttribute){
|
589 |
+
...
|
590 |
+
}
|
591 |
+
````
|
592 |
+
|
593 |
+
You can use this function to gather all of the elements under the rootEl with a "name" or "id" attribute and quickly create all of the bindings and then modify those bindings.
|
594 |
+
You might want to delete one or more of the bindings, add converters or elAttributes to bindings etc.
|
595 |
+
Be careful when you use this with radio buttons - you might not get the proper selectors if you're not careful.
|
596 |
+
|
597 |
+
An example of how you might use createDefaultBindings( ) is shown below.
|
598 |
+
|
599 |
+
````
|
600 |
+
// The view has several form element with a name attribute that should be bound
|
601 |
+
// but one binding requires a converter and one of the bindings should be removed
|
602 |
+
var bindings = Backbone.ModelBinder.createDefaultBindings(this.el, 'name');
|
603 |
+
bindings['phone'].converter = this._phoneConverterFunction;
|
604 |
+
delete bindings['complicatedAttribute'];
|
605 |
+
|
606 |
+
this._modelBinder.bind(this.model, this.el, bindings);
|
607 |
+
````
|
608 |
+
|
609 |
+
###Change attribute used for binding###
|
610 |
+
|
611 |
+
By default, the `name` attribute of your elements is used to create bindings. Changing this can be accomplished easily in one of two ways. First, by using `createDefaultBindings`:
|
612 |
+
|
613 |
+
````
|
614 |
+
var bindings = Backbone.ModelBinder.createDefaultBindings(this.el, 'data-custom');
|
615 |
+
this._modelBinder.bind(this.model, this.el, bindings);
|
616 |
+
````
|
617 |
+
|
618 |
+
Alternatively, setting `boundAttribute` on the options hash given to bind can point it at any attribute.
|
619 |
+
|
620 |
+
````
|
621 |
+
// Set the default bindings based on the data-custom attribute rather than name.
|
622 |
+
this._modelBinder.bind(this.model, this.el, null, { boundAttribute: 'data-custom' });
|
623 |
+
````
|
624 |
+
|
625 |
+
<br>
|
626 |
+
|
627 |
+
***
|
628 |
+
|
629 |
+
<br>
|
630 |
+
|
631 |
+
## The Power of jQuery ##
|
632 |
+
Your jQuery selectors can be based off of a class attribute or anything else you'd like as shown in the example below.
|
633 |
+
|
634 |
+
````
|
635 |
+
<!-- html -->
|
636 |
+
<input type="text" class="partOne" name="address"/>
|
637 |
+
<input type="text" class="partOne" name="phone"/>
|
638 |
+
<input type="text" class="partOne" name="fax"/>
|
639 |
+
````
|
640 |
+
|
641 |
+
````
|
642 |
+
<!-- javascript -->
|
643 |
+
SomeView = Backbone.View.extend({
|
644 |
+
render: function(){
|
645 |
+
$(this.el).html(this.template({model: this.model.toJSON()}));
|
646 |
+
|
647 |
+
var bindingsHash = {isPartOneEnabled: {selector: '[class~=partOne]', elAttribute: 'enabled'}};
|
648 |
+
|
649 |
+
this.modelBinder.bind(this.model, this.el, bindingsHash);
|
650 |
+
}
|
651 |
+
````
|
652 |
+
|
653 |
+
In this example, all 3 html elements enabled attribute are bound to the Model's isPartOneEnabled attribute.
|
654 |
+
This is because the jQuery selector '[class~=partOne]' returned all 3 elements.
|
655 |
+
|
656 |
+
|
657 |
+
<br>
|
658 |
+
|
659 |
+
***
|
660 |
+
|
661 |
+
## Calling bind() multiple times ##
|
662 |
+
|
663 |
+
Calling ModelBinder.bind() will automatically internally call the unbind() function to unbind the previous model.
|
664 |
+
You can reuse the same ModelBinder instance with multiple models or even rootEls - just be aware that all previous bindings will be removed.
|
665 |
+
|
666 |
+
<br>
|
667 |
+
## Model values are copied to views when bind() is called ##
|
668 |
+
|
669 |
+
The model's attributes are bound are copied from the model to bound elements when the bind() function is called.
|
670 |
+
View element default values are not copied to the model when bind() is called. That type of behavior usually belongs in the Backbone.Model defaults block.
|
671 |
+
|
672 |
+
If you do need to have values copied from the view to the model when bind() is called I would first question why.
|
673 |
+
In most situations, especially for single page web apps, it's almost always better to let your models drive the behavior of the app instead of the views.
|
674 |
+
If you need this behavior, you can use the 4th optional parameter to the bind() function. {initialCopyDirection: Backbone.ModelBinder.Constants.ViewToModel}
|
675 |
+
You can also specify this behavior as the default for all ModelBinder's by calling Backbone.ModelBinder.SetOptions({initialCopyDirection: Backbone.ModelBinder.Constants.ViewToModel});
|
676 |
+
|
677 |
+
You can also directly invoke the function modelBinder.copyViewValuesToModel() at any time to copy values from the view into the model. In most cases, this is not necessary.
|
678 |
+
|
679 |
+
When you copy explicitly from the view to the model on bind() or via copyViewValuesToModel() text values and checkboxes will be inserted into the model as blank strings or false if the values have not been set.
|
680 |
+
|
681 |
+
|
682 |
+
<br>
|
683 |
+
## Cleaning up with unbind() ##
|
684 |
+
|
685 |
+
When your views are closed you should always call the unbind() function. The unbind() function will un-register from the model's change events and the view's jQuery change delegate.
|
686 |
+
|
687 |
+
If you don't call unbind() you might end up with zombie views and ModelBinders. This is particularly important for large client side applications that are not frequently refreshed.
|
688 |
+
|
689 |
+
|
690 |
+
|
691 |
+
<br>
|
692 |
+
## The '.' syntax for nested models ##
|
693 |
+
|
694 |
+
The ModelBinder doesn't directly support '.' to reference nested Models when binding.
|
695 |
+
If you have a Backbone.Model implementation that is able to support the '.' syntax for nested models you'll be able to use the ModelBinder.
|
696 |
+
|
697 |
+
I've done a bit of testing with the [backbone-deep-model](https://github.com/powmedia/backbone-deep-model) and it seems to work well with the ModelBinder.
|
698 |
+
[Here](https://github.com/theironcook/Backbone.ModelBinder/blob/master/sandbox/Example_NestedAttributes.html) is a simple example showing how to use backbone-deep-model with the ModelBinder.
|
699 |
+
|
700 |
+
The nested models are just plain javascript objects with the deep-model plugin. If your nested objects are Backbone.Models you'll need something similar to the deep-model plugin.
|
701 |
+
|
702 |
+
<br>
|
703 |
+
The [backbone-nested](https://github.com/afeld/backbone-nested) project also seems to work with the ModelBinder.
|
704 |
+
|
705 |
+
|
706 |
+
***
|
707 |
+
|
708 |
+
<br>
|
709 |
+
## AMD / Require.js support
|
710 |
+
|
711 |
+
AMD / Require.js support was added in version 0.1.4
|
712 |
+
|
713 |
+
|
714 |
+
***
|
715 |
+
|
716 |
+
<br>
|
717 |
+
### Binding to Collections
|
718 |
+
I've also created a collection binder that automatically creates/removes views when models are added/removed to a collection.
|
719 |
+
It can be used with the ModelBinder. The collection binder has saved me just as much time as the model binder. It's a very handy utility.
|
720 |
+
|
721 |
+
You can read about it [here](https://github.com/theironcook/Backbone.ModelBinder/wiki/A-new-Class-to-Bind-Backbone-Collections-to-Views:-Javascript-Weekly-May-18th)
|
722 |
+
|
723 |
+
<br><br>
|
724 |
+
|
725 |
+
## Examples
|
726 |
+
Some JSFiddle examples can be found [here](https://github.com/theironcook/Backbone.ModelBinder/wiki/Interactive-JSFiddle-Examples).
|
727 |
+
<br>The same examples are also under the (examples)[https://github.com/theironcook/Backbone.ModelBinder/tree/master/examples] directory.
|
728 |
+
|
729 |
+
|
730 |
+
<br><br>
|
731 |
+
|
732 |
+
## Configuration Options
|
733 |
+
* initialCopyDirection
|
734 |
+
* changeTriggers
|
735 |
+
* modelSetOptions
|
736 |
+
* suppressThrows
|
737 |
+
* boundAttribute
|
738 |
+
* converter
|
739 |
+
|
740 |
+
Configuration options can either be set for all ModelBinder instances via Backbone.ModelBinder.SetOptions() or for individual ModelBinder instances via the 4th parameter to the bind() function.
|
741 |
+
Values set at the instance level will eclipse / override values that are set with the SetOptions() function.
|
742 |
+
|
743 |
+
* initialCopyDirection - can either be Backbone.ModelBinder.Constants.ModelToView or Backbone.ModelBinder.Constants.ViewToModel. This property is dicussed in a previous section
|
744 |
+
|
745 |
+
* changeTriggers - an object where the keys are jQuery selectors and the values are jQuery events. These are the events that trigger when values are copied from the view into the model.
|
746 |
+
The default for change triggers is added below. You can define your own if needed.
|
747 |
+
|
748 |
+
````
|
749 |
+
{'': 'change', '[contenteditable]': 'blur'}
|
750 |
+
````
|
751 |
+
|
752 |
+
* modelSetOptions - this is an option that you might want sent by default to the Model.set function.
|
753 |
+
Whenever a bound element changes, it will call the Model.set function as pass the modelSetOptions as the options to the set() function.
|
754 |
+
If you wanted to turn on backbone model validation for your entire project you might do something like this.
|
755 |
+
|
756 |
+
````
|
757 |
+
Backbone.ModelBinder.SetOptions({modelSetOptions: {validate: true}});
|
758 |
+
````
|
759 |
+
|
760 |
+
The ModelBinder injects this value into the set options for every set() function.
|
761 |
+
changeSource = 'ModelBinder'
|
762 |
+
This allows custom logic to determine if the source of the model attribute change is from the ModelBinder.
|
763 |
+
|
764 |
+
* suppressThrows - set to true if you don't want the ModelBinder to throw exceptions but instead it will show errors via the console.error
|
765 |
+
|
766 |
+
* boundAttribute - change the default attribute used to create bindings. Default value is "name," but can be set to any valid attribute selector that fits the form `$('[' + boundAttribute + ']')`.
|
767 |
+
|
768 |
+
* converter - a default converter for all binders or a single binder. Probably only really useful for when you want view empty strings to map to nulls or undefined. The default is empty string.
|
769 |
+
If you define a converter, you might want to pay attention to the converter's 5th parameter of bound els. You might want to only convert values for specific element types.
|
770 |
+
|
771 |
+
<br>
|
772 |
+
<br>
|
773 |
+
|
774 |
+
## Release Notes / Versions
|
775 |
+
### v 1.1.0 June 1, 2015
|
776 |
+
* Fixed createEl code not to require that Backbone.View#render returns this
|
777 |
+
* Don't sort elements on add event (only do so on sort)
|
778 |
+
* Fixed package.json to make NPM publishing possible (fixes #195)
|
779 |
+
* Use jQuery .on instead of .delegate for event binding (to move off of deprecated .delegate function)
|
780 |
+
* Use .prop("checked") instead of .attr("checked") (fixes #199)
|
781 |
+
* Fixed autoSort behavior to actually work when the collection changes
|
782 |
+
|
783 |
+
### v 1.0.6 November 5, 2014
|
784 |
+
* Made the CollectionBinder loadable via AMD
|
785 |
+
|
786 |
+
### v 1.0.5 September 30, 2013
|
787 |
+
* Fixed issue 164 - Works with jQuery.noConflict
|
788 |
+
* Added the ability to set static and instance options for the CollectionBinder. As of now, there is only one option: 'autoSort'. You can set the option globally via Backbone.CollectionBinder.SetOptions.
|
789 |
+
* Added the ability to use template functions with the CollectionBinder.ElManagerFactory. Normally, I wouldn't use the ElManagerFactory except for very simple situations - especially because the content of the data isn't updated.
|
790 |
+
If you would like to use this option, simply pass a compiled _.template instead of html to the ElManagerFactory constructor. Internally the ElManagerFactory will call the template and pass {model: this._model.toJSON()} to the template function.
|
791 |
+
* Fix for issue 162. Undid fix for 133. Unnecessary Model.set calls for checkboxes and radio buttons.
|
792 |
+
|
793 |
+
### v 1.0.4 August 19, 2013
|
794 |
+
* Fixed the _.bindAll function calls to specify the function names being bound to.
|
795 |
+
* Added the ability to add a global converter via Backbone.ModelBinder.SetOptions({converter: xxx});
|
796 |
+
|
797 |
+
### v 1.0.2 April 18, 2013
|
798 |
+
* Fixed the _unbindViewToModel to use the changeTrigger options
|
799 |
+
* Fixed the default jQuery selector for all elements to be '*' instead of ''. The undelegate events no longer works in jQuery 1.8.3 with the ''
|
800 |
+
|
801 |
+
### v 1.0.1 April 15, 2013
|
802 |
+
* Added suppressThrows configuration option
|
803 |
+
|
804 |
+
### v 1.0.0 April 11, 2013
|
805 |
+
* Updated to use backbone v1.0.0, underscore v1.4.4 and jQuery v1.8.3
|
806 |
+
* Pull requests 96, 67, 85, 80, 78, 67, 66
|
807 |
+
* Options are now configurable at the ModelBinder class level via Backbone.ModelBinder.SetOptions() or at the instance level via the bind() 4th parameter
|
808 |
+
* ModelSetOptions have now been incorporated to the generic options argument at the class or instance level.
|
809 |
+
For example: to set model options globally for all binders Backbone.ModelBinder.SetOptions({modelSetOptions: {validate: true}});
|
810 |
+
or for a single instance modelBinder.bind(this.model, this.el, bindings, {modelSetOptions: {validate: true}});
|
811 |
+
For single instance options, the bindings can be a fully configured set of bindings or the value of null if you want the default bindings.
|
812 |
+
* bindCustomTriggers() has now been incorporated to the generic options argument at the class or instance level.
|
813 |
+
For example: to set custom triggers options globally for all binders Backbone.ModelBinder.SetOptions({changeTriggers: {'': 'change keyup'}});
|
814 |
+
or for a single instance modelBinder.bind(this.model, this.el, {changeTriggers: {'': 'change keyup'}});
|
815 |
+
* Added the els parameter to the converter functions
|
816 |
+
* Added the changeTriggers to customize which view events trigger the model binder copies values from the view to the model
|
817 |
+
* Added the modelSetOptions to allow the ModelBinder to send messages to the Model.set function and corresponding callbacks
|
818 |
+
|
819 |
+
|
820 |
+
### v 0.1.6 August 27, 2012
|
821 |
+
|
822 |
+
* Bugfix for issue 51
|
823 |
+
|
824 |
+
|
825 |
+
### v 0.1.5 June 20, 2012
|
826 |
+
|
827 |
+
* Upgraded model binder to allow single DOM element to be bound to multiple model attributes
|
828 |
+
* Exposed the model binder copyModelAttributesToView to be public and take an optional array of attribute names to copy
|
829 |
+
|
830 |
+
### v 0.1.4 May 11, 2012
|
831 |
+
|
832 |
+
* AMD / Require.js support added
|
833 |
+
* Initial version of the CollectionViewBinder added
|
834 |
+
|
835 |
+
### v 0.1.3 May 9, 2012
|
836 |
+
|
837 |
+
* Started properly tagging my versions :)
|
838 |
+
|
839 |
+
### v 0.1.2
|
840 |
+
|
841 |
+
* Added the {source: 'ModelBinder'} option to the model.set call - allows you to know the source of a model's change event
|
842 |
+
* Bug fix - when binding the elAttribute to class I wasn't going through the converter function
|
843 |
+
|
844 |
+
### v 0.1.1
|
845 |
+
|
846 |
+
* An empty selector string will now bind to the rootEl
|
847 |
+
* Removed elementBinding.isSetting guard which was unnecessary and short circuited updating multiple bound elements with the same name
|
848 |
+
|
849 |
+
### v 0.1.0
|
850 |
+
|
851 |
+
* Initial version starting April 16th. Future api changes will have updated version numbers.
|
852 |
+
|
853 |
+
|
854 |
+
|
855 |
+
# Legal Info (MIT License)
|
856 |
+
|
857 |
+
Copyright (c) 2012 Bart Wood
|
858 |
+
|
859 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
860 |
+
of this software and associated documentation files (the "Software"), to deal
|
861 |
+
in the Software without restriction, including without limitation the rights
|
862 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
863 |
+
copies of the Software, and to permit persons to whom the Software is
|
864 |
+
furnished to do so, subject to the following conditions:
|
865 |
+
|
866 |
+
The above copyright notice and this permission notice shall be included in
|
867 |
+
all copies or substantial portions of the Software.
|
868 |
+
|
869 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
870 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
871 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
872 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
873 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
874 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
875 |
+
THE SOFTWARE.
|
bower_components/backbone.modelbinder/component.json
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "backbone.modelBinder",
|
3 |
+
"version": "0.1.6",
|
4 |
+
"main": ["Backbone.ModelBinder.js"],
|
5 |
+
"dependencies" : {
|
6 |
+
"backbone" : ">=0.9.0",
|
7 |
+
"underscore" : ">=1.3.1",
|
8 |
+
"jquery" : ">=1.7.1"
|
9 |
+
},
|
10 |
+
|
11 |
+
"repository": {
|
12 |
+
"type": "git",
|
13 |
+
"url": "git://github.com/theironcook/Backbone.ModelBinder.git"
|
14 |
+
}
|
15 |
+
}
|
bower_components/backbone.modelbinder/package.json
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "backbone.modelbinder",
|
3 |
+
"description": "Simple, flexible and powerful Model-View binding for Backbone.",
|
4 |
+
"version": "1.1.0",
|
5 |
+
"author": "Bart Wood",
|
6 |
+
"bugs": {
|
7 |
+
"url": "https://github.com/theironcook/Backbone.ModelBinder/issues"
|
8 |
+
},
|
9 |
+
"dependencies": {
|
10 |
+
"backbone": ">=0.9.0",
|
11 |
+
"jquery": ">=1.7.1",
|
12 |
+
"underscore": ">=1.3.1"
|
13 |
+
},
|
14 |
+
"directories": {
|
15 |
+
"example": "examples"
|
16 |
+
},
|
17 |
+
"files": [
|
18 |
+
"Backbone.ModelBinder.js",
|
19 |
+
"Backbone.CollectionBinder.js"
|
20 |
+
],
|
21 |
+
"homepage": "https://github.com/theironcook/Backbone.ModelBinder#readme",
|
22 |
+
"keywords": [
|
23 |
+
"backbone",
|
24 |
+
"model",
|
25 |
+
"view"
|
26 |
+
],
|
27 |
+
"license": "MIT",
|
28 |
+
"main": "Backbone.ModelBinder.js",
|
29 |
+
"repository": {
|
30 |
+
"type": "git",
|
31 |
+
"url": "git+https://github.com/theironcook/Backbone.ModelBinder.git"
|
32 |
+
},
|
33 |
+
"scripts": {
|
34 |
+
"test": "echo \"Error: no test specified\" && exit 1"
|
35 |
+
},
|
36 |
+
"url": "https://github.com/theironcook/Backbone.ModelBinder"
|
37 |
+
}
|
configuration.php
DELETED
@@ -1,300 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
* Gravity Forms PDF Extended Configuration
|
5 |
-
* New from v3.0.0. No longer is theme functions.php code required.
|
6 |
-
* Important documentation on the configuration found at http://gravityformspdfextended.com/documentation-v3-x-x/installation-and-configuration/
|
7 |
-
*/
|
8 |
-
|
9 |
-
/*
|
10 |
-
* Added in v3.1.0
|
11 |
-
* Users can now assign defaults to forms that aren't configured below.
|
12 |
-
* Note: this will only work if the configuration option GFPDF_SET_DEFAULT_TEMPLATE is set to true (located at the bottom of this file).
|
13 |
-
*
|
14 |
-
* Users can use any configuration option like you would for a singular form, including:
|
15 |
-
* notifications, template, filename, pdf_size, orientation, security and rtl
|
16 |
-
*/
|
17 |
-
global $gf_pdf_default_configuration;
|
18 |
-
|
19 |
-
$gf_pdf_default_configuration = array(
|
20 |
-
'template' => 'default-template-two-rows.php',
|
21 |
-
'pdf_size' => 'A4'
|
22 |
-
);
|
23 |
-
|
24 |
-
/*
|
25 |
-
* ------------------------------------------------------------
|
26 |
-
* Bare minimum configuration code
|
27 |
-
* Usage: Will generate PDF and send to all notifications
|
28 |
-
* Remove the comments around the code blocks below to use (/*)
|
29 |
-
* form_id Mixed - Integer or Array. Required. The Gravity Form ID you are assigning the PDF to.
|
30 |
-
* notifications Mixed - String, Boolean or Array.
|
31 |
-
*/
|
32 |
-
/*$gf_pdf_config[] = array(
|
33 |
-
'form_id' => '1',
|
34 |
-
'notifications' => true
|
35 |
-
);*/
|
36 |
-
|
37 |
-
/*
|
38 |
-
* ------------------------------------------------------------
|
39 |
-
* Default template specific configuration code
|
40 |
-
* As of 3.1.0 uses can now add default-show-html, default-show-empty and default-show-page-names when using any
|
41 |
-
* of the default template files (any template prepended with default-)
|
42 |
-
*
|
43 |
-
* Usage:
|
44 |
-
* 'default-show-html' - This option will display HTMl blocks in your default tempalte.
|
45 |
-
* 'default-show-empty' - All form fields will be displayed in the PDF, regardless of what the user input is.
|
46 |
-
* 'default-show-page-names' - If you are using page breaks you can display the page names in the PDF.
|
47 |
-
*
|
48 |
-
* Remove the comments around the code blocks below to use (/*)
|
49 |
-
*/
|
50 |
-
|
51 |
-
/*$gf_pdf_config[] = array(
|
52 |
-
'form_id' => '1',
|
53 |
-
'template' => 'default-template.php',
|
54 |
-
'default-show-html' => true
|
55 |
-
);*/
|
56 |
-
|
57 |
-
/*$gf_pdf_config[] = array(
|
58 |
-
'form_id' => '1',
|
59 |
-
'template' => 'default-template.php',
|
60 |
-
'default-show-empty' => true
|
61 |
-
);*/
|
62 |
-
|
63 |
-
/*$gf_pdf_config[] = array(
|
64 |
-
'form_id' => '1',
|
65 |
-
'template' => 'default-template.php',
|
66 |
-
'default-show-page-names' => true
|
67 |
-
);*/
|
68 |
-
|
69 |
-
/*$gf_pdf_config[] = array(
|
70 |
-
'form_id' => '1',
|
71 |
-
'template' => 'default-template.php',
|
72 |
-
'default-show-html' => true,
|
73 |
-
'default-show-empty' => true,
|
74 |
-
'default-show-page-names' => true
|
75 |
-
);*/
|
76 |
-
|
77 |
-
/*
|
78 |
-
* ------------------------------------------------------------
|
79 |
-
* Notification Options
|
80 |
-
* notifications Mixed - String, Boolean or Array.
|
81 |
-
* Notifications can be a string like 'Admin Notifications', an array with multiple notification names or true to send to all.
|
82 |
-
*/
|
83 |
-
/*$gf_pdf_config[] = array(
|
84 |
-
'form_id' => '1',
|
85 |
-
'notifications' => 'Admin Notification'
|
86 |
-
);*/
|
87 |
-
|
88 |
-
/*$gf_pdf_config[] = array(
|
89 |
-
'form_id' => '1',
|
90 |
-
'notifications' => array('Admin Notification', 'User Notification')
|
91 |
-
);*/
|
92 |
-
|
93 |
-
/*
|
94 |
-
* ------------------------------------------------------------
|
95 |
-
* Custom Template
|
96 |
-
* Don't want to use a custom template? Just pass the custom template name to the configuration.
|
97 |
-
* template String. Default default-template.php. The name of your custom template that's placed in your active theme's PDF_EXTENDED_TEMPLATES folder.
|
98 |
-
* For more information about creating custom templates please see http://gravityformspdfextended.com/documentation-v3-x-x/templates/
|
99 |
-
*/
|
100 |
-
/*$gf_pdf_config[] = array(
|
101 |
-
'form_id' => 1,
|
102 |
-
'notifications' => 'User Notification',
|
103 |
-
|
104 |
-
'template' => 'example-float-and-positioning05.php'
|
105 |
-
);*/
|
106 |
-
|
107 |
-
/*$gf_pdf_config[] = array(
|
108 |
-
'form_id' => 2,
|
109 |
-
'notifications' => 'User Notification',
|
110 |
-
|
111 |
-
'template' => 'example-basic-html01.php'
|
112 |
-
);*/
|
113 |
-
|
114 |
-
/*
|
115 |
-
* ------------------------------------------------------------
|
116 |
-
* Multiple Forms
|
117 |
-
* If you have multiple forms that use the same PDF template then you can pass the form_id through as an array.
|
118 |
-
* WARNING: If using a custom template with this option your secondary forms should be a duplicate of the original and you shouldn't delete the fields
|
119 |
-
* otherwise the custom template won't show correctly.
|
120 |
-
* WARNING: The previous warning also applies to custom PDF names with MERGETAGS
|
121 |
-
*/
|
122 |
-
/*$gf_pdf_config[] = array(
|
123 |
-
'form_id' => array(1,5,6),
|
124 |
-
'notifications' => true
|
125 |
-
);*/
|
126 |
-
|
127 |
-
/*
|
128 |
-
* ------------------------------------------------------------
|
129 |
-
* Custom File Name
|
130 |
-
* Will change the filename of the PDF which is attached
|
131 |
-
* As of v3.0.0 merge tags can be used in the file name
|
132 |
-
* filename String. Default form-{form_id}-entry-{entry_id}.pdf
|
133 |
-
*/
|
134 |
-
/*$gf_pdf_config[] = array(
|
135 |
-
'form_id' => '1',
|
136 |
-
'notifications' => true,
|
137 |
-
'filename' => 'New PDF Name.pdf'
|
138 |
-
);*/
|
139 |
-
|
140 |
-
/*$gf_pdf_config[] = array(
|
141 |
-
'form_id' => '1',
|
142 |
-
'notifications' => true,
|
143 |
-
'filename' => 'User {Name:1}.pdf'
|
144 |
-
);*/
|
145 |
-
|
146 |
-
/*
|
147 |
-
* ------------------------------------------------------------
|
148 |
-
* Custom PDF Size / Orientation
|
149 |
-
* PDF Size can be set to the following:
|
150 |
-
*
|
151 |
-
* A0 - A10, B0 - B10, C0 - C10
|
152 |
-
* 4A0, 2A0, RA0 - RA4, SRA0 - SRA4
|
153 |
-
* Letter, Legal, Executive, Folio
|
154 |
-
* Demy, Royal
|
155 |
-
*
|
156 |
-
* Default: A4
|
157 |
-
* You can also pass the PDF size as an array, represented in millimetres - array(width, height).
|
158 |
-
*
|
159 |
-
* NOTE: By default the orientation is portrait so you only need to add it for landscape PDFs
|
160 |
-
*/
|
161 |
-
|
162 |
-
/* Letter-sized Document */
|
163 |
-
/*$gf_pdf_config[] = array(
|
164 |
-
'form_id' => '1',
|
165 |
-
'attachments' => true,
|
166 |
-
|
167 |
-
'pdf_size' => 'letter'
|
168 |
-
);*/
|
169 |
-
|
170 |
-
/* Custom PDF Size */
|
171 |
-
/* $gf_pdf_config[] = array(
|
172 |
-
'form_id' => '1',
|
173 |
-
'attachments' => true,
|
174 |
-
|
175 |
-
'pdf_size' => array(50, 200)
|
176 |
-
);*/
|
177 |
-
|
178 |
-
/* Change orientation */
|
179 |
-
/* $gf_pdf_config[] = array(
|
180 |
-
'form_id' => '1',
|
181 |
-
'attachments' => true,
|
182 |
-
|
183 |
-
'pdf_size' => 'letter',
|
184 |
-
'orientation' => 'landscape'
|
185 |
-
);*/
|
186 |
-
|
187 |
-
/*
|
188 |
-
* ------------------------------------------------------------
|
189 |
-
* PDF Security
|
190 |
-
* Allows you to password protect your PDF document, place a master password on the document which prevents document tampering and restricts user behaviour.
|
191 |
-
*
|
192 |
-
* security Boolean. Default false. If true the security settings will be applied.
|
193 |
-
* pdf_password String. Default blank.
|
194 |
-
* pdf_privileges Array
|
195 |
-
* Assign user privileges to the document. Valid privileges include: copy, print, modify, annot-forms, fill-forms, extract, assemble, print-highres
|
196 |
-
* pdf_master_password String. Default random generated. Set a master password on the PDF which stops the PDF from being modified.
|
197 |
-
* NOTE: As the document is encrypted in 128-bit print will only allow users to print a low resolution copy.
|
198 |
-
* Use print-highres to print full resolution image.
|
199 |
-
* NOTE: The use of print will only allow low-resolution printing from the document; you must specify print-highres to allow full resolution printing.
|
200 |
-
* NOTE: If pdf_master_password is omitted a random one will be generated
|
201 |
-
* NOTE: Passing a blank array or not passing anything to pdf_privileges will deny all permissions to the user
|
202 |
-
*/
|
203 |
-
|
204 |
-
/*
|
205 |
-
* Setting security settings with all values
|
206 |
-
*/
|
207 |
-
/*$gf_pdf_config[] = array(
|
208 |
-
'form_id' => '1',
|
209 |
-
'notifications' => true,
|
210 |
-
|
211 |
-
'security' => true,
|
212 |
-
'pdf_password' => 'myPDFpass',
|
213 |
-
'pdf_privileges' => array('copy', 'print', 'modify', 'annot-forms', 'fill-forms', 'extract', 'assemble', 'print-highres'),
|
214 |
-
'pdf_master_password' => 'admin password'
|
215 |
-
);*/
|
216 |
-
|
217 |
-
/*
|
218 |
-
* Set password to PDF.
|
219 |
-
* Deny all permissions to user
|
220 |
-
* Random master password will be generated
|
221 |
-
*/
|
222 |
-
/*$gf_pdf_config[] = array(
|
223 |
-
'form_id' => '1',
|
224 |
-
'notifications' => true,
|
225 |
-
|
226 |
-
'security' => true,
|
227 |
-
'pdf_password' => 'myPDFpass'
|
228 |
-
);*/
|
229 |
-
|
230 |
-
/*
|
231 |
-
* No password required to open PDF document.
|
232 |
-
* Deny all permissions to user
|
233 |
-
* Master password set
|
234 |
-
*/
|
235 |
-
/*$gf_pdf_config[] = array(
|
236 |
-
'form_id' => '1',
|
237 |
-
'notifications' => true,
|
238 |
-
|
239 |
-
'security' => true,
|
240 |
-
'pdf_master_password' => 'admin password'
|
241 |
-
);*/
|
242 |
-
|
243 |
-
/*
|
244 |
-
* No password required to open PDF document.
|
245 |
-
* User can copy, print and modify PDF
|
246 |
-
* Random master password will be generated
|
247 |
-
*
|
248 |
-
*/
|
249 |
-
/*$gf_pdf_config[] = array(
|
250 |
-
'form_id' => '1',
|
251 |
-
'notifications' => true,
|
252 |
-
|
253 |
-
'security' => true,
|
254 |
-
'pdf_privileges' => array('copy', 'print', 'modify', 'print-highres')
|
255 |
-
);*/
|
256 |
-
|
257 |
-
/*
|
258 |
-
* ------------------------------------------------------------
|
259 |
-
* Right to Left Language Support
|
260 |
-
* We now support RTL languages.
|
261 |
-
* rtl Boolean. Default false.
|
262 |
-
*/
|
263 |
-
/*$gf_pdf_config[] = array(
|
264 |
-
'form_id' => '1',
|
265 |
-
'notifications' => true,
|
266 |
-
|
267 |
-
'rtl' => true
|
268 |
-
);*/
|
269 |
-
|
270 |
-
/*
|
271 |
-
* ------------------------------------------------------------
|
272 |
-
* Disable Notifications
|
273 |
-
* If you don't need to send notifications and just want a custom PDF generated
|
274 |
-
* via the admin area you can forgo the notifications class
|
275 |
-
*/
|
276 |
-
/*$gf_pdf_config[] = array(
|
277 |
-
'form_id' => '1',
|
278 |
-
'template' => 'example-template.php'
|
279 |
-
);*/
|
280 |
-
|
281 |
-
/* ---------------------------------------------------------------
|
282 |
-
* CUSTOM PDF SETUP BELOW.
|
283 |
-
* See http://gravityformspdfextended.com/documentation-v3-x-x/installation-and-configuration/#constants for more details
|
284 |
-
*/
|
285 |
-
|
286 |
-
/*
|
287 |
-
* By default, forms that don't have PDFs assigned through the above configuration
|
288 |
-
* will automatically use the default template in the admin area.
|
289 |
-
* Set to false to disable this feature.
|
290 |
-
*/
|
291 |
-
define('GFPDF_SET_DEFAULT_TEMPLATE', true);
|
292 |
-
|
293 |
-
/*
|
294 |
-
* MEMORY ISSUES?
|
295 |
-
* Try setting the options below to true to help reduce the memory footprint of the package.
|
296 |
-
*/
|
297 |
-
define('PDF_ENABLE_MPDF_LITE', false); /* strip out advanced features like advanced table borders, terms and conditions, columns, index, bookmarks and barcodes. */
|
298 |
-
define('PDF_ENABLE_MPDF_TINY', false); /* if your tried the lite version and are still having trouble the tiny version includes the bare minimum features. There's no positioning, float, watermark or form support */
|
299 |
-
define('PDF_DISABLE_FONT_SUBSTITUTION', false); /* reduced memory by stopping font substitution */
|
300 |
-
define('PDF_ENABLE_SIMPLE_TABLES', false); /* disable the advanced table feature and forces all cells to have the same border, background etc. */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dist/assets/css/.gitkeep
ADDED
File without changes
|
dist/assets/css/gfpdf-admin-styles.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
@media only screen and (min-width:600px){.notice.gfpdf-alert-mascot{padding-left:145px!important;background-image:url(../../../src/assets/images/paws-with-logo-small.png);background-position:10px 50%;background-repeat:no-repeat;background-size:125px}}
|
dist/assets/css/gfpdf-styles.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.about-wrap .gfpdf-badge{margin-bottom:1.5em;position:relative;width:100%}.about-wrap .feature-section:not(.under-the-hood) .col.gfpdf-breakdown{margin-top:0}.gfpdf-badge{background:url(../../../src/assets/images/gravitypdf-globe-black.png) no-repeat 50% 5px;color:#333;display:inline-block;font-size:14px;font-weight:600;height:40px;margin:5px 0 0;padding-top:120px;text-align:center;text-rendering:optimizelegibility}.gfpdf-page .about-wrap [class$=col] .col{border-bottom:none}.gfpdf-page .about-wrap .feature-section{border-bottom:1px solid rgba(0,0,0,.1)}.gfpdf-page .about-wrap .feature-section.two-col .col{vertical-align:middle}div img.gfpdf-image{border:1px solid #ccc;max-width:98%;-webkit-box-shadow:1px 1px 5px 1px rgba(0,0,0,.15);-moz-box-shadow:1px 1px 5px 1px rgba(0,0,0,.15);box-shadow:1px 1px 5px 1px rgba(0,0,0,.15)}#pdfextended-settings{margin-top:20px}#pdfextended-settings h3,#tab_pdf h3{margin-top:5px;line-height:1.3em}#pdfextended-settings h3 i,#tab_pdf h3 i{padding-right:2px}#pdfextended-settings #add-new-pdf{padding:4px 8px}#pdfextended-settings div.notice,div.pdf-notice{margin:5px 15px 2px;padding:0 .6em}.gfpdf-page #pdfextended-settings .theme div.notice,.gfpdf-page #pdfextended-settings .theme-info div.notice,.gfpdf-page .theme div.notice,.gfpdf-page .theme-info div.notice{margin:0;z-index:500;color:#444;padding:1px 12px}.gfpdf-page div.error,.gfpdf-page div.notice,div.pdf-error,div.pdf-notice{background-color:#fff;border-left:4px solid #7ad03a;box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}.gfpdf-page div.error,div.pdf-error{border-left-color:#dc3232}.gfpdf-page div.notice,div.pdf-notice{margin:5px 0 15px;padding:1px 12px}#pdfextended-settings #gfpdf-advanced-options,#tab_pdf #gfpdf-advanced-options{display:none;margin-bottom:20px}.no-js #pdfextended-settings #gfpdf-advanced-options,.no-js #tab_pdf #gfpdf-advanced-options{display:block}#pdfextended-settings .gfpdf-advanced-options,#tab_pdf .gfpdf-advanced-options{margin-top:-5px}.no-js #pdfextended-settings .gfpdf-advanced-options,.no-js #tab_pdf .gfpdf-advanced-options{display:none}#pdfextended-settings select.large,#tab_pdf select.large{width:100%;max-width:350px}#tab_pdf .formSubmitted input:invalid{border:1px solid red}#tab_pdf .wp-editor-wrap{margin:0 12px 0 0}.rtl #pdfextended-settings label,.rtl #tab_pdf label{float:right;margin-left:5px}#pdf-license .fa-exclamation-circle{color:red}#pdf-license .fa-check{color:green}#pdfextended-settings table.gfpdf_table thead th{font-weight:700}#pdfextended-settings table.gfpdf_table tr:nth-child(2n) td,#pdfextended-settings table.gfpdf_table tr:nth-child(2n) th{background:none repeat scroll 0 0 #fcfcfc}#pdfextended-settings p.submit{padding-bottom:0;margin-bottom:0}#pdfextended-settings span.details.path,#pdfextended-settings span.path{padding:2px;background:#f2f2f2}#setup-templates-confirm ul{margin-top:5px}#setup-templates-confirm li{list-style-type:disc;margin-left:20px}#manage-font-files div{margin:10px 0}#manage-font-files div.updated{margin-top:0}#manage-font-files li{border:1px solid #ccc;position:relative}#manage-font-files li .delete-font{position:absolute;top:0;right:0;padding:5px 10px}#manage-font-files li .delete-font:hover{background:#dc0606;color:#fff}#manage-font-files input.invalid{border:1px solid red}#manage-font-files .font-submit{text-align:center}#manage-font-files #font-add-list{border:none;text-align:center;color:#ccc;cursor:pointer}#manage-font-files #font-empty{font-size:14px;font-style:italic;line-height:21px;padding:60px 0 15px;text-align:center}#manage-font-files #font-add-list:hover{color:#555}#manage-font-files #font-add-list span{display:block;text-transform:uppercase;margin-top:-5px}#manage-font-files li a{display:block;background:#eee;padding:5px 7px;text-decoration:none}#manage-font-files li a.font-name .fa{margin-right:5px}#manage-font-files li a:hover{background:#e9e9e9}#manage-font-files .font-settings{padding:5px 7px}#manage-font-files .gf_settings_description{font-size:95%}#manage-font-files .font-selector>label,#manage-font-files .font-settings>label{float:left;width:9em}#manage-font-files .regular-text{width:16em}#manage-font-files .css-usage{text-align:center}#manage-font-files .css-usage input{width:100%;text-align:center}#manage-font-files .css-usage pre{margin:5px 0;background:#eee;padding:7.5px}.rtl #font-list .css-usage input{direction:ltr!important}#pdfextended-settings .metabox-holder h3{font-size:14px}#pdfextended-settings .postbox-container .postbox{margin:0 8px 20px 0}#pdfextended-settings .postbox h3.hndle{padding-bottom:12px}#pdfextended-settings .postbox .hndle,#pdfextended-settings .widget .widget-top{cursor:default}#pdfextended-settings #pdf_support_hours h3,#pdfextended-settings .postbox .handlediv{display:none}#pdfextended-settings .about-wrap,#pdfextended-settings .about-wrap .about-text{max-width:none;min-height:0;line-height:1.8em}#pdfextended-settings .about-wrap #search-knowledgebase,#pdfextended-settings .about-wrap .about-text,#pdfextended-settings .about-wrap h1{text-align:center;margin-right:0}#pdfextended-settings .postbox .inside{margin-bottom:0}#pdfextended-settings .about-wrap h1{margin-top:40px}#pdfextended-settings .about-wrap #search-knowledgebase input{font-family:FontAwesome,'Open Sans',sans-serif;font-size:22px;margin:10px 0 0;padding:16px 20px;line-height:25px;width:100%}#pdfextended-settings #search-results{text-align:left;margin:0 auto;width:100%}#pdfextended-settings #search-results .postbox,#search-results .postbox .inside{display:none}#pdfextended-settings #search-results .postbox h3{margin-bottom:0}#pdfextended-settings #search-results .postbox.is-active h3{margin-bottom:8px}#pdfextended-settings #dashboard_primary .rss-widget .rssSummary .continue-reading{display:none}#pdfextended-settings .spinner.is-active{visibility:visible;margin:0}#pdfextended-settings .rss-widget ul li{padding:6px 0;margin:0;border-bottom:1px dotted #ccc}#pdfextended-settings .rss-widget ul li a{font-size:16px}#pdfextended-settings .rss-widget ul li:first-child,#pdfextended-settings .rss-widget ul li:last-child{border-bottom:none}#pdfextended-settings .about-wrap .about-text-disclaimer{font-size:13px}#pdfextended-settings .about-wrap #dashboard-widgets.columns-2 .postbox-container{width:100%}#pdfextended-settings .about-wrap #dashboard-widgets .postbox-container a{background:#f6f6f6 none repeat scroll 0 0;border:3px solid #eee;border-radius:10px;color:inherit;display:block;padding:15px;font-size:16px;text-decoration:none;margin-bottom:30px;transition:all .5s ease 0s}#pdfextended-settings .about-wrap #dashboard-widgets .postbox-container a:hover{border:3px solid #076aa4}#pdfextended-settings .about-wrap #dashboard-widgets .postbox-container a span{font-weight:700}#pdfextended-settings .about-wrap .center{text-align:center}#pdfextended-settings .about-wrap .button.button-large{height:35px;line-height:33px;padding:0 17px 9px}#pdf-system-status .fa-check-circle,#pdf-system-status .fa-exclamation-triangle,#pdf-system-status .fa-times-circle{font-size:17px;margin-left:5px;vertical-align:bottom;margin-top:-2px}#pdf-system-status .fa-check-circle{color:green}#pdf-system-status .fa-exclamation-triangle{color:#ff8a00}#pdf-system-status .fa-times-circle{color:#d10b0b}#pdf-system-status #license input[type=email],#pdf-system-status #license input[type=number],#pdf-system-status #license input[type=password],#pdf-system-status #license input[type=search],#pdf-system-status #license input[type=tel],#pdf-system-status #license input[type=text],#pdf-system-status #license input[type=url],#pdf-system-status #license select,#pdf-system-status #license textarea{background-color:#fff;border:1px solid #ddd;box-shadow:0 1px 2px rgba(0,0,0,.07) inset;color:#333;width:100%}#pdf-system-status #license input[type=text][readonly=readonly]{background:#eee;cursor:not-allowed}#pdf-system-status #license label{font-weight:700;line-height:30px;color:#222;font-size:14px;float:left;width:20em}#pdf-system-status #license .deactivate,#pdf-system-status #license .expired,#pdf-system-status #license .expires,#pdf-system-status #license .inactive,#pdf-system-status #license .limit{font-style:italic}#pdf-system-status #license .expired{display:block;color:#9e0b0f}#pdf-system-status #license .gf_keystatus_invalid,#pdf-system-status #license .gf_keystatus_valid{font-size:120%}#pdf-system-status #license p{clear:left;float:left;width:100%}#pdf-system-status #license span.container{display:block}#gfpdf_list_form .check-column{width:50px}#gfpdf_list_form .delete a:hover,#gfpdf_list_form .duplicate a:hover{cursor:pointer}#gfpdf_list_form .gravitypdf_shortcode{background:#eee;width:100%;padding:5px;outline:0}.gfpdf-hidden{display:none}.gfpdf_conditional_logic{margin-top:10px}#pdf-form-settings .conditional_logic th{padding-top:15px}#pdf-form-settings .conditional_logic td{vertical-align:top}#gfpdf_list_form .gfpdf-spinner,#pdf-form-settings .gfpdf-spinner,#pdfextended-settings .gfpdf-spinner,.wp-dialog .gfpdf-spinner{padding-left:5px;vertical-align:middle;width:20px}#gfpdf_list_form .gfpdf-spinner-small{width:15px}#gfpdf-template-example img{width:100%;max-width:300px;border:1px solid #ccc;display:block;margin-top:5px}#gfpdf-template-example p{border:1px solid #ccc;display:inline-block;max-width:300px;padding:0 5px;text-align:center;width:100%}#gfpdf_pdf_form .gfpdf-toggle-wrapper{padding-top:25px}#gfpdf_pdf_form .gfpdf-tab-container{border-bottom:1px solid #e6e6e6;clear:both;padding:0 0 24px 0;margin:0 0 24px 0}#gfpdf_pdf_form .nav-tab-wrapper{margin-bottom:20px}.gfpdf-tab-wrapper.wp-filter{margin:0 0 15px}.gfpdf-page .merge-tag-support{max-width:none}.gfpdf-page h4.section-title{font-weight:700;margin-bottom:0}.gfpdf-page .form-table li{list-style:inherit}.gfpdf_form_action_has_submenu{position:relative}.gfpdf_submenu{width:200px}.gfpdf_submenu li{border-bottom:1px solid #eee}.gfpdf_detailed_pdf_container_pdf{clear:left;margin-bottom:3px}.gfpdf_detailed_pdf_container span{display:block;word-wrap:break-word;padding:2px 0 2px 2px}#gfpdf-template-container .theme .theme-actions{opacity:1;left:inherit;border-top:none;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}#gfpdf-template-container .wp-filter-search{margin:0 0 5px;font-size:16px;font-weight:300;line-height:1.5;width:100%}#gfpdf-template-container .theme .theme-author{display:block}#gfpdf-overlay h1{float:left;padding-left:2%}#gfpdf-overlay p.no-themes{display:block;font-size:18px}#fancy-template-selector{margin-left:5px;vertical-align:middle}#gpdf-advance-template-selector button{vertical-align:middle;margin-left:5px}#gfpdf-template-container .theme.add-new-theme a.doing-ajax span:after,#gfpdf-template-container .theme.add-new-theme a.doing-ajax:hover span:after{font-family:FontAwesome,'Open Sans',sans-serif;content:'\f1ce';font-size:79px;background:0 0;width:auto;height:auto;left:51.5%;text-indent:0;-webkit-animation:fa-spin 1.5s infinite linear;animation:fa-spin 1.5s infinite linear}.theme-browser .theme.add-new-theme.gfpdf-dropzone-active a{background:#0073aa}.theme-browser .theme.add-new-theme.gfpdf-dropzone-active a:after{border-color:transparent}.theme-browser .theme.add-new-theme.gfpdf-dropzone-active a span:after{background:#fff;color:#0073aa}#gfpdf-template-container .theme.add-new-theme a.doing-ajax:focus span:after,#gfpdf-template-container .theme.add-new-theme a.doing-ajax:hover span:after,#gfpdf-template-container .theme.add-new-theme.gfpdf-dropzone-active a.doing-ajax span:after{color:#fff;background:0 0}.theme-browser .theme.add-new-theme.gfpdf-dropzone-active .theme-name{color:#fff}.gfpdf-dropzone-reject{background:red}.gfpdf-template-install-instructions{font-size:85%;text-align:center;margin-top:5px}.image-radio-buttons input{display:none}.image-radio-buttons img{padding:6px}.image-radio-buttons input:checked+img{background:#2abbff}@media only screen and (min-width:500px){.about-wrap .gfpdf-badge{position:absolute;right:0;top:0;margin:0;width:130px}.rtl .about-wrap .gfpdf-badge{left:0;right:auto}}@media only screen and (max-width:780px){#pdfextended-settings table.gfpdf_table td,#pdfextended-settings table.gfpdf_table th{display:block;vertical-align:middle;width:auto}.gfpdf-page .chosen-container{font-size:17px}.gfpdf-page .chosen-container-single .chosen-single{height:38px;line-height:34px}.gfpdf-page .chosen-container-single .chosen-single div{top:7px}.gfpdf-page .chosen-container .chosen-results li{line-height:24px}.gfpdf-page .chosen-container-multi .chosen-choices li.search-choice{line-height:24px}.gfpdf-page .chosen-container-multi .chosen-choices li.search-choice .search-choice-close{top:10px}.gfpdf-page .chosen-container-multi .chosen-choices li.search-field input[type=text]{height:38px}.gfpdf-page .form-table tbody td input[type=number]{font-size:16px;line-height:1.5;padding:7px 10px}.gfpdf-page .form-table tbody td label{display:block;font-size:16px}.gfpdf-page .form-table tbody td label:first-of-type{margin-top:10px}#manage-font-files,.gf_delete_notice,.gfpdf-page .form-table td,.gfpdf-page .form-table th,.gfpdf-page .gfpdf_table td,.gfpdf-page .gfpdf_table th{font-size:16px}#manage-font-files,.gf_delete_notice{line-height:21px}.gfpdf-page .form-table tbody .conditional_logic td label{display:inline}.gfpdf-page .form-table tbody td input[type=number]{padding-right:3px}}@media only screen and (min-width:782px){.gfpdf-mascot-sitting{background:url(../../../src/assets/images/cap-paws-sitting.png) no-repeat 0 0;width:181px;height:193px;display:inline-block;float:right;margin-top:-149px;position:relative;z-index:100}.rtl .gfpdf-mascot-sitting{float:left}#gfpdf-mascot-container{padding-bottom:120px!important}#pdfextended-settings table.gfpdf_table tbody th{width:200px}#manage-font-files .gf_settings_description{margin:0 0 6px 9.5em}#pdfextended-settings .about-wrap #dashboard-widgets.columns-2 .postbox-container{width:49.5%}#pdfextended-settings .about-wrap #dashboard-widgets .postbox-container a{margin-right:30px;min-height:245px}#pdfextended-settings #pdf-system-status th{padding-top:12px;padding-bottom:12px}#pdfextended-settings #pdf-system-status td{padding-top:10px;padding-bottom:10px}.gfpdf-page .chosen-container{max-width:300px}#gfpdf_conditional_logic_container .gf_conditional_logic_rules_container :first-child{max-width:250px;width:100%}}@media only screen and (min-width:900px){#pdfextended-settings .help-container .postbox{width:32.66%;float:left;margin-left:.5%;margin-right:.5%;min-width:0}#pdfextended-settings .help-container .postbox:first-child{margin-left:0}#pdfextended-settings .help-container .postbox:last-child{margin-right:0}}@media only screen and (min-width:1000px){#pdf-system-status #license label{float:left;width:20%}#pdf-system-status #license span.container{float:left;width:80%}#pdfextended-settings .about-wrap #dashboard-widgets .postbox-container a{min-height:180px}}@media only screen and (max-width:1120px){#gfpdf-template-container .theme:nth-child(odd){margin-right:2%}}@media only screen and (min-width:1400px){#pdfextended-settings #search-results,#pdfextended-settings .about-wrap #search-knowledgebase input,#pdfextended-settings .help-container{width:75%}#pdfextended-settings .about-wrap #dashboard-widgets .postbox-container a{min-height:90px}}@media only screen and (min-width:1640px){#gfpdf-template-container .theme{margin:0 2% 2% 0}#gfpdf-template-container .wp-filter-search{width:22.7%}}
|
dist/assets/js/.gitkeep
ADDED
File without changes
|
dist/assets/js/app.bundle.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
webpackJsonp([0],{120:function(e,t,n){"use strict";function r(e){var t=a(),r=n.i(h.createStore)(t,window.devToolsExtension&&window.devToolsExtension());o(e),n.i(p.render)(c.a.createElement(u.HashRouter,null,c.a.createElement(u.Route,{render:function(e){return c.a.createElement(T.a,x({},e,{store:r,buttonText:GFPDF.advanced}))}})),document.getElementById("gpdf-advance-template-selector")),n.i(g.a)(r),i(r,e),s(r,e)}function a(){return n.i(h.combineReducers)({template:v.a})}function o(e){e.next().after('<span id="gpdf-advance-template-selector">').next().after('<div id="gfpdf-overlay" class="theme-overlay">')}function i(e,t){var r=b()(e.getState,"template.activeTemplate");e.subscribe(r(function(e){t.val()!==e&&t.val(e).trigger("chosen:updated").trigger("change")})),t.change(function(){this.value!==e.getState().template.activeTemplate&&e.dispatch(n.i(y.a)(this.value))})}function s(e,t){var n=e.getState().template.list.size,r=b()(e.getState,"template.list");e.subscribe(r(function(e){n!==e.size&&(n=e.size,m.a.post(GFPDF.ajaxUrl).field("action","gfpdf_get_template_options").field("nonce",GFPDF.ajaxNonce).then(function(e){t.html(e.text).trigger("chosen:updated").trigger("change")}))}))}t.a=r;var l=n(1),c=n.n(l),p=n(40),u=(n.n(p),n(15)),f=n(33),m=n.n(f),h=n(41),d=n(73),b=n.n(d),y=n(18),g=n(139),v=n(138),T=n(123),x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}},121:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=n(2),s=n.n(i),l=n(1),c=n.n(l),p=n(72),u=n.n(p),f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=function(e){function t(){return r(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),f(t,[{key:"render",value:function(){return c.a.createElement(u.a,{onDrop:this.props.onDrop,multiple:this.props.multiple,disablePreview:!0,className:this.props.className,activeClassName:this.props.activeClassName},this.props.children)}}]),t}(c.a.Component);m.propTypes={children:s.a.node.isRequired,onDrop:s.a.func.isRequired,multiple:s.a.bool,className:s.a.string,activeClassName:s.a.string},m.defaultProps={multiple:!1,maxSize:1/0,className:"gfpdf-dropzone",activeClassName:"gfpdf-dropzone-active"},t.a=m},122:function(e,t,n){"use strict";t.a=function(){return!1}},123:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=n(2),s=n.n(i),l=n(1),c=n.n(l),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function(e){function t(){var e,n,o,i;r(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=o=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),o.handleClick=function(e){e.preventDefault(),e.stopPropagation(),o.props.history.push("/template")},i=n,a(o,i)}return o(t,e),p(t,[{key:"render",value:function(){var e=this;return c.a.createElement("button",{type:"button",id:"fancy-template-selector",className:"button gfpdf-button",onClick:this.handleClick,ref:function(t){return e.button=t}},this.props.buttonText)}}]),t}(c.a.Component);u.propTypes={buttonText:s.a.string},t.a=u},124:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=n(2),s=n.n(i),l=n(1),c=n.n(l),p=n(15),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=function(e){function t(){var e,n,o,i;r(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=o=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),o.handleKeyPress=function(e){27!==e.keyCode||"wp-filter-search"===e.target.className&&""!==e.target.value||o.closeDialog()},o.closeDialog=function(){o.props.history.push(o.props.closeRoute||"/")},i=n,a(o,i)}return o(t,e),u(t,[{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyPress,!1)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyPress,!1)}},{key:"render",value:function(){return c.a.createElement("button",{className:"close dashicons dashicons-no",tabIndex:"142",onClick:this.closeDialog,onKeyDown:this.handleKeyPress,"aria-label":"close"},c.a.createElement("span",{className:"screen-reader-text"},"Close dialog"))}}]),t}(c.a.Component);f.propTypes={closeRoute:s.a.string},t.a=n.i(p.withRouter)(f)},125:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=n(2),s=n.n(i),l=n(1),c=n.n(l),p=n(11),u=n(18),f=n(15),m=n(33),h=n.n(m),d=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),b=function(e){function t(){var e,n,o,i;r(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=o=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),o.deleteTemplate=function(e){if(e.preventDefault(),e.stopPropagation(),window.confirm(o.props.templateConfirmDeleteText)){var t=o.props.template.get("id");h.a.post(o.props.ajaxUrl).field("action","gfpdf_delete_template").field("nonce",o.props.ajaxNonce).field("id",t).then(function(){},o.ajaxFailed),o.props.history.push("/template"),o.props.onTemplateDelete(t)}},o.ajaxFailed=function(){var e=o.props.template.set("error",o.props.templateDeleteErrorText);o.props.addTemplate(e)},i=n,a(o,i)}return o(t,e),d(t,[{key:"render",value:function(){var e=this.props.callbackFunction?this.props.callbackFunction:this.deleteTemplate;return c.a.createElement("a",{onClick:e,href:"#",tabIndex:"150",className:"button button-secondary delete-theme"},this.props.buttonText)}}]),t}(c.a.Component);b.propTypes={ajaxUrl:s.a.string,ajaxNonce:s.a.string,template:s.a.object,addTemplate:s.a.func,onTemplateDelete:s.a.func,callbackFunction:s.a.func,buttonText:s.a.string,templateConfirmDeleteText:s.a.string,templateDeleteErrorText:s.a.string};var y=function(e){return{addTemplate:function(t){e(n.i(u.b)(t))},onTemplateDelete:function(t){e(n.i(u.c)(t))}}};t.a=n.i(f.withRouter)(n.i(p.connect)(null,y)(b))},126:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=n(2),s=n.n(i),l=n(1),c=n.n(l),p=n(77),u=n(125),f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=function(e){function t(){var e,n,o,i;r(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=o=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),o.notCoreTemplate=function(e){return-1!==e.get("path").indexOf(o.props.pdfWorkingDirPath)},i=n,a(o,i)}return o(t,e),f(t,[{key:"render",value:function(){var e=this.props.template,t=e.get("compatible");return c.a.createElement("div",{className:"theme-actions"},!this.props.isActiveTemplate&&t?c.a.createElement(p.a,{template:e,buttonText:this.props.activateText}):null,!this.props.isActiveTemplate&&this.notCoreTemplate(e)?c.a.createElement(u.a,{template:e,ajaxUrl:this.props.ajaxUrl,ajaxNonce:this.props.ajaxNonce,buttonText:this.props.templateDeleteText,templateConfirmDeleteText:this.props.templateConfirmDeleteText,templateDeleteErrorText:this.props.templateDeleteErrorText}):null)}}]),t}(c.a.Component);m.propTypes={template:s.a.object.isRequired,isActiveTemplate:s.a.bool,ajaxUrl:s.a.string,ajaxNonce:s.a.string,activateText:s.a.string,pdfWorkingDirPath:s.a.string,templateDeleteText:s.a.string,templateConfirmDeleteText:s.a.string,templateDeleteErrorText:s.a.string},t.a=m},127:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=n(2),s=n.n(i),l=n(1),c=n.n(l),p=n(11),u=n(15),f=n(32),m=(n.n(f),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),h=function(e){function t(){var e,n,o,i;r(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=o=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),o.previousTemplate=function(e){e.preventDefault(),e.stopPropagation();var t=o.props.templates.get(o.props.templateIndex-1).get("id");t&&o.props.history.push("/template/"+t)},o.nextTemplate=function(e){e.preventDefault(),e.stopPropagation();var t=o.props.templates.get(o.props.templateIndex+1).get("id");t&&o.props.history.push("/template/"+t)},o.handleKeyPress=function(e){o.props.isFirst||37!==e.keyCode||o.previousTemplate(e),o.props.isLast||39!==e.keyCode||o.nextTemplate(e)},i=n,a(o,i)}return o(t,e),m(t,[{key:"componentDidMount",value:function(){window.addEventListener("keydown",this.handleKeyPress,!1)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("keydown",this.handleKeyPress,!1)}},{key:"render",value:function(){var e=this.props.isFirst,t=this.props.isLast,r=n.i(f.List)(["dashicons","dashicons-no"]),a=r.push("left"),o=r.push("right");a=e?a.push("disabled"):a,o=t?o.push("disabled"):o;var i=e?"disabled":"",s=t?"disabled":"";return c.a.createElement("span",null,c.a.createElement("button",{onClick:this.previousTemplate,onKeyDown:this.handleKeyPress,className:a.join(" "),tabIndex:"141",disabled:i},c.a.createElement("span",{className:"screen-reader-text"},this.props.showPreviousTemplateText)),c.a.createElement("button",{onClick:this.nextTemplate,onKeyDown:this.handleKeyPress,className:o.join(" "),tabIndex:"141",disabled:s},c.a.createElement("span",{className:"screen-reader-text"},this.props.showNextTemplateText)))}}]),t}(c.a.Component);h.propTypes={templates:s.a.object.isRequired,templateIndex:s.a.number.isRequired,isFirst:s.a.bool,isLast:s.a.bool,showPreviousTemplateText:s.a.string,showNextTemplateText:s.a.string};var d=function(e,t){var n=t.templates,r=t.template.get("id");return{isFirst:n.first().get("id")===r,isLast:n.last().get("id")===r}};t.a=n.i(u.withRouter)(n.i(p.connect)(d)(h))},128:function(e,t,n){"use strict";var r=n(2),a=n.n(r),o=n(1),i=n.n(o),s=function(e){var t=e.header;return i.a.createElement("h1",null,t)};s.propTypes={header:a.a.string},t.a=s},129:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=n(2),s=n.n(i),l=n(1),c=n.n(l),p=n(11),u=n(80),f=n(78),m=n(130),h=n(134),d=n(128),b=n(136),y=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),g=function(e){function t(){return r(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),y(t,[{key:"render",value:function(){var e=this,t=c.a.createElement(d.a,{header:this.props.templateHeaderText});return c.a.createElement(f.a,{header:t,closeRoute:"/"},c.a.createElement(h.a,null),c.a.createElement("div",null,this.props.templates.map(function(t,n){return c.a.createElement(m.a,{key:n,template:t,templateDetailsText:e.props.templateDetailsText,activateText:e.props.activateText})}),c.a.createElement(b.a,{ajaxUrl:this.props.ajaxUrl,ajaxNonce:this.props.ajaxNonce,addTemplateText:this.props.addTemplateText,genericUploadErrorText:this.props.genericUploadErrorText,filenameErrorText:this.props.filenameErrorText,filesizeErrorText:this.props.filesizeErrorText,installSuccessText:this.props.installSuccessText,installUpdatedText:this.props.installUpdatedText,templateSuccessfullyInstalledUpdated:this.props.templateSuccessfullyInstalledUpdated,templateInstallInstructions:this.props.templateInstallInstructions})))}}]),t}(c.a.Component);g.propTypes={templates:s.a.object,route:s.a.object};var v=function(e){return{templates:n.i(u.a)(e)}};t.a=n.i(p.connect)(v)(g)},130:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=n(2),s=n.n(i),l=n(1),c=n.n(l),p=n(11),u=n(15),f=n(18),m=n(132),h=n(43),d=n(131),b=n(79),y=n(77),g=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),v=function(e){function t(){var e,n,o,i;r(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=o=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),o.maybeShowDetailedTemplate=function(e){13===e.keyCode&&-1===e.target.className.indexOf("button")&&o.showDetailedTemplate()},o.showDetailedTemplate=function(){o.props.history.push("/template/"+o.props.template.get("id"))},o.removeMessage=function(){o.props.updateTemplateParam(o.props.template.get("id"),"message",null)},i=n,a(o,i)}return o(t,e),g(t,[{key:"render",value:function(){var e=this.props.template,t=this.props.activeTemplate===e.get("id"),n=e.get("compatible"),r=t?"active theme":"theme";return c.a.createElement("div",{onClick:this.showDetailedTemplate,onKeyDown:this.maybeShowDetailedTemplate,className:r,"data-slug":e.get("id"),tabIndex:"150"},c.a.createElement(m.a,{image:e.get("screenshot")}),e.get("error")?c.a.createElement(h.a,{text:e.get("error"),error:!0}):null,e.get("message")?c.a.createElement(h.a,{text:e.get("message"),dismissableCallback:this.removeMessage,dismissable:!0,delay:12e3}):null,c.a.createElement(d.a,{label:this.props.templateDetailsText}),c.a.createElement(d.b,{group:e.get("group")}),c.a.createElement(b.b,{name:e.get("template")}),c.a.createElement("div",{className:"theme-actions"},!t&&n?c.a.createElement(y.a,{template:this.props.template,buttonText:this.props.activateText}):null))}}]),t}(c.a.Component);v.propTypes={template:s.a.object,activeTemplate:s.a.string,updateTemplateParam:s.a.func,activateText:s.a.string,templateDetailsText:s.a.string};var T=function(e){return{activeTemplate:e.template.activeTemplate}},x=function(e){return{updateTemplateParam:function(t,r,a){e(n.i(f.d)(t,r,a))}}};t.a=n.i(u.withRouter)(n.i(p.connect)(T,x)(v))},131:function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"b",function(){return l});var r=n(2),a=n.n(r),o=n(1),i=n.n(o),s=function(e){var t=e.label;return i.a.createElement("span",{className:"more-details"},t)};s.propTypes={name:a.a.string};var l=function(e){var t=e.group;return i.a.createElement("p",{className:"theme-author"},t)};l.propTypes={group:a.a.string}},132:function(e,t,n){"use strict";var r=n(2),a=n.n(r),o=n(1),i=n.n(o),s=function(e){var t=e.image,n=t?"theme-screenshot":"theme-screenshot blank";return i.a.createElement("div",{className:n},t?i.a.createElement("img",{src:t,alt:""}):null)};s.propTypes={image:a.a.string},t.a=s},133:function(e,t,n){"use strict";var r=n(2),a=n.n(r),o=n(1),i=n.n(o),s=function(e){var t=e.image,n=t?"screenshot":"screenshot blank";return i.a.createElement("div",{className:"theme-screenshots"},i.a.createElement("div",{className:n},t?i.a.createElement("img",{src:t,alt:""}):null))};s.propTypes={image:a.a.string},t.a=s},134:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=n(2),s=n.n(i),l=n(1),c=n.n(l),p=n(11),u=n(71),f=n.n(u),m=n(18),h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=function(e){function t(){var e,n,o,i;r(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=o=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),o.handleSearch=function(e){e.persist(),o.runSearch(e)},o.runSearch=function(e){o.props.onSearch(e.target.value||"")},i=n,a(o,i)}return o(t,e),h(t,[{key:"componentWillMount",value:function(){this.runSearch=f()(this.runSearch,200)}},{key:"componentDidMount",value:function(){this.input.focus()}},{key:"render",value:function(){var e=this;return c.a.createElement("div",null,c.a.createElement("input",{className:"wp-filter-search",id:"wp-filter-search-input",ref:function(t){return e.input=t},placeholder:"Search Installed Templates",type:"search","aria-describedby":"live-search-desc",tabIndex:"145",onChange:this.handleSearch,defaultValue:this.props.search}))}}]),t}(c.a.Component);d.propTypes={onSearch:s.a.func,search:s.a.string};var b=function(e){return{search:e.template.search}},y=function(e){return{onSearch:function(t){e(n.i(m.e)(t))}}};t.a=n.i(p.connect)(b,y)(d)},135:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=n(2),s=n.n(i),l=n(1),c=n.n(l),p=n(11),u=n(80),f=n(78),m=n(127),h=n(126),d=n(133),b=n(43),y=n(79),g=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),v=function(e){function t(){return r(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),g(t,[{key:"shouldComponentUpdate",value:function(e,t){return null!=e.template}},{key:"render",value:function(){var e=this.props.template,t=this.props.activeTemplate===e.get("id"),n=c.a.createElement(m.a,{template:e,templateIndex:this.props.templateIndex,templates:this.props.templates,showPreviousTemplateText:this.props.showPreviousTemplateText,showNextTemplateText:this.props.showNextTemplateText}),r=c.a.createElement(h.a,{template:e,isActiveTemplate:t,ajaxUrl:this.props.ajaxUrl,ajaxNonce:this.props.ajaxNonce,activateText:this.props.activateText,pdfWorkingDirPath:this.props.pdfWorkingDirPath,templateDeleteText:this.props.templateDeleteText,templateConfirmDeleteText:this.props.templateConfirmDeleteText,templateDeleteErrorText:this.props.templateDeleteErrorText});return c.a.createElement(f.a,{header:n,footer:r,closeRoute:"/template"},c.a.createElement("div",{id:"gfpdf-template-detail-view",className:"gfpdf-template-detail"},c.a.createElement(d.a,{image:e.get("screenshot")}),c.a.createElement("div",{className:"theme-info"},c.a.createElement(y.a,{isCurrentTemplate:t,label:this.props.currentTemplateText}),c.a.createElement(y.b,{name:e.get("template"),version:e.get("version"),versionLabel:this.props.versionText}),c.a.createElement(y.c,{author:e.get("author"),uri:e.get("author uri")}),c.a.createElement(y.d,{group:e.get("group"),label:this.props.groupText}),e.get("long_message")?c.a.createElement(b.a,{text:e.get("long_message")}):null,e.get("long_error")?c.a.createElement(b.a,{text:e.get("long_error"),error:!0}):null,c.a.createElement(y.e,{desc:e.get("description")}),c.a.createElement(y.f,{tags:e.get("tags"),label:this.props.tagsText}))))}}]),t}(c.a.Component);v.propTypes={route:s.a.object,template:s.a.object,activeTemplate:s.a.string,templateIndex:s.a.number,templates:s.a.object};var T=function(e,t){var r=n.i(u.a)(e),a=t.match.params.id,o=function(e){return e.get("id")===a};return{template:r.find(o),templateIndex:r.findIndex(o),templates:r,activeTemplate:e.template.activeTemplate}};t.a=n.i(p.connect)(T)(v)},136:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=n(2),s=n.n(i),l=n(1),c=n.n(l),p=n(11),u=n(33),f=n.n(u),m=n(32),h=(n.n(m),n(18)),d=n(121),b=n(43),y=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),g=function(e){function t(){var e,o,i,s;r(this,t);for(var l=arguments.length,c=Array(l),p=0;p<l;p++)c[p]=arguments[p];return o=i=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),i.state={ajax:!1,error:"",message:""},i.onDrop=function(e){e instanceof Array&&e.length>0&&e.forEach(function(e){var t=e.name;i.checkFilename(t)&&i.checkFilesize(e.size)&&(i.setState({ajax:!0,error:"",message:""}),f.a.post(i.props.ajaxUrl).field("action","gfpdf_upload_template").field("nonce",i.props.ajaxNonce).attach("template",e,t).then(i.ajaxSuccess,i.ajaxFailed))})},i.checkFilename=function(e){return".zip"===e.substr(e.length-4)||(i.setState({error:i.props.filenameErrorText}),!1)},i.checkFilesize=function(e){return!(e/1024>5120)||(i.setState({error:i.props.filesizeErrorText}),!1)},i.ajaxSuccess=function(e){e.body.templates.forEach(function(e){void 0===i.props.templates.find(function(t){return t.get("id")===e.id})?(e.new=!0,e.message=i.props.installSuccessText,i.props.addNewTemplate(n.i(m.fromJS)(e))):i.props.updateTemplateParam(e.id,"message",i.props.installUpdatedText)}),i.setState({ajax:!1,message:i.props.templateSuccessfullyInstalledUpdated})},i.ajaxFailed=function(e){i.setState({error:e.response.body&&void 0!==e.response.body.error?e.response.body.error:i.props.genericUploadErrorText,ajax:!1})},i.removeMessage=function(){i.setState({message:""})},i.openDropzone=function(e){e.preventDefault()},s=o,a(i,s)}return o(t,e),y(t,[{key:"render",value:function(){return c.a.createElement(d.a,{onDrop:this.onDrop,maxSize:1024e4,multiple:!0,className:"theme add-new-theme gfpdf-dropzone"},c.a.createElement("a",{href:"#",onClick:this.openDropzone,className:this.state.ajax?"doing-ajax":""},c.a.createElement("div",{className:"theme-screenshot"},c.a.createElement("span",null)),""!==this.state.error?c.a.createElement(b.a,{text:this.state.error,error:!0}):null,""!==this.state.message?c.a.createElement(b.a,{text:this.state.message,dismissable:!0,dismissableCallback:this.removeMessage}):null,c.a.createElement("h2",{className:"theme-name"},this.props.addTemplateText)),c.a.createElement("div",{className:"gfpdf-template-install-instructions"},this.props.templateInstallInstructions))}}]),t}(c.a.Component);g.propTypes={ajaxUrl:s.a.string,ajaxNonce:s.a.string,genericUploadErrorText:s.a.string,addTemplateText:s.a.string,filenameErrorText:s.a.string,filesizeErrorText:s.a.string,installSuccessText:s.a.string,installUpdatedText:s.a.string,templateSuccessfullyInstalledUpdated:s.a.string,templateInstallInstructions:s.a.string,addNewTemplate:s.a.func,updateTemplateParam:s.a.func,templates:s.a.object};var v=function(e){return{templates:e.template.list}},T=function(e){return{addNewTemplate:function(t){e(n.i(h.b)(t))},updateTemplateParam:function(t,r,a){e(n.i(h.d)(t,r,a))}}};t.a=n.i(p.connect)(v,T)(g)},137:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(75),a=n.n(r),o=n(42),i=n.n(o),s=n(120);a()(function(){if(void 0!==GFPDF.templateList){window.Promise||(window.Promise=i.a);var e=a()("#gfpdf_settings\\[template\\], #gfpdf_settings\\[default_template\\]");e.length>0&&n.i(s.a)(e)}})},138:function(e,t,n){"use strict";var r=n(32),a=(n.n(r),n(76)),o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i={list:n.i(r.fromJS)(GFPDF.templateList),activeTemplate:GFPDF.activeTemplate||GFPDF.activeDefaultTemplate,search:""},s=function(e,t){return e.findKey(function(e){if(e.get("id")===t)return!0})};t.a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,t=arguments[1];switch(t.type){case a.a:return o({},e,{search:t.text});case a.b:return o({},e,{activeTemplate:t.id});case a.c:return o({},e,{list:e.list.push(t.template)});case a.d:return o({},e,{list:e.list.set(s(e.list,t.template.get("id")),t.template)});case a.e:return o({},e,{list:e.list.setIn([s(e.list,t.id),t.name],t.value)});case a.f:return o({},e,{list:e.list.delete(s(e.list,t.id))})}return e}},139:function(e,t,n){"use strict";function r(e){n.i(i.render)(o.a.createElement(s.Provider,{store:e},o.a.createElement(m,null)),document.getElementById("gfpdf-overlay"))}t.a=r;var a=n(1),o=n.n(a),i=n(40),s=(n.n(i),n(11)),l=n(15),c=n(129),p=n(135),u=n(122),f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m=function(){return o.a.createElement(l.HashRouter,null,o.a.createElement(l.Switch,null,o.a.createElement(l.Route,{path:"/template",exact:!0,render:function(e){return o.a.createElement(c.a,f({},e,{ajaxUrl:GFPDF.ajaxUrl,ajaxNonce:GFPDF.ajaxNonce,templateDetailsText:GFPDF.templateDetails,templateHeaderText:GFPDF.installedPdfs,genericUploadErrorText:GFPDF.problemWithTheUpload,activateText:GFPDF.select,addTemplateText:GFPDF.addNewTemplate,filenameErrorText:GFPDF.uploadInvalidNotZipFile,filesizeErrorText:GFPDF.uploadInvalidExceedsFileSizeLimit,installSuccessText:GFPDF.templateSuccessfullyInstalled,installUpdatedText:GFPDF.templateSuccessfullyUpdated,templateSuccessfullyInstalledUpdated:GFPDF.templateSuccessfullyInstalledUpdated,templateInstallInstructions:GFPDF.templateInstallInstructions}))}}),o.a.createElement(l.Route,{path:"/template/:id",render:function(e){return o.a.createElement(p.a,f({},e,{ajaxUrl:GFPDF.ajaxUrl,ajaxNonce:GFPDF.ajaxNonce,pdfWorkingDirPath:GFPDF.pdfWorkingDir,activateText:GFPDF.select,templateDeleteText:GFPDF.delete,templateConfirmDeleteText:GFPDF.doYouWantToDeleteTemplate,templateDeleteErrorText:GFPDF.couldNotDeleteTemplate,currentTemplateText:GFPDF.currentTemplate,versionText:GFPDF.version,groupText:GFPDF.group,tagsText:GFPDF.tags,showPreviousTemplateText:GFPDF.showPreviousTemplate,showNextTemplateText:GFPDF.showNextTemplate}))}}),o.a.createElement(l.Route,{component:u.a})))}},140:function(e,t,n){"use strict";t.a=function(e,t,n){var r,a,o=0,i={dev:-6,alpha:-5,a:-5,beta:-4,b:-4,RC:-3,rc:-3,"#":-2,p:1,pl:1},s=function(e){return e=(""+e).replace(/[_\-+]/g,"."),e=e.replace(/([^.\d]+)/g,".$1.").replace(/\.{2,}/g,"."),e.length?e.split("."):[-8]},l=function(e){return e?isNaN(e)?i[e]||-7:parseInt(e,10):0};for(e=s(e),t=s(t),a=Math.max(e.length,t.length),r=0;r<a;r++)if(e[r]!==t[r]){if(e[r]=l(e[r]),t[r]=l(t[r]),e[r]<t[r]){o=-1;break}if(e[r]>t[r]){o=1;break}}if(!n)return o;switch(n){case">":case"gt":return o>0;case">=":case"ge":return o>=0;case"<=":case"le":return o<=0;case"===":case"=":case"eq":return 0===o;case"<>":case"!==":case"ne":return 0!==o;case"":case"<":case"lt":return o<0;default:return null}}},18:function(e,t,n){"use strict";n.d(t,"e",function(){return a}),n.d(t,"a",function(){return o}),n.d(t,"b",function(){return i}),n.d(t,"d",function(){return s}),n.d(t,"c",function(){return l});var r=n(76),a=function(e){return{type:r.a,text:e}},o=function(e){return{type:r.b,id:e}},i=function(e){return{type:r.c,template:e}},s=function(e,t,n){return{type:r.e,id:e,name:t,value:n}},l=function(e){return{type:r.f,id:e}}},43:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=n(2),s=n.n(i),l=n(1),c=n.n(l),p=n(75),u=n.n(p),f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=function(e){function t(){var e,n,o,i;r(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=o=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),o.state={visible:!0},o.shouldSetTimer=function(){o.props.dismissable&&o.setTimer()},o.setTimer=function(){null!=o._timer&&clearTimeout(o._timer),o._timer=setTimeout(function(){u()(o._message).removeClass("inline").slideUp(400,function(){u()(o._message).removeAttr("style"),o.setState({visible:!1}),o._timer=null,o.props.dismissableCallback&&o.props.dismissableCallback()})},o.props.delay)},i=n,a(o,i)}return o(t,e),f(t,[{key:"componentWillReceiveProps",value:function(){this.setState({visible:!0}),this.shouldSetTimer()}},{key:"componentDidMount",value:function(){this.shouldSetTimer()}},{key:"componentWillUnmount",value:function(){this.props.dismissable&&clearTimeout(this._timer)}},{key:"render",value:function(){var e=this,t=this.props,n=t.text,r=t.error,a="notice inline";return r&&(a+=" error"),this.state.visible?c.a.createElement("div",{ref:function(t){return e._message=t},className:a},c.a.createElement("p",null,n)):c.a.createElement("div",null)}}]),t}(c.a.Component);m.defaultProps={delay:4e3,dismissable:!1},m.propTypes={text:s.a.string.isRequired,error:s.a.bool,delay:s.a.number,dismissable:s.a.bool,dismissableCallback:s.a.func},t.a=m},75:function(e,t){e.exports=jQuery},76:function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return a}),n.d(t,"c",function(){return o}),n.d(t,"d",function(){return i}),n.d(t,"e",function(){return s}),n.d(t,"f",function(){return l});var r="SEARCH_TEMPLATES",a="SELECT_TEMPLATE",o="ADD_TEMPLATE",i="UPDATE_TEMPLATE",s="UPDATE_TEMPLATE_PARAM",l="DELETE_TEMPLATE"},77:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=n(2),s=n.n(i),l=n(1),c=n.n(l),p=n(11),u=n(18),f=n(15),m=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=function(e){function t(){var e,n,o,i;r(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=o=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),o.selectTemplate=function(e){e.preventDefault(),e.stopPropagation(),o.props.history.push(""),o.props.onTemplateSelect(o.props.template.get("id"))},i=n,a(o,i)}return o(t,e),m(t,[{key:"render",value:function(){return c.a.createElement("a",{onClick:this.selectTemplate,href:"#",tabIndex:"150",className:"button button-primary activate"},this.props.buttonText)}}]),t}(c.a.Component);h.propTypes={template:s.a.object,onTemplateSelect:s.a.func,buttonText:s.a.string};var d=function(e){return{onTemplateSelect:function(t){e(n.i(u.a)(t))}}};t.a=n.i(f.withRouter)(n.i(p.connect)(null,d)(h))},78:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=n(2),s=n.n(i),l=n(1),c=n.n(l),p=n(124),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=function(e){function t(){var e,n,o,i;r(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=o=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),o.handleFocus=function(e){o.container.contains(e.target)||(e.stopPropagation(),o.container.focus())},i=n,a(o,i)}return o(t,e),u(t,[{key:"componentDidMount",value:function(){document.addEventListener("focus",this.handleFocus,!0),document.activeElement&&"wp-filter-search"!==document.activeElement.className&&this.container.focus()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("focus",this.handleFocus,!0)}},{key:"render",value:function(){var e=this,t=this.props.header,n=this.props.footer,r=this.props.children,a=this.props.closeRoute;return c.a.createElement("div",{ref:function(t){return e.container=t},tabIndex:"140"},c.a.createElement("div",{className:"backdrop theme-backdrop"}),c.a.createElement("div",{className:"container theme-wrap"},c.a.createElement("div",{className:"theme-header"},t,c.a.createElement(p.a,{closeRoute:a})),c.a.createElement("div",{id:"gfpdf-template-container",className:"theme-about wp-clearfix theme-browser rendered"},r),n))}}]),t}(c.a.Component);f.propTypes={header:s.a.oneOfType([s.a.string,s.a.element]),footer:s.a.oneOfType([s.a.string,s.a.element]),children:s.a.node.isRequired,closeRoute:s.a.string},t.a=f},79:function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"b",function(){return l}),n.d(t,"c",function(){return p}),n.d(t,"d",function(){return u}),n.d(t,"e",function(){return f}),n.d(t,"f",function(){return m});var r=n(2),a=n.n(r),o=n(1),i=n.n(o),s=function(e){var t=e.isCurrentTemplate,n=e.label;return t?i.a.createElement("span",{className:"current-label"},n):i.a.createElement("span",null)};s.propTypes={isCurrentTemplate:a.a.bool,label:a.a.string};var l=function(e){var t=e.name,n=e.version,r=e.versionLabel;return i.a.createElement("h2",{className:"theme-name"},t,i.a.createElement(c,{version:n,label:r}))};l.propTypes={name:a.a.string,version:a.a.string,versionLabel:a.a.string};var c=function(e){var t=e.label,n=e.version;return n?i.a.createElement("span",{className:"theme-version"},t,": ",n):i.a.createElement("span",null)};c.propTypes={label:a.a.string,version:a.a.string};var p=function(e){var t=e.author,n=e.uri;return n?i.a.createElement("p",{className:"theme-author"},i.a.createElement("a",{href:n},t)):i.a.createElement("p",{className:"theme-author"},t)};p.propTypes={author:a.a.string,uri:a.a.string};var u=function(e){var t=e.label,n=e.group;return i.a.createElement("p",{className:"theme-author"},i.a.createElement("strong",null,t,": ",n))};u.propTypes={label:a.a.string,group:a.a.string};var f=function(e){var t=e.desc;return i.a.createElement("p",{className:"theme-description"},t)};f.propTypes={desc:a.a.string};var m=function(e){var t=e.label,n=e.tags;return n?i.a.createElement("p",{className:"theme-tags"},i.a.createElement("span",null,t,":")," ",n):i.a.createElement("span",null)};m.propTypes={label:a.a.string,tags:a.a.string}},80:function(e,t,n){"use strict";var r=n(74),a=(n.n(r),n(140)),o=function(e){return e.template.list},i=function(e){return e.template.search},s=function(e){return e.template.activeTemplate},l=function(e,t){e=e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),e=e.replace(/ /g,")(?=.*");var n=new RegExp("^(?=.*"+e+").+","i");return t.filter(function(e){var t=e.get("template").replace(/(<([^>]+)>)/gi,""),r=e.get("description").replace(/(<([^>]+)>)/gi,""),a=e.get("author").replace(/(<([^>]+)>)/gi,""),o=e.get("group").replace(/(<([^>]+)>)/gi,"");return n.test([t,e.get("id"),o,r,a].toString())})},c=function(e,t){return e.sort(function(e,n){return!0===e.get("new",!1)&&!0===e.get("new",!1)?0:!0===e.get("new",!1)?1:!0===n.get("new",!1)?-1:t===e.get("id")?-1:t===n.get("id")?1:e.get("group")<n.get("group")?-1:e.get("group")>n.get("group")?1:e.get("template")<n.get("template")?-1:e.get("template")>n.get("template")?1:0})},p=function(e){return e.map(function(e){var t=e.get("required_pdf_version");return n.i(a.a)(t,GFPDF.currentVersion,">")?e.merge({compatible:!1,error:GFPDF.requiresGravityPdfVersion.replace(/%s/g,t),long_error:GFPDF.templateNotCompatibleWithGravityPdfVersion.replace(/%s/g,t)}):e.set("compatible",!0)})};t.a=n.i(r.createSelector)([o,i,s],function(e,t,n){return e=p(e),t&&(e=l(t,e)),c(e,n)})}},[137]);
|
dist/assets/js/gfpdf-backbone.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(e){e(function(){function u(){this.init=function(){this.is_settings()&&this.processSettings()},this.is_settings=function(){return e("#tab_PDF").length},this.processSettings=function(){switch(e(".nav-tab-wrapper a.nav-tab-active:first").text()){case"Tools":this.tools_settings();break;case"Help":this.help_settings()}},this.help_settings=function(){new n.ContainerView},this.tools_settings=function(){var e=JSON.parse(GFPDF.customFontData),u=new i.Collection.Core(e),t=new i.View.Container({collection:u});new i.View.Add({collection:u,container:t})}}var t={evaluate:/\{\{(.+?)\}\}/gim,interpolate:/\{\{=(.+?)\}\}/gim,escape:/\{\{-(.+?)\}\}/gim},i={Model:{},Collection:{},View:{},Misc:{}};i.Model.Core=Backbone.Model.extend({defaults:{font_name:"",regular:"",bold:"",italics:"",bolditalics:"",disabled:!1},url:GFPDF.ajaxUrl,save:function(u,t){var i={emulateHTTP:!0,emulateJSON:!0,data:{action:"gfpdf_font_save",nonce:u.nonce,payload:this.toJSON()}};return e.extend(i,t),Backbone.sync("update",this,i)},destroy:function(u,t){var i={emulateHTTP:!0,emulateJSON:!0,data:{action:"gfpdf_font_delete",nonce:u.nonce,id:this.get("id")}};return e.extend(i,t),Backbone.sync("update",this,i)},validate:function(e,u){var t=new RegExp("^[A-Za-z0-9 ]+$");if(e.font_name.length>0){if(!t.test(e.font_name))return"invalid_characters";this.trigger("valid_name")}if(!1===this.validateFonts(e))return"invalid_font";this.trigger("validation_passed",this)},validateFonts:function(u){var t=!0,i={regular:u.regular,bold:u.bold,italics:u.italics,bolditalics:u.bolditalics};return e.each(i,e.proxy(function(e,u){u.length>0&&!1===this.isValidFile(u)?(t=!1,this.trigger("invalid_font",this,!0,e)):this.trigger("valid_font",this,!1,e)},this)),t},isValidFile:function(e){if(e.length<5)return!1;if(".ttf"===e.substr(e.length-4).toLowerCase()&&new RegExp(/^[a-z](?:[-a-z0-9\+\.])*:(?:\/\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD])*@)?(?:\[(?:(?:(?:[0-9a-f]{1,4}:){6}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|::(?:[0-9a-f]{1,4}:){5}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:[0-9a-f]{1,4}:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|v[0-9a-f]+[-a-z0-9\._~!\$&'\(\)\*\+,;=:]+)\]|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}|(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD])*)(?::[0-9]*)?(?:\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD]))*)*|\/(?:(?:(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD]))+)(?:\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD]))*)*)?|(?:(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD]))+)(?:\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD]))*)*|(?!(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD])))(?:\?(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\/\?\xA0-\uD7FF\uE000-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E\uDB80-\uDBBE\uDBC0-\uDBFE][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDC00-\uDFFD])*)?(?:\#(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\/\?\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD])*)?$/gim).test(e))return!0;return!1},cssDeclaration:function(e,u,t,i){return'font-family: "'+u+'", '+i.getShortname(u)+", sans-serif;"},getShortname:function(e){return e=e.toLowerCase(),e=e.replace(" ","")}}),i.Collection.Core=Backbone.Collection.extend({model:i.Model.Core}),i.View.Container=Backbone.View.extend({el:"#font-list",tagName:"ul",initialize:function(e){this.listenTo(this.collection,"add",this.addRender),this.listenTo(this.collection,"remove",this.render),this.render()},render:function(){return this.collection.length>0?(this.$el.empty(),this.collection.each(function(e){this.addRender(e)},this)):this.$el.html(_.template(e("#GravityPDFFontsEmpty").html(),null,t)),this},addRender:function(e){1===this.collection.length&&this.$el.empty();var u=new i.View.Item({model:e,collection:this.collection});return this.$el.append(u.render().el),this}}),i.View.Item=Backbone.View.extend({template:"#GravityPDFFonts",tagName:"li",events:{"click .font-name":"toggleView","click .delete-font":"deleteModel","submit form":"formSubmission"},initialize:function(){this.modelBinder=new Backbone.ModelBinder,this.listenTo(this.model,"invalid valid_name",this.nameError),this.listenTo(this.model,"invalid_font valid_font",this.fontError),this.listenTo(this.model,"invalid",this.disableSubmitButton),this.listenTo(this.model,"validation_passed",this.enableSubmitButton)},render:function(){return this.template=_.template(e(this.template).html(),null,t),this.$el.html(this.template({model:this.model})),this.modelBinder.bind(this.model,this.el,{font_name:[{selector:"[name=font_name]"},{selector:"[name=usage]",converter:this.model.cssDeclaration}],regular:"[name=regular]",bold:"[name=bold]",italics:"[name=italics]",bolditalics:"[name=bolditalics]"},{changeTriggers:{"":"change",".font-name-field":"keyup"},modelSetOptions:{validate:!0}}),this},toggleView:function(u){u.preventDefault(),e(u.currentTarget).next().toggle()},nameError:function(e,u){u&&"invalid_characters"==u?this.$el.find('input[name="font_name"]').css("border-color","red"):this.$el.find('input[name="font_name"]').removeAttr("style")},fontError:function(u,t,i){$input=this.$el.find('input[name="'+i+'"]'),t?($error=e('<span class="gf_settings_description"><label>Only TTF font files are supported.</label></span>'),$input.hasClass("invalid")||$input.addClass("invalid").next().after($error.clone())):$input.hasClass("invalid")&&$input.removeClass("invalid").next().next().remove()},disableSubmitButton:function(e){this.$el.find(".font-submit button").prop("disabled",!0),e.set("disabled",!0)},enableSubmitButton:function(e){this.$el.find(".font-submit button").prop("disabled",!1),e.set("disabled",!1)},formSubmission:function(u){u.preventDefault();e(u.currentTarget);u.currentTarget.checkValidity()&&!1===this.model.get("disabled")&&(this.addSpinner(),this.removeMessage(),console.log(this.model),this.model.save({nonce:this.$el.find("input[name=wpnonce]").val()},{success:e.proxy(function(e,u,t){this.removeSpinner(),this.displayMessage(GFPDF.updateSuccess),this.model.set(e)},this),error:e.proxy(function(e,u,t){this.removeSpinner(),e.responseJSON.error&&this.displayMessage(e.responseJSON.error,!0)},this)}))},deleteModel:function(u){u.preventDefault();var t=e("#delete-confirm"),n=[{text:GFPDF.delete,click:e.proxy(function(){t.wpdialog("destroy"),this.model.get("id")?(this.addSpinner(),this.removeMessage(),this.$el.hide(),this.model.destroy({nonce:this.$el.find("input[name=wpnonce]").val()},{success:e.proxy(function(e,u,t){this.removeSpinner(),this.displayMessage(GFPDF.deleteSuccess),this.collection.remove(this.model)},this),error:e.proxy(function(e,u,t){this.removeSpinner(),this.collection.remove(this.model),e.responseJSON.error&&this.displayMessage(e.responseJSON.error,!0)},this)})):this.collection.remove(this.model)},this)},{text:GFPDF.cancel,click:function(){t.wpdialog("destroy")}}];i.Misc.Dialog(t,n,300,175),t.wpdialog("open")},addSpinner:function(){var u=e('<img alt="Loading" src="'+GFPDF.spinnerUrl+'" class="gfpdf-spinner" style="margin-top: 4px;" />');this.$el.find(".font-submit button").after(u)},removeSpinner:function(){this.$el.find(".gfpdf-spinner").remove()},displayMessage:function(u,t){var i=e('<div class="updated notice">');!0===t&&i.addClass("error"),i.html("<p>"+u+"</p>"),this.$el.find("form").before(i)},removeMessage:function(){this.$el.find("div.notice").slideUp(function(){e(this).remove()})}}),i.View.Add=Backbone.View.extend({el:"#font-add-list",events:{click:"addFont"},initialize:function(e){this.container=e.container,this.render()},render:function(){this.$el.html('<i class="fa fa-plus fa-4x"></i><span>Add Font</span>')},addFont:function(e){var u=new i.Model.Core;this.collection.add(u),this.container.$el.find("li:last .font-settings").toggle().find('input[type="text"]:first').focus()}}),i.Misc.Dialog=function(u,t,i,n){u.wpdialog({autoOpen:!1,resizable:!1,draggable:!1,width:i,height:n,modal:!0,dialogClass:"wp-dialog",zIndex:3e5,buttons:t,open:function(){e(this).siblings(".ui-dialog-buttonpane").find("button:eq(1)").focus(),e(".ui-widget-overlay").bind("click",function(){u.wpdialog("close")})}})};var n={};n.SearchModel=Backbone.Model.extend({}),n.SearchCollection=Backbone.Collection.extend({model:n.SearchModel,initialize:function(e,u){this.url=u.url}}),n.ContainerView=Backbone.View.extend({el:"#search-knowledgebase",events:{"keyup #search-help-input":"doSearch","change #search-help-input":"doSearch"},initialize:function(){this.timer=!0,this.render()},render:function(){return this.addSearchBar(),this},addSearchBar:function(){var u=e("<input>").attr("type","text").attr("placeholder"," "+GFPDF.searchPlaceholder).attr("id","search-help-input");this.$el.prepend(u),u.tooltip({items:"input",content:"The search must be more than 3 characters.",tooltipClass:"ui-state-error"}).tooltip("disable"),u.focus()},doSearch:function(u){var t=e(u.currentTarget);window.clearTimeout(this.timer);var i=e.trim(t.val());t.data("currentValue");i.length>3&&t.data("previousValue")!==i?(t.tooltip("disable"),t.data("currentValue",i),this.timer=window.setTimeout(_.bind(function(){this.processSearch(i)},this),500)):i.length<=3&&13==u.keyCode&&t.tooltip("enable").tooltip("open")},processSearch:function(e){console.log("Searching our collection..."),new n.DocsView({s:e})}}),n.MainView=Backbone.View.extend({callAPI:function(e){this.collection.fetch({success:_.bind(this.renderSearch,this),error:_.bind(this.renderSearchError)})},renderSearch:function(e,u){console.log("Rendering Search Results"),this.hideSpinner();var t=this.$el.find(".inside ul");t.html(this.template({collection:this.collection.toJSON(),url:this.url}));var i=t.parent();i.is(":visible")||i.slideDown(500)},renderSearchError:function(e,u){console.log("Search Failed"),console.log(e),console.log(u)},showSpinner:function(){this.$el.find(".spinner").addClass("is-active"),this.$el.is(":visible")||this.$el.slideDown(500)},hideSpinner:function(){this.$el.find(".spinner").removeClass("is-active")}}),n.DocsView=n.MainView.extend({el:"#documentation-api",template:"#GravityPDFSearchResultsDocumentation",initialize:function(e){this.url="https://gravitypdf.com/wp-json/wp/v2/v4_docs/",this.s=e.s,this.render()},render:function(){this.template=_.template(e(this.template).html(),null,t),this.showSpinner();var u=encodeURIComponent(this.s),i=this.url+"?search="+u;return this.collection=new n.SearchCollection([],{url:i}),this.callAPI(i),this}}),(new u).init()})}(jQuery);
|
dist/assets/js/gfpdf-entries.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(t){var u={PDFSubmenuHover:function(){t("table .gf_form_action_has_submenu").hover(function(){clearTimeout(t(this).data("timeout")),t(this).find(".gf_submenu").show()},function(){var u=this,n=setTimeout(function(){t(u).find(".gf_submenu").hide()},350);t(this).data("timeout",n)})}};t(function(){u.PDFSubmenuHover()})}(jQuery);
|
dist/assets/js/gfpdf-migration.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(i){function t(e,r,n){n.append("<p>"+GFPDF.migratingSite.replace(/%s/g,e)+' <img alt="'+GFPDF.spinnerAlt+'" src="'+GFPDF.spinnerUrl+'" class="gfpdf-spinner" style="width:20px;vertical-align: middle;padding-left:5px" /></p>'),i.ajax({type:"post",dataType:"json",url:GFPDF.ajaxUrl,data:{action:"multisite_v3_migration",nonce:r,blog_id:e},success:function(s){n.find(".gfpdf-spinner").remove(),"complete"===s.results?n.append("<p>"+GFPDF.siteMigrationComplete.replace(/%s/g,e)+"</p>"):s.results.error?n.append("<p><strong>"+GFPDF.migrationError+": "+s.results.error+"</strong></p>"):n.append("<p><strong>"+GFPDF.siteMigrationErrors.replace(/%s/g,e)+"</strong></p>"),gfpdf_migration_multisite_ids.length>0?t(gfpdf_migration_multisite_ids.shift(),r,n):i("#gfpdf-multisite-migration-complete").show()},error:function(){n.find(".gfpdf-spinner").remove(),n.append("<p><strong>"+GFPDF.siteMigrationErrors.replace(/%s/g,e)+"</strong></p>"),gfpdf_migration_multisite_ids.length>0?t(gfpdf_migration_multisite_ids.shift(),r,n):i("#gfpdf-multisite-migration-complete").show()}})}i(function(){var e=i("#gfpdf-multisite-migration-copy"),r=e.data("nonce");gfpdf_migration_multisite_ids.length>0&&t(gfpdf_migration_multisite_ids.shift(),r,e)})}(jQuery);
|
dist/assets/js/gfpdf-settings.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(t){t(function(){function e(){var e=this;this.init=function(){this.initCommon(),this.isSettings()&&this.processSettings(),this.isFormSettings()&&this.processFormSettings()},this.initCommon=function(){this.setupGravityForms(),this.doUploadListener(),this.doColorPicker(),this.setupSelectBoxes(),this.showTooltips(),this.setupCustomPaperSize(),this.setupToggledFields(),this.setupDynamicTemplateFields(),this.setupLicenseDeactivation()},this.setupGravityForms=function(){"undefined"!=typeof gf_vars&&(gf_vars.thisFormButton=GFPDF.conditionalText,gf_vars.show=GFPDF.enable,gf_vars.hide=GFPDF.disable),window.gfMergeTags&&"undefined"!=typeof form&&(window.gfMergeTags.getTargetElement=this.resetGfMergeTags)},this.isSettings=function(){return t("#tab_PDF").length},this.isFormSettings=function(){return t("#tab_pdf").length},this.isFormSettingsList=function(){return t("#gfpdf_list_form").length},this.isFormSettingsEdit=function(){return t("#gfpdf_pdf_form").length},this.getCurrentSettingsPage=function(){return this.isSettings()?t(".nav-tab-wrapper a.nav-tab-active:first").text():""},this.processSettings=function(){switch(this.cleanupGFNavigation(),this.runPDFAccessCheck(),this.getCurrentSettingsPage()){case"General":this.generalSettings();break;case"Tools":this.toolsSettings()}},this.processFormSettings=function(){this.isFormSettingsList()&&this.doFormSettingsListPage(),this.isFormSettingsEdit()&&this.doFormSettingsEditPage()},this.doFormSettingsEditPage=function(){this.setupRequiredFields(t("#gfpdf_pdf_form")),this.setupPdfTabs(),this.handleSecurityConditionals(),this.handlePDFConditionalLogic(),this.handleOwnerRestriction(),this.toggleFontAppearance(t("#gfpdf_settings\\[template\\]").data("template_group")),this.toggleAppearanceTab(),t("#gfpdf_pdf_form").submit(function(){try{tinyMCE.triggerSave()}catch(t){}}),t("#gfpdf_pdf_form").submit(function(){t("#gfpdf_settings\\[conditionalLogic\\]").val(jQuery.toJSON(window.gfpdf_current_pdf.conditionalLogic))})},this.handleSecurityConditionals=function(){var e=t("#pdf-general-advanced"),i=e.find('input[name="gfpdf_settings[security]"]'),n=e.find('input[name="gfpdf_settings[format]"]');i.change(function(){if(t(this).is(":checked")){var i=n.filter(":checked").val();t(this).val()===GFPDF.no||i!==GFPDF.standard?e.find("tr:nth-child(3),tr:nth-child(4),tr:nth-child(5):not(.gfpdf-hidden)").hide():e.find("tr:nth-child(3),tr:nth-child(4),tr:nth-child(5):not(.gfpdf-hidden)").show(),i!==GFPDF.standard?e.find("tr:nth-child(2)").hide():e.find("tr:nth-child(2)").show()}}).trigger("change"),n.change(function(){t(this).is(":checked")&&i.trigger("change")}).trigger("change")},this.handlePDFConditionalLogic=function(){gform.addFilter("gform_conditional_object",function(t,e){return"gfpdf"===e?window.gfpdf_current_pdf:t}),t("#gfpdf_conditional_logic").change(function(){void 0===window.gfpdf_current_pdf.conditionalLogic&&t(this).prop("checked")?window.gfpdf_current_pdf.conditionalLogic=new ConditionalLogic:t(this).prop("checked")||(window.gfpdf_current_pdf.conditionalLogic=null),ToggleConditionalLogic(!1,"gfpdf")}).trigger("change")},this.handleOwnerRestriction=function(){var e=t("#gfpdf-advanced-pdf-options");e.find('input[name="gfpdf_settings[public_access]"]').change(function(){t(this).is(":checked")&&("Yes"===t(this).val()?e.find("tr:nth-child(8)").hide():e.find("tr:nth-child(8)").show())}).trigger("change")},this.doFormSettingsListPage=function(){this.setupAJAXListDeleteListener(),this.setupAJAXListDuplicateListener(),this.setupAJAXListStateListener()},this.setupAJAXListStateListener=function(){t("#gfpdf_list_form").on("click",".check-column img",function(){var i=String(t(this).data("id")),n=this;if(i.length>0){n.src.indexOf("active1.png")>=0?(n.src=n.src.replace("active1.png","active0.png"),t(n).attr("title",GFPDF.inactive).attr("alt",GFPDF.inactive)):(n.src=n.src.replace("active0.png","active1.png"),t(n).attr("title",GFPDF.active).attr("alt",GFPDF.active));var a={action:"gfpdf_change_state",nonce:t(this).data("nonce"),fid:t(this).data("fid"),pid:t(this).data("id")};e.ajax(a,function(t){})}})},this.setupAJAXListDuplicateListener=function(){t("#gfpdf_list_form").on("click","a.submitduplicate",function(){var i=String(t(this).data("id")),n=this,a=t('<img alt="'+GFPDF.spinnerAlt+'" src="'+GFPDF.spinnerUrl+'" class="gfpdf-spinner gfpdf-spinner-small" />');if(t(this).after(a).parent().parent().attr("style","position:static; visibility: visible;"),i.length>0){var s={action:"gfpdf_list_duplicate",nonce:t(this).data("nonce"),fid:t(this).data("fid"),pid:t(this).data("id")};e.ajax(s,function(a){if(a.msg){t(n).parent().parent().attr("style","").find(".gfpdf-spinner").remove(),e.show_message(a.msg);var s=t(n).parents("tr"),o=s.clone().css("background","#baffb8");o.find(".column-name > a, .edit a").each(function(){var i=t(this).attr("href");i=e.updateURLParameter(i,"pid",a.pid),t(this).attr("href",i)}),o.find(".column-name > a").html(a.name);var d=o.find(".duplicate a"),r=o.find(".delete a"),c=o.find(".check-column img"),f=o.find(".column-shortcode input");d.data("id",a.pid),d.data("nonce",a.dup_nonce),r.data("id",a.pid),r.data("nonce",a.del_nonce),c.data("id",a.pid),c.data("nonce",a.state_nonce);var l=f.val();l=l.replace(i,a.pid),f.val(l);var p="";s.hasClass("alternate")?(o.removeClass("alternate"),p="#FFF"):(o.addClass("alternate"),p="#f9f9f9");var g=c.attr("src");c.attr("title",GFPDF.inactive).attr("alt",GFPDF.inactive).attr("src",g.replace("active1.png","active0.png")),o.hide().insertAfter(s).fadeIn().animate({backgroundColor:p})}})}})},this.maybeShowEmptyRow=function(){var e=t("#gfpdf_list_form tbody");if(0===e.find("tr").length){var i=t("<tr>").addClass("no-items"),n=t("<td>").attr("colspan","5").addClass("colspanchange"),a=t("<a>").attr("href",t("#add-new-pdf").attr("href")).append(GFPDF.letsGoCreateOne+".");n.append(GFPDF.thisFormHasNoPdfs).append(" ").append(a),i.append(n),e.append(i)}},this.setupAJAXListDeleteListener=function(){var i=t("#delete-confirm"),n=[{text:GFPDF.delete,click:function(){i.wpdialog("close"),$elm=t(i.data("elm"));var n=t('<img alt="'+GFPDF.spinnerAlt+'" src="'+GFPDF.spinnerUrl+'" class="gfpdf-spinner gfpdf-spinner-small" />');$elm.append(n).parent().parent().attr("style","position:static; visibility: visible;");var a={action:"gfpdf_list_delete",nonce:$elm.data("nonce"),fid:$elm.data("fid"),pid:$elm.data("id")};e.ajax(a,function(t){if(t.msg){$elm.parent().parent().attr("style","").find(".gfpdf-spinner").remove(),e.show_message(t.msg);$elm.parents("tr").css("background","#ffb8b8").fadeOut(400,function(){this.remove(),e.maybeShowEmptyRow()})}i.data("elm",null)})}},{text:GFPDF.cancel,click:function(){i.wpdialog("close").data("elm",null)}}];this.wp_dialog(i,n,300,175),t("#gfpdf_list_form").on("click","a.submitdelete",function(){String(t(this).data("id")).length>0&&!i.data("elm")&&(e.resizeDialogIfNeeded(i,300,175),i.wpdialog("open").data("elm",this))})},this.setupPdfTabs=function(){t(".gfpdf-tab-container").not(":eq(0)").hide(),t(".gfpdf-tab-wrapper a").click(function(){return t(this).parents("ul").find("a").removeClass("current"),t(this).addClass("current").blur(),t(".gfpdf-tab-container").hide(),t(t(this).attr("href")).show(),!1})},this.setupToggledFields=function(){t("form").off("change",".gfpdf-input-toggle").on("change",".gfpdf-input-toggle",function(){var e=t(this).parent().next();t(this).prop("checked")?e.slideDown("slow"):(e.slideUp("slow"),e.find(".wp-editor-area").each(function(){var e=tinyMCE.get(t(this).attr("id"));null!==e&&e.setContent("")}),e.find("textarea").each(function(){t(this).val("")}))})},this.setupDynamicTemplateFields=function(){t("#gfpdf_settings\\[template\\]").off("change").change(function(){var i=t('<img alt="'+GFPDF.spinnerAlt+'" src="'+GFPDF.spinnerUrl+'" class="gfpdf-spinner" />');t(this).next().after(i);var n={action:"gfpdf_get_template_fields",nonce:GFPDF.ajaxNonce,template:t(this).val(),type:t(this).attr("id"),id:t("#gform_id").val(),gform_pdf_id:t("#gform_pdf_id").val()};e.ajax(n,function(n){i.remove(),t('input[name="gfpdf_settings[advanced_template]"][value="No"]').prop("checked",!0).trigger("change"),n.fields?(window.gfMergeTags&&(t(".merge-tag-support").removeClass("merge-tag-support"),t(".all-merge-tags a.open-list").off("click")),t.each(n.editors,function(t,e){var i=tinyMCE.get(e);if(null!==i)try{tinyMCE.remove(i)}catch(t){}}),t("#pdf-custom-appearance").hide().html(n.fields).fadeIn(),t("#gfpdf-custom-appearance-nav").show(),e.loadTinyMCEEditor(n.editors,n.editor_init),e.initCommon(),e.doMergetags()):(t("#gfpdf-custom-appearance-nav").hide(),t("#pdf-custom-appearance").html("")),n.template_type&&e.toggleFontAppearance(n.template_type)})})},this.setupLicenseDeactivation=function(){t(".gfpdf-deactivate-license").click(function(){var i=t(this).parent();i.find(".gf_settings_description label").html("");var n=t('<img alt="'+GFPDF.spinnerAlt+'" src="'+GFPDF.spinnerUrl+'" class="gfpdf-spinner" />');t(this).append(n);var a=t(this).data("addon-name"),s={action:"gfpdf_deactivate_license",addon_name:a,license:t(this).data("license"),nonce:t(this).data("nonce")};return e.ajax(s,function(e){n.remove(),e.success?(t("#gfpdf_settings\\[license_"+a+"\\]").val(""),t("#gfpdf_settings\\[license_"+a+"_message\\]").val(""),t("#gfpdf_settings\\[license_"+a+"_status\\]").val(""),i.find("i").remove(),i.find("a").remove(),i.find(".gf_settings_description label").html(e.success)):i.find(".gf_settings_description label").html(e.error)}),!1})},this.toggleFontAppearance=function(e){var i=t("#pdf-general-appearance").find("tr.gfpdf_font_type, tr.gfpdf_font_size, tr.gfpdf_font_colour");"legacy"==e?i.hide():i.show()},this.toggleAppearanceTab=function(){t('input[name="gfpdf_settings[advanced_template]"]').change(function(){"Yes"==t(this).val()?t("#gfpdf-appearance-nav").hide():t("#gfpdf-appearance-nav").show()}),t('input[name="gfpdf_settings[advanced_template]"]:checked').trigger("change")},this.loadTinyMCEEditor=function(e,i){null!=i&&(i.body_class="id post-type-post post-status-publish post-format-standard",i.formats={alignleft:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"}},{selector:"img,table,dl.wp-caption",classes:"alignleft"}],aligncenter:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"}},{selector:"img,table,dl.wp-caption",classes:"aligncenter"}],alignright:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"}},{selector:"img,table,dl.wp-caption",classes:"alignright"}],strikethrough:{inline:"del"}}),t.each(e,function(t,e){i.selector="#"+e,tinyMCE.init(i),tinyMCE.execCommand("mceAddEditor",!1,e),"function"==typeof QTags&&(QTags({id:e}),QTags._buttonsInit(),"function"==typeof switchEditors.switchto&&switchEditors.switchto(jQuery("#wp-"+e+"-wrap").find(".wp-switch-editor.switch-"+("html"==getUserSetting("editor")?"html":"tmce"))[0]))})},this.doUploadListener=function(){var e;window.formfield="",t("body").off("click",".gfpdf_settings_upload_button").on("click",".gfpdf_settings_upload_button",function(i){i.preventDefault();var n=t(this);if(window.formfield=t(this).parent().prev(),e)return void e.open();e=wp.media.frames.file_frame=wp.media({title:n.data("uploader-title"),button:{text:n.data("uploader-button-text")},multiple:!1}),e.on("select",function(){e.state().get("selection").each(function(t,e){t=t.toJSON(),window.formfield.val(t.url).change()})}),e.open()})},this.doColorPicker=function(){t(".gfpdf-color-picker").each(function(){t(this).wpColorPicker()})},this.doMergetags=function(){window.gfMergeTags&&"undefined"!=typeof form&&(window.gfMergeTags=new gfMergeTagsObj(form),window.gfMergeTags.getTargetElement=this.resetGfMergeTags),!window.gfMergeTags&&"undefined"!=typeof form&&t(".merge-tag-support").length>=0&&t(".merge-tag-support").each(function(){new gfMergeTagsObj(form,t(this))})},this.resetGfMergeTags=function(e){var i=t(e),n=i.parents("span.all-merge-tags").data("targetElement");return n=n.replace(/[!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~]/g,"\\$&"),t("#"+n)},this.setupCustomPaperSize=function(){t(".gfpdf_paper_size").each(function(){var e=t(this).nextAll(".gfpdf_paper_size_other").first();t(this).find("select").off("change").change(function(){"CUSTOM"===t(this).val()?e.fadeIn():e.fadeOut()}).trigger("change")})},this.cleanupGFNavigation=function(){t("#gform_tabs a").each(function(){var e=t(this).attr("href"),i=new RegExp("&tab=[^&;]*","g");t(this).attr("href",e.replace(i,""))})},this.runPDFAccessCheck=function(){var e=t("#gfpdf-direct-pdf-protection-check");if(e.length>0){var i=t('<img alt="'+GFPDF.spinnerAlt+'" src="'+GFPDF.spinnerUrl+'" class="gfpdf-spinner" />');e.append(i);var n={action:"gfpdf_has_pdf_protection",nonce:e.data("nonce")};this.ajax(n,function(t){i.remove(),!0===t?e.find("#gfpdf-direct-pdf-check-protected").show():e.find("#gfpdf-direct-pdf-check-unprotected").show()})}},this.setupRequiredFields=function(e){e.attr("novalidate","novalidate"),e.find('tr input[type="submit"]').click(function(){e.addClass("formSubmitted")}),e.find("tr").each(function(){t(this).find(':input[required=""]:first, :input[required]:first').parents("tr").find("th").append('<span class="gfield_required">*</span>')})},this.showTooltips=function(){"function"==typeof gform_initialize_tooltips&&(t(".gf_hidden_tooltip").each(function(){t(this).parent().siblings("th:first").append(" ").append(e.get_tooltip(t(this).html())),t(this).remove()}),gform_initialize_tooltips())},this.setupSelectBoxes=function(){t(".gfpdf-chosen").each(function(){t(this).chosen({disable_search_threshold:5,width:"100%"})})},this.setup_advanced_options=function(){var e=t(".gfpdf-advanced-options"),i=e.prev();e.find("a").click(function(){var e=this;return i.slideToggle(600,function(){var i=t(e).text();t(e).text(i==GFPDF.showAdvancedOptions?GFPDF.hideAdvancedOptions:GFPDF.showAdvancedOptions)}),!1}),t(".gfpdf-advanced-options").prev().find(".gfield_error").length&&i.show()},this.generalSettings=function(){this.setupRequiredFields(t("#pdfextended-settings > form"));var e=t("#pdf-general-security");e.find('input[name="gfpdf_settings[default_restrict_owner]"]').change(function(){t(this).is(":checked")&&("Yes"===t(this).val()?e.find("tr:nth-child(3)").hide():e.find("tr:nth-child(3)").show())}).trigger("change"),this.setup_advanced_options()},this.toolsSettings=function(){this.setupToolsTemplateInstallerDialog(),this.setupToolsFontsDialog(),this.setupToolsUninstallDialog()},this.setupToolsTemplateInstallerDialog=function(){var i=t("#gfpdf_settings\\[setup_templates\\]"),n=t("#setup-templates-confirm"),a=[{text:GFPDF.continue,click:function(){i.unbind().click()}},{text:GFPDF.cancel,click:function(){n.wpdialog("close")}}];n.length&&(this.wp_dialog(n,a,500,350),i.click(function(){return e.resizeDialogIfNeeded(n,500,350),n.wpdialog("open"),!1}))},this.setupToolsFontsDialog=function(){var i=t("#gfpdf_settings\\[manage_fonts\\]"),n=t("#manage-font-files");this.wp_dialog(n,[],500,500),i.click(function(){return e.resizeDialogIfNeeded(n,500,500),n.wpdialog("open"),!1}),window.location.hash&&"#manage_fonts"==window.location.hash&&i.click()},this.setupToolsUninstallDialog=function(){var i=t("#gfpdf-uninstall"),n=t("#uninstall-confirm"),a=[{text:GFPDF.uninstall,click:function(){i.parents("form").submit()}},{text:GFPDF.cancel,click:function(){n.wpdialog("close")}}];this.wp_dialog(n,a,500,175),i.click(function(){return e.resizeDialogIfNeeded(n,500,175),n.wpdialog("open"),!1})},this.resizeDialogIfNeeded=function(e,i,n){var a=t(window).width(),s=t(window).height(),o=a<500?a-20:i,d=s<500?s-50:n;e.wpdialog("option","width",o),e.wpdialog("option","height",d)},this.wp_dialog=function(e,i,n,a){e.wpdialog({autoOpen:!1,resizable:!1,draggable:!1,width:n,height:a,modal:!0,dialogClass:"wp-dialog",zIndex:3e5,buttons:i,open:function(){t(this).siblings(".ui-dialog-buttonpane").find("button:eq(1)").focus(),t(".ui-widget-overlay").bind("click",function(){e.wpdialog("close")})}})},this.get_tooltip=function(e){var i=t("<a>"),n=t('<i class="fa fa-question-circle">');return i.append(n),i.addClass("gf_tooltip tooltip"),i.click(function(){return!1}),i.attr("title",e),i},this.ajax=function(e,i){t.ajax({type:"post",dataType:"json",url:GFPDF.ajaxUrl,data:e,success:i,error:this.ajax_error})},this.ajax_error=function(t,e,i){console.log(e),console.log(i)},this.show_message=function(e,i,n){i=void 0!==i?i:4500,n=void 0!==n&&n;var a=t('<div id="message">').html("<p>"+e+"</p>");!0===n?a.addClass("error"):a.addClass("updated"),t(".wrap > h2").after(a),setTimeout(function(){a.slideUp()},i)},this.updateURLParameter=function(t,e,n){var a="",s=t.split("?"),o=s[0],d=s[1],r="";if(d)for(s=d.split("&"),i=0;i<s.length;i++)s[i].split("=")[0]!=e&&(a+=r+s[i],r="&");return o+"?"+a+r+e+"="+n}}(new e).init()})}(jQuery);
|
dist/assets/js/vendor.bundle.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n=window.webpackJsonp;window.webpackJsonp=function(r,i,a){for(var u,s,c,l=0,p=[];l<r.length;l++)s=r[l],o[s]&&p.push(o[s][0]),o[s]=0;for(u in i)Object.prototype.hasOwnProperty.call(i,u)&&(t[u]=i[u]);for(n&&n(r,i,a);p.length;)p.shift()();if(a)for(l=0;l<a.length;l++)c=e(e.s=a[l]);return c};var r={},o={1:0};e.e=function(t){function n(){a.onerror=a.onload=null,clearTimeout(u);var e=o[t];0!==e&&(e&&e[1](new Error("Loading chunk "+t+" failed.")),o[t]=void 0)}if(0===o[t])return Promise.resolve();if(o[t])return o[t][2];var r=new Promise(function(e,n){o[t]=[e,n]});o[t][2]=r;var i=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,e.nc&&a.setAttribute("nonce",e.nc),a.src=e.p+""+t+".app.bundle.min.js";var u=setTimeout(n,12e4);return a.onerror=a.onload=n,i.appendChild(a),r},e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e.oe=function(t){throw console.error(t),t},e(e.s=291)}([function(t,e,n){"use strict";function r(t,e,n,r,i,a,u,s){if(o(e),!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,a,u,s],p=0;c=new Error(e.replace(/%s/g,function(){return l[p++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var o=function(t){};t.exports=r},function(t,e,n){"use strict";t.exports=n(22)},function(t,e,n){t.exports=n(169)()},function(t,e,n){"use strict";var r=n(9),o=r;t.exports=o},function(t,e,n){"use strict";function r(t){for(var e=arguments.length-1,n="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,r=0;r<e;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);n+=" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";var o=new Error(n);throw o.name="Invariant Violation",o.framesToPop=1,o}t.exports=r},function(t,e,n){"use strict";function r(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,u,s=r(t),c=1;c<arguments.length;c++){n=Object(arguments[c]);for(var l in n)i.call(n,l)&&(s[l]=n[l]);if(o){u=o(n);for(var p=0;p<u.length;p++)a.call(n,u[p])&&(s[u[p]]=n[u[p]])}}return s}},function(t,e,n){"use strict";function r(t,e){return 1===t.nodeType&&t.getAttribute(d)===String(e)||8===t.nodeType&&t.nodeValue===" react-text: "+e+" "||8===t.nodeType&&t.nodeValue===" react-empty: "+e+" "}function o(t){for(var e;e=t._renderedComponent;)t=e;return t}function i(t,e){var n=o(t);n._hostNode=e,e[y]=n}function a(t){var e=t._hostNode;e&&(delete e[y],t._hostNode=null)}function u(t,e){if(!(t._flags&v.hasCachedChildNodes)){var n=t._renderedChildren,a=e.firstChild;t:for(var u in n)if(n.hasOwnProperty(u)){var s=n[u],c=o(s)._domID;if(0!==c){for(;null!==a;a=a.nextSibling)if(r(a,c)){i(s,a);continue t}p("32",c)}}t._flags|=v.hasCachedChildNodes}}function s(t){if(t[y])return t[y];for(var e=[];!t[y];){if(e.push(t),!t.parentNode)return null;t=t.parentNode}for(var n,r;t&&(r=t[y]);t=e.pop())n=r,e.length&&u(r,t);return n}function c(t){var e=s(t);return null!=e&&e._hostNode===t?e:null}function l(t){if(void 0===t._hostNode&&p("33"),t._hostNode)return t._hostNode;for(var e=[];!t._hostNode;)e.push(t),t._hostParent||p("34"),t=t._hostParent;for(;e.length;t=e.pop())u(t,t._hostNode);return t._hostNode}var p=n(4),f=n(20),h=n(91),d=(n(0),f.ID_ATTRIBUTE_NAME),v=h,y="__reactInternalInstance$"+Math.random().toString(36).slice(2),m={getClosestInstanceFromNode:s,getInstanceFromNode:c,getNodeFromInstance:l,precacheChildNodes:u,precacheNode:i,uncacheNode:a};t.exports=m},function(t,e,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};t.exports=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(256);n.d(e,"MemoryRouter",function(){return r.a});var o=n(257);n.d(e,"Prompt",function(){return o.a});var i=n(258);n.d(e,"Redirect",function(){return i.a});var a=n(113);n.d(e,"Route",function(){return a.a});var u=n(66);n.d(e,"Router",function(){return u.a});var s=n(259);n.d(e,"StaticRouter",function(){return s.a});var c=n(260);n.d(e,"Switch",function(){return c.a});var l=n(67);n.d(e,"matchPath",function(){return l.a});var p=n(261);n.d(e,"withRouter",function(){return p.a})},function(t,e,n){"use strict";function r(t){return function(){return t}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(t){return t},t.exports=o},function(t,e,n){"use strict";var r=null;t.exports={debugTool:r}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(235),o=n(108),i=n(236);n.d(e,"Provider",function(){return r.a}),n.d(e,"connectAdvanced",function(){return o.a}),n.d(e,"connect",function(){return i.a})},function(t,e,n){"use strict";function r(){T.ReactReconcileTransaction&&w||l("123")}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=f.getPooled(),this.reconcileTransaction=T.ReactReconcileTransaction.getPooled(!0)}function i(t,e,n,o,i,a){return r(),w.batchedUpdates(t,e,n,o,i,a)}function a(t,e){return t._mountOrder-e._mountOrder}function u(t){var e=t.dirtyComponentsLength;e!==m.length&&l("124",e,m.length),m.sort(a),g++;for(var n=0;n<e;n++){var r=m[n],o=r._pendingCallbacks;r._pendingCallbacks=null;var i;if(d.logTopLevelRenders){var u=r;r._currentElement.type.isReactTopLevelWrapper&&(u=r._renderedComponent),i="React update: "+u.getName(),console.time(i)}if(v.performUpdateIfNecessary(r,t.reconcileTransaction,g),i&&console.timeEnd(i),o)for(var s=0;s<o.length;s++)t.callbackQueue.enqueue(o[s],r.getPublicInstance())}}function s(t){if(r(),!w.isBatchingUpdates)return void w.batchedUpdates(s,t);m.push(t),null==t._updateBatchNumber&&(t._updateBatchNumber=g+1)}function c(t,e){w.isBatchingUpdates||l("125"),_.enqueue(t,e),b=!0}var l=n(4),p=n(5),f=n(89),h=n(16),d=n(94),v=n(21),y=n(36),m=(n(0),[]),g=0,_=f.getPooled(),b=!1,w=null,E={initialize:function(){this.dirtyComponentsLength=m.length},close:function(){this.dirtyComponentsLength!==m.length?(m.splice(0,this.dirtyComponentsLength),S()):m.length=0}},C={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},x=[E,C];p(o.prototype,y,{getTransactionWrappers:function(){return x},destructor:function(){this.dirtyComponentsLength=null,f.release(this.callbackQueue),this.callbackQueue=null,T.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(t,e,n){return y.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,t,e,n)}}),h.addPoolingTo(o);var S=function(){for(;m.length||b;){if(m.length){var t=o.getPooled();t.perform(u,null,t),o.release(t)}if(b){b=!1;var e=_;_=f.getPooled(),e.notifyAll(),f.release(e)}}},O={injectReconcileTransaction:function(t){t||l("126"),T.ReactReconcileTransaction=t},injectBatchingStrategy:function(t){t||l("127"),"function"!=typeof t.batchedUpdates&&l("128"),"boolean"!=typeof t.isBatchingUpdates&&l("129"),w=t}},T={ReactReconcileTransaction:null,batchedUpdates:i,enqueueUpdate:s,flushBatchedUpdates:S,injection:O,asap:c};t.exports=T},function(t,e,n){"use strict";function r(t,e,n,r){this.dispatchConfig=t,this._targetInst=e,this.nativeEvent=n;var o=this.constructor.Interface;for(var i in o)if(o.hasOwnProperty(i)){var u=o[i];u?this[i]=u(n):"target"===i?this.target=r:this[i]=n[i]}var s=null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue;return this.isDefaultPrevented=s?a.thatReturnsTrue:a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse,this}var o=n(5),i=n(16),a=n(9),u=(n(3),["dispatchConfig","_targetInst","nativeEvent","isDefaultPrevented","isPropagationStopped","_dispatchListeners","_dispatchInstances"]),s={type:null,target:null,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};o(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!=typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=a.thatReturnsTrue)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!=typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=a.thatReturnsTrue)},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var t=this.constructor.Interface;for(var e in t)this[e]=null;for(var n=0;n<u.length;n++)this[u[n]]=null}}),r.Interface=s,r.augmentClass=function(t,e){var n=this,r=function(){};r.prototype=n.prototype;var a=new r;o(a,t.prototype),t.prototype=a,t.prototype.constructor=t,t.Interface=o({},n.Interface,e),t.augmentClass=n.augmentClass,i.addPoolingTo(t,i.fourArgumentPooler)},i.addPoolingTo(r,i.fourArgumentPooler),t.exports=r},function(t,e,n){"use strict";var r={current:null};t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(244);n.d(e,"BrowserRouter",function(){return r.a});var o=n(245);n.d(e,"HashRouter",function(){return o.a});var i=n(112);n.d(e,"Link",function(){return i.a});var a=n(246);n.d(e,"MemoryRouter",function(){return a.a});var u=n(247);n.d(e,"NavLink",function(){return u.a});var s=n(248);n.d(e,"Prompt",function(){return s.a});var c=n(249);n.d(e,"Redirect",function(){return c.a});var l=n(250);n.d(e,"Route",function(){return l.a});var p=n(251);n.d(e,"Router",function(){return p.a});var f=n(252);n.d(e,"StaticRouter",function(){return f.a});var h=n(253);n.d(e,"Switch",function(){return h.a});var d=n(254);n.d(e,"matchPath",function(){return d.a});var v=n(255);n.d(e,"withRouter",function(){return v.a})},function(t,e,n){"use strict";var r=n(4),o=(n(0),function(t){var e=this;if(e.instancePool.length){var n=e.instancePool.pop();return e.call(n,t),n}return new e(t)}),i=function(t,e){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,t,e),r}return new n(t,e)},a=function(t,e,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,t,e,n),o}return new r(t,e,n)},u=function(t,e,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,t,e,n,r),i}return new o(t,e,n,r)},s=function(t){var e=this;t instanceof e||r("25"),t.destructor(),e.instancePool.length<e.poolSize&&e.instancePool.push(t)},c=o,l=function(t,e){var n=t;return n.instancePool=[],n.getPooled=e||c,n.poolSize||(n.poolSize=10),n.release=s,n},p={addPoolingTo:l,oneArgumentPooler:o,twoArgumentPooler:i,threeArgumentPooler:a,fourArgumentPooler:u};t.exports=p},function(t,e,n){"use strict";var r=function(){};t.exports=r},,function(t,e,n){"use strict";function r(t){if(d){var e=t.node,n=t.children;if(n.length)for(var r=0;r<n.length;r++)v(e,n[r],null);else null!=t.html?p(e,t.html):null!=t.text&&h(e,t.text)}}function o(t,e){t.parentNode.replaceChild(e.node,t),r(e)}function i(t,e){d?t.children.push(e):t.node.appendChild(e.node)}function a(t,e){d?t.html=e:p(t.node,e)}function u(t,e){d?t.text=e:h(t.node,e)}function s(){return this.node.nodeName}function c(t){return{node:t,children:[],html:null,text:null,toString:s}}var l=n(50),p=n(38),f=n(58),h=n(106),d="undefined"!=typeof document&&"number"==typeof document.documentMode||"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&/\bEdge\/\d/.test(navigator.userAgent),v=f(function(t,e,n){11===e.node.nodeType||1===e.node.nodeType&&"object"===e.node.nodeName.toLowerCase()&&(null==e.node.namespaceURI||e.node.namespaceURI===l.html)?(r(e),t.insertBefore(e.node,n)):(t.insertBefore(e.node,n),r(e))});c.insertTreeBefore=v,c.replaceChildWithTree=o,c.queueChild=i,c.queueHTML=a,c.queueText=u,t.exports=c},function(t,e,n){"use strict";function r(t,e){return(t&e)===e}var o=n(4),i=(n(0),{MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,injectDOMPropertyConfig:function(t){var e=i,n=t.Properties||{},a=t.DOMAttributeNamespaces||{},s=t.DOMAttributeNames||{},c=t.DOMPropertyNames||{},l=t.DOMMutationMethods||{};t.isCustomAttribute&&u._isCustomAttributeFunctions.push(t.isCustomAttribute);for(var p in n){u.properties.hasOwnProperty(p)&&o("48",p);var f=p.toLowerCase(),h=n[p],d={attributeName:f,attributeNamespace:null,propertyName:p,mutationMethod:null,mustUseProperty:r(h,e.MUST_USE_PROPERTY),hasBooleanValue:r(h,e.HAS_BOOLEAN_VALUE),hasNumericValue:r(h,e.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(h,e.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(h,e.HAS_OVERLOADED_BOOLEAN_VALUE)};if(d.hasBooleanValue+d.hasNumericValue+d.hasOverloadedBooleanValue<=1||o("50",p),s.hasOwnProperty(p)){var v=s[p];d.attributeName=v}a.hasOwnProperty(p)&&(d.attributeNamespace=a[p]),c.hasOwnProperty(p)&&(d.propertyName=c[p]),l.hasOwnProperty(p)&&(d.mutationMethod=l[p]),u.properties[p]=d}}}),a=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",u={ID_ATTRIBUTE_NAME:"data-reactid",ROOT_ATTRIBUTE_NAME:"data-reactroot",ATTRIBUTE_NAME_START_CHAR:a,ATTRIBUTE_NAME_CHAR:a+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(t){for(var e=0;e<u._isCustomAttributeFunctions.length;e++){if((0,u._isCustomAttributeFunctions[e])(t))return!0}return!1},injection:i};t.exports=u},function(t,e,n){"use strict";function r(){o.attachRefs(this,this._currentElement)}var o=n(208),i=(n(10),n(3),{mountComponent:function(t,e,n,o,i,a){var u=t.mountComponent(e,n,o,i,a);return t._currentElement&&null!=t._currentElement.ref&&e.getReactMountReady().enqueue(r,t),u},getHostNode:function(t){return t.getHostNode()},unmountComponent:function(t,e){o.detachRefs(t,t._currentElement),t.unmountComponent(e)},receiveComponent:function(t,e,n,i){var a=t._currentElement;if(e!==a||i!==t._context){var u=o.shouldUpdateRefs(a,e);u&&o.detachRefs(t,a),t.receiveComponent(e,n,i),u&&t._currentElement&&null!=t._currentElement.ref&&n.getReactMountReady().enqueue(r,t)}},performUpdateIfNecessary:function(t,e,n){t._updateBatchNumber===n&&t.performUpdateIfNecessary(e)}});t.exports=i},function(t,e,n){"use strict";var r=n(5),o=n(264),i=n(68),a=n(269),u=n(265),s=n(266),c=n(23),l=n(268),p=n(270),f=n(273),h=(n(3),c.createElement),d=c.createFactory,v=c.cloneElement,y=r,m={Children:{map:o.map,forEach:o.forEach,count:o.count,toArray:o.toArray,only:f},Component:i,PureComponent:a,createElement:h,cloneElement:v,isValidElement:c.isValidElement,PropTypes:l,createClass:u.createClass,createFactory:d,createMixin:function(t){return t},DOM:s,version:p,__spread:y};t.exports=m},function(t,e,n){"use strict";function r(t){return void 0!==t.ref}function o(t){return void 0!==t.key}var i=n(5),a=n(14),u=(n(3),n(116),Object.prototype.hasOwnProperty),s=n(115),c={key:!0,ref:!0,__self:!0,__source:!0},l=function(t,e,n,r,o,i,a){var u={$$typeof:s,type:t,key:e,ref:n,props:a,_owner:i};return u};l.createElement=function(t,e,n){var i,s={},p=null,f=null;if(null!=e){r(e)&&(f=e.ref),o(e)&&(p=""+e.key),void 0===e.__self?null:e.__self,void 0===e.__source?null:e.__source;for(i in e)u.call(e,i)&&!c.hasOwnProperty(i)&&(s[i]=e[i])}var h=arguments.length-2;if(1===h)s.children=n;else if(h>1){for(var d=Array(h),v=0;v<h;v++)d[v]=arguments[v+2];s.children=d}if(t&&t.defaultProps){var y=t.defaultProps;for(i in y)void 0===s[i]&&(s[i]=y[i])}return l(t,p,f,0,0,a.current,s)},l.createFactory=function(t){var e=l.createElement.bind(null,t);return e.type=t,e},l.cloneAndReplaceKey=function(t,e){return l(t.type,e,t.ref,t._self,t._source,t._owner,t.props)},l.cloneElement=function(t,e,n){var s,p=i({},t.props),f=t.key,h=t.ref,d=(t._self,t._source,t._owner);if(null!=e){r(e)&&(h=e.ref,d=a.current),o(e)&&(f=""+e.key);var v;t.type&&t.type.defaultProps&&(v=t.type.defaultProps);for(s in e)u.call(e,s)&&!c.hasOwnProperty(s)&&(void 0===e[s]&&void 0!==v?p[s]=v[s]:p[s]=e[s])}var y=arguments.length-2;if(1===y)p.children=n;else if(y>1){for(var m=Array(y),g=0;g<y;g++)m[g]=arguments[g+2];p.children=m}return l(t.type,f,h,0,0,d,p)},l.isValidElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===s},t.exports=l},function(t,e,n){"use strict";function r(t){for(var e=arguments.length-1,n="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,r=0;r<e;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);n+=" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";var o=new Error(n);throw o.name="Invariant Violation",o.framesToPop=1,o}t.exports=r},function(t,e,n){"use strict";var r={};t.exports=r},function(t,e,n){"use strict";e.__esModule=!0;e.addLeadingSlash=function(t){return"/"===t.charAt(0)?t:"/"+t},e.stripLeadingSlash=function(t){return"/"===t.charAt(0)?t.substr(1):t},e.stripPrefix=function(t,e){return 0===t.indexOf(e)?t.substr(e.length):t},e.stripTrailingSlash=function(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t},e.parsePath=function(t){var e=t||"/",n="",r="",o=e.indexOf("#");-1!==o&&(r=e.substr(o),e=e.substr(0,o));var i=e.indexOf("?");return-1!==i&&(n=e.substr(i),e=e.substr(0,i)),e=decodeURI(e),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}},e.createPath=function(t){var e=t.pathname,n=t.search,r=t.hash,o=encodeURI(e||"/");return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}},function(t,e,n){"use strict";var r=function(t,e,n,r,o,i,a,u){if(!t){var s;if(void 0===e)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,i,a,u],l=0;s=new Error(e.replace(/%s/g,function(){return c[l++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}};t.exports=r},function(t,e,n){"use strict";function r(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}function o(t,e,n){switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!n.disabled||!r(e));default:return!1}}var i=n(4),a=n(51),u=n(52),s=n(56),c=n(100),l=n(101),p=(n(0),{}),f=null,h=function(t,e){t&&(u.executeDispatchesInOrder(t,e),t.isPersistent()||t.constructor.release(t))},d=function(t){return h(t,!0)},v=function(t){return h(t,!1)},y=function(t){return"."+t._rootNodeID},m={injection:{injectEventPluginOrder:a.injectEventPluginOrder,injectEventPluginsByName:a.injectEventPluginsByName},putListener:function(t,e,n){"function"!=typeof n&&i("94",e,typeof n);var r=y(t);(p[e]||(p[e]={}))[r]=n;var o=a.registrationNameModules[e];o&&o.didPutListener&&o.didPutListener(t,e,n)},getListener:function(t,e){var n=p[e];if(o(e,t._currentElement.type,t._currentElement.props))return null;var r=y(t);return n&&n[r]},deleteListener:function(t,e){var n=a.registrationNameModules[e];n&&n.willDeleteListener&&n.willDeleteListener(t,e);var r=p[e];if(r){delete r[y(t)]}},deleteAllListeners:function(t){var e=y(t);for(var n in p)if(p.hasOwnProperty(n)&&p[n][e]){var r=a.registrationNameModules[n];r&&r.willDeleteListener&&r.willDeleteListener(t,n),delete p[n][e]}},extractEvents:function(t,e,n,r){for(var o,i=a.plugins,u=0;u<i.length;u++){var s=i[u];if(s){var l=s.extractEvents(t,e,n,r);l&&(o=c(o,l))}}return o},enqueueEvents:function(t){t&&(f=c(f,t))},processEventQueue:function(t){var e=f;f=null,t?l(e,d):l(e,v),f&&i("95"),s.rethrowCaughtError()},__purge:function(){p={}},__getListenerBank:function(){return p}};t.exports=m},function(t,e,n){"use strict";function r(t,e,n){var r=e.dispatchConfig.phasedRegistrationNames[n];return m(t,r)}function o(t,e,n){var o=r(t,n,e);o&&(n._dispatchListeners=v(n._dispatchListeners,o),n._dispatchInstances=v(n._dispatchInstances,t))}function i(t){t&&t.dispatchConfig.phasedRegistrationNames&&d.traverseTwoPhase(t._targetInst,o,t)}function a(t){if(t&&t.dispatchConfig.phasedRegistrationNames){var e=t._targetInst,n=e?d.getParentInstance(e):null;d.traverseTwoPhase(n,o,t)}}function u(t,e,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=m(t,r);o&&(n._dispatchListeners=v(n._dispatchListeners,o),n._dispatchInstances=v(n._dispatchInstances,t))}}function s(t){t&&t.dispatchConfig.registrationName&&u(t._targetInst,null,t)}function c(t){y(t,i)}function l(t){y(t,a)}function p(t,e,n,r){d.traverseEnterLeave(n,r,u,t,e)}function f(t){y(t,s)}var h=n(28),d=n(52),v=n(100),y=n(101),m=(n(3),h.getListener),g={accumulateTwoPhaseDispatches:c,accumulateTwoPhaseDispatchesSkipTarget:l,accumulateDirectDispatches:f,accumulateEnterLeaveDispatches:p};t.exports=g},function(t,e,n){"use strict";var r={remove:function(t){t._reactInternalInstance=void 0},get:function(t){return t._reactInternalInstance},has:function(t){return void 0!==t._reactInternalInstance},set:function(t,e){t._reactInternalInstance=e}};t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(13),i=n(61),a={view:function(t){if(t.view)return t.view;var e=i(t);if(e.window===e)return e;var n=e.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(t){return t.detail||0}};o.augmentClass(r,a),t.exports=r},function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";function t(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function e(t){return i(t)?t:k(t)}function n(t){return a(t)?t:I(t)}function r(t){return u(t)?t:M(t)}function o(t){return i(t)&&!s(t)?t:D(t)}function i(t){return!(!t||!t[cn])}function a(t){return!(!t||!t[ln])}function u(t){return!(!t||!t[pn])}function s(t){return a(t)||u(t)}function c(t){return!(!t||!t[fn])}function l(t){return t.value=!1,t}function p(t){t&&(t.value=!0)}function f(){}function h(t,e){e=e||0;for(var n=Math.max(0,t.length-e),r=new Array(n),o=0;o<n;o++)r[o]=t[o+e];return r}function d(t){return void 0===t.size&&(t.size=t.__iterate(y)),t.size}function v(t,e){if("number"!=typeof e){var n=e>>>0;if(""+n!==e||4294967295===n)return NaN;e=n}return e<0?d(t)+e:e}function y(){return!0}function m(t,e,n){return(0===t||void 0!==n&&t<=-n)&&(void 0===e||void 0!==n&&e>=n)}function g(t,e){return b(t,e,0)}function _(t,e){return b(t,e,e)}function b(t,e,n){return void 0===t?n:t<0?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function w(t){this.next=t}function E(t,e,n,r){var o=0===t?e:1===t?n:[e,n];return r?r.value=o:r={value:o,done:!1},r}function C(){return{value:void 0,done:!0}}function x(t){return!!T(t)}function S(t){return t&&"function"==typeof t.next}function O(t){var e=T(t);return e&&e.call(t)}function T(t){var e=t&&(En&&t[En]||t[Cn]);if("function"==typeof e)return e}function P(t){return t&&"number"==typeof t.length}function k(t){return null===t||void 0===t?U():i(t)?t.toSeq():z(t)}function I(t){return null===t||void 0===t?U().toKeyedSeq():i(t)?a(t)?t.toSeq():t.fromEntrySeq():F(t)}function M(t){return null===t||void 0===t?U():i(t)?a(t)?t.entrySeq():t.toIndexedSeq():q(t)}function D(t){return(null===t||void 0===t?U():i(t)?a(t)?t.entrySeq():t:q(t)).toSetSeq()}function R(t){this._array=t,this.size=t.length}function A(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function N(t){this._iterable=t,this.size=t.length||t.size}function j(t){this._iterator=t,this._iteratorCache=[]}function L(t){return!(!t||!t[Sn])}function U(){return On||(On=new R([]))}function F(t){var e=Array.isArray(t)?new R(t).fromEntrySeq():S(t)?new j(t).fromEntrySeq():x(t)?new N(t).fromEntrySeq():"object"==typeof t?new A(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function q(t){var e=B(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function z(t){var e=B(t)||"object"==typeof t&&new A(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function B(t){return P(t)?new R(t):S(t)?new j(t):x(t)?new N(t):void 0}function H(t,e,n,r){var o=t._cache;if(o){for(var i=o.length-1,a=0;a<=i;a++){var u=o[n?i-a:a];if(!1===e(u[1],r?u[0]:a,t))return a+1}return a}return t.__iterateUncached(e,n)}function W(t,e,n,r){var o=t._cache;if(o){var i=o.length-1,a=0;return new w(function(){var t=o[n?i-a:a];return a++>i?C():E(e,r?t[0]:a-1,t[1])})}return t.__iteratorUncached(e,n)}function V(t,e){return e?K(e,t,"",{"":t}):Y(t)}function K(t,e,n,r){return Array.isArray(e)?t.call(r,n,M(e).map(function(n,r){return K(t,n,r,e)})):X(e)?t.call(r,n,I(e).map(function(n,r){return K(t,n,r,e)})):e}function Y(t){return Array.isArray(t)?M(t).map(Y).toList():X(t)?I(t).map(Y).toMap():t}function X(t){return t&&(t.constructor===Object||void 0===t.constructor)}function $(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return!("function"!=typeof t.equals||"function"!=typeof e.equals||!t.equals(e))}function G(t,e){if(t===e)return!0;if(!i(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||a(t)!==a(e)||u(t)!==u(e)||c(t)!==c(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!s(t);if(c(t)){var r=t.entries();return e.every(function(t,e){var o=r.next().value;return o&&$(o[1],t)&&(n||$(o[0],e))})&&r.next().done}var o=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{o=!0;var l=t;t=e,e=l}var p=!0,f=e.__iterate(function(e,r){if(n?!t.has(e):o?!$(e,t.get(r,yn)):!$(t.get(r,yn),e))return p=!1,!1});return p&&t.size===f}function Q(t,e){if(!(this instanceof Q))return new Q(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(Tn)return Tn;Tn=this}}function J(t,e){if(!t)throw new Error(e)}function Z(t,e,n){if(!(this instanceof Z))return new Z(t,e,n);if(J(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),n=void 0===n?1:Math.abs(n),e<t&&(n=-n),this._start=t,this._end=e,this._step=n,this.size=Math.max(0,Math.ceil((e-t)/n-1)+1),0===this.size){if(Pn)return Pn;Pn=this}}function tt(){throw TypeError("Abstract")}function et(){}function nt(){}function rt(){}function ot(t){return t>>>1&1073741824|3221225471&t}function it(t){if(!1===t||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(!1===(t=t.valueOf())||null===t||void 0===t))return 0;if(!0===t)return 1;var e=typeof t;if("number"===e){if(t!==t||t===1/0)return 0;var n=0|t;for(n!==t&&(n^=4294967295*t);t>4294967295;)t/=4294967295,n^=t;return ot(n)}if("string"===e)return t.length>jn?at(t):ut(t);if("function"==typeof t.hashCode)return t.hashCode();if("object"===e)return st(t);if("function"==typeof t.toString)return ut(t.toString());throw new Error("Value type "+e+" cannot be hashed.")}function at(t){var e=Fn[t];return void 0===e&&(e=ut(t),Un===Ln&&(Un=0,Fn={}),Un++,Fn[t]=e),e}function ut(t){for(var e=0,n=0;n<t.length;n++)e=31*e+t.charCodeAt(n)|0;return ot(e)}function st(t){var e;if(Rn&&void 0!==(e=kn.get(t)))return e;if(void 0!==(e=t[Nn]))return e;if(!Dn){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[Nn]))return e;if(void 0!==(e=ct(t)))return e}if(e=++An,1073741824&An&&(An=0),Rn)kn.set(t,e);else{if(void 0!==Mn&&!1===Mn(t))throw new Error("Non-extensible objects are not allowed as keys.");if(Dn)Object.defineProperty(t,Nn,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[Nn]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[Nn]=e}}return e}function ct(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function lt(t){J(t!==1/0,"Cannot perform this action with an infinite size.")}function pt(t){return null===t||void 0===t?Et():ft(t)&&!c(t)?t:Et().withMutations(function(e){var r=n(t);lt(r.size),r.forEach(function(t,n){return e.set(n,t)})})}function ft(t){return!(!t||!t[qn])}function ht(t,e){this.ownerID=t,this.entries=e}function dt(t,e,n){this.ownerID=t,this.bitmap=e,this.nodes=n}function vt(t,e,n){this.ownerID=t,this.count=e,this.nodes=n}function yt(t,e,n){this.ownerID=t,this.keyHash=e,this.entries=n}function mt(t,e,n){this.ownerID=t,this.keyHash=e,this.entry=n}function gt(t,e,n){this._type=e,this._reverse=n,this._stack=t._root&&bt(t._root)}function _t(t,e){return E(t,e[0],e[1])}function bt(t,e){return{node:t,index:0,__prev:e}}function wt(t,e,n,r){var o=Object.create(zn);return o.size=t,o._root=e,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Et(){return Bn||(Bn=wt(0))}function Ct(t,e,n){var r,o;if(t._root){var i=l(mn),a=l(gn);if(r=xt(t._root,t.__ownerID,0,void 0,e,n,i,a),!a.value)return t;o=t.size+(i.value?n===yn?-1:1:0)}else{if(n===yn)return t;o=1,r=new ht(t.__ownerID,[[e,n]])}return t.__ownerID?(t.size=o,t._root=r,t.__hash=void 0,t.__altered=!0,t):r?wt(o,r):Et()}function xt(t,e,n,r,o,i,a,u){return t?t.update(e,n,r,o,i,a,u):i===yn?t:(p(u),p(a),new mt(e,r,[o,i]))}function St(t){return t.constructor===mt||t.constructor===yt}function Ot(t,e,n,r,o){if(t.keyHash===r)return new yt(e,r,[t.entry,o]);var i,a=(0===n?t.keyHash:t.keyHash>>>n)&vn,u=(0===n?r:r>>>n)&vn;return new dt(e,1<<a|1<<u,a===u?[Ot(t,e,n+hn,r,o)]:(i=new mt(e,r,o),a<u?[t,i]:[i,t]))}function Tt(t,e,n,r){t||(t=new f);for(var o=new mt(t,it(n),[n,r]),i=0;i<e.length;i++){var a=e[i];o=o.update(t,0,void 0,a[0],a[1])}return o}function Pt(t,e,n,r){for(var o=0,i=0,a=new Array(n),u=0,s=1,c=e.length;u<c;u++,s<<=1){var l=e[u];void 0!==l&&u!==r&&(o|=s,a[i++]=l)}return new dt(t,o,a)}function kt(t,e,n,r,o){for(var i=0,a=new Array(dn),u=0;0!==n;u++,n>>>=1)a[u]=1&n?e[i++]:void 0;return a[r]=o,new vt(t,i+1,a)}function It(t,e,r){for(var o=[],a=0;a<r.length;a++){var u=r[a],s=n(u);i(u)||(s=s.map(function(t){return V(t)})),o.push(s)}return Rt(t,e,o)}function Mt(t,e,n){return t&&t.mergeDeep&&i(e)?t.mergeDeep(e):$(t,e)?t:e}function Dt(t){return function(e,n,r){if(e&&e.mergeDeepWith&&i(n))return e.mergeDeepWith(t,n);var o=t(e,n,r);return $(e,o)?e:o}}function Rt(t,e,n){return n=n.filter(function(t){return 0!==t.size}),0===n.length?t:0!==t.size||t.__ownerID||1!==n.length?t.withMutations(function(t){for(var r=e?function(n,r){t.update(r,yn,function(t){return t===yn?n:e(t,n,r)})}:function(e,n){t.set(n,e)},o=0;o<n.length;o++)n[o].forEach(r)}):t.constructor(n[0])}function At(t,e,n,r){var o=t===yn,i=e.next();if(i.done){var a=o?n:t,u=r(a);return u===a?t:u}J(o||t&&t.set,"invalid keyPath");var s=i.value,c=o?yn:t.get(s,yn),l=At(c,e,n,r);return l===c?t:l===yn?t.remove(s):(o?Et():t).set(s,l)}function Nt(t){return t-=t>>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function jt(t,e,n,r){var o=r?t:h(t);return o[e]=n,o}function Lt(t,e,n,r){var o=t.length+1;if(r&&e+1===o)return t[e]=n,t;for(var i=new Array(o),a=0,u=0;u<o;u++)u===e?(i[u]=n,a=-1):i[u]=t[u+a];return i}function Ut(t,e,n){var r=t.length-1;if(n&&e===r)return t.pop(),t;for(var o=new Array(r),i=0,a=0;a<r;a++)a===e&&(i=1),o[a]=t[a+i];return o}function Ft(t){var e=Wt();if(null===t||void 0===t)return e;if(qt(t))return t;var n=r(t),o=n.size;return 0===o?e:(lt(o),o>0&&o<dn?Ht(0,o,hn,null,new zt(n.toArray())):e.withMutations(function(t){t.setSize(o),n.forEach(function(e,n){return t.set(n,e)})}))}function qt(t){return!(!t||!t[Kn])}function zt(t,e){this.array=t,this.ownerID=e}function Bt(t,e){function n(t,e,n){return 0===e?r(t,n):o(t,e,n)}function r(t,n){var r=n===u?s&&s.array:t&&t.array,o=n>i?0:i-n,c=a-n;return c>dn&&(c=dn),function(){if(o===c)return $n;var t=e?--c:o++;return r&&r[t]}}function o(t,r,o){var u,s=t&&t.array,c=o>i?0:i-o>>r,l=1+(a-o>>r);return l>dn&&(l=dn),function(){for(;;){if(u){var t=u();if(t!==$n)return t;u=null}if(c===l)return $n;var i=e?--l:c++;u=n(s&&s[i],r-hn,o+(i<<r))}}}var i=t._origin,a=t._capacity,u=Qt(a),s=t._tail;return n(t._root,t._level,0)}function Ht(t,e,n,r,o,i,a){var u=Object.create(Yn);return u.size=e-t,u._origin=t,u._capacity=e,u._level=n,u._root=r,u._tail=o,u.__ownerID=i,u.__hash=a,u.__altered=!1,u}function Wt(){return Xn||(Xn=Ht(0,0,hn))}function Vt(t,e,n){if((e=v(t,e))!==e)return t;if(e>=t.size||e<0)return t.withMutations(function(t){e<0?$t(t,e).set(0,n):$t(t,0,e+1).set(e,n)});e+=t._origin;var r=t._tail,o=t._root,i=l(gn);return e>=Qt(t._capacity)?r=Kt(r,t.__ownerID,0,e,n,i):o=Kt(o,t.__ownerID,t._level,e,n,i),i.value?t.__ownerID?(t._root=o,t._tail=r,t.__hash=void 0,t.__altered=!0,t):Ht(t._origin,t._capacity,t._level,o,r):t}function Kt(t,e,n,r,o,i){var a=r>>>n&vn,u=t&&a<t.array.length;if(!u&&void 0===o)return t;var s;if(n>0){var c=t&&t.array[a],l=Kt(c,e,n-hn,r,o,i);return l===c?t:(s=Yt(t,e),s.array[a]=l,s)}return u&&t.array[a]===o?t:(p(i),s=Yt(t,e),void 0===o&&a===s.array.length-1?s.array.pop():s.array[a]=o,s)}function Yt(t,e){return e&&t&&e===t.ownerID?t:new zt(t?t.array.slice():[],e)}function Xt(t,e){if(e>=Qt(t._capacity))return t._tail;if(e<1<<t._level+hn){for(var n=t._root,r=t._level;n&&r>0;)n=n.array[e>>>r&vn],r-=hn;return n}}function $t(t,e,n){void 0!==e&&(e|=0),void 0!==n&&(n|=0);var r=t.__ownerID||new f,o=t._origin,i=t._capacity,a=o+e,u=void 0===n?i:n<0?i+n:o+n;if(a===o&&u===i)return t;if(a>=u)return t.clear();for(var s=t._level,c=t._root,l=0;a+l<0;)c=new zt(c&&c.array.length?[void 0,c]:[],r),s+=hn,l+=1<<s;l&&(a+=l,o+=l,u+=l,i+=l);for(var p=Qt(i),h=Qt(u);h>=1<<s+hn;)c=new zt(c&&c.array.length?[c]:[],r),s+=hn;var d=t._tail,v=h<p?Xt(t,u-1):h>p?new zt([],r):d;if(d&&h>p&&a<i&&d.array.length){c=Yt(c,r);for(var y=c,m=s;m>hn;m-=hn){var g=p>>>m&vn;y=y.array[g]=Yt(y.array[g],r)}y.array[p>>>hn&vn]=d}if(u<i&&(v=v&&v.removeAfter(r,0,u)),a>=h)a-=h,u-=h,s=hn,c=null,v=v&&v.removeBefore(r,0,a);else if(a>o||h<p){for(l=0;c;){var _=a>>>s&vn;if(_!==h>>>s&vn)break;_&&(l+=(1<<s)*_),s-=hn,c=c.array[_]}c&&a>o&&(c=c.removeBefore(r,s,a-l)),c&&h<p&&(c=c.removeAfter(r,s,h-l)),l&&(a-=l,u-=l)}return t.__ownerID?(t.size=u-a,t._origin=a,t._capacity=u,t._level=s,t._root=c,t._tail=v,t.__hash=void 0,t.__altered=!0,t):Ht(a,u,s,c,v)}function Gt(t,e,n){for(var o=[],a=0,u=0;u<n.length;u++){var s=n[u],c=r(s);c.size>a&&(a=c.size),i(s)||(c=c.map(function(t){return V(t)})),o.push(c)}return a>t.size&&(t=t.setSize(a)),Rt(t,e,o)}function Qt(t){return t<dn?0:t-1>>>hn<<hn}function Jt(t){return null===t||void 0===t?ee():Zt(t)?t:ee().withMutations(function(e){var r=n(t);lt(r.size),r.forEach(function(t,n){return e.set(n,t)})})}function Zt(t){return ft(t)&&c(t)}function te(t,e,n,r){var o=Object.create(Jt.prototype);return o.size=t?t.size:0,o._map=t,o._list=e,o.__ownerID=n,o.__hash=r,o}function ee(){return Gn||(Gn=te(Et(),Wt()))}function ne(t,e,n){var r,o,i=t._map,a=t._list,u=i.get(e),s=void 0!==u;if(n===yn){if(!s)return t;a.size>=dn&&a.size>=2*i.size?(o=a.filter(function(t,e){return void 0!==t&&u!==e}),r=o.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(r.__ownerID=o.__ownerID=t.__ownerID)):(r=i.remove(e),o=u===a.size-1?a.pop():a.set(u,void 0))}else if(s){if(n===a.get(u)[1])return t;r=i,o=a.set(u,[e,n])}else r=i.set(e,a.size),o=a.set(a.size,[e,n]);return t.__ownerID?(t.size=r.size,t._map=r,t._list=o,t.__hash=void 0,t):te(r,o)}function re(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function oe(t){this._iter=t,this.size=t.size}function ie(t){this._iter=t,this.size=t.size}function ae(t){this._iter=t,this.size=t.size}function ue(t){var e=Pe(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=ke,e.__iterateUncached=function(e,n){var r=this;return t.__iterate(function(t,n){return!1!==e(n,t,r)},n)},e.__iteratorUncached=function(e,n){if(e===wn){var r=t.__iterator(e,n);return new w(function(){var t=r.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===bn?_n:bn,n)},e}function se(t,e,n){var r=Pe(t);return r.size=t.size,r.has=function(e){return t.has(e)},r.get=function(r,o){var i=t.get(r,yn);return i===yn?o:e.call(n,i,r,t)},r.__iterateUncached=function(r,o){var i=this;return t.__iterate(function(t,o,a){return!1!==r(e.call(n,t,o,a),o,i)},o)},r.__iteratorUncached=function(r,o){var i=t.__iterator(wn,o);return new w(function(){var o=i.next();if(o.done)return o;var a=o.value,u=a[0];return E(r,u,e.call(n,a[1],u,t),o)})},r}function ce(t,e){var n=Pe(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=ue(t);return e.reverse=function(){return t.flip()},e}),n.get=function(n,r){return t.get(e?n:-1-n,r)},n.has=function(n){return t.has(e?n:-1-n)},n.includes=function(e){return t.includes(e)},n.cacheResult=ke,n.__iterate=function(e,n){var r=this;return t.__iterate(function(t,n){return e(t,n,r)},!n)},n.__iterator=function(e,n){return t.__iterator(e,!n)},n}function le(t,e,n,r){var o=Pe(t);return r&&(o.has=function(r){var o=t.get(r,yn);return o!==yn&&!!e.call(n,o,r,t)},o.get=function(r,o){var i=t.get(r,yn);return i!==yn&&e.call(n,i,r,t)?i:o}),o.__iterateUncached=function(o,i){var a=this,u=0;return t.__iterate(function(t,i,s){if(e.call(n,t,i,s))return u++,o(t,r?i:u-1,a)},i),u},o.__iteratorUncached=function(o,i){var a=t.__iterator(wn,i),u=0;return new w(function(){for(;;){var i=a.next();if(i.done)return i;var s=i.value,c=s[0],l=s[1];if(e.call(n,l,c,t))return E(o,r?c:u++,l,i)}})},o}function pe(t,e,n){var r=pt().asMutable();return t.__iterate(function(o,i){r.update(e.call(n,o,i,t),0,function(t){return t+1})}),r.asImmutable()}function fe(t,e,n){var r=a(t),o=(c(t)?Jt():pt()).asMutable();t.__iterate(function(i,a){o.update(e.call(n,i,a,t),function(t){return t=t||[],t.push(r?[a,i]:i),t})});var i=Te(t);return o.map(function(e){return xe(t,i(e))})}function he(t,e,n,r){var o=t.size;if(void 0!==e&&(e|=0),void 0!==n&&(n===1/0?n=o:n|=0),m(e,n,o))return t;var i=g(e,o),a=_(n,o);if(i!==i||a!==a)return he(t.toSeq().cacheResult(),e,n,r);var u,s=a-i;s===s&&(u=s<0?0:s);var c=Pe(t);return c.size=0===u?u:t.size&&u||void 0,!r&&L(t)&&u>=0&&(c.get=function(e,n){return e=v(this,e),e>=0&&e<u?t.get(e+i,n):n}),c.__iterateUncached=function(e,n){var o=this;if(0===u)return 0;if(n)return this.cacheResult().__iterate(e,n);var a=0,s=!0,c=0;return t.__iterate(function(t,n){if(!s||!(s=a++<i))return c++,!1!==e(t,r?n:c-1,o)&&c!==u}),c},c.__iteratorUncached=function(e,n){if(0!==u&&n)return this.cacheResult().__iterator(e,n);var o=0!==u&&t.__iterator(e,n),a=0,s=0;return new w(function(){for(;a++<i;)o.next();if(++s>u)return C();var t=o.next();return r||e===bn?t:e===_n?E(e,s-1,void 0,t):E(e,s-1,t.value[1],t)})},c}function de(t,e,n){var r=Pe(t);return r.__iterateUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterate(r,o);var a=0;return t.__iterate(function(t,o,u){return e.call(n,t,o,u)&&++a&&r(t,o,i)}),a},r.__iteratorUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterator(r,o);var a=t.__iterator(wn,o),u=!0;return new w(function(){if(!u)return C();var t=a.next();if(t.done)return t;var o=t.value,s=o[0],c=o[1];return e.call(n,c,s,i)?r===wn?t:E(r,s,c,t):(u=!1,C())})},r}function ve(t,e,n,r){var o=Pe(t);return o.__iterateUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterate(o,i);var u=!0,s=0;return t.__iterate(function(t,i,c){if(!u||!(u=e.call(n,t,i,c)))return s++,o(t,r?i:s-1,a)}),s},o.__iteratorUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterator(o,i);var u=t.__iterator(wn,i),s=!0,c=0;return new w(function(){var t,i,l;do{if(t=u.next(),t.done)return r||o===bn?t:o===_n?E(o,c++,void 0,t):E(o,c++,t.value[1],t);var p=t.value;i=p[0],l=p[1],s&&(s=e.call(n,l,i,a))}while(s);return o===wn?t:E(o,i,l,t)})},o}function ye(t,e){var r=a(t),o=[t].concat(e).map(function(t){return i(t)?r&&(t=n(t)):t=r?F(t):q(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===o.length)return t;if(1===o.length){var s=o[0];if(s===t||r&&a(s)||u(t)&&u(s))return s}var c=new R(o);return r?c=c.toKeyedSeq():u(t)||(c=c.toSetSeq()),c=c.flatten(!0),c.size=o.reduce(function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}},0),c}function me(t,e,n){var r=Pe(t);return r.__iterateUncached=function(r,o){function a(t,c){var l=this;t.__iterate(function(t,o){return(!e||c<e)&&i(t)?a(t,c+1):!1===r(t,n?o:u++,l)&&(s=!0),!s},o)}var u=0,s=!1;return a(t,0),u},r.__iteratorUncached=function(r,o){var a=t.__iterator(r,o),u=[],s=0;return new w(function(){for(;a;){var t=a.next();if(!1===t.done){var c=t.value;if(r===wn&&(c=c[1]),e&&!(u.length<e)||!i(c))return n?t:E(r,s++,c,t);u.push(a),a=c.__iterator(r,o)}else a=u.pop()}return C()})},r}function ge(t,e,n){var r=Te(t);return t.toSeq().map(function(o,i){return r(e.call(n,o,i,t))}).flatten(!0)}function _e(t,e){var n=Pe(t);return n.size=t.size&&2*t.size-1,n.__iterateUncached=function(n,r){var o=this,i=0;return t.__iterate(function(t,r){return(!i||!1!==n(e,i++,o))&&!1!==n(t,i++,o)},r),i},n.__iteratorUncached=function(n,r){var o,i=t.__iterator(bn,r),a=0;return new w(function(){return(!o||a%2)&&(o=i.next(),o.done)?o:a%2?E(n,a++,e):E(n,a++,o.value,o)})},n}function be(t,e,n){e||(e=Ie);var r=a(t),o=0,i=t.toSeq().map(function(e,r){return[r,e,o++,n?n(e,r,t):e]}).toArray();return i.sort(function(t,n){return e(t[3],n[3])||t[2]-n[2]}).forEach(r?function(t,e){i[e].length=2}:function(t,e){i[e]=t[1]}),r?I(i):u(t)?M(i):D(i)}function we(t,e,n){if(e||(e=Ie),n){var r=t.toSeq().map(function(e,r){return[e,n(e,r,t)]}).reduce(function(t,n){return Ee(e,t[1],n[1])?n:t});return r&&r[0]}return t.reduce(function(t,n){return Ee(e,t,n)?n:t})}function Ee(t,e,n){var r=t(n,e);return 0===r&&n!==e&&(void 0===n||null===n||n!==n)||r>0}function Ce(t,n,r){var o=Pe(t);return o.size=new R(r).map(function(t){return t.size}).min(),o.__iterate=function(t,e){for(var n,r=this.__iterator(bn,e),o=0;!(n=r.next()).done&&!1!==t(n.value,o++,this););return o},o.__iteratorUncached=function(t,o){var i=r.map(function(t){return t=e(t),O(o?t.reverse():t)}),a=0,u=!1;return new w(function(){var e;return u||(e=i.map(function(t){return t.next()}),u=e.some(function(t){return t.done})),u?C():E(t,a++,n.apply(null,e.map(function(t){return t.value})))})},o}function xe(t,e){return L(t)?e:t.constructor(e)}function Se(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Oe(t){return lt(t.size),d(t)}function Te(t){return a(t)?n:u(t)?r:o}function Pe(t){return Object.create((a(t)?I:u(t)?M:D).prototype)}function ke(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):k.prototype.cacheResult.call(this)}function Ie(t,e){return t>e?1:t<e?-1:0}function Me(t){var n=O(t);if(!n){if(!P(t))throw new TypeError("Expected iterable or array-like: "+t);n=O(e(t))}return n}function De(t,e){var n,r=function(i){if(i instanceof r)return i;if(!(this instanceof r))return new r(i);if(!n){n=!0;var a=Object.keys(t);Ne(o,a),o.size=a.length,o._name=e,o._keys=a,o._defaultValues=t}this._map=pt(i)},o=r.prototype=Object.create(Qn);return o.constructor=r,r}function Re(t,e,n){var r=Object.create(Object.getPrototypeOf(t));return r._map=e,r.__ownerID=n,r}function Ae(t){return t._name||t.constructor.name||"Record"}function Ne(t,e){try{e.forEach(je.bind(void 0,t))}catch(t){}}function je(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){J(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}function Le(t){return null===t||void 0===t?ze():Ue(t)&&!c(t)?t:ze().withMutations(function(e){var n=o(t);lt(n.size),n.forEach(function(t){return e.add(t)})})}function Ue(t){return!(!t||!t[Jn])}function Fe(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function qe(t,e){var n=Object.create(Zn);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function ze(){return tr||(tr=qe(Et()))}function Be(t){return null===t||void 0===t?Ve():He(t)?t:Ve().withMutations(function(e){var n=o(t);lt(n.size),n.forEach(function(t){return e.add(t)})})}function He(t){return Ue(t)&&c(t)}function We(t,e){var n=Object.create(er);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function Ve(){return nr||(nr=We(ee()))}function Ke(t){return null===t||void 0===t?$e():Ye(t)?t:$e().unshiftAll(t)}function Ye(t){return!(!t||!t[rr])}function Xe(t,e,n,r){var o=Object.create(or);return o.size=t,o._head=e,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function $e(){return ir||(ir=Xe(0))}function Ge(t,e){var n=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}function Qe(t,e){return e}function Je(t,e){return[e,t]}function Ze(t){return function(){return!t.apply(this,arguments)}}function tn(t){return function(){return-t.apply(this,arguments)}}function en(t){return"string"==typeof t?JSON.stringify(t):String(t)}function nn(){return h(arguments)}function rn(t,e){return t<e?1:t>e?-1:0}function on(t){if(t.size===1/0)return 0;var e=c(t),n=a(t),r=e?1:0;return an(t.__iterate(n?e?function(t,e){r=31*r+un(it(t),it(e))|0}:function(t,e){r=r+un(it(t),it(e))|0}:e?function(t){r=31*r+it(t)|0}:function(t){r=r+it(t)|0}),r)}function an(t,e){return e=In(e,3432918353),e=In(e<<15|e>>>-15,461845907),e=In(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=In(e^e>>>16,2246822507),e=In(e^e>>>13,3266489909),e=ot(e^e>>>16)}function un(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var sn=Array.prototype.slice;t(n,e),t(r,e),t(o,e),e.isIterable=i,e.isKeyed=a,e.isIndexed=u,e.isAssociative=s,e.isOrdered=c,e.Keyed=n,e.Indexed=r,e.Set=o;var cn="@@__IMMUTABLE_ITERABLE__@@",ln="@@__IMMUTABLE_KEYED__@@",pn="@@__IMMUTABLE_INDEXED__@@",fn="@@__IMMUTABLE_ORDERED__@@",hn=5,dn=1<<hn,vn=dn-1,yn={},mn={value:!1},gn={value:!1},_n=0,bn=1,wn=2,En="function"==typeof Symbol&&Symbol.iterator,Cn="@@iterator",xn=En||Cn;w.prototype.toString=function(){return"[Iterator]"},w.KEYS=_n,w.VALUES=bn,w.ENTRIES=wn,w.prototype.inspect=w.prototype.toSource=function(){return this.toString()},w.prototype[xn]=function(){return this},t(k,e),k.of=function(){return k(arguments)},k.prototype.toSeq=function(){return this},k.prototype.toString=function(){return this.__toString("Seq {","}")},k.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},k.prototype.__iterate=function(t,e){return H(this,t,e,!0)},k.prototype.__iterator=function(t,e){return W(this,t,e,!0)},t(I,k),I.prototype.toKeyedSeq=function(){return this},t(M,k),M.of=function(){return M(arguments)},M.prototype.toIndexedSeq=function(){return this},M.prototype.toString=function(){return this.__toString("Seq [","]")},M.prototype.__iterate=function(t,e){return H(this,t,e,!1)},M.prototype.__iterator=function(t,e){return W(this,t,e,!1)},t(D,k),D.of=function(){return D(arguments)},D.prototype.toSetSeq=function(){return this},k.isSeq=L,k.Keyed=I,k.Set=D,k.Indexed=M;var Sn="@@__IMMUTABLE_SEQ__@@";k.prototype[Sn]=!0,t(R,M),R.prototype.get=function(t,e){return this.has(t)?this._array[v(this,t)]:e},R.prototype.__iterate=function(t,e){for(var n=this._array,r=n.length-1,o=0;o<=r;o++)if(!1===t(n[e?r-o:o],o,this))return o+1;return o},R.prototype.__iterator=function(t,e){var n=this._array,r=n.length-1,o=0;return new w(function(){return o>r?C():E(t,o,n[e?r-o++:o++])})},t(A,I),A.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},A.prototype.has=function(t){return this._object.hasOwnProperty(t)},A.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,o=r.length-1,i=0;i<=o;i++){var a=r[e?o-i:i];if(!1===t(n[a],a,this))return i+1}return i},A.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,o=r.length-1,i=0;return new w(function(){var a=r[e?o-i:i];return i++>o?C():E(t,a,n[a])})},A.prototype[fn]=!0,t(N,M),N.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=this._iterable,r=O(n),o=0;if(S(r))for(var i;!(i=r.next()).done&&!1!==t(i.value,o++,this););return o},N.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._iterable,r=O(n);if(!S(r))return new w(C);var o=0;return new w(function(){var e=r.next();return e.done?e:E(t,o++,e.value)})},t(j,M),j.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var n=this._iterator,r=this._iteratorCache,o=0;o<r.length;)if(!1===t(r[o],o++,this))return o;for(var i;!(i=n.next()).done;){var a=i.value;if(r[o]=a,!1===t(a,o++,this))break}return o},j.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._iterator,r=this._iteratorCache,o=0;return new w(function(){if(o>=r.length){var e=n.next();if(e.done)return e;r[o]=e.value}return E(t,o,r[o++])})};var On;t(Q,M),Q.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Q.prototype.get=function(t,e){return this.has(t)?this._value:e},Q.prototype.includes=function(t){return $(this._value,t)},Q.prototype.slice=function(t,e){var n=this.size;return m(t,e,n)?this:new Q(this._value,_(e,n)-g(t,n))},Q.prototype.reverse=function(){return this},Q.prototype.indexOf=function(t){return $(this._value,t)?0:-1},Q.prototype.lastIndexOf=function(t){return $(this._value,t)?this.size:-1},Q.prototype.__iterate=function(t,e){for(var n=0;n<this.size;n++)if(!1===t(this._value,n,this))return n+1;return n},Q.prototype.__iterator=function(t,e){var n=this,r=0;return new w(function(){return r<n.size?E(t,r++,n._value):C()})},Q.prototype.equals=function(t){return t instanceof Q?$(this._value,t._value):G(t)};var Tn;t(Z,M),Z.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},Z.prototype.get=function(t,e){return this.has(t)?this._start+v(this,t)*this._step:e},Z.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e<this.size&&e===Math.floor(e)},Z.prototype.slice=function(t,e){return m(t,e,this.size)?this:(t=g(t,this.size),e=_(e,this.size),e<=t?new Z(0,0):new Z(this.get(t,this._end),this.get(e,this._end),this._step))},Z.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step==0){var n=e/this._step;if(n>=0&&n<this.size)return n}return-1},Z.prototype.lastIndexOf=function(t){return this.indexOf(t)},Z.prototype.__iterate=function(t,e){for(var n=this.size-1,r=this._step,o=e?this._start+n*r:this._start,i=0;i<=n;i++){if(!1===t(o,i,this))return i+1;o+=e?-r:r}return i},Z.prototype.__iterator=function(t,e){var n=this.size-1,r=this._step,o=e?this._start+n*r:this._start,i=0;return new w(function(){var a=o;return o+=e?-r:r,i>n?C():E(t,i++,a)})},Z.prototype.equals=function(t){return t instanceof Z?this._start===t._start&&this._end===t._end&&this._step===t._step:G(this,t)};var Pn;t(tt,e),t(et,tt),t(nt,tt),t(rt,tt),tt.Keyed=et,tt.Indexed=nt,tt.Set=rt;var kn,In="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t|=0,e|=0;var n=65535&t,r=65535&e;return n*r+((t>>>16)*r+n*(e>>>16)<<16>>>0)|0},Mn=Object.isExtensible,Dn=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),Rn="function"==typeof WeakMap;Rn&&(kn=new WeakMap);var An=0,Nn="__immutablehash__";"function"==typeof Symbol&&(Nn=Symbol(Nn));var jn=16,Ln=255,Un=0,Fn={};t(pt,et),pt.of=function(){var t=sn.call(arguments,0);return Et().withMutations(function(e){for(var n=0;n<t.length;n+=2){if(n+1>=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}})},pt.prototype.toString=function(){return this.__toString("Map {","}")},pt.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},pt.prototype.set=function(t,e){return Ct(this,t,e)},pt.prototype.setIn=function(t,e){return this.updateIn(t,yn,function(){return e})},pt.prototype.remove=function(t){return Ct(this,t,yn)},pt.prototype.deleteIn=function(t){return this.updateIn(t,function(){return yn})},pt.prototype.update=function(t,e,n){return 1===arguments.length?t(this):this.updateIn([t],e,n)},pt.prototype.updateIn=function(t,e,n){n||(n=e,e=void 0);var r=At(this,Me(t),e,n);return r===yn?void 0:r},pt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Et()},pt.prototype.merge=function(){return It(this,void 0,arguments)},pt.prototype.mergeWith=function(t){return It(this,t,sn.call(arguments,1))},pt.prototype.mergeIn=function(t){var e=sn.call(arguments,1);return this.updateIn(t,Et(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},pt.prototype.mergeDeep=function(){return It(this,Mt,arguments)},pt.prototype.mergeDeepWith=function(t){var e=sn.call(arguments,1);return It(this,Dt(t),e)},pt.prototype.mergeDeepIn=function(t){var e=sn.call(arguments,1);return this.updateIn(t,Et(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},pt.prototype.sort=function(t){return Jt(be(this,t))},pt.prototype.sortBy=function(t,e){return Jt(be(this,e,t))},pt.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},pt.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new f)},pt.prototype.asImmutable=function(){return this.__ensureOwner()},pt.prototype.wasAltered=function(){return this.__altered},pt.prototype.__iterator=function(t,e){return new gt(this,t,e)},pt.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate(function(e){return r++,t(e[1],e[0],n)},e),r},pt.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?wt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},pt.isMap=ft;var qn="@@__IMMUTABLE_MAP__@@",zn=pt.prototype;zn[qn]=!0,zn.delete=zn.remove,zn.removeIn=zn.deleteIn,ht.prototype.get=function(t,e,n,r){for(var o=this.entries,i=0,a=o.length;i<a;i++)if($(n,o[i][0]))return o[i][1];return r},ht.prototype.update=function(t,e,n,r,o,i,a){for(var u=o===yn,s=this.entries,c=0,l=s.length;c<l&&!$(r,s[c][0]);c++);var f=c<l;if(f?s[c][1]===o:u)return this;if(p(a),(u||!f)&&p(i),!u||1!==s.length){if(!f&&!u&&s.length>=Hn)return Tt(t,s,r,o);var d=t&&t===this.ownerID,v=d?s:h(s);return f?u?c===l-1?v.pop():v[c]=v.pop():v[c]=[r,o]:v.push([r,o]),d?(this.entries=v,this):new ht(t,v)}},dt.prototype.get=function(t,e,n,r){void 0===e&&(e=it(n));var o=1<<((0===t?e:e>>>t)&vn),i=this.bitmap;return 0==(i&o)?r:this.nodes[Nt(i&o-1)].get(t+hn,e,n,r)},dt.prototype.update=function(t,e,n,r,o,i,a){void 0===n&&(n=it(r));var u=(0===e?n:n>>>e)&vn,s=1<<u,c=this.bitmap,l=0!=(c&s);if(!l&&o===yn)return this;var p=Nt(c&s-1),f=this.nodes,h=l?f[p]:void 0,d=xt(h,t,e+hn,n,r,o,i,a);if(d===h)return this;if(!l&&d&&f.length>=Wn)return kt(t,f,c,u,d);if(l&&!d&&2===f.length&&St(f[1^p]))return f[1^p];if(l&&d&&1===f.length&&St(d))return d;var v=t&&t===this.ownerID,y=l?d?c:c^s:c|s,m=l?d?jt(f,p,d,v):Ut(f,p,v):Lt(f,p,d,v);return v?(this.bitmap=y,this.nodes=m,this):new dt(t,y,m)},vt.prototype.get=function(t,e,n,r){void 0===e&&(e=it(n));var o=(0===t?e:e>>>t)&vn,i=this.nodes[o];return i?i.get(t+hn,e,n,r):r},vt.prototype.update=function(t,e,n,r,o,i,a){void 0===n&&(n=it(r));var u=(0===e?n:n>>>e)&vn,s=o===yn,c=this.nodes,l=c[u];if(s&&!l)return this;var p=xt(l,t,e+hn,n,r,o,i,a);if(p===l)return this;var f=this.count;if(l){if(!p&&--f<Vn)return Pt(t,c,f,u)}else f++;var h=t&&t===this.ownerID,d=jt(c,u,p,h);return h?(this.count=f,this.nodes=d,this):new vt(t,f,d)},yt.prototype.get=function(t,e,n,r){for(var o=this.entries,i=0,a=o.length;i<a;i++)if($(n,o[i][0]))return o[i][1];return r},yt.prototype.update=function(t,e,n,r,o,i,a){void 0===n&&(n=it(r));var u=o===yn;if(n!==this.keyHash)return u?this:(p(a),p(i),Ot(this,t,e,n,[r,o]));for(var s=this.entries,c=0,l=s.length;c<l&&!$(r,s[c][0]);c++);var f=c<l;if(f?s[c][1]===o:u)return this;if(p(a),(u||!f)&&p(i),u&&2===l)return new mt(t,this.keyHash,s[1^c]);var d=t&&t===this.ownerID,v=d?s:h(s);return f?u?c===l-1?v.pop():v[c]=v.pop():v[c]=[r,o]:v.push([r,o]),d?(this.entries=v,this):new yt(t,this.keyHash,v)},mt.prototype.get=function(t,e,n,r){return $(n,this.entry[0])?this.entry[1]:r},mt.prototype.update=function(t,e,n,r,o,i,a){var u=o===yn,s=$(r,this.entry[0]);return(s?o===this.entry[1]:u)?this:(p(a),u?void p(i):s?t&&t===this.ownerID?(this.entry[1]=o,this):new mt(t,this.keyHash,[r,o]):(p(i),Ot(this,t,e,it(r),[r,o])))},ht.prototype.iterate=yt.prototype.iterate=function(t,e){for(var n=this.entries,r=0,o=n.length-1;r<=o;r++)if(!1===t(n[e?o-r:r]))return!1},dt.prototype.iterate=vt.prototype.iterate=function(t,e){for(var n=this.nodes,r=0,o=n.length-1;r<=o;r++){var i=n[e?o-r:r];if(i&&!1===i.iterate(t,e))return!1}},mt.prototype.iterate=function(t,e){return t(this.entry)},t(gt,w),gt.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var n,r=e.node,o=e.index++;if(r.entry){if(0===o)return _t(t,r.entry)}else if(r.entries){if(n=r.entries.length-1,o<=n)return _t(t,r.entries[this._reverse?n-o:o])}else if(n=r.nodes.length-1,o<=n){var i=r.nodes[this._reverse?n-o:o];if(i){if(i.entry)return _t(t,i.entry);e=this._stack=bt(i,e)}continue}e=this._stack=this._stack.__prev}return C()};var Bn,Hn=dn/4,Wn=dn/2,Vn=dn/4;t(Ft,nt),Ft.of=function(){return this(arguments)},Ft.prototype.toString=function(){return this.__toString("List [","]")},Ft.prototype.get=function(t,e){if((t=v(this,t))>=0&&t<this.size){t+=this._origin;var n=Xt(this,t);return n&&n.array[t&vn]}return e},Ft.prototype.set=function(t,e){return Vt(this,t,e)},Ft.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},Ft.prototype.insert=function(t,e){return this.splice(t,0,e)},Ft.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=hn,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Wt()},Ft.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations(function(n){$t(n,0,e+t.length);for(var r=0;r<t.length;r++)n.set(e+r,t[r])})},Ft.prototype.pop=function(){return $t(this,0,-1)},Ft.prototype.unshift=function(){var t=arguments;return this.withMutations(function(e){$t(e,-t.length);for(var n=0;n<t.length;n++)e.set(n,t[n])})},Ft.prototype.shift=function(){return $t(this,1)},Ft.prototype.merge=function(){return Gt(this,void 0,arguments)},Ft.prototype.mergeWith=function(t){return Gt(this,t,sn.call(arguments,1))},Ft.prototype.mergeDeep=function(){return Gt(this,Mt,arguments)},Ft.prototype.mergeDeepWith=function(t){var e=sn.call(arguments,1);return Gt(this,Dt(t),e)},Ft.prototype.setSize=function(t){return $t(this,0,t)},Ft.prototype.slice=function(t,e){var n=this.size;return m(t,e,n)?this:$t(this,g(t,n),_(e,n))},Ft.prototype.__iterator=function(t,e){var n=0,r=Bt(this,e);return new w(function(){var e=r();return e===$n?C():E(t,n++,e)})},Ft.prototype.__iterate=function(t,e){for(var n,r=0,o=Bt(this,e);(n=o())!==$n&&!1!==t(n,r++,this););return r},Ft.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Ht(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):(this.__ownerID=t,this)},Ft.isList=qt;var Kn="@@__IMMUTABLE_LIST__@@",Yn=Ft.prototype;Yn[Kn]=!0,Yn.delete=Yn.remove,Yn.setIn=zn.setIn,Yn.deleteIn=Yn.removeIn=zn.removeIn,Yn.update=zn.update,Yn.updateIn=zn.updateIn,Yn.mergeIn=zn.mergeIn,Yn.mergeDeepIn=zn.mergeDeepIn,Yn.withMutations=zn.withMutations,Yn.asMutable=zn.asMutable,Yn.asImmutable=zn.asImmutable,Yn.wasAltered=zn.wasAltered,zt.prototype.removeBefore=function(t,e,n){if(n===e?1<<e:0===this.array.length)return this;var r=n>>>e&vn;if(r>=this.array.length)return new zt([],t);var o,i=0===r;if(e>0){var a=this.array[r];if((o=a&&a.removeBefore(t,e-hn,n))===a&&i)return this}if(i&&!o)return this;var u=Yt(this,t);if(!i)for(var s=0;s<r;s++)u.array[s]=void 0;return o&&(u.array[r]=o),u},zt.prototype.removeAfter=function(t,e,n){if(n===(e?1<<e:0)||0===this.array.length)return this;var r=n-1>>>e&vn;if(r>=this.array.length)return this;var o;if(e>0){var i=this.array[r];if((o=i&&i.removeAfter(t,e-hn,n))===i&&r===this.array.length-1)return this}var a=Yt(this,t);return a.array.splice(r+1),o&&(a.array[r]=o),a};var Xn,$n={};t(Jt,pt),Jt.of=function(){return this(arguments)},Jt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Jt.prototype.get=function(t,e){var n=this._map.get(t);return void 0!==n?this._list.get(n)[1]:e},Jt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):ee()},Jt.prototype.set=function(t,e){return ne(this,t,e)},Jt.prototype.remove=function(t){return ne(this,t,yn)},Jt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Jt.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],n)},e)},Jt.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},Jt.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),n=this._list.__ensureOwner(t);return t?te(e,n,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=n,this)},Jt.isOrderedMap=Zt,Jt.prototype[fn]=!0,Jt.prototype.delete=Jt.prototype.remove;var Gn;t(re,I),re.prototype.get=function(t,e){return this._iter.get(t,e)},re.prototype.has=function(t){return this._iter.has(t)},re.prototype.valueSeq=function(){return this._iter.valueSeq()},re.prototype.reverse=function(){var t=this,e=ce(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},re.prototype.map=function(t,e){var n=this,r=se(this,t,e);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(t,e)}),r},re.prototype.__iterate=function(t,e){var n,r=this;return this._iter.__iterate(this._useKeys?function(e,n){return t(e,n,r)}:(n=e?Oe(this):0,function(o){return t(o,e?--n:n++,r)}),e)},re.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var n=this._iter.__iterator(bn,e),r=e?Oe(this):0;return new w(function(){var o=n.next();return o.done?o:E(t,e?--r:r++,o.value,o)})},re.prototype[fn]=!0,t(oe,M),oe.prototype.includes=function(t){return this._iter.includes(t)},oe.prototype.__iterate=function(t,e){var n=this,r=0;return this._iter.__iterate(function(e){return t(e,r++,n)},e)},oe.prototype.__iterator=function(t,e){var n=this._iter.__iterator(bn,e),r=0;return new w(function(){var e=n.next();return e.done?e:E(t,r++,e.value,e)})},t(ie,D),ie.prototype.has=function(t){return this._iter.includes(t)},ie.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){return t(e,e,n)},e)},ie.prototype.__iterator=function(t,e){var n=this._iter.__iterator(bn,e);return new w(function(){var e=n.next();return e.done?e:E(t,e.value,e.value,e)})},t(ae,I),ae.prototype.entrySeq=function(){return this._iter.toSeq()},ae.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){if(e){Se(e);var r=i(e);return t(r?e.get(1):e[1],r?e.get(0):e[0],n)}},e)},ae.prototype.__iterator=function(t,e){var n=this._iter.__iterator(bn,e);return new w(function(){for(;;){var e=n.next();if(e.done)return e;var r=e.value;if(r){Se(r);var o=i(r);return E(t,o?r.get(0):r[0],o?r.get(1):r[1],e)}}})},oe.prototype.cacheResult=re.prototype.cacheResult=ie.prototype.cacheResult=ae.prototype.cacheResult=ke,t(De,et),De.prototype.toString=function(){return this.__toString(Ae(this)+" {","}")},De.prototype.has=function(t){return this._defaultValues.hasOwnProperty(t)},De.prototype.get=function(t,e){if(!this.has(t))return e;var n=this._defaultValues[t];return this._map?this._map.get(t,n):n},De.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=this.constructor;return t._empty||(t._empty=Re(this,Et()))},De.prototype.set=function(t,e){if(!this.has(t))throw new Error('Cannot set unknown key "'+t+'" on '+Ae(this));if(this._map&&!this._map.has(t)){if(e===this._defaultValues[t])return this}var n=this._map&&this._map.set(t,e);return this.__ownerID||n===this._map?this:Re(this,n)},De.prototype.remove=function(t){if(!this.has(t))return this;var e=this._map&&this._map.remove(t);return this.__ownerID||e===this._map?this:Re(this,e)},De.prototype.wasAltered=function(){return this._map.wasAltered()},De.prototype.__iterator=function(t,e){var r=this;return n(this._defaultValues).map(function(t,e){return r.get(e)}).__iterator(t,e)},De.prototype.__iterate=function(t,e){var r=this;return n(this._defaultValues).map(function(t,e){return r.get(e)}).__iterate(t,e)},De.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?Re(this,e,t):(this.__ownerID=t,this._map=e,this)};var Qn=De.prototype;Qn.delete=Qn.remove,Qn.deleteIn=Qn.removeIn=zn.removeIn,Qn.merge=zn.merge,Qn.mergeWith=zn.mergeWith,Qn.mergeIn=zn.mergeIn,Qn.mergeDeep=zn.mergeDeep,Qn.mergeDeepWith=zn.mergeDeepWith,Qn.mergeDeepIn=zn.mergeDeepIn,Qn.setIn=zn.setIn,Qn.update=zn.update,Qn.updateIn=zn.updateIn,Qn.withMutations=zn.withMutations,Qn.asMutable=zn.asMutable,Qn.asImmutable=zn.asImmutable,t(Le,rt),Le.of=function(){return this(arguments)},Le.fromKeys=function(t){return this(n(t).keySeq())},Le.prototype.toString=function(){return this.__toString("Set {","}")},Le.prototype.has=function(t){return this._map.has(t)},Le.prototype.add=function(t){return Fe(this,this._map.set(t,!0))},Le.prototype.remove=function(t){return Fe(this,this._map.remove(t))},Le.prototype.clear=function(){return Fe(this,this._map.clear())},Le.prototype.union=function(){var t=sn.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var n=0;n<t.length;n++)o(t[n]).forEach(function(t){return e.add(t)})}):this.constructor(t[0])},Le.prototype.intersect=function(){var t=sn.call(arguments,0);if(0===t.length)return this;t=t.map(function(t){return o(t)});var e=this;return this.withMutations(function(n){e.forEach(function(e){t.every(function(t){return t.includes(e)})||n.remove(e)})})},Le.prototype.subtract=function(){var t=sn.call(arguments,0);if(0===t.length)return this;t=t.map(function(t){return o(t)});var e=this;return this.withMutations(function(n){e.forEach(function(e){t.some(function(t){return t.includes(e)})&&n.remove(e)})})},Le.prototype.merge=function(){return this.union.apply(this,arguments)},Le.prototype.mergeWith=function(t){var e=sn.call(arguments,1);return this.union.apply(this,e)},Le.prototype.sort=function(t){return Be(be(this,t))},Le.prototype.sortBy=function(t,e){return Be(be(this,e,t))},Le.prototype.wasAltered=function(){return this._map.wasAltered()},Le.prototype.__iterate=function(t,e){var n=this;return this._map.__iterate(function(e,r){return t(r,r,n)},e)},Le.prototype.__iterator=function(t,e){return this._map.map(function(t,e){return e}).__iterator(t,e)},Le.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):(this.__ownerID=t,this._map=e,this)},Le.isSet=Ue;var Jn="@@__IMMUTABLE_SET__@@",Zn=Le.prototype;Zn[Jn]=!0,Zn.delete=Zn.remove,Zn.mergeDeep=Zn.merge,Zn.mergeDeepWith=Zn.mergeWith,Zn.withMutations=zn.withMutations,Zn.asMutable=zn.asMutable,Zn.asImmutable=zn.asImmutable,Zn.__empty=ze,Zn.__make=qe;var tr;t(Be,Le),Be.of=function(){return this(arguments)},Be.fromKeys=function(t){return this(n(t).keySeq())},Be.prototype.toString=function(){return this.__toString("OrderedSet {","}")},Be.isOrderedSet=He;var er=Be.prototype;er[fn]=!0,er.__empty=Ve,er.__make=We;var nr;t(Ke,nt),Ke.of=function(){return this(arguments)},Ke.prototype.toString=function(){return this.__toString("Stack [","]")},Ke.prototype.get=function(t,e){var n=this._head;for(t=v(this,t);n&&t--;)n=n.next;return n?n.value:e},Ke.prototype.peek=function(){return this._head&&this._head.value},Ke.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,n=arguments.length-1;n>=0;n--)e={value:arguments[n],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):Xe(t,e)},Ke.prototype.pushAll=function(t){if(t=r(t),0===t.size)return this;lt(t.size);var e=this.size,n=this._head;return t.reverse().forEach(function(t){e++,n={value:t,next:n}}),this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):Xe(e,n)},Ke.prototype.pop=function(){return this.slice(1)},Ke.prototype.unshift=function(){return this.push.apply(this,arguments)},Ke.prototype.unshiftAll=function(t){return this.pushAll(t)},Ke.prototype.shift=function(){return this.pop.apply(this,arguments)},Ke.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):$e()},Ke.prototype.slice=function(t,e){if(m(t,e,this.size))return this;var n=g(t,this.size);if(_(e,this.size)!==this.size)return nt.prototype.slice.call(this,t,e);for(var r=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=r,this._head=o,this.__hash=void 0,this.__altered=!0,this):Xe(r,o)},Ke.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Xe(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Ke.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var n=0,r=this._head;r&&!1!==t(r.value,n++,this);)r=r.next;return n},Ke.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var n=0,r=this._head;return new w(function(){if(r){var e=r.value;return r=r.next,E(t,n++,e)}return C()})},Ke.isStack=Ye;var rr="@@__IMMUTABLE_STACK__@@",or=Ke.prototype;or[rr]=!0,or.withMutations=zn.withMutations,or.asMutable=zn.asMutable,or.asImmutable=zn.asImmutable,or.wasAltered=zn.wasAltered;var ir;e.Iterator=w,Ge(e,{toArray:function(){lt(this.size);var t=new Array(this.size||0);return this.valueSeq().__iterate(function(e,n){t[n]=e}),t},toIndexedSeq:function(){return new oe(this)},toJS:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJS?t.toJS():t}).__toJS()},toJSON:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJSON?t.toJSON():t}).__toJS()},toKeyedSeq:function(){return new re(this,!0)},toMap:function(){return pt(this.toKeyedSeq())},toObject:function(){lt(this.size);var t={};return this.__iterate(function(e,n){t[n]=e}),t},toOrderedMap:function(){return Jt(this.toKeyedSeq())},toOrderedSet:function(){return Be(a(this)?this.valueSeq():this)},toSet:function(){return Le(a(this)?this.valueSeq():this)},toSetSeq:function(){return new ie(this)},toSeq:function(){return u(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Ke(a(this)?this.valueSeq():this)},toList:function(){return Ft(a(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){return xe(this,ye(this,sn.call(arguments,0)))},includes:function(t){return this.some(function(e){return $(e,t)})},entries:function(){return this.__iterator(wn)},every:function(t,e){lt(this.size);var n=!0;return this.__iterate(function(r,o,i){if(!t.call(e,r,o,i))return n=!1,!1}),n},filter:function(t,e){return xe(this,le(this,t,e,!0))},find:function(t,e,n){var r=this.findEntry(t,e);return r?r[1]:n},forEach:function(t,e){return lt(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){lt(this.size),t=void 0!==t?""+t:",";var e="",n=!0;return this.__iterate(function(r){n?n=!1:e+=t,e+=null!==r&&void 0!==r?r.toString():""}),e},keys:function(){return this.__iterator(_n)},map:function(t,e){return xe(this,se(this,t,e))},reduce:function(t,e,n){lt(this.size);var r,o;return arguments.length<2?o=!0:r=e,this.__iterate(function(e,i,a){o?(o=!1,r=e):r=t.call(n,r,e,i,a)}),r},reduceRight:function(t,e,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return xe(this,ce(this,!0))},slice:function(t,e){return xe(this,he(this,t,e,!0))},some:function(t,e){return!this.every(Ze(t),e)},sort:function(t){return xe(this,be(this,t))},values:function(){return this.__iterator(bn)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(t,e){return d(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return pe(this,t,e)},equals:function(t){return G(this,t)},entrySeq:function(){var t=this;if(t._cache)return new R(t._cache);var e=t.toSeq().map(Je).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(Ze(t),e)},findEntry:function(t,e,n){var r=n;return this.__iterate(function(n,o,i){if(t.call(e,n,o,i))return r=[o,n],!1}),r},findKey:function(t,e){var n=this.findEntry(t,e);return n&&n[0]},findLast:function(t,e,n){return this.toKeyedSeq().reverse().find(t,e,n)},findLastEntry:function(t,e,n){return this.toKeyedSeq().reverse().findEntry(t,e,n)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(){return this.find(y)},flatMap:function(t,e){return xe(this,ge(this,t,e))},flatten:function(t){return xe(this,me(this,t,!0))},fromEntrySeq:function(){return new ae(this)},get:function(t,e){return this.find(function(e,n){return $(n,t)},void 0,e)},getIn:function(t,e){for(var n,r=this,o=Me(t);!(n=o.next()).done;){var i=n.value;if((r=r&&r.get?r.get(i,yn):yn)===yn)return e}return r},groupBy:function(t,e){return fe(this,t,e)},has:function(t){return this.get(t,yn)!==yn},hasIn:function(t){return this.getIn(t,yn)!==yn},isSubset:function(t){return t="function"==typeof t.includes?t:e(t),this.every(function(e){return t.includes(e)})},isSuperset:function(t){return t="function"==typeof t.isSubset?t:e(t),t.isSubset(this)},keyOf:function(t){return this.findKey(function(e){return $(e,t)})},keySeq:function(){return this.toSeq().map(Qe).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return we(this,t)},maxBy:function(t,e){return we(this,e,t)},min:function(t){return we(this,t?tn(t):rn)},minBy:function(t,e){return we(this,e?tn(e):rn,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return xe(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return xe(this,ve(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(Ze(t),e)},sortBy:function(t,e){return xe(this,be(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return xe(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return xe(this,de(this,t,e))},takeUntil:function(t,e){return this.takeWhile(Ze(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=on(this))}});var ar=e.prototype;ar[cn]=!0,ar[xn]=ar.values,ar.__toJS=ar.toArray,ar.__toStringMapper=en,ar.inspect=ar.toSource=function(){return this.toString()},ar.chain=ar.flatMap,ar.contains=ar.includes,Ge(n,{flip:function(){return xe(this,ue(this))},mapEntries:function(t,e){var n=this,r=0;return xe(this,this.toSeq().map(function(o,i){return t.call(e,[i,o],r++,n)}).fromEntrySeq())},mapKeys:function(t,e){var n=this;return xe(this,this.toSeq().flip().map(function(r,o){return t.call(e,r,o,n)}).flip())}});var ur=n.prototype;return ur[ln]=!0,ur[xn]=ar.entries,ur.__toJS=ar.toObject,ur.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+en(t)},Ge(r,{toKeyedSeq:function(){return new re(this,!1)},filter:function(t,e){return xe(this,le(this,t,e,!1))},findIndex:function(t,e){var n=this.findEntry(t,e);return n?n[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return xe(this,ce(this,!1))},slice:function(t,e){return xe(this,he(this,t,e,!1))},splice:function(t,e){var n=arguments.length;if(e=Math.max(0|e,0),0===n||2===n&&!e)return this;t=g(t,t<0?this.count():this.size);var r=this.slice(0,t);return xe(this,1===n?r:r.concat(h(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var n=this.findLastEntry(t,e);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(t){return xe(this,me(this,t,!1))},get:function(t,e){return t=v(this,t),t<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,n){return n===t},void 0,e)},has:function(t){return(t=v(this,t))>=0&&(void 0!==this.size?this.size===1/0||t<this.size:-1!==this.indexOf(t))},interpose:function(t){return xe(this,_e(this,t))},interleave:function(){var t=[this].concat(h(arguments)),e=Ce(this.toSeq(),M.of,t),n=e.flatten(!0);return e.size&&(n.size=e.size*t.length),xe(this,n)},keySeq:function(){return Z(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(t,e){return xe(this,ve(this,t,e,!1))},zip:function(){return xe(this,Ce(this,nn,[this].concat(h(arguments))))},zipWith:function(t){var e=h(arguments);return e[0]=this,xe(this,Ce(this,t,e))}}),r.prototype[pn]=!0,r.prototype[fn]=!0,Ge(o,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),o.prototype.has=ar.includes,o.prototype.contains=o.prototype.includes,Ge(I,n.prototype),Ge(M,r.prototype),Ge(D,o.prototype),Ge(et,n.prototype),Ge(nt,r.prototype),Ge(rt,o.prototype),{Iterable:e,Seq:k,Collection:tt,Map:pt,OrderedMap:Jt,List:Ft,Stack:Ke,Set:Le,OrderedSet:Be,Record:De,Range:Z,Repeat:Q,is:$,fromJS:V}})},function(t,e,n){function r(){}function o(t){if(!v(t))return t;var e=[];for(var n in t)i(e,n,t[n]);return e.join("&")}function i(t,e,n){if(null!=n)if(Array.isArray(n))n.forEach(function(n){i(t,e,n)});else if(v(n))for(var r in n)i(t,e+"["+r+"]",n[r]);else t.push(encodeURIComponent(e)+"="+encodeURIComponent(n));else null===n&&t.push(encodeURIComponent(e))}function a(t){for(var e,n,r={},o=t.split("&"),i=0,a=o.length;i<a;++i)e=o[i],n=e.indexOf("="),-1==n?r[decodeURIComponent(e)]="":r[decodeURIComponent(e.slice(0,n))]=decodeURIComponent(e.slice(n+1));return r}function u(t){var e,n,r,o,i=t.split(/\r?\n/),a={};i.pop();for(var u=0,s=i.length;u<s;++u)n=i[u],e=n.indexOf(":"),r=n.slice(0,e).toLowerCase(),o=b(n.slice(e+1)),a[r]=o;return a}function s(t){return/[\/+]json\b/.test(t)}function c(t){this.req=t,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var e=this.xhr.status;1223===e&&(e=204),this._setStatusProperties(e),this.header=this.headers=u(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&t._responseType?this.body=this.xhr.response:this.body="HEAD"!=this.req.method?this._parseBody(this.text?this.text:this.xhr.response):null}function l(t,e){var n=this;this._query=this._query||[],this.method=t,this.url=e,this.header={},this._header={},this.on("end",function(){var t=null,e=null;try{e=new c(n)}catch(e){return t=new Error("Parser is unable to parse the response"),t.parse=!0,t.original=e,n.xhr?(t.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,t.status=n.xhr.status?n.xhr.status:null,t.statusCode=t.status):(t.rawResponse=null,t.status=null),n.callback(t)}n.emit("response",e);var r;try{n._isResponseOK(e)||(r=new Error(e.statusText||"Unsuccessful HTTP response"),r.original=t,r.response=e,r.status=e.status)}catch(t){r=t}r?n.callback(r,e):n.callback(null,e)})}function p(t,e,n){var r=_("DELETE",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r}var f;"undefined"!=typeof window?f=window:"undefined"!=typeof self?f=self:(console.warn("Using browser-only version of superagent in non-browser environment"),f=this);var h=n(141),d=n(281),v=n(70),y=n(280),m=n(282),g=n(283),_=e=t.exports=function(t,n){return"function"==typeof n?new e.Request("GET",t).end(n):1==arguments.length?new e.Request("GET",t):new e.Request(t,n)};e.Request=l,_.getXHR=function(){if(!(!f.XMLHttpRequest||f.location&&"file:"==f.location.protocol&&f.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){}throw Error("Browser-only verison of superagent could not find XHR")};var b="".trim?function(t){return t.trim()}:function(t){return t.replace(/(^\s*|\s*$)/g,"")};_.serializeObject=o,_.parseString=a,_.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},_.serialize={"application/x-www-form-urlencoded":o,"application/json":JSON.stringify},_.parse={"application/x-www-form-urlencoded":a,"application/json":JSON.parse},m(c.prototype),c.prototype._parseBody=function(t){var e=_.parse[this.type];return this.req._parser?this.req._parser(this,t):(!e&&s(this.type)&&(e=_.parse["application/json"]),e&&t&&(t.length||t instanceof Object)?e(t):null)},c.prototype.toError=function(){var t=this.req,e=t.method,n=t.url,r="cannot "+e+" "+n+" ("+this.status+")",o=new Error(r);return o.status=this.status,o.method=e,o.url=n,o},_.Response=c,h(l.prototype),d(l.prototype),l.prototype.type=function(t){return this.set("Content-Type",_.types[t]||t),this},l.prototype.accept=function(t){return this.set("Accept",_.types[t]||t),this},l.prototype.auth=function(t,e,n){switch("object"==typeof e&&null!==e&&(n=e),n||(n={type:"function"==typeof btoa?"basic":"auto"}),n.type){case"basic":this.set("Authorization","Basic "+btoa(t+":"+e));break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization","Bearer "+t)}return this},l.prototype.query=function(t){return"string"!=typeof t&&(t=o(t)),t&&this._query.push(t),this},l.prototype.attach=function(t,e,n){if(e){if(this._data)throw Error("superagent can't mix .send() and .attach()");this._getFormData().append(t,e,n||e.name)}return this},l.prototype._getFormData=function(){return this._formData||(this._formData=new f.FormData),this._formData},l.prototype.callback=function(t,e){if(this._maxRetries&&this._retries++<this._maxRetries&&g(t,e))return this._retry();var n=this._callback;this.clearTimeout(),t&&(this._maxRetries&&(t.retries=this._retries-1),this.emit("error",t)),n(t,e)},l.prototype.crossDomainError=function(){var t=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");t.crossDomain=!0,t.status=this.status,t.method=this.method,t.url=this.url,this.callback(t)},l.prototype.buffer=l.prototype.ca=l.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},l.prototype.pipe=l.prototype.write=function(){throw Error("Streaming is not supported in browser version of superagent")},l.prototype._appendQueryString=function(){var t=this._query.join("&");if(t&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+t),this._sort){var e=this.url.indexOf("?");if(e>=0){var n=this.url.substring(e+1).split("&");y(this._sort)?n.sort(this._sort):n.sort(),this.url=this.url.substring(0,e)+"?"+n.join("&")}}},l.prototype._isHost=function(t){return t&&"object"==typeof t&&!Array.isArray(t)&&"[object Object]"!==Object.prototype.toString.call(t)},l.prototype.end=function(t){return this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=t||r,this._appendQueryString(),this._end()},l.prototype._end=function(){var t=this,e=this.xhr=_.getXHR(),n=this._formData||this._data;this._setTimeouts(),e.onreadystatechange=function(){var n=e.readyState;if(n>=2&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4==n){var r;try{r=e.status}catch(t){r=0}if(!r){if(t.timedout||t._aborted)return;return t.crossDomainError()}t.emit("end")}};var r=function(e,n){n.total>0&&(n.percent=n.loaded/n.total*100),n.direction=e,t.emit("progress",n)};if(this.hasListeners("progress"))try{e.onprogress=r.bind(null,"download"),e.upload&&(e.upload.onprogress=r.bind(null,"upload"))}catch(t){}try{this.username&&this.password?e.open(this.method,this.url,!0,this.username,this.password):e.open(this.method,this.url,!0)}catch(t){return this.callback(t)}if(this._withCredentials&&(e.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof n&&!this._isHost(n)){var o=this._header["content-type"],i=this._serializer||_.serialize[o?o.split(";")[0]:""];!i&&s(o)&&(i=_.serialize["application/json"]),i&&(n=i(n))}for(var a in this.header)null!=this.header[a]&&this.header.hasOwnProperty(a)&&e.setRequestHeader(a,this.header[a]);return this._responseType&&(e.responseType=this._responseType),this.emit("request",this),e.send(void 0!==n?n:null),this},_.get=function(t,e,n){var r=_("GET",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},_.head=function(t,e,n){var r=_("HEAD",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},_.options=function(t,e,n){var r=_("OPTIONS",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},_.del=p,_.delete=p,_.patch=function(t,e,n){var r=_("PATCH",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},_.post=function(t,e,n){var r=_("POST",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},_.put=function(t,e,n){var r=_("PUT",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r}},function(t,e,n){"use strict";function r(t){return Object.prototype.hasOwnProperty.call(t,v)||(t[v]=h++,p[t[v]]={}),p[t[v]]}var o,i=n(5),a=n(51),u=n(200),s=n(99),c=n(232),l=n(62),p={},f=!1,h=0,d={topAbort:"abort",topAnimationEnd:c("animationend")||"animationend",topAnimationIteration:c("animationiteration")||"animationiteration",topAnimationStart:c("animationstart")||"animationstart",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:c("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},v="_reactListenersID"+String(Math.random()).slice(2),y=i({},u,{ReactEventListener:null,injection:{injectReactEventListener:function(t){t.setHandleTopLevel(y.handleTopLevel),y.ReactEventListener=t}},setEnabled:function(t){y.ReactEventListener&&y.ReactEventListener.setEnabled(t)},isEnabled:function(){return!(!y.ReactEventListener||!y.ReactEventListener.isEnabled())},listenTo:function(t,e){for(var n=e,o=r(n),i=a.registrationNameDependencies[t],u=0;u<i.length;u++){var s=i[u];o.hasOwnProperty(s)&&o[s]||("topWheel"===s?l("wheel")?y.ReactEventListener.trapBubbledEvent("topWheel","wheel",n):l("mousewheel")?y.ReactEventListener.trapBubbledEvent("topWheel","mousewheel",n):y.ReactEventListener.trapBubbledEvent("topWheel","DOMMouseScroll",n):"topScroll"===s?l("scroll",!0)?y.ReactEventListener.trapCapturedEvent("topScroll","scroll",n):y.ReactEventListener.trapBubbledEvent("topScroll","scroll",y.ReactEventListener.WINDOW_HANDLE):"topFocus"===s||"topBlur"===s?(l("focus",!0)?(y.ReactEventListener.trapCapturedEvent("topFocus","focus",n),y.ReactEventListener.trapCapturedEvent("topBlur","blur",n)):l("focusin")&&(y.ReactEventListener.trapBubbledEvent("topFocus","focusin",n),y.ReactEventListener.trapBubbledEvent("topBlur","focusout",n)),o.topBlur=!0,o.topFocus=!0):d.hasOwnProperty(s)&&y.ReactEventListener.trapBubbledEvent(s,d[s],n),o[s]=!0)}},trapBubbledEvent:function(t,e,n){return y.ReactEventListener.trapBubbledEvent(t,e,n)},trapCapturedEvent:function(t,e,n){return y.ReactEventListener.trapCapturedEvent(t,e,n)},supportsEventPageXY:function(){if(!document.createEvent)return!1;var t=document.createEvent("MouseEvent");return null!=t&&"pageX"in t},ensureScrollValueMonitoring:function(){if(void 0===o&&(o=y.supportsEventPageXY()),!o&&!f){var t=s.refreshScrollValues;y.ReactEventListener.monitorScrollValue(t),f=!0}}});t.exports=y},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(31),i=n(99),a=n(60),u={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:a,button:function(t){var e=t.button;return"which"in t?e:2===e?2:4===e?1:0},buttons:null,relatedTarget:function(t){return t.relatedTarget||(t.fromElement===t.srcElement?t.toElement:t.fromElement)},pageX:function(t){return"pageX"in t?t.pageX:t.clientX+i.currentScrollLeft},pageY:function(t){return"pageY"in t?t.pageY:t.clientY+i.currentScrollTop}};o.augmentClass(r,u),t.exports=r},function(t,e,n){"use strict";var r=n(4),o=(n(0),{}),i={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(t,e,n,o,i,a,u,s){this.isInTransaction()&&r("27");var c,l;try{this._isInTransaction=!0,c=!0,this.initializeAll(0),l=t.call(e,n,o,i,a,u,s),c=!1}finally{try{if(c)try{this.closeAll(0)}catch(t){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return l},initializeAll:function(t){for(var e=this.transactionWrappers,n=t;n<e.length;n++){var r=e[n];try{this.wrapperInitData[n]=o,this.wrapperInitData[n]=r.initialize?r.initialize.call(this):null}finally{if(this.wrapperInitData[n]===o)try{this.initializeAll(n+1)}catch(t){}}}},closeAll:function(t){this.isInTransaction()||r("28");for(var e=this.transactionWrappers,n=t;n<e.length;n++){var i,a=e[n],u=this.wrapperInitData[n];try{i=!0,u!==o&&a.close&&a.close.call(this,u),i=!1}finally{if(i)try{this.closeAll(n+1)}catch(t){}}}this.wrapperInitData.length=0}};t.exports=i},function(t,e,n){"use strict";function r(t){var e=""+t,n=i.exec(e);if(!n)return e;var r,o="",a=0,u=0;for(a=n.index;a<e.length;a++){switch(e.charCodeAt(a)){case 34:r=""";break;case 38:r="&";break;case 39:r="'";break;case 60:r="<";break;case 62:r=">";break;default:continue}u!==a&&(o+=e.substring(u,a)),u=a+1,o+=r}return u!==a?o+e.substring(u,a):o}function o(t){return"boolean"==typeof t||"number"==typeof t?""+t:r(t)}var i=/["'&<>]/;t.exports=o},function(t,e,n){"use strict";var r,o=n(7),i=n(50),a=/^[ \r\n\t\f]/,u=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,s=n(58),c=s(function(t,e){if(t.namespaceURI!==i.svg||"innerHTML"in t)t.innerHTML=e;else{r=r||document.createElement("div"),r.innerHTML="<svg>"+e+"</svg>";for(var n=r.firstChild;n.firstChild;)t.appendChild(n.firstChild)}});if(o.canUseDOM){var l=document.createElement("div");l.innerHTML=" ",""===l.innerHTML&&(c=function(t,e){if(t.parentNode&&t.parentNode.replaceChild(t,t),a.test(e)||"<"===e[0]&&u.test(e)){t.innerHTML=String.fromCharCode(65279)+e;var n=t.firstChild;1===n.data.length?t.removeChild(n):n.deleteData(0,1)}else t.innerHTML=e}),l=null}t.exports=c},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";t.exports=n(185)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(118),o=n(277),i=n(276),a=n(275),u=n(117);n(119);n.d(e,"createStore",function(){return r.a}),n.d(e,"combineReducers",function(){return o.a}),n.d(e,"bindActionCreators",function(){return i.a}),n.d(e,"applyMiddleware",function(){return a.a}),n.d(e,"compose",function(){return u.a})},function(t,e,n){(function(e){!function(n){function r(){}function o(t,e){return function(){t.apply(e,arguments)}}function i(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],p(t,this)}function a(t,e){for(;3===t._state;)t=t._value;if(0===t._state)return void t._deferreds.push(e);t._handled=!0,i._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._state?u:s)(e.promise,t._value);var r;try{r=n(t._value)}catch(t){return void s(e.promise,t)}u(e.promise,r)})}function u(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof i)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void p(o(n,e),t)}t._state=1,t._value=e,c(t)}catch(e){s(t,e)}}function s(t,e){t._state=2,t._value=e,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&i._immediateFn(function(){t._handled||i._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e<n;e++)a(t,t._deferreds[e]);t._deferreds=null}function l(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function p(t,e){var n=!1;try{t(function(t){n||(n=!0,u(e,t))},function(t){n||(n=!0,s(e,t))})}catch(t){if(n)return;n=!0,s(e,t)}}var f=setTimeout;i.prototype.catch=function(t){return this.then(null,t)},i.prototype.then=function(t,e){var n=new this.constructor(r);return a(this,new l(t,e,n)),n},i.all=function(t){var e=Array.prototype.slice.call(t);return new i(function(t,n){function r(i,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var u=a.then;if("function"==typeof u)return void u.call(a,function(t){r(i,t)},n)}e[i]=a,0==--o&&t(e)}catch(t){n(t)}}if(0===e.length)return t([]);for(var o=e.length,i=0;i<e.length;i++)r(i,e[i])})},i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i(function(e){e(t)})},i.reject=function(t){return new i(function(e,n){n(t)})},i.race=function(t){return new i(function(e,n){for(var r=0,o=t.length;r<o;r++)t[r].then(e,n)})},i._immediateFn="function"==typeof e&&function(t){e(t)}||function(t){f(t,0)},i._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},i._setImmediateFn=function(t){i._immediateFn=t},i._setUnhandledRejectionFn=function(t){i._unhandledRejectionFn=t},void 0!==t&&t.exports?t.exports=i:n.Promise||(n.Promise=i)}(this)}).call(e,n(288).setImmediate)},,function(t,e,n){"use strict";function r(t,e){return t===e?0!==t||0!==e||1/t==1/e:t!==t&&e!==e}function o(t,e){if(r(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(var a=0;a<n.length;a++)if(!i.call(e,n[a])||!r(t[n[a]],e[n[a]]))return!1;return!0}var i=Object.prototype.hasOwnProperty;t.exports=o},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.locationsAreEqual=e.createLocation=void 0;var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=n(278),a=r(i),u=n(289),s=r(u),c=n(26);e.createLocation=function(t,e,n,r){var i=void 0;return"string"==typeof t?(i=(0,c.parsePath)(t),i.state=e):(i=o({},t),void 0===i.pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==e&&void 0===i.state&&(i.state=e)),i.key=n,r&&(i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=(0,a.default)(i.pathname,r.pathname)):i.pathname=r.pathname),i},e.locationsAreEqual=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&(0,s.default)(t.state,e.state)}},function(t,e,n){"use strict";e.__esModule=!0;var r=n(17),o=function(t){return t&&t.__esModule?t:{default:t}}(r),i=function(){var t=null,e=function(e){return(0,o.default)(null==t,"A history supports only one prompt at a time"),t=e,function(){t===e&&(t=null)}},n=function(e,n,r,i){if(null!=t){var a="function"==typeof t?t(e,n):t;"string"==typeof a?"function"==typeof r?r(a,i):((0,o.default)(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),i(!0)):i(!1!==a)}else i(!0)},r=[];return{setPrompt:e,confirmTransitionTo:n,appendListener:function(t){var e=!0,n=function(){e&&t.apply(void 0,arguments)};return r.push(n),function(){e=!1,r=r.filter(function(t){return t!==n})}},notifyListeners:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];r.forEach(function(t){return t.apply(void 0,e)})}}};e.default=i},function(t,e,n){"use strict";function r(t){if(!n.i(a.a)(t)||n.i(o.a)(t)!=u)return!1;var e=n.i(i.a)(t);if(null===e)return!0;var r=p.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&l.call(r)==f}var o=n(157),i=n(159),a=n(164),u="[object Object]",s=Function.prototype,c=Object.prototype,l=s.toString,p=c.hasOwnProperty,f=l.call(Object);e.a=r},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(t){if(l===setTimeout)return setTimeout(t,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function i(t){if(p===clearTimeout)return clearTimeout(t);if((p===r||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(t);try{return p(t)}catch(e){try{return p.call(null,t)}catch(e){return p.call(this,t)}}}function a(){v&&h&&(v=!1,h.length?d=h.concat(d):y=-1,d.length&&u())}function u(){if(!v){var t=o(a);v=!0;for(var e=d.length;e;){for(h=d,d=[];++y<e;)h&&h[y].run();y=-1,e=d.length}h=null,v=!1,i(t)}}function s(t,e){this.fun=t,this.array=e}function c(){}var l,p,f=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(t){l=n}try{p="function"==typeof clearTimeout?clearTimeout:r}catch(t){p=r}}();var h,d=[],v=!1,y=-1;f.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];d.push(new s(t,e)),1!==d.length||v||o(u)},s.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=c,f.addListener=c,f.once=c,f.off=c,f.removeListener=c,f.removeAllListeners=c,f.emit=c,f.prependListener=c,f.prependOnceListener=c,f.listeners=function(t){return[]},f.binding=function(t){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(t){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(t,e,n){"use strict";function r(t,e){return Array.isArray(e)&&(e=e[1]),e?e.nextSibling:t.firstChild}function o(t,e,n){l.insertTreeBefore(t,e,n)}function i(t,e,n){Array.isArray(e)?u(t,e[0],e[1],n):v(t,e,n)}function a(t,e){if(Array.isArray(e)){var n=e[1];e=e[0],s(t,e,n),t.removeChild(n)}t.removeChild(e)}function u(t,e,n,r){for(var o=e;;){var i=o.nextSibling;if(v(t,o,r),o===n)break;o=i}}function s(t,e,n){for(;;){var r=e.nextSibling;if(r===n)break;t.removeChild(r)}}function c(t,e,n){var r=t.parentNode,o=t.nextSibling;o===e?n&&v(r,document.createTextNode(n),o):n?(d(o,n),s(r,o,e)):s(r,t,e)}var l=n(19),p=n(177),f=(n(6),n(10),n(58)),h=n(38),d=n(106),v=f(function(t,e,n){t.insertBefore(e,n)}),y=p.dangerouslyReplaceNodeWithMarkup,m={dangerouslyReplaceNodeWithMarkup:y,replaceDelimitedText:c,processUpdates:function(t,e){for(var n=0;n<e.length;n++){var u=e[n];switch(u.type){case"INSERT_MARKUP":o(t,u.content,r(t,u.afterNode));break;case"MOVE_EXISTING":i(t,u.fromNode,r(t,u.afterNode));break;case"SET_MARKUP":h(t,u.content);break;case"TEXT_CONTENT":d(t,u.content);break;case"REMOVE_NODE":a(t,u.fromNode)}}}};t.exports=m},function(t,e,n){"use strict";var r={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};t.exports=r},function(t,e,n){"use strict";function r(){if(u)for(var t in s){var e=s[t],n=u.indexOf(t);if(n>-1||a("96",t),!c.plugins[n]){e.extractEvents||a("97",t),c.plugins[n]=e;var r=e.eventTypes;for(var i in r)o(r[i],e,i)||a("98",i,t)}}}function o(t,e,n){c.eventNameDispatchConfigs.hasOwnProperty(n)&&a("99",n),c.eventNameDispatchConfigs[n]=t;var r=t.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var u=r[o];i(u,e,n)}return!0}return!!t.registrationName&&(i(t.registrationName,e,n),!0)}function i(t,e,n){c.registrationNameModules[t]&&a("100",t),c.registrationNameModules[t]=e,c.registrationNameDependencies[t]=e.eventTypes[n].dependencies}var a=n(4),u=(n(0),null),s={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(t){u&&a("101"),u=Array.prototype.slice.call(t),r()},injectEventPluginsByName:function(t){var e=!1;for(var n in t)if(t.hasOwnProperty(n)){var o=t[n];s.hasOwnProperty(n)&&s[n]===o||(s[n]&&a("102",n),s[n]=o,e=!0)}e&&r()},getPluginModuleForEvent:function(t){var e=t.dispatchConfig;if(e.registrationName)return c.registrationNameModules[e.registrationName]||null;if(void 0!==e.phasedRegistrationNames){var n=e.phasedRegistrationNames;for(var r in n)if(n.hasOwnProperty(r)){var o=c.registrationNameModules[n[r]];if(o)return o}}return null},_resetEventPlugins:function(){u=null;for(var t in s)s.hasOwnProperty(t)&&delete s[t];c.plugins.length=0;var e=c.eventNameDispatchConfigs;for(var n in e)e.hasOwnProperty(n)&&delete e[n];var r=c.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};t.exports=c},function(t,e,n){"use strict";function r(t){return"topMouseUp"===t||"topTouchEnd"===t||"topTouchCancel"===t}function o(t){return"topMouseMove"===t||"topTouchMove"===t}function i(t){return"topMouseDown"===t||"topTouchStart"===t}function a(t,e,n,r){var o=t.type||"unknown-event";t.currentTarget=m.getNodeFromInstance(r),e?v.invokeGuardedCallbackWithCatch(o,n,t):v.invokeGuardedCallback(o,n,t),t.currentTarget=null}function u(t,e){var n=t._dispatchListeners,r=t._dispatchInstances;if(Array.isArray(n))for(var o=0;o<n.length&&!t.isPropagationStopped();o++)a(t,e,n[o],r[o]);else n&&a(t,e,n,r);t._dispatchListeners=null,t._dispatchInstances=null}function s(t){var e=t._dispatchListeners,n=t._dispatchInstances;if(Array.isArray(e)){for(var r=0;r<e.length&&!t.isPropagationStopped();r++)if(e[r](t,n[r]))return n[r]}else if(e&&e(t,n))return n;return null}function c(t){var e=s(t);return t._dispatchInstances=null,t._dispatchListeners=null,e}function l(t){var e=t._dispatchListeners,n=t._dispatchInstances;Array.isArray(e)&&d("103"),t.currentTarget=e?m.getNodeFromInstance(n):null;var r=e?e(t):null;return t.currentTarget=null,t._dispatchListeners=null,t._dispatchInstances=null,r}function p(t){return!!t._dispatchListeners}var f,h,d=n(4),v=n(56),y=(n(0),n(3),{injectComponentTree:function(t){f=t},injectTreeTraversal:function(t){h=t}}),m={isEndish:r,isMoveish:o,isStartish:i,executeDirectDispatch:l,executeDispatchesInOrder:u,executeDispatchesInOrderStopAtTrue:c,hasDispatches:p,getInstanceFromNode:function(t){return f.getInstanceFromNode(t)},getNodeFromInstance:function(t){return f.getNodeFromInstance(t)},isAncestor:function(t,e){return h.isAncestor(t,e)},getLowestCommonAncestor:function(t,e){return h.getLowestCommonAncestor(t,e)},getParentInstance:function(t){return h.getParentInstance(t)},traverseTwoPhase:function(t,e,n){return h.traverseTwoPhase(t,e,n)},traverseEnterLeave:function(t,e,n,r,o){return h.traverseEnterLeave(t,e,n,r,o)},injection:y};t.exports=m},function(t,e,n){"use strict";function r(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,function(t){return e[t]})}function o(t){var e={"=0":"=","=2":":"};return(""+("."===t[0]&&"$"===t[1]?t.substring(2):t.substring(1))).replace(/(=0|=2)/g,function(t){return e[t]})}var i={escape:r,unescape:o};t.exports=i},function(t,e,n){"use strict";function r(t){null!=t.checkedLink&&null!=t.valueLink&&u("87")}function o(t){r(t),(null!=t.value||null!=t.onChange)&&u("88")}function i(t){r(t),(null!=t.checked||null!=t.onChange)&&u("89")}function a(t){if(t){var e=t.getName();if(e)return" Check the render method of `"+e+"`."}return""}var u=n(4),s=n(206),c=n(87),l=n(22),p=c(l.isValidElement),f=(n(0),n(3),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0}),h={value:function(t,e,n){return!t[e]||f[t.type]||t.onChange||t.readOnly||t.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(t,e,n){return!t[e]||t.onChange||t.readOnly||t.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:p.func},d={},v={checkPropTypes:function(t,e,n){for(var r in h){if(h.hasOwnProperty(r))var o=h[r](e,r,t,"prop",null,s);if(o instanceof Error&&!(o.message in d)){d[o.message]=!0;a(n)}}},getValue:function(t){return t.valueLink?(o(t),t.valueLink.value):t.value},getChecked:function(t){return t.checkedLink?(i(t),t.checkedLink.value):t.checked},executeOnChange:function(t,e){return t.valueLink?(o(t),t.valueLink.requestChange(e.target.value)):t.checkedLink?(i(t),t.checkedLink.requestChange(e.target.checked)):t.onChange?t.onChange.call(void 0,e):void 0}};t.exports=v},function(t,e,n){"use strict";var r=n(4),o=(n(0),!1),i={replaceNodeWithMarkup:null,processChildrenUpdates:null,injection:{injectEnvironment:function(t){o&&r("104"),i.replaceNodeWithMarkup=t.replaceNodeWithMarkup,i.processChildrenUpdates=t.processChildrenUpdates,o=!0}}};t.exports=i},function(t,e,n){"use strict";function r(t,e,n){try{e(n)}catch(t){null===o&&(o=t)}}var o=null,i={invokeGuardedCallback:r,invokeGuardedCallbackWithCatch:r,rethrowCaughtError:function(){if(o){var t=o;throw o=null,t}}};t.exports=i},function(t,e,n){"use strict";function r(t){s.enqueueUpdate(t)}function o(t){var e=typeof t;if("object"!==e)return e;var n=t.constructor&&t.constructor.name||e,r=Object.keys(t);return r.length>0&&r.length<20?n+" (keys: "+r.join(", ")+")":n}function i(t,e){var n=u.get(t);if(!n){return null}return n}var a=n(4),u=(n(14),n(30)),s=(n(10),n(12)),c=(n(0),n(3),{isMounted:function(t){var e=u.get(t);return!!e&&!!e._renderedComponent},enqueueCallback:function(t,e,n){c.validateCallback(e,n);var o=i(t);if(!o)return null;o._pendingCallbacks?o._pendingCallbacks.push(e):o._pendingCallbacks=[e],r(o)},enqueueCallbackInternal:function(t,e){t._pendingCallbacks?t._pendingCallbacks.push(e):t._pendingCallbacks=[e],r(t)},enqueueForceUpdate:function(t){var e=i(t,"forceUpdate");e&&(e._pendingForceUpdate=!0,r(e))},enqueueReplaceState:function(t,e,n){var o=i(t,"replaceState");o&&(o._pendingStateQueue=[e],o._pendingReplaceState=!0,void 0!==n&&null!==n&&(c.validateCallback(n,"replaceState"),o._pendingCallbacks?o._pendingCallbacks.push(n):o._pendingCallbacks=[n]),r(o))},enqueueSetState:function(t,e){var n=i(t,"setState");if(n){(n._pendingStateQueue||(n._pendingStateQueue=[])).push(e),r(n)}},enqueueElementInternal:function(t,e,n){t._pendingElement=e,t._context=n,r(t)},validateCallback:function(t,e){t&&"function"!=typeof t&&a("122",e,o(t))}});t.exports=c},function(t,e,n){"use strict";var r=function(t){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,n,r,o){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,o)})}:t};t.exports=r},function(t,e,n){"use strict";function r(t){var e,n=t.keyCode;return"charCode"in t?0===(e=t.charCode)&&13===n&&(e=13):e=n,e>=32||13===e?e:0}t.exports=r},function(t,e,n){"use strict";function r(t){var e=this,n=e.nativeEvent;if(n.getModifierState)return n.getModifierState(t);var r=i[t];return!!r&&!!n[r]}function o(t){return r}var i={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};t.exports=o},function(t,e,n){"use strict";function r(t){var e=t.target||t.srcElement||window;return e.correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}t.exports=r},function(t,e,n){"use strict";function r(t,e){if(!i.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"==typeof a[n]}return!r&&o&&"wheel"===t&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,i=n(7);i.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),t.exports=r},function(t,e,n){"use strict";function r(t,e){var n=null===t||!1===t,r=null===e||!1===e;if(n||r)return n===r;var o=typeof t,i=typeof e;return"string"===o||"number"===o?"string"===i||"number"===i:"object"===i&&t.type===e.type&&t.key===e.key}t.exports=r},function(t,e,n){"use strict";var r=(n(5),n(9)),o=(n(3),r);t.exports=o},function(t,e,n){"use strict";function r(t){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(t);try{throw new Error(t)}catch(t){}}e.a=r},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(17),u=n.n(a),s=n(27),c=n.n(s),l=n(1),p=n.n(l),f=n(2),h=n.n(f),d=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},v=function(t){function e(){var n,i,a;r(this,e);for(var u=arguments.length,s=Array(u),c=0;c<u;c++)s[c]=arguments[c];return n=i=o(this,t.call.apply(t,[this].concat(s))),i.state={match:i.computeMatch(i.props.history.location.pathname)},a=n,o(i,a)}return i(e,t),e.prototype.getChildContext=function(){return{router:d({},this.context.router,{history:this.props.history,route:{location:this.props.history.location,match:this.state.match}})}},e.prototype.computeMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}},e.prototype.componentWillMount=function(){var t=this,e=this.props,n=e.children,r=e.history;c()(null==n||1===p.a.Children.count(n),"A <Router> may have only one child element"),this.unlisten=r.listen(function(){t.setState({match:t.computeMatch(r.location.pathname)})})},e.prototype.componentWillReceiveProps=function(t){u()(this.props.history===t.history,"You cannot change <Router history>")},e.prototype.componentWillUnmount=function(){this.unlisten()},e.prototype.render=function(){var t=this.props.children;return t?p.a.Children.only(t):null},e}(p.a.Component);v.propTypes={history:h.a.object.isRequired,children:h.a.node},v.contextTypes={router:h.a.object},v.childContextTypes={router:h.a.object.isRequired},e.a=v},function(t,e,n){"use strict";var r=n(166),o=n.n(r),i={},a=0,u=function(t,e){var n=""+e.end+e.strict,r=i[n]||(i[n]={});if(r[t])return r[t];var u=[],s=o()(t,u,e),c={re:s,keys:u};return a<1e4&&(r[t]=c,a++),c},s=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"==typeof e&&(e={path:e});var n=e,r=n.path,o=void 0===r?"/":r,i=n.exact,a=void 0!==i&&i,s=n.strict,c=void 0!==s&&s,l=u(o,{end:a,strict:c}),p=l.re,f=l.keys,h=p.exec(t);if(!h)return null;var d=h[0],v=h.slice(1),y=t===d;return a&&!y?null:{path:o,url:"/"===o&&""===d?"/":d,isExact:y,params:f.reduce(function(t,e,n){return t[e.name]=v[n],t},{})}};e.a=s},function(t,e,n){"use strict";function r(t,e,n){this.props=t,this.context=e,this.refs=a,this.updater=n||i}var o=n(24),i=n(69),a=(n(116),n(25));n(0),n(3);r.prototype.isReactComponent={},r.prototype.setState=function(t,e){"object"!=typeof t&&"function"!=typeof t&&null!=t&&o("85"),this.updater.enqueueSetState(this,t),e&&this.updater.enqueueCallback(this,e,"setState")},r.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this),t&&this.updater.enqueueCallback(this,t,"forceUpdate")};t.exports=r},function(t,e,n){"use strict";var r=(n(3),{isMounted:function(t){return!1},enqueueCallback:function(t,e){},enqueueForceUpdate:function(t){},enqueueReplaceState:function(t,e){},enqueueSetState:function(t,e){}});t.exports=r},function(t,e){function n(t){return null!==t&&"object"==typeof t}t.exports=n},function(t,e,n){(function(e){function n(t,e,n){function o(e){var n=v,r=y;return v=y=void 0,x=e,g=t.apply(r,n)}function i(t){return x=t,_=setTimeout(l,e),S?o(t):g}function s(t){var n=t-C,r=t-x,o=e-n;return O?w(o,m-r):o}function c(t){var n=t-C,r=t-x;return void 0===C||n>=e||n<0||O&&r>=m}function l(){var t=E();if(c(t))return p(t);_=setTimeout(l,s(t))}function p(t){return _=void 0,T&&v?o(t):(v=y=void 0,g)}function f(){void 0!==_&&clearTimeout(_),x=0,v=C=y=_=void 0}function h(){return void 0===_?g:p(E())}function d(){var t=E(),n=c(t);if(v=arguments,y=this,C=t,n){if(void 0===_)return i(C);if(O)return _=setTimeout(l,e),o(C)}return void 0===_&&(_=setTimeout(l,e)),g}var v,y,m,g,_,C,x=0,S=!1,O=!1,T=!0;if("function"!=typeof t)throw new TypeError(u);return e=a(e)||0,r(n)&&(S=!!n.leading,O="maxWait"in n,m=O?b(a(n.maxWait)||0,e):m,T="trailing"in n?!!n.trailing:T),d.cancel=f,d.flush=h,d}function r(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function o(t){return!!t&&"object"==typeof t}function i(t){return"symbol"==typeof t||o(t)&&_.call(t)==c}function a(t){if("number"==typeof t)return t;if(i(t))return s;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(l,"");var n=f.test(t);return n||h.test(t)?d(t.slice(2),n?2:8):p.test(t)?s:+t}var u="Expected a function",s=NaN,c="[object Symbol]",l=/^\s+|\s+$/g,p=/^[-+]0x[0-9a-f]+$/i,f=/^0b[01]+$/i,h=/^0o[0-7]+$/i,d=parseInt,v="object"==typeof e&&e&&e.Object===Object&&e,y="object"==typeof self&&self&&self.Object===Object&&self,m=v||y||Function("return this")(),g=Object.prototype,_=g.toString,b=Math.max,w=Math.min,E=function(){return m.Date.now()};t.exports=n}).call(e,n(39))},function(t,e,n){!function(e,r){t.exports=r(n(1),n(2))}(0,function(t,e){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){(function(r){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function a(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},p=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),f=n(2),h=o(f),d=n(3),v=o(d),y=n(4),m=o(y),g=n(5),_=o(g),b="undefined"==typeof document||!document||!document.createElement||"multiple"in document.createElement("input"),w=function(t){function e(t,n){u(this,e);var r=s(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.renderChildren=function(t){return"function"==typeof t?t(r.state):t},r.onClick=r.onClick.bind(r),r.onDocumentDrop=r.onDocumentDrop.bind(r),r.onDragStart=r.onDragStart.bind(r),r.onDragEnter=r.onDragEnter.bind(r),r.onDragLeave=r.onDragLeave.bind(r),r.onDragOver=r.onDragOver.bind(r),r.onDrop=r.onDrop.bind(r),r.onFileDialogCancel=r.onFileDialogCancel.bind(r),r.fileAccepted=r.fileAccepted.bind(r),r.setRef=r.setRef.bind(r),r.isFileDialogActive=!1,r.state={isDragActive:!1,acceptedFiles:[],rejectedFiles:[]},r}return c(e,t),p(e,null,[{key:"onDocumentDragOver",value:function(t){t.preventDefault()}}]),p(e,[{key:"componentDidMount",value:function(){var t=this.props.preventDropOnDocument;this.dragTargets=[],t&&(document.addEventListener("dragover",e.onDocumentDragOver,!1),document.addEventListener("drop",this.onDocumentDrop,!1)),document.body.onfocus=this.onFileDialogCancel}},{key:"componentWillUnmount",value:function(){this.props.preventDropOnDocument&&(document.removeEventListener("dragover",e.onDocumentDragOver),document.removeEventListener("drop",this.onDocumentDrop)),document.body.onfocus=null}},{key:"onDocumentDrop",value:function(t){this.node.contains(t.target)||(t.preventDefault(),this.dragTargets=[])}},{key:"onDragStart",value:function(t){this.props.onDragStart&&this.props.onDragStart.call(this,t)}},{key:"onDragEnter",value:function(t){t.preventDefault(),-1===this.dragTargets.indexOf(t.target)&&this.dragTargets.push(t.target);var e=(0,_.default)(t),n=this.allFilesAccepted(e),r=this.props.multiple||e.length<=1;this.setState({isDragActive:n,isDragReject:!n||!r}),this.props.onDragEnter&&this.props.onDragEnter.call(this,t)}},{key:"onDragOver",value:function(t){t.preventDefault(),t.stopPropagation();try{t.dataTransfer.dropEffect="copy"}catch(t){}return this.props.onDragOver&&this.props.onDragOver.call(this,t),!1}},{key:"onDragLeave",value:function(t){var e=this;t.preventDefault(),this.dragTargets=this.dragTargets.filter(function(n){return n!==t.target&&e.node.contains(n)}),this.dragTargets.length>0||(this.setState({isDragActive:!1,isDragReject:!1}),this.props.onDragLeave&&this.props.onDragLeave.call(this,t))}},{key:"onDrop",value:function(t){var e=this,n=this.props,o=n.onDrop,i=n.onDropAccepted,u=n.onDropRejected,s=n.multiple,c=n.disablePreview,l=(0,_.default)(t),p=[],f=[];t.preventDefault(),this.dragTargets=[],this.isFileDialogActive=!1,l.forEach(function(t){if(!c)try{t.preview=window.URL.createObjectURL(t)}catch(e){"production"!==r.env.NODE_ENV&&console.error("Failed to generate preview for file",t,e)}e.fileAccepted(t)&&e.fileMatchSize(t)?p.push(t):f.push(t)}),s||f.push.apply(f,a(p.splice(1))),o&&o.call(this,p,f,t),f.length>0&&u&&u.call(this,f,t),p.length>0&&i&&i.call(this,p,t),this.setState({isDragActive:!1,isDragReject:!1,acceptedFiles:p,rejectedFiles:f})}},{key:"onClick",value:function(t){var e=this.props,n=e.onClick;e.disableClick||(t.stopPropagation(),this.open(),n&&n.call(this,t))}},{key:"onFileDialogCancel",value:function(){var t=this.props.onFileDialogCancel,e=this.fileInputEl,n=this.isFileDialogActive;t&&n&&setTimeout(function(){e.files.length||(n=!1,t())},300)}},{key:"setRef",value:function(t){this.node=t}},{key:"fileAccepted",value:function(t){return"application/x-moz-file"===t.type||(0,m.default)(t,this.props.accept)}},{key:"fileMatchSize",value:function(t){return t.size<=this.props.maxSize&&t.size>=this.props.minSize}},{key:"allFilesAccepted",value:function(t){return t.every(this.fileAccepted)}},{key:"open",value:function(){this.isFileDialogActive=!0,this.fileInputEl.value=null,this.fileInputEl.click()}},{key:"render",value:function(){var t=this,e=this.props,n=e.accept,r=e.activeClassName,o=e.inputProps,a=e.multiple,u=e.name,s=e.rejectClassName,c=e.children,p=i(e,["accept","activeClassName","inputProps","multiple","name","rejectClassName","children"]),f=p.activeStyle,d=p.className,v=p.rejectStyle,y=p.style,m=i(p,["activeStyle","className","rejectStyle","style"]),g=this.state,_=g.isDragActive,w=g.isDragReject;d=d||"",_&&r&&(d+=" "+r),w&&s&&(d+=" "+s),d||y||f||v||(y={width:200,height:200,borderWidth:2,borderColor:"#666",borderStyle:"dashed",borderRadius:5},f={borderStyle:"solid",borderColor:"#6c6",backgroundColor:"#eee"},v={borderStyle:"solid",borderColor:"#c66",backgroundColor:"#eee"});var E=void 0;E=f&&_?l({},y,f):v&&w?l({},y,v):l({},y);var C={accept:n,type:"file",style:{display:"none"},multiple:b&&a,ref:function(e){return t.fileInputEl=e},onChange:this.onDrop};u&&u.length&&(C.name=u);var x=["acceptedFiles","preventDropOnDocument","disablePreview","disableClick","onDropAccepted","onDropRejected","onFileDialogCancel","maxSize","minSize"],S=l({},m);return x.forEach(function(t){return delete S[t]}),h.default.createElement("div",l({className:d,style:E},S,{onClick:this.onClick,onDragStart:this.onDragStart,onDragEnter:this.onDragEnter,onDragOver:this.onDragOver,onDragLeave:this.onDragLeave,onDrop:this.onDrop,ref:this.setRef}),this.renderChildren(c),h.default.createElement("input",l({},o,C)))}}]),e}(h.default.Component);w.propTypes={accept:v.default.string,children:v.default.oneOfType([v.default.node,v.default.func]),disableClick:v.default.bool,disablePreview:v.default.bool,preventDropOnDocument:v.default.bool,inputProps:v.default.object,multiple:v.default.bool,name:v.default.string,maxSize:v.default.number,minSize:v.default.number,className:v.default.string,activeClassName:v.default.string,rejectClassName:v.default.string,style:v.default.object,activeStyle:v.default.object,rejectStyle:v.default.object,onClick:v.default.func,onDrop:v.default.func,onDropAccepted:v.default.func,onDropRejected:v.default.func,onDragStart:v.default.func,onDragEnter:v.default.func,onDragOver:v.default.func,onDragLeave:v.default.func,onFileDialogCancel:v.default.func},w.defaultProps={preventDropOnDocument:!0,disablePreview:!1,disableClick:!1,multiple:!0,maxSize:1/0,minSize:0},e.default=w,t.exports=e.default}).call(e,n(1))},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(t){if(l===setTimeout)return setTimeout(t,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function i(t){if(p===clearTimeout)return clearTimeout(t);if((p===r||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(t);try{return p(t)}catch(e){try{return p.call(null,t)}catch(e){return p.call(this,t)}}}function a(){v&&h&&(v=!1,h.length?d=h.concat(d):y=-1,d.length&&u())}function u(){if(!v){var t=o(a);v=!0;for(var e=d.length;e;){for(h=d,d=[];++y<e;)h&&h[y].run();y=-1,e=d.length}h=null,v=!1,i(t)}}function s(t,e){this.fun=t,this.array=e}function c(){}var l,p,f=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(t){l=n}try{p="function"==typeof clearTimeout?clearTimeout:r}catch(t){p=r}}();var h,d=[],v=!1,y=-1;f.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];d.push(new s(t,e)),1!==d.length||v||o(u)},s.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=c,f.addListener=c,f.once=c,f.off=c,f.removeListener=c,f.removeAllListeners=c,f.emit=c,f.binding=function(t){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(t){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e){t.exports=function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";e.__esModule=!0,n(8),n(9),e.default=function(t,e){if(t&&e){var n=function(){var n=Array.isArray(e)?e:e.split(","),r=t.name||"",o=t.type||"",i=o.replace(/\/.*$/,"");return{v:n.some(function(t){var e=t.trim();return"."===e.charAt(0)?r.toLowerCase().endsWith(e.toLowerCase()):/\/\*$/.test(e)?i===e.replace(/\/.*$/,""):o===e})}}();if("object"==typeof n)return n.v}return!0},t.exports=e.default},function(t,e){var n=t.exports={version:"1.2.2"};"number"==typeof __e&&(__e=n)},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(2),o=n(1),i=n(4),a=n(19),u="prototype",s=function(t,e){return function(){return t.apply(e,arguments)}},c=function(t,e,n){var l,p,f,h,d=t&c.G,v=t&c.P,y=d?r:t&c.S?r[e]||(r[e]={}):(r[e]||{})[u],m=d?o:o[e]||(o[e]={});d&&(n=e);for(l in n)p=!(t&c.F)&&y&&l in y,f=(p?y:n)[l],h=t&c.B&&p?s(f,r):v&&"function"==typeof f?s(Function.call,f):f,y&&!p&&a(y,l,f),m[l]!=f&&i(m,l,h),v&&((m[u]||(m[u]={}))[l]=f)};r.core=o,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,t.exports=c},function(t,e,n){var r=n(5),o=n(18);t.exports=n(22)?function(t,e,n){return r.setDesc(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){var n=Object;t.exports={create:n.create,getProto:n.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:n.getOwnPropertyDescriptor,setDesc:n.defineProperty,setDescs:n.defineProperties,getKeys:n.keys,getNames:n.getOwnPropertyNames,getSymbols:n.getOwnPropertySymbols,each:[].forEach}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(20)("wks"),o=n(2).Symbol;t.exports=function(t){return r[t]||(r[t]=o&&o[t]||(o||n(6))("Symbol."+t))}},function(t,e,n){n(26),t.exports=n(1).Array.some},function(t,e,n){n(25),t.exports=n(1).String.endsWith},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(10);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[n(7)("match")]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(16),o=n(11),i=n(7)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(2),o=n(4),i=n(6)("src"),a="toString",u=Function[a],s=(""+u).split(a);n(1).inspectSource=function(t){return u.call(t)},(t.exports=function(t,e,n,a){"function"==typeof n&&(o(n,i,t[e]?""+t[e]:s.join(String(e))),"name"in n||(n.name=e)),t===r?t[e]=n:(a||delete t[e],o(t,e,n))})(Function.prototype,a,function(){return"function"==typeof this&&this[i]||u.call(this)})},function(t,e,n){var r=n(2),o="__core-js_shared__",i=r[o]||(r[o]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,e,n){var r=n(17),o=n(13);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(t))}},function(t,e,n){t.exports=!n(15)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(23),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){"use strict";var r=n(3),o=n(24),i=n(21),a="endsWith",u=""[a];r(r.P+r.F*n(14)(a),"String",{endsWith:function(t){var e=i(this,t,a),n=arguments,r=n.length>1?n[1]:void 0,s=o(e.length),c=void 0===r?s:Math.min(o(r),s),l=String(t);return u?u.call(e,l,c):e.slice(c-l.length,c)===l}})},function(t,e,n){var r=n(5),o=n(3),i=n(1).Array||Array,a={},u=function(t,e){r.each.call(t.split(","),function(t){void 0==e&&t in i?a[t]=i[t]:t in[]&&(a[t]=n(12)(Function.call,[][t],e))})};u("pop,reverse,shift,keys,values,entries",1),u("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3),u("join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill"),o(o.S,"Array",a)}])},function(t,e){"use strict";function n(t){var e=[];if(t.dataTransfer){var n=t.dataTransfer;n.files&&n.files.length?e=n.files:n.items&&n.items.length&&(e=n.items)}else t.target&&t.target.files&&(e=t.target.files);return Array.prototype.slice.call(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n,t.exports=e.default}])})},function(t,e,n){"use strict";function r(t,e){return t===e}function o(t,e,n){n=n||r;var o=i(t(),e);return function(r){return function(){var a=i(t(),e);if(!n(o,a)){var u=o;o=a,r(a,u,e)}}}}var i=n(165).get;t.exports=o},function(t,e,n){"use strict";function r(t,e){return t===e}function o(t,e,n){if(null===e||null===n||e.length!==n.length)return!1;for(var r=e.length,o=0;o<r;o++)if(!t(e[o],n[o]))return!1;return!0}function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,n=null,i=null;return function(){return o(e,n,arguments)||(i=t.apply(null,arguments)),n=arguments,i}}function a(t){var e=Array.isArray(t[0])?t[0]:t;if(!e.every(function(t){return"function"==typeof t})){var n=e.map(function(t){return typeof t}).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+n+"]")}return e}function u(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return function(){for(var e=arguments.length,r=Array(e),o=0;o<e;o++)r[o]=arguments[o];var u=0,s=r.pop(),c=a(r),l=t.apply(void 0,[function(){return u++,s.apply(null,arguments)}].concat(n)),p=i(function(){for(var t=[],e=c.length,n=0;n<e;n++)t.push(c[n].apply(null,arguments));return l.apply(null,t)});return p.resultFunc=s,p.recomputations=function(){return u},p.resetRecomputations=function(){return u=0},p}}function s(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;if("object"!=typeof t)throw new Error("createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof t);var n=Object.keys(t);return e(n.map(function(e){return t[e]}),function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.reduce(function(t,e,r){return t[n[r]]=e,t},{})})}e.__esModule=!0,e.defaultMemoize=i,e.createSelectorCreator=u,e.createStructuredSelector=s;var c=e.createSelector=u(i)},,,,,,,function(t,e,n){"use strict";var r=n(9),o={listen:function(t,e,n){return t.addEventListener?(t.addEventListener(e,n,!1),{remove:function(){t.removeEventListener(e,n,!1)}}):t.attachEvent?(t.attachEvent("on"+e,n),{remove:function(){t.detachEvent("on"+e,n)}}):void 0},capture:function(t,e,n){return t.addEventListener?(t.addEventListener(e,n,!0),{remove:function(){t.removeEventListener(e,n,!0)}}):{remove:r}},registerDefault:function(){}};t.exports=o},function(t,e,n){"use strict";function r(t){try{t.focus()}catch(t){}}t.exports=r},function(t,e,n){"use strict";function r(t){if(void 0===(t=t||("undefined"!=typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}t.exports=r},function(t,e,n){"use strict";e.__esModule=!0;e.canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement),e.addEventListener=function(t,e,n){return t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)},e.removeEventListener=function(t,e,n){return t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent("on"+e,n)},e.getConfirmation=function(t,e){return e(window.confirm(t))},e.supportsHistory=function(){var t=window.navigator.userAgent;return(-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)},e.supportsPopStateOnHashChange=function(){return-1===window.navigator.userAgent.indexOf("Trident")},e.supportsGoWithoutReloadUsingHash=function(){return-1===window.navigator.userAgent.indexOf("Firefox")},e.isExtraneousPopstateEvent=function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf("CriOS")}},function(t,e,n){"use strict";var r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0},i="function"==typeof Object.getOwnPropertySymbols;t.exports=function(t,e,n){if("string"!=typeof e){var a=Object.getOwnPropertyNames(e);i&&(a=a.concat(Object.getOwnPropertySymbols(e)));for(var u=0;u<a.length;++u)if(!(r[a[u]]||o[a[u]]||n&&n[a[u]]))try{t[a[u]]=e[a[u]]}catch(t){}}return t}},function(t,e,n){"use strict";var r=n(163),o=r.a.Symbol;e.a=o},function(t,e,n){"use strict";var r=n(170);t.exports=function(t){return r(t,!1)}},function(t,e,n){"use strict";function r(t,e){return t+e.charAt(0).toUpperCase()+e.substring(1)}var o={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},i=["Webkit","ms","Moz","O"];Object.keys(o).forEach(function(t){i.forEach(function(e){o[r(e,t)]=o[t]})});var a={background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}},u={isUnitlessNumber:o,shorthandPropertyExpansions:a};t.exports=u},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=n(4),i=n(16),a=(n(0),function(){function t(e){r(this,t),this._callbacks=null,this._contexts=null,this._arg=e}return t.prototype.enqueue=function(t,e){this._callbacks=this._callbacks||[],this._callbacks.push(t),this._contexts=this._contexts||[],this._contexts.push(e)},t.prototype.notifyAll=function(){var t=this._callbacks,e=this._contexts,n=this._arg;if(t&&e){t.length!==e.length&&o("24"),this._callbacks=null,this._contexts=null;for(var r=0;r<t.length;r++)t[r].call(e[r],n);t.length=0,e.length=0}},t.prototype.checkpoint=function(){return this._callbacks?this._callbacks.length:0},t.prototype.rollback=function(t){this._callbacks&&this._contexts&&(this._callbacks.length=t,this._contexts.length=t)},t.prototype.reset=function(){this._callbacks=null,this._contexts=null},t.prototype.destructor=function(){this.reset()},t}());t.exports=i.addPoolingTo(a)},function(t,e,n){"use strict";function r(t){return!!c.hasOwnProperty(t)||!s.hasOwnProperty(t)&&(u.test(t)?(c[t]=!0,!0):(s[t]=!0,!1))}function o(t,e){return null==e||t.hasBooleanValue&&!e||t.hasNumericValue&&isNaN(e)||t.hasPositiveNumericValue&&e<1||t.hasOverloadedBooleanValue&&!1===e}var i=n(20),a=(n(6),n(10),n(233)),u=(n(3),new RegExp("^["+i.ATTRIBUTE_NAME_START_CHAR+"]["+i.ATTRIBUTE_NAME_CHAR+"]*$")),s={},c={},l={createMarkupForID:function(t){return i.ID_ATTRIBUTE_NAME+"="+a(t)},setAttributeForID:function(t,e){t.setAttribute(i.ID_ATTRIBUTE_NAME,e)},createMarkupForRoot:function(){return i.ROOT_ATTRIBUTE_NAME+'=""'},setAttributeForRoot:function(t){t.setAttribute(i.ROOT_ATTRIBUTE_NAME,"")},createMarkupForProperty:function(t,e){var n=i.properties.hasOwnProperty(t)?i.properties[t]:null;if(n){if(o(n,e))return"";var r=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&!0===e?r+'=""':r+"="+a(e)}return i.isCustomAttribute(t)?null==e?"":t+"="+a(e):null},createMarkupForCustomAttribute:function(t,e){return r(t)&&null!=e?t+"="+a(e):""},setValueForProperty:function(t,e,n){var r=i.properties.hasOwnProperty(e)?i.properties[e]:null;if(r){var a=r.mutationMethod;if(a)a(t,n);else{if(o(r,n))return void this.deleteValueForProperty(t,e);if(r.mustUseProperty)t[r.propertyName]=n;else{var u=r.attributeName,s=r.attributeNamespace;s?t.setAttributeNS(s,u,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&!0===n?t.setAttribute(u,""):t.setAttribute(u,""+n)}}}else if(i.isCustomAttribute(e))return void l.setValueForAttribute(t,e,n)},setValueForAttribute:function(t,e,n){if(r(e)){null==n?t.removeAttribute(e):t.setAttribute(e,""+n)}},deleteValueForAttribute:function(t,e){t.removeAttribute(e)},deleteValueForProperty:function(t,e){var n=i.properties.hasOwnProperty(e)?i.properties[e]:null;if(n){var r=n.mutationMethod;if(r)r(t,void 0);else if(n.mustUseProperty){var o=n.propertyName;n.hasBooleanValue?t[o]=!1:t[o]=""}else t.removeAttribute(n.attributeName)}else i.isCustomAttribute(e)&&t.removeAttribute(e)}};t.exports=l},function(t,e,n){"use strict";var r={hasCachedChildNodes:1};t.exports=r},function(t,e,n){"use strict";function r(){if(this._rootNodeID&&this._wrapperState.pendingUpdate){this._wrapperState.pendingUpdate=!1;var t=this._currentElement.props,e=u.getValue(t);null!=e&&o(this,Boolean(t.multiple),e)}}function o(t,e,n){var r,o,i=s.getNodeFromInstance(t).options;if(e){for(r={},o=0;o<n.length;o++)r[""+n[o]]=!0;for(o=0;o<i.length;o++){var a=r.hasOwnProperty(i[o].value);i[o].selected!==a&&(i[o].selected=a)}}else{for(r=""+n,o=0;o<i.length;o++)if(i[o].value===r)return void(i[o].selected=!0);i.length&&(i[0].selected=!0)}}function i(t){var e=this._currentElement.props,n=u.executeOnChange(e,t);return this._rootNodeID&&(this._wrapperState.pendingUpdate=!0),c.asap(r,this),n}var a=n(5),u=n(54),s=n(6),c=n(12),l=(n(3),!1),p={getHostProps:function(t,e){return a({},e,{onChange:t._wrapperState.onChange,value:void 0})},mountWrapper:function(t,e){var n=u.getValue(e);t._wrapperState={pendingUpdate:!1,initialValue:null!=n?n:e.defaultValue,listeners:null,onChange:i.bind(t),wasMultiple:Boolean(e.multiple)},void 0===e.value||void 0===e.defaultValue||l||(l=!0)},getSelectValueContext:function(t){return t._wrapperState.initialValue},postUpdateWrapper:function(t){var e=t._currentElement.props;t._wrapperState.initialValue=void 0;var n=t._wrapperState.wasMultiple;t._wrapperState.wasMultiple=Boolean(e.multiple);var r=u.getValue(e);null!=r?(t._wrapperState.pendingUpdate=!1,o(t,Boolean(e.multiple),r)):n!==Boolean(e.multiple)&&(null!=e.defaultValue?o(t,Boolean(e.multiple),e.defaultValue):o(t,Boolean(e.multiple),e.multiple?[]:""))}};t.exports=p},function(t,e,n){"use strict";var r,o={injectEmptyComponentFactory:function(t){r=t}},i={create:function(t){return r(t)}};i.injection=o,t.exports=i},function(t,e,n){"use strict";var r={logTopLevelRenders:!1};t.exports=r},function(t,e,n){"use strict";function r(t){return u||a("111",t.type),new u(t)}function o(t){return new s(t)}function i(t){return t instanceof s}var a=n(4),u=(n(0),null),s=null,c={injectGenericComponentClass:function(t){u=t},injectTextComponentClass:function(t){s=t}},l={createInternalComponent:r,createInstanceForText:o,isTextComponent:i,injection:c};t.exports=l},function(t,e,n){"use strict";function r(t){return i(document.documentElement,t)}var o=n(193),i=n(144),a=n(82),u=n(83),s={hasSelectionCapabilities:function(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&("input"===e&&"text"===t.type||"textarea"===e||"true"===t.contentEditable)},getSelectionInformation:function(){var t=u();return{focusedElem:t,selectionRange:s.hasSelectionCapabilities(t)?s.getSelection(t):null}},restoreSelection:function(t){var e=u(),n=t.focusedElem,o=t.selectionRange;e!==n&&r(n)&&(s.hasSelectionCapabilities(n)&&s.setSelection(n,o),a(n))},getSelection:function(t){var e;if("selectionStart"in t)e={start:t.selectionStart,end:t.selectionEnd};else if(document.selection&&t.nodeName&&"input"===t.nodeName.toLowerCase()){var n=document.selection.createRange();n.parentElement()===t&&(e={start:-n.moveStart("character",-t.value.length),end:-n.moveEnd("character",-t.value.length)})}else e=o.getOffsets(t);return e||{start:0,end:0}},setSelection:function(t,e){var n=e.start,r=e.end;if(void 0===r&&(r=n),"selectionStart"in t)t.selectionStart=n,t.selectionEnd=Math.min(r,t.value.length);else if(document.selection&&t.nodeName&&"input"===t.nodeName.toLowerCase()){var i=t.createTextRange();i.collapse(!0),i.moveStart("character",n),i.moveEnd("character",r-n),i.select()}else o.setOffsets(t,e)}};t.exports=s},function(t,e,n){"use strict";function r(t,e){for(var n=Math.min(t.length,e.length),r=0;r<n;r++)if(t.charAt(r)!==e.charAt(r))return r;return t.length===e.length?-1:n}function o(t){return t?t.nodeType===A?t.documentElement:t.firstChild:null}function i(t){return t.getAttribute&&t.getAttribute(M)||""}function a(t,e,n,r,o){var i;if(w.logTopLevelRenders){var a=t._currentElement.props.child,u=a.type;i="React mount: "+("string"==typeof u?u:u.displayName||u.name),console.time(i)}var s=x.mountComponent(t,n,null,_(t,e),o,0);i&&console.timeEnd(i),t._renderedComponent._topLevelWrapper=t,F._mountImageIntoNode(s,e,t,r,n)}function u(t,e,n,r){var o=O.ReactReconcileTransaction.getPooled(!n&&b.useCreateElement);o.perform(a,null,t,e,o,n,r),O.ReactReconcileTransaction.release(o)}function s(t,e,n){for(x.unmountComponent(t,n),e.nodeType===A&&(e=e.documentElement);e.lastChild;)e.removeChild(e.lastChild)}function c(t){var e=o(t);if(e){var n=g.getInstanceFromNode(e);return!(!n||!n._hostParent)}}function l(t){return!(!t||t.nodeType!==R&&t.nodeType!==A&&t.nodeType!==N)}function p(t){var e=o(t),n=e&&g.getInstanceFromNode(e);return n&&!n._hostParent?n:null}function f(t){var e=p(t);return e?e._hostContainerInfo._topLevelWrapper:null}var h=n(4),d=n(19),v=n(20),y=n(22),m=n(34),g=(n(14),n(6)),_=n(187),b=n(189),w=n(94),E=n(30),C=(n(10),n(203)),x=n(21),S=n(57),O=n(12),T=n(25),P=n(104),k=(n(0),n(38)),I=n(63),M=(n(3),v.ID_ATTRIBUTE_NAME),D=v.ROOT_ATTRIBUTE_NAME,R=1,A=9,N=11,j={},L=1,U=function(){this.rootID=L++};U.prototype.isReactComponent={},U.prototype.render=function(){return this.props.child},U.isReactTopLevelWrapper=!0;var F={TopLevelWrapper:U,_instancesByReactRootID:j,scrollMonitor:function(t,e){e()},_updateRootComponent:function(t,e,n,r,o){return F.scrollMonitor(r,function(){S.enqueueElementInternal(t,e,n),o&&S.enqueueCallbackInternal(t,o)}),t},_renderNewRootComponent:function(t,e,n,r){l(e)||h("37"),m.ensureScrollValueMonitoring();var o=P(t,!1);O.batchedUpdates(u,o,e,n,r);var i=o._instance.rootID;return j[i]=o,o},renderSubtreeIntoContainer:function(t,e,n,r){return null!=t&&E.has(t)||h("38"),F._renderSubtreeIntoContainer(t,e,n,r)},_renderSubtreeIntoContainer:function(t,e,n,r){S.validateCallback(r,"ReactDOM.render"),y.isValidElement(e)||h("39","string"==typeof e?" Instead of passing a string like 'div', pass React.createElement('div') or <div />.":"function"==typeof e?" Instead of passing a class like Foo, pass React.createElement(Foo) or <Foo />.":null!=e&&void 0!==e.props?" This may be caused by unintentionally loading two independent copies of React.":"");var a,u=y.createElement(U,{child:e});if(t){var s=E.get(t);a=s._processChildContext(s._context)}else a=T;var l=f(n);if(l){var p=l._currentElement,d=p.props.child;if(I(d,e)){var v=l._renderedComponent.getPublicInstance(),m=r&&function(){r.call(v)};return F._updateRootComponent(l,u,a,n,m),v}F.unmountComponentAtNode(n)}var g=o(n),_=g&&!!i(g),b=c(n),w=_&&!l&&!b,C=F._renderNewRootComponent(u,n,w,a)._renderedComponent.getPublicInstance();return r&&r.call(C),C},render:function(t,e,n){return F._renderSubtreeIntoContainer(null,t,e,n)},unmountComponentAtNode:function(t){l(t)||h("40");var e=f(t);if(!e){c(t),1===t.nodeType&&t.hasAttribute(D);return!1}return delete j[e._instance.rootID],O.batchedUpdates(s,e,t,!1),!0},_mountImageIntoNode:function(t,e,n,i,a){if(l(e)||h("41"),i){var u=o(e);if(C.canReuseMarkup(t,u))return void g.precacheNode(n,u);var s=u.getAttribute(C.CHECKSUM_ATTR_NAME);u.removeAttribute(C.CHECKSUM_ATTR_NAME);var c=u.outerHTML;u.setAttribute(C.CHECKSUM_ATTR_NAME,s);var p=t,f=r(p,c),v=" (client) "+p.substring(f-20,f+20)+"\n (server) "+c.substring(f-20,f+20);e.nodeType===A&&h("42",v)}if(e.nodeType===A&&h("43"),a.useCreateElement){for(;e.lastChild;)e.removeChild(e.lastChild);d.insertTreeBefore(e,t,null)}else k(e,t),g.precacheNode(n,e.firstChild)}};t.exports=F},function(t,e,n){"use strict";var r=n(4),o=n(22),i=(n(0),{HOST:0,COMPOSITE:1,EMPTY:2,getType:function(t){return null===t||!1===t?i.EMPTY:o.isValidElement(t)?"function"==typeof t.type?i.COMPOSITE:i.HOST:void r("26",t)}});t.exports=i},function(t,e,n){"use strict";var r={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(t){r.currentScrollLeft=t.x,r.currentScrollTop=t.y}};t.exports=r},function(t,e,n){"use strict";function r(t,e){return null==e&&o("30"),null==t?e:Array.isArray(t)?Array.isArray(e)?(t.push.apply(t,e),t):(t.push(e),t):Array.isArray(e)?[t].concat(e):[t,e]}var o=n(4);n(0);t.exports=r},function(t,e,n){"use strict";function r(t,e,n){Array.isArray(t)?t.forEach(e,n):t&&e.call(n,t)}t.exports=r},function(t,e,n){"use strict";function r(t){for(var e;(e=t._renderedNodeType)===o.COMPOSITE;)t=t._renderedComponent;return e===o.HOST?t._renderedComponent:e===o.EMPTY?null:void 0}var o=n(98);t.exports=r},function(t,e,n){"use strict";function r(){return!i&&o.canUseDOM&&(i="textContent"in document.documentElement?"textContent":"innerText"),i}var o=n(7),i=null;t.exports=r},function(t,e,n){"use strict";function r(t){if(t){var e=t.getName();if(e)return" Check the render method of `"+e+"`."}return""}function o(t){return"function"==typeof t&&void 0!==t.prototype&&"function"==typeof t.prototype.mountComponent&&"function"==typeof t.prototype.receiveComponent}function i(t,e){var n;if(null===t||!1===t)n=c.create(i);else if("object"==typeof t){var u=t,s=u.type;if("function"!=typeof s&&"string"!=typeof s){var f="";f+=r(u._owner),a("130",null==s?s:typeof s,f)}"string"==typeof u.type?n=l.createInternalComponent(u):o(u.type)?(n=new u.type(u),n.getHostNode||(n.getHostNode=n.getNativeNode)):n=new p(u)}else"string"==typeof t||"number"==typeof t?n=l.createInstanceForText(t):a("131",typeof t);return n._mountIndex=0,n._mountImage=null,n}var a=n(4),u=n(5),s=n(184),c=n(93),l=n(95),p=(n(272),n(0),n(3),function(t){this.construct(t)});u(p.prototype,s,{_instantiateReactComponent:i}),t.exports=i},function(t,e,n){"use strict";function r(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!o[t.type]:"textarea"===e}var o={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};t.exports=r},function(t,e,n){"use strict";var r=n(7),o=n(37),i=n(38),a=function(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e};r.canUseDOM&&("textContent"in document.documentElement||(a=function(t,e){if(3===t.nodeType)return void(t.nodeValue=e);i(t,o(e))})),t.exports=a},function(t,e,n){"use strict";function r(t,e){return t&&"object"==typeof t&&null!=t.key?c.escape(t.key):e.toString(36)}function o(t,e,n,i){var f=typeof t;if("undefined"!==f&&"boolean"!==f||(t=null),null===t||"string"===f||"number"===f||"object"===f&&t.$$typeof===u)return n(i,t,""===e?l+r(t,0):e),1;var h,d,v=0,y=""===e?l:e+p;if(Array.isArray(t))for(var m=0;m<t.length;m++)h=t[m],d=y+r(h,m),v+=o(h,d,n,i);else{var g=s(t);if(g){var _,b=g.call(t);if(g!==t.entries)for(var w=0;!(_=b.next()).done;)h=_.value,d=y+r(h,w++),v+=o(h,d,n,i);else for(;!(_=b.next()).done;){var E=_.value;E&&(h=E[1],d=y+c.escape(E[0])+p+r(h,0),v+=o(h,d,n,i))}}else if("object"===f){var C="",x=String(t);a("31","[object Object]"===x?"object with keys {"+Object.keys(t).join(", ")+"}":x,C)}}return v}function i(t,e,n){return null==t?0:o(t,"",e,n)}var a=n(4),u=(n(14),n(199)),s=n(230),c=(n(0),n(53)),l=(n(3),"."),p=":";t.exports=i},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function u(){}function s(t,e){var n={run:function(r){try{var o=t(e.getState(),r);(o!==n.props||n.error)&&(n.shouldComponentUpdate=!0,n.props=o,n.error=null)}catch(t){n.shouldComponentUpdate=!0,n.error=t}}};return n}function c(t){var e,c,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},f=l.getDisplayName,b=void 0===f?function(t){return"ConnectAdvanced("+t+")"}:f,w=l.methodName,E=void 0===w?"connectAdvanced":w,C=l.renderCountProp,x=void 0===C?void 0:C,S=l.shouldHandleStateChanges,O=void 0===S||S,T=l.storeKey,P=void 0===T?"store":T,k=l.withRef,I=void 0!==k&&k,M=a(l,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),D=P+"Subscription",R=g++,A=(e={},e[P]=y.a,e[D]=y.b,e),N=(c={},c[D]=y.b,c);return function(e){h()("function"==typeof e,"You must pass a component to the function returned by connect. Instead received "+JSON.stringify(e));var a=e.displayName||e.name||"Component",c=b(a),l=m({},M,{getDisplayName:b,methodName:E,renderCountProp:x,shouldHandleStateChanges:O,storeKey:P,withRef:I,displayName:c,wrappedComponentName:a,WrappedComponent:e}),f=function(a){function p(t,e){r(this,p);var n=o(this,a.call(this,t,e));return n.version=R,n.state={},n.renderCount=0,n.store=t[P]||e[P],n.propsMode=Boolean(t[P]),n.setWrappedInstance=n.setWrappedInstance.bind(n),h()(n.store,'Could not find "'+P+'" in either the context or props of "'+c+'". Either wrap the root component in a <Provider>, or explicitly pass "'+P+'" as a prop to "'+c+'".'),n.initSelector(),n.initSubscription(),n}return i(p,a),p.prototype.getChildContext=function(){var t,e=this.propsMode?null:this.subscription;return t={},t[D]=e||this.context[D],t},p.prototype.componentDidMount=function(){O&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},p.prototype.componentWillReceiveProps=function(t){this.selector.run(t)},p.prototype.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},p.prototype.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=u,this.store=null,this.selector.run=u,this.selector.shouldComponentUpdate=!1},p.prototype.getWrappedInstance=function(){return h()(I,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+E+"() call."),this.wrappedInstance},p.prototype.setWrappedInstance=function(t){this.wrappedInstance=t},p.prototype.initSelector=function(){var e=t(this.store.dispatch,l);this.selector=s(e,this.store),this.selector.run(this.props)},p.prototype.initSubscription=function(){if(O){var t=(this.propsMode?this.props:this.context)[D];this.subscription=new v.a(this.store,t,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},p.prototype.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(_)):this.notifyNestedSubs()},p.prototype.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},p.prototype.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},p.prototype.addExtraProps=function(t){if(!(I||x||this.propsMode&&this.subscription))return t;var e=m({},t);return I&&(e.ref=this.setWrappedInstance),x&&(e[x]=this.renderCount++),this.propsMode&&this.subscription&&(e[D]=this.subscription),e},p.prototype.render=function(){var t=this.selector;if(t.shouldComponentUpdate=!1,t.error)throw t.error;return n.i(d.createElement)(e,this.addExtraProps(t.props))},p}(d.Component);return f.WrappedComponent=e,f.displayName=c,f.childContextTypes=N,f.contextTypes=A,f.propTypes=A,p()(f,e)}}e.a=c;var l=n(85),p=n.n(l),f=n(27),h=n.n(f),d=n(1),v=(n.n(d),n(242)),y=n(110),m=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},g=0,_={}},function(t,e,n){"use strict";function r(t){return function(e,n){function r(){return o}var o=t(e,n);return r.dependsOnOwnProps=!1,r}}function o(t){return null!==t.dependsOnOwnProps&&void 0!==t.dependsOnOwnProps?Boolean(t.dependsOnOwnProps):1!==t.length}function i(t,e){return function(e,n){var r=(n.displayName,function(t,e){return r.dependsOnOwnProps?r.mapToProps(t,e):r.mapToProps(t)});return r.dependsOnOwnProps=!0,r.mapToProps=function(e,n){r.mapToProps=t,r.dependsOnOwnProps=o(t);var i=r(e,n);return"function"==typeof i&&(r.mapToProps=i,r.dependsOnOwnProps=o(i),i=r(e,n)),i},r}}e.b=r,e.a=i;n(111)},function(t,e,n){"use strict";n.d(e,"b",function(){return i}),n.d(e,"a",function(){return a});var r=n(2),o=n.n(r),i=o.a.shape({trySubscribe:o.a.func.isRequired,tryUnsubscribe:o.a.func.isRequired,notifyNestedSubs:o.a.func.isRequired,isSubscribed:o.a.func.isRequired}),a=o.a.shape({subscribe:o.a.func.isRequired,dispatch:o.a.func.isRequired,getState:o.a.func.isRequired})},function(t,e,n){"use strict";n(47),n(65)},function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var u=n(1),s=n.n(u),c=n(2),l=n.n(c),p=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},f=function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)},h=function(t){function e(){var n,r,a;o(this,e);for(var u=arguments.length,s=Array(u),c=0;c<u;c++)s[c]=arguments[c];return n=r=i(this,t.call.apply(t,[this].concat(s))),r.handleClick=function(t){if(r.props.onClick&&r.props.onClick(t),!t.defaultPrevented&&0===t.button&&!r.props.target&&!f(t)){t.preventDefault();var e=r.context.router.history,n=r.props,o=n.replace,i=n.to;o?e.replace(i):e.push(i)}},a=n,i(r,a)}return a(e,t),e.prototype.render=function(){var t=this.props,e=(t.replace,t.to),n=r(t,["replace","to"]),o=this.context.router.history.createHref("string"==typeof e?{pathname:e}:e);return s.a.createElement("a",p({},n,{onClick:this.handleClick,href:o}))},e}(s.a.Component);h.propTypes={onClick:l.a.func,target:l.a.string,replace:l.a.bool,to:l.a.oneOfType([l.a.string,l.a.object]).isRequired},h.defaultProps={replace:!1},h.contextTypes={router:l.a.shape({history:l.a.shape({push:l.a.func.isRequired,replace:l.a.func.isRequired,createHref:l.a.func.isRequired}).isRequired}).isRequired},e.a=h},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(17),u=n.n(a),s=n(1),c=n.n(s),l=n(2),p=n.n(l),f=n(67),h=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},d=function(t){function e(){var n,i,a;r(this,e);for(var u=arguments.length,s=Array(u),c=0;c<u;c++)s[c]=arguments[c];return n=i=o(this,t.call.apply(t,[this].concat(s))),i.state={match:i.computeMatch(i.props,i.context.router)},a=n,o(i,a)}return i(e,t),e.prototype.getChildContext=function(){return{router:h({},this.context.router,{route:{location:this.props.location||this.context.router.route.location,match:this.state.match}})}},e.prototype.computeMatch=function(t,e){var r=t.computedMatch,o=t.location,i=t.path,a=t.strict,u=t.exact,s=e.route;if(r)return r;var c=(o||s.location).pathname;return i?n.i(f.a)(c,{path:i,strict:a,exact:u}):s.match},e.prototype.componentWillMount=function(){var t=this.props,e=t.component,n=t.render,r=t.children;u()(!(e&&n),"You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored"),u()(!(e&&r),"You should not use <Route component> and <Route children> in the same route; <Route children> will be ignored"),u()(!(n&&r),"You should not use <Route render> and <Route children> in the same route; <Route children> will be ignored")},e.prototype.componentWillReceiveProps=function(t,e){u()(!(t.location&&!this.props.location),'<Route> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),u()(!(!t.location&&this.props.location),'<Route> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.'),this.setState({match:this.computeMatch(t,e.router)})},e.prototype.render=function(){var t=this.state.match,e=this.props,n=e.children,r=e.component,o=e.render,i=this.context.router,a=i.history,u=i.route,s=i.staticContext,l=this.props.location||u.location,p={match:t,location:l,history:a,staticContext:s};return r?t?c.a.createElement(r,p):null:o?t?o(p):null:n?"function"==typeof n?n(p):!Array.isArray(n)||n.length?c.a.Children.only(n):null:null},e}(c.a.Component);d.propTypes={computedMatch:p.a.object,path:p.a.string,exact:p.a.bool,strict:p.a.bool,component:p.a.func,render:p.a.func,children:p.a.oneOfType([p.a.func,p.a.node]),location:p.a.object},d.contextTypes={router:p.a.shape({history:p.a.object.isRequired,route:p.a.object.isRequired,staticContext:p.a.object})},d.childContextTypes={router:p.a.object.isRequired},e.a=d},function(t,e,n){"use strict";function r(t){var e=Function.prototype.toString,n=Object.prototype.hasOwnProperty,r=RegExp("^"+e.call(n).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");try{var o=e.call(t);return r.test(o)}catch(t){return!1}}function o(t){var e=c(t);if(e){var n=e.childIDs;l(t),n.forEach(o)}}function i(t,e,n){return"\n in "+(t||"Unknown")+(e?" (at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+")":n?" (created by "+n+")":"")}function a(t){return null==t?"#empty":"string"==typeof t||"number"==typeof t?"#text":"string"==typeof t.type?t.type:t.type.displayName||t.type.name||"Unknown"}function u(t){var e,n=S.getDisplayName(t),r=S.getElement(t),o=S.getOwnerID(t);return o&&(e=S.getDisplayName(o)),i(n,r&&r._source,e)}var s,c,l,p,f,h,d,v=n(24),y=n(14),m=(n(0),n(3),"function"==typeof Array.from&&"function"==typeof Map&&r(Map)&&null!=Map.prototype&&"function"==typeof Map.prototype.keys&&r(Map.prototype.keys)&&"function"==typeof Set&&r(Set)&&null!=Set.prototype&&"function"==typeof Set.prototype.keys&&r(Set.prototype.keys));if(m){var g=new Map,_=new Set;s=function(t,e){g.set(t,e)},c=function(t){return g.get(t)},l=function(t){g.delete(t)},p=function(){return Array.from(g.keys())},f=function(t){_.add(t)},h=function(t){_.delete(t)},d=function(){return Array.from(_.keys())}}else{var b={},w={},E=function(t){return"."+t},C=function(t){return parseInt(t.substr(1),10)};s=function(t,e){var n=E(t);b[n]=e},c=function(t){var e=E(t);return b[e]},l=function(t){var e=E(t);delete b[e]},p=function(){return Object.keys(b).map(C)},f=function(t){var e=E(t);w[e]=!0},h=function(t){var e=E(t);delete w[e]},d=function(){return Object.keys(w).map(C)}}var x=[],S={onSetChildren:function(t,e){var n=c(t);n||v("144"),n.childIDs=e;for(var r=0;r<e.length;r++){var o=e[r],i=c(o);i||v("140"),null==i.childIDs&&"object"==typeof i.element&&null!=i.element&&v("141"),i.isMounted||v("71"),null==i.parentID&&(i.parentID=t),i.parentID!==t&&v("142",o,i.parentID,t)}},onBeforeMountComponent:function(t,e,n){s(t,{element:e,parentID:n,text:null,childIDs:[],isMounted:!1,updateCount:0})},onBeforeUpdateComponent:function(t,e){var n=c(t);n&&n.isMounted&&(n.element=e)},onMountComponent:function(t){var e=c(t);e||v("144"),e.isMounted=!0,0===e.parentID&&f(t)},onUpdateComponent:function(t){var e=c(t);e&&e.isMounted&&e.updateCount++},onUnmountComponent:function(t){var e=c(t);if(e){e.isMounted=!1;0===e.parentID&&h(t)}x.push(t)},purgeUnmountedComponents:function(){if(!S._preventPurging){for(var t=0;t<x.length;t++){o(x[t])}x.length=0}},isMounted:function(t){var e=c(t);return!!e&&e.isMounted},getCurrentStackAddendum:function(t){var e="";if(t){var n=a(t),r=t._owner;e+=i(n,t._source,r&&r.getName())}var o=y.current,u=o&&o._debugID;return e+=S.getStackAddendumByID(u)},getStackAddendumByID:function(t){for(var e="";t;)e+=u(t),t=S.getParentID(t);return e},getChildIDs:function(t){var e=c(t);return e?e.childIDs:[]},getDisplayName:function(t){var e=S.getElement(t);return e?a(e):null},getElement:function(t){var e=c(t);return e?e.element:null},getOwnerID:function(t){var e=S.getElement(t);return e&&e._owner?e._owner._debugID:null},getParentID:function(t){var e=c(t);return e?e.parentID:null},getSource:function(t){var e=c(t),n=e?e.element:null;return null!=n?n._source:null},getText:function(t){var e=S.getElement(t);return"string"==typeof e?e:"number"==typeof e?""+e:null},getUpdateCount:function(t){var e=c(t);return e?e.updateCount:0},getRootIDs:d,getRegisteredIDs:p};t.exports=S},function(t,e,n){"use strict";var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;t.exports=r},function(t,e,n){"use strict";var r=!1;t.exports=r},function(t,e,n){"use strict";function r(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];if(0===e.length)return function(t){return t};if(1===e.length)return e[0];var r=e[e.length-1],o=e.slice(0,-1);return function(){return o.reduceRight(function(t,e){return e(t)},r.apply(void 0,arguments))}}e.a=r},function(t,e,n){"use strict";function r(t,e,i){function s(){g===m&&(g=m.slice())}function c(){return y}function l(t){if("function"!=typeof t)throw new Error("Expected listener to be a function.");var e=!0;return s(),g.push(t),function(){if(e){e=!1,s();var n=g.indexOf(t);g.splice(n,1)}}}function p(t){if(!n.i(o.a)(t))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===t.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(_)throw new Error("Reducers may not dispatch actions.");try{_=!0,y=v(y,t)}finally{_=!1}for(var e=m=g,r=0;r<e.length;r++)e[r]();return t}function f(t){if("function"!=typeof t)throw new Error("Expected the nextReducer to be a function.");v=t,p({type:u.INIT})}function h(){var t,e=l;return t={subscribe:function(t){function n(){t.next&&t.next(c())}if("object"!=typeof t)throw new TypeError("Expected the observer to be an object.");return n(),{unsubscribe:e(n)}}},t[a.a]=function(){return this},t}var d;if("function"==typeof e&&void 0===i&&(i=e,e=void 0),void 0!==i){if("function"!=typeof i)throw new Error("Expected the enhancer to be a function.");return i(r)(t,e)}if("function"!=typeof t)throw new Error("Expected the reducer to be a function.");var v=t,y=e,m=[],g=m,_=!1;return p({type:u.INIT}),d={dispatch:p,subscribe:l,getState:c,replaceReducer:f},d[a.a]=h,d}n.d(e,"b",function(){return u}),e.a=r;var o=n(47),i=n(285),a=n.n(i),u={INIT:"@@redux/INIT"}},function(t,e,n){"use strict"},,,,,,,,,,,,,,,,,,,,,,function(t,e,n){function r(t){if(t)return o(t)}function o(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}t.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var r,o=0;o<n.length;o++)if((r=n[o])===e||r.fn===e){n.splice(o,1);break}return this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),n=this._callbacks["$"+t];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,e)}return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e,n){"use strict";function r(t){return t.replace(o,function(t,e){return e.toUpperCase()})}var o=/-(.)/g;t.exports=r},function(t,e,n){"use strict";function r(t){return o(t.replace(i,"ms-"))}var o=n(142),i=/^-ms-/;t.exports=r},function(t,e,n){"use strict";function r(t,e){return!(!t||!e)&&(t===e||!o(t)&&(o(e)?r(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}var o=n(152);t.exports=r},function(t,e,n){"use strict";function r(t){var e=t.length;if((Array.isArray(t)||"object"!=typeof t&&"function"!=typeof t)&&a(!1),"number"!=typeof e&&a(!1),0===e||e-1 in t||a(!1),"function"==typeof t.callee&&a(!1),t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(t){}for(var n=Array(e),r=0;r<e;r++)n[r]=t[r];return n}function o(t){return!!t&&("object"==typeof t||"function"==typeof t)&&"length"in t&&!("setInterval"in t)&&"number"!=typeof t.nodeType&&(Array.isArray(t)||"callee"in t||"item"in t)}function i(t){return o(t)?Array.isArray(t)?t.slice():r(t):[t]}var a=n(0);t.exports=i},function(t,e,n){"use strict";function r(t){var e=t.match(l);return e&&e[1].toLowerCase()}function o(t,e){var n=c;c||s(!1);var o=r(t),i=o&&u(o);if(i){n.innerHTML=i[1]+t+i[2];for(var l=i[0];l--;)n=n.lastChild}else n.innerHTML=t;var p=n.getElementsByTagName("script");p.length&&(e||s(!1),a(p).forEach(e));for(var f=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return f}var i=n(7),a=n(145),u=n(147),s=n(0),c=i.canUseDOM?document.createElement("div"):null,l=/^\s*<(\w+)/;t.exports=o},function(t,e,n){"use strict";function r(t){return a||i(!1),f.hasOwnProperty(t)||(t="*"),u.hasOwnProperty(t)||(a.innerHTML="*"===t?"<link />":"<"+t+"></"+t+">",u[t]=!a.firstChild),u[t]?f[t]:null}var o=n(7),i=n(0),a=o.canUseDOM?document.createElement("div"):null,u={},s=[1,'<select multiple="true">',"</select>"],c=[1,"<table>","</table>"],l=[3,"<table><tbody><tr>","</tr></tbody></table>"],p=[1,'<svg xmlns="http://www.w3.org/2000/svg">',"</svg>"],f={"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:s,option:s,caption:c,colgroup:c,tbody:c,tfoot:c,thead:c,td:l,th:l};["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"].forEach(function(t){f[t]=p,u[t]=!0}),t.exports=r},function(t,e,n){"use strict";function r(t){return t.Window&&t instanceof t.Window?{x:t.pageXOffset||t.document.documentElement.scrollLeft,y:t.pageYOffset||t.document.documentElement.scrollTop}:{x:t.scrollLeft,y:t.scrollTop}}t.exports=r},function(t,e,n){"use strict";function r(t){return t.replace(o,"-$1").toLowerCase()}var o=/([A-Z])/g;t.exports=r},function(t,e,n){"use strict";function r(t){return o(t).replace(i,"-ms-")}var o=n(149),i=/^ms-/;t.exports=r},function(t,e,n){"use strict";function r(t){var e=t?t.ownerDocument||t:document,n=e.defaultView||window;return!(!t||!("function"==typeof n.Node?t instanceof n.Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}t.exports=r},function(t,e,n){"use strict";function r(t){return o(t)&&3==t.nodeType}var o=n(151);t.exports=r},function(t,e,n){"use strict";function r(t){var e={};return function(n){return e.hasOwnProperty(n)||(e[n]=t.call(this,n)),e[n]}}t.exports=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=n(17),u=r(a),s=n(27),c=r(s),l=n(45),p=n(26),f=n(46),h=r(f),d=n(84),v=function(){try{return window.history.state||{}}catch(t){return{}}},y=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,c.default)(d.canUseDOM,"Browser history needs a DOM");var e=window.history,n=(0,d.supportsHistory)(),r=!(0,d.supportsPopStateOnHashChange)(),a=t.forceRefresh,s=void 0!==a&&a,f=t.getUserConfirmation,y=void 0===f?d.getConfirmation:f,m=t.keyLength,g=void 0===m?6:m,_=t.basename?(0,p.stripTrailingSlash)((0,p.addLeadingSlash)(t.basename)):"",b=function(t){var e=t||{},n=e.key,r=e.state,o=window.location,a=o.pathname,u=o.search,s=o.hash,c=a+u+s;return _&&(c=(0,p.stripPrefix)(c,_)),i({},(0,p.parsePath)(c),{state:r,key:n})},w=function(){return Math.random().toString(36).substr(2,g)},E=(0,h.default)(),C=function(t){i(B,t),B.length=e.length,E.notifyListeners(B.location,B.action)},x=function(t){(0,d.isExtraneousPopstateEvent)(t)||T(b(t.state))},S=function(){T(b(v()))},O=!1,T=function(t){if(O)O=!1,C();else{E.confirmTransitionTo(t,"POP",y,function(e){e?C({action:"POP",location:t}):P(t)})}},P=function(t){var e=B.location,n=I.indexOf(e.key);-1===n&&(n=0);var r=I.indexOf(t.key);-1===r&&(r=0);var o=n-r;o&&(O=!0,A(o))},k=b(v()),I=[k.key],M=function(t){return _+(0,p.createPath)(t)},D=function(t,r){(0,u.default)(!("object"===(void 0===t?"undefined":o(t))&&void 0!==t.state&&void 0!==r),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var i=(0,l.createLocation)(t,r,w(),B.location);E.confirmTransitionTo(i,"PUSH",y,function(t){if(t){var r=M(i),o=i.key,a=i.state;if(n)if(e.pushState({key:o,state:a},null,r),s)window.location.href=r;else{var c=I.indexOf(B.location.key),l=I.slice(0,-1===c?0:c+1);l.push(i.key),I=l,C({action:"PUSH",location:i})}else(0,u.default)(void 0===a,"Browser history cannot push state in browsers that do not support HTML5 history"),window.location.href=r}})},R=function(t,r){(0,u.default)(!("object"===(void 0===t?"undefined":o(t))&&void 0!==t.state&&void 0!==r),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var i=(0,l.createLocation)(t,r,w(),B.location);E.confirmTransitionTo(i,"REPLACE",y,function(t){if(t){var r=M(i),o=i.key,a=i.state;if(n)if(e.replaceState({key:o,state:a},null,r),s)window.location.replace(r);else{var c=I.indexOf(B.location.key);-1!==c&&(I[c]=i.key),C({action:"REPLACE",location:i})}else(0,u.default)(void 0===a,"Browser history cannot replace state in browsers that do not support HTML5 history"),window.location.replace(r)}})},A=function(t){e.go(t)},N=function(){return A(-1)},j=function(){return A(1)},L=0,U=function(t){L+=t,1===L?((0,d.addEventListener)(window,"popstate",x),r&&(0,d.addEventListener)(window,"hashchange",S)):0===L&&((0,d.removeEventListener)(window,"popstate",x),r&&(0,d.removeEventListener)(window,"hashchange",S))},F=!1,q=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=E.setPrompt(t);return F||(U(1),F=!0),function(){return F&&(F=!1,U(-1)),e()}},z=function(t){var e=E.appendListener(t);return U(1),function(){U(-1),e()}},B={length:e.length,action:"POP",location:k,createHref:M,push:D,replace:R,go:A,goBack:N,goForward:j,block:q,listen:z};return B};e.default=y},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=n(17),a=r(i),u=n(27),s=r(u),c=n(45),l=n(26),p=n(46),f=r(p),h=n(84),d={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!/"+(0,l.stripLeadingSlash)(t)},decodePath:function(t){return"!"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:l.stripLeadingSlash,decodePath:l.addLeadingSlash},slash:{encodePath:l.addLeadingSlash,decodePath:l.addLeadingSlash}},v=function(){var t=window.location.href,e=t.indexOf("#");return-1===e?"":t.substring(e+1)},y=function(t){return window.location.hash=t},m=function(t){var e=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,e>=0?e:0)+"#"+t)},g=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.default)(h.canUseDOM,"Hash history needs a DOM");var e=window.history,n=(0,h.supportsGoWithoutReloadUsingHash)(),r=t.getUserConfirmation,i=void 0===r?h.getConfirmation:r,u=t.hashType,p=void 0===u?"slash":u,g=t.basename?(0,l.stripTrailingSlash)((0,l.addLeadingSlash)(t.basename)):"",_=d[p],b=_.encodePath,w=_.decodePath,E=function(){var t=w(v());return g&&(t=(0,l.stripPrefix)(t,g)),(0,l.parsePath)(t)},C=(0,f.default)(),x=function(t){o(V,t),V.length=e.length,C.notifyListeners(V.location,V.action)},S=!1,O=null,T=function(){var t=v(),e=b(t);if(t!==e)m(e);else{var n=E(),r=V.location;if(!S&&(0,c.locationsAreEqual)(r,n))return;if(O===(0,l.createPath)(n))return;O=null,P(n)}},P=function(t){if(S)S=!1,x();else{C.confirmTransitionTo(t,"POP",i,function(e){e?x({action:"POP",location:t}):k(t)})}},k=function(t){var e=V.location,n=R.lastIndexOf((0,l.createPath)(e));-1===n&&(n=0);var r=R.lastIndexOf((0,l.createPath)(t));-1===r&&(r=0);var o=n-r;o&&(S=!0,L(o))},I=v(),M=b(I);I!==M&&m(M);var D=E(),R=[(0,l.createPath)(D)],A=function(t){return"#"+b(g+(0,l.createPath)(t))},N=function(t,e){(0,a.default)(void 0===e,"Hash history cannot push state; it is ignored");var n=(0,c.createLocation)(t,void 0,void 0,V.location);C.confirmTransitionTo(n,"PUSH",i,function(t){if(t){var e=(0,l.createPath)(n),r=b(g+e);if(v()!==r){O=e,y(r);var o=R.lastIndexOf((0,l.createPath)(V.location)),i=R.slice(0,-1===o?0:o+1);i.push(e),R=i,x({action:"PUSH",location:n})}else(0,a.default)(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),x()}})},j=function(t,e){(0,a.default)(void 0===e,"Hash history cannot replace state; it is ignored");var n=(0,c.createLocation)(t,void 0,void 0,V.location);C.confirmTransitionTo(n,"REPLACE",i,function(t){if(t){var e=(0,l.createPath)(n),r=b(g+e);v()!==r&&(O=e,m(r));var o=R.indexOf((0,l.createPath)(V.location));-1!==o&&(R[o]=e),x({action:"REPLACE",location:n})}})},L=function(t){(0,a.default)(n,"Hash history go(n) causes a full page reload in this browser"),e.go(t)},U=function(){return L(-1)},F=function(){return L(1)},q=0,z=function(t){q+=t,1===q?(0,h.addEventListener)(window,"hashchange",T):0===q&&(0,h.removeEventListener)(window,"hashchange",T)},B=!1,H=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=C.setPrompt(t);return B||(z(1),B=!0),function(){return B&&(B=!1,z(-1)),e()}},W=function(t){var e=C.appendListener(t);return z(1),function(){z(-1),e()}},V={length:e.length,action:"POP",location:D,createHref:A,push:N,replace:j,go:L,goBack:U,goForward:F,block:H,listen:W};return V};e.default=g},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=n(17),u=r(a),s=n(26),c=n(45),l=n(46),p=r(l),f=function(t,e,n){return Math.min(Math.max(t,e),n)},h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.getUserConfirmation,n=t.initialEntries,r=void 0===n?["/"]:n,a=t.initialIndex,l=void 0===a?0:a,h=t.keyLength,d=void 0===h?6:h,v=(0,p.default)(),y=function(t){i(k,t),k.length=k.entries.length,v.notifyListeners(k.location,k.action)},m=function(){return Math.random().toString(36).substr(2,d)},g=f(l,0,r.length-1),_=r.map(function(t){return"string"==typeof t?(0,c.createLocation)(t,void 0,m()):(0,c.createLocation)(t,void 0,t.key||m())}),b=s.createPath,w=function(t,n){(0,u.default)(!("object"===(void 0===t?"undefined":o(t))&&void 0!==t.state&&void 0!==n),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var r=(0,c.createLocation)(t,n,m(),k.location);v.confirmTransitionTo(r,"PUSH",e,function(t){if(t){var e=k.index,n=e+1,o=k.entries.slice(0);o.length>n?o.splice(n,o.length-n,r):o.push(r),y({action:"PUSH",location:r,index:n,entries:o})}})},E=function(t,n){(0,u.default)(!("object"===(void 0===t?"undefined":o(t))&&void 0!==t.state&&void 0!==n),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var r=(0,c.createLocation)(t,n,m(),k.location);v.confirmTransitionTo(r,"REPLACE",e,function(t){t&&(k.entries[k.index]=r,y({action:"REPLACE",location:r}))})},C=function(t){var n=f(k.index+t,0,k.entries.length-1),r=k.entries[n];v.confirmTransitionTo(r,"POP",e,function(t){t?y({action:"POP",location:r,index:n}):y()})},x=function(){return C(-1)},S=function(){return C(1)},O=function(t){var e=k.index+t;return e>=0&&e<k.entries.length},T=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return v.setPrompt(t)},P=function(t){return v.appendListener(t)},k={length:_.length,action:"POP",location:_[g],index:g,entries:_,createHref:b,push:w,replace:E,go:C,goBack:x,goForward:S,canGo:O,block:T,listen:P};return k};e.default=h},function(t,e,n){"use strict";function r(t){return null==t?void 0===t?s:u:c&&c in Object(t)?n.i(i.a)(t):n.i(a.a)(t)}var o=n(86),i=n(160),a=n(161),u="[object Null]",s="[object Undefined]",c=o.a?o.a.toStringTag:void 0;e.a=r},function(t,e,n){"use strict";(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.a=n}).call(e,n(39))},function(t,e,n){"use strict";var r=n(162),o=n.i(r.a)(Object.getPrototypeOf,Object);e.a=o},function(t,e,n){"use strict";function r(t){var e=a.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var o=u.call(t);return r&&(e?t[s]=n:delete t[s]),o}var o=n(86),i=Object.prototype,a=i.hasOwnProperty,u=i.toString,s=o.a?o.a.toStringTag:void 0;e.a=r},function(t,e,n){"use strict";function r(t){return i.call(t)}var o=Object.prototype,i=o.toString;e.a=r},function(t,e,n){"use strict";function r(t,e){return function(n){return t(e(n))}}e.a=r},function(t,e,n){"use strict";var r=n(158),o="object"==typeof self&&self&&self.Object===Object&&self,i=r.a||o||Function("return this")();e.a=i},function(t,e,n){"use strict";function r(t){return null!=t&&"object"==typeof t}e.a=r},function(t,e,n){var r,o,i;!function(n,a){"use strict";"object"==typeof t&&"object"==typeof t.exports?t.exports=a():(o=[],r=a,void 0!==(i="function"==typeof r?r.apply(e,o):r)&&(t.exports=i))}(0,function(){"use strict";function t(t){if(!t)return!0;if(i(t)&&0===t.length)return!0;if(!r(t)){for(var e in t)if(p.call(t,e))return!1;return!0}return!1}function e(t){return l.call(t)}function n(t){return"number"==typeof t||"[object Number]"===e(t)}function r(t){return"string"==typeof t||"[object String]"===e(t)}function o(t){return"object"==typeof t&&"[object Object]"===e(t)}function i(t){return"object"==typeof t&&"number"==typeof t.length&&"[object Array]"===e(t)}function a(t){return"boolean"==typeof t||"[object Boolean]"===e(t)}function u(t){var e=parseInt(t);return e.toString()===t?e:t}function s(e,o,i,a){if(n(o)&&(o=[o]),t(o))return e;if(r(o))return s(e,o.split(".").map(u),i,a);var c=o[0];if(1===o.length){var l=e[c];return void 0!==l&&a||(e[c]=i),l}return void 0===e[c]&&(n(o[1])?e[c]=[]:e[c]={}),s(e[c],o.slice(1),i,a)}function c(e,o){if(n(o)&&(o=[o]),!t(e)){if(t(o))return e;if(r(o))return c(e,o.split("."));var a=u(o[0]),s=e[a];if(1===o.length)void 0!==s&&(i(e)?e.splice(a,1):delete e[a]);else if(void 0!==e[a])return c(e[a],o.slice(1));return e}}var l=Object.prototype.toString,p=Object.prototype.hasOwnProperty,f=function(t){return Object.keys(f).reduce(function(e,n){return"function"==typeof f[n]&&(e[n]=f[n].bind(f,t)),e},{})};return f.has=function(e,a){if(t(e))return!1;if(n(a)?a=[a]:r(a)&&(a=a.split(".")),t(a)||0===a.length)return!1;for(var u=0;u<a.length;u++){var s=a[u];if(!o(e)&&!i(e)||!p.call(e,s))return!1;e=e[s]}return!0},f.ensureExists=function(t,e,n){return s(t,e,n,!0)},f.set=function(t,e,n,r){return s(t,e,n,r)},f.insert=function(t,e,n,r){var o=f.get(t,e);r=~~r,i(o)||(o=[],f.set(t,e,o)),o.splice(r,0,n)},f.empty=function(e,u){if(t(u))return e;if(!t(e)){var s,c;if(!(s=f.get(e,u)))return e;if(r(s))return f.set(e,u,"");if(a(s))return f.set(e,u,!1);if(n(s))return f.set(e,u,0);if(i(s))s.length=0;else{if(!o(s))return f.set(e,u,null);for(c in s)p.call(s,c)&&delete s[c]}}},f.push=function(t,e){var n=f.get(t,e);i(n)||(n=[],f.set(t,e,n)),n.push.apply(n,Array.prototype.slice.call(arguments,2))},f.coalesce=function(t,e,n){for(var r,o=0,i=e.length;o<i;o++)if(void 0!==(r=f.get(t,e[o])))return r;return n},f.get=function(e,o,i){if(n(o)&&(o=[o]),t(o))return e;if(t(e))return i;if(r(o))return f.get(e,o.split("."),i);var a=u(o[0]);return 1===o.length?void 0===e[a]?i:e[a]:f.get(e[a],o.slice(1),i)},f.del=function(t,e){return c(t,e)},f})},function(t,e,n){function r(t,e){for(var n,r=[],o=0,i=0,a="",u=e&&e.delimiter||"/";null!=(n=g.exec(t));){var l=n[0],p=n[1],f=n.index;if(a+=t.slice(i,f),i=f+l.length,p)a+=p[1];else{var h=t[i],d=n[2],v=n[3],y=n[4],m=n[5],_=n[6],b=n[7];a&&(r.push(a),a="");var w=null!=d&&null!=h&&h!==d,E="+"===_||"*"===_,C="?"===_||"*"===_,x=n[2]||u,S=y||m;r.push({name:v||o++,prefix:d||"",delimiter:x,optional:C,repeat:E,partial:w,asterisk:!!b,pattern:S?c(S):b?".*":"[^"+s(x)+"]+?"})}}return i<t.length&&(a+=t.substr(i)),a&&r.push(a),r}function o(t,e){return u(r(t,e))}function i(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function a(t){return encodeURI(t).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function u(t){for(var e=new Array(t.length),n=0;n<t.length;n++)"object"==typeof t[n]&&(e[n]=new RegExp("^(?:"+t[n].pattern+")$"));return function(n,r){for(var o="",u=n||{},s=r||{},c=s.pretty?i:encodeURIComponent,l=0;l<t.length;l++){var p=t[l];if("string"!=typeof p){var f,h=u[p.name];if(null==h){if(p.optional){p.partial&&(o+=p.prefix);continue}throw new TypeError('Expected "'+p.name+'" to be defined')}if(m(h)){if(!p.repeat)throw new TypeError('Expected "'+p.name+'" to not repeat, but received `'+JSON.stringify(h)+"`");if(0===h.length){if(p.optional)continue;throw new TypeError('Expected "'+p.name+'" to not be empty')}for(var d=0;d<h.length;d++){if(f=c(h[d]),!e[l].test(f))throw new TypeError('Expected all "'+p.name+'" to match "'+p.pattern+'", but received `'+JSON.stringify(f)+"`");o+=(0===d?p.prefix:p.delimiter)+f}}else{if(f=p.asterisk?a(h):c(h),!e[l].test(f))throw new TypeError('Expected "'+p.name+'" to match "'+p.pattern+'", but received "'+f+'"');o+=p.prefix+f}}else o+=p}return o}}function s(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function c(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function l(t,e){return t.keys=e,t}function p(t){return t.sensitive?"":"i"}function f(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return l(t,e)}function h(t,e,n){for(var r=[],o=0;o<t.length;o++)r.push(y(t[o],e,n).source);return l(new RegExp("(?:"+r.join("|")+")",p(n)),e)}function d(t,e,n){return v(r(t,n),e,n)}function v(t,e,n){m(e)||(n=e||n,e=[]),n=n||{};for(var r=n.strict,o=!1!==n.end,i="",a=0;a<t.length;a++){var u=t[a];if("string"==typeof u)i+=s(u);else{var c=s(u.prefix),f="(?:"+u.pattern+")";e.push(u),u.repeat&&(f+="(?:"+c+f+")*"),f=u.optional?u.partial?c+"("+f+")?":"(?:"+c+"("+f+"))?":c+"("+f+")",i+=f}}var h=s(n.delimiter||"/"),d=i.slice(-h.length)===h;return r||(i=(d?i.slice(0,-h.length):i)+"(?:"+h+"(?=$))?"),i+=o?"$":r&&d?"":"(?="+h+"|$)",l(new RegExp("^"+i,p(n)),e)}function y(t,e,n){return m(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?f(t,e):m(t)?h(t,e,n):d(t,e,n)}var m=n(167);t.exports=y,t.exports.parse=r,t.exports.compile=o,t.exports.tokensToFunction=u,t.exports.tokensToRegExp=v;var g=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g")},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,n){"use strict";function r(t,e,n,r,o){}t.exports=r},function(t,e,n){"use strict";var r=n(9),o=n(0);t.exports=function(){function t(){o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e};return n.checkPropTypes=r,n.PropTypes=n,n}},function(t,e,n){"use strict";var r=n(9),o=n(0),i=n(3),a=n(171),u=n(168);t.exports=function(t,e){function n(t){var e=t&&(x&&t[x]||t[S]);if("function"==typeof e)return e}function s(t,e){return t===e?0!==t||1/t==1/e:t!==t&&e!==e}function c(t){this.message=t,this.stack=""}function l(t){function n(n,r,i,u,s,l,p){if(u=u||O,l=l||i,p!==a)if(e)o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else;return null==r[i]?n?new c(null===r[i]?"The "+s+" `"+l+"` is marked as required in `"+u+"`, but its value is `null`.":"The "+s+" `"+l+"` is marked as required in `"+u+"`, but its value is `undefined`."):null:t(r,i,u,s,l)}var r=n.bind(null,!1);return r.isRequired=n.bind(null,!0),r}function p(t){function e(e,n,r,o,i,a){var u=e[n];if(b(u)!==t)return new c("Invalid "+o+" `"+i+"` of type `"+w(u)+"` supplied to `"+r+"`, expected `"+t+"`.");return null}return l(e)}function f(t){function e(e,n,r,o,i){if("function"!=typeof t)return new c("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=e[n];if(!Array.isArray(u)){return new c("Invalid "+o+" `"+i+"` of type `"+b(u)+"` supplied to `"+r+"`, expected an array.")}for(var s=0;s<u.length;s++){var l=t(u,s,r,o,i+"["+s+"]",a);if(l instanceof Error)return l}return null}return l(e)}function h(t){function e(e,n,r,o,i){if(!(e[n]instanceof t)){var a=t.name||O;return new c("Invalid "+o+" `"+i+"` of type `"+C(e[n])+"` supplied to `"+r+"`, expected instance of `"+a+"`.")}return null}return l(e)}function d(t){function e(e,n,r,o,i){for(var a=e[n],u=0;u<t.length;u++)if(s(a,t[u]))return null;return new c("Invalid "+o+" `"+i+"` of value `"+a+"` supplied to `"+r+"`, expected one of "+JSON.stringify(t)+".")}return Array.isArray(t)?l(e):r.thatReturnsNull}function v(t){function e(e,n,r,o,i){if("function"!=typeof t)return new c("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=e[n],s=b(u);if("object"!==s)return new c("Invalid "+o+" `"+i+"` of type `"+s+"` supplied to `"+r+"`, expected an object.");for(var l in u)if(u.hasOwnProperty(l)){var p=t(u,l,r,o,i+"."+l,a);if(p instanceof Error)return p}return null}return l(e)}function y(t){function e(e,n,r,o,i){for(var u=0;u<t.length;u++){if(null==(0,t[u])(e,n,r,o,i,a))return null}return new c("Invalid "+o+" `"+i+"` supplied to `"+r+"`.")}if(!Array.isArray(t))return r.thatReturnsNull;for(var n=0;n<t.length;n++){var o=t[n];if("function"!=typeof o)return i(!1,"Invalid argument supplid to oneOfType. Expected an array of check functions, but received %s at index %s.",E(o),n),r.thatReturnsNull}return l(e)}function m(t){function e(e,n,r,o,i){var u=e[n],s=b(u);if("object"!==s)return new c("Invalid "+o+" `"+i+"` of type `"+s+"` supplied to `"+r+"`, expected `object`.");for(var l in t){var p=t[l];if(p){var f=p(u,l,r,o,i+"."+l,a);if(f)return f}}return null}return l(e)}function g(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(g);if(null===e||t(e))return!0;var r=n(e);if(!r)return!1;var o,i=r.call(e);if(r!==e.entries){for(;!(o=i.next()).done;)if(!g(o.value))return!1}else for(;!(o=i.next()).done;){var a=o.value;if(a&&!g(a[1]))return!1}return!0;default:return!1}}function _(t,e){return"symbol"===t||("Symbol"===e["@@toStringTag"]||"function"==typeof Symbol&&e instanceof Symbol)}function b(t){var e=typeof t;return Array.isArray(t)?"array":t instanceof RegExp?"object":_(e,t)?"symbol":e}function w(t){if(void 0===t||null===t)return""+t;var e=b(t);if("object"===e){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return e}function E(t){var e=w(t);switch(e){case"array":case"object":return"an "+e;case"boolean":case"date":case"regexp":return"a "+e;default:return e}}function C(t){return t.constructor&&t.constructor.name?t.constructor.name:O}var x="function"==typeof Symbol&&Symbol.iterator,S="@@iterator",O="<<anonymous>>",T={array:p("array"),bool:p("boolean"),func:p("function"),number:p("number"),object:p("object"),string:p("string"),symbol:p("symbol"),any:function(){return l(r.thatReturnsNull)}(),arrayOf:f,element:function(){function e(e,n,r,o,i){var a=e[n];if(!t(a)){return new c("Invalid "+o+" `"+i+"` of type `"+b(a)+"` supplied to `"+r+"`, expected a single ReactElement.")}return null}return l(e)}(),instanceOf:h,node:function(){function t(t,e,n,r,o){return g(t[e])?null:new c("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")}return l(t)}(),objectOf:v,oneOf:d,oneOfType:y,shape:m};return c.prototype=Error.prototype,T.checkPropTypes=u,T.PropTypes=T,T}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){"use strict";var r={Properties:{"aria-current":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},DOMAttributeNames:{},DOMPropertyNames:{}};t.exports=r},function(t,e,n){"use strict";var r=n(6),o=n(82),i={focusDOMComponent:function(){o(r.getNodeFromInstance(this))}};t.exports=i},function(t,e,n){"use strict";function r(t){return(t.ctrlKey||t.altKey||t.metaKey)&&!(t.ctrlKey&&t.altKey)}function o(t){switch(t){case"topCompositionStart":return S.compositionStart;case"topCompositionEnd":return S.compositionEnd;case"topCompositionUpdate":return S.compositionUpdate}}function i(t,e){return"topKeyDown"===t&&e.keyCode===g}function a(t,e){switch(t){case"topKeyUp":return-1!==m.indexOf(e.keyCode);case"topKeyDown":return e.keyCode!==g;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function u(t){var e=t.detail;return"object"==typeof e&&"data"in e?e.data:null}function s(t,e,n,r){var s,c;if(_?s=o(t):T?a(t,n)&&(s=S.compositionEnd):i(t,n)&&(s=S.compositionStart),!s)return null;E&&(T||s!==S.compositionStart?s===S.compositionEnd&&T&&(c=T.getData()):T=d.getPooled(r));var l=v.getPooled(s,e,n,r);if(c)l.data=c;else{var p=u(n);null!==p&&(l.data=p)}return f.accumulateTwoPhaseDispatches(l),l}function c(t,e){switch(t){case"topCompositionEnd":return u(e);case"topKeyPress":return e.which!==C?null:(O=!0,x);case"topTextInput":var n=e.data;return n===x&&O?null:n;default:return null}}function l(t,e){if(T){if("topCompositionEnd"===t||!_&&a(t,e)){var n=T.getData();return d.release(T),T=null,n}return null}switch(t){case"topPaste":return null;case"topKeyPress":return e.which&&!r(e)?String.fromCharCode(e.which):null;case"topCompositionEnd":return E?null:e.data;default:return null}}function p(t,e,n,r){var o;if(!(o=w?c(t,n):l(t,n)))return null;var i=y.getPooled(S.beforeInput,e,n,r);return i.data=o,f.accumulateTwoPhaseDispatches(i),i}var f=n(29),h=n(7),d=n(180),v=n(217),y=n(220),m=[9,13,27,32],g=229,_=h.canUseDOM&&"CompositionEvent"in window,b=null;h.canUseDOM&&"documentMode"in document&&(b=document.documentMode);var w=h.canUseDOM&&"TextEvent"in window&&!b&&!function(){var t=window.opera;return"object"==typeof t&&"function"==typeof t.version&&parseInt(t.version(),10)<=12}(),E=h.canUseDOM&&(!_||b&&b>8&&b<=11),C=32,x=String.fromCharCode(C),S={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},O=!1,T=null,P={eventTypes:S,extractEvents:function(t,e,n,r){return[s(t,e,n,r),p(t,e,n,r)]}};t.exports=P},function(t,e,n){"use strict";var r=n(88),o=n(7),i=(n(10),n(143),n(226)),a=n(150),u=n(153),s=(n(3),u(function(t){return a(t)})),c=!1,l="cssFloat";if(o.canUseDOM){var p=document.createElement("div").style;try{p.font=""}catch(t){c=!0}void 0===document.documentElement.style.cssFloat&&(l="styleFloat")}var f={createMarkupForStyles:function(t,e){var n="";for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];null!=o&&(n+=s(r)+":",n+=i(r,o,e)+";")}return n||null},setValueForStyles:function(t,e,n){var o=t.style;for(var a in e)if(e.hasOwnProperty(a)){var u=i(a,e[a],n);if("float"!==a&&"cssFloat"!==a||(a=l),u)o[a]=u;else{var s=c&&r.shorthandPropertyExpansions[a];if(s)for(var p in s)o[p]="";else o[a]=""}}}};t.exports=f},function(t,e,n){"use strict";function r(t){var e=t.nodeName&&t.nodeName.toLowerCase();return"select"===e||"input"===e&&"file"===t.type}function o(t){var e=x.getPooled(P.change,I,t,S(t));b.accumulateTwoPhaseDispatches(e),C.batchedUpdates(i,e)}function i(t){_.enqueueEvents(t),_.processEventQueue(!1)}function a(t,e){k=t,I=e,k.attachEvent("onchange",o)}function u(){k&&(k.detachEvent("onchange",o),k=null,I=null)}function s(t,e){if("topChange"===t)return e}function c(t,e,n){"topFocus"===t?(u(),a(e,n)):"topBlur"===t&&u()}function l(t,e){k=t,I=e,M=t.value,D=Object.getOwnPropertyDescriptor(t.constructor.prototype,"value"),Object.defineProperty(k,"value",N),k.attachEvent?k.attachEvent("onpropertychange",f):k.addEventListener("propertychange",f,!1)}function p(){k&&(delete k.value,k.detachEvent?k.detachEvent("onpropertychange",f):k.removeEventListener("propertychange",f,!1),k=null,I=null,M=null,D=null)}function f(t){if("value"===t.propertyName){var e=t.srcElement.value;e!==M&&(M=e,o(t))}}function h(t,e){if("topInput"===t)return e}function d(t,e,n){"topFocus"===t?(p(),l(e,n)):"topBlur"===t&&p()}function v(t,e){if(("topSelectionChange"===t||"topKeyUp"===t||"topKeyDown"===t)&&k&&k.value!==M)return M=k.value,I}function y(t){return t.nodeName&&"input"===t.nodeName.toLowerCase()&&("checkbox"===t.type||"radio"===t.type)}function m(t,e){if("topClick"===t)return e}function g(t,e){if(null!=t){var n=t._wrapperState||e._wrapperState;if(n&&n.controlled&&"number"===e.type){var r=""+e.value;e.getAttribute("value")!==r&&e.setAttribute("value",r)}}}var _=n(28),b=n(29),w=n(7),E=n(6),C=n(12),x=n(13),S=n(61),O=n(62),T=n(105),P={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:["topBlur","topChange","topClick","topFocus","topInput","topKeyDown","topKeyUp","topSelectionChange"]}},k=null,I=null,M=null,D=null,R=!1;w.canUseDOM&&(R=O("change")&&(!document.documentMode||document.documentMode>8));var A=!1;w.canUseDOM&&(A=O("input")&&(!document.documentMode||document.documentMode>11));var N={get:function(){return D.get.call(this)},set:function(t){M=""+t,D.set.call(this,t)}},j={eventTypes:P,extractEvents:function(t,e,n,o){var i,a,u=e?E.getNodeFromInstance(e):window;if(r(u)?R?i=s:a=c:T(u)?A?i=h:(i=v,a=d):y(u)&&(i=m),i){var l=i(t,e);if(l){var p=x.getPooled(P.change,l,n,o);return p.type="change",b.accumulateTwoPhaseDispatches(p),p}}a&&a(t,u,e),"topBlur"===t&&g(e,u)}};t.exports=j},function(t,e,n){"use strict";var r=n(4),o=n(19),i=n(7),a=n(146),u=n(9),s=(n(0),{dangerouslyReplaceNodeWithMarkup:function(t,e){if(i.canUseDOM||r("56"),e||r("57"),"HTML"===t.nodeName&&r("58"),"string"==typeof e){var n=a(e,u)[0];t.parentNode.replaceChild(n,t)}else o.replaceChildWithTree(t,e)}});t.exports=s},function(t,e,n){"use strict";var r=["ResponderEventPlugin","SimpleEventPlugin","TapEventPlugin","EnterLeaveEventPlugin","ChangeEventPlugin","SelectEventPlugin","BeforeInputEventPlugin"];t.exports=r},function(t,e,n){"use strict";var r=n(29),o=n(6),i=n(35),a={mouseEnter:{registrationName:"onMouseEnter",dependencies:["topMouseOut","topMouseOver"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["topMouseOut","topMouseOver"]}},u={eventTypes:a,extractEvents:function(t,e,n,u){if("topMouseOver"===t&&(n.relatedTarget||n.fromElement))return null;if("topMouseOut"!==t&&"topMouseOver"!==t)return null;var s;if(u.window===u)s=u;else{var c=u.ownerDocument;s=c?c.defaultView||c.parentWindow:window}var l,p;if("topMouseOut"===t){l=e;var f=n.relatedTarget||n.toElement;p=f?o.getClosestInstanceFromNode(f):null}else l=null,p=e;if(l===p)return null;var h=null==l?s:o.getNodeFromInstance(l),d=null==p?s:o.getNodeFromInstance(p),v=i.getPooled(a.mouseLeave,l,n,u);v.type="mouseleave",v.target=h,v.relatedTarget=d;var y=i.getPooled(a.mouseEnter,p,n,u);return y.type="mouseenter",y.target=d,y.relatedTarget=h,r.accumulateEnterLeaveDispatches(v,y,l,p),[v,y]}};t.exports=u},function(t,e,n){"use strict";function r(t){this._root=t,this._startText=this.getText(),this._fallbackText=null}var o=n(5),i=n(16),a=n(103);o(r.prototype,{destructor:function(){this._root=null,this._startText=null,this._fallbackText=null},getText:function(){return"value"in this._root?this._root.value:this._root[a()]},getData:function(){if(this._fallbackText)return this._fallbackText;var t,e,n=this._startText,r=n.length,o=this.getText(),i=o.length;for(t=0;t<r&&n[t]===o[t];t++);var a=r-t;for(e=1;e<=a&&n[r-e]===o[i-e];e++);var u=e>1?1-e:void 0;return this._fallbackText=o.slice(t,u),this._fallbackText}}),i.addPoolingTo(r),t.exports=r},function(t,e,n){"use strict";var r=n(20),o=r.injection.MUST_USE_PROPERTY,i=r.injection.HAS_BOOLEAN_VALUE,a=r.injection.HAS_NUMERIC_VALUE,u=r.injection.HAS_POSITIVE_NUMERIC_VALUE,s=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE,c={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+r.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:i,allowTransparency:0,alt:0,as:0,async:i,autoComplete:0,autoPlay:i,capture:i,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:o|i,cite:0,classID:0,className:0,cols:u,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:i,coords:0,crossOrigin:0,data:0,dateTime:0,default:i,defer:i,dir:0,disabled:i,download:s,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:i,formTarget:0,frameBorder:0,headers:0,height:0,hidden:i,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:i,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:o|i,muted:o|i,name:0,nonce:0,noValidate:i,open:i,optimum:0,pattern:0,placeholder:0,playsInline:i,poster:0,preload:0,profile:0,radioGroup:0,readOnly:i,referrerPolicy:0,rel:0,required:i,reversed:i,role:0,rows:u,rowSpan:a,sandbox:0,scope:0,scoped:i,scrolling:0,seamless:i,selected:o|i,shape:0,size:u,sizes:0,span:u,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:a,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:i,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{},DOMMutationMethods:{value:function(t,e){if(null==e)return t.removeAttribute("value");"number"!==t.type||!1===t.hasAttribute("value")?t.setAttribute("value",""+e):t.validity&&!t.validity.badInput&&t.ownerDocument.activeElement!==t&&t.setAttribute("value",""+e)}}};t.exports=c},function(t,e,n){"use strict";(function(e){function r(t,e,n,r){var o=void 0===t[n];null!=e&&o&&(t[n]=i(e,!0))}var o=n(21),i=n(104),a=(n(53),n(63)),u=n(107);n(3);void 0!==e&&n.i({NODE_ENV:"production"});var s={instantiateChildren:function(t,e,n,o){if(null==t)return null;var i={};return u(t,r,i),i},updateChildren:function(t,e,n,r,u,s,c,l,p){if(e||t){var f,h;for(f in e)if(e.hasOwnProperty(f)){h=t&&t[f];var d=h&&h._currentElement,v=e[f];if(null!=h&&a(d,v))o.receiveComponent(h,v,u,l),e[f]=h;else{h&&(r[f]=o.getHostNode(h),o.unmountComponent(h,!1));var y=i(v,!0);e[f]=y;var m=o.mountComponent(y,u,s,c,l,p);n.push(m)}}for(f in t)!t.hasOwnProperty(f)||e&&e.hasOwnProperty(f)||(h=t[f],r[f]=o.getHostNode(h),o.unmountComponent(h,!1))}},unmountChildren:function(t,e){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];o.unmountComponent(r,e)}}};t.exports=s}).call(e,n(48))},function(t,e,n){"use strict";var r=n(49),o=n(190),i={processChildrenUpdates:o.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkup:r.dangerouslyReplaceNodeWithMarkup};t.exports=i},function(t,e,n){"use strict";function r(t){}function o(t){return!(!t.prototype||!t.prototype.isReactComponent)}function i(t){return!(!t.prototype||!t.prototype.isPureReactComponent)}var a=n(4),u=n(5),s=n(22),c=n(55),l=n(14),p=n(56),f=n(30),h=(n(10),n(98)),d=n(21),v=n(25),y=(n(0),n(44)),m=n(63),g=(n(3),{ImpureClass:0,PureClass:1,StatelessFunctional:2});r.prototype.render=function(){var t=f.get(this)._currentElement.type,e=t(this.props,this.context,this.updater);return e};var _=1,b={construct:function(t){this._currentElement=t,this._rootNodeID=0,this._compositeType=null,this._instance=null,this._hostParent=null,this._hostContainerInfo=null,this._updateBatchNumber=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedNodeType=null,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null,this._calledComponentWillUnmount=!1},mountComponent:function(t,e,n,u){this._context=u,this._mountOrder=_++,this._hostParent=e,this._hostContainerInfo=n;var c,l=this._currentElement.props,p=this._processContext(u),h=this._currentElement.type,d=t.getUpdateQueue(),y=o(h),m=this._constructComponent(y,l,p,d);y||null!=m&&null!=m.render?i(h)?this._compositeType=g.PureClass:this._compositeType=g.ImpureClass:(c=m,null===m||!1===m||s.isValidElement(m)||a("105",h.displayName||h.name||"Component"),m=new r(h),this._compositeType=g.StatelessFunctional);m.props=l,m.context=p,m.refs=v,m.updater=d,this._instance=m,f.set(m,this);var b=m.state;void 0===b&&(m.state=b=null),("object"!=typeof b||Array.isArray(b))&&a("106",this.getName()||"ReactCompositeComponent"),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var w;return w=m.unstable_handleError?this.performInitialMountWithErrorHandling(c,e,n,t,u):this.performInitialMount(c,e,n,t,u),m.componentDidMount&&t.getReactMountReady().enqueue(m.componentDidMount,m),w},_constructComponent:function(t,e,n,r){return this._constructComponentWithoutOwner(t,e,n,r)},_constructComponentWithoutOwner:function(t,e,n,r){var o=this._currentElement.type;return t?new o(e,n,r):o(e,n,r)},performInitialMountWithErrorHandling:function(t,e,n,r,o){var i,a=r.checkpoint();try{i=this.performInitialMount(t,e,n,r,o)}catch(u){r.rollback(a),this._instance.unstable_handleError(u),this._pendingStateQueue&&(this._instance.state=this._processPendingState(this._instance.props,this._instance.context)),a=r.checkpoint(),this._renderedComponent.unmountComponent(!0),r.rollback(a),i=this.performInitialMount(t,e,n,r,o)}return i},performInitialMount:function(t,e,n,r,o){var i=this._instance,a=0;i.componentWillMount&&(i.componentWillMount(),this._pendingStateQueue&&(i.state=this._processPendingState(i.props,i.context))),void 0===t&&(t=this._renderValidatedComponent());var u=h.getType(t);this._renderedNodeType=u;var s=this._instantiateReactComponent(t,u!==h.EMPTY);this._renderedComponent=s;var c=d.mountComponent(s,r,e,n,this._processChildContext(o),a);return c},getHostNode:function(){return d.getHostNode(this._renderedComponent)},unmountComponent:function(t){if(this._renderedComponent){var e=this._instance;if(e.componentWillUnmount&&!e._calledComponentWillUnmount)if(e._calledComponentWillUnmount=!0,t){var n=this.getName()+".componentWillUnmount()";p.invokeGuardedCallback(n,e.componentWillUnmount.bind(e))}else e.componentWillUnmount();this._renderedComponent&&(d.unmountComponent(this._renderedComponent,t),this._renderedNodeType=null,this._renderedComponent=null,this._instance=null),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=0,this._topLevelWrapper=null,f.remove(e)}},_maskContext:function(t){var e=this._currentElement.type,n=e.contextTypes;if(!n)return v;var r={};for(var o in n)r[o]=t[o];return r},_processContext:function(t){var e=this._maskContext(t);return e},_processChildContext:function(t){var e,n=this._currentElement.type,r=this._instance;if(r.getChildContext&&(e=r.getChildContext()),e){"object"!=typeof n.childContextTypes&&a("107",this.getName()||"ReactCompositeComponent");for(var o in e)o in n.childContextTypes||a("108",this.getName()||"ReactCompositeComponent",o);return u({},t,e)}return t},_checkContextTypes:function(t,e,n){},receiveComponent:function(t,e,n){var r=this._currentElement,o=this._context;this._pendingElement=null,this.updateComponent(e,r,t,o,n)},performUpdateIfNecessary:function(t){null!=this._pendingElement?d.receiveComponent(this,this._pendingElement,t,this._context):null!==this._pendingStateQueue||this._pendingForceUpdate?this.updateComponent(t,this._currentElement,this._currentElement,this._context,this._context):this._updateBatchNumber=null},updateComponent:function(t,e,n,r,o){var i=this._instance;null==i&&a("136",this.getName()||"ReactCompositeComponent");var u,s=!1;this._context===o?u=i.context:(u=this._processContext(o),s=!0);var c=e.props,l=n.props;e!==n&&(s=!0),s&&i.componentWillReceiveProps&&i.componentWillReceiveProps(l,u);var p=this._processPendingState(l,u),f=!0;this._pendingForceUpdate||(i.shouldComponentUpdate?f=i.shouldComponentUpdate(l,p,u):this._compositeType===g.PureClass&&(f=!y(c,l)||!y(i.state,p))),this._updateBatchNumber=null,f?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,l,p,u,t,o)):(this._currentElement=n,this._context=o,i.props=l,i.state=p,i.context=u)},_processPendingState:function(t,e){var n=this._instance,r=this._pendingStateQueue,o=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!r)return n.state;if(o&&1===r.length)return r[0];for(var i=u({},o?r[0]:n.state),a=o?1:0;a<r.length;a++){var s=r[a];u(i,"function"==typeof s?s.call(n,i,t,e):s)}return i},_performComponentUpdate:function(t,e,n,r,o,i){var a,u,s,c=this._instance,l=Boolean(c.componentDidUpdate);l&&(a=c.props,u=c.state,s=c.context),c.componentWillUpdate&&c.componentWillUpdate(e,n,r),this._currentElement=t,this._context=i,c.props=e,c.state=n,c.context=r,this._updateRenderedComponent(o,i),l&&o.getReactMountReady().enqueue(c.componentDidUpdate.bind(c,a,u,s),c)},_updateRenderedComponent:function(t,e){var n=this._renderedComponent,r=n._currentElement,o=this._renderValidatedComponent(),i=0;if(m(r,o))d.receiveComponent(n,o,t,this._processChildContext(e));else{var a=d.getHostNode(n);d.unmountComponent(n,!1);var u=h.getType(o);this._renderedNodeType=u;var s=this._instantiateReactComponent(o,u!==h.EMPTY);this._renderedComponent=s;var c=d.mountComponent(s,t,this._hostParent,this._hostContainerInfo,this._processChildContext(e),i);this._replaceNodeWithMarkup(a,c,n)}},_replaceNodeWithMarkup:function(t,e,n){c.replaceNodeWithMarkup(t,e,n)},_renderValidatedComponentWithoutOwnerOrContext:function(){var t=this._instance;return t.render()},_renderValidatedComponent:function(){var t;if(this._compositeType!==g.StatelessFunctional){l.current=this;try{t=this._renderValidatedComponentWithoutOwnerOrContext()}finally{l.current=null}}else t=this._renderValidatedComponentWithoutOwnerOrContext();return null===t||!1===t||s.isValidElement(t)||a("109",this.getName()||"ReactCompositeComponent"),t},attachRef:function(t,e){var n=this.getPublicInstance();null==n&&a("110");var r=e.getPublicInstance();(n.refs===v?n.refs={}:n.refs)[t]=r},detachRef:function(t){delete this.getPublicInstance().refs[t]},getName:function(){var t=this._currentElement.type,e=this._instance&&this._instance.constructor;return t.displayName||e&&e.displayName||t.name||e&&e.name||null},getPublicInstance:function(){var t=this._instance;return this._compositeType===g.StatelessFunctional?null:t},_instantiateReactComponent:null};t.exports=b},function(t,e,n){"use strict";var r=n(6),o=n(198),i=n(97),a=n(21),u=n(12),s=n(211),c=n(227),l=n(102),p=n(234);n(3);o.inject();var f={findDOMNode:c,render:i.render,unmountComponentAtNode:i.unmountComponentAtNode,version:s,unstable_batchedUpdates:u.batchedUpdates,unstable_renderSubtreeIntoContainer:p};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:r.getClosestInstanceFromNode,getNodeFromInstance:function(t){return t._renderedComponent&&(t=l(t)),t?r.getNodeFromInstance(t):null}},Mount:i,Reconciler:a});t.exports=f},function(t,e,n){"use strict";function r(t){if(t){var e=t._currentElement._owner||null;if(e){var n=e.getName();if(n)return" This DOM node was rendered by `"+n+"`."}}return""}function o(t,e){e&&(Y[t._tag]&&(null!=e.children||null!=e.dangerouslySetInnerHTML)&&v("137",t._tag,t._currentElement._owner?" Check the render method of "+t._currentElement._owner.getName()+".":""),null!=e.dangerouslySetInnerHTML&&(null!=e.children&&v("60"),"object"==typeof e.dangerouslySetInnerHTML&&z in e.dangerouslySetInnerHTML||v("61")),null!=e.style&&"object"!=typeof e.style&&v("62",r(t)))}function i(t,e,n,r){if(!(r instanceof R)){var o=t._hostContainerInfo,i=o._node&&o._node.nodeType===H,u=i?o._node:o._ownerDocument;U(e,u),r.getReactMountReady().enqueue(a,{inst:t,registrationName:e,listener:n})}}function a(){var t=this;C.putListener(t.inst,t.registrationName,t.listener)}function u(){var t=this;P.postMountWrapper(t)}function s(){var t=this;M.postMountWrapper(t)}function c(){var t=this;k.postMountWrapper(t)}function l(){var t=this;t._rootNodeID||v("63");var e=L(t);switch(e||v("64"),t._tag){case"iframe":case"object":t._wrapperState.listeners=[S.trapBubbledEvent("topLoad","load",e)];break;case"video":case"audio":t._wrapperState.listeners=[];for(var n in W)W.hasOwnProperty(n)&&t._wrapperState.listeners.push(S.trapBubbledEvent(n,W[n],e));break;case"source":t._wrapperState.listeners=[S.trapBubbledEvent("topError","error",e)];break;case"img":t._wrapperState.listeners=[S.trapBubbledEvent("topError","error",e),S.trapBubbledEvent("topLoad","load",e)];break;case"form":t._wrapperState.listeners=[S.trapBubbledEvent("topReset","reset",e),S.trapBubbledEvent("topSubmit","submit",e)];break;case"input":case"select":case"textarea":t._wrapperState.listeners=[S.trapBubbledEvent("topInvalid","invalid",e)]}}function p(){I.postUpdateWrapper(this)}function f(t){G.call($,t)||(X.test(t)||v("65",t),$[t]=!0)}function h(t,e){return t.indexOf("-")>=0||null!=e.is}function d(t){var e=t.type;f(e),this._currentElement=t,this._tag=e.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var v=n(4),y=n(5),m=n(173),g=n(175),_=n(19),b=n(50),w=n(20),E=n(90),C=n(28),x=n(51),S=n(34),O=n(91),T=n(6),P=n(191),k=n(192),I=n(92),M=n(195),D=(n(10),n(204)),R=n(209),A=(n(9),n(37)),N=(n(0),n(62),n(44),n(64),n(3),O),j=C.deleteListener,L=T.getNodeFromInstance,U=S.listenTo,F=x.registrationNameModules,q={string:!0,number:!0},z="__html",B={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},H=11,W={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},V={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},K={listing:!0,pre:!0,textarea:!0},Y=y({menuitem:!0},V),X=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,$={},G={}.hasOwnProperty,Q=1;d.displayName="ReactDOMComponent",d.Mixin={mountComponent:function(t,e,n,r){this._rootNodeID=Q++,this._domID=n._idCounter++,this._hostParent=e,this._hostContainerInfo=n;var i=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},t.getReactMountReady().enqueue(l,this);break;case"input":P.mountWrapper(this,i,e),i=P.getHostProps(this,i),t.getReactMountReady().enqueue(l,this);break;case"option":k.mountWrapper(this,i,e),i=k.getHostProps(this,i);break;case"select":I.mountWrapper(this,i,e),i=I.getHostProps(this,i),t.getReactMountReady().enqueue(l,this);break;case"textarea":M.mountWrapper(this,i,e),i=M.getHostProps(this,i),t.getReactMountReady().enqueue(l,this)}o(this,i);var a,p;null!=e?(a=e._namespaceURI,p=e._tag):n._tag&&(a=n._namespaceURI,p=n._tag),(null==a||a===b.svg&&"foreignobject"===p)&&(a=b.html),a===b.html&&("svg"===this._tag?a=b.svg:"math"===this._tag&&(a=b.mathml)),this._namespaceURI=a;var f;if(t.useCreateElement){var h,d=n._ownerDocument;if(a===b.html)if("script"===this._tag){var v=d.createElement("div"),y=this._currentElement.type;v.innerHTML="<"+y+"></"+y+">",h=v.removeChild(v.firstChild)}else h=i.is?d.createElement(this._currentElement.type,i.is):d.createElement(this._currentElement.type);else h=d.createElementNS(a,this._currentElement.type);T.precacheNode(this,h),this._flags|=N.hasCachedChildNodes,this._hostParent||E.setAttributeForRoot(h),this._updateDOMProperties(null,i,t);var g=_(h);this._createInitialChildren(t,i,r,g),f=g}else{var w=this._createOpenTagMarkupAndPutListeners(t,i),C=this._createContentMarkup(t,i,r);f=!C&&V[this._tag]?w+"/>":w+">"+C+"</"+this._currentElement.type+">"}switch(this._tag){case"input":t.getReactMountReady().enqueue(u,this),i.autoFocus&&t.getReactMountReady().enqueue(m.focusDOMComponent,this);break;case"textarea":t.getReactMountReady().enqueue(s,this),i.autoFocus&&t.getReactMountReady().enqueue(m.focusDOMComponent,this);break;case"select":case"button":i.autoFocus&&t.getReactMountReady().enqueue(m.focusDOMComponent,this);break;case"option":t.getReactMountReady().enqueue(c,this)}return f},_createOpenTagMarkupAndPutListeners:function(t,e){var n="<"+this._currentElement.type;for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];if(null!=o)if(F.hasOwnProperty(r))o&&i(this,r,o,t);else{"style"===r&&(o&&(o=this._previousStyleCopy=y({},e.style)),o=g.createMarkupForStyles(o,this));var a=null;null!=this._tag&&h(this._tag,e)?B.hasOwnProperty(r)||(a=E.createMarkupForCustomAttribute(r,o)):a=E.createMarkupForProperty(r,o),a&&(n+=" "+a)}}return t.renderToStaticMarkup?n:(this._hostParent||(n+=" "+E.createMarkupForRoot()),n+=" "+E.createMarkupForID(this._domID))},_createContentMarkup:function(t,e,n){var r="",o=e.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(r=o.__html);else{var i=q[typeof e.children]?e.children:null,a=null!=i?null:e.children;if(null!=i)r=A(i);else if(null!=a){var u=this.mountChildren(a,t,n);r=u.join("")}}return K[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(t,e,n,r){var o=e.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&_.queueHTML(r,o.__html);else{var i=q[typeof e.children]?e.children:null,a=null!=i?null:e.children;if(null!=i)""!==i&&_.queueText(r,i);else if(null!=a)for(var u=this.mountChildren(a,t,n),s=0;s<u.length;s++)_.queueChild(r,u[s])}},receiveComponent:function(t,e,n){var r=this._currentElement;this._currentElement=t,this.updateComponent(e,r,t,n)},updateComponent:function(t,e,n,r){var i=e.props,a=this._currentElement.props;switch(this._tag){case"input":i=P.getHostProps(this,i),a=P.getHostProps(this,a);break;case"option":i=k.getHostProps(this,i),a=k.getHostProps(this,a);break;case"select":i=I.getHostProps(this,i),a=I.getHostProps(this,a);break;case"textarea":i=M.getHostProps(this,i),a=M.getHostProps(this,a)}switch(o(this,a),this._updateDOMProperties(i,a,t),this._updateDOMChildren(i,a,t,r),this._tag){case"input":P.updateWrapper(this);break;case"textarea":M.updateWrapper(this);break;case"select":t.getReactMountReady().enqueue(p,this)}},_updateDOMProperties:function(t,e,n){var r,o,a;for(r in t)if(!e.hasOwnProperty(r)&&t.hasOwnProperty(r)&&null!=t[r])if("style"===r){var u=this._previousStyleCopy;for(o in u)u.hasOwnProperty(o)&&(a=a||{},a[o]="");this._previousStyleCopy=null}else F.hasOwnProperty(r)?t[r]&&j(this,r):h(this._tag,t)?B.hasOwnProperty(r)||E.deleteValueForAttribute(L(this),r):(w.properties[r]||w.isCustomAttribute(r))&&E.deleteValueForProperty(L(this),r);for(r in e){var s=e[r],c="style"===r?this._previousStyleCopy:null!=t?t[r]:void 0;if(e.hasOwnProperty(r)&&s!==c&&(null!=s||null!=c))if("style"===r)if(s?s=this._previousStyleCopy=y({},s):this._previousStyleCopy=null,c){for(o in c)!c.hasOwnProperty(o)||s&&s.hasOwnProperty(o)||(a=a||{},a[o]="");for(o in s)s.hasOwnProperty(o)&&c[o]!==s[o]&&(a=a||{},a[o]=s[o])}else a=s;else if(F.hasOwnProperty(r))s?i(this,r,s,n):c&&j(this,r);else if(h(this._tag,e))B.hasOwnProperty(r)||E.setValueForAttribute(L(this),r,s);else if(w.properties[r]||w.isCustomAttribute(r)){var l=L(this);null!=s?E.setValueForProperty(l,r,s):E.deleteValueForProperty(l,r)}}a&&g.setValueForStyles(L(this),a,this)},_updateDOMChildren:function(t,e,n,r){var o=q[typeof t.children]?t.children:null,i=q[typeof e.children]?e.children:null,a=t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html,u=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,s=null!=o?null:t.children,c=null!=i?null:e.children,l=null!=o||null!=a,p=null!=i||null!=u;null!=s&&null==c?this.updateChildren(null,n,r):l&&!p&&this.updateTextContent(""),null!=i?o!==i&&this.updateTextContent(""+i):null!=u?a!==u&&this.updateMarkup(""+u):null!=c&&this.updateChildren(c,n,r)},getHostNode:function(){return L(this)},unmountComponent:function(t){switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":var e=this._wrapperState.listeners;if(e)for(var n=0;n<e.length;n++)e[n].remove();break;case"html":case"head":case"body":v("66",this._tag)}this.unmountChildren(t),T.uncacheNode(this),C.deleteAllListeners(this),this._rootNodeID=0,this._domID=0,this._wrapperState=null},getPublicInstance:function(){return L(this)}},y(d.prototype,d.Mixin,D.Mixin),t.exports=d},function(t,e,n){"use strict";function r(t,e){var n={_topLevelWrapper:t,_idCounter:1,_ownerDocument:e?e.nodeType===o?e:e.ownerDocument:null,_node:e,_tag:e?e.nodeName.toLowerCase():null,_namespaceURI:e?e.namespaceURI:null};return n}var o=(n(64),9);t.exports=r},function(t,e,n){"use strict";var r=n(5),o=n(19),i=n(6),a=function(t){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};r(a.prototype,{mountComponent:function(t,e,n,r){var a=n._idCounter++;this._domID=a,this._hostParent=e,this._hostContainerInfo=n;var u=" react-empty: "+this._domID+" ";if(t.useCreateElement){var s=n._ownerDocument,c=s.createComment(u);return i.precacheNode(this,c),o(c)}return t.renderToStaticMarkup?"":"\x3c!--"+u+"--\x3e"},receiveComponent:function(){},getHostNode:function(){return i.getNodeFromInstance(this)},unmountComponent:function(){i.uncacheNode(this)}}),t.exports=a},function(t,e,n){"use strict";var r={useCreateElement:!0,useFiber:!1};t.exports=r},function(t,e,n){"use strict";var r=n(49),o=n(6),i={dangerouslyProcessChildrenUpdates:function(t,e){var n=o.getNodeFromInstance(t);r.processUpdates(n,e)}};t.exports=i},function(t,e,n){"use strict";function r(){this._rootNodeID&&f.updateWrapper(this)}function o(t){return"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}function i(t){var e=this._currentElement.props,n=c.executeOnChange(e,t);p.asap(r,this);var o=e.name;if("radio"===e.type&&null!=o){for(var i=l.getNodeFromInstance(this),u=i;u.parentNode;)u=u.parentNode;for(var s=u.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),f=0;f<s.length;f++){var h=s[f];if(h!==i&&h.form===i.form){var d=l.getInstanceFromNode(h);d||a("90"),p.asap(r,d)}}}return n}var a=n(4),u=n(5),s=n(90),c=n(54),l=n(6),p=n(12),f=(n(0),n(3),{getHostProps:function(t,e){var n=c.getValue(e),r=c.getChecked(e);return u({type:void 0,step:void 0,min:void 0,max:void 0},e,{defaultChecked:void 0,defaultValue:void 0,value:null!=n?n:t._wrapperState.initialValue,checked:null!=r?r:t._wrapperState.initialChecked,onChange:t._wrapperState.onChange})},mountWrapper:function(t,e){var n=e.defaultValue;t._wrapperState={initialChecked:null!=e.checked?e.checked:e.defaultChecked,initialValue:null!=e.value?e.value:n,listeners:null,onChange:i.bind(t),controlled:o(e)}},updateWrapper:function(t){var e=t._currentElement.props,n=e.checked;null!=n&&s.setValueForProperty(l.getNodeFromInstance(t),"checked",n||!1);var r=l.getNodeFromInstance(t),o=c.getValue(e);if(null!=o)if(0===o&&""===r.value)r.value="0";else if("number"===e.type){var i=parseFloat(r.value,10)||0;o!=i&&(r.value=""+o)}else o!=r.value&&(r.value=""+o);else null==e.value&&null!=e.defaultValue&&r.defaultValue!==""+e.defaultValue&&(r.defaultValue=""+e.defaultValue),null==e.checked&&null!=e.defaultChecked&&(r.defaultChecked=!!e.defaultChecked)},postMountWrapper:function(t){var e=t._currentElement.props,n=l.getNodeFromInstance(t);switch(e.type){case"submit":case"reset":break;case"color":case"date":case"datetime":case"datetime-local":case"month":case"time":case"week":n.value="",n.value=n.defaultValue;break;default:n.value=n.value}var r=n.name;""!==r&&(n.name=""),n.defaultChecked=!n.defaultChecked,n.defaultChecked=!n.defaultChecked,""!==r&&(n.name=r)}});t.exports=f},function(t,e,n){"use strict";function r(t){var e="";return i.Children.forEach(t,function(t){null!=t&&("string"==typeof t||"number"==typeof t?e+=t:s||(s=!0))}),e}var o=n(5),i=n(22),a=n(6),u=n(92),s=(n(3),!1),c={mountWrapper:function(t,e,n){var o=null;if(null!=n){var i=n;"optgroup"===i._tag&&(i=i._hostParent),null!=i&&"select"===i._tag&&(o=u.getSelectValueContext(i))}var a=null;if(null!=o){var s;if(s=null!=e.value?e.value+"":r(e.children),a=!1,Array.isArray(o)){for(var c=0;c<o.length;c++)if(""+o[c]===s){a=!0;break}}else a=""+o===s}t._wrapperState={selected:a}},postMountWrapper:function(t){var e=t._currentElement.props;if(null!=e.value){a.getNodeFromInstance(t).setAttribute("value",e.value)}},getHostProps:function(t,e){var n=o({selected:void 0,children:void 0},e);null!=t._wrapperState.selected&&(n.selected=t._wrapperState.selected);var i=r(e.children);return i&&(n.children=i),n}};t.exports=c},function(t,e,n){"use strict";function r(t,e,n,r){return t===n&&e===r}function o(t){var e=document.selection,n=e.createRange(),r=n.text.length,o=n.duplicate();o.moveToElementText(t),o.setEndPoint("EndToStart",n);var i=o.text.length;return{start:i,end:i+r}}function i(t){var e=window.getSelection&&window.getSelection();if(!e||0===e.rangeCount)return null;var n=e.anchorNode,o=e.anchorOffset,i=e.focusNode,a=e.focusOffset,u=e.getRangeAt(0);try{u.startContainer.nodeType,u.endContainer.nodeType}catch(t){return null}var s=r(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset),c=s?0:u.toString().length,l=u.cloneRange();l.selectNodeContents(t),l.setEnd(u.startContainer,u.startOffset);var p=r(l.startContainer,l.startOffset,l.endContainer,l.endOffset),f=p?0:l.toString().length,h=f+c,d=document.createRange();d.setStart(n,o),d.setEnd(i,a);var v=d.collapsed;return{start:v?h:f,end:v?f:h}}function a(t,e){var n,r,o=document.selection.createRange().duplicate();void 0===e.end?(n=e.start,r=n):e.start>e.end?(n=e.end,r=e.start):(n=e.start,r=e.end),o.moveToElementText(t),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function u(t,e){if(window.getSelection){var n=window.getSelection(),r=t[l()].length,o=Math.min(e.start,r),i=void 0===e.end?o:Math.min(e.end,r);if(!n.extend&&o>i){var a=i;i=o,o=a}var u=c(t,o),s=c(t,i);if(u&&s){var p=document.createRange();p.setStart(u.node,u.offset),n.removeAllRanges(),o>i?(n.addRange(p),n.extend(s.node,s.offset)):(p.setEnd(s.node,s.offset),n.addRange(p))}}}var s=n(7),c=n(231),l=n(103),p=s.canUseDOM&&"selection"in document&&!("getSelection"in window),f={getOffsets:p?o:i,setOffsets:p?a:u};t.exports=f},function(t,e,n){"use strict";var r=n(4),o=n(5),i=n(49),a=n(19),u=n(6),s=n(37),c=(n(0),n(64),function(t){this._currentElement=t,this._stringText=""+t,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});o(c.prototype,{mountComponent:function(t,e,n,r){var o=n._idCounter++,i=" react-text: "+o+" ";if(this._domID=o,this._hostParent=e,t.useCreateElement){var c=n._ownerDocument,l=c.createComment(i),p=c.createComment(" /react-text "),f=a(c.createDocumentFragment());return a.queueChild(f,a(l)),this._stringText&&a.queueChild(f,a(c.createTextNode(this._stringText))),a.queueChild(f,a(p)),u.precacheNode(this,l),this._closingComment=p,f}var h=s(this._stringText);return t.renderToStaticMarkup?h:"\x3c!--"+i+"--\x3e"+h+"\x3c!-- /react-text --\x3e"},receiveComponent:function(t,e){if(t!==this._currentElement){this._currentElement=t;var n=""+t;if(n!==this._stringText){this._stringText=n;var r=this.getHostNode();i.replaceDelimitedText(r[0],r[1],n)}}},getHostNode:function(){var t=this._commentNodes;if(t)return t;if(!this._closingComment)for(var e=u.getNodeFromInstance(this),n=e.nextSibling;;){if(null==n&&r("67",this._domID),8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return t=[this._hostNode,this._closingComment],this._commentNodes=t,t},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,u.uncacheNode(this)}}),t.exports=c},function(t,e,n){"use strict";function r(){this._rootNodeID&&l.updateWrapper(this)}function o(t){var e=this._currentElement.props,n=u.executeOnChange(e,t);return c.asap(r,this),n}var i=n(4),a=n(5),u=n(54),s=n(6),c=n(12),l=(n(0),n(3),{getHostProps:function(t,e){return null!=e.dangerouslySetInnerHTML&&i("91"),a({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue,onChange:t._wrapperState.onChange})},mountWrapper:function(t,e){var n=u.getValue(e),r=n;if(null==n){var a=e.defaultValue,s=e.children;null!=s&&(null!=a&&i("92"),Array.isArray(s)&&(s.length<=1||i("93"),s=s[0]),a=""+s),null==a&&(a=""),r=a}t._wrapperState={initialValue:""+r,listeners:null,onChange:o.bind(t)}},updateWrapper:function(t){var e=t._currentElement.props,n=s.getNodeFromInstance(t),r=u.getValue(e);if(null!=r){var o=""+r;o!==n.value&&(n.value=o),null==e.defaultValue&&(n.defaultValue=o)}null!=e.defaultValue&&(n.defaultValue=e.defaultValue)},postMountWrapper:function(t){var e=s.getNodeFromInstance(t),n=e.textContent;n===t._wrapperState.initialValue&&(e.value=n)}});t.exports=l},function(t,e,n){"use strict";function r(t,e){"_hostNode"in t||s("33"),"_hostNode"in e||s("33");for(var n=0,r=t;r;r=r._hostParent)n++;for(var o=0,i=e;i;i=i._hostParent)o++;for(;n-o>0;)t=t._hostParent,n--;for(;o-n>0;)e=e._hostParent,o--;for(var a=n;a--;){if(t===e)return t;t=t._hostParent,e=e._hostParent}return null}function o(t,e){"_hostNode"in t||s("35"),"_hostNode"in e||s("35");for(;e;){if(e===t)return!0;e=e._hostParent}return!1}function i(t){return"_hostNode"in t||s("36"),t._hostParent}function a(t,e,n){for(var r=[];t;)r.push(t),t=t._hostParent;var o;for(o=r.length;o-- >0;)e(r[o],"captured",n);for(o=0;o<r.length;o++)e(r[o],"bubbled",n)}function u(t,e,n,o,i){for(var a=t&&e?r(t,e):null,u=[];t&&t!==a;)u.push(t),t=t._hostParent;for(var s=[];e&&e!==a;)s.push(e),e=e._hostParent;var c;for(c=0;c<u.length;c++)n(u[c],"bubbled",o);for(c=s.length;c-- >0;)n(s[c],"captured",i)}var s=n(4);n(0);t.exports={isAncestor:o,getLowestCommonAncestor:r,getParentInstance:i,traverseTwoPhase:a,traverseEnterLeave:u}},function(t,e,n){"use strict";function r(){this.reinitializeTransaction()}var o=n(5),i=n(12),a=n(36),u=n(9),s={initialize:u,close:function(){f.isBatchingUpdates=!1}},c={initialize:u,close:i.flushBatchedUpdates.bind(i)},l=[c,s];o(r.prototype,a,{getTransactionWrappers:function(){return l}});var p=new r,f={isBatchingUpdates:!1,batchedUpdates:function(t,e,n,r,o,i){var a=f.isBatchingUpdates;return f.isBatchingUpdates=!0,a?t(e,n,r,o,i):p.perform(t,null,e,n,r,o,i)}};t.exports=f},function(t,e,n){"use strict";function r(){C||(C=!0,g.EventEmitter.injectReactEventListener(m),g.EventPluginHub.injectEventPluginOrder(u),g.EventPluginUtils.injectComponentTree(f),g.EventPluginUtils.injectTreeTraversal(d),g.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:E,EnterLeaveEventPlugin:s,ChangeEventPlugin:a,SelectEventPlugin:w,BeforeInputEventPlugin:i}),g.HostComponent.injectGenericComponentClass(p),g.HostComponent.injectTextComponentClass(v),g.DOMProperty.injectDOMPropertyConfig(o),g.DOMProperty.injectDOMPropertyConfig(c),g.DOMProperty.injectDOMPropertyConfig(b),g.EmptyComponent.injectEmptyComponentFactory(function(t){return new h(t)}),g.Updates.injectReconcileTransaction(_),g.Updates.injectBatchingStrategy(y),g.Component.injectEnvironment(l))}var o=n(172),i=n(174),a=n(176),u=n(178),s=n(179),c=n(181),l=n(183),p=n(186),f=n(6),h=n(188),d=n(196),v=n(194),y=n(197),m=n(201),g=n(202),_=n(207),b=n(212),w=n(213),E=n(214),C=!1;t.exports={inject:r}},function(t,e,n){"use strict";var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;t.exports=r},function(t,e,n){"use strict";function r(t){o.enqueueEvents(t),o.processEventQueue(!1)}var o=n(28),i={handleTopLevel:function(t,e,n,i){r(o.extractEvents(t,e,n,i))}};t.exports=i},function(t,e,n){"use strict";function r(t){for(;t._hostParent;)t=t._hostParent;var e=p.getNodeFromInstance(t),n=e.parentNode;return p.getClosestInstanceFromNode(n)}function o(t,e){this.topLevelType=t,this.nativeEvent=e,this.ancestors=[]}function i(t){var e=h(t.nativeEvent),n=p.getClosestInstanceFromNode(e),o=n;do{t.ancestors.push(o),o=o&&r(o)}while(o);for(var i=0;i<t.ancestors.length;i++)n=t.ancestors[i],v._handleTopLevel(t.topLevelType,n,t.nativeEvent,h(t.nativeEvent))}function a(t){t(d(window))}var u=n(5),s=n(81),c=n(7),l=n(16),p=n(6),f=n(12),h=n(61),d=n(148);u(o.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),l.addPoolingTo(o,l.twoArgumentPooler);var v={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:c.canUseDOM?window:null,setHandleTopLevel:function(t){v._handleTopLevel=t},setEnabled:function(t){v._enabled=!!t},isEnabled:function(){return v._enabled},trapBubbledEvent:function(t,e,n){return n?s.listen(n,e,v.dispatchEvent.bind(null,t)):null},trapCapturedEvent:function(t,e,n){return n?s.capture(n,e,v.dispatchEvent.bind(null,t)):null},monitorScrollValue:function(t){var e=a.bind(null,t);s.listen(window,"scroll",e)},dispatchEvent:function(t,e){if(v._enabled){var n=o.getPooled(t,e);try{f.batchedUpdates(i,n)}finally{o.release(n)}}}};t.exports=v},function(t,e,n){"use strict";var r=n(20),o=n(28),i=n(52),a=n(55),u=n(93),s=n(34),c=n(95),l=n(12),p={Component:a.injection,DOMProperty:r.injection,EmptyComponent:u.injection,EventPluginHub:o.injection,EventPluginUtils:i.injection,EventEmitter:s.injection,HostComponent:c.injection,Updates:l.injection};t.exports=p},function(t,e,n){"use strict";var r=n(225),o=/^<\!\-\-/,i={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(t){var e=r(t);return o.test(t)?t:t.replace(/\/?>/," "+i.CHECKSUM_ATTR_NAME+'="'+e+'"$&')},canReuseMarkup:function(t,e){var n=e.getAttribute(i.CHECKSUM_ATTR_NAME);return n=n&&parseInt(n,10),r(t)===n}};t.exports=i},function(t,e,n){"use strict";function r(t,e,n){return{type:"INSERT_MARKUP",content:t,fromIndex:null,fromNode:null,toIndex:n,afterNode:e}}function o(t,e,n){return{type:"MOVE_EXISTING",content:null,fromIndex:t._mountIndex,fromNode:f.getHostNode(t),toIndex:n,afterNode:e}}function i(t,e){return{type:"REMOVE_NODE",content:null,fromIndex:t._mountIndex,fromNode:e,toIndex:null,afterNode:null}}function a(t){return{type:"SET_MARKUP",content:t,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function u(t){return{type:"TEXT_CONTENT",content:t,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function s(t,e){return e&&(t=t||[],t.push(e)),t}function c(t,e){p.processChildrenUpdates(t,e)}var l=n(4),p=n(55),f=(n(30),n(10),n(14),n(21)),h=n(182),d=(n(9),n(228)),v=(n(0),{Mixin:{_reconcilerInstantiateChildren:function(t,e,n){return h.instantiateChildren(t,e,n)},_reconcilerUpdateChildren:function(t,e,n,r,o,i){var a,u=0;return a=d(e,u),h.updateChildren(t,a,n,r,o,this,this._hostContainerInfo,i,u),a},mountChildren:function(t,e,n){var r=this._reconcilerInstantiateChildren(t,e,n);this._renderedChildren=r;var o=[],i=0;for(var a in r)if(r.hasOwnProperty(a)){var u=r[a],s=0,c=f.mountComponent(u,e,this,this._hostContainerInfo,n,s);u._mountIndex=i++,o.push(c)}return o},updateTextContent:function(t){var e=this._renderedChildren;h.unmountChildren(e,!1);for(var n in e)e.hasOwnProperty(n)&&l("118");c(this,[u(t)])},updateMarkup:function(t){var e=this._renderedChildren;h.unmountChildren(e,!1);for(var n in e)e.hasOwnProperty(n)&&l("118");c(this,[a(t)])},updateChildren:function(t,e,n){this._updateChildren(t,e,n)},_updateChildren:function(t,e,n){var r=this._renderedChildren,o={},i=[],a=this._reconcilerUpdateChildren(r,t,i,o,e,n);if(a||r){var u,l=null,p=0,h=0,d=0,v=null;for(u in a)if(a.hasOwnProperty(u)){var y=r&&r[u],m=a[u];y===m?(l=s(l,this.moveChild(y,v,p,h)),h=Math.max(y._mountIndex,h),y._mountIndex=p):(y&&(h=Math.max(y._mountIndex,h)),l=s(l,this._mountChildAtIndex(m,i[d],v,p,e,n)),d++),p++,v=f.getHostNode(m)}for(u in o)o.hasOwnProperty(u)&&(l=s(l,this._unmountChild(r[u],o[u])));l&&c(this,l),this._renderedChildren=a}},unmountChildren:function(t){var e=this._renderedChildren;h.unmountChildren(e,t),this._renderedChildren=null},moveChild:function(t,e,n,r){if(t._mountIndex<r)return o(t,e,n)},createChild:function(t,e,n){return r(n,e,t._mountIndex)},removeChild:function(t,e){return i(t,e)},_mountChildAtIndex:function(t,e,n,r,o,i){return t._mountIndex=r,this.createChild(t,n,e)},_unmountChild:function(t,e){var n=this.removeChild(t,e);return t._mountIndex=null,n}}});t.exports=v},function(t,e,n){"use strict";function r(t){return!(!t||"function"!=typeof t.attachRef||"function"!=typeof t.detachRef)}var o=n(4),i=(n(0),{addComponentAsRefTo:function(t,e,n){r(n)||o("119"),n.attachRef(e,t)},removeComponentAsRefFrom:function(t,e,n){r(n)||o("120");var i=n.getPublicInstance();i&&i.refs[e]===t.getPublicInstance()&&n.detachRef(e)}});t.exports=i},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){"use strict";function r(t){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=i.getPooled(null),this.useCreateElement=t}var o=n(5),i=n(89),a=n(16),u=n(34),s=n(96),c=(n(10),n(36)),l=n(57),p={initialize:s.getSelectionInformation,close:s.restoreSelection},f={initialize:function(){var t=u.isEnabled();return u.setEnabled(!1),t},close:function(t){u.setEnabled(t)}},h={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},d=[p,f,h],v={getTransactionWrappers:function(){return d},getReactMountReady:function(){return this.reactMountReady},getUpdateQueue:function(){return l},checkpoint:function(){return this.reactMountReady.checkpoint()},rollback:function(t){this.reactMountReady.rollback(t)},destructor:function(){i.release(this.reactMountReady),this.reactMountReady=null}};o(r.prototype,c,v),a.addPoolingTo(r),t.exports=r},function(t,e,n){"use strict";function r(t,e,n){"function"==typeof t?t(e.getPublicInstance()):i.addComponentAsRefTo(e,t,n)}function o(t,e,n){"function"==typeof t?t(null):i.removeComponentAsRefFrom(e,t,n)}var i=n(205),a={};a.attachRefs=function(t,e){if(null!==e&&"object"==typeof e){var n=e.ref;null!=n&&r(n,t,e._owner)}},a.shouldUpdateRefs=function(t,e){var n=null,r=null;null!==t&&"object"==typeof t&&(n=t.ref,r=t._owner);var o=null,i=null;return null!==e&&"object"==typeof e&&(o=e.ref,i=e._owner),n!==o||"string"==typeof o&&i!==r},a.detachRefs=function(t,e){if(null!==e&&"object"==typeof e){var n=e.ref;null!=n&&o(n,t,e._owner)}},t.exports=a},function(t,e,n){"use strict";function r(t){this.reinitializeTransaction(),this.renderToStaticMarkup=t,this.useCreateElement=!1,this.updateQueue=new u(this)}var o=n(5),i=n(16),a=n(36),u=(n(10),n(210)),s=[],c={enqueue:function(){}},l={getTransactionWrappers:function(){return s},getReactMountReady:function(){return c},getUpdateQueue:function(){return this.updateQueue},destructor:function(){},checkpoint:function(){},rollback:function(){}};o(r.prototype,a,l),i.addPoolingTo(r),t.exports=r},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=n(57),i=(n(3),function(){function t(e){r(this,t),this.transaction=e}return t.prototype.isMounted=function(t){return!1},t.prototype.enqueueCallback=function(t,e,n){this.transaction.isInTransaction()&&o.enqueueCallback(t,e,n)},t.prototype.enqueueForceUpdate=function(t){this.transaction.isInTransaction()&&o.enqueueForceUpdate(t)},t.prototype.enqueueReplaceState=function(t,e){this.transaction.isInTransaction()&&o.enqueueReplaceState(t,e)},t.prototype.enqueueSetState=function(t,e){this.transaction.isInTransaction()&&o.enqueueSetState(t,e)},t}());t.exports=i},function(t,e,n){"use strict";t.exports="15.5.4"},function(t,e,n){"use strict";var r={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},o={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},i={Properties:{},DOMAttributeNamespaces:{xlinkActuate:r.xlink,xlinkArcrole:r.xlink,xlinkHref:r.xlink,xlinkRole:r.xlink,xlinkShow:r.xlink,xlinkTitle:r.xlink,xlinkType:r.xlink,xmlBase:r.xml,xmlLang:r.xml,xmlSpace:r.xml},DOMAttributeNames:{}};Object.keys(o).forEach(function(t){i.Properties[t]=0,o[t]&&(i.DOMAttributeNames[t]=o[t])}),t.exports=i},function(t,e,n){"use strict";function r(t){if("selectionStart"in t&&s.hasSelectionCapabilities(t))return{start:t.selectionStart,end:t.selectionEnd};if(window.getSelection){var e=window.getSelection();return{anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function o(t,e){if(g||null==v||v!==l())return null;var n=r(v);if(!m||!f(m,n)){m=n;var o=c.getPooled(d.select,y,t,e);return o.type="select",o.target=v,i.accumulateTwoPhaseDispatches(o),o}return null}var i=n(29),a=n(7),u=n(6),s=n(96),c=n(13),l=n(83),p=n(105),f=n(44),h=a.canUseDOM&&"documentMode"in document&&document.documentMode<=11,d={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:["topBlur","topContextMenu","topFocus","topKeyDown","topKeyUp","topMouseDown","topMouseUp","topSelectionChange"]}},v=null,y=null,m=null,g=!1,_=!1,b={eventTypes:d,extractEvents:function(t,e,n,r){if(!_)return null;var i=e?u.getNodeFromInstance(e):window;switch(t){case"topFocus":(p(i)||"true"===i.contentEditable)&&(v=i,y=e,m=null);break;case"topBlur":v=null,y=null,m=null;break;case"topMouseDown":g=!0;break;case"topContextMenu":case"topMouseUp":return g=!1,o(n,r);case"topSelectionChange":if(h)break;case"topKeyDown":case"topKeyUp":return o(n,r)}return null},didPutListener:function(t,e,n){"onSelect"===e&&(_=!0)}};t.exports=b},function(t,e,n){"use strict";function r(t){return"."+t._rootNodeID}function o(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}var i=n(4),a=n(81),u=n(29),s=n(6),c=n(215),l=n(216),p=n(13),f=n(219),h=n(221),d=n(35),v=n(218),y=n(222),m=n(223),g=n(31),_=n(224),b=n(9),w=n(59),E=(n(0),{}),C={};["abort","animationEnd","animationIteration","animationStart","blur","canPlay","canPlayThrough","click","contextMenu","copy","cut","doubleClick","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","focus","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","progress","rateChange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchMove","touchStart","transitionEnd","volumeChange","waiting","wheel"].forEach(function(t){var e=t[0].toUpperCase()+t.slice(1),n="on"+e,r="top"+e,o={phasedRegistrationNames:{bubbled:n,captured:n+"Capture"},dependencies:[r]};E[t]=o,C[r]=o});var x={},S={eventTypes:E,extractEvents:function(t,e,n,r){var o=C[t];if(!o)return null;var a;switch(t){case"topAbort":case"topCanPlay":case"topCanPlayThrough":case"topDurationChange":case"topEmptied":case"topEncrypted":case"topEnded":case"topError":case"topInput":case"topInvalid":case"topLoad":case"topLoadedData":case"topLoadedMetadata":case"topLoadStart":case"topPause":case"topPlay":case"topPlaying":case"topProgress":case"topRateChange":case"topReset":case"topSeeked":case"topSeeking":case"topStalled":case"topSubmit":case"topSuspend":case"topTimeUpdate":case"topVolumeChange":case"topWaiting":a=p;break;case"topKeyPress":if(0===w(n))return null;case"topKeyDown":case"topKeyUp":a=h;break;case"topBlur":case"topFocus":a=f;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":a=d;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":a=v;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":a=y;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":a=c;break;case"topTransitionEnd":a=m;break;case"topScroll":a=g;break;case"topWheel":a=_;break;case"topCopy":case"topCut":case"topPaste":a=l}a||i("86",t);var s=a.getPooled(o,e,n,r);return u.accumulateTwoPhaseDispatches(s),s},didPutListener:function(t,e,n){if("onClick"===e&&!o(t._tag)){var i=r(t),u=s.getNodeFromInstance(t);x[i]||(x[i]=a.listen(u,"click",b))}},willDeleteListener:function(t,e){if("onClick"===e&&!o(t._tag)){var n=r(t);x[n].remove(),delete x[n]}}};t.exports=S},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(13),i={animationName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(r,i),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(13),i={clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}};o.augmentClass(r,i),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(13),i={data:null};o.augmentClass(r,i),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(35),i={dataTransfer:null};o.augmentClass(r,i),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(31),i={relatedTarget:null};o.augmentClass(r,i),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(13),i={data:null};o.augmentClass(r,i),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(31),i=n(59),a=n(229),u=n(60),s={key:a,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:u,charCode:function(t){return"keypress"===t.type?i(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?i(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}};o.augmentClass(r,s),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(31),i=n(60),a={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:i};o.augmentClass(r,a),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(13),i={propertyName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(r,i),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(35),i={deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null};o.augmentClass(r,i),t.exports=r},function(t,e,n){"use strict";function r(t){for(var e=1,n=0,r=0,i=t.length,a=-4&i;r<a;){for(var u=Math.min(r+4096,a);r<u;r+=4)n+=(e+=t.charCodeAt(r))+(e+=t.charCodeAt(r+1))+(e+=t.charCodeAt(r+2))+(e+=t.charCodeAt(r+3));e%=o,n%=o}for(;r<i;r++)n+=e+=t.charCodeAt(r);return e%=o,n%=o,e|n<<16}var o=65521;t.exports=r},function(t,e,n){"use strict";function r(t,e,n){if(null==e||"boolean"==typeof e||""===e)return"";if(isNaN(e)||0===e||i.hasOwnProperty(t)&&i[t])return""+e;if("string"==typeof e){e=e.trim()}return e+"px"}var o=n(88),i=(n(3),o.isUnitlessNumber);t.exports=r},function(t,e,n){"use strict";function r(t){if(null==t)return null;if(1===t.nodeType)return t;var e=a.get(t);if(e)return e=u(e),e?i.getNodeFromInstance(e):null;"function"==typeof t.render?o("44"):o("45",Object.keys(t))}var o=n(4),i=(n(14),n(6)),a=n(30),u=n(102);n(0),n(3);t.exports=r},function(t,e,n){"use strict";(function(e){function r(t,e,n,r){if(t&&"object"==typeof t){var o=t,i=void 0===o[n];i&&null!=e&&(o[n]=e)}}function o(t,e){if(null==t)return t;var n={};return i(t,r,n),n}var i=(n(53),n(107));n(3);void 0!==e&&n.i({NODE_ENV:"production"}),t.exports=o}).call(e,n(48))},function(t,e,n){"use strict";function r(t){if(t.key){var e=i[t.key]||t.key;if("Unidentified"!==e)return e}if("keypress"===t.type){var n=o(t);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===t.type||"keyup"===t.type?a[t.keyCode]||"Unidentified":""}var o=n(59),i={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=r},function(t,e,n){"use strict";function r(t){var e=t&&(o&&t[o]||t[i]);if("function"==typeof e)return e}var o="function"==typeof Symbol&&Symbol.iterator,i="@@iterator";t.exports=r},function(t,e,n){"use strict";function r(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function o(t){for(;t;){if(t.nextSibling)return t.nextSibling;t=t.parentNode}}function i(t,e){for(var n=r(t),i=0,a=0;n;){if(3===n.nodeType){if(a=i+n.textContent.length,i<=e&&a>=e)return{node:n,offset:e-i};i=a}n=r(o(n))}}t.exports=i},function(t,e,n){"use strict";function r(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n["ms"+t]="MS"+e,n["O"+t]="o"+e.toLowerCase(),n}function o(t){if(u[t])return u[t];if(!a[t])return t;var e=a[t];for(var n in e)if(e.hasOwnProperty(n)&&n in s)return u[t]=e[n];return""}var i=n(7),a={animationend:r("Animation","AnimationEnd"),animationiteration:r("Animation","AnimationIteration"),animationstart:r("Animation","AnimationStart"),transitionend:r("Transition","TransitionEnd")},u={},s={};i.canUseDOM&&(s=document.createElement("div").style,"AnimationEvent"in window||(delete a.animationend.animation,delete a.animationiteration.animation,delete a.animationstart.animation),"TransitionEvent"in window||delete a.transitionend.transition),t.exports=o},function(t,e,n){"use strict";function r(t){return'"'+o(t)+'"'}var o=n(37);t.exports=r},function(t,e,n){"use strict";var r=n(97);t.exports=r.renderSubtreeIntoContainer},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.d(e,"a",function(){return l});var a=n(1),u=(n.n(a),n(2)),s=n.n(u),c=n(110),l=(n(65),function(t){function e(n,i){r(this,e);var a=o(this,t.call(this,n,i));return a.store=n.store,a}return i(e,t),e.prototype.getChildContext=function(){return{store:this.store,storeSubscription:null}},e.prototype.render=function(){return a.Children.only(this.props.children)},e}(a.Component));l.propTypes={store:c.a.isRequired,children:s.a.element.isRequired},l.childContextTypes={store:c.a.isRequired,storeSubscription:c.b},l.displayName="Provider"},function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function o(t,e,n){for(var r=e.length-1;r>=0;r--){var o=e[r](t);if(o)return o}return function(e,r){throw new Error("Invalid value of type "+typeof t+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function i(t,e){return t===e}var a=n(108),u=n(243),s=n(237),c=n(238),l=n(239),p=n(240),f=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};e.a=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.connectHOC,n=void 0===e?a.a:e,h=t.mapStateToPropsFactories,d=void 0===h?c.a:h,v=t.mapDispatchToPropsFactories,y=void 0===v?s.a:v,m=t.mergePropsFactories,g=void 0===m?l.a:m,_=t.selectorFactory,b=void 0===_?p.a:_;return function(t,e,a){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=s.pure,l=void 0===c||c,p=s.areStatesEqual,h=void 0===p?i:p,v=s.areOwnPropsEqual,m=void 0===v?u.a:v,_=s.areStatePropsEqual,w=void 0===_?u.a:_,E=s.areMergedPropsEqual,C=void 0===E?u.a:E,x=r(s,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),S=o(t,d,"mapStateToProps"),O=o(e,y,"mapDispatchToProps"),T=o(a,g,"mergeProps");return n(b,f({methodName:"connect",getDisplayName:function(t){return"Connect("+t+")"},shouldHandleStateChanges:Boolean(t),initMapStateToProps:S,initMapDispatchToProps:O,initMergeProps:T,pure:l,areStatesEqual:h,areOwnPropsEqual:m,areStatePropsEqual:w,areMergedPropsEqual:C},x))}}()},function(t,e,n){"use strict";function r(t){return"function"==typeof t?n.i(u.a)(t,"mapDispatchToProps"):void 0}function o(t){return t?void 0:n.i(u.b)(function(t){return{dispatch:t}})}function i(t){return t&&"object"==typeof t?n.i(u.b)(function(e){return n.i(a.bindActionCreators)(t,e)}):void 0}var a=n(41),u=n(109);e.a=[r,o,i]},function(t,e,n){"use strict";function r(t){return"function"==typeof t?n.i(i.a)(t,"mapStateToProps"):void 0}function o(t){return t?void 0:n.i(i.b)(function(){return{}})}var i=n(109);e.a=[r,o]},function(t,e,n){"use strict";function r(t,e,n){return u({},n,t,e)}function o(t){return function(e,n){var r=(n.displayName,n.pure),o=n.areMergedPropsEqual,i=!1,a=void 0;return function(e,n,u){var s=t(e,n,u);return i?r&&o(s,a)||(a=s):(i=!0,a=s),a}}}function i(t){return"function"==typeof t?o(t):void 0}function a(t){return t?void 0:function(){return r}}var u=(n(111),Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t});e.a=[i,a]},function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function o(t,e,n,r){return function(o,i){return n(t(o,i),e(r,i),i)}}function i(t,e,n,r,o){function i(o,i){return d=o,v=i,y=t(d,v),m=e(r,v),g=n(y,m,v),h=!0,g}function a(){return y=t(d,v),e.dependsOnOwnProps&&(m=e(r,v)),g=n(y,m,v)}function u(){return t.dependsOnOwnProps&&(y=t(d,v)),e.dependsOnOwnProps&&(m=e(r,v)),g=n(y,m,v)}function s(){var e=t(d,v),r=!f(e,y);return y=e,r&&(g=n(y,m,v)),g}function c(t,e){var n=!p(e,v),r=!l(t,d);return d=t,v=e,n&&r?a():n?u():r?s():g}var l=o.areStatesEqual,p=o.areOwnPropsEqual,f=o.areStatePropsEqual,h=!1,d=void 0,v=void 0,y=void 0,m=void 0,g=void 0;return function(t,e){return h?c(t,e):i(t,e)}}function a(t,e){var n=e.initMapStateToProps,a=e.initMapDispatchToProps,u=e.initMergeProps,s=r(e,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),c=n(t,s),l=a(t,s),p=u(t,s);return(s.pure?i:o)(c,l,p,t,s)}e.a=a;n(241)},function(t,e,n){"use strict";n(65)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(){var t=[],e=[];return{clear:function(){e=i,t=i},notify:function(){for(var n=t=e,r=0;r<n.length;r++)n[r]()},subscribe:function(n){var r=!0;return e===t&&(e=t.slice()),e.push(n),function(){r&&t!==i&&(r=!1,e===t&&(e=t.slice()),e.splice(e.indexOf(n),1))}}}}n.d(e,"a",function(){return u});var i=null,a={notify:function(){}},u=function(){function t(e,n,o){r(this,t),this.store=e,this.parentSub=n,this.onStateChange=o,this.unsubscribe=null,this.listeners=a}return t.prototype.addNestedSub=function(t){return this.trySubscribe(),this.listeners.subscribe(t)},t.prototype.notifyNestedSubs=function(){this.listeners.notify()},t.prototype.isSubscribed=function(){return Boolean(this.unsubscribe)},t.prototype.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.onStateChange):this.store.subscribe(this.onStateChange),this.listeners=o())},t.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=a)},t}()},function(t,e,n){"use strict";function r(t,e){return t===e?0!==t||0!==e||1/t==1/e:t!==t&&e!==e}function o(t,e){if(r(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(var a=0;a<n.length;a++)if(!i.call(e,n[a])||!r(t[n[a]],e[n[a]]))return!1;return!0}e.a=o;var i=Object.prototype.hasOwnProperty},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(1),u=n.n(a),s=n(2),c=n.n(s),l=n(154),p=n.n(l),f=n(8),h=function(t){function e(){var n,i,a;r(this,e);for(var u=arguments.length,s=Array(u),c=0;c<u;c++)s[c]=arguments[c];return n=i=o(this,t.call.apply(t,[this].concat(s))),i.history=p()(i.props),a=n,o(i,a)}return i(e,t),e.prototype.render=function(){return u.a.createElement(f.Router,{history:this.history,children:this.props.children})},e}(u.a.Component);h.propTypes={basename:c.a.string,forceRefresh:c.a.bool,getUserConfirmation:c.a.func,keyLength:c.a.number,children:c.a.node},e.a=h},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(1),u=n.n(a),s=n(2),c=n.n(s),l=n(155),p=n.n(l),f=n(8),h=function(t){function e(){var n,i,a;r(this,e);for(var u=arguments.length,s=Array(u),c=0;c<u;c++)s[c]=arguments[c];return n=i=o(this,t.call.apply(t,[this].concat(s))),i.history=p()(i.props),a=n,o(i,a)}return i(e,t),e.prototype.render=function(){return u.a.createElement(f.Router,{history:this.history,children:this.props.children})},e}(u.a.Component);h.propTypes={basename:c.a.string,getUserConfirmation:c.a.func,hashType:c.a.oneOf(["hashbang","noslash","slash"]),children:c.a.node},e.a=h},function(t,e,n){"use strict";var r=n(8);n.d(e,"a",function(){return r.MemoryRouter})},function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}var o=n(1),i=n.n(o),a=n(2),u=n.n(a),s=n(8),c=n(112),l=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f=function(t){var e=t.to,n=t.exact,o=t.strict,a=t.location,u=t.activeClassName,f=t.className,h=t.activeStyle,d=t.style,v=t.isActive,y=r(t,["to","exact","strict","location","activeClassName","className","activeStyle","style","isActive"]);return i.a.createElement(s.Route,{path:"object"===(void 0===e?"undefined":p(e))?e.pathname:e,exact:n,strict:o,location:a,children:function(t){var n=t.location,r=t.match,o=!!(v?v(r,n):r);return i.a.createElement(c.a,l({to:e,className:o?[u,f].filter(function(t){return t}).join(" "):f,style:o?l({},d,h):d},y))}})};f.propTypes={to:c.a.propTypes.to,exact:u.a.bool,strict:u.a.bool,location:u.a.object,activeClassName:u.a.string,className:u.a.string,activeStyle:u.a.object,style:u.a.object,isActive:u.a.func},f.defaultProps={activeClassName:"active"},e.a=f},function(t,e,n){"use strict";var r=n(8);n.d(e,"a",function(){return r.Prompt})},function(t,e,n){"use strict";var r=n(8);n.d(e,"a",function(){return r.Redirect})},function(t,e,n){"use strict";var r=n(8);n.d(e,"a",function(){return r.Route})},function(t,e,n){"use strict";var r=n(8);n.d(e,"a",function(){return r.Router})},function(t,e,n){"use strict";var r=n(8);n.d(e,"a",function(){return r.StaticRouter})},function(t,e,n){"use strict";var r=n(8);n.d(e,"a",function(){return r.Switch})},function(t,e,n){"use strict";var r=n(8);n.d(e,"a",function(){return r.matchPath})},function(t,e,n){"use strict";var r=n(8);n.d(e,"a",function(){return r.withRouter})},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(1),u=n.n(a),s=n(2),c=n.n(s),l=n(156),p=n.n(l),f=n(66),h=function(t){function e(){var n,i,a;r(this,e);for(var u=arguments.length,s=Array(u),c=0;c<u;c++)s[c]=arguments[c];return n=i=o(this,t.call.apply(t,[this].concat(s))),i.history=p()(i.props),a=n,o(i,a)}return i(e,t),e.prototype.render=function(){return u.a.createElement(f.a,{history:this.history,children:this.props.children})},e}(u.a.Component);h.propTypes={initialEntries:c.a.array,initialIndex:c.a.number,getUserConfirmation:c.a.func,keyLength:c.a.number,children:c.a.node},e.a=h},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(1),u=n.n(a),s=n(2),c=n.n(s),l=function(t){function e(){return r(this,e),o(this,t.apply(this,arguments))}return i(e,t),e.prototype.enable=function(t){this.unblock&&this.unblock(),this.unblock=this.context.router.history.block(t)},e.prototype.disable=function(){this.unblock&&(this.unblock(),this.unblock=null)},e.prototype.componentWillMount=function(){this.props.when&&this.enable(this.props.message)},e.prototype.componentWillReceiveProps=function(t){t.when?this.props.when&&this.props.message===t.message||this.enable(t.message):this.disable()},e.prototype.componentWillUnmount=function(){this.disable()},e.prototype.render=function(){return null},e}(u.a.Component);l.propTypes={when:c.a.bool,message:c.a.oneOfType([c.a.func,c.a.string]).isRequired},l.defaultProps={when:!0},l.contextTypes={router:c.a.shape({history:c.a.shape({block:c.a.func.isRequired}).isRequired}).isRequired},e.a=l},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(1),u=n.n(a),s=n(2),c=n.n(s),l=function(t){function e(){return r(this,e),o(this,t.apply(this,arguments))}return i(e,t),e.prototype.isStatic=function(){return this.context.router&&this.context.router.staticContext},e.prototype.componentWillMount=function(){this.isStatic()&&this.perform()},e.prototype.componentDidMount=function(){this.isStatic()||this.perform()},e.prototype.perform=function(){var t=this.context.router.history,e=this.props,n=e.push,r=e.to;n?t.push(r):t.replace(r)},e.prototype.render=function(){return null},e}(u.a.Component);l.propTypes={push:c.a.bool,from:c.a.string,to:c.a.oneOfType([c.a.string,c.a.object])},l.defaultProps={push:!1},l.contextTypes={router:c.a.shape({history:c.a.shape({push:c.a.func.isRequired,replace:c.a.func.isRequired}).isRequired,staticContext:c.a.object}).isRequired},e.a=l},function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var u=n(27),s=n.n(u),c=n(1),l=n.n(c),p=n(2),f=n.n(p),h=n(26),d=(n.n(h),n(66)),v=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},y=function(t){var e=t.pathname,n=void 0===e?"/":e,r=t.search,o=void 0===r?"":r,i=t.hash,a=void 0===i?"":i;return{pathname:n,search:"?"===o?"":o,hash:"#"===a?"":a}},m=function(t,e){return t?v({},e,{pathname:n.i(h.addLeadingSlash)(t)+e.pathname}):e},g=function(t,e){if(!t)return e;var r=n.i(h.addLeadingSlash)(t);return 0!==e.pathname.indexOf(r)?e:v({},e,{pathname:e.pathname.substr(r.length)})},_=function(t){return"string"==typeof t?n.i(h.parsePath)(t):y(t)},b=function(t){return"string"==typeof t?t:n.i(h.createPath)(t)},w=function(t){return function(){s()(!1,"You cannot %s with <StaticRouter>",t)}},E=function(){},C=function(t){function e(){var r,a,u;o(this,e);for(var s=arguments.length,c=Array(s),l=0;l<s;l++)c[l]=arguments[l];return r=a=i(this,t.call.apply(t,[this].concat(c))),a.createHref=function(t){return n.i(h.addLeadingSlash)(a.props.basename+b(t))},a.handlePush=function(t){var e=a.props,n=e.basename,r=e.context;r.action="PUSH",r.location=m(n,_(t)),r.url=b(r.location)},a.handleReplace=function(t){var e=a.props,n=e.basename,r=e.context;r.action="REPLACE",r.location=m(n,_(t)),r.url=b(r.location)},a.handleListen=function(){return E},a.handleBlock=function(){return E},u=r,i(a,u)}return a(e,t),e.prototype.getChildContext=function(){return{router:{staticContext:this.props.context}}},e.prototype.render=function(){var t=this.props,e=t.basename,n=(t.context,t.location),o=r(t,["basename","context","location"]),i={createHref:this.createHref,action:"POP",location:g(e,_(n)),push:this.handlePush,replace:this.handleReplace,go:w("go"),goBack:w("goBack"),goForward:w("goForward"),listen:this.handleListen,block:this.handleBlock};return l.a.createElement(d.a,v({},o,{history:i}))},e}(l.a.Component);C.propTypes={basename:f.a.string,context:f.a.object.isRequired,location:f.a.oneOfType([f.a.string,f.a.object])},C.defaultProps={basename:"",location:"/"},C.childContextTypes={router:f.a.object.isRequired},e.a=C},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(1),u=n.n(a),s=n(2),c=n.n(s),l=n(17),p=n.n(l),f=n(67),h=function(t){function e(){return r(this,e),o(this,t.apply(this,arguments))}return i(e,t),e.prototype.componentWillReceiveProps=function(t){p()(!(t.location&&!this.props.location),'<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),p()(!(!t.location&&this.props.location),'<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.')},e.prototype.render=function(){var t=this.context.router.route,e=this.props.children,r=this.props.location||t.location,o=void 0,i=void 0;return u.a.Children.forEach(e,function(e){if(u.a.isValidElement(e)){var a=e.props,s=a.path,c=a.exact,l=a.strict,p=a.from,h=s||p;null==o&&(i=e,o=h?n.i(f.a)(r.pathname,{path:h,exact:c,strict:l}):t.match)}}),o?u.a.cloneElement(i,{location:r,computedMatch:o}):null},e}(u.a.Component);h.contextTypes={router:c.a.shape({route:c.a.object.isRequired}).isRequired},h.propTypes={children:c.a.node,location:c.a.object},e.a=h},function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}var o=n(1),i=n.n(o),a=n(2),u=n.n(a),s=n(85),c=n.n(s),l=n(113),p=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},f=function(t){var e=function(e){var n=e.wrappedComponentRef,o=r(e,["wrappedComponentRef"]);return i.a.createElement(l.a,{render:function(e){return i.a.createElement(t,p({},o,e,{ref:n}))}})};return e.displayName="withRouter("+(t.displayName||t.name)+")",e.WrappedComponent=t,e.propTypes={wrappedComponentRef:u.a.func},c()(e,t)};e.a=f},function(t,e,n){"use strict";function r(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,function(t){return e[t]})}function o(t){var e={"=0":"=","=2":":"};return(""+("."===t[0]&&"$"===t[1]?t.substring(2):t.substring(1))).replace(/(=0|=2)/g,function(t){return e[t]})}var i={escape:r,unescape:o};t.exports=i},function(t,e,n){"use strict";var r=n(24),o=(n(0),function(t){var e=this;if(e.instancePool.length){var n=e.instancePool.pop();return e.call(n,t),n}return new e(t)}),i=function(t,e){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,t,e),r}return new n(t,e)},a=function(t,e,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,t,e,n),o}return new r(t,e,n)},u=function(t,e,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,t,e,n,r),i}return new o(t,e,n,r)},s=function(t){var e=this;t instanceof e||r("25"),t.destructor(),e.instancePool.length<e.poolSize&&e.instancePool.push(t)},c=o,l=function(t,e){var n=t;return n.instancePool=[],n.getPooled=e||c,n.poolSize||(n.poolSize=10),n.release=s,n},p={addPoolingTo:l,oneArgumentPooler:o,twoArgumentPooler:i,threeArgumentPooler:a,fourArgumentPooler:u};t.exports=p},function(t,e,n){"use strict";function r(t){return(""+t).replace(b,"$&/")}function o(t,e){this.func=t,this.context=e,this.count=0}function i(t,e,n){var r=t.func,o=t.context;r.call(o,e,t.count++)}function a(t,e,n){if(null==t)return t;var r=o.getPooled(e,n);m(t,i,r),o.release(r)}function u(t,e,n,r){this.result=t,this.keyPrefix=e,this.func=n,this.context=r,this.count=0}function s(t,e,n){var o=t.result,i=t.keyPrefix,a=t.func,u=t.context,s=a.call(u,e,t.count++);Array.isArray(s)?c(s,o,n,y.thatReturnsArgument):null!=s&&(v.isValidElement(s)&&(s=v.cloneAndReplaceKey(s,i+(!s.key||e&&e.key===s.key?"":r(s.key)+"/")+n)),o.push(s))}function c(t,e,n,o,i){var a="";null!=n&&(a=r(n)+"/");var c=u.getPooled(e,a,o,i);m(t,s,c),u.release(c)}function l(t,e,n){if(null==t)return t;var r=[];return c(t,r,null,e,n),r}function p(t,e,n){return null}function f(t,e){return m(t,p,null)}function h(t){var e=[];return c(t,e,null,y.thatReturnsArgument),e}var d=n(263),v=n(23),y=n(9),m=n(274),g=d.twoArgumentPooler,_=d.fourArgumentPooler,b=/\/+/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},d.addPoolingTo(o,g),u.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},d.addPoolingTo(u,_);var w={forEach:a,map:l,mapIntoWithKeyPrefixInternal:c,count:f,toArray:h};t.exports=w},function(t,e,n){"use strict";function r(t){return t}function o(t,e){var n=b.hasOwnProperty(e)?b[e]:null;E.hasOwnProperty(e)&&"OVERRIDE_BASE"!==n&&f("73",e),t&&"DEFINE_MANY"!==n&&"DEFINE_MANY_MERGED"!==n&&f("74",e)}function i(t,e){if(e){"function"==typeof e&&f("75"),v.isValidElement(e)&&f("76");var n=t.prototype,r=n.__reactAutoBindPairs;e.hasOwnProperty(g)&&w.mixins(t,e.mixins);for(var i in e)if(e.hasOwnProperty(i)&&i!==g){var a=e[i],u=n.hasOwnProperty(i);if(o(u,i),w.hasOwnProperty(i))w[i](t,a);else{var l=b.hasOwnProperty(i),p="function"==typeof a,h=p&&!l&&!u&&!1!==e.autobind;if(h)r.push(i,a),n[i]=a;else if(u){var d=b[i];(!l||"DEFINE_MANY_MERGED"!==d&&"DEFINE_MANY"!==d)&&f("77",d,i),"DEFINE_MANY_MERGED"===d?n[i]=s(n[i],a):"DEFINE_MANY"===d&&(n[i]=c(n[i],a))}else n[i]=a}}}else;}function a(t,e){if(e)for(var n in e){var r=e[n];if(e.hasOwnProperty(n)){var o=n in w;o&&f("78",n);var i=n in t;i&&f("79",n),t[n]=r}}}function u(t,e){t&&e&&"object"==typeof t&&"object"==typeof e||f("80");for(var n in e)e.hasOwnProperty(n)&&(void 0!==t[n]&&f("81",n),t[n]=e[n]);return t}function s(t,e){return function(){var n=t.apply(this,arguments),r=e.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return u(o,n),u(o,r),o}}function c(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}}function l(t,e){var n=e.bind(t);return n}function p(t){for(var e=t.__reactAutoBindPairs,n=0;n<e.length;n+=2){var r=e[n],o=e[n+1];t[r]=l(t,o)}}var f=n(24),h=n(5),d=n(68),v=n(23),y=(n(267),n(69)),m=n(25),g=(n(0),n(3),"mixins"),_=[],b={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},w={displayName:function(t,e){t.displayName=e},mixins:function(t,e){if(e)for(var n=0;n<e.length;n++)i(t,e[n])},childContextTypes:function(t,e){t.childContextTypes=h({},t.childContextTypes,e)},contextTypes:function(t,e){t.contextTypes=h({},t.contextTypes,e)},getDefaultProps:function(t,e){t.getDefaultProps?t.getDefaultProps=s(t.getDefaultProps,e):t.getDefaultProps=e},propTypes:function(t,e){t.propTypes=h({},t.propTypes,e)},statics:function(t,e){a(t,e)},autobind:function(){}},E={replaceState:function(t,e){this.updater.enqueueReplaceState(this,t),e&&this.updater.enqueueCallback(this,e,"replaceState")},isMounted:function(){return this.updater.isMounted(this)}},C=function(){};h(C.prototype,d.prototype,E);var x={createClass:function(t){var e=r(function(t,n,r){this.__reactAutoBindPairs.length&&p(this),this.props=t,this.context=n,this.refs=m,this.updater=r||y,this.state=null;var o=this.getInitialState?this.getInitialState():null;("object"!=typeof o||Array.isArray(o))&&f("82",e.displayName||"ReactCompositeComponent"),this.state=o});e.prototype=new C,e.prototype.constructor=e,e.prototype.__reactAutoBindPairs=[],_.forEach(i.bind(null,e)),i(e,t),e.getDefaultProps&&(e.defaultProps=e.getDefaultProps()),e.prototype.render||f("83");for(var n in b)e.prototype[n]||(e.prototype[n]=null);return e},injection:{injectMixin:function(t){_.push(t)}}};t.exports=x},function(t,e,n){"use strict";var r=n(23),o=r.createFactory,i={a:o("a"),abbr:o("abbr"),address:o("address"),area:o("area"),article:o("article"),aside:o("aside"),audio:o("audio"),b:o("b"),base:o("base"),bdi:o("bdi"),bdo:o("bdo"),big:o("big"),blockquote:o("blockquote"),body:o("body"),br:o("br"),button:o("button"),canvas:o("canvas"),caption:o("caption"),cite:o("cite"),code:o("code"),col:o("col"),colgroup:o("colgroup"),data:o("data"),datalist:o("datalist"),dd:o("dd"),del:o("del"),details:o("details"),dfn:o("dfn"),dialog:o("dialog"),div:o("div"),dl:o("dl"),dt:o("dt"),em:o("em"),embed:o("embed"),fieldset:o("fieldset"),figcaption:o("figcaption"),figure:o("figure"),footer:o("footer"),form:o("form"),h1:o("h1"),h2:o("h2"),h3:o("h3"),h4:o("h4"),h5:o("h5"),h6:o("h6"),head:o("head"),header:o("header"),hgroup:o("hgroup"),hr:o("hr"),html:o("html"),i:o("i"),iframe:o("iframe"),img:o("img"),input:o("input"),ins:o("ins"),kbd:o("kbd"),keygen:o("keygen"),label:o("label"),legend:o("legend"),li:o("li"),link:o("link"),main:o("main"),map:o("map"),mark:o("mark"),menu:o("menu"),menuitem:o("menuitem"),meta:o("meta"),meter:o("meter"),nav:o("nav"),noscript:o("noscript"),object:o("object"),ol:o("ol"),optgroup:o("optgroup"),option:o("option"),output:o("output"),p:o("p"),param:o("param"),picture:o("picture"),pre:o("pre"),progress:o("progress"),q:o("q"),rp:o("rp"),rt:o("rt"),ruby:o("ruby"),s:o("s"),samp:o("samp"),script:o("script"),section:o("section"),select:o("select"),small:o("small"),source:o("source"),span:o("span"),strong:o("strong"),style:o("style"),sub:o("sub"),summary:o("summary"),sup:o("sup"),table:o("table"),tbody:o("tbody"),td:o("td"),textarea:o("textarea"),tfoot:o("tfoot"),th:o("th"),thead:o("thead"),time:o("time"),title:o("title"),tr:o("tr"),track:o("track"),u:o("u"),ul:o("ul"),var:o("var"),video:o("video"),wbr:o("wbr"),circle:o("circle"),clipPath:o("clipPath"),defs:o("defs"),ellipse:o("ellipse"),g:o("g"),image:o("image"),line:o("line"),linearGradient:o("linearGradient"),mask:o("mask"),path:o("path"),pattern:o("pattern"),polygon:o("polygon"),polyline:o("polyline"),radialGradient:o("radialGradient"),rect:o("rect"),stop:o("stop"),svg:o("svg"),text:o("text"),tspan:o("tspan")};t.exports=i},function(t,e,n){"use strict";var r={};t.exports=r},function(t,e,n){"use strict";var r=n(23),o=r.isValidElement,i=n(87);t.exports=i(o)},function(t,e,n){"use strict";function r(t,e,n){this.props=t,this.context=e,this.refs=s,this.updater=n||u}function o(){}var i=n(5),a=n(68),u=n(69),s=n(25);o.prototype=a.prototype,r.prototype=new o,r.prototype.constructor=r,i(r.prototype,a.prototype),r.prototype.isPureReactComponent=!0,t.exports=r},function(t,e,n){"use strict";t.exports="15.5.4"},function(t,e,n){"use strict";function r(t){var e=t&&(o&&t[o]||t[i]);if("function"==typeof e)return e}var o="function"==typeof Symbol&&Symbol.iterator,i="@@iterator";t.exports=r},function(t,e,n){"use strict";function r(){return o++}var o=1;t.exports=r},function(t,e,n){"use strict";function r(t){return i.isValidElement(t)||o("143"),t}var o=n(24),i=n(23);n(0);t.exports=r},function(t,e,n){"use strict";function r(t,e){return t&&"object"==typeof t&&null!=t.key?c.escape(t.key):e.toString(36)}function o(t,e,n,i){var f=typeof t;if("undefined"!==f&&"boolean"!==f||(t=null),null===t||"string"===f||"number"===f||"object"===f&&t.$$typeof===u)return n(i,t,""===e?l+r(t,0):e),1;var h,d,v=0,y=""===e?l:e+p;if(Array.isArray(t))for(var m=0;m<t.length;m++)h=t[m],d=y+r(h,m),v+=o(h,d,n,i);else{var g=s(t);if(g){var _,b=g.call(t);if(g!==t.entries)for(var w=0;!(_=b.next()).done;)h=_.value,d=y+r(h,w++),v+=o(h,d,n,i);else for(;!(_=b.next()).done;){var E=_.value;E&&(h=E[1],d=y+c.escape(E[0])+p+r(h,0),v+=o(h,d,n,i))}}else if("object"===f){var C="",x=String(t);a("31","[object Object]"===x?"object with keys {"+Object.keys(t).join(", ")+"}":x,C)}}return v}function i(t,e,n){return null==t?0:o(t,"",e,n)}var a=n(24),u=(n(14),n(115)),s=n(271),c=(n(0),n(262)),l=(n(3),"."),p=":";t.exports=i},function(t,e,n){"use strict";function r(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return function(n,r,a){var u=t(n,r,a),s=u.dispatch,c=[],l={getState:u.getState,dispatch:function(t){return s(t)}};return c=e.map(function(t){return t(l)}),s=o.a.apply(void 0,c)(u.dispatch),i({},u,{dispatch:s})}}}e.a=r;var o=n(117),i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}},function(t,e,n){"use strict";function r(t,e){return function(){return e(t.apply(void 0,arguments))}}function o(t,e){if("function"==typeof t)return r(t,e);if("object"!=typeof t||null===t)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===t?"null":typeof t)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var n=Object.keys(t),o={},i=0;i<n.length;i++){var a=n[i],u=t[a];"function"==typeof u&&(o[a]=r(u,e))}return o}e.a=o},function(t,e,n){"use strict";function r(t,e){var n=e&&e.type;return"Given action "+(n&&'"'+n.toString()+'"'||"an action")+', reducer "'+t+'" returned undefined. To ignore an action, you must explicitly return the previous state.'}function o(t){Object.keys(t).forEach(function(e){var n=t[e];if(void 0===n(void 0,{type:a.b.INIT}))throw new Error('Reducer "'+e+'" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');if(void 0===n(void 0,{type:"@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".")}))throw new Error('Reducer "'+e+"\" returned undefined when probed with a random type. Don't try to handle "+a.b.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.')})}function i(t){for(var e=Object.keys(t),n={},i=0;i<e.length;i++){var a=e[i];"function"==typeof t[a]&&(n[a]=t[a])}var u,s=Object.keys(n);try{o(n)}catch(t){u=t}return function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=arguments[1];if(u)throw u;for(var o=!1,i={},a=0;a<s.length;a++){var c=s[a],l=n[c],p=t[c],f=l(p,e);if(void 0===f){var h=r(c,e);throw new Error(h)}i[c]=f,o=o||f!==p}return o?i:t}}e.a=i;var a=n(118);n(47),n(119)},function(t,e,n){"use strict";var r=function(t){return"/"===t.charAt(0)},o=function(t,e){for(var n=e,r=n+1,o=t.length;r<o;n+=1,r+=1)t[n]=t[r];t.pop()},i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t&&t.split("/")||[],i=e&&e.split("/")||[],a=t&&r(t),u=e&&r(e),s=a||u;if(t&&r(t)?i=n:n.length&&(i.pop(),i=i.concat(n)),!i.length)return"/";var c=void 0;if(i.length){var l=i[i.length-1];c="."===l||".."===l||""===l}else c=!1;for(var p=0,f=i.length;f>=0;f--){var h=i[f];"."===h?o(i,f):".."===h?(o(i,f),p++):p&&(o(i,f),p--)}if(!s)for(;p--;p)i.unshift("..");!s||""===i[0]||i[0]&&r(i[0])||i.unshift("");var d=i.join("/");return c&&"/"!==d.substr(-1)&&(d+="/"),d};t.exports=i},function(t,e,n){(function(t,e){!function(t,n){"use strict";function r(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var r={callback:t,args:e};return c[s]=r,u(s),s++}function o(t){delete c[t]}function i(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(n,r)}}function a(t){if(l)setTimeout(a,0,t);else{var e=c[t];if(e){l=!0;try{i(e)}finally{o(t),l=!1}}}}if(!t.setImmediate){var u,s=1,c={},l=!1,p=t.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(t);f=f&&f.setTimeout?f:t,"[object process]"==={}.toString.call(t.process)?function(){u=function(t){e.nextTick(function(){a(t)})}}():function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?function(){var e="setImmediate$"+Math.random()+"$",n=function(n){n.source===t&&"string"==typeof n.data&&0===n.data.indexOf(e)&&a(+n.data.slice(e.length))};t.addEventListener?t.addEventListener("message",n,!1):t.attachEvent("onmessage",n),u=function(n){t.postMessage(e+n,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){a(t.data)},u=function(e){t.port2.postMessage(e)}}():p&&"onreadystatechange"in p.createElement("script")?function(){var t=p.documentElement;u=function(e){var n=p.createElement("script");n.onreadystatechange=function(){a(e),n.onreadystatechange=null,t.removeChild(n),n=null},t.appendChild(n)}}():function(){u=function(t){setTimeout(a,0,t)}}(),f.setImmediate=r,f.clearImmediate=o}}("undefined"==typeof self?void 0===t?this:t:self)}).call(e,n(39),n(48))},function(t,e,n){function r(t){return"[object Function]"===(o(t)?Object.prototype.toString.call(t):"")}var o=n(70);t.exports=r},function(t,e,n){function r(t){if(t)return o(t)}function o(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}var i=n(70);t.exports=r,r.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,this},r.prototype.parse=function(t){return this._parser=t,this},r.prototype.responseType=function(t){return this._responseType=t,this},r.prototype.serialize=function(t){return this._serializer=t,this},r.prototype.timeout=function(t){if(!t||"object"!=typeof t)return this._timeout=t,this._responseTimeout=0,this;for(var e in t)switch(e){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;default:console.warn("Unknown timeout option",e)}return this},r.prototype.retry=function(t){return 0!==arguments.length&&!0!==t||(t=1),t<=0&&(t=0),this._maxRetries=t,this._retries=0,this},r.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},r.prototype.then=function(t,e){if(!this._fullfilledPromise){var n=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(t,e){n.end(function(n,r){n?e(n):t(r)})})}return this._fullfilledPromise.then(t,e)},r.prototype.catch=function(t){return this.then(void 0,t)},r.prototype.use=function(t){return t(this),this},r.prototype.ok=function(t){if("function"!=typeof t)throw Error("Callback required");return this._okCallback=t,this},r.prototype._isResponseOK=function(t){return!!t&&(this._okCallback?this._okCallback(t):t.status>=200&&t.status<300)},r.prototype.get=function(t){return this._header[t.toLowerCase()]},r.prototype.getHeader=r.prototype.get,r.prototype.set=function(t,e){if(i(t)){for(var n in t)this.set(n,t[n]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},r.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},r.prototype.field=function(t,e){if(null===t||void 0===t)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),i(t)){for(var n in t)this.field(n,t[n]);return this}if(Array.isArray(e)){for(var r in e)this.field(t,e[r]);return this}if(null===e||void 0===e)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof e&&(e=""+e),this._getFormData().append(t,e),this},r.prototype.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},r.prototype.withCredentials=function(t){return void 0==t&&(t=!0),this._withCredentials=t,this},r.prototype.redirects=function(t){return this._maxRedirects=t,this},r.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},r.prototype.send=function(t){var e=i(t),n=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),e&&!this._data)Array.isArray(t)?this._data=[]:this._isHost(t)||(this._data={});else if(t&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(e&&i(this._data))for(var r in t)this._data[r]=t[r];else"string"==typeof t?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"==n?this._data?this._data+"&"+t:t:(this._data||"")+t):this._data=t;return!e||this._isHost(t)?this:(n||this.type("json"),this)},r.prototype.sortQuery=function(t){return this._sort=void 0===t||t,this},r.prototype._timeoutError=function(t,e,n){if(!this._aborted){var r=new Error(t+e+"ms exceeded");r.timeout=e,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.abort(),this.callback(r)}},r.prototype._setTimeouts=function(){var t=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){t._timeoutError("Timeout of ",t._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},function(t,e,n){function r(t){if(t)return o(t)}function o(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}var i=n(284);t.exports=r,r.prototype.get=function(t){return this.header[t.toLowerCase()]},r.prototype._setHeaderProperties=function(t){var e=t["content-type"]||"";this.type=i.type(e);var n=i.params(e);for(var r in n)this[r]=n[r];this.links={};try{t.link&&(this.links=i.parseLinks(t.link))}catch(t){}},r.prototype._setStatusProperties=function(t){var e=t/100|0;this.status=this.statusCode=t,this.statusType=e,this.info=1==e,this.ok=2==e,this.redirect=3==e,this.clientError=4==e,this.serverError=5==e,this.error=(4==e||5==e)&&this.toError(),this.accepted=202==t,this.noContent=204==t,this.badRequest=400==t,this.unauthorized=401==t,this.notAcceptable=406==t,this.forbidden=403==t,this.notFound=404==t}},function(t,e){var n=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];t.exports=function(t,e){return!!(t&&t.code&&~n.indexOf(t.code))||(!!(e&&e.status&&e.status>=500)||(!!(t&&"timeout"in t&&"ECONNABORTED"==t.code)||!!(t&&"crossDomain"in t)))}},function(t,e){e.type=function(t){return t.split(/ *; */).shift()},e.params=function(t){return t.split(/ *; */).reduce(function(t,e){var n=e.split(/ *= */),r=n.shift(),o=n.shift();return r&&o&&(t[r]=o),t},{})},e.parseLinks=function(t){return t.split(/ *, */).reduce(function(t,e){var n=e.split(/ *; */),r=n[0].slice(1,-1);return t[n[1].split(/ *= */)[1].slice(1,-1)]=r,t},{})},e.cleanHeader=function(t,e){return delete t["content-type"],delete t["content-length"],delete t["transfer-encoding"],delete t.host,e&&delete t.cookie,t}},function(t,e,n){t.exports=n(286)},function(t,e,n){"use strict";(function(t,r){Object.defineProperty(e,"__esModule",{value:!0});var o,i=n(287),a=function(t){return t&&t.__esModule?t:{default:t}}(i);o="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:r;var u=(0,a.default)(o);e.default=u}).call(e,n(39),n(290)(t))},function(t,e,n){"use strict";function r(t){var e,n=t.Symbol;return"function"==typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable",e}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},function(t,e,n){function r(t,e){this._id=t,this._clearFn=e}var o=Function.prototype.apply;e.setTimeout=function(){return new r(o.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new r(o.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(279),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,n){"use strict";e.__esModule=!0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every(function(e,r){return t(e,n[r])});var o=void 0===e?"undefined":r(e);if(o!==(void 0===n?"undefined":r(n)))return!1;if("object"===o){var i=e.valueOf(),a=n.valueOf();if(i!==e||a!==n)return t(i,a);var u=Object.keys(e),s=Object.keys(n);return u.length===s.length&&u.every(function(r){return t(e[r],n[r])})}return!1};e.default=o},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){n(32),n(71),n(42),n(2),n(1),n(40),n(72),n(11),n(8),n(15),n(41),n(73),n(74),t.exports=n(33)}]);
|
images/_notes/dwsync.xml
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="utf-8" ?>
|
2 |
-
<dwsync>
|
3 |
-
<file name="gravityformspdfextended.jpg" server="blueliquiddesigns.com.au" local="130050839400000000" remote="130050839400000000" />
|
4 |
-
<file name="signature.png" server="blueliquiddesigns.com.au" local="130050839400000000" remote="130050839400000000" />
|
5 |
-
</dwsync>
|
|
|
|
|
|
|
|
|
|
images/gravityformspdfextended.jpg
DELETED
Binary file
|
initialisation/README.txt
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
The initialisation directory is a legacy folder from Gravity PDF v3
|
2 |
+
We've left it here for v3 templates that reference the template.css file
|
3 |
+
|
4 |
+
See /src/templates/ for the new core PDF templates directory.
|
initialisation/template.css
ADDED
@@ -0,0 +1,173 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* THIS IS A LEGACY CSS FILE FOR Gravity PDF v3 template files
|
3 |
+
*/
|
4 |
+
|
5 |
+
body {
|
6 |
+
font-family: DejaVu Sans, Helvetica, sans-serif;
|
7 |
+
letter-spacing: -0.2px;
|
8 |
+
}
|
9 |
+
|
10 |
+
#container {
|
11 |
+
border-radius: 4px 4px 4px 4px;
|
12 |
+
border-spacing: 0;
|
13 |
+
clear: both;
|
14 |
+
width: 100%;
|
15 |
+
background-color: #fff;
|
16 |
+
border-color: #dfdfdf;
|
17 |
+
border-style: solid;
|
18 |
+
border-width: 1px;
|
19 |
+
margin: 0 0 16px;
|
20 |
+
}
|
21 |
+
|
22 |
+
h2.default {
|
23 |
+
background-color: #e3e3e3;
|
24 |
+
font-size: 14px;
|
25 |
+
text-align: left;
|
26 |
+
text-shadow: 0 1px 0 #fff;
|
27 |
+
margin: 0;
|
28 |
+
padding: 7px;
|
29 |
+
}
|
30 |
+
|
31 |
+
.entry-view-field-value, .entry-view-html-value, .entry-view-section-break-content {
|
32 |
+
border-bottom: 1px solid #dfdfdf;
|
33 |
+
line-height: 150%;
|
34 |
+
padding: 6px 6px 6px 7px;
|
35 |
+
}
|
36 |
+
|
37 |
+
.lastrow {
|
38 |
+
border-bottom: none;
|
39 |
+
}
|
40 |
+
|
41 |
+
.entry-view-field-value ul {
|
42 |
+
margin-left: 15px;
|
43 |
+
}
|
44 |
+
|
45 |
+
.entry-view-field-value div.strong {
|
46 |
+
font-weight: bold;
|
47 |
+
}
|
48 |
+
|
49 |
+
.no-style .entry-view-field-value, .no-style #container, .no-style h2, .no-style .entry-view-html-value, .no-style .entry-view-section-break-content {
|
50 |
+
background: none;
|
51 |
+
border: none;
|
52 |
+
}
|
53 |
+
|
54 |
+
.two_row .entry-view-field-value {
|
55 |
+
border: 0;
|
56 |
+
line-height: normal;
|
57 |
+
padding: 0;
|
58 |
+
}
|
59 |
+
|
60 |
+
.two_row .entry-view-field-value div.strong {
|
61 |
+
font-weight: bold;
|
62 |
+
width: 100%;
|
63 |
+
border-bottom: 1px solid #dfdfdf;
|
64 |
+
line-height: 150%;
|
65 |
+
background-color: #eaf2fa;
|
66 |
+
padding: 6px 6px 6px 7px;
|
67 |
+
}
|
68 |
+
|
69 |
+
.two_row .entry-view-field-value div.value {
|
70 |
+
display: block;
|
71 |
+
width: 100%;
|
72 |
+
border-bottom: 1px solid #fff;
|
73 |
+
line-height: 150%;
|
74 |
+
padding: 6px 6px 6px 7px;
|
75 |
+
}
|
76 |
+
|
77 |
+
.two_row .entry-view-field-value span {
|
78 |
+
font-weight: normal;
|
79 |
+
}
|
80 |
+
|
81 |
+
td.entry-view-field-value {
|
82 |
+
padding-left: 9px;
|
83 |
+
}
|
84 |
+
|
85 |
+
.even {
|
86 |
+
background: #eaf2fa;
|
87 |
+
}
|
88 |
+
|
89 |
+
.body_copy {
|
90 |
+
padding-top: 50px;
|
91 |
+
}
|
92 |
+
|
93 |
+
.pdf_logo_area {
|
94 |
+
text-align: center;
|
95 |
+
margin: 0 auto;
|
96 |
+
}
|
97 |
+
|
98 |
+
table.entry-products {
|
99 |
+
width: 98%;
|
100 |
+
}
|
101 |
+
|
102 |
+
table.entry-products th {
|
103 |
+
background-color: #F4F4F4;
|
104 |
+
border-bottom: 1px solid #DFDFDF;
|
105 |
+
border-right: 1px solid #DFDFDF !important;
|
106 |
+
}
|
107 |
+
|
108 |
+
table.entry-products td.textcenter, table.entry-products th.textcenter {
|
109 |
+
text-align: center;
|
110 |
+
}
|
111 |
+
|
112 |
+
table.entry-products col.entry-products-col2 {
|
113 |
+
width: 50px;
|
114 |
+
}
|
115 |
+
|
116 |
+
table.entry-products col.entry-products-col3 {
|
117 |
+
width: 155px;
|
118 |
+
}
|
119 |
+
|
120 |
+
table.entry-products col.entry-products-col4 {
|
121 |
+
width: 155px;
|
122 |
+
}
|
123 |
+
|
124 |
+
table.entry-products {
|
125 |
+
border: 1px solid #DFDFDF;
|
126 |
+
margin: 10px 0;
|
127 |
+
}
|
128 |
+
|
129 |
+
table.entry-products td {
|
130 |
+
border-bottom: 1px solid #DFDFDF;
|
131 |
+
border-right: 1px solid #DFDFDF !important;
|
132 |
+
padding: 7px 7px 8px;
|
133 |
+
vertical-align: top;
|
134 |
+
}
|
135 |
+
|
136 |
+
table.entry-products td.emptycell {
|
137 |
+
background-color: #F4F4F4;
|
138 |
+
}
|
139 |
+
|
140 |
+
table.entry-products td.grandtotal, table.entry-products td.grandtotal_amount, table.entry-products td.shipping, table.entry-products td.shipping_amount {
|
141 |
+
font-size: 13px;
|
142 |
+
font-weight: bold;
|
143 |
+
padding-bottom: 8px;
|
144 |
+
padding-top: 7px;
|
145 |
+
}
|
146 |
+
|
147 |
+
table.entry-products td.textright, table.entry-products th.textright {
|
148 |
+
text-align: right;
|
149 |
+
}
|
150 |
+
|
151 |
+
.two_row .odd, .two_row .even {
|
152 |
+
background: none;
|
153 |
+
}
|
154 |
+
|
155 |
+
/**
|
156 |
+
* Quiz Style Support
|
157 |
+
*/
|
158 |
+
|
159 |
+
.gf-quiz-img {
|
160 |
+
padding-left: 5px !important;
|
161 |
+
vertical-align: middle;
|
162 |
+
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Survey Style Support
|
166 |
+
*/
|
167 |
+
.gsurvey-likert-choice-label {
|
168 |
+
padding: 4px;
|
169 |
+
}
|
170 |
+
|
171 |
+
.gsurvey-likert-choice, .gsurvey-likert-choice-label {
|
172 |
+
text-align: center;
|
173 |
+
}
|
installation-update-manager.php
DELETED
@@ -1,668 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Plugin: Gravity Forms PDF Extended
|
5 |
-
* File: install-update-manager.php
|
6 |
-
*
|
7 |
-
* This file handles the installation and update code that ensures the plugin will be supported.
|
8 |
-
*/
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Check to see if Gravity Forms version is supported
|
12 |
-
*/
|
13 |
-
|
14 |
-
class GFPDF_InstallUpdater
|
15 |
-
{
|
16 |
-
public function install()
|
17 |
-
{
|
18 |
-
if(strlen(get_option('gf_pdf_extended_installed')) == 0)
|
19 |
-
{
|
20 |
-
update_option('gf_pdf_extended_version', PDF_EXTENDED_VERSION);
|
21 |
-
update_option('gf_pdf_extended_deploy', 'yes');
|
22 |
-
|
23 |
-
self::pdf_extended_activate();
|
24 |
-
}
|
25 |
-
}
|
26 |
-
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Install everything required
|
30 |
-
*/
|
31 |
-
public function pdf_extended_activate()
|
32 |
-
{
|
33 |
-
/*
|
34 |
-
* Initialise the Wordpress Filesystem API
|
35 |
-
*/
|
36 |
-
if(PDF_Common::initialise_WP_filesystem_API(array('gfpdf_deploy'), 'pdf-extended-filesystem') === false)
|
37 |
-
{
|
38 |
-
return false;
|
39 |
-
}
|
40 |
-
|
41 |
-
/*
|
42 |
-
* If we got here we should have $wp_filesystem available
|
43 |
-
*/
|
44 |
-
global $wp_filesystem;
|
45 |
-
|
46 |
-
/*
|
47 |
-
* We need to set up some filesystem compatibility checkes to work with the different server file management types
|
48 |
-
* Most notably is the FTP options, but SSH may be effected too
|
49 |
-
*/
|
50 |
-
$directory = PDF_PLUGIN_DIR;
|
51 |
-
$template_directory = PDF_TEMPLATE_LOCATION;
|
52 |
-
$template_save_directory = PDF_SAVE_LOCATION;
|
53 |
-
$template_font_directory = PDF_FONT_LOCATION;
|
54 |
-
|
55 |
-
|
56 |
-
if($wp_filesystem->method === 'ftpext' || $wp_filesystem->method === 'ftpsockets')
|
57 |
-
{
|
58 |
-
/*
|
59 |
-
* Assume FTP is rooted to the Wordpress install
|
60 |
-
*/
|
61 |
-
$base_directory = self::get_base_directory();
|
62 |
-
|
63 |
-
$directory = str_replace(ABSPATH, $base_directory, $directory);
|
64 |
-
$template_directory = str_replace(ABSPATH, $base_directory, $template_directory);
|
65 |
-
$template_save_directory = str_replace(ABSPATH, $base_directory, $template_save_directory);
|
66 |
-
$template_font_directory = str_replace(ABSPATH, $base_directory, $template_font_directory);
|
67 |
-
|
68 |
-
}
|
69 |
-
|
70 |
-
/**
|
71 |
-
* If PDF_TEMPLATE_LOCATION already exists then we will remove the old template files so we can redeploy the new ones
|
72 |
-
*/
|
73 |
-
|
74 |
-
if(PDF_DEPLOY === true && $wp_filesystem->exists($template_directory))
|
75 |
-
{
|
76 |
-
/* read all file names into array and unlink from active theme template folder */
|
77 |
-
foreach(glob($directory.'templates/*.php') as $file) {
|
78 |
-
$path_parts = pathinfo($file);
|
79 |
-
if($wp_filesystem->exists($template_directory.$path_parts['basename']))
|
80 |
-
{
|
81 |
-
$wp_filesystem->delete($template_directory.$path_parts['basename']);
|
82 |
-
}
|
83 |
-
}
|
84 |
-
if($wp_filesystem->exists($template_directory.'template.css')) { $wp_filesystem->delete($template_directory.'template.css'); }
|
85 |
-
}
|
86 |
-
|
87 |
-
|
88 |
-
/* unzip the mPDF file */
|
89 |
-
if($wp_filesystem->exists($directory . 'mPDF.zip'))
|
90 |
-
{
|
91 |
-
/*
|
92 |
-
* The only function that requires the input to be the full path and the export to be the directory used in $wp_filesystem
|
93 |
-
*/
|
94 |
-
$results = unzip_file( PDF_PLUGIN_DIR . 'mPDF.zip', $directory );
|
95 |
-
|
96 |
-
if($results !== true)
|
97 |
-
{
|
98 |
-
add_action('gfpdfe_notices', array("GFPDF_InstallUpdater", "gf_pdf_unzip_mpdf_err"));
|
99 |
-
return 'fail';
|
100 |
-
}
|
101 |
-
|
102 |
-
/*
|
103 |
-
* Remove the original archive
|
104 |
-
*/
|
105 |
-
$wp_filesystem->delete($directory . 'mPDF.zip');
|
106 |
-
}
|
107 |
-
|
108 |
-
/* create new directory in active themes folder*/
|
109 |
-
if(!$wp_filesystem->is_dir($template_directory))
|
110 |
-
{
|
111 |
-
if($wp_filesystem->mkdir($template_directory) === false)
|
112 |
-
{
|
113 |
-
add_action('gfpdfe_notices', array("GFPDF_InstallUpdater", "gf_pdf_template_dir_err"));
|
114 |
-
return 'fail';
|
115 |
-
}
|
116 |
-
}
|
117 |
-
|
118 |
-
if(!$wp_filesystem->is_dir($template_save_directory))
|
119 |
-
{
|
120 |
-
/* create new directory in active themes folder*/
|
121 |
-
if($wp_filesystem->mkdir($template_save_directory) === false)
|
122 |
-
{
|
123 |
-
add_action('gfpdfe_notices', array("GFPDF_InstallUpdater", "gf_pdf_template_dir_err"));
|
124 |
-
return 'fail';
|
125 |
-
}
|
126 |
-
}
|
127 |
-
|
128 |
-
if(!$wp_filesystem->is_dir($template_font_directory))
|
129 |
-
{
|
130 |
-
/* create new directory in active themes folder*/
|
131 |
-
if($wp_filesystem->mkdir($template_font_directory) === false)
|
132 |
-
{
|
133 |
-
add_action('gfpdfe_notices', array("GFPDF_InstallUpdater", "gf_pdf_template_dir_err"));
|
134 |
-
return 'fail';
|
135 |
-
}
|
136 |
-
}
|
137 |
-
|
138 |
-
/*
|
139 |
-
* Copy entire template folder over to PDF_TEMPLATE_LOCATION
|
140 |
-
*/
|
141 |
-
self::pdf_extended_copy_directory( $directory . 'templates', $template_directory, false );
|
142 |
-
|
143 |
-
if(!$wp_filesystem->exists($template_directory .'configuration.php'))
|
144 |
-
{
|
145 |
-
/* copy template files to new directory */
|
146 |
-
if(!$wp_filesystem->copy($directory .'configuration.php', $template_directory.'configuration.php'))
|
147 |
-
{
|
148 |
-
add_action('gfpdfe_notices', array("GFPDF_InstallUpdater", "gf_pdf_template_dir_err"));
|
149 |
-
return 'fail';
|
150 |
-
}
|
151 |
-
}
|
152 |
-
|
153 |
-
if(!$wp_filesystem->exists($template_directory.'template.css'))
|
154 |
-
{
|
155 |
-
/* copy template files to new directory */
|
156 |
-
if(!$wp_filesystem->copy($directory .'styles/template.css', $template_directory.'template.css'))
|
157 |
-
{
|
158 |
-
add_action('gfpdfe_notices', array("GFPDF_InstallUpdater", "gf_pdf_template_dir_err"));
|
159 |
-
return 'fail';
|
160 |
-
}
|
161 |
-
}
|
162 |
-
|
163 |
-
if(!$wp_filesystem->exists($template_save_directory.'.htaccess'))
|
164 |
-
{
|
165 |
-
if(!$wp_filesystem->put_contents($template_save_directory.'.htaccess', 'deny from all'))
|
166 |
-
{
|
167 |
-
add_action('gfpdfe_notices', array("GFPDF_InstallUpdater", "gf_pdf_template_dir_err"));
|
168 |
-
return 'fail';
|
169 |
-
}
|
170 |
-
}
|
171 |
-
|
172 |
-
if(self::install_fonts($directory, $template_directory, $template_font_directory) !== true)
|
173 |
-
{
|
174 |
-
return 'fail';
|
175 |
-
}
|
176 |
-
|
177 |
-
/*
|
178 |
-
* Update system to ensure everything is installed correctly.
|
179 |
-
*/
|
180 |
-
|
181 |
-
update_option('gf_pdf_extended_installed', 'installed');
|
182 |
-
update_option('gf_pdf_extended_deploy', 'yes');
|
183 |
-
delete_option('gfpdfe_switch_theme');
|
184 |
-
|
185 |
-
return true;
|
186 |
-
}
|
187 |
-
|
188 |
-
public static function initialise_fonts()
|
189 |
-
{
|
190 |
-
/*
|
191 |
-
* Initialise the Wordpress Filesystem API
|
192 |
-
*/
|
193 |
-
if(PDF_Common::initialise_WP_filesystem_API(array('gfpdf_deploy'), 'pdf-extended-filesystem') === false)
|
194 |
-
{
|
195 |
-
return false;
|
196 |
-
}
|
197 |
-
|
198 |
-
/*
|
199 |
-
* We need to set up some filesystem compatibility checkes to work with the different server file management types
|
200 |
-
* Most notably is the FTP options, but SSH may be effected too
|
201 |
-
*/
|
202 |
-
$directory = PDF_PLUGIN_DIR;
|
203 |
-
$template_directory = PDF_TEMPLATE_LOCATION;
|
204 |
-
$template_font_directory = PDF_FONT_LOCATION;
|
205 |
-
|
206 |
-
|
207 |
-
if($wp_filesystem->method === 'ftpext' || $wp_filesystem->method === 'ftpsockets')
|
208 |
-
{
|
209 |
-
/*
|
210 |
-
* Assume FTP is rooted to the Wordpress install
|
211 |
-
*/
|
212 |
-
$base_directory = self::get_base_directory();
|
213 |
-
|
214 |
-
$directory = str_replace(ABSPATH, $base_directory, $directory);
|
215 |
-
$template_directory = str_replace(ABSPATH, $base_directory, $template_directory);
|
216 |
-
$template_font_directory = str_replace(ABSPATH, $base_directory, $template_font_directory);
|
217 |
-
|
218 |
-
}
|
219 |
-
|
220 |
-
if(self::install_fonts($directory, $template_directory, $template_font_directory) === true)
|
221 |
-
{
|
222 |
-
add_action('gfpdfe_notices', array("GFPDF_InstallUpdater", "gf_pdf_font_install_success"));
|
223 |
-
}
|
224 |
-
return true;
|
225 |
-
}
|
226 |
-
|
227 |
-
private static function install_fonts($directory, $template_directory, $fonts_location)
|
228 |
-
{
|
229 |
-
|
230 |
-
global $wp_filesystem;
|
231 |
-
$write_to_file = '<?php
|
232 |
-
|
233 |
-
if(!defined("PDF_EXTENDED_VERSION"))
|
234 |
-
{
|
235 |
-
return;
|
236 |
-
}
|
237 |
-
|
238 |
-
';
|
239 |
-
|
240 |
-
/*
|
241 |
-
* Search the font folder for .ttf files. If found, move them to the mPDF font folder
|
242 |
-
* and write the configuration file
|
243 |
-
*/
|
244 |
-
|
245 |
-
/* read all file names into array and unlink from active theme template folder */
|
246 |
-
foreach(glob($fonts_location.'/*.[tT][tT][fF]') as $file) {
|
247 |
-
|
248 |
-
$path_parts = pathinfo($file);
|
249 |
-
|
250 |
-
/*
|
251 |
-
* Check if the files already exist in the mPDF font folder
|
252 |
-
*/
|
253 |
-
if(!$wp_filesystem->exists($directory . 'mPDF/ttfonts/' . $path_parts['basename']))
|
254 |
-
{
|
255 |
-
/*
|
256 |
-
* copy ttf file to the mPDF font folder
|
257 |
-
*/
|
258 |
-
if($wp_filesystem->copy($file, $directory . 'mPDF/ttfonts/' . $path_parts['basename']) === false)
|
259 |
-
{
|
260 |
-
add_action('gfpdfe_notices', array("GFPDF_InstallUpdater", "gf_pdf_font_err"));
|
261 |
-
return false;
|
262 |
-
}
|
263 |
-
}
|
264 |
-
|
265 |
-
/*
|
266 |
-
* Generate configuration information in preparation to write to file
|
267 |
-
*/
|
268 |
-
$write_to_file .= '
|
269 |
-
$this->fontdata[\''.$path_parts['filename'].'\'] = array(
|
270 |
-
\'R\' => \''.$path_parts['basename'].'\'
|
271 |
-
);';
|
272 |
-
|
273 |
-
}
|
274 |
-
|
275 |
-
/*
|
276 |
-
* Remove the old configuration file and put the contents of $write_to_file in a font configuration file
|
277 |
-
*/
|
278 |
-
$wp_filesystem->delete($template_directory.'fonts/config.php');
|
279 |
-
if($wp_filesystem->put_contents($template_directory.'fonts/config.php', $write_to_file) === false)
|
280 |
-
{
|
281 |
-
add_action('gfpdfe_notices', array("GFPDF_InstallUpdater", "gf_pdf_font_config_err"));
|
282 |
-
return false;
|
283 |
-
}
|
284 |
-
|
285 |
-
return true;
|
286 |
-
}
|
287 |
-
|
288 |
-
public function gf_pdf_font_install_success()
|
289 |
-
{
|
290 |
-
echo '<div id="message" class="updated"><p>';
|
291 |
-
echo 'The font files have been successfully installed. A font can be used by adding it\'s file name (without .ttf) in a CSS font-family declaration.';
|
292 |
-
echo '</p></div>';
|
293 |
-
}
|
294 |
-
|
295 |
-
public function gf_pdf_font_err()
|
296 |
-
{
|
297 |
-
echo '<div id="message" class="error"><p>';
|
298 |
-
echo 'There was a problem installing the font files. Manually copy your fonts to the mPDF/ttfonts/ folder.';
|
299 |
-
echo '</p></div>';
|
300 |
-
}
|
301 |
-
|
302 |
-
public function gf_pdf_font_config_err()
|
303 |
-
{
|
304 |
-
echo '<div id="message" class="error"><p>';
|
305 |
-
echo 'Could not create font configuration file. Try initialise again.';
|
306 |
-
echo '</p></div>';
|
307 |
-
}
|
308 |
-
|
309 |
-
/**
|
310 |
-
* Gravity Forms hasn't been installed so throw error.
|
311 |
-
* We make sure the user hasn't already dismissed the error
|
312 |
-
*/
|
313 |
-
public function gf_pdf_not_installed()
|
314 |
-
{
|
315 |
-
echo '<div id="message" class="error"><p>';
|
316 |
-
echo 'You need to install <a href="https://www.e-junkie.com/ecom/gb.php?cl=54585&c=ib&aff=235154" target="ejejcsingle">Gravity Forms</a> to use the Gravity Forms PDF Extended Plugin.';
|
317 |
-
echo '</p></div>';
|
318 |
-
}
|
319 |
-
|
320 |
-
/**
|
321 |
-
* PDF Extended has been updated but the new template files haven't been deployed yet
|
322 |
-
*/
|
323 |
-
public function gf_pdf_not_deployed()
|
324 |
-
{
|
325 |
-
if( (PDF_DEPLOY === true) && !rgpost('update') )
|
326 |
-
{
|
327 |
-
if(rgget("page") == 'gf_settings' && rgget('addon') == 'PDF')
|
328 |
-
{
|
329 |
-
echo '<div id="message" class="error"><p>';
|
330 |
-
echo 'You\'ve updated Gravity Forms PDF Extended but are yet to re-initialise the plugin. After initialising, please review the latest updates to ensure your custom templates remain compatible with the latest version.';
|
331 |
-
echo '</p></div>';
|
332 |
-
|
333 |
-
}
|
334 |
-
else
|
335 |
-
{
|
336 |
-
echo '<div id="message" class="error"><p>';
|
337 |
-
echo 'You\'ve updated Gravity Forms PDF Extended but are yet to re-initialise the plugin. Please go to the <a href="'.PDF_SETTINGS_URL.'">plugin\'s settings page</a> to initialise.';
|
338 |
-
echo '</p></div>';
|
339 |
-
}
|
340 |
-
}
|
341 |
-
}
|
342 |
-
|
343 |
-
/**
|
344 |
-
* PDF Extended has been freshly installed
|
345 |
-
*/
|
346 |
-
public function gf_pdf_not_deployed_fresh()
|
347 |
-
{
|
348 |
-
if( (PDF_DEPLOY === true) && !rgpost('update') )
|
349 |
-
{
|
350 |
-
if(rgget("page") == 'gf_settings' && rgget('addon') == 'PDF')
|
351 |
-
{
|
352 |
-
echo '<div id="message" class="updated"><p>';
|
353 |
-
echo 'Welcome to Gravity Forms PDF Extended. Before you can use the plugin correctly you need to initilise it.';
|
354 |
-
echo '</p></div>';
|
355 |
-
|
356 |
-
}
|
357 |
-
else
|
358 |
-
{
|
359 |
-
echo '<div id="message" class="updated"><p>';
|
360 |
-
echo 'Welcome to Gravity Forms PDF Extended. Before you can use the plugin correctly you need to initilise it. Please go to the <a href="'.PDF_SETTINGS_URL.'">plugin\'s settings page</a> to initialise.';
|
361 |
-
echo '</p></div>';
|
362 |
-
}
|
363 |
-
}
|
364 |
-
}
|
365 |
-
|
366 |
-
/**
|
367 |
-
* The Gravity Forms version isn't compatible. Prompt user to upgrade
|
368 |
-
*/
|
369 |
-
public function gf_pdf_not_supported()
|
370 |
-
{
|
371 |
-
echo '<div id="message" class="error"><p>';
|
372 |
-
echo 'Gravity Forms PDF Extended only works with Gravity Forms version '.GF_PDF_EXTENDED_SUPPORTED_VERSION.' and higher. Please <a href="https://www.e-junkie.com/ecom/gb.php?cl=54585&c=ib&aff=235154" target="ejejcsingle">upgrade your copy of Gravity Forms</a> to use this plugin.';
|
373 |
-
echo '</p></div>';
|
374 |
-
}
|
375 |
-
|
376 |
-
|
377 |
-
/**
|
378 |
-
* Cannot create new template folder in active theme directory
|
379 |
-
*/
|
380 |
-
public function gf_pdf_template_dir_err()
|
381 |
-
{
|
382 |
-
echo '<div id="message" class="error"><p>';
|
383 |
-
echo 'We could not create a template folder in your active theme\'s directory. Please created a folder called <strong>\''. PDF_SAVE_FOLDER .'\'</strong> in '.get_stylesheet_directory().'/. Then copy the contents of '.PDF_PLUGIN_DIR.'templates/ to your newly-created PDF_EXTENDED_TEMPLATES folder, as well as styles/template.css. You should also make this directory writable.';
|
384 |
-
echo '</p></div>';
|
385 |
-
|
386 |
-
}
|
387 |
-
|
388 |
-
public static function gf_pdf_unzip_mpdf_err()
|
389 |
-
{
|
390 |
-
echo '<div id="message" class="error"><p>';
|
391 |
-
echo 'Could not unzip mPDF.zip (located in the plugin folder). Unzip the file manually, place the extracted mPDF folder in the plugin folder and run the initialisation again.';
|
392 |
-
echo '</p></div>';
|
393 |
-
}
|
394 |
-
|
395 |
-
/**
|
396 |
-
* Cannot remove old default template files
|
397 |
-
*/
|
398 |
-
public function gf_pdf_deployment_unlink_error()
|
399 |
-
{
|
400 |
-
echo '<div id="message" class="error"><p>';
|
401 |
-
echo 'We could not remove the default template files from the Gravity Forms PDF Extended folder in your active theme\'s directory. Please manually remove all files starting with \'default-\' and the template.css file.';
|
402 |
-
echo '</p></div>';
|
403 |
-
|
404 |
-
}
|
405 |
-
|
406 |
-
/**
|
407 |
-
* Cannot create new template folder in active theme directory
|
408 |
-
*/
|
409 |
-
public function gf_pdf_template_move_err()
|
410 |
-
{
|
411 |
-
echo '<div id="message" class="error"><p>';
|
412 |
-
echo 'We could not copy the contents of '.PDF_PLUGIN_DIR.'templates/ to your newly-created PDF_EXTENDED_TEMPLATES folder. Please manually copy the files to the aforementioned directory..';
|
413 |
-
echo '</p></div>';
|
414 |
-
|
415 |
-
}
|
416 |
-
|
417 |
-
/*
|
418 |
-
* When switching themes copy over current active theme's PDF_EXTENDED_TEMPLATES (if it exists) to new theme folder
|
419 |
-
*/
|
420 |
-
public function gf_pdf_on_switch_theme($old_theme_name, $old_theme_object) {
|
421 |
-
|
422 |
-
/*
|
423 |
-
* We will store the old pdf dir and new pdf directory and prompt the user to copy the PDF_EXTENDED_TEMPLATES folder
|
424 |
-
*/
|
425 |
-
$previous_theme_directory = $old_theme_object->get_stylesheet_directory();
|
426 |
-
|
427 |
-
$current_theme_array = wp_get_theme();
|
428 |
-
$current_theme_directory = $current_theme_array->get_stylesheet_directory();
|
429 |
-
|
430 |
-
/*
|
431 |
-
* Add the save folder name to the end of the paths
|
432 |
-
*/
|
433 |
-
$old_pdf_path = $previous_theme_directory . '/' . PDF_SAVE_FOLDER;
|
434 |
-
$new_pdf_path = $current_theme_directory . '/' . PDF_SAVE_FOLDER;
|
435 |
-
|
436 |
-
update_option('gfpdfe_switch_theme', array('old' => $old_pdf_path, 'new' => $new_pdf_path));
|
437 |
-
}
|
438 |
-
|
439 |
-
/*
|
440 |
-
* Check if a theme switch has been made recently
|
441 |
-
* If it has then prompt the user to move the files
|
442 |
-
*/
|
443 |
-
public static function check_theme_switch()
|
444 |
-
{
|
445 |
-
$theme_switch = get_option('gfpdfe_switch_theme');
|
446 |
-
if(isset($theme_switch['old']) && isset($theme_switch['new']))
|
447 |
-
{
|
448 |
-
/*
|
449 |
-
* Add admin notification hook to move the files
|
450 |
-
*/
|
451 |
-
add_action('admin_notices', array("GFPDF_InstallUpdater", "do_theme_switch_notice"));
|
452 |
-
return true;
|
453 |
-
}
|
454 |
-
return false;
|
455 |
-
}
|
456 |
-
|
457 |
-
/*
|
458 |
-
* Prompt user to keep the plugin working
|
459 |
-
*/
|
460 |
-
public static function do_theme_switch_notice()
|
461 |
-
{
|
462 |
-
/*
|
463 |
-
* Check we aren't in the middle of doing the sync
|
464 |
-
*/
|
465 |
-
if(isset($_GET['_wpnonce']) && wp_verify_nonce($_GET['_wpnonce'], 'gfpdfe_sync_now'))
|
466 |
-
{
|
467 |
-
return;
|
468 |
-
}
|
469 |
-
|
470 |
-
echo '<div id="message" class="error"><p>';
|
471 |
-
echo 'Gravity Forms PDF Extended needs to keep the PDF_EXTENDED_TEMPLATE folder in sync with your current active theme. <a href="'. wp_nonce_url(PDF_SETTINGS_URL, 'gfpdfe_sync_now') . '" class="button">Sync Now</a>';
|
472 |
-
echo '</p></div>';
|
473 |
-
|
474 |
-
}
|
475 |
-
|
476 |
-
public static function gf_pdf_theme_sync_success()
|
477 |
-
{
|
478 |
-
echo '<div id="message" class="updated"><p>';
|
479 |
-
echo 'PDF_EXTENDED_TEMPLATE folder successfully synced.';
|
480 |
-
echo '</p></div>';
|
481 |
-
}
|
482 |
-
|
483 |
-
/*
|
484 |
-
* The after_switch_theme hook is too early in the initialisation to use request_filesystem_credentials()
|
485 |
-
* so we have to call this function at a later inteval
|
486 |
-
*/
|
487 |
-
public function do_theme_switch($previous_pdf_path, $current_pdf_path)
|
488 |
-
{
|
489 |
-
/*
|
490 |
-
* Prepare for calling the WP Filesystem
|
491 |
-
* It only allows post data to be added so we have to manually assign them
|
492 |
-
*/
|
493 |
-
$_POST['previous_pdf_path'] = $previous_pdf_path;
|
494 |
-
$_POST['current_pdf_path'] = $current_pdf_path;
|
495 |
-
|
496 |
-
/*
|
497 |
-
* Initialise the Wordpress Filesystem API
|
498 |
-
*/
|
499 |
-
if(PDF_Common::initialise_WP_filesystem_API(array('previous_pdf_path', 'current_pdf_path'), 'gfpdfe_sync_now') === false)
|
500 |
-
{
|
501 |
-
return false;
|
502 |
-
}
|
503 |
-
|
504 |
-
/*
|
505 |
-
* If we got here we should have $wp_filesystem available
|
506 |
-
*/
|
507 |
-
global $wp_filesystem;
|
508 |
-
|
509 |
-
/*
|
510 |
-
* We need to set up some filesystem compatibility checkes to work with the different server file management types
|
511 |
-
* Most notably is the FTP options, but SSH may be effected too
|
512 |
-
*/
|
513 |
-
|
514 |
-
if($wp_filesystem->method === 'ftpext' || $wp_filesystem->method === 'ftpsockets')
|
515 |
-
{
|
516 |
-
/*
|
517 |
-
* Assume FTP is rooted to the Wordpress install
|
518 |
-
*/
|
519 |
-
$base_directory = self::get_base_directory();
|
520 |
-
|
521 |
-
$previous_pdf_path = str_replace(ABSPATH, $base_directory, $previous_pdf_path);
|
522 |
-
$current_pdf_path = str_replace(ABSPATH, $base_directory, $current_pdf_path);
|
523 |
-
|
524 |
-
}
|
525 |
-
|
526 |
-
if($wp_filesystem->is_dir($previous_pdf_path))
|
527 |
-
{
|
528 |
-
self::pdf_extended_copy_directory( $previous_pdf_path, $current_pdf_path, true, true );
|
529 |
-
}
|
530 |
-
|
531 |
-
/*
|
532 |
-
* Remove the options key that triggers the switch theme function
|
533 |
-
*/
|
534 |
-
delete_option('gfpdfe_switch_theme');
|
535 |
-
add_action('gfpdfe_notices', array("GFPDF_InstallUpdater", "gf_pdf_theme_sync_success"));
|
536 |
-
|
537 |
-
/*
|
538 |
-
* Show success message to user
|
539 |
-
*/
|
540 |
-
return true;
|
541 |
-
}
|
542 |
-
|
543 |
-
/*
|
544 |
-
* Allows you to copy entire folder structures to new location
|
545 |
-
*/
|
546 |
-
|
547 |
-
public function pdf_extended_copy_directory( $source, $destination, $copy_base = true, $delete_destination = false )
|
548 |
-
{
|
549 |
-
global $wp_filesystem;
|
550 |
-
|
551 |
-
if ( $wp_filesystem->is_dir( $source ) )
|
552 |
-
{
|
553 |
-
if($delete_destination === true)
|
554 |
-
{
|
555 |
-
/*
|
556 |
-
* To ensure everything stays in sync we will remove the destination file structure
|
557 |
-
*/
|
558 |
-
$wp_filesystem->delete($destination, true);
|
559 |
-
}
|
560 |
-
|
561 |
-
if($copy_base === true)
|
562 |
-
{
|
563 |
-
$wp_filesystem->mkdir( $destination );
|
564 |
-
}
|
565 |
-
$directory = $wp_filesystem->dirlist( $source );
|
566 |
-
|
567 |
-
foreach($directory as $name => $data)
|
568 |
-
{
|
569 |
-
|
570 |
-
$PathDir = $source . '/' . $name;
|
571 |
-
|
572 |
-
if ( $wp_filesystem->is_dir( $PathDir ) )
|
573 |
-
{
|
574 |
-
self::pdf_extended_copy_directory( $PathDir, $destination . '/' . $name );
|
575 |
-
continue;
|
576 |
-
}
|
577 |
-
$wp_filesystem->copy( $PathDir, $destination . '/' . $name );
|
578 |
-
}
|
579 |
-
|
580 |
-
}
|
581 |
-
else
|
582 |
-
{
|
583 |
-
$wp_filesystem->copy( $source, $destination );
|
584 |
-
}
|
585 |
-
}
|
586 |
-
|
587 |
-
private static function check_access_path($directory, $file_path, $directory_list)
|
588 |
-
{
|
589 |
-
global $wp_filesystem;
|
590 |
-
|
591 |
-
//$directory = false;
|
592 |
-
foreach($directory_list as $name => $data)
|
593 |
-
{
|
594 |
-
/*
|
595 |
-
* Check if one of the file/folder names matches what is in $file_path, make sure it is a directory and
|
596 |
-
* the name has a value
|
597 |
-
*/
|
598 |
-
$match = array_search($name, $file_path);
|
599 |
-
if((strlen($name) > 0) && ($match !== false) && ((int) $data['isdir'] === 1) )
|
600 |
-
{
|
601 |
-
|
602 |
-
/*
|
603 |
-
* We have a match but it could be fake
|
604 |
-
* Look inside the target folder and see if the next folder in $file_path can be found
|
605 |
-
* If it can we will assume it is the correct path
|
606 |
-
*/
|
607 |
-
if(isset($file_path[$match+1]))
|
608 |
-
{
|
609 |
-
|
610 |
-
$next_match = $file_path[$match+1];
|
611 |
-
$directory_list2 = $wp_filesystem->dirlist('/'.$name.'/');
|
612 |
-
|
613 |
-
if(isset($directory_list2[$next_match]) && (int) $directory_list2[$next_match]['isdir'] === 1)
|
614 |
-
{
|
615 |
-
return self::merge_path($file_path, $match);
|
616 |
-
}
|
617 |
-
|
618 |
-
}
|
619 |
-
else
|
620 |
-
{
|
621 |
-
return self::merge_path($file_path, $match);
|
622 |
-
}
|
623 |
-
}
|
624 |
-
}
|
625 |
-
return $directory;
|
626 |
-
}
|
627 |
-
|
628 |
-
/*
|
629 |
-
* Merge the path array back together from the matched key
|
630 |
-
*/
|
631 |
-
private static function merge_path($file_path, $key)
|
632 |
-
{
|
633 |
-
return '/' . implode('/', array_slice($file_path, $key)) . '/';
|
634 |
-
}
|
635 |
-
|
636 |
-
/*
|
637 |
-
* Get the base directory for the current filemanagement type
|
638 |
-
* In this case it is FTP but may be SSH
|
639 |
-
*/
|
640 |
-
private static function get_base_directory()
|
641 |
-
{
|
642 |
-
global $wp_filesystem;
|
643 |
-
|
644 |
-
/*
|
645 |
-
* Assume FTP is rooted to the Wordpress install
|
646 |
-
*/
|
647 |
-
$directory = '/';
|
648 |
-
|
649 |
-
/*
|
650 |
-
* Test if the FTP is below the Wordpress base by sniffing the base directory
|
651 |
-
*/
|
652 |
-
$directory_list = $wp_filesystem->dirlist('/');
|
653 |
-
|
654 |
-
/*
|
655 |
-
* Use the ABSPATH to compare the directory structure
|
656 |
-
*/
|
657 |
-
$file_path = array_filter(explode('/', ABSPATH ));
|
658 |
-
|
659 |
-
/*
|
660 |
-
* Rekey the array
|
661 |
-
*/
|
662 |
-
$file_path = array_values($file_path);
|
663 |
-
|
664 |
-
return self::check_access_path($directory, $file_path, $directory_list);
|
665 |
-
|
666 |
-
}
|
667 |
-
|
668 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mPDF.zip
DELETED
Binary file
|
pdf-common.php
DELETED
@@ -1,232 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class PDF_Common
|
4 |
-
{
|
5 |
-
public static function setup_ids()
|
6 |
-
{
|
7 |
-
global $form_id, $lead_id, $lead_ids;
|
8 |
-
|
9 |
-
if(defined('GF_FORM_ID') && defined('GF_LEAD_ID'))
|
10 |
-
{
|
11 |
-
$form_id = GF_FORM_ID;
|
12 |
-
$lead_ids = array(GF_LEAD_ID);
|
13 |
-
}
|
14 |
-
else
|
15 |
-
{
|
16 |
-
$form_id = ($form_id) ? $form_id : absint( rgget("fid") );
|
17 |
-
$lead_ids = ($lead_id) ? array($lead_id) : explode(',', rgget("lid"));
|
18 |
-
}
|
19 |
-
|
20 |
-
/**
|
21 |
-
* If form ID and lead ID hasn't been set stop the PDF from attempting to generate
|
22 |
-
*/
|
23 |
-
if(empty($form_id) || empty($lead_ids))
|
24 |
-
{
|
25 |
-
trigger_error(__("Form Id and Lead Id are required parameters.", "gravityforms"));
|
26 |
-
return;
|
27 |
-
}
|
28 |
-
}
|
29 |
-
|
30 |
-
/*
|
31 |
-
* Check if the system is fully installed and return the correct values
|
32 |
-
*/
|
33 |
-
public static function is_fully_installed()
|
34 |
-
{
|
35 |
-
if( (get_option('gf_pdf_extended_installed') != 'installed') || (!is_dir(PDF_TEMPLATE_LOCATION)) )
|
36 |
-
{
|
37 |
-
return false;
|
38 |
-
}
|
39 |
-
|
40 |
-
if(get_option('gf_pdf_extended_version') != PDF_EXTENDED_VERSION)
|
41 |
-
{
|
42 |
-
return false;
|
43 |
-
}
|
44 |
-
|
45 |
-
if(get_option('gf_pdf_extended_deploy') == 'no' && !rgpost('upgrade') && PDF_DEPLOY === true)
|
46 |
-
{
|
47 |
-
return false;
|
48 |
-
}
|
49 |
-
|
50 |
-
if(file_exists(PDF_PLUGIN_DIR .'mPDF.zip'))
|
51 |
-
{
|
52 |
-
return false;
|
53 |
-
}
|
54 |
-
|
55 |
-
return true;
|
56 |
-
}
|
57 |
-
|
58 |
-
public static function getRealIpAddr()
|
59 |
-
{
|
60 |
-
if (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet
|
61 |
-
{
|
62 |
-
$ip = $_SERVER['HTTP_CLIENT_IP'];
|
63 |
-
}
|
64 |
-
else if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy
|
65 |
-
{
|
66 |
-
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
67 |
-
}
|
68 |
-
else
|
69 |
-
{
|
70 |
-
$ip = $_SERVER['REMOTE_ADDR'];
|
71 |
-
}
|
72 |
-
return $ip;
|
73 |
-
}
|
74 |
-
|
75 |
-
public static function get_html_template($filename)
|
76 |
-
{
|
77 |
-
global $form_id, $lead_id, $lead_ids;
|
78 |
-
|
79 |
-
ob_start();
|
80 |
-
require($filename);
|
81 |
-
|
82 |
-
$page = ob_get_contents();
|
83 |
-
ob_end_clean();
|
84 |
-
|
85 |
-
return $page;
|
86 |
-
}
|
87 |
-
|
88 |
-
/**
|
89 |
-
* Get the name of the PDF based on the Form and the submission
|
90 |
-
*/
|
91 |
-
public static function get_pdf_filename($form_id, $lead_id)
|
92 |
-
{
|
93 |
-
return "form-$form_id-entry-$lead_id.pdf";
|
94 |
-
}
|
95 |
-
|
96 |
-
/*
|
97 |
-
* Check if mPDF folder exists.
|
98 |
-
* If so, unzip and delete
|
99 |
-
* Helps reduce the package file size
|
100 |
-
*/
|
101 |
-
public static function unpack_mPDF()
|
102 |
-
{
|
103 |
-
$file = PDF_PLUGIN_DIR .'mPDF.zip';
|
104 |
-
$path = pathinfo(realpath($file), PATHINFO_DIRNAME);
|
105 |
-
|
106 |
-
if(file_exists($file))
|
107 |
-
{
|
108 |
-
/* unzip folder and delete */
|
109 |
-
$zip = new ZipArchive;
|
110 |
-
$res = $zip->open($file);
|
111 |
-
|
112 |
-
if ($res === TRUE) {
|
113 |
-
$zip->extractTo($path);
|
114 |
-
$zip->close();
|
115 |
-
unlink($file);
|
116 |
-
}
|
117 |
-
}
|
118 |
-
}
|
119 |
-
|
120 |
-
public static function validate_pdf_name($name, $form_id = false, $lead_id = false)
|
121 |
-
{
|
122 |
-
if(substr($name, -4) != '.pdf')
|
123 |
-
{
|
124 |
-
$pdf_name = $name . '.pdf';
|
125 |
-
}
|
126 |
-
$pdf_name = $name;
|
127 |
-
|
128 |
-
if($form_id > 0)
|
129 |
-
{
|
130 |
-
$pdf_name = PDF_Common::do_mergetags($name, $form_id, $lead_id);
|
131 |
-
}
|
132 |
-
|
133 |
-
return $pdf_name;
|
134 |
-
}
|
135 |
-
|
136 |
-
public static function do_mergetags($string, $form_id, $lead_id)
|
137 |
-
{
|
138 |
-
$form = RGFormsModel::get_form_meta($form_id);
|
139 |
-
$lead = RGFormsModel::get_lead($lead_id);
|
140 |
-
|
141 |
-
/* strip {all_fields} merge tag from $string */
|
142 |
-
$string = str_replace('{all_fields}', '', $string);
|
143 |
-
|
144 |
-
return trim(GFCommon::replace_variables($string, $form, $lead, false, false, false));
|
145 |
-
}
|
146 |
-
|
147 |
-
public static function view_data($form_data)
|
148 |
-
{
|
149 |
-
if($_GET['data'] === '1' && GFCommon::current_user_can_any("gravityforms_view_entries"))
|
150 |
-
{
|
151 |
-
print '<pre>';
|
152 |
-
print_r($form_data);
|
153 |
-
print '</pre>';
|
154 |
-
exit;
|
155 |
-
}
|
156 |
-
}
|
157 |
-
|
158 |
-
public static function is_gravityforms_supported($version){
|
159 |
-
if(class_exists("GFCommon"))
|
160 |
-
{
|
161 |
-
if(version_compare(GFCommon::$version, $version, ">=") === true)
|
162 |
-
{
|
163 |
-
return true;
|
164 |
-
}
|
165 |
-
}
|
166 |
-
return false;
|
167 |
-
}
|
168 |
-
|
169 |
-
public static function is_wordpress_supported($version){
|
170 |
-
global $wp_version;
|
171 |
-
if(version_compare($wp_version, $version, ">=") === true)
|
172 |
-
{
|
173 |
-
return true;
|
174 |
-
}
|
175 |
-
return false;
|
176 |
-
}
|
177 |
-
|
178 |
-
public static function display_compatibility_error()
|
179 |
-
{
|
180 |
-
$message = sprintf(__("Gravity Forms " . GF_PDF_EXTENDED_SUPPORTED_VERSION . " is required to use this plugin. Activate it now or %spurchase it today!%s"), "<a href='https://www.e-junkie.com/ecom/gb.php?cl=54585&c=ib&aff=235154'>", "</a>");
|
181 |
-
PDF_Common::display_plugin_message($message, true);
|
182 |
-
}
|
183 |
-
|
184 |
-
public static function display_wp_compatibility_error()
|
185 |
-
{
|
186 |
-
$message = "Wordpress " . GF_PDF_EXTENDED_WP_SUPPORTED_VERSION . " or higher is required to use this plugin.";
|
187 |
-
PDF_Common::display_plugin_message($message, true);
|
188 |
-
}
|
189 |
-
|
190 |
-
public static function display_documentation_details()
|
191 |
-
{
|
192 |
-
$message = sprintf(__("Please review the %sGravity Forms PDF Extended documentation%s for comprehensive installation instructions. %sUpgraded from v2.x.x? Review our migration guide%s.</span>"), "<a href='http://gravityformspdfextended.com/documentation-v3-x-x/installation-and-configuration/'>", "</a>", '<a style="color: red;" href="http://gravityformspdfextended.com/documentation-v3-x-x/v3-0-0-migration-guide/">', '</a>');
|
193 |
-
PDF_Common::display_plugin_message($message);
|
194 |
-
}
|
195 |
-
|
196 |
-
public static function display_plugin_message($message, $is_error = false){
|
197 |
-
|
198 |
-
$style = $is_error ? 'style="background-color: #ffebe8;"' : "";
|
199 |
-
|
200 |
-
echo '</tr><tr class="plugin-update-tr"><td colspan="5" class="plugin-update"><div class="update-message" ' . $style . '>' . $message . '</div></td>';
|
201 |
-
}
|
202 |
-
|
203 |
-
/*
|
204 |
-
* New to 3.0.2 we will use WP_Filesystem API to manipulate files instead of using in-built PHP functions
|
205 |
-
* $post Array the post data to include in the request_filesystem_credntials API
|
206 |
-
*/
|
207 |
-
public static function initialise_WP_filesystem_API($post, $nonce)
|
208 |
-
{
|
209 |
-
|
210 |
-
$url = wp_nonce_url(PDF_SETTINGS_URL, $nonce);
|
211 |
-
|
212 |
-
if (false === ($creds = request_filesystem_credentials($url, '', false, false, $post) ) ) {
|
213 |
-
/*
|
214 |
-
* If we get here, then we don't have correct permissions and we need to get the FTP details.
|
215 |
-
* request_filesystem_credentials will handle all that
|
216 |
-
*/
|
217 |
-
return false; // stop the normal page form from displaying
|
218 |
-
}
|
219 |
-
|
220 |
-
/*
|
221 |
-
* Check if the credentials are no good and display an error
|
222 |
-
*/
|
223 |
-
if ( ! WP_Filesystem($creds) ) {
|
224 |
-
request_filesystem_credentials($url, '', true, false, $post_credentials);
|
225 |
-
return false;
|
226 |
-
}
|
227 |
-
|
228 |
-
return true;
|
229 |
-
|
230 |
-
}
|
231 |
-
|
232 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pdf-configuration-indexer.php
DELETED
@@ -1,245 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class: PDFGenerator
|
5 |
-
* Plugin: Gravity Forms PDF Extended
|
6 |
-
* Usage: assign options from user configuration file, automatically attach PDFs to specified Gravity Forms, and view PDF from admin area.
|
7 |
-
*/
|
8 |
-
|
9 |
-
class PDFGenerator
|
10 |
-
{
|
11 |
-
|
12 |
-
/*
|
13 |
-
* Set default values for forms not assigned a PDF
|
14 |
-
*/
|
15 |
-
public static $default = array(
|
16 |
-
'template' => 'default-template.php',
|
17 |
-
'pdf_size' => 'a4',
|
18 |
-
'orientation' => 'portrait',
|
19 |
-
'rtf' => false,
|
20 |
-
'security' => false
|
21 |
-
);
|
22 |
-
|
23 |
-
public static $allowed_privileges = array('copy', 'print', 'modify', 'annot-forms', 'fill-forms', 'extract', 'assemble', 'print-highres');
|
24 |
-
|
25 |
-
public $configuration = array();
|
26 |
-
|
27 |
-
public static $gf_compatibility;
|
28 |
-
|
29 |
-
public static $pre_1_7_notifications = array('Admin Notification', 'User Notification');
|
30 |
-
|
31 |
-
/*
|
32 |
-
* Switch to verify if configuration file exists.
|
33 |
-
* If not, user is using old functions.php method and we
|
34 |
-
* don't want to interfere with it.
|
35 |
-
*/
|
36 |
-
public $disabled = false;
|
37 |
-
|
38 |
-
/*
|
39 |
-
* The index holds the form_id and configuration key in $this->configuration
|
40 |
-
* so each form knows
|
41 |
-
*/
|
42 |
-
public $index = array();
|
43 |
-
|
44 |
-
public function __construct()
|
45 |
-
{
|
46 |
-
/*
|
47 |
-
* Detect Gravity Forms version and use appropriate code
|
48 |
-
*/
|
49 |
-
PDFGenerator::$gf_compatibility = 'post 1.7';
|
50 |
-
if(GFCommon::$version < 1.7)
|
51 |
-
{
|
52 |
-
PDFGenerator::$gf_compatibility = 'pre 1.7';
|
53 |
-
}
|
54 |
-
|
55 |
-
/*
|
56 |
-
* Do configuration pre-processing
|
57 |
-
*/
|
58 |
-
|
59 |
-
/*
|
60 |
-
* Check if user configuration file exists
|
61 |
-
* If not disable $configuration and $index.
|
62 |
-
*/
|
63 |
-
if(!file_exists(PDF_TEMPLATE_LOCATION.'configuration.php'))
|
64 |
-
{
|
65 |
-
$this->disabled = true;
|
66 |
-
return;
|
67 |
-
}
|
68 |
-
else
|
69 |
-
{
|
70 |
-
/*
|
71 |
-
* Include the configuration file and set up the configuration variable.
|
72 |
-
*/
|
73 |
-
require(PDF_TEMPLATE_LOCATION.'configuration.php');
|
74 |
-
/*
|
75 |
-
* $gf_pdf_config included from configuration.php file
|
76 |
-
*/
|
77 |
-
$this->configuration = (isset($gf_pdf_config)) ? $gf_pdf_config : array();
|
78 |
-
}
|
79 |
-
|
80 |
-
$this->pdf_config();
|
81 |
-
}
|
82 |
-
|
83 |
-
/*
|
84 |
-
* Run through user configuration and set PDF options
|
85 |
-
*/
|
86 |
-
private function pdf_config()
|
87 |
-
{
|
88 |
-
if(sizeof($this->configuration) == 0)
|
89 |
-
{
|
90 |
-
return;
|
91 |
-
}
|
92 |
-
|
93 |
-
$this->set_form_pdfs();
|
94 |
-
}
|
95 |
-
|
96 |
-
|
97 |
-
/*
|
98 |
-
* Set the configuration index so it's faster to access template configuration information
|
99 |
-
*/
|
100 |
-
private function set_form_pdfs()
|
101 |
-
{
|
102 |
-
foreach($this->configuration as $key => $config)
|
103 |
-
{
|
104 |
-
if(!is_array($config['form_id']))
|
105 |
-
{
|
106 |
-
$this->assign_index($config['form_id'], $key);
|
107 |
-
}
|
108 |
-
else
|
109 |
-
{
|
110 |
-
foreach($config['form_id'] as $id)
|
111 |
-
{
|
112 |
-
$this->assign_index($id, $key);
|
113 |
-
}
|
114 |
-
}
|
115 |
-
|
116 |
-
}
|
117 |
-
}
|
118 |
-
|
119 |
-
/*
|
120 |
-
* Check to see if ID is valid
|
121 |
-
* If so, assign ID => key to index
|
122 |
-
*/
|
123 |
-
protected function assign_index($id, $key)
|
124 |
-
{
|
125 |
-
$id = (int) $id;
|
126 |
-
if($id !== 0)
|
127 |
-
{
|
128 |
-
/*
|
129 |
-
* Assign the outter array with the form ID and the value as the configuration key
|
130 |
-
*/
|
131 |
-
$this->index[$id][] = $key;
|
132 |
-
}
|
133 |
-
}
|
134 |
-
|
135 |
-
/*
|
136 |
-
* Searches the index for the configuration key
|
137 |
-
* Return: form PDF configuration
|
138 |
-
*/
|
139 |
-
public function get_config($id)
|
140 |
-
{
|
141 |
-
if(!isset($this->index[$id]))
|
142 |
-
{
|
143 |
-
return false;
|
144 |
-
}
|
145 |
-
return $this->index[$id];
|
146 |
-
}
|
147 |
-
|
148 |
-
/*
|
149 |
-
* Searches the index for the configuration key and once found return the real configuration
|
150 |
-
* Return: form PDF configuration
|
151 |
-
*/
|
152 |
-
public function get_config_data($form_id)
|
153 |
-
{
|
154 |
-
if(!isset($this->index[$form_id]))
|
155 |
-
{
|
156 |
-
return false;
|
157 |
-
}
|
158 |
-
|
159 |
-
$index = $this->index[$form_id];
|
160 |
-
|
161 |
-
/*
|
162 |
-
* Because it is the default template we can assume multiple indexes don't exist as this feature
|
163 |
-
* is something used to assign different templates to notifications in the same form
|
164 |
-
*/
|
165 |
-
return $this->configuration[$index[0]];
|
166 |
-
}
|
167 |
-
|
168 |
-
/*
|
169 |
-
* Search for the template from a given form id
|
170 |
-
* Return: the first template found for the form
|
171 |
-
* TODO: return all PDFs
|
172 |
-
*/
|
173 |
-
public function get_template($form_id)
|
174 |
-
{
|
175 |
-
$template = '';
|
176 |
-
|
177 |
-
if(isset($this->index[$form_id]))
|
178 |
-
{
|
179 |
-
/*
|
180 |
-
* Check if PDF template is avaliable
|
181 |
-
*/
|
182 |
-
if(isset($this->configuration[$this->index[$form_id][0]]['template']))
|
183 |
-
{
|
184 |
-
$user_template = (isset($_GET['template'])) ? $_GET['template'] : '';
|
185 |
-
$match = false;
|
186 |
-
|
187 |
-
foreach($this->index[$form_id] as $index)
|
188 |
-
{
|
189 |
-
if($this->configuration[$index]['template'] === $user_template)
|
190 |
-
{
|
191 |
-
$match = true;
|
192 |
-
}
|
193 |
-
}
|
194 |
-
|
195 |
-
$template = ($match === true) ? $user_template : $this->configuration[$this->index[$form_id][0]]['template'];
|
196 |
-
}
|
197 |
-
|
198 |
-
if(strlen($template) == 0)
|
199 |
-
{
|
200 |
-
$template = PDFGenerator::$default['template'];
|
201 |
-
}
|
202 |
-
return $template;
|
203 |
-
}
|
204 |
-
|
205 |
-
if( (strlen($template) == 0) && (GFPDF_SET_DEFAULT_TEMPLATE === true))
|
206 |
-
{
|
207 |
-
/*
|
208 |
-
* If no PDF template exists then use the default template
|
209 |
-
*/
|
210 |
-
return PDFGenerator::$default['template'];
|
211 |
-
}
|
212 |
-
else
|
213 |
-
{
|
214 |
-
return false;
|
215 |
-
}
|
216 |
-
|
217 |
-
}
|
218 |
-
|
219 |
-
public function get_pdf_name($index, $form_id = false, $lead_id = false)
|
220 |
-
{
|
221 |
-
return PDF_Common::validate_pdf_name($this->configuration[$index]['filename'], $form_id, $lead_id);
|
222 |
-
}
|
223 |
-
|
224 |
-
public function validate_privileges($privs)
|
225 |
-
{
|
226 |
-
if(!is_array($privs))
|
227 |
-
{
|
228 |
-
return array();
|
229 |
-
}
|
230 |
-
|
231 |
-
$new_privs = array_filter($privs, array($this, 'array_filter_privilages'));
|
232 |
-
|
233 |
-
return $new_privs;
|
234 |
-
}
|
235 |
-
|
236 |
-
private function array_filter_privilages($i)
|
237 |
-
{
|
238 |
-
if(in_array($i, PDFGenerator::$allowed_privileges))
|
239 |
-
{
|
240 |
-
return true;
|
241 |
-
}
|
242 |
-
return false;
|
243 |
-
}
|
244 |
-
|
245 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pdf-entry-detail.php
DELETED
@@ -1,1165 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
if(!class_exists('GFPDFEntryDetail'))
|
3 |
-
{
|
4 |
-
class GFPDFEntryDetail {
|
5 |
-
|
6 |
-
/* NEED THIS FUNCTION - BLD */
|
7 |
-
public static function notes_grid($notes, $is_editable, $emails = null, $autoresponder_subject=""){
|
8 |
-
if(sizeof($notes) > 0 && $is_editable && GFCommon::current_user_can_any("gravityforms_edit_entry_notes")){
|
9 |
-
?>
|
10 |
-
<div class="alignleft actions" style="padding:3px 0;">
|
11 |
-
<label class="hidden" for="bulk_action"><?php _e(" Bulk action", "gravityforms") ?></label>
|
12 |
-
<select name="bulk_action" id="bulk_action">
|
13 |
-
<option value=''><?php _e(" Bulk action ", "gravityforms") ?></option>
|
14 |
-
<option value='delete'><?php _e("Delete", "gravityforms") ?></option>
|
15 |
-
</select>
|
16 |
-
<?php
|
17 |
-
$apply_button = '<input type="submit" class="button" value="' . __("Apply", "gravityforms") . '" onclick="jQuery(\'#action\').val(\'bulk\');" style="width: 50px;" />';
|
18 |
-
echo apply_filters("gform_notes_apply_button", $apply_button);
|
19 |
-
?>
|
20 |
-
</div>
|
21 |
-
<?php
|
22 |
-
}
|
23 |
-
?>
|
24 |
-
<table class="widefat fixed entry-detail-notes" autosize="1" cellspacing="0">
|
25 |
-
<?php
|
26 |
-
if(!$is_editable){
|
27 |
-
?>
|
28 |
-
<thead>
|
29 |
-
<tr>
|
30 |
-
<th id="notes">Notes</th>
|
31 |
-
</tr>
|
32 |
-
</thead>
|
33 |
-
<?php
|
34 |
-
}
|
35 |
-
?>
|
36 |
-
<tbody id="the-comment-list" class="list:comment">
|
37 |
-
<?php
|
38 |
-
$count = 0;
|
39 |
-
$notes_count = sizeof($notes);
|
40 |
-
foreach($notes as $note){
|
41 |
-
$count++;
|
42 |
-
$is_last = $count >= $notes_count ? true : false;
|
43 |
-
?>
|
44 |
-
<tr valign="top">
|
45 |
-
<?php
|
46 |
-
if($is_editable && GFCommon::current_user_can_any("gravityforms_edit_entry_notes")){
|
47 |
-
?>
|
48 |
-
<th class="check-column" scope="row" style="padding:9px 3px 0 0">
|
49 |
-
<input type="checkbox" value="<?php echo $note->id ?>" name="note[]"/>
|
50 |
-
</th>
|
51 |
-
<td colspan="2">
|
52 |
-
<?php
|
53 |
-
}
|
54 |
-
else{
|
55 |
-
?>
|
56 |
-
<td class="entry-detail-note<?php echo $is_last ? " lastrow" : "" ?>">
|
57 |
-
<?php
|
58 |
-
}
|
59 |
-
?>
|
60 |
-
<div style="margin-top:4px;">
|
61 |
-
<div class="note-avatar"><?php echo get_avatar($note->user_id, 48);?></div>
|
62 |
-
<h6 class="note-author"> <?php echo esc_html($note->user_name)?></h6>
|
63 |
-
<p style="line-height:130%; text-align:left; margin-top:3px;"><a href="mailto:<?php echo esc_attr($note->user_email)?>"><?php echo esc_html($note->user_email) ?></a><br />
|
64 |
-
<?php _e("added on", "gravityforms"); ?> <?php echo esc_html(GFCommon::format_date($note->date_created, false)) ?></p>
|
65 |
-
</div>
|
66 |
-
<div class="detail-note-content"><?php echo esc_html($note->value) ?></div>
|
67 |
-
</td>
|
68 |
-
|
69 |
-
</tr>
|
70 |
-
<?php
|
71 |
-
}
|
72 |
-
if($is_editable && GFCommon::current_user_can_any("gravityforms_edit_entry_notes")){
|
73 |
-
?>
|
74 |
-
<tr>
|
75 |
-
<td colspan="3" style="padding:10px;" class="lastrow">
|
76 |
-
<textarea name="new_note" style="width:100%; height:50px; margin-bottom:4px;"></textarea>
|
77 |
-
<?php
|
78 |
-
$note_button = '<input type="submit" name="add_note" value="' . __("Add Note", "gravityforms") . '" class="button" style="width:60px;" onclick="jQuery(\'#action\').val(\'add_note\');"/>';
|
79 |
-
echo apply_filters("gform_addnote_button", $note_button);
|
80 |
-
|
81 |
-
if(!empty($emails)){ ?>
|
82 |
-
|
83 |
-
<span>
|
84 |
-
<select name="gentry_email_notes_to" onchange="if(jQuery(this).val() != '') {jQuery('#gentry_email_subject_container').css('display', 'inline');} else{jQuery('#gentry_email_subject_container').css('display', 'none');}">
|
85 |
-
<option value=""><?php _e("Also email this note to", "gravityforms") ?></option>
|
86 |
-
<?php foreach($emails as $email){ ?>
|
87 |
-
<option value="<?php echo $email ?>"><?php echo $email ?></option>
|
88 |
-
<?php } ?>
|
89 |
-
</select>
|
90 |
-
|
91 |
-
|
92 |
-
<span id='gentry_email_subject_container' style="display:none;">
|
93 |
-
<label for="gentry_email_subject"><?php _e("Subject:", "gravityforms") ?></label>
|
94 |
-
<input type="text" name="gentry_email_subject" id="gentry_email_subject" value="<?php echo $autoresponder_subject ?>" style="width:35%"/>
|
95 |
-
</span>
|
96 |
-
</span>
|
97 |
-
<?php } ?>
|
98 |
-
</td>
|
99 |
-
</tr>
|
100 |
-
<?php
|
101 |
-
}
|
102 |
-
?>
|
103 |
-
</tbody>
|
104 |
-
</table>
|
105 |
-
<?php
|
106 |
-
}
|
107 |
-
/* NEED THIS FUNCTION - BLD */
|
108 |
-
public static function lead_detail_grid($form, $lead, $allow_display_empty_fields=false, $show_html=false, $show_page_name=false){
|
109 |
-
$form_id = $form["id"];
|
110 |
-
|
111 |
-
?>
|
112 |
-
<div id="container">
|
113 |
-
<h2 id="details" class="default"><?php echo $form["title"]?> <!--: <?php _e("Entry # ", "gravityforms") ?> <?php echo $lead["id"] ?> --></h2>
|
114 |
-
|
115 |
-
<?php
|
116 |
-
$count = 0;
|
117 |
-
$field_count = sizeof($form["fields"]);
|
118 |
-
|
119 |
-
$has_product_fields = false;
|
120 |
-
|
121 |
-
$page_number = 0;
|
122 |
-
foreach($form["fields"] as $field) {
|
123 |
-
|
124 |
-
/*
|
125 |
-
* Check if we are to show the page names
|
126 |
-
*/
|
127 |
-
if($show_page_name === true)
|
128 |
-
{
|
129 |
-
if((int) $field['pageNumber'] !== $page_number)
|
130 |
-
{
|
131 |
-
/*
|
132 |
-
* Display the page number
|
133 |
-
*/
|
134 |
-
?>
|
135 |
-
<h2 class="default entry-view-page-break"><?php echo $form['pagination']['pages'][$page_number]; ?></h2>
|
136 |
-
<?php
|
137 |
-
/*
|
138 |
-
* Increment the page number
|
139 |
-
*/
|
140 |
-
$page_number++;
|
141 |
-
}
|
142 |
-
}
|
143 |
-
|
144 |
-
$even = $odd = '';
|
145 |
-
switch(RGFormsModel::get_input_type($field)){
|
146 |
-
case "section" :
|
147 |
-
|
148 |
-
if(!GFCommon::is_section_empty($field, $form, $lead) || $allow_display_empty_fields){
|
149 |
-
$count++;
|
150 |
-
$is_last = $count >= $field_count ? true : false;
|
151 |
-
?>
|
152 |
-
<h2 class="default entry-view-section-break<?php echo $is_last ? " lastrow" : ""?>"><?php echo esc_html(GFCommon::get_label($field))?></h2>
|
153 |
-
|
154 |
-
<?php
|
155 |
-
}
|
156 |
-
break;
|
157 |
-
|
158 |
-
case "captcha":
|
159 |
-
case "password":
|
160 |
-
case "page":
|
161 |
-
//ignore captcha, html, password, page field
|
162 |
-
break;
|
163 |
-
case "html":
|
164 |
-
if($show_html == true)
|
165 |
-
{
|
166 |
-
|
167 |
-
$count++;
|
168 |
-
$is_last = $count >= $field_count && !$has_product_fields ? true : false;
|
169 |
-
$last_row = $is_last ? " lastrow" : "";
|
170 |
-
$even = ($count%2) ? ' odd' : ' even';
|
171 |
-
|
172 |
-
$display_value = wpautop($field['content']);
|
173 |
-
|
174 |
-
$content = '<div class="entry-view-field-value' . $last_row . $even . '"><div class="value">' . $display_value . '</div></div>';
|
175 |
-
$content = apply_filters("gform_field_content", $content, $field, $value, $lead["id"], $form["id"]);
|
176 |
-
|
177 |
-
echo $content;
|
178 |
-
}
|
179 |
-
break;
|
180 |
-
case "signature":
|
181 |
-
$value = RGFormsModel::get_lead_field_value($lead, $field);
|
182 |
-
$public_folder = RGFormsModel::get_upload_url_root() . 'signatures/';
|
183 |
-
$server_folder = RGFormsModel::get_upload_root() . 'signatures/';
|
184 |
-
$display_value = '<img src="'. $server_folder.$value .'" alt="Signature" width="100" height="60" />';
|
185 |
-
$is_last = $count >= $field_count ? true : false;
|
186 |
-
$last_row = $is_last ? " lastrow" : "";
|
187 |
-
|
188 |
-
if(strlen($value) > 0 && (file_exists($server_folder.$value)) )
|
189 |
-
{
|
190 |
-
$content = '<div class="entry-view-field-value' . $last_row . $even . '"><div class="strong">' . esc_html(GFCommon::get_label($field)) . '</div> <div class="value">' . $display_value . '</div></div> ';
|
191 |
-
|
192 |
-
echo $content;
|
193 |
-
}
|
194 |
-
break;
|
195 |
-
|
196 |
-
default:
|
197 |
-
|
198 |
-
//ignore product fields as they will be grouped together at the end of the grid
|
199 |
-
if(GFCommon::is_product_field($field["type"])){
|
200 |
-
$has_product_fields = true;
|
201 |
-
continue;
|
202 |
-
}
|
203 |
-
|
204 |
-
$value = RGFormsModel::get_lead_field_value($lead, $field);
|
205 |
-
$display_value = self::pdf_get_lead_field_display($field, $value, $lead["currency"]);
|
206 |
-
|
207 |
-
$display_value = apply_filters("gform_entry_field_value", $display_value, $field, $lead, $form);
|
208 |
-
|
209 |
-
if( !empty($display_value) || $display_value === "0" || $allow_display_empty_fields){
|
210 |
-
$count++;
|
211 |
-
$is_last = $count >= $field_count && !$has_product_fields ? true : false;
|
212 |
-
$last_row = $is_last ? " lastrow" : "";
|
213 |
-
$even = ($count%2) ? ' odd' : ' even';
|
214 |
-
|
215 |
-
$display_value = empty($display_value) && $display_value !== "0" ? " " : $display_value;
|
216 |
-
|
217 |
-
$content = '<div class="entry-view-field-value' . $last_row . $even . '"><div class="strong">' . esc_html(GFCommon::get_label($field)) . '</div> <div class="value">' . $display_value . '</div></div>';
|
218 |
-
|
219 |
-
$content = apply_filters("gform_field_content", $content, $field, $value, $lead["id"], $form["id"]);
|
220 |
-
|
221 |
-
echo $content;
|
222 |
-
|
223 |
-
}
|
224 |
-
break;
|
225 |
-
}
|
226 |
-
|
227 |
-
}
|
228 |
-
$products = array();
|
229 |
-
if($has_product_fields){
|
230 |
-
|
231 |
-
self::product_table($form, $lead);
|
232 |
-
|
233 |
-
}
|
234 |
-
?>
|
235 |
-
</div>
|
236 |
-
<?php
|
237 |
-
}
|
238 |
-
|
239 |
-
public static function product_table($form, $lead)
|
240 |
-
{
|
241 |
-
$products = GFCommon::get_product_fields($form, $lead, true);
|
242 |
-
|
243 |
-
$form_id = $form['id'];
|
244 |
-
if(!empty($products["products"])){
|
245 |
-
?>
|
246 |
-
|
247 |
-
<h2 class="default entry-view-field-name"><?php echo apply_filters("gform_order_label_{$form["id"]}", apply_filters("gform_order_label", __("Order", "gravityforms"), $form["id"]), $form["id"]) ?></h2>
|
248 |
-
|
249 |
-
<table class="entry-products" autosize="1" cellspacing="0" width="97%">
|
250 |
-
<colgroup>
|
251 |
-
<col class="entry-products-col1" />
|
252 |
-
<col class="entry-products-col2" />
|
253 |
-
<col class="entry-products-col3" />
|
254 |
-
<col class="entry-products-col4" />
|
255 |
-
</colgroup>
|
256 |
-
<thead>
|
257 |
-
<tr>
|
258 |
-
<th scope="col"><?php echo apply_filters("gform_product_{$form_id}", apply_filters("gform_product", __("Product", "gravityforms"), $form_id), $form_id) ?></th>
|
259 |
-
<th scope="col" class="textcenter"><?php echo apply_filters("gform_product_qty_{$form_id}", apply_filters("gform_product_qty", __("Qty", "gravityforms"), $form_id), $form_id) ?></th>
|
260 |
-
<th scope="col"><?php echo apply_filters("gform_product_unitprice_{$form_id}", apply_filters("gform_product_unitprice", __("Unit Price", "gravityforms"), $form_id), $form_id) ?></th>
|
261 |
-
<th scope="col"><?php echo apply_filters("gform_product_price_{$form_id}", apply_filters("gform_product_price", __("Price", "gravityforms"), $form_id), $form_id) ?></th>
|
262 |
-
</tr>
|
263 |
-
</thead>
|
264 |
-
<tbody>
|
265 |
-
<?php
|
266 |
-
|
267 |
-
$total = 0;
|
268 |
-
foreach($products["products"] as $product){
|
269 |
-
?>
|
270 |
-
<tr>
|
271 |
-
<td>
|
272 |
-
<div class="product_name"><?php echo esc_html($product["name"])?></div>
|
273 |
-
|
274 |
-
<?php
|
275 |
-
$price = GFCommon::to_number($product["price"]);
|
276 |
-
if(is_array(rgar($product,"options"))){
|
277 |
-
echo '<ul class="product_options">';
|
278 |
-
$count = sizeof($product["options"]);
|
279 |
-
$index = 1;
|
280 |
-
foreach($product["options"] as $option){
|
281 |
-
$price += GFCommon::to_number($option["price"]);
|
282 |
-
$class = $index == $count ? " class='lastitem'" : "";
|
283 |
-
$index++;
|
284 |
-
?>
|
285 |
-
<li<?php echo $class?>><?php echo $option["option_label"]?></li>
|
286 |
-
<?php
|
287 |
-
}
|
288 |
-
echo '</ul>';
|
289 |
-
}
|
290 |
-
$subtotal = floatval($product["quantity"]) * $price;
|
291 |
-
$total += $subtotal;
|
292 |
-
?>
|
293 |
-
|
294 |
-
</td>
|
295 |
-
<td class="textcenter"><?php echo $product["quantity"] ?></td>
|
296 |
-
<td><?php echo GFCommon::to_money($price, $lead["currency"]) ?></td>
|
297 |
-
<td><?php echo GFCommon::to_money($subtotal, $lead["currency"]) ?></td>
|
298 |
-
</tr>
|
299 |
-
<?php
|
300 |
-
}
|
301 |
-
$total += floatval($products["shipping"]["price"]);
|
302 |
-
?>
|
303 |
-
|
304 |
-
|
305 |
-
<?php
|
306 |
-
if(!empty($products["shipping"]["name"])){
|
307 |
-
?>
|
308 |
-
<tr>
|
309 |
-
<td colspan="2" rowspan="2" class="emptycell"> </td>
|
310 |
-
<td class="textright shipping"><?php echo $products["shipping"]["name"] ?></td>
|
311 |
-
<td class="shipping_amount"><?php echo GFCommon::to_money($products["shipping"]["price"], $lead["currency"])?> </td>
|
312 |
-
</tr>
|
313 |
-
<?php
|
314 |
-
}
|
315 |
-
?>
|
316 |
-
<tr>
|
317 |
-
<?php
|
318 |
-
if(empty($products["shipping"]["name"])){
|
319 |
-
?>
|
320 |
-
<td colspan="2" class="emptycell"> </td>
|
321 |
-
<?php
|
322 |
-
}
|
323 |
-
?>
|
324 |
-
<td class="textright grandtotal"><?php _e("Total", "gravityforms") ?></td>
|
325 |
-
<td class="grandtotal_amount"><?php echo GFCommon::to_money($total, $lead["currency"])?></td>
|
326 |
-
</tr>
|
327 |
-
</tbody>
|
328 |
-
|
329 |
-
</table>
|
330 |
-
|
331 |
-
<?php
|
332 |
-
}
|
333 |
-
}
|
334 |
-
|
335 |
-
public static function format_date($date, $usa = false)
|
336 |
-
{
|
337 |
-
$timestamp = strtotime($date);
|
338 |
-
$new_date = (!$usa) ? date('j/n/Y', $timestamp) : date('n/j/Y', $timestamp);
|
339 |
-
return $new_date;
|
340 |
-
}
|
341 |
-
|
342 |
-
/* returns the form values as an array instead of pre-formated html */
|
343 |
-
public static function lead_detail_grid_array($form, $lead, $allow_display_empty_fields=false){
|
344 |
-
$form_id = $form["id"];
|
345 |
-
$display_empty_fields = false;
|
346 |
-
if($allow_display_empty_fields){
|
347 |
-
$display_empty_fields = rgget("gf_display_empty_fields", $_COOKIE);
|
348 |
-
}
|
349 |
-
|
350 |
-
/*
|
351 |
-
* Add form_id and lead_id
|
352 |
-
*/
|
353 |
-
$form_array['form_id'] = $form_id;
|
354 |
-
$form_array['entry_id'] = $lead['id'];
|
355 |
-
|
356 |
-
$form_array['form_title'] = $form['title'];
|
357 |
-
$form_array['date_created'] = self::format_date($lead['date_created']);
|
358 |
-
$form_array['date_created_usa'] = self::format_date($lead['date_created'], true);
|
359 |
-
|
360 |
-
$count = 0;
|
361 |
-
$field_count = sizeof($form["fields"]);
|
362 |
-
$has_product_fields = false;
|
363 |
-
|
364 |
-
foreach($form["fields"] as $field){
|
365 |
-
$display = '';
|
366 |
-
|
367 |
-
switch(RGFormsModel::get_input_type($field)){
|
368 |
-
case "section" :
|
369 |
-
break;
|
370 |
-
|
371 |
-
case "captcha":
|
372 |
-
case "html":
|
373 |
-
$form_array['html'][] = wpautop($field['content']);
|
374 |
-
case "password":
|
375 |
-
case "page":
|
376 |
-
//ignore captcha, html, password, page field
|
377 |
-
break;
|
378 |
-
case "signature":
|
379 |
-
$value = RGFormsModel::get_lead_field_value($lead, $field);
|
380 |
-
$http_folder = RGFormsModel::get_upload_url_root(). 'signatures/';;
|
381 |
-
$folder = RGFormsModel::get_upload_root() . 'signatures/';
|
382 |
-
|
383 |
-
if(file_exists($folder.$value) !== false)
|
384 |
-
{
|
385 |
-
$form_array['signature'][] = '<img src="'. $folder.$value .'" alt="Signature" width="100" height="60" />';
|
386 |
-
$form_array['signature_details'][] = array('img' => '<img src="'. $folder.$value .'" alt="Signature" width="100" height="60" />',
|
387 |
-
'path' => $folder.$value,
|
388 |
-
'url' => $http_folder.$value);
|
389 |
-
}
|
390 |
-
|
391 |
-
/*$count++;*/
|
392 |
-
$is_last = $count >= $field_count && !$has_product_fields ? true : false;
|
393 |
-
$last_row = $is_last ? " lastrow" : "";
|
394 |
-
break;
|
395 |
-
case "fileupload":
|
396 |
-
|
397 |
-
$value = RGFormsModel::get_lead_field_value($lead, $field);
|
398 |
-
$display = self::get_lead_field_display($field, $value, $lead["currency"]);
|
399 |
-
|
400 |
-
/*
|
401 |
-
* Get the absolute path to the upload
|
402 |
-
*/
|
403 |
-
$path = str_replace(home_url().'/', ABSPATH, $display);
|
404 |
-
|
405 |
-
/* add path */
|
406 |
-
$form_array['field'][$field['id'].'_path'] = $path;
|
407 |
-
$form_array['field'][$field['id'].'.'.$field['label'].'_path'] = $path;
|
408 |
-
|
409 |
-
/* add data to field tag correctly */
|
410 |
-
$form_array['field'][$field['id'].'.'.$field['label']] = $display;
|
411 |
-
|
412 |
-
/* add ID incase want to use template on multiple duplicate forms with different field names */
|
413 |
-
$form_array['field'][$field['id']] = $display;
|
414 |
-
|
415 |
-
/* keep backwards compatibility */
|
416 |
-
$form_array['field'][$field['label']] = $display;
|
417 |
-
|
418 |
-
|
419 |
-
break;
|
420 |
-
case "list":
|
421 |
-
/*
|
422 |
-
* We want list to run both this and the deafult so don't call break.
|
423 |
-
* Get the list array and store it outside of [field]
|
424 |
-
*/
|
425 |
-
$value = unserialize(RGFormsModel::get_lead_field_value($lead, $field));
|
426 |
-
$form_array['list'][] = $value;
|
427 |
-
|
428 |
-
default:
|
429 |
-
//ignore product fields as they will be grouped together at the end of the grid
|
430 |
-
if(GFCommon::is_product_field($field["type"])){
|
431 |
-
$has_product_fields = true;
|
432 |
-
continue;
|
433 |
-
}
|
434 |
-
|
435 |
-
$value = RGFormsModel::get_lead_field_value($lead, $field);
|
436 |
-
|
437 |
-
$display = self::get_lead_field_display($field, $value, $lead["currency"]);
|
438 |
-
/* add data to field tag correctly */
|
439 |
-
$form_array['field'][$field['id'].'.'.$field['label']] = $display;
|
440 |
-
|
441 |
-
/* add ID incase want to use template on multiple duplicate forms with different field names */
|
442 |
-
$form_array['field'][$field['id']] = $display;
|
443 |
-
|
444 |
-
/* keep backwards compatibility */
|
445 |
-
$form_array['field'][$field['label']] = $display;
|
446 |
-
|
447 |
-
break;
|
448 |
-
}
|
449 |
-
|
450 |
-
}
|
451 |
-
|
452 |
-
$products = array();
|
453 |
-
if($has_product_fields){
|
454 |
-
$products = GFCommon::get_product_fields($form, $lead, true);
|
455 |
-
if(!empty($products["products"])){
|
456 |
-
$total = 0;
|
457 |
-
$subtotal = 0;
|
458 |
-
foreach($products["products"] as $product) {
|
459 |
-
$price = GFCommon::to_number($product["price"]);
|
460 |
-
|
461 |
-
if(is_array(rgar($product,"options"))){
|
462 |
-
$count = sizeof($product["options"]);
|
463 |
-
$index = 1;
|
464 |
-
foreach($product["options"] as $option){
|
465 |
-
$price += GFCommon::to_number($option["price"]);
|
466 |
-
$index++;
|
467 |
-
}
|
468 |
-
}
|
469 |
-
/* calculate subtotal */
|
470 |
-
$subtotal = floatval($product["quantity"]) * $price;
|
471 |
-
$total += $subtotal;
|
472 |
-
|
473 |
-
$form_array['products'][] = array(
|
474 |
-
'name' => esc_html($product['name']),
|
475 |
-
'price' => esc_html($product['price']),
|
476 |
-
'options' => $product['options'],
|
477 |
-
'quantity' => $product["quantity"],
|
478 |
-
'subtotal' => $subtotal);
|
479 |
-
}
|
480 |
-
$total += floatval($products["shipping"]["price"]);
|
481 |
-
|
482 |
-
/* add to form data */
|
483 |
-
$form_array['products_totals'] = array(
|
484 |
-
'shipping' => $products["shipping"]["price"],
|
485 |
-
'total' => $total
|
486 |
-
);
|
487 |
-
}
|
488 |
-
}
|
489 |
-
return $form_array;
|
490 |
-
}
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
public static function get_lead_field_display($field, $value, $currency="", $use_text=false, $format="html", $media="screen"){
|
495 |
-
|
496 |
-
if($field['type'] == 'post_category')
|
497 |
-
$value = self::prepare_post_category_value($value, $field);
|
498 |
-
|
499 |
-
switch(RGFormsModel::get_input_type($field)){
|
500 |
-
case "name" :
|
501 |
-
if(is_array($value)){
|
502 |
-
$prefix = trim(rgget($field["id"] . ".2", $value));
|
503 |
-
$first = trim(rgget($field["id"] . ".3", $value));
|
504 |
-
$last = trim(rgget($field["id"] . ".6", $value));
|
505 |
-
$suffix = trim(rgget($field["id"] . ".8", $value));
|
506 |
-
|
507 |
-
return array('prefix' => $prefix, 'first' => $first, 'last' => $last, 'suffix' => $suffix);
|
508 |
-
}
|
509 |
-
else{
|
510 |
-
return $value;
|
511 |
-
}
|
512 |
-
|
513 |
-
break;
|
514 |
-
case "creditcard" :
|
515 |
-
if(is_array($value)){
|
516 |
-
$card_number = trim(rgget($field["id"] . ".1", $value));
|
517 |
-
$card_type = trim(rgget($field["id"] . ".4", $value));
|
518 |
-
$separator = $format == "html" ? "<br/>" : "\n";
|
519 |
-
return empty($card_number) ? "" : $card_type . $separator . $card_number;
|
520 |
-
}
|
521 |
-
else{
|
522 |
-
return "";
|
523 |
-
}
|
524 |
-
break;
|
525 |
-
|
526 |
-
case "address" :
|
527 |
-
if(is_array($value)){
|
528 |
-
$street_value = trim(rgget($field["id"] . ".1", $value));
|
529 |
-
$street2_value = trim(rgget($field["id"] . ".2", $value));
|
530 |
-
$city_value = trim(rgget($field["id"] . ".3", $value));
|
531 |
-
$state_value = trim(rgget($field["id"] . ".4", $value));
|
532 |
-
$zip_value = trim(rgget($field["id"] . ".5", $value));
|
533 |
-
$country_value = trim(rgget($field["id"] . ".6", $value));
|
534 |
-
|
535 |
-
$line_break = $format == "html" ? "<br />" : "\n";
|
536 |
-
|
537 |
-
$address_display_format = apply_filters("gform_address_display_format", "default");
|
538 |
-
|
539 |
-
$address['street'] = $street_value;
|
540 |
-
$address['street2'] = $street2_value;
|
541 |
-
$address['city'] = $city_value;
|
542 |
-
$address['state'] = $state_value;
|
543 |
-
$address['zip'] = $zip_value;
|
544 |
-
$address['country'] = $country_value;
|
545 |
-
|
546 |
-
return $address;
|
547 |
-
}
|
548 |
-
else{
|
549 |
-
return "";
|
550 |
-
}
|
551 |
-
break;
|
552 |
-
|
553 |
-
case "email" :
|
554 |
-
return GFCommon::is_valid_email($value) && $format == "html" ? $value : $value;
|
555 |
-
break;
|
556 |
-
|
557 |
-
case "website" :
|
558 |
-
return GFCommon::is_valid_url($value) && $format == "html" ? $value : $value;
|
559 |
-
break;
|
560 |
-
|
561 |
-
case "checkbox" :
|
562 |
-
if(is_array($value)){
|
563 |
-
|
564 |
-
$items = array();
|
565 |
-
|
566 |
-
foreach($value as $key => $item){
|
567 |
-
if(!empty($item)){
|
568 |
-
switch($format){
|
569 |
-
case "text" :
|
570 |
-
$items[] = GFCommon::selection_display($item, $field, $currency, $use_text);
|
571 |
-
break;
|
572 |
-
|
573 |
-
default:
|
574 |
-
$items[] = GFCommon::selection_display($item, $field, $currency, $use_text);
|
575 |
-
break;
|
576 |
-
}
|
577 |
-
}
|
578 |
-
}
|
579 |
-
if(empty($items)){
|
580 |
-
return "";
|
581 |
-
}
|
582 |
-
else if($format == "text"){
|
583 |
-
/*return substr($items, 0, strlen($items)-2); //removing last comma*/
|
584 |
-
}
|
585 |
-
else{
|
586 |
-
return $items;
|
587 |
-
}
|
588 |
-
}
|
589 |
-
else{
|
590 |
-
return $value;
|
591 |
-
}
|
592 |
-
break;
|
593 |
-
|
594 |
-
case "post_image" :
|
595 |
-
$ary = explode("|:|", $value);
|
596 |
-
$url = count($ary) > 0 ? $ary[0] : "";
|
597 |
-
$title = count($ary) > 1 ? $ary[1] : "";
|
598 |
-
$caption = count($ary) > 2 ? $ary[2] : "";
|
599 |
-
$description = count($ary) > 3 ? $ary[3] : "";
|
600 |
-
|
601 |
-
if(!empty($url)){
|
602 |
-
$url = str_replace(" ", "%20", $url);
|
603 |
-
|
604 |
-
$value = array('url' => $url,
|
605 |
-
'path' => str_replace(site_url().'/', ABSPATH, $url),
|
606 |
-
'title' => $title,
|
607 |
-
'caption' => $caption,
|
608 |
-
'description' => $description);
|
609 |
-
}
|
610 |
-
return $value;
|
611 |
-
|
612 |
-
case "fileupload" :
|
613 |
-
$file_path = $value;
|
614 |
-
if(!empty($file_path)){
|
615 |
-
$info = pathinfo($file_path);
|
616 |
-
$file_path = esc_attr(str_replace(" ", "%20", $file_path));
|
617 |
-
$value = $file_path;
|
618 |
-
}
|
619 |
-
return $value;
|
620 |
-
break;
|
621 |
-
|
622 |
-
case "date" :
|
623 |
-
return GFCommon::date_display($value, rgar($field, "dateFormat"));
|
624 |
-
break;
|
625 |
-
|
626 |
-
case "radio" :
|
627 |
-
case "select" :
|
628 |
-
return GFCommon::selection_display($value, $field, $currency, $use_text);
|
629 |
-
break;
|
630 |
-
|
631 |
-
case "multiselect" :
|
632 |
-
if(empty($value) || $format == "text")
|
633 |
-
return $value;
|
634 |
-
|
635 |
-
$value = explode(",", $value);
|
636 |
-
|
637 |
-
$items = '';
|
638 |
-
foreach($value as $item){
|
639 |
-
$items[] = GFCommon::selection_display($item, $field, $currency, $use_text);
|
640 |
-
}
|
641 |
-
|
642 |
-
if(sizeof($items) == 1)
|
643 |
-
{
|
644 |
-
return $items[0];
|
645 |
-
}
|
646 |
-
return $items;
|
647 |
-
|
648 |
-
|
649 |
-
break;
|
650 |
-
|
651 |
-
case "calculation" :
|
652 |
-
case "singleproduct" :
|
653 |
-
if(is_array($value)){
|
654 |
-
$product_name = trim($value[$field["id"] . ".1"]);
|
655 |
-
$price = trim($value[$field["id"] . ".2"]);
|
656 |
-
$quantity = trim($value[$field["id"] . ".3"]);
|
657 |
-
|
658 |
-
$product = $product_name . ", " . __("Qty: ", "gravityforms") . $quantity . ", " . __("Price: ", "gravityforms") . $price;
|
659 |
-
return $product;
|
660 |
-
}
|
661 |
-
else{
|
662 |
-
return "";
|
663 |
-
}
|
664 |
-
break;
|
665 |
-
|
666 |
-
case "number" :
|
667 |
-
return GFCommon::format_number($value, rgar($field, "numberFormat"));
|
668 |
-
break;
|
669 |
-
|
670 |
-
case "singleshipping" :
|
671 |
-
case "donation" :
|
672 |
-
case "total" :
|
673 |
-
case "price" :
|
674 |
-
return GFCommon::to_money($value, $currency);
|
675 |
-
|
676 |
-
case "list" :
|
677 |
-
if(empty($value))
|
678 |
-
return "";
|
679 |
-
$value = unserialize($value);
|
680 |
-
|
681 |
-
$has_columns = is_array($value[0]);
|
682 |
-
|
683 |
-
if(!$has_columns){
|
684 |
-
$items = array();
|
685 |
-
foreach($value as $key => $item){
|
686 |
-
if(!empty($item)){
|
687 |
-
switch($format){
|
688 |
-
case "text" :
|
689 |
-
$items[] = $item;
|
690 |
-
break;
|
691 |
-
case "url" :
|
692 |
-
$items[] = $item;
|
693 |
-
break;
|
694 |
-
default :
|
695 |
-
if($media == "email"){
|
696 |
-
$items[] = $item;
|
697 |
-
}
|
698 |
-
else{
|
699 |
-
$items[] = $item;
|
700 |
-
}
|
701 |
-
break;
|
702 |
-
}
|
703 |
-
}
|
704 |
-
}
|
705 |
-
|
706 |
-
if(empty($items)){
|
707 |
-
return "";
|
708 |
-
}
|
709 |
-
else if($format == "text"){
|
710 |
-
/* return substr($items, 0, strlen($items)-2); //removing last comma*/
|
711 |
-
return $items;
|
712 |
-
}
|
713 |
-
else if($format == "url"){
|
714 |
-
/*return substr($items, 0, strlen($items)-1); //removing last comma*/
|
715 |
-
return $items;
|
716 |
-
}
|
717 |
-
else if($media == "email"){
|
718 |
-
return $items;
|
719 |
-
}
|
720 |
-
else{
|
721 |
-
return $items;
|
722 |
-
}
|
723 |
-
}
|
724 |
-
else if(is_array($value)){
|
725 |
-
$columns = array_keys($value[0]);
|
726 |
-
|
727 |
-
$list = "";
|
728 |
-
|
729 |
-
switch($format){
|
730 |
-
case "text" :
|
731 |
-
$is_first_row = true;
|
732 |
-
foreach($value as $item){
|
733 |
-
if(!$is_first_row)
|
734 |
-
$list .= "\n\n" . $field["label"] . ": ";
|
735 |
-
$list .= implode(",", array_values($item));
|
736 |
-
|
737 |
-
$is_first_row = false;
|
738 |
-
}
|
739 |
-
break;
|
740 |
-
|
741 |
-
case "url" :
|
742 |
-
foreach($value as $item){
|
743 |
-
$list .= implode("|", array_values($item)) . ",";
|
744 |
-
}
|
745 |
-
if(!empty($list))
|
746 |
-
$list = substr($list, 0, strlen($list)-1);
|
747 |
-
break;
|
748 |
-
|
749 |
-
default :
|
750 |
-
if($media == "email"){
|
751 |
-
$list = "<table autosize='1' class='gfield_list' style='border-top: 1px solid #DFDFDF; border-left: 1px solid #DFDFDF; border-spacing: 0; padding: 0; margin: 2px 0 6px; width: 100%'><thead><tr>";
|
752 |
-
|
753 |
-
//reading columns from entry data
|
754 |
-
foreach($columns as $column){
|
755 |
-
$list .= "<th style='background-image: none; border-right: 1px solid #DFDFDF; border-bottom: 1px solid #DFDFDF; padding: 6px 10px; font-family: sans-serif; font-size: 12px; font-weight: bold; background-color: #F1F1F1; color:#333; text-align:left'>" . esc_html($column) . "</th>";
|
756 |
-
}
|
757 |
-
$list .= "</tr></thead>";
|
758 |
-
|
759 |
-
$list .= "<tbody style='background-color: #F9F9F9'>";
|
760 |
-
foreach($value as $item){
|
761 |
-
$list .= "<tr>";
|
762 |
-
foreach($columns as $column){
|
763 |
-
$val = rgar($item, $column);
|
764 |
-
$list .= "<td style='padding: 6px 10px; border-right: 1px solid #DFDFDF; border-bottom: 1px solid #DFDFDF; border-top: 1px solid #FFF; font-family: sans-serif; font-size:12px;'>{$val}</td>";
|
765 |
-
}
|
766 |
-
|
767 |
-
$list .="</tr>";
|
768 |
-
}
|
769 |
-
|
770 |
-
$list .="</tbody></table>";
|
771 |
-
}
|
772 |
-
else{
|
773 |
-
$list = "<table class='gfield_list' autosize='1'><thead><tr>";
|
774 |
-
|
775 |
-
//reading columns from entry data
|
776 |
-
foreach($columns as $column){
|
777 |
-
$list .= "<th>" . esc_html($column) . "</th>";
|
778 |
-
}
|
779 |
-
$list .= "</tr></thead>";
|
780 |
-
|
781 |
-
$list .= "<tbody>";
|
782 |
-
foreach($value as $item){
|
783 |
-
$list .= "<tr>";
|
784 |
-
foreach($columns as $column){
|
785 |
-
$val = rgar($item, $column);
|
786 |
-
$list .= "<td>".htmlspecialchars($val)."</td>";
|
787 |
-
}
|
788 |
-
|
789 |
-
$list .="</tr>";
|
790 |
-
}
|
791 |
-
|
792 |
-
$list .="</tbody></table>";
|
793 |
-
}
|
794 |
-
break;
|
795 |
-
}
|
796 |
-
|
797 |
-
return $list;
|
798 |
-
}
|
799 |
-
return "";
|
800 |
-
break;
|
801 |
-
|
802 |
-
default :
|
803 |
-
if (!is_array($value))
|
804 |
-
{
|
805 |
-
return nl2br($value);
|
806 |
-
}
|
807 |
-
break;
|
808 |
-
}
|
809 |
-
}
|
810 |
-
|
811 |
-
function pdf_get_lead_field_display($field, $value, $currency="", $use_text=false, $format="html", $media="screen"){
|
812 |
-
|
813 |
-
if($field['type'] == 'post_category')
|
814 |
-
$value = self::prepare_post_category_value($value, $field);
|
815 |
-
|
816 |
-
switch(RGFormsModel::get_input_type($field)){
|
817 |
-
case "name" :
|
818 |
-
if(is_array($value)){
|
819 |
-
$prefix = trim(rgget($field["id"] . ".2", $value));
|
820 |
-
$first = trim(rgget($field["id"] . ".3", $value));
|
821 |
-
$last = trim(rgget($field["id"] . ".6", $value));
|
822 |
-
$suffix = trim(rgget($field["id"] . ".8", $value));
|
823 |
-
|
824 |
-
$name = $prefix;
|
825 |
-
$name .= !empty($name) && !empty($first) ? " $first" : $first;
|
826 |
-
$name .= !empty($name) && !empty($last) ? " $last" : $last;
|
827 |
-
$name .= !empty($name) && !empty($suffix) ? " $suffix" : $suffix;
|
828 |
-
|
829 |
-
return $name;
|
830 |
-
}
|
831 |
-
else{
|
832 |
-
return $value;
|
833 |
-
}
|
834 |
-
|
835 |
-
break;
|
836 |
-
case "creditcard" :
|
837 |
-
if(is_array($value)){
|
838 |
-
$card_number = trim(rgget($field["id"] . ".1", $value));
|
839 |
-
$card_type = trim(rgget($field["id"] . ".4", $value));
|
840 |
-
$separator = $format == "html" ? "<br/>" : "\n";
|
841 |
-
return empty($card_number) ? "" : $card_type . $separator . $card_number;
|
842 |
-
}
|
843 |
-
else{
|
844 |
-
return "";
|
845 |
-
}
|
846 |
-
break;
|
847 |
-
|
848 |
-
case "address" :
|
849 |
-
if(is_array($value)){
|
850 |
-
$street_value = trim(rgget($field["id"] . ".1", $value));
|
851 |
-
$street2_value = trim(rgget($field["id"] . ".2", $value));
|
852 |
-
$city_value = trim(rgget($field["id"] . ".3", $value));
|
853 |
-
$state_value = trim(rgget($field["id"] . ".4", $value));
|
854 |
-
$zip_value = trim(rgget($field["id"] . ".5", $value));
|
855 |
-
$country_value = trim(rgget($field["id"] . ".6", $value));
|
856 |
-
|
857 |
-
$line_break = $format == "html" ? "<br />" : "\n";
|
858 |
-
|
859 |
-
$address_display_format = apply_filters("gform_address_display_format", "default");
|
860 |
-
if($address_display_format == "zip_before_city"){
|
861 |
-
/*
|
862 |
-
Sample:
|
863 |
-
3333 Some Street
|
864 |
-
suite 16
|
865 |
-
2344 City, State
|
866 |
-
Country
|
867 |
-
*/
|
868 |
-
|
869 |
-
$addr_ary = array();
|
870 |
-
$addr_ary[] = $street_value;
|
871 |
-
|
872 |
-
if(!empty($street2_value))
|
873 |
-
$addr_ary[] = $street2_value;
|
874 |
-
|
875 |
-
$zip_line = trim($zip_value . " " . $city_value);
|
876 |
-
$zip_line .= !empty($zip_line) && !empty($state_value) ? ", {$state_value}" : $state_value;
|
877 |
-
$zip_line = trim($zip_line);
|
878 |
-
if(!empty($zip_line))
|
879 |
-
$addr_ary[] = $zip_line;
|
880 |
-
|
881 |
-
if(!empty($country_value))
|
882 |
-
$addr_ary[] = $country_value;
|
883 |
-
|
884 |
-
$address = implode("<br />", $addr_ary);
|
885 |
-
|
886 |
-
}
|
887 |
-
else{
|
888 |
-
$address = $street_value;
|
889 |
-
$address .= !empty($address) && !empty($street2_value) ? $line_break . $street2_value : $street2_value;
|
890 |
-
$address .= !empty($address) && (!empty($city_value) || !empty($state_value)) ? $line_break. $city_value : $city_value;
|
891 |
-
$address .= !empty($address) && !empty($city_value) && !empty($state_value) ? ", $state_value" : $state_value;
|
892 |
-
$address .= !empty($address) && !empty($zip_value) ? " $zip_value" : $zip_value;
|
893 |
-
$address .= !empty($address) && !empty($country_value) ? $line_break . $country_value : $country_value;
|
894 |
-
}
|
895 |
-
|
896 |
-
return $address;
|
897 |
-
}
|
898 |
-
else{
|
899 |
-
return "";
|
900 |
-
}
|
901 |
-
break;
|
902 |
-
|
903 |
-
case "email" :
|
904 |
-
return GFCommon::is_valid_email($value) && $format == "html" ? "<a href='mailto:$value'>$value</a>" : $value;
|
905 |
-
break;
|
906 |
-
|
907 |
-
case "website" :
|
908 |
-
return GFCommon::is_valid_url($value) && $format == "html" ? "<a href='$value' target='_blank'>$value</a>" : $value;
|
909 |
-
break;
|
910 |
-
|
911 |
-
case "checkbox" :
|
912 |
-
if(is_array($value)){
|
913 |
-
|
914 |
-
$items = '';
|
915 |
-
|
916 |
-
foreach($value as $key => $item){
|
917 |
-
if(!empty($item)){
|
918 |
-
switch($format){
|
919 |
-
case "text" :
|
920 |
-
$items .= GFCommon::selection_display($item, $field, $currency, $use_text) . ", ";
|
921 |
-
break;
|
922 |
-
|
923 |
-
default:
|
924 |
-
$items .= "<li>" . GFCommon::selection_display($item, $field, $currency, $use_text) . "</li>";
|
925 |
-
break;
|
926 |
-
}
|
927 |
-
}
|
928 |
-
}
|
929 |
-
if(empty($items)){
|
930 |
-
return "";
|
931 |
-
}
|
932 |
-
else if($format == "text"){
|
933 |
-
return substr($items, 0, strlen($items)-2); //removing last comma
|
934 |
-
}
|
935 |
-
else{
|
936 |
-
return "<ul class='bulleted'>$items</ul>";
|
937 |
-
}
|
938 |
-
}
|
939 |
-
else{
|
940 |
-
return $value;
|
941 |
-
}
|
942 |
-
break;
|
943 |
-
|
944 |
-
case "post_image" :
|
945 |
-
$ary = explode("|:|", $value);
|
946 |
-
$url = count($ary) > 0 ? $ary[0] : "";
|
947 |
-
$title = count($ary) > 1 ? $ary[1] : "";
|
948 |
-
$caption = count($ary) > 2 ? $ary[2] : "";
|
949 |
-
$description = count($ary) > 3 ? $ary[3] : "";
|
950 |
-
|
951 |
-
if(!empty($url)){
|
952 |
-
$url = str_replace(" ", "%20", $url);
|
953 |
-
switch($format){
|
954 |
-
case "text" :
|
955 |
-
$value = $url;
|
956 |
-
$value .= !empty($title) ? "\n\n" . $field["label"] . " (" . __("Title", "gravityforms") . "): " . $title : "";
|
957 |
-
$value .= !empty($caption) ? "\n\n" . $field["label"] . " (" . __("Caption", "gravityforms") . "): " . $caption : "";
|
958 |
-
$value .= !empty($description) ? "\n\n" . $field["label"] . " (" . __("Description", "gravityforms") . "): " . $description : "";
|
959 |
-
break;
|
960 |
-
|
961 |
-
default :
|
962 |
-
$path = str_replace(site_url().'/', ABSPATH, $url);
|
963 |
-
$value = "<a href='$url' target='_blank' title='" . __("Click to view", "gravityforms") . "'><img src='$path' width='100' /></a>";
|
964 |
-
$value .= !empty($title) ? "<div>Title: $title</div>" : "";
|
965 |
-
$value .= !empty($caption) ? "<div>Caption: $caption</div>" : "";
|
966 |
-
$value .= !empty($description) ? "<div>Description: $description</div>": "";
|
967 |
-
|
968 |
-
break;
|
969 |
-
}
|
970 |
-
}
|
971 |
-
return $value;
|
972 |
-
|
973 |
-
case "fileupload" :
|
974 |
-
$file_path = $value;
|
975 |
-
if(!empty($file_path)){
|
976 |
-
$info = pathinfo($file_path);
|
977 |
-
$file_path = esc_attr(str_replace(" ", "%20", $file_path));
|
978 |
-
$value = $format == "text" ? $file_path : "<a href='$file_path' target='_blank' title='" . __("Click to view", "gravityforms") . "'>" . $info["basename"] . "</a>";
|
979 |
-
}
|
980 |
-
return $value;
|
981 |
-
break;
|
982 |
-
|
983 |
-
case "date" :
|
984 |
-
return GFCommon::date_display($value, rgar($field, "dateFormat"));
|
985 |
-
break;
|
986 |
-
|
987 |
-
case "radio" :
|
988 |
-
case "select" :
|
989 |
-
return GFCommon::selection_display($value, $field, $currency, $use_text);
|
990 |
-
break;
|
991 |
-
|
992 |
-
case "multiselect" :
|
993 |
-
if(empty($value) || $format == "text")
|
994 |
-
return $value;
|
995 |
-
|
996 |
-
$value = explode(",", $value);
|
997 |
-
|
998 |
-
$items = '';
|
999 |
-
foreach($value as $item){
|
1000 |
-
$items .= "<li>" . GFCommon::selection_display($item, $field, $currency, $use_text) . "</li>";
|
1001 |
-
}
|
1002 |
-
|
1003 |
-
return "<ul class='bulleted'>{$items}</ul>";
|
1004 |
-
|
1005 |
-
break;
|
1006 |
-
|
1007 |
-
case "calculation" :
|
1008 |
-
case "singleproduct" :
|
1009 |
-
if(is_array($value)){
|
1010 |
-
$product_name = trim($value[$field["id"] . ".1"]);
|
1011 |
-
$price = trim($value[$field["id"] . ".2"]);
|
1012 |
-
$quantity = trim($value[$field["id"] . ".3"]);
|
1013 |
-
|
1014 |
-
$product = $product_name . ", " . __("Qty: ", "gravityforms") . $quantity . ", " . __("Price: ", "gravityforms") . $price;
|
1015 |
-
return $product;
|
1016 |
-
}
|
1017 |
-
else{
|
1018 |
-
return "";
|
1019 |
-
}
|
1020 |
-
break;
|
1021 |
-
|
1022 |
-
case "number" :
|
1023 |
-
return GFCommon::format_number($value, rgar($field, "numberFormat"));
|
1024 |
-
break;
|
1025 |
-
|
1026 |
-
case "singleshipping" :
|
1027 |
-
case "donation" :
|
1028 |
-
case "total" :
|
1029 |
-
case "price" :
|
1030 |
-
return GFCommon::to_money($value, $currency);
|
1031 |
-
|
1032 |
-
case "list" :
|
1033 |
-
if(empty($value))
|
1034 |
-
return "";
|
1035 |
-
$value = unserialize($value);
|
1036 |
-
|
1037 |
-
$has_columns = is_array($value[0]);
|
1038 |
-
|
1039 |
-
if(!$has_columns){
|
1040 |
-
$items = '';
|
1041 |
-
foreach($value as $key => $item){
|
1042 |
-
if(!empty($item)){
|
1043 |
-
switch($format){
|
1044 |
-
case "text" :
|
1045 |
-
$items .= $item . ", ";
|
1046 |
-
break;
|
1047 |
-
case "url" :
|
1048 |
-
$items .= $item . ",";
|
1049 |
-
break;
|
1050 |
-
default :
|
1051 |
-
if($media == "email"){
|
1052 |
-
$items .= "<li>".htmlspecialchars($item)."</li>";
|
1053 |
-
}
|
1054 |
-
else{
|
1055 |
-
$items .= "<li>".htmlspecialchars($item)."</li>";
|
1056 |
-
}
|
1057 |
-
break;
|
1058 |
-
}
|
1059 |
-
}
|
1060 |
-
}
|
1061 |
-
|
1062 |
-
if(empty($items)){
|
1063 |
-
return "";
|
1064 |
-
}
|
1065 |
-
else if($format == "text"){
|
1066 |
-
return substr($items, 0, strlen($items)-2); //removing last comma
|
1067 |
-
}
|
1068 |
-
else if($format == "url"){
|
1069 |
-
return substr($items, 0, strlen($items)-1); //removing last comma
|
1070 |
-
}
|
1071 |
-
else if($media == "email"){
|
1072 |
-
return "<ul class='bulleted'>{$items}</ul>";
|
1073 |
-
}
|
1074 |
-
else{
|
1075 |
-
return "<ul class='bulleted'>{$items}</ul>";
|
1076 |
-
}
|
1077 |
-
}
|
1078 |
-
else if(is_array($value)){
|
1079 |
-
$columns = array_keys($value[0]);
|
1080 |
-
|
1081 |
-
$list = "";
|
1082 |
-
|
1083 |
-
switch($format){
|
1084 |
-
case "text" :
|
1085 |
-
$is_first_row = true;
|
1086 |
-
foreach($value as $item){
|
1087 |
-
if(!$is_first_row)
|
1088 |
-
$list .= "\n\n" . $field["label"] . ": ";
|
1089 |
-
$list .= implode(",", array_values($item));
|
1090 |
-
|
1091 |
-
$is_first_row = false;
|
1092 |
-
}
|
1093 |
-
break;
|
1094 |
-
|
1095 |
-
case "url" :
|
1096 |
-
foreach($value as $item){
|
1097 |
-
$list .= implode("|", array_values($item)) . ",";
|
1098 |
-
}
|
1099 |
-
if(!empty($list))
|
1100 |
-
$list = substr($list, 0, strlen($list)-1);
|
1101 |
-
break;
|
1102 |
-
|
1103 |
-
default :
|
1104 |
-
if($media == "email"){
|
1105 |
-
$list = "<table autosize='1' class='gfield_list' style='border-top: 1px solid #DFDFDF; border-left: 1px solid #DFDFDF; border-spacing: 0; padding: 0; margin: 2px 0 6px; width: 100%'><thead><tr>";
|
1106 |
-
|
1107 |
-
//reading columns from entry data
|
1108 |
-
foreach($columns as $column){
|
1109 |
-
$list .= "<th style='background-image: none; border-right: 1px solid #DFDFDF; border-bottom: 1px solid #DFDFDF; padding: 6px 10px; font-family: sans-serif; font-size: 12px; font-weight: bold; background-color: #F1F1F1; color:#333; text-align:left'>" . esc_html($column) . "</th>";
|
1110 |
-
}
|
1111 |
-
$list .= "</tr></thead>";
|
1112 |
-
|
1113 |
-
$list .= "<tbody style='background-color: #F9F9F9'>";
|
1114 |
-
foreach($value as $item){
|
1115 |
-
$list .= "<tr>";
|
1116 |
-
foreach($columns as $column){
|
1117 |
-
$val = rgar($item, $column);
|
1118 |
-
$list .= "<td style='padding: 6px 10px; border-right: 1px solid #DFDFDF; border-bottom: 1px solid #DFDFDF; border-top: 1px solid #FFF; font-family: sans-serif; font-size:12px;'>{$val}</td>";
|
1119 |
-
}
|
1120 |
-
|
1121 |
-
$list .="</tr>";
|
1122 |
-
}
|
1123 |
-
|
1124 |
-
$list .="</tbody></table>";
|
1125 |
-
}
|
1126 |
-
else{
|
1127 |
-
$list = "<table autosize='1' class='gfield_list'><thead><tr>";
|
1128 |
-
|
1129 |
-
//reading columns from entry data
|
1130 |
-
foreach($columns as $column){
|
1131 |
-
$list .= "<th>" . esc_html($column) . "</th>";
|
1132 |
-
}
|
1133 |
-
$list .= "</tr></thead>";
|
1134 |
-
|
1135 |
-
$list .= "<tbody>";
|
1136 |
-
foreach($value as $item){
|
1137 |
-
$list .= "<tr>";
|
1138 |
-
foreach($columns as $column){
|
1139 |
-
$val = rgar($item, $column);
|
1140 |
-
$list .= "<td>".htmlspecialchars($val)."</td>";
|
1141 |
-
}
|
1142 |
-
|
1143 |
-
$list .="</tr>";
|
1144 |
-
}
|
1145 |
-
|
1146 |
-
$list .="</tbody></table>";
|
1147 |
-
}
|
1148 |
-
break;
|
1149 |
-
}
|
1150 |
-
|
1151 |
-
return $list;
|
1152 |
-
}
|
1153 |
-
return "";
|
1154 |
-
break;
|
1155 |
-
|
1156 |
-
default :
|
1157 |
-
if (!is_array($value))
|
1158 |
-
{
|
1159 |
-
return nl2br($value);
|
1160 |
-
}
|
1161 |
-
break;
|
1162 |
-
}
|
1163 |
-
}
|
1164 |
-
}
|
1165 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pdf-render.php
DELETED
@@ -1,253 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
class PDFRender
|
5 |
-
{
|
6 |
-
/**
|
7 |
-
* Outputs a PDF entry from a Gravity Form
|
8 |
-
* var $form_id integer: The form id
|
9 |
-
* var $lead_id integer: The entry id
|
10 |
-
* var $output string: either view, save or download
|
11 |
-
* save will save a copy of the PDF to the server using the PDF_SAVE_LOCATION constant
|
12 |
-
* var $return boolean: if set to true
|
13 |
-
it will return the path of the saved PDF
|
14 |
-
* var $template string: if you want to use multiple PDF templates - name of the template file
|
15 |
-
* var $pdfname string: allows you to pass a custom PDF name to the generator e.g. 'Application Form.pdf' (ensure .pdf is appended to the filename)
|
16 |
-
* var $fpdf boolean: custom hook to allow the FPDF engine to generate PDFs instead of DOMPDF. Premium Paid Feature.
|
17 |
-
*/
|
18 |
-
public function PDF_Generator($form_id, $lead_id, $arguments = array())
|
19 |
-
{
|
20 |
-
/*
|
21 |
-
* Because we merged the create and attach functions we need a measure to only run this function once per session per lead id.
|
22 |
-
*/
|
23 |
-
static $pdf_creator = array();
|
24 |
-
|
25 |
-
/*
|
26 |
-
* Set user-variable to output HTML instead of PDF
|
27 |
-
*/
|
28 |
-
$html = (isset($_GET['html'])) ? (int) $_GET['html'] : 0;
|
29 |
-
|
30 |
-
/*
|
31 |
-
* Join the form and lead IDs together to get the real ID
|
32 |
-
*/
|
33 |
-
$id = $form_id . $lead_id;
|
34 |
-
|
35 |
-
/*
|
36 |
-
* PDF_Generator was becoming too cluttered so store all the variables in an array
|
37 |
-
*/
|
38 |
-
$filename = $arguments['pdfname'];
|
39 |
-
$template = $arguments['template'];
|
40 |
-
$output = (isset($arguments['output']) && strlen($arguments['output']) > 0) ? $arguments['output'] : 'save';
|
41 |
-
|
42 |
-
/*
|
43 |
-
* Check if the PDF exists and if this function has already run this season
|
44 |
-
*/
|
45 |
-
if(in_array($lead_id, $pdf_creator) && file_exists(PDF_SAVE_LOCATION.$id.'/'. $filename))
|
46 |
-
{
|
47 |
-
/*
|
48 |
-
* Don't generate a new PDF, use the existing one
|
49 |
-
*/
|
50 |
-
return PDF_SAVE_LOCATION.$id.'/'. $filename;
|
51 |
-
}
|
52 |
-
|
53 |
-
/*
|
54 |
-
* Add lead to PDF creation tracker
|
55 |
-
*/
|
56 |
-
$pdf_creator[] = $lead_id;
|
57 |
-
|
58 |
-
|
59 |
-
/*
|
60 |
-
* Get the tempalte HTML file
|
61 |
-
*/
|
62 |
-
$entry = $this->load_entry_data($form_id, $lead_id, $template);
|
63 |
-
|
64 |
-
/*
|
65 |
-
* Output HTML version and return if user requested a HTML version
|
66 |
-
*/
|
67 |
-
if($html === 1)
|
68 |
-
{
|
69 |
-
echo $entry;
|
70 |
-
exit;
|
71 |
-
}
|
72 |
-
|
73 |
-
/*
|
74 |
-
* If successfully got the entry then run the processor
|
75 |
-
*/
|
76 |
-
if(strlen($entry) > 0)
|
77 |
-
{
|
78 |
-
return $this->PDF_processing($entry, $filename, $id, $output, $arguments);
|
79 |
-
}
|
80 |
-
/*
|
81 |
-
* Return the filename so we can use it
|
82 |
-
*/
|
83 |
-
return false;
|
84 |
-
}
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Loads the Gravity Form output script (actually the print preview)
|
88 |
-
*/
|
89 |
-
private function load_entry_data($form_id, $lead_id, $template)
|
90 |
-
{
|
91 |
-
/* set up contstants for gravity forms to use so we can override the security on the printed version */
|
92 |
-
if(file_exists(PDF_TEMPLATE_LOCATION.$template))
|
93 |
-
{
|
94 |
-
return PDF_Common::get_html_template(PDF_TEMPLATE_LOCATION.$template);
|
95 |
-
}
|
96 |
-
else
|
97 |
-
{
|
98 |
-
/*
|
99 |
-
* Check if template file exists in the plugin's core template folder
|
100 |
-
*/
|
101 |
-
if(file_exists(PDF_PLUGIN_DIR."templates/" . $template))
|
102 |
-
{
|
103 |
-
return PDF_Common::get_html_template(PDF_PLUGIN_DIR."templates/" . $template);
|
104 |
-
}
|
105 |
-
/*
|
106 |
-
* If template not found then we will resort to the default template.
|
107 |
-
*/
|
108 |
-
else
|
109 |
-
{
|
110 |
-
return PDF_Common::get_html_template(PDF_PLUGIN_DIR."templates/" . PDFGenerator::$default['template']);
|
111 |
-
}
|
112 |
-
}
|
113 |
-
}
|
114 |
-
|
115 |
-
|
116 |
-
/**
|
117 |
-
* Creates the PDF and does a specific output (see PDF_Generator function above for $output variable types)
|
118 |
-
*/
|
119 |
-
private function PDF_processing($html, $filename, $id, $output = 'view', $arguments)
|
120 |
-
{
|
121 |
-
/*
|
122 |
-
* DOMPDF replaced with mPDF in v3.0.0
|
123 |
-
* Check which version of mpdf we are calling
|
124 |
-
* Full, Lite or Tiny
|
125 |
-
*/
|
126 |
-
if(!class_exists('mPDF'))
|
127 |
-
{
|
128 |
-
if(PDF_ENABLE_MPDF_TINY === true)
|
129 |
-
{
|
130 |
-
include PDF_PLUGIN_DIR .'/mPDF/mpdf-extra-lite.php';
|
131 |
-
}
|
132 |
-
elseif(PDF_ENABLE_MPDF_LITE === true)
|
133 |
-
{
|
134 |
-
include PDF_PLUGIN_DIR .'/mPDF/mpdf-lite.php';
|
135 |
-
}
|
136 |
-
else
|
137 |
-
{
|
138 |
-
include PDF_PLUGIN_DIR .'/mPDF/mpdf.php';
|
139 |
-
}
|
140 |
-
}
|
141 |
-
|
142 |
-
/*
|
143 |
-
* Initialise class and set the paper size and orientation
|
144 |
-
*/
|
145 |
-
$paper_size = $arguments['pdf_size'];
|
146 |
-
|
147 |
-
|
148 |
-
if(!is_array($paper_size))
|
149 |
-
{
|
150 |
-
$orientation = ($arguments['orientation'] == 'landscape') ? '-L' : '';
|
151 |
-
$paper_size = $paper_size.$orientation;
|
152 |
-
}
|
153 |
-
else
|
154 |
-
{
|
155 |
-
$orientation = ($arguments['orientation'] == 'landscape') ? 'L' : 'P';
|
156 |
-
}
|
157 |
-
|
158 |
-
$mpdf = new mPDF('', $paper_size, 0, '', 15, 15, 16, 16, 9, 9, $orientation);
|
159 |
-
|
160 |
-
/*
|
161 |
-
* Display PDF is full-page mode which allows the entire PDF page to be viewed
|
162 |
-
* Normally PDF is zoomed right in.
|
163 |
-
*/
|
164 |
-
$mpdf->SetDisplayMode('fullpage');
|
165 |
-
|
166 |
-
/*
|
167 |
-
* Automatically detect fonts and substitue as needed
|
168 |
-
*/
|
169 |
-
$mpdf->SetAutoFont(AUTOFONT_ALL);
|
170 |
-
$mpdf->useSubstitutions = true;
|
171 |
-
|
172 |
-
/*
|
173 |
-
* Set Creator Meta Data
|
174 |
-
*/
|
175 |
-
|
176 |
-
$mpdf->SetCreator('Gravity Forms PDF Extended v'. PDF_EXTENDED_VERSION.'. http://gravityformspdfextended.com');
|
177 |
-
|
178 |
-
/*
|
179 |
-
* Set RTL languages at user request
|
180 |
-
*/
|
181 |
-
if($arguments['rtl'] === true)
|
182 |
-
{
|
183 |
-
$mpdf->SetDirectionality('rtl');
|
184 |
-
}
|
185 |
-
|
186 |
-
/*
|
187 |
-
* Set up security if user requested
|
188 |
-
*/
|
189 |
-
if($arguments['security'] === true)
|
190 |
-
{
|
191 |
-
$password = (strlen($arguments['pdf_password']) > 0) ? $arguments['pdf_password'] : '';
|
192 |
-
$master_password = (strlen($arguments['pdf_password']) > 0) ? $arguments['pdf_password'] : null;
|
193 |
-
$pdf_privileges = (is_array($arguments['pdf_privileges'])) ? $arguments['pdf_privileges'] : array();
|
194 |
-
|
195 |
-
$mpdf->SetProtection($pdf_privileges, $password, $master_password, 128);
|
196 |
-
}
|
197 |
-
|
198 |
-
/* load HTML block */
|
199 |
-
$mpdf->WriteHTML($html);
|
200 |
-
|
201 |
-
switch($output)
|
202 |
-
{
|
203 |
-
case 'download':
|
204 |
-
$mpdf->Output($filename, 'D');
|
205 |
-
exit;
|
206 |
-
break;
|
207 |
-
|
208 |
-
case 'view':
|
209 |
-
$mpdf->Output(time(), 'I');
|
210 |
-
exit;
|
211 |
-
break;
|
212 |
-
|
213 |
-
case 'save':
|
214 |
-
return $this->savePDF($mpdf, $filename, $id);
|
215 |
-
break;
|
216 |
-
}
|
217 |
-
}
|
218 |
-
|
219 |
-
|
220 |
-
/**
|
221 |
-
* Creates the PDF and does a specific output (see PDF_Generator function above for $output variable types)
|
222 |
-
* var $dompdf Object
|
223 |
-
*/
|
224 |
-
private function savePDF($mpdf, $filename, $id)
|
225 |
-
{
|
226 |
-
/* create unique folder for PDFs */
|
227 |
-
if(!is_dir(PDF_SAVE_LOCATION.$id))
|
228 |
-
{
|
229 |
-
if(!mkdir(PDF_SAVE_LOCATION.$id))
|
230 |
-
{
|
231 |
-
trigger_error('Could not create PDF folder in '. PDF_SAVE_LOCATION.$id, E_USER_WARNING);
|
232 |
-
return;
|
233 |
-
}
|
234 |
-
}
|
235 |
-
|
236 |
-
$pdf_save = PDF_SAVE_LOCATION.$id.'/'. $filename;
|
237 |
-
|
238 |
-
/*
|
239 |
-
* PDF wasn't writing to file with the F method - http://mpdf1.com/manual/index.php?tid=125
|
240 |
-
* Return as a string and write to file manually
|
241 |
-
*/
|
242 |
-
|
243 |
-
$pdf = $mpdf->Output('', 'S');
|
244 |
-
|
245 |
-
if(!file_put_contents($pdf_save, $pdf))
|
246 |
-
{
|
247 |
-
trigger_error('Could not save PDF to '. $pdf_save, E_USER_WARNING);
|
248 |
-
return;
|
249 |
-
}
|
250 |
-
return $pdf_save;
|
251 |
-
}
|
252 |
-
}
|
253 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pdf-settings.php
DELETED
@@ -1,242 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Plugin: Gravity Forms PDF Extended
|
5 |
-
* File: settings.php
|
6 |
-
*
|
7 |
-
* Handles the Gravity Forms Settings page in Wordpress
|
8 |
-
*/
|
9 |
-
|
10 |
-
class GFPDF_Settings
|
11 |
-
{
|
12 |
-
/*
|
13 |
-
* Check if we're on the settings page
|
14 |
-
*/
|
15 |
-
public function settings_page() {
|
16 |
-
if(RGForms::get("page") == "gf_settings") {
|
17 |
-
|
18 |
-
/* Call settings page */
|
19 |
-
RGForms::add_settings_page("PDF", array("GFPDF_Settings", "gfpdf_settings_page"),'');
|
20 |
-
}
|
21 |
-
}
|
22 |
-
|
23 |
-
private function run_setting_routing()
|
24 |
-
{
|
25 |
-
/*
|
26 |
-
* Check if we need to redeploy default PDF templates/styles to the theme folder
|
27 |
-
*/
|
28 |
-
if( PDF_DEPLOY === true && rgpost("gfpdf_deploy") &&
|
29 |
-
( wp_verify_nonce($_POST['gfpdf_deploy_nonce'],'gfpdf_deploy_nonce_action') || wp_verify_nonce($_GET['_wpnonce'],'pdf-extended-filesystem') ) ) {
|
30 |
-
if(rgpost('upgrade'))
|
31 |
-
{
|
32 |
-
/*
|
33 |
-
* Deploy new template styles
|
34 |
-
* If we get false returned Wordpress is trying to get
|
35 |
-
* access details to update files so don't display anything.
|
36 |
-
*/
|
37 |
-
if(self::deploy() === false)
|
38 |
-
{
|
39 |
-
return true;
|
40 |
-
}
|
41 |
-
}
|
42 |
-
elseif(rgpost('font-initialise'))
|
43 |
-
{
|
44 |
-
/*
|
45 |
-
* We only want to reinitialise the font files and configuration
|
46 |
-
*/
|
47 |
-
if(GFPDF_InstallUpdater::initialise_fonts() === false)
|
48 |
-
{
|
49 |
-
return true;
|
50 |
-
}
|
51 |
-
}
|
52 |
-
/*elseif(rgpost('cancel'))
|
53 |
-
{
|
54 |
-
update_option('gf_pdf_extended_deploy', 'yes');
|
55 |
-
}*/
|
56 |
-
}
|
57 |
-
|
58 |
-
/*
|
59 |
-
* If the user hasn't requested deployment and there is a _wpnonce check which one it is
|
60 |
-
* and call appropriate function
|
61 |
-
*/
|
62 |
-
if(isset($_GET['_wpnonce']))
|
63 |
-
{
|
64 |
-
/*
|
65 |
-
* Check if we want to copy the theme files
|
66 |
-
*/
|
67 |
-
if(wp_verify_nonce($_GET['_wpnonce'], 'gfpdfe_sync_now') )
|
68 |
-
{
|
69 |
-
$themes = get_option('gfpdfe_switch_theme');
|
70 |
-
|
71 |
-
if(isset($themes['old']) && isset($themes['new']) && GFPDF_InstallUpdater::do_theme_switch($themes['old'], $themes['new']) === false)
|
72 |
-
{
|
73 |
-
return true;
|
74 |
-
}
|
75 |
-
}
|
76 |
-
}
|
77 |
-
}
|
78 |
-
|
79 |
-
/*
|
80 |
-
* Shows the GF PDF Extended settings page
|
81 |
-
*/
|
82 |
-
public function gfpdf_settings_page()
|
83 |
-
{
|
84 |
-
/*
|
85 |
-
* Run the page's configuration/routing options
|
86 |
-
*/
|
87 |
-
if(self::run_setting_routing() === true)
|
88 |
-
{
|
89 |
-
return;
|
90 |
-
}
|
91 |
-
|
92 |
-
/*
|
93 |
-
* Show any messages the plugin might have called
|
94 |
-
* Because we had to run inside the settings page to correctly display the FTP credential form admin_notices was already called.
|
95 |
-
* To get around this we can recall it here.
|
96 |
-
*/
|
97 |
-
do_action('gfpdfe_notices');
|
98 |
-
|
99 |
-
/*
|
100 |
-
* Show the settings page deployment form
|
101 |
-
*/
|
102 |
-
?>
|
103 |
-
|
104 |
-
|
105 |
-
<div id="pdfextended-settings">
|
106 |
-
|
107 |
-
<div class="leftcolumn">
|
108 |
-
<?php
|
109 |
-
if(PDF_DEPLOY === true)
|
110 |
-
{
|
111 |
-
?>
|
112 |
-
<h2>Initialise Plugin</h2>
|
113 |
-
<p>Fresh installations and users who have just upgraded will need to initialise Gravity Forms PDF Extended to ensure it works correctly.</p>
|
114 |
-
|
115 |
-
<p>Initialisation does a number of important things, including:</p>
|
116 |
-
|
117 |
-
<ol>
|
118 |
-
<li><strong>Fresh Installation</strong>: Copies all the required template and configuration files to a folder called PDF_EXTENDED_TEMPLATE in your active theme's directory.<br />
|
119 |
-
<strong>Upgrading</strong>: Copies the latest default templates and template.css file to the PDF_EXTENDED_TEMPLATE folder. <strong>If you modified these files please back them up before re-initialising as they will be removed</strong>.
|
120 |
-
</li>
|
121 |
-
<li>Unzips the mPDF package</li>
|
122 |
-
<li>Installs any fonts found in the PDF_EXTENDED_TEMPLATE/fonts/ folder</li>
|
123 |
-
</ol>
|
124 |
-
|
125 |
-
<form method="post">
|
126 |
-
<?php wp_nonce_field('gfpdf_deploy_nonce_action','gfpdf_deploy_nonce'); ?>
|
127 |
-
<input type="hidden" name="gfpdf_deploy" value="1">
|
128 |
-
<?php
|
129 |
-
|
130 |
-
/*
|
131 |
-
* Remove the cancel feature for the moment
|
132 |
-
*
|
133 |
-
|
134 |
-
if(get_option('gf_pdf_extended_deploy') == 'no') { ?>
|
135 |
-
<input type="submit" value="Cancel Deployment" class="button" id="cancelupgrade" name="cancel">
|
136 |
-
<?php } */ ?>
|
137 |
-
<input type="submit" value="Initialise Plugin" class="button" id="upgrade" name="upgrade">
|
138 |
-
|
139 |
-
<input type="submit" value="Initialise Fonts Only" class="button" id="font-initialise" name="font-initialise">
|
140 |
-
</form>
|
141 |
-
<?php } ?>
|
142 |
-
|
143 |
-
<h2><?php _e('What\'s new in v'.PDF_EXTENDED_VERSION.'?' , "gravityformspdfextended") ?></h2>
|
144 |
-
|
145 |
-
<ol>
|
146 |
-
<li><strong>Feature</strong> - Added list array, file path, form ID and lead ID to $form_data array in custom templates</li>
|
147 |
-
<li><strong>Bug</strong> - Fixed initialisation prompt issue when updating plugin</li>
|
148 |
-
<li><strong>Bug</strong> - Fixed window.open issue which prevented a new window from opening when viewing a PDF in the admin area</li>
|
149 |
-
<li><strong>Bug</strong> - Fixed issue with product dropdown and radio button data showing the value instead of the name field.</li>
|
150 |
-
<li><strong>Bug</strong> - Fixed incorrect URL pointing to signature file in $form_data</li></ol>
|
151 |
-
|
152 |
-
<h2>v3.1.1 Changelog</h2>
|
153 |
-
<ol>
|
154 |
-
<li><strong>Bug</strong> - Users whose server only supports FTP file manipulation using the WP_Filesystem API moved the files into the wrong directory due to FTP usually being rooted to the Wordpress home directory. To fix this the plugin attempts to determine the FTP directory, otherwise assumes it is the WP base directory. </li>
|
155 |
-
<li><strong>Bug</strong>- Initialisation error message was being called but the success message was also showing. </li>
|
156 |
-
</ol>
|
157 |
-
|
158 |
-
<h2><?php _e('v3.1.0 Changelog' , "gravityformspdfextended") ?></h2>
|
159 |
-
|
160 |
-
<ol>
|
161 |
-
<li><strong>Feature</strong> - Added defaults to configuration.php which allows users to define the default PDF settings for all Gravity Forms. See the <a href="http://gravityformspdfextended.com/documentation-v3-x-x/installation-and-configuration/#default-configuration-options">installation and configuration documentation</a> for more details. </li>
|
162 |
-
<li><strong>Feature</strong> - Added three new configuration options 'default-show-html', 'default-show-empty' and 'default-show-page-names' which allow different display options to the three default templates. See the <a href="http://gravityformspdfextended.com/documentation-v3-x-x/installation-and-configuration/#default-template-only">installation and configuration documentation</a> for more details.</li>
|
163 |
-
<li><strong>Feature</strong> - Added filter hooks 'gfpdfe_pdf_name' and 'gfpdfe_template' which allows developers to further modify a PDF name and template file, respectively, outside of the configuration.php. This is useful if you have a special case naming convention based on user input. See <a href="http://gravityformspdfextended.com/filters-and-hooks/">http://gravityformspdfextended.com/filters-and-hooks/</a> for more details about using these filters.</li>
|
164 |
-
<li><strong>Feature</strong> - Custom font support. Any .ttf font file added to the PDF_EXTENDED_TEMPLATE/fonts/ folder will be automatically installed once the plugin has been initialised. Users also have the option to just initialise the fonts via the settings page. See the <a href="http://gravityformspdfextended.com/documentation-v3-x-x/language-support/#installing-fonts">fonts/language documentation</a> for details.</li>
|
165 |
-
<li><strong>Compatability</strong> - Use Gravity Forms get_upload_root() and get_upload_url_root() instead of hard coding the signature upload directory in pdf-entry-detail.php</li>
|
166 |
-
<li><strong>Compatability</strong> - Changed depreciated functions get_themes() and get_theme() to wp_get_theme() (added in Wordpress v3.4). </li>
|
167 |
-
<li><strong>Compatability</strong> - The plugin now needs to be initialised on fresh installation and upgrade. This allows us to use the WP_Filesystem API for file manipulation.</li>
|
168 |
-
<li><strong>Compatability</strong> - Automatic copying of PDF_EXTENDED_TEMPLATE folder on a theme change was removed in favour of a user prompt. This allows us to take advantage of the WP_Filesystem API.</li>
|
169 |
-
<li><strong>Compatability</strong> - Added Wordpress compatibility checker (minimum now 3.4 or higher).</li>
|
170 |
-
<li><strong>Bug</strong> - Removed ZipArchive in favour of Wordpress's WP_Filesystem API unzip_file() command. Some users reported the plugin would stop their entire website working if this extension wasn't installed.</li>
|
171 |
-
<li><strong>Bug</strong> - Fixed Gravity Forms compatibility checker which wouldn't return the correct response.</li>
|
172 |
-
<li><strong>Bug</strong> - Fixed minor bug in pdf.php when using static call 'self' in add_filter hook. Changed to class name.</li>
|
173 |
-
<li><strong>Bug</strong> - Removed PHP notice about $even variable not being defined in pdf-entry-detail.php</li>
|
174 |
-
<li><strong>Bug</strong> - Prevent code from continuing to excecute after sending header redirect.</li> </ol>
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
</div>
|
180 |
-
<div class="rightcolumn">
|
181 |
-
|
182 |
-
<h2>Upgraded from v2.x.x?</h2>
|
183 |
-
<p>We’ve spend a lot of time ensuring there won’t be compatibility issues when upgrading from v2.x.x to v3.x.x of the software. If you are upgrading ensure you read our <a href="http://gravityformspdfextended.com/documentation-v3-x-x/v3-0-0-migration-guide/">migration guide</a> to determine what changes you will need to make to take advantage of all the new features.</p>
|
184 |
-
|
185 |
-
<h2>What changed in v3.x.x?</h2>
|
186 |
-
|
187 |
-
<p> <em>Gravity Forms PDF Extended has had some major </em><em>remodelling</em><em> for v3.0.x including removal of the DOMPDF package in favour of the more powerful <a href="http://www.mpdf1.com/mpdf/">mPDF</a> PDF package.</em></p>
|
188 |
-
Along with a new HTML to PDF generator, we’ve rewritten the entire plugin’s base code to make it more user friendly to both hobbyists and rock star web developers. Configuration time is cut in half and advanced features like adding PDF security features like password protection or permissions is now accessible to users who have little experience with PHP.<br />
|
189 |
-
<p> <strong>New Features</strong></p>
|
190 |
-
<p> mPDF offers the following features out of the box:</p>
|
191 |
-
<ul>
|
192 |
-
<li> Language Support – almost all languages are supported including RTL (right to left) languages like Arabic and Hebrew and <a href="http://gravityformspdfextended.com/documentation-v3-x-x/language-support/">CJK languages</a> – Chinese, Japanese and Korean.</li>
|
193 |
-
<li> HTML Page Numbering</li>
|
194 |
-
<li> Odd and even paging with mirrored margins (most commonly used in printing).</li>
|
195 |
-
<li> Nested Tables</li>
|
196 |
-
<li> Text-justification and hyphenation</li>
|
197 |
-
<li> Table of Contents</li>
|
198 |
-
<li> Index</li>
|
199 |
-
<li> Bookmarks</li>
|
200 |
-
<li> Watermarks</li>
|
201 |
-
<li> Password protection</li>
|
202 |
-
<li> UTF-8 encoded HTML</li>
|
203 |
-
<li> Better system resource handling</li>
|
204 |
-
</ul>
|
205 |
-
<p> To see just what mPDF is capable of view the <a href="http://gravityformspdfextended.com/documentation-v3-x-x/templates/getting-started/">custom template examples</a> on our documentation pages.</p>
|
206 |
-
<p> <strong>What else is new in v3.x.x?</strong></p>
|
207 |
-
<p> A new HTML to PDF package wasn’t the only change to this edition of the software. We have rewritten the entire configuration system and made it super easy to get the software up and running.</p>
|
208 |
-
<p> Users will no longer place code in their active theme’s functions.php file. Instead, configuration will happen in a new file called <a href="http://gravityformspdfextended.com/documentation-v3-x-x/installation-and-configuration/">configuration.php</a>, inside the PDF_EXTENDED_TEMPLATES folder (in your active theme).</p>
|
209 |
-
<p> Generating the default PDF and sending it via your notifications is now as easy as adding the following code to configuration.php.</p>
|
210 |
-
<pre> $gf_pdf_config[] = array(
|
211 |
-
'form_id' => '1',
|
212 |
-
'notifications' => true
|
213 |
-
);
|
214 |
-
</pre>
|
215 |
-
<p> More advanced features can be <a href="http://gravityformspdfextended.com/documentation-v3-x-x/installation-and-configuration/">added in a similar way</a>.</p>
|
216 |
-
<p> <strong>Documentation</strong></p>
|
217 |
-
<p> We've <a href="http://gravityformspdfextended.com/documentation-v3-x-x/">written the documentation from the ground up</a> with extensive examples of the capabilities of mPDF.</p>
|
218 |
-
</div>
|
219 |
-
|
220 |
-
</div>
|
221 |
-
<?php
|
222 |
-
}
|
223 |
-
|
224 |
-
/*
|
225 |
-
* Deploy the latest template files
|
226 |
-
*/
|
227 |
-
private function deploy()
|
228 |
-
{
|
229 |
-
$return = GFPDF_InstallUpdater::pdf_extended_activate();
|
230 |
-
if($return !== true)
|
231 |
-
{
|
232 |
-
return $return;
|
233 |
-
}
|
234 |
-
add_action('gfpdfe_notices', array("GFPDF_Settings", "gf_pdf_deploy_success"));
|
235 |
-
}
|
236 |
-
|
237 |
-
public function gf_pdf_deploy_success() {
|
238 |
-
echo '<div id="message" class="updated"><p>';
|
239 |
-
echo 'You\'ve successfully initialised Gravity Forms PDF Extended.';
|
240 |
-
echo '</p></div>';
|
241 |
-
}
|
242 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pdf.php
CHANGED
@@ -1,699 +1,419 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
This
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
*
|
57 |
-
*/
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
*
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
*
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
{
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
$
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
public static function gfpdfe_create_and_attach_pdf($notification, $form, $entry)
|
421 |
-
{
|
422 |
-
/*
|
423 |
-
* Allow the template/function access to these variables
|
424 |
-
*/
|
425 |
-
global $gfpdf, $form_id, $lead_id;
|
426 |
-
|
427 |
-
if(self::$gf_compatibility != 'post 1.7')
|
428 |
-
{
|
429 |
-
/*
|
430 |
-
* Prior to 1.7 the notifications hook was $attachments, $lead, $form
|
431 |
-
* Swap $form and $entry values around to match 1.7
|
432 |
-
*/
|
433 |
-
$temp_form = $form;
|
434 |
-
$temp_entry = $entry;
|
435 |
-
$form = $temp_entry;
|
436 |
-
$entry = $temp_form;
|
437 |
-
|
438 |
-
$temp_form = $temp_entry = false;
|
439 |
-
}
|
440 |
-
else
|
441 |
-
{
|
442 |
-
$notification_name = (isset($notification['name'])) ? $notification['name'] : '';
|
443 |
-
}
|
444 |
-
|
445 |
-
/*
|
446 |
-
* Set data used to determine if PDF needs to be created and attached to notification
|
447 |
-
* Don't change anything here.
|
448 |
-
*/
|
449 |
-
$form_title = $form['title'];
|
450 |
-
$form_id = $entry['form_id'];
|
451 |
-
$lead_id = $entry['id'];
|
452 |
-
$folder_id = $form_id.$lead_id.'/';
|
453 |
-
|
454 |
-
/*
|
455 |
-
* Depreciated - Backwards Compatibility
|
456 |
-
* Set Constants
|
457 |
-
*/
|
458 |
-
if(!defined('GF_FORM_ID'))
|
459 |
-
{
|
460 |
-
/* TODO */
|
461 |
-
trigger_error('Gravity Forms PDF Extended constants GF_FORM_ID and GF_LEAD_ID depreciated in v3.0.0. Custom template files should be updated with the new code. See http://gravityformspdfextended.com/documentation-v3-x-x/v3-0-0-migration-guide/ for upgrade instructions.');
|
462 |
-
define('GF_FORM_ID', $form_id);
|
463 |
-
define('GF_LEAD_ID', $lead_id);
|
464 |
-
}
|
465 |
-
|
466 |
-
/*
|
467 |
-
* Check if form is in configuration
|
468 |
-
*/
|
469 |
-
if(!$config = $gfpdf->get_config($form_id))
|
470 |
-
{
|
471 |
-
return $notification;
|
472 |
-
}
|
473 |
-
|
474 |
-
/*
|
475 |
-
* To have our configuration indexes so loop through the PDF template configuration
|
476 |
-
* and generate and attach PDF files.
|
477 |
-
*/
|
478 |
-
foreach($config as $index)
|
479 |
-
{
|
480 |
-
$template = (isset($gfpdf->configuration[$index]['template'])) ? $gfpdf->configuration[$index]['template'] : '';
|
481 |
-
|
482 |
-
$pdf_arguments = $gfpdf->generate_pdf_parameters($index, $form_id, $lead_id, $template);
|
483 |
-
|
484 |
-
/* generate and save default PDF */
|
485 |
-
$filename = $gfpdf->render->PDF_Generator($form_id, $lead_id, $pdf_arguments);
|
486 |
-
|
487 |
-
/* Get notifications user wants PDF attached to and check if the correct notifications hook is running */
|
488 |
-
$notifications = $gfpdf->get_form_notifications($form, $index);
|
489 |
-
|
490 |
-
/* Set attachment name */
|
491 |
-
$attachment_file = $filename;
|
492 |
-
|
493 |
-
/*
|
494 |
-
* Version Control
|
495 |
-
* Do additional checks on 1.7 as it passed the notification name to the hook
|
496 |
-
* Checks done for prior versions done before assigning hook
|
497 |
-
*/
|
498 |
-
if(PDFGenerator::$gf_compatibility == 'post 1.7')
|
499 |
-
{
|
500 |
-
if ($gfpdf->check_notification($notification_name, $notifications))
|
501 |
-
{
|
502 |
-
$notification['attachments'][] = $attachment_file;
|
503 |
-
}
|
504 |
-
}
|
505 |
-
else
|
506 |
-
{
|
507 |
-
/*
|
508 |
-
* Did notification validation prior to running hook as pre 1.7 only
|
509 |
-
* passed admin and user notifications and doesn't tell you which one is running
|
510 |
-
*/
|
511 |
-
$notification[] = $attachment_file;
|
512 |
-
}
|
513 |
-
}
|
514 |
-
return $notification;
|
515 |
-
}
|
516 |
-
|
517 |
-
/*
|
518 |
-
* Check if name in notification_name String/Array matches value in $notifcations array
|
519 |
-
*/
|
520 |
-
public function check_notification($notification_name, $notifications)
|
521 |
-
{
|
522 |
-
if(is_array($notification_name))
|
523 |
-
{
|
524 |
-
foreach($notification_name as $name)
|
525 |
-
{
|
526 |
-
if(in_array($name, $notifications))
|
527 |
-
{
|
528 |
-
return true;
|
529 |
-
}
|
530 |
-
}
|
531 |
-
}
|
532 |
-
else
|
533 |
-
{
|
534 |
-
if(in_array($notification_name, $notifications))
|
535 |
-
{
|
536 |
-
return true;
|
537 |
-
}
|
538 |
-
}
|
539 |
-
|
540 |
-
return false;
|
541 |
-
}
|
542 |
-
|
543 |
-
public static function get_notifications_name($action, $form){
|
544 |
-
if(rgempty("notifications", $form))
|
545 |
-
return array();
|
546 |
-
|
547 |
-
$notifications = array();
|
548 |
-
foreach($form["notifications"] as $notification){
|
549 |
-
if(rgar($notification, "event") == $action)
|
550 |
-
$notifications[] = $notification['name'];
|
551 |
-
}
|
552 |
-
|
553 |
-
return $notifications;
|
554 |
-
}
|
555 |
-
|
556 |
-
public static function get_form_notifications($form, $index)
|
557 |
-
{
|
558 |
-
global $gfpdf;
|
559 |
-
|
560 |
-
/*
|
561 |
-
* Check if notification field even exists
|
562 |
-
*/
|
563 |
-
if(!isset($gfpdf->configuration[$index]['notifications']))
|
564 |
-
{
|
565 |
-
return array();
|
566 |
-
}
|
567 |
-
|
568 |
-
/*
|
569 |
-
* Get all form_submission notifications and
|
570 |
-
*/
|
571 |
-
if(self::$gf_compatibility != 'post 1.7')
|
572 |
-
{
|
573 |
-
$notifications = self::$pre_1_7_notifications;
|
574 |
-
}
|
575 |
-
else
|
576 |
-
{
|
577 |
-
$notifications = self::get_notifications_name('form_submission', $form);
|
578 |
-
}
|
579 |
-
$new_notifications = array();
|
580 |
-
|
581 |
-
/*
|
582 |
-
* If notifications is true the user wants to attach the PDF to all notifications
|
583 |
-
*/
|
584 |
-
if($gfpdf->configuration[$index]['notifications'] === true)
|
585 |
-
{
|
586 |
-
$new_notifications = $notifications;
|
587 |
-
}
|
588 |
-
/*
|
589 |
-
* Only a single notification is selected
|
590 |
-
*/
|
591 |
-
else if(!is_array($gfpdf->configuration[$index]['notifications']))
|
592 |
-
{
|
593 |
-
/*
|
594 |
-
* Ensure that notification is valid
|
595 |
-
*/
|
596 |
-
if(in_array($gfpdf->configuration[$index]['notifications'], $notifications))
|
597 |
-
{
|
598 |
-
$new_notifications = array($gfpdf->configuration[$index]['notifications']);
|
599 |
-
}
|
600 |
-
}
|
601 |
-
else
|
602 |
-
{
|
603 |
-
foreach($gfpdf->configuration[$index]['notifications'] as $name)
|
604 |
-
{
|
605 |
-
if(in_array($name, $notifications))
|
606 |
-
{
|
607 |
-
$new_notifications[] = $name;
|
608 |
-
}
|
609 |
-
}
|
610 |
-
}
|
611 |
-
|
612 |
-
return $new_notifications;
|
613 |
-
}
|
614 |
-
|
615 |
-
/*
|
616 |
-
* Generate PDF parameters to pass to the PDF renderer
|
617 |
-
* $index Integer The configuration index number
|
618 |
-
*/
|
619 |
-
private function generate_pdf_parameters($index, $form_id, $lead_id, $template = '')
|
620 |
-
{
|
621 |
-
/*
|
622 |
-
* Before setting up PDF options we will check if a configuration is found
|
623 |
-
* If not, we will set up defaults defined in configuration.php
|
624 |
-
*/
|
625 |
-
$index = $this->check_configuration($index, $form_id);
|
626 |
-
|
627 |
-
$pdf_name = (isset($this->configuration[$index]['filename']) && strlen($this->configuration[$index]['filename']) > 0) ? $this->get_pdf_name($index, $form_id, $lead_id) : PDF_Common::get_pdf_filename($form_id, $lead_id);
|
628 |
-
$template = (isset($template) && strlen($template) > 0) ? $template : $this->get_template($index);
|
629 |
-
|
630 |
-
$pdf_size = (isset($this->configuration[$index]['pdf_size']) && (is_array($this->configuration[$index]['pdf_size']) || strlen($this->configuration[$index]['pdf_size']) > 0)) ? $this->configuration[$index]['pdf_size'] : self::$default['pdf_size'];
|
631 |
-
$orientation = (isset($this->configuration[$index]['orientation']) && strlen($this->configuration[$index]['orientation']) > 0) ? $this->configuration[$index]['orientation'] : self::$default['orientation'];
|
632 |
-
$security = (isset($this->configuration[$index]['security']) && $this->configuration[$index]['security']) ? $this->configuration[$index]['security'] : self::$default['security'];
|
633 |
-
|
634 |
-
/*
|
635 |
-
* Validate privileges
|
636 |
-
* If blank and security is true then set privileges to all
|
637 |
-
*/
|
638 |
-
$privileges = (isset($this->configuration[$index]['pdf_privileges'])) ? $this->validate_privileges($this->configuration[$index]['pdf_privileges']) : $this->validate_privileges('');
|
639 |
-
|
640 |
-
$pdf_password = (isset($this->configuration[$index]['pdf_password'])) ? $this->configuration[$index]['pdf_password'] : '';
|
641 |
-
$master_password = (isset($this->configuration[$index]['pdf_master_password'])) ? $this->configuration[$index]['pdf_master_password'] : '';
|
642 |
-
$rtl = (isset($this->configuration[$index]['rtl'])) ? $this->configuration[$index]['rtl'] : false;
|
643 |
-
|
644 |
-
$pdf_arguments = array(
|
645 |
-
'pdfname' => apply_filters('gfpdfe_pdf_name', $pdf_name, RGFormsModel::get_form_meta($form_id), RGFormsModel::get_lead($lead_id)),
|
646 |
-
'template' => apply_filters('gfpdfe_template', $template, RGFormsModel::get_form_meta($form_id), RGFormsModel::get_lead($lead_id)),
|
647 |
-
'pdf_size' => $pdf_size, /* set to one of the following, or array - in millimeters */
|
648 |
-
'orientation' => $orientation, /* landscape or portrait */
|
649 |
-
|
650 |
-
'security' => $security, /* true or false. if true the security settings below will be applied. Default false. */
|
651 |
-
'pdf_password' => $pdf_password, /* set a password to view the PDF */
|
652 |
-
'pdf_privileges' => $privileges, /* assign user privliages to the PDF */
|
653 |
-
'pdf_master_password' => $master_password, /* set a master password to the PDF can't be modified without it */
|
654 |
-
'rtl' => $rtl
|
655 |
-
);
|
656 |
-
|
657 |
-
return $pdf_arguments;
|
658 |
-
}
|
659 |
-
|
660 |
-
/*
|
661 |
-
* Checks if a configuration index is found
|
662 |
-
* If not, we will set up defaults defined in configuration.php if they exist
|
663 |
-
*/
|
664 |
-
private function check_configuration($index, $form_id)
|
665 |
-
{
|
666 |
-
global $gf_pdf_default_configuration;
|
667 |
-
|
668 |
-
/*
|
669 |
-
* Check if configuration index already defined
|
670 |
-
*/
|
671 |
-
if(empty($index) || empty($this->index[$form_id]))
|
672 |
-
{
|
673 |
-
/*
|
674 |
-
* Check if a default configuration is defined
|
675 |
-
*/
|
676 |
-
if(is_array($gf_pdf_default_configuration) && sizeof($gf_pdf_default_configuration) > 0)
|
677 |
-
{
|
678 |
-
/*
|
679 |
-
* Add form_id to the defualt configuration
|
680 |
-
*/
|
681 |
-
$default_configuration = array_merge($gf_pdf_default_configuration, array('form_id' => $form_id));
|
682 |
-
|
683 |
-
/*
|
684 |
-
* There is no configuration index and there is a default index so add the defaults to this form's configuration
|
685 |
-
*/
|
686 |
-
$this->configuration[] = $default_configuration;
|
687 |
-
|
688 |
-
/* get the id of the newly added configuration */
|
689 |
-
end($this->configuration);
|
690 |
-
$index = key($this->configuration);
|
691 |
-
|
692 |
-
/* now add to the index */
|
693 |
-
$this->assign_index($form_id, $index);
|
694 |
-
|
695 |
-
}
|
696 |
-
}
|
697 |
-
return $index;
|
698 |
-
}
|
699 |
-
}
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Gravity PDF
|
4 |
+
Version: 4.2.1
|
5 |
+
Description: Automatically generate highly-customisable PDF documents using Gravity Forms.
|
6 |
+
Author: Gravity PDF
|
7 |
+
Author URI: https://gravitypdf.com
|
8 |
+
Text Domain: gravity-forms-pdf-extended
|
9 |
+
Domain Path: /src/assets/languages
|
10 |
+
*/
|
11 |
+
|
12 |
+
/* Exit if accessed directly */
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
/*
|
18 |
+
This file is part of Gravity PDF
|
19 |
+
|
20 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
21 |
+
|
22 |
+
This program is free software; you can redistribute it and/or modify
|
23 |
+
it under the terms of the GNU General Public License as published by
|
24 |
+
the Free Software Foundation; either version 2 of the License, or
|
25 |
+
(at your option) any later version.
|
26 |
+
|
27 |
+
This program is distributed in the hope that it will be useful,
|
28 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
29 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
30 |
+
GNU General Public License for more details.
|
31 |
+
|
32 |
+
You should have received a copy of the GNU General Public License
|
33 |
+
along with this program; if not, write to the Free Software
|
34 |
+
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
35 |
+
*/
|
36 |
+
|
37 |
+
/*
|
38 |
+
* Set base constants we'll use throughout the plugin
|
39 |
+
*/
|
40 |
+
define( 'PDF_EXTENDED_VERSION', '4.2.1' ); /* the current plugin version */
|
41 |
+
define( 'PDF_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); /* plugin directory path */
|
42 |
+
define( 'PDF_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); /* plugin directory url */
|
43 |
+
define( 'PDF_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); /* the plugin basename */
|
44 |
+
|
45 |
+
/*
|
46 |
+
* Add our activation hook and deactivation hooks
|
47 |
+
*/
|
48 |
+
require_once PDF_PLUGIN_DIR . 'src/controller/Controller_Activation.php';
|
49 |
+
register_deactivation_hook( __FILE__, array( 'Controller_Activation', 'deactivation' ) );
|
50 |
+
|
51 |
+
/**
|
52 |
+
*
|
53 |
+
* Our initialisation class
|
54 |
+
* Check all the dependancy requirements are met, otherwise fallback and show appropriate user error
|
55 |
+
*
|
56 |
+
* @since 4.0
|
57 |
+
*/
|
58 |
+
class GFPDF_Major_Compatibility_Checks {
|
59 |
+
|
60 |
+
/**
|
61 |
+
* The plugin's basename
|
62 |
+
*
|
63 |
+
* @var string
|
64 |
+
*
|
65 |
+
* @since 4.0
|
66 |
+
*/
|
67 |
+
private $basename;
|
68 |
+
|
69 |
+
/**
|
70 |
+
* The path to the plugin
|
71 |
+
*
|
72 |
+
* @var string
|
73 |
+
*
|
74 |
+
* @since 4.0
|
75 |
+
*/
|
76 |
+
private $path;
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Holds any blocker error messages stopping plugin running
|
80 |
+
*
|
81 |
+
* @var array
|
82 |
+
*
|
83 |
+
* @since 4.0
|
84 |
+
*/
|
85 |
+
private $notices = array();
|
86 |
+
|
87 |
+
/**
|
88 |
+
* The plugin's required Gravity Forms version
|
89 |
+
*
|
90 |
+
* @var string
|
91 |
+
*
|
92 |
+
* @since 4.0
|
93 |
+
*/
|
94 |
+
public $required_gf_version = '1.9';
|
95 |
+
|
96 |
+
/**
|
97 |
+
* The plugin's required WordPress version
|
98 |
+
*
|
99 |
+
* @var string
|
100 |
+
*
|
101 |
+
* @since 4.0
|
102 |
+
*/
|
103 |
+
public $required_wp_version = '4.4';
|
104 |
+
|
105 |
+
/**
|
106 |
+
* The plugin's required PHP version
|
107 |
+
*
|
108 |
+
* Gravity PDF 4.0 is such a major release that we can afford to also bump up the version requirements.
|
109 |
+
* We really wanted to bump this up to an actively supported version of PHP (http://php.net/supported-versions.php)
|
110 |
+
* but with WordPress supporting PHP5.2+ (and making no moves to increase this) we had to strike a balance.
|
111 |
+
*
|
112 |
+
* The initial release will require PHP 5.4 which will strike a better balance.
|
113 |
+
*
|
114 |
+
* @var string
|
115 |
+
*
|
116 |
+
* @since 4.0
|
117 |
+
*/
|
118 |
+
public $required_php_version = '5.4';
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Set our required variables for a fallback and attempt to initialise
|
122 |
+
*
|
123 |
+
* @param string $basename Plugin basename
|
124 |
+
* @param string $path The plugin path
|
125 |
+
*
|
126 |
+
* @since 4.0
|
127 |
+
*/
|
128 |
+
public function __construct( $basename = '', $path = '' ) {
|
129 |
+
|
130 |
+
/* Set our class variables */
|
131 |
+
$this->basename = $basename;
|
132 |
+
$this->path = $path;
|
133 |
+
}
|
134 |
+
|
135 |
+
/**
|
136 |
+
* Load the plugin
|
137 |
+
*
|
138 |
+
* @return void
|
139 |
+
*
|
140 |
+
* @since 4.0
|
141 |
+
*/
|
142 |
+
public function init() {
|
143 |
+
add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ) );
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Check if dependancies are met and load plugin, otherwise display errors
|
148 |
+
*
|
149 |
+
* @return void
|
150 |
+
*
|
151 |
+
* @since 4.0
|
152 |
+
*/
|
153 |
+
public function plugins_loaded() {
|
154 |
+
|
155 |
+
/* Check minimum requirements are met */
|
156 |
+
$this->is_compatible_wordpress_version();
|
157 |
+
$this->check_gravity_forms();
|
158 |
+
$this->check_php();
|
159 |
+
$this->check_mb_string();
|
160 |
+
$this->check_mb_string_regex();
|
161 |
+
$this->check_gd();
|
162 |
+
$this->check_dom();
|
163 |
+
$this->check_ram( ini_get( 'memory_limit' ) );
|
164 |
+
|
165 |
+
/* Check if any errors were thrown, enqueue them and exit early */
|
166 |
+
if ( sizeof( $this->notices ) > 0 ) {
|
167 |
+
add_action( 'admin_notices', array( $this, 'display_notices' ) );
|
168 |
+
|
169 |
+
return null;
|
170 |
+
}
|
171 |
+
|
172 |
+
require_once $this->path . 'src/bootstrap.php';
|
173 |
+
}
|
174 |
+
|
175 |
+
/**
|
176 |
+
* Check if WordPress version is compatible
|
177 |
+
*
|
178 |
+
* @return boolean Whether compatible or not
|
179 |
+
*
|
180 |
+
* @since 4.0
|
181 |
+
*/
|
182 |
+
public function is_compatible_wordpress_version() {
|
183 |
+
global $wp_version;
|
184 |
+
|
185 |
+
/* WordPress version not compatible */
|
186 |
+
if ( ! version_compare( $wp_version, $this->required_wp_version, '>=' ) ) {
|
187 |
+
$this->notices[] = sprintf( esc_html__( 'WordPress Version %s is required. %sGet more info%s.', 'gravity-forms-pdf-extended' ), $this->required_wp_version, '<a href="https://gravitypdf.com/documentation/v4/user-activation-errors/#wordpress-version">', '</a>' );
|
188 |
+
|
189 |
+
return false;
|
190 |
+
}
|
191 |
+
|
192 |
+
return true;
|
193 |
+
}
|
194 |
+
|
195 |
+
/**
|
196 |
+
* Check if Gravity Forms version is compatible
|
197 |
+
*
|
198 |
+
* @return boolean Whether compatible or not
|
199 |
+
*
|
200 |
+
* @since 4.0
|
201 |
+
*/
|
202 |
+
public function check_gravity_forms() {
|
203 |
+
|
204 |
+
/* Gravity Forms version not compatible */
|
205 |
+
if ( ! class_exists( 'GFCommon' ) || ! version_compare( GFCommon::$version, $this->required_gf_version, '>=' ) ) {
|
206 |
+
$this->notices[] = sprintf( esc_html__( '%sGravity Forms%s Version %s is required. %sGet more info%s.', 'gravity-forms-pdf-extended' ), '<a href="https://www.e-junkie.com/ecom/gb.php?cl=54585&c=ib&aff=235154">', '</a>', $this->required_gf_version, '<a href="https://gravitypdf.com/documentation/v4/user-activation-errors/#gravityforms-version">', '</a>' );
|
207 |
+
|
208 |
+
return false;
|
209 |
+
}
|
210 |
+
|
211 |
+
return true;
|
212 |
+
}
|
213 |
+
|
214 |
+
/**
|
215 |
+
* Check if PHP version is compatible
|
216 |
+
*
|
217 |
+
* @return boolean Whether compatible or not
|
218 |
+
*
|
219 |
+
* @since 4.0
|
220 |
+
*/
|
221 |
+
public function check_php() {
|
222 |
+
|
223 |
+
/* Check PHP version is compatible */
|
224 |
+
if ( ! version_compare( phpversion(), $this->required_php_version, '>=' ) ) {
|
225 |
+
$this->notices[] = sprintf( esc_html__( 'You are running an %soutdated version of PHP%s. Contact your web hosting provider to update. %sGet more info%s.', 'gravity-forms-pdf-extended' ), '<a href="http://www.wpupdatephp.com/update/">', '</a>', '<a href="https://gravitypdf.com/documentation/v4/user-activation-errors/#php-version">', '</a>' );
|
226 |
+
|
227 |
+
return false;
|
228 |
+
}
|
229 |
+
|
230 |
+
return true;
|
231 |
+
}
|
232 |
+
|
233 |
+
/**
|
234 |
+
* Check if PHP MB String enabled
|
235 |
+
*
|
236 |
+
* @return boolean Whether compatible or not
|
237 |
+
*
|
238 |
+
* @since 4.0
|
239 |
+
*/
|
240 |
+
public function check_mb_string() {
|
241 |
+
|
242 |
+
/* Check MB String is installed */
|
243 |
+
if ( ! extension_loaded( 'mbstring' ) ) {
|
244 |
+
$this->notices[] = sprintf( esc_html__( 'The PHP Extension MB String could not be detected. Contact your web hosting provider to fix. %sGet more info%s.', 'gravity-forms-pdf-extended' ), '<a href="https://gravitypdf.com/documentation/v4/user-activation-errors/#php-mbstring">', '</a>' );
|
245 |
+
|
246 |
+
return false;
|
247 |
+
}
|
248 |
+
|
249 |
+
return true;
|
250 |
+
}
|
251 |
+
|
252 |
+
/**
|
253 |
+
* Check if MB String Regex enabled
|
254 |
+
*
|
255 |
+
* @return boolean Whether compatible or not
|
256 |
+
*
|
257 |
+
* @since 4.0
|
258 |
+
*/
|
259 |
+
public function check_mb_string_regex() {
|
260 |
+
|
261 |
+
/* Check MB String is compiled with regex capabilities */
|
262 |
+
if ( extension_loaded( 'mbstring' ) && ! function_exists( 'mb_regex_encoding' ) ) {
|
263 |
+
$this->notices[] = sprintf( esc_html__( 'The PHP Extension MB String does not have MB Regex enabled. Contact your web hosting provider to fix. %sGet more info%s.', 'gravity-forms-pdf-extended' ), '<a href="https://gravitypdf.com/documentation/v4/user-activation-errors/#php-mbstring-regex">', '</a>' );
|
264 |
+
|
265 |
+
return false;
|
266 |
+
}
|
267 |
+
|
268 |
+
return true;
|
269 |
+
}
|
270 |
+
|
271 |
+
/**
|
272 |
+
* Check if PHP GD Library installed
|
273 |
+
*
|
274 |
+
* @return boolean Whether compatible or not
|
275 |
+
*
|
276 |
+
* @since 4.0
|
277 |
+
*/
|
278 |
+
public function check_gd() {
|
279 |
+
|
280 |
+
/* Check GD Image Library is installed */
|
281 |
+
if ( ! extension_loaded( 'gd' ) ) {
|
282 |
+
$this->notices[] = sprintf( esc_html__( 'The PHP Extension GD Image Library could not be detected. Contact your web hosting provider to fix. %sGet more info%s.', 'gravity-forms-pdf-extended' ), '<a href="https://gravitypdf.com/documentation/v4/user-activation-errors/#php-gd">', '</a>' );
|
283 |
+
|
284 |
+
return false;
|
285 |
+
}
|
286 |
+
|
287 |
+
return true;
|
288 |
+
}
|
289 |
+
|
290 |
+
/**
|
291 |
+
* Check if PHP DOM / libxml installed
|
292 |
+
*
|
293 |
+
* @return boolean Whether compatible or not
|
294 |
+
*
|
295 |
+
* @since 4.0
|
296 |
+
*/
|
297 |
+
public function check_dom() {
|
298 |
+
|
299 |
+
/* Check DOM Class is installed */
|
300 |
+
if ( ! extension_loaded( 'dom' ) || ! class_exists( 'DOMDocument' ) ) {
|
301 |
+
$this->notices[] = sprintf( esc_html__( 'The PHP DOM Extension was not found. Contact your web hosting provider to fix. %sGet more info%s.', 'gravity-forms-pdf-extended' ), '<a href="https://gravitypdf.com/documentation/v4/user-activation-errors/#php-dom">', '</a>' );
|
302 |
+
|
303 |
+
return false;
|
304 |
+
}
|
305 |
+
|
306 |
+
/* Check libxml is loaded */
|
307 |
+
if ( ! extension_loaded( 'libxml' ) ) {
|
308 |
+
$this->notices[] = sprintf( esc_html__( 'The PHP Extension libxml could not be detected. Contact your web hosting provider to fix. %sGet more info%s.', 'gravity-forms-pdf-extended' ), '<a href="https://gravitypdf.com/documentation/v4/user-activation-errors/#php-xml">', '</a>' );
|
309 |
+
|
310 |
+
return false;
|
311 |
+
}
|
312 |
+
|
313 |
+
return true;
|
314 |
+
}
|
315 |
+
|
316 |
+
/**
|
317 |
+
* Check if minimum RAM requirements met
|
318 |
+
*
|
319 |
+
* @param string $ram The PHP RAM setting
|
320 |
+
*
|
321 |
+
* @return boolean Whether compatible or not
|
322 |
+
*
|
323 |
+
* @since 4.0
|
324 |
+
*/
|
325 |
+
public function check_ram( $ram ) {
|
326 |
+
|
327 |
+
/* Check Minimum RAM requirements */
|
328 |
+
$ram = $this->get_ram( $ram );
|
329 |
+
|
330 |
+
if ( $ram < 64 && $ram !== -1 ) {
|
331 |
+
$this->notices[] = sprintf( esc_html__( "You need %s128MB%s of WP Memory (RAM) but we only found %s available. %sTry these methods to increase your memory limit%s, otherwise contact your web hosting provider to fix.", 'gravity-forms-pdf-extended' ), '<strong>', '</strong>', $ram . 'MB', '<a href="https://gravitypdf.com/documentation/v4/user-increasing-memory-limit/">', '</a>' );
|
332 |
+
|
333 |
+
return false;
|
334 |
+
}
|
335 |
+
|
336 |
+
return true;
|
337 |
+
}
|
338 |
+
|
339 |
+
|
340 |
+
/**
|
341 |
+
* Get the available system memory
|
342 |
+
*
|
343 |
+
* @param string $ram The PHP RAM setting
|
344 |
+
*
|
345 |
+
* @return integer The calculated RAM
|
346 |
+
*
|
347 |
+
* @since 4.0
|
348 |
+
*/
|
349 |
+
public function get_ram( $ram ) {
|
350 |
+
|
351 |
+
/* Get memory in standardised bytes format */
|
352 |
+
$memory_limit = $this->convert_ini_memory( $ram );
|
353 |
+
|
354 |
+
/* Convert to megabytes, or set to -1 if unlimited */
|
355 |
+
return ( $memory_limit === '-1' ) ? -1 : floor( $memory_limit / 1024 / 1024 );
|
356 |
+
}
|
357 |
+
|
358 |
+
/**
|
359 |
+
* Convert .ini file memory to bytes
|
360 |
+
*
|
361 |
+
* @param string $memory The .ini memory limit
|
362 |
+
*
|
363 |
+
* @return integer The calculated memory limit in bytes
|
364 |
+
*/
|
365 |
+
public function convert_ini_memory( $memory ) {
|
366 |
+
|
367 |
+
$convert = array( 'mb' => 'm', 'kb' => 'k', 'gb' => 'g' );
|
368 |
+
|
369 |
+
/* Standardise format */
|
370 |
+
foreach ( $convert as $k => $v ) {
|
371 |
+
$memory = str_ireplace( $k, $v, $memory );
|
372 |
+
}
|
373 |
+
|
374 |
+
/* Check if memory allocation is in mb, kb or gb */
|
375 |
+
switch ( strtolower( substr( $memory, -1 ) ) ) {
|
376 |
+
case 'm':
|
377 |
+
return (int) $memory * 1048576;
|
378 |
+
case 'k':
|
379 |
+
return (int) $memory * 1024;
|
380 |
+
case 'g':
|
381 |
+
return (int) $memory * 1073741824;
|
382 |
+
}
|
383 |
+
|
384 |
+
return $memory;
|
385 |
+
}
|
386 |
+
|
387 |
+
|
388 |
+
/**
|
389 |
+
* Helper function to easily display error messages
|
390 |
+
*
|
391 |
+
* @return void
|
392 |
+
*
|
393 |
+
* @since 4.0
|
394 |
+
*/
|
395 |
+
public function display_notices() {
|
396 |
+
?>
|
397 |
+
<div class="error">
|
398 |
+
<p><strong><?php esc_html_e( 'Gravity PDF Installation Problem', 'gravity-forms-pdf-extended' ); ?></strong></p>
|
399 |
+
|
400 |
+
<p><?php esc_html_e( 'The minimum requirements for Gravity PDF have not been met. Please fix the issue(s) below to continue:', 'gravity-forms-pdf-extended' ); ?></p>
|
401 |
+
<ul style="padding-bottom: 0.5em">
|
402 |
+
<?php foreach ( $this->notices as $notice ) : ?>
|
403 |
+
<li style="padding-left: 20px;list-style: inside"><?php echo $notice; ?></li>
|
404 |
+
<?php endforeach; ?>
|
405 |
+
</ul>
|
406 |
+
</div>
|
407 |
+
<?php
|
408 |
+
}
|
409 |
+
}
|
410 |
+
|
411 |
+
/*
|
412 |
+
* Initialise the software
|
413 |
+
*/
|
414 |
+
$gravitypdf = new GFPDF_Major_Compatibility_Checks(
|
415 |
+
PDF_PLUGIN_BASENAME,
|
416 |
+
PDF_PLUGIN_DIR
|
417 |
+
);
|
418 |
+
|
419 |
+
$gravitypdf->init();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render_to_pdf.php
DELETED
@@ -1,71 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
* File: render_to_pdf.php
|
5 |
-
* Status: Depreciated as of GF PDF Extended 3.0.0
|
6 |
-
* Left here to ensure backward compatibility
|
7 |
-
* File replaced by pdf-render.php
|
8 |
-
* Add compatibility functions to ensure backwards compatibility with the software
|
9 |
-
*/
|
10 |
-
|
11 |
-
/*
|
12 |
-
* Added to ensure backwards compatibility with older versions of the software
|
13 |
-
*/
|
14 |
-
|
15 |
-
if(!function_exists('PDF_Generator'))
|
16 |
-
{
|
17 |
-
function PDF_Generator($form_id, $lead_id, $arguments = 'view', $return = false, $template = 'default-template.php', $pdfname = '', $fpdf = false)
|
18 |
-
{
|
19 |
-
if(is_array($arguments))
|
20 |
-
{
|
21 |
-
$output = (isset($arguments['output']) && strlen($arguments['output']) > 0) ? $arguments['output'] : 'save';
|
22 |
-
$return = (isset($arguments['return']) && $arguments['return'] === true) ? $arguments['return'] : false;
|
23 |
-
$fpdf = (isset($arguments['fpdf']) && $arguments['fpdf'] === true) ? $arguments['fpdf'] : false;
|
24 |
-
$template = (isset($arguments['template']) && strlen($arguments['template']) > 0) ? $arguments['template'] : 'default-template.php';
|
25 |
-
$pdfname = (isset($arguments['pdfname']) && strlen($arguments['pdfname']) > 0) ? $arguments['pdfname'] : get_pdf_filename($form_id, $lead_id);
|
26 |
-
}
|
27 |
-
else
|
28 |
-
{
|
29 |
-
/* maintain backwards compatibility */
|
30 |
-
$output = $arguments;
|
31 |
-
}
|
32 |
-
|
33 |
-
if(strlen($pdfname) == 0)
|
34 |
-
{
|
35 |
-
$pdfname = get_pdf_filename($form_id, $lead_id);
|
36 |
-
}
|
37 |
-
|
38 |
-
$new_arguments = array(
|
39 |
-
'output' => $output,
|
40 |
-
'return' => $return,
|
41 |
-
'template' => $template,
|
42 |
-
'pdfname' => $pdfname,
|
43 |
-
'fpdf' => $fpdf
|
44 |
-
);
|
45 |
-
|
46 |
-
/*
|
47 |
-
* Depreciated - Backwards Compatibility
|
48 |
-
* Set Constants
|
49 |
-
*/
|
50 |
-
if(!defined('GF_FORM_ID'))
|
51 |
-
{
|
52 |
-
/* TODO */
|
53 |
-
trigger_error('Gravity Forms PDF Extended constants GF_FORM_ID and GF_LEAD_ID depreciated in v3.0.0. Custom template files should be updated with the new code. See http://gravityformspdfextended.com/documentation-v3-x-x/v3-0-0-migration-guide/ for upgrade instructions.');
|
54 |
-
define('GF_FORM_ID', $form_id);
|
55 |
-
define('GF_LEAD_ID', $lead_id);
|
56 |
-
}
|
57 |
-
|
58 |
-
$render = new PDFRender();
|
59 |
-
return $render->PDF_Generator($form_id, $lead_id, $new_arguments);
|
60 |
-
}
|
61 |
-
}
|
62 |
-
|
63 |
-
if(!function_exists('get_pdf_filename'))
|
64 |
-
{
|
65 |
-
function get_pdf_filename($form_id, $lead_id)
|
66 |
-
{
|
67 |
-
return PDF_Common::get_pdf_filename($form_id, $lead_id);
|
68 |
-
}
|
69 |
-
}
|
70 |
-
|
71 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
resources/README.txt
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
The resource directory is a legacy folder from Gravity PDF v3
|
2 |
+
We've left it here for v3 templates that reference the images found in this directory
|
3 |
+
|
4 |
+
See /src/assets/ for the v4 resources directory.
|
{images → resources/images}/alpha.gif
RENAMED
File without changes
|
{images → resources/images}/alpha.png
RENAMED
File without changes
|
{images → resources/images}/alpha3.png
RENAMED
File without changes
|
{images → resources/images}/bayeux1.jpg
RENAMED
File without changes
|
{images → resources/images}/bg.jpg
RENAMED
File without changes
|
{images → resources/images}/bgbarcode.png
RENAMED
File without changes
|
{images → resources/images}/bgrock.jpg
RENAMED
File without changes
|
{images → resources/images}/borders2FF.jpg
RENAMED
File without changes
|
{images → resources/images}/borders2IE.jpg
RENAMED
File without changes
|
{images → resources/images}/borders3FF.jpg
RENAMED
File without changes
|
{images → resources/images}/borders3IE.jpg
RENAMED
File without changes
|
{images → resources/images}/borders4FF.jpg
RENAMED
File without changes
|
{images → resources/images}/borders4IE.jpg
RENAMED
File without changes
|
{images → resources/images}/bordersFF.jpg
RENAMED
File without changes
|
{images → resources/images}/bordersIE.jpg
RENAMED
File without changes
|
{images → resources/images}/bordersMPDF2.jpg
RENAMED
File without changes
|
{images → resources/images}/clematis.jpg
RENAMED
File without changes
|
{images → resources/images}/firefox-48.png
RENAMED
File without changes
|
{images → resources/images}/flowers-pattern.jpg
RENAMED
File without changes
|
{images → resources/images}/goto.gif
RENAMED
File without changes
|
resources/images/gravityformspdfextended.jpg
ADDED
Binary file
|
{images → resources/images}/img1.png
RENAMED
File without changes
|
{images → resources/images}/img2.png
RENAMED
File without changes
|
{images → resources/images}/img3.png
RENAMED
File without changes
|
{images → resources/images}/img4.png
RENAMED
File without changes
|
{images → resources/images}/img5.png
RENAMED
File without changes
|
{images → resources/images}/klematis.jpg
RENAMED
File without changes
|
{images → resources/images}/loading.gif
RENAMED
File without changes
|
{images → resources/images}/mpdfstyleA4.css
RENAMED
File without changes
|
{images → resources/images}/mpdfstylePaged.css
RENAMED
File without changes
|
{images → resources/images}/mpdfstyletables.css
RENAMED
File without changes
|
{images → resources/images}/quran282.jpg
RENAMED
File without changes
|
{images → resources/images}/signature.png
RENAMED
File without changes
|
{images → resources/images}/sunset.jpg
RENAMED
File without changes
|
{images → resources/images}/sunsetv.jpg
RENAMED
File without changes
|
{images → resources/images}/tiger.bmp
RENAMED
File without changes
|
{images → resources/images}/tiger.gif
RENAMED
File without changes
|
{images → resources/images}/tiger.jpg
RENAMED
File without changes
|
{images → resources/images}/tiger.png
RENAMED
File without changes
|
{images → resources/images}/tiger.svg
RENAMED
File without changes
|
{images → resources/images}/tiger.wmf
RENAMED
File without changes
|
{images → resources/images}/tiger2.png
RENAMED
File without changes
|
{images → resources/images}/tiger2.wmf
RENAMED
File without changes
|
{images → resources/images}/tiger24trns.png
RENAMED
File without changes
|
{images → resources/images}/tiger300px300dpi.jpg
RENAMED
File without changes
|
{images → resources/images}/tiger300px300dpi.png
RENAMED
File without changes
|
{images → resources/images}/tiger300px72dpi.jpg
RENAMED
File without changes
|
{images → resources/images}/tiger300px96dpi.jpg
RENAMED
File without changes
|
{images → resources/images}/tiger300px96dpi.png
RENAMED
File without changes
|
{images → resources/images}/tiger8trns.gif
RENAMED
File without changes
|
{images → resources/images}/tiger8trns.png
RENAMED
File without changes
|
{images → resources/images}/tigercmyk.jpg
RENAMED
File without changes
|
{images → resources/images}/windmill.jpg
RENAMED
File without changes
|
src/assets/css/gfpdf-admin-styles.css
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
/**
|
3 |
+
* CSS file included on all WordPress Admin Pages
|
4 |
+
* If style is targetted directly at Gravity PDF admin pages include in gfpdf-styles.css instead
|
5 |
+
*/
|
6 |
+
|
7 |
+
|
8 |
+
@media only screen and (min-width: 600px) {
|
9 |
+
.notice.gfpdf-alert-mascot {
|
10 |
+
padding-left: 145px !important;
|
11 |
+
|
12 |
+
background-image: url(../../../src/assets/images/paws-with-logo-small.png);
|
13 |
+
background-position: 10px 50%;
|
14 |
+
background-repeat: no-repeat;
|
15 |
+
background-size: 125px;
|
16 |
+
}
|
17 |
+
}
|
src/assets/css/gfpdf-styles.css
ADDED
@@ -0,0 +1,983 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Welcome Page
|
3 |
+
*/
|
4 |
+
|
5 |
+
.about-wrap .gfpdf-badge {
|
6 |
+
margin-bottom: 1.5em;
|
7 |
+
position: relative;
|
8 |
+
width: 100%;
|
9 |
+
}
|
10 |
+
|
11 |
+
.about-wrap .feature-section:not(.under-the-hood) .col.gfpdf-breakdown {
|
12 |
+
margin-top: 0;
|
13 |
+
}
|
14 |
+
|
15 |
+
.gfpdf-badge {
|
16 |
+
background: url("../../../src/assets/images/gravitypdf-globe-black.png") no-repeat 50% 5px;
|
17 |
+
color: #333;
|
18 |
+
display: inline-block;
|
19 |
+
font-size: 14px;
|
20 |
+
font-weight: 600;
|
21 |
+
height: 40px;
|
22 |
+
margin: 5px 0 0;
|
23 |
+
padding-top: 120px;
|
24 |
+
text-align: center;
|
25 |
+
text-rendering: optimizelegibility;
|
26 |
+
}
|
27 |
+
|
28 |
+
.gfpdf-page .about-wrap [class$="col"] .col {
|
29 |
+
border-bottom: none;
|
30 |
+
}
|
31 |
+
|
32 |
+
.gfpdf-page .about-wrap .feature-section {
|
33 |
+
border-bottom: 1px solid rgba(0, 0, 0, 0.1 );
|
34 |
+
}
|
35 |
+
|
36 |
+
.gfpdf-page .about-wrap .feature-section.two-col .col {
|
37 |
+
vertical-align: middle;
|
38 |
+
}
|
39 |
+
|
40 |
+
div img.gfpdf-image {
|
41 |
+
border: 1px solid #CCC;
|
42 |
+
max-width: 98%;
|
43 |
+
|
44 |
+
-webkit-box-shadow: 1px 1px 5px 1px rgba(0,0,0,0.15);
|
45 |
+
-moz-box-shadow: 1px 1px 5px 1px rgba(0,0,0,0.15);
|
46 |
+
box-shadow: 1px 1px 5px 1px rgba(0,0,0,0.15);
|
47 |
+
|
48 |
+
}
|
49 |
+
|
50 |
+
|
51 |
+
|
52 |
+
/**
|
53 |
+
* General Settings Page
|
54 |
+
*/
|
55 |
+
#pdfextended-settings {
|
56 |
+
margin-top: 20px;
|
57 |
+
}
|
58 |
+
|
59 |
+
#pdfextended-settings h3,
|
60 |
+
#tab_pdf h3 {
|
61 |
+
margin-top: 5px;
|
62 |
+
line-height: 1.3em;
|
63 |
+
}
|
64 |
+
|
65 |
+
#pdfextended-settings h3 i,
|
66 |
+
#tab_pdf h3 i {
|
67 |
+
padding-right: 2px;
|
68 |
+
}
|
69 |
+
|
70 |
+
#pdfextended-settings #add-new-pdf {
|
71 |
+
padding: 4px 8px;
|
72 |
+
}
|
73 |
+
|
74 |
+
#pdfextended-settings div.notice, div.pdf-notice {
|
75 |
+
margin: 5px 15px 2px;
|
76 |
+
padding: 0 0.6em;
|
77 |
+
}
|
78 |
+
|
79 |
+
.gfpdf-page #pdfextended-settings .theme div.notice,
|
80 |
+
.gfpdf-page .theme div.notice,
|
81 |
+
.gfpdf-page #pdfextended-settings .theme-info div.notice,
|
82 |
+
.gfpdf-page .theme-info div.notice{
|
83 |
+
margin: 0;
|
84 |
+
z-index: 500;
|
85 |
+
color: #444;
|
86 |
+
padding: 1px 12px;
|
87 |
+
}
|
88 |
+
|
89 |
+
.gfpdf-page div.notice, div.pdf-notice,
|
90 |
+
.gfpdf-page div.error, div.pdf-error {
|
91 |
+
background-color: #FFFFFF;
|
92 |
+
border-left: 4px solid #7AD03A;
|
93 |
+
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
|
94 |
+
}
|
95 |
+
|
96 |
+
.gfpdf-page div.error, div.pdf-error {
|
97 |
+
border-left-color: #dc3232;
|
98 |
+
}
|
99 |
+
|
100 |
+
.gfpdf-page div.notice, div.pdf-notice {
|
101 |
+
margin: 5px 0 15px;
|
102 |
+
padding: 1px 12px;
|
103 |
+
}
|
104 |
+
|
105 |
+
#pdfextended-settings #gfpdf-advanced-options,
|
106 |
+
#tab_pdf #gfpdf-advanced-options {
|
107 |
+
display: none;
|
108 |
+
margin-bottom: 20px;
|
109 |
+
}
|
110 |
+
|
111 |
+
.no-js #pdfextended-settings #gfpdf-advanced-options,
|
112 |
+
.no-js #tab_pdf #gfpdf-advanced-options {
|
113 |
+
display: block;
|
114 |
+
}
|
115 |
+
|
116 |
+
#pdfextended-settings .gfpdf-advanced-options,
|
117 |
+
#tab_pdf .gfpdf-advanced-options {
|
118 |
+
margin-top: -5px;
|
119 |
+
}
|
120 |
+
|
121 |
+
.no-js #pdfextended-settings .gfpdf-advanced-options,
|
122 |
+
.no-js #tab_pdf .gfpdf-advanced-options {
|
123 |
+
display: none;
|
124 |
+
}
|
125 |
+
|
126 |
+
#pdfextended-settings select.large,
|
127 |
+
#tab_pdf select.large {
|
128 |
+
width: 100%;
|
129 |
+
max-width: 350px;
|
130 |
+
}
|
131 |
+
|
132 |
+
#tab_pdf .formSubmitted input:invalid {
|
133 |
+
border: 1px solid red;
|
134 |
+
}
|
135 |
+
|
136 |
+
#tab_pdf .wp-editor-wrap {
|
137 |
+
margin: 0 12px 0 0;
|
138 |
+
}
|
139 |
+
|
140 |
+
.rtl #pdfextended-settings label, .rtl #tab_pdf label {
|
141 |
+
float: right;
|
142 |
+
margin-left: 5px;
|
143 |
+
}
|
144 |
+
|
145 |
+
/*
|
146 |
+
* License page
|
147 |
+
*/
|
148 |
+
#pdf-license .fa-exclamation-circle {
|
149 |
+
color: red;
|
150 |
+
}
|
151 |
+
|
152 |
+
#pdf-license .fa-check {
|
153 |
+
color: green;
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Tools Settings Page
|
158 |
+
*/
|
159 |
+
|
160 |
+
#pdfextended-settings table.gfpdf_table thead th {
|
161 |
+
font-weight: bold;
|
162 |
+
}
|
163 |
+
|
164 |
+
#pdfextended-settings table.gfpdf_table tr:nth-child(2n) td,
|
165 |
+
#pdfextended-settings table.gfpdf_table tr:nth-child(2n) th {
|
166 |
+
background: none repeat scroll 0 0 #fcfcfc;
|
167 |
+
}
|
168 |
+
|
169 |
+
#pdfextended-settings p.submit {
|
170 |
+
padding-bottom: 0;
|
171 |
+
margin-bottom: 0;
|
172 |
+
}
|
173 |
+
|
174 |
+
#pdfextended-settings span.path,
|
175 |
+
#pdfextended-settings span.details.path {
|
176 |
+
padding: 2px;
|
177 |
+
background: #f2f2f2;
|
178 |
+
}
|
179 |
+
|
180 |
+
#setup-templates-confirm ul {
|
181 |
+
margin-top: 5px;
|
182 |
+
}
|
183 |
+
#setup-templates-confirm li {
|
184 |
+
list-style-type: disc;
|
185 |
+
margin-left: 20px;
|
186 |
+
}
|
187 |
+
|
188 |
+
#manage-font-files div {
|
189 |
+
margin: 10px 0;
|
190 |
+
}
|
191 |
+
|
192 |
+
#manage-font-files div.updated {
|
193 |
+
margin-top: 0;
|
194 |
+
}
|
195 |
+
|
196 |
+
#manage-font-files li {
|
197 |
+
border: 1px solid #CCC;
|
198 |
+
position: relative;
|
199 |
+
}
|
200 |
+
|
201 |
+
#manage-font-files li .delete-font {
|
202 |
+
position: absolute;
|
203 |
+
top: 0;
|
204 |
+
right: 0;
|
205 |
+
padding: 5px 10px;
|
206 |
+
}
|
207 |
+
|
208 |
+
#manage-font-files li .delete-font:hover {
|
209 |
+
background: #dc0606;
|
210 |
+
color: #FFF;
|
211 |
+
}
|
212 |
+
|
213 |
+
#manage-font-files input.invalid {
|
214 |
+
border: 1px solid red;
|
215 |
+
}
|
216 |
+
|
217 |
+
#manage-font-files .font-submit {
|
218 |
+
text-align: center;
|
219 |
+
}
|
220 |
+
|
221 |
+
#manage-font-files #font-add-list {
|
222 |
+
border: none;
|
223 |
+
text-align: center;
|
224 |
+
color: #ccc;
|
225 |
+
cursor: pointer;
|
226 |
+
}
|
227 |
+
|
228 |
+
#manage-font-files #font-empty {
|
229 |
+
font-size: 14px;
|
230 |
+
font-style: italic;
|
231 |
+
line-height: 21px;
|
232 |
+
padding: 60px 0 15px;
|
233 |
+
text-align: center;
|
234 |
+
}
|
235 |
+
|
236 |
+
#manage-font-files #font-add-list:hover {
|
237 |
+
color: #555;
|
238 |
+
}
|
239 |
+
|
240 |
+
#manage-font-files #font-add-list span {
|
241 |
+
display: block;
|
242 |
+
text-transform: uppercase;
|
243 |
+
margin-top: -5px;
|
244 |
+
}
|
245 |
+
|
246 |
+
#manage-font-files li a {
|
247 |
+
display: block;
|
248 |
+
background: #EEE;
|
249 |
+
padding: 5px 7px;
|
250 |
+
text-decoration: none;
|
251 |
+
}
|
252 |
+
|
253 |
+
#manage-font-files li a.font-name .fa {
|
254 |
+
margin-right: 5px;
|
255 |
+
}
|
256 |
+
|
257 |
+
#manage-font-files li a:hover {
|
258 |
+
background: #e9e9e9;
|
259 |
+
}
|
260 |
+
|
261 |
+
#manage-font-files .font-settings {
|
262 |
+
padding: 5px 7px;
|
263 |
+
}
|
264 |
+
|
265 |
+
#manage-font-files .gf_settings_description {
|
266 |
+
font-size: 95%;
|
267 |
+
}
|
268 |
+
|
269 |
+
#manage-font-files .font-settings > label, #manage-font-files .font-selector > label {
|
270 |
+
float: left;
|
271 |
+
width: 9em;
|
272 |
+
}
|
273 |
+
|
274 |
+
#manage-font-files .regular-text {
|
275 |
+
width: 16em;
|
276 |
+
}
|
277 |
+
|
278 |
+
#manage-font-files .css-usage {
|
279 |
+
text-align: center;
|
280 |
+
}
|
281 |
+
|
282 |
+
#manage-font-files .css-usage input {
|
283 |
+
width: 100%;
|
284 |
+
text-align: center;
|
285 |
+
}
|
286 |
+
|
287 |
+
#manage-font-files .css-usage pre {
|
288 |
+
margin: 5px 0;
|
289 |
+
background: #EEE;
|
290 |
+
padding: 7.5px;
|
291 |
+
}
|
292 |
+
|
293 |
+
.rtl #font-list .css-usage input {
|
294 |
+
direction: ltr !important;
|
295 |
+
}
|
296 |
+
|
297 |
+
/**
|
298 |
+
* Help Settings Page
|
299 |
+
*/
|
300 |
+
#pdfextended-settings .metabox-holder h3 {
|
301 |
+
font-size: 14px;
|
302 |
+
}
|
303 |
+
|
304 |
+
#pdfextended-settings .postbox-container .postbox {
|
305 |
+
margin: 0 8px 20px 0;
|
306 |
+
}
|
307 |
+
|
308 |
+
#pdfextended-settings .postbox h3.hndle {
|
309 |
+
padding-bottom: 12px;
|
310 |
+
}
|
311 |
+
|
312 |
+
#pdfextended-settings .postbox .hndle, #pdfextended-settings .widget .widget-top {
|
313 |
+
cursor: default;
|
314 |
+
}
|
315 |
+
|
316 |
+
#pdfextended-settings .postbox .handlediv,
|
317 |
+
#pdfextended-settings #pdf_support_hours h3 {
|
318 |
+
display: none;
|
319 |
+
}
|
320 |
+
|
321 |
+
#pdfextended-settings .about-wrap, #pdfextended-settings .about-wrap .about-text {
|
322 |
+
max-width: none;
|
323 |
+
min-height: 0;
|
324 |
+
line-height: 1.8em;
|
325 |
+
}
|
326 |
+
|
327 |
+
#pdfextended-settings .about-wrap h1, #pdfextended-settings .about-wrap .about-text, #pdfextended-settings .about-wrap #search-knowledgebase {
|
328 |
+
text-align: center;
|
329 |
+
margin-right: 0;
|
330 |
+
}
|
331 |
+
|
332 |
+
#pdfextended-settings .postbox .inside {
|
333 |
+
margin-bottom: 0;
|
334 |
+
}
|
335 |
+
|
336 |
+
#pdfextended-settings .about-wrap h1 {
|
337 |
+
margin-top: 40px;
|
338 |
+
}
|
339 |
+
|
340 |
+
#pdfextended-settings .about-wrap #search-knowledgebase input {
|
341 |
+
font-family: 'FontAwesome', 'Open Sans', sans-serif;
|
342 |
+
font-size: 22px;
|
343 |
+
margin: 10px 0 0;
|
344 |
+
padding: 16px 20px;
|
345 |
+
line-height: 25px;
|
346 |
+
width: 100%;
|
347 |
+
}
|
348 |
+
|
349 |
+
#pdfextended-settings #search-results {
|
350 |
+
text-align: left;
|
351 |
+
margin: 0 auto;
|
352 |
+
width: 100%;
|
353 |
+
}
|
354 |
+
|
355 |
+
#pdfextended-settings #search-results .postbox, #search-results .postbox .inside {
|
356 |
+
display: none;
|
357 |
+
}
|
358 |
+
|
359 |
+
#pdfextended-settings #search-results .postbox h3 {
|
360 |
+
margin-bottom: 0;
|
361 |
+
}
|
362 |
+
|
363 |
+
#pdfextended-settings #search-results .postbox.is-active h3 {
|
364 |
+
margin-bottom: 8px;
|
365 |
+
}
|
366 |
+
|
367 |
+
#pdfextended-settings #dashboard_primary .rss-widget .rssSummary .continue-reading {
|
368 |
+
display: none;
|
369 |
+
}
|
370 |
+
|
371 |
+
#pdfextended-settings .spinner.is-active {
|
372 |
+
visibility: visible;
|
373 |
+
margin: 0;
|
374 |
+
}
|
375 |
+
|
376 |
+
#pdfextended-settings .rss-widget ul li {
|
377 |
+
padding: 6px 0;
|
378 |
+
margin: 0;
|
379 |
+
border-bottom: 1px dotted #CCC;
|
380 |
+
}
|
381 |
+
|
382 |
+
#pdfextended-settings .rss-widget ul li a {
|
383 |
+
font-size: 16px;
|
384 |
+
}
|
385 |
+
|
386 |
+
#pdfextended-settings .rss-widget ul li:first-child,
|
387 |
+
#pdfextended-settings .rss-widget ul li:last-child {
|
388 |
+
border-bottom: none;
|
389 |
+
}
|
390 |
+
|
391 |
+
#pdfextended-settings .about-wrap .about-text-disclaimer {
|
392 |
+
font-size: 13px;
|
393 |
+
}
|
394 |
+
|
395 |
+
#pdfextended-settings .about-wrap #dashboard-widgets.columns-2 .postbox-container {
|
396 |
+
width: 100%
|
397 |
+
}
|
398 |
+
|
399 |
+
#pdfextended-settings .about-wrap #dashboard-widgets .postbox-container a {
|
400 |
+
background: #f6f6f6 none repeat scroll 0 0;
|
401 |
+
border: 3px solid #eee;
|
402 |
+
border-radius: 10px;
|
403 |
+
color: inherit;
|
404 |
+
display: block;
|
405 |
+
padding: 15px;
|
406 |
+
font-size: 16px;
|
407 |
+
text-decoration: none;
|
408 |
+
margin-bottom: 30px;
|
409 |
+
transition: all 0.5s ease 0s;
|
410 |
+
}
|
411 |
+
|
412 |
+
#pdfextended-settings .about-wrap #dashboard-widgets .postbox-container a:hover {
|
413 |
+
border: 3px solid #076aa4;
|
414 |
+
}
|
415 |
+
|
416 |
+
#pdfextended-settings .about-wrap #dashboard-widgets .postbox-container a span {
|
417 |
+
font-weight: bold;
|
418 |
+
}
|
419 |
+
|
420 |
+
#pdfextended-settings .about-wrap .center {
|
421 |
+
text-align: center;
|
422 |
+
}
|
423 |
+
|
424 |
+
#pdfextended-settings .about-wrap .button.button-large {
|
425 |
+
height: 35px;
|
426 |
+
line-height: 33px;
|
427 |
+
padding: 0 17px 9px;
|
428 |
+
}
|
429 |
+
|
430 |
+
|
431 |
+
|
432 |
+
/**
|
433 |
+
* System status icons
|
434 |
+
*/
|
435 |
+
#pdf-system-status .fa-check-circle, #pdf-system-status .fa-exclamation-triangle, #pdf-system-status .fa-times-circle {
|
436 |
+
font-size: 17px;
|
437 |
+
margin-left: 5px;
|
438 |
+
vertical-align: bottom;
|
439 |
+
margin-top: -2px;
|
440 |
+
}
|
441 |
+
|
442 |
+
#pdf-system-status .fa-check-circle {
|
443 |
+
color: #008000;
|
444 |
+
}
|
445 |
+
|
446 |
+
#pdf-system-status .fa-exclamation-triangle {
|
447 |
+
color: #ff8a00;
|
448 |
+
}
|
449 |
+
|
450 |
+
#pdf-system-status .fa-times-circle {
|
451 |
+
color: #d10b0b;
|
452 |
+
}
|
453 |
+
|
454 |
+
|
455 |
+
/**
|
456 |
+
* License page
|
457 |
+
*/
|
458 |
+
|
459 |
+
#pdf-system-status #license input[type="email"], #pdf-system-status #license input[type="number"], #pdf-system-status #license input[type="password"], #pdf-system-status #license input[type="search"], #pdf-system-status #license input[type="tel"], #pdf-system-status #license input[type="text"], #pdf-system-status #license input[type="url"], #pdf-system-status #license select, #pdf-system-status #license textarea {
|
460 |
+
background-color: #FFFFFF;
|
461 |
+
border: 1px solid #DDDDDD;
|
462 |
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07) inset;
|
463 |
+
color: #333333;
|
464 |
+
width: 100%;
|
465 |
+
}
|
466 |
+
|
467 |
+
#pdf-system-status #license input[type="text"][readonly="readonly"] {
|
468 |
+
background: #EEE;
|
469 |
+
cursor: not-allowed;
|
470 |
+
}
|
471 |
+
|
472 |
+
#pdf-system-status #license label {
|
473 |
+
font-weight: bold;
|
474 |
+
line-height: 30px;
|
475 |
+
color: #222;
|
476 |
+
font-size: 14px;
|
477 |
+
float: left;
|
478 |
+
width: 20em;
|
479 |
+
}
|
480 |
+
|
481 |
+
#pdf-system-status #license .expires, #pdf-system-status #license .inactive, #pdf-system-status #license .limit, #pdf-system-status #license .expired, #pdf-system-status #license .deactivate {
|
482 |
+
font-style: italic;
|
483 |
+
}
|
484 |
+
|
485 |
+
#pdf-system-status #license .expired {
|
486 |
+
display: block;
|
487 |
+
color: #9e0b0f;
|
488 |
+
}
|
489 |
+
|
490 |
+
#pdf-system-status #license .gf_keystatus_invalid,
|
491 |
+
#pdf-system-status #license .gf_keystatus_valid {
|
492 |
+
font-size: 120%;
|
493 |
+
}
|
494 |
+
|
495 |
+
#pdf-system-status #license p {
|
496 |
+
clear: left;
|
497 |
+
float: left;
|
498 |
+
width: 100%;
|
499 |
+
}
|
500 |
+
|
501 |
+
#pdf-system-status #license span.container {
|
502 |
+
display: block;
|
503 |
+
}
|
504 |
+
|
505 |
+
|
506 |
+
/**
|
507 |
+
* PDF Form Settings List
|
508 |
+
*/
|
509 |
+
#gfpdf_list_form .check-column {
|
510 |
+
width: 50px;
|
511 |
+
}
|
512 |
+
|
513 |
+
#gfpdf_list_form .duplicate a:hover,
|
514 |
+
#gfpdf_list_form .delete a:hover {
|
515 |
+
cursor: pointer;
|
516 |
+
}
|
517 |
+
|
518 |
+
#gfpdf_list_form .gravitypdf_shortcode {
|
519 |
+
background: #EEE;
|
520 |
+
width: 100%;
|
521 |
+
padding: 5px;
|
522 |
+
outline: none;
|
523 |
+
}
|
524 |
+
|
525 |
+
#gfpdf_list_form .gravitypdf_shortcode:focus {
|
526 |
+
|
527 |
+
}
|
528 |
+
|
529 |
+
/**
|
530 |
+
* PDF Form Settings (individual)
|
531 |
+
*/
|
532 |
+
.gfpdf-hidden {
|
533 |
+
display: none;
|
534 |
+
}
|
535 |
+
|
536 |
+
.gfpdf_conditional_logic {
|
537 |
+
margin-top: 10px;
|
538 |
+
}
|
539 |
+
|
540 |
+
#pdf-form-settings .conditional_logic th {
|
541 |
+
padding-top: 15px;
|
542 |
+
}
|
543 |
+
|
544 |
+
#pdf-form-settings .conditional_logic td {
|
545 |
+
vertical-align: top;
|
546 |
+
}
|
547 |
+
|
548 |
+
#pdf-form-settings .gfpdf-spinner,
|
549 |
+
#pdfextended-settings .gfpdf-spinner,
|
550 |
+
.wp-dialog .gfpdf-spinner,
|
551 |
+
#gfpdf_list_form .gfpdf-spinner {
|
552 |
+
padding-left: 5px;
|
553 |
+
vertical-align: middle;
|
554 |
+
width: 20px;
|
555 |
+
}
|
556 |
+
|
557 |
+
#gfpdf_list_form .gfpdf-spinner-small {
|
558 |
+
width: 15px;
|
559 |
+
}
|
560 |
+
|
561 |
+
#gfpdf-template-example img {
|
562 |
+
width: 100%;
|
563 |
+
max-width: 300px;
|
564 |
+
border: 1px solid #CCC;
|
565 |
+
display: block;
|
566 |
+
margin-top: 5px;
|
567 |
+
}
|
568 |
+
|
569 |
+
#gfpdf-template-example p {
|
570 |
+
border: 1px solid #ccc;
|
571 |
+
display: inline-block;
|
572 |
+
max-width: 300px;
|
573 |
+
padding: 0 5px;
|
574 |
+
text-align: center;
|
575 |
+
width: 100%;
|
576 |
+
}
|
577 |
+
|
578 |
+
#gfpdf_pdf_form .gfpdf-toggle-wrapper {
|
579 |
+
padding-top: 25px;
|
580 |
+
}
|
581 |
+
|
582 |
+
#gfpdf_pdf_form .gfpdf-tab-container {
|
583 |
+
border-bottom: 1px solid #e6e6e6;
|
584 |
+
clear: both;
|
585 |
+
padding: 0 0 24px 0;
|
586 |
+
margin: 0 0 24px 0;
|
587 |
+
}
|
588 |
+
|
589 |
+
#gfpdf_pdf_form .nav-tab-wrapper {
|
590 |
+
margin-bottom: 20px;
|
591 |
+
}
|
592 |
+
|
593 |
+
.gfpdf-tab-wrapper.wp-filter {
|
594 |
+
margin: 0 0 15px;
|
595 |
+
}
|
596 |
+
|
597 |
+
.gfpdf-page .merge-tag-support {
|
598 |
+
max-width: none;
|
599 |
+
}
|
600 |
+
|
601 |
+
.gfpdf-page h4.section-title {
|
602 |
+
font-weight: bold;
|
603 |
+
margin-bottom: 0;
|
604 |
+
}
|
605 |
+
|
606 |
+
.gfpdf-page .form-table li {
|
607 |
+
list-style: inherit;
|
608 |
+
}
|
609 |
+
|
610 |
+
/**
|
611 |
+
* Entry List Page
|
612 |
+
*/
|
613 |
+
.gfpdf_form_action_has_submenu {
|
614 |
+
position: relative;
|
615 |
+
}
|
616 |
+
|
617 |
+
.gfpdf_submenu {
|
618 |
+
width: 200px;
|
619 |
+
}
|
620 |
+
|
621 |
+
.gfpdf_submenu li {
|
622 |
+
border-bottom: 1px solid #eee;
|
623 |
+
}
|
624 |
+
|
625 |
+
/**
|
626 |
+
* Gravity Forms Entry Details Page
|
627 |
+
*/
|
628 |
+
.gfpdf_detailed_pdf_container_pdf {
|
629 |
+
clear: left;
|
630 |
+
margin-bottom: 3px;
|
631 |
+
}
|
632 |
+
|
633 |
+
.gfpdf_detailed_pdf_container span {
|
634 |
+
display: block;
|
635 |
+
word-wrap: break-word;
|
636 |
+
padding: 2px 0 2px 2px;
|
637 |
+
}
|
638 |
+
|
639 |
+
/*
|
640 |
+
* Fancy Template Selector
|
641 |
+
*/
|
642 |
+
#gfpdf-template-container .theme .theme-actions {
|
643 |
+
opacity: 1;
|
644 |
+
left: inherit;
|
645 |
+
border-top: none;
|
646 |
+
-moz-box-sizing: content-box;
|
647 |
+
-webkit-box-sizing: content-box;
|
648 |
+
box-sizing: content-box;
|
649 |
+
}
|
650 |
+
|
651 |
+
#gfpdf-template-container .wp-filter-search {
|
652 |
+
margin: 0 0 5px;
|
653 |
+
font-size: 16px;
|
654 |
+
font-weight: 300;
|
655 |
+
line-height: 1.5;
|
656 |
+
|
657 |
+
width: 100%;
|
658 |
+
}
|
659 |
+
|
660 |
+
#gfpdf-template-container .theme .theme-author {
|
661 |
+
display: block;
|
662 |
+
}
|
663 |
+
|
664 |
+
#gfpdf-overlay h1 {
|
665 |
+
float: left;
|
666 |
+
padding-left: 2%;
|
667 |
+
}
|
668 |
+
|
669 |
+
#gfpdf-overlay p.no-themes {
|
670 |
+
display: block;
|
671 |
+
font-size: 18px;
|
672 |
+
}
|
673 |
+
|
674 |
+
#fancy-template-selector {
|
675 |
+
margin-left: 5px;
|
676 |
+
vertical-align: middle;
|
677 |
+
}
|
678 |
+
|
679 |
+
#gpdf-advance-template-selector button {
|
680 |
+
vertical-align: middle;
|
681 |
+
margin-left: 5px;
|
682 |
+
}
|
683 |
+
|
684 |
+
#gfpdf-template-container .theme.add-new-theme a.doing-ajax span:after,
|
685 |
+
#gfpdf-template-container .theme.add-new-theme a.doing-ajax:hover span:after{
|
686 |
+
font-family: 'FontAwesome', 'Open Sans', sans-serif;
|
687 |
+
content: '\f1ce';
|
688 |
+
font-size: 79px;
|
689 |
+
background: none;
|
690 |
+
width: auto;
|
691 |
+
height: auto;
|
692 |
+
left: 51.5%;
|
693 |
+
text-indent: 0;
|
694 |
+
-webkit-animation: fa-spin 1.5s infinite linear;
|
695 |
+
animation: fa-spin 1.5s infinite linear;
|
696 |
+
}
|
697 |
+
|
698 |
+
/*
|
699 |
+
* Dropzone
|
700 |
+
*/
|
701 |
+
.theme-browser .theme.add-new-theme.gfpdf-dropzone-active a {
|
702 |
+
background: rgb(0, 115, 170);
|
703 |
+
}
|
704 |
+
.theme-browser .theme.add-new-theme.gfpdf-dropzone-active a:after {
|
705 |
+
border-color: transparent;
|
706 |
+
}
|
707 |
+
|
708 |
+
.theme-browser .theme.add-new-theme.gfpdf-dropzone-active a span:after {
|
709 |
+
background: #FFF;
|
710 |
+
color: rgb(0, 115, 170);
|
711 |
+
}
|
712 |
+
|
713 |
+
#gfpdf-template-container .theme.add-new-theme a.doing-ajax:hover span:after,
|
714 |
+
#gfpdf-template-container .theme.add-new-theme a.doing-ajax:focus span:after,
|
715 |
+
#gfpdf-template-container .theme.add-new-theme.gfpdf-dropzone-active a.doing-ajax span:after {
|
716 |
+
color: #FFF;
|
717 |
+
background: none;
|
718 |
+
}
|
719 |
+
|
720 |
+
.theme-browser .theme.add-new-theme.gfpdf-dropzone-active .theme-name {
|
721 |
+
color: #FFF;
|
722 |
+
}
|
723 |
+
|
724 |
+
.gfpdf-dropzone-reject {
|
725 |
+
background: red;
|
726 |
+
}
|
727 |
+
|
728 |
+
.gfpdf-template-install-instructions {
|
729 |
+
font-size: 85%;
|
730 |
+
text-align: center;
|
731 |
+
margin-top: 5px;
|
732 |
+
}
|
733 |
+
|
734 |
+
/*
|
735 |
+
* Custom Template Field Style
|
736 |
+
*/
|
737 |
+
.image-radio-buttons input {
|
738 |
+
display: none;
|
739 |
+
}
|
740 |
+
|
741 |
+
.image-radio-buttons img {
|
742 |
+
padding: 6px;
|
743 |
+
}
|
744 |
+
|
745 |
+
.image-radio-buttons input:checked + img {
|
746 |
+
background: #2abbff;
|
747 |
+
}
|
748 |
+
|
749 |
+
|
750 |
+
@media only screen and (min-width: 500px) {
|
751 |
+
|
752 |
+
/**
|
753 |
+
* Responsive Welcome Page
|
754 |
+
*/
|
755 |
+
.about-wrap .gfpdf-badge {
|
756 |
+
position: absolute;
|
757 |
+
right: 0;
|
758 |
+
top: 0;
|
759 |
+
margin: 0;
|
760 |
+
width: 130px;
|
761 |
+
}
|
762 |
+
|
763 |
+
.rtl .about-wrap .gfpdf-badge {
|
764 |
+
left: 0;
|
765 |
+
right: auto;
|
766 |
+
}
|
767 |
+
}
|
768 |
+
|
769 |
+
@media only screen and (max-width: 780px) {
|
770 |
+
#pdfextended-settings table.gfpdf_table th, #pdfextended-settings table.gfpdf_table td {
|
771 |
+
display: block;
|
772 |
+
vertical-align: middle;
|
773 |
+
width: auto;
|
774 |
+
}
|
775 |
+
|
776 |
+
/* Chosen Styles */
|
777 |
+
.gfpdf-page .chosen-container {
|
778 |
+
font-size: 17px;
|
779 |
+
}
|
780 |
+
|
781 |
+
.gfpdf-page .chosen-container-single .chosen-single {
|
782 |
+
height: 38px;
|
783 |
+
line-height: 34px;
|
784 |
+
}
|
785 |
+
|
786 |
+
.gfpdf-page .chosen-container-single .chosen-single div {
|
787 |
+
top: 7px;
|
788 |
+
}
|
789 |
+
|
790 |
+
.gfpdf-page .chosen-container .chosen-results li {
|
791 |
+
line-height: 24px;
|
792 |
+
}
|
793 |
+
|
794 |
+
.gfpdf-page .chosen-container-multi .chosen-choices li.search-choice {
|
795 |
+
line-height: 24px;
|
796 |
+
}
|
797 |
+
|
798 |
+
.gfpdf-page .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
|
799 |
+
top: 10px;
|
800 |
+
}
|
801 |
+
|
802 |
+
.gfpdf-page .chosen-container-multi .chosen-choices li.search-field input[type="text"] {
|
803 |
+
height: 38px;
|
804 |
+
}
|
805 |
+
|
806 |
+
/* Input Styles */
|
807 |
+
.gfpdf-page .form-table tbody td input[type="number"] {
|
808 |
+
font-size: 16px;
|
809 |
+
line-height: 1.5;
|
810 |
+
padding: 7px 10px;
|
811 |
+
}
|
812 |
+
|
813 |
+
.gfpdf-page .form-table tbody td label {
|
814 |
+
display: block;
|
815 |
+
font-size: 16px;
|
816 |
+
}
|
817 |
+
|
818 |
+
.gfpdf-page .form-table tbody td label:first-of-type {
|
819 |
+
margin-top: 10px;
|
820 |
+
}
|
821 |
+
|
822 |
+
.gfpdf-page .form-table th,
|
823 |
+
.gfpdf-page .form-table td,
|
824 |
+
.gfpdf-page .gfpdf_table th,
|
825 |
+
.gfpdf-page .gfpdf_table td,
|
826 |
+
.gf_delete_notice,
|
827 |
+
#manage-font-files {
|
828 |
+
font-size: 16px;
|
829 |
+
}
|
830 |
+
|
831 |
+
.gf_delete_notice,
|
832 |
+
#manage-font-files {
|
833 |
+
line-height: 21px;
|
834 |
+
}
|
835 |
+
|
836 |
+
.gfpdf-page .form-table tbody .conditional_logic td label {
|
837 |
+
display: inline;
|
838 |
+
}
|
839 |
+
|
840 |
+
.gfpdf-page .form-table tbody td input[type="number"] {
|
841 |
+
padding-right: 3px;
|
842 |
+
}
|
843 |
+
}
|
844 |
+
|
845 |
+
@media only screen and (min-width: 782px) {
|
846 |
+
|
847 |
+
/**
|
848 |
+
* Add out mascot on larger displays only
|
849 |
+
*/
|
850 |
+
.gfpdf-mascot-sitting {
|
851 |
+
background: url("../../../src/assets/images/cap-paws-sitting.png") no-repeat 0 0;
|
852 |
+
width: 181px;
|
853 |
+
height: 193px;
|
854 |
+
display: inline-block;
|
855 |
+
float: right;
|
856 |
+
margin-top: -149px;
|
857 |
+
position: relative;
|
858 |
+
z-index: 100;
|
859 |
+
}
|
860 |
+
|
861 |
+
.rtl .gfpdf-mascot-sitting {
|
862 |
+
float: left;
|
863 |
+
}
|
864 |
+
|
865 |
+
#gfpdf-mascot-container {
|
866 |
+
padding-bottom: 120px !important;
|
867 |
+
}
|
868 |
+
|
869 |
+
#pdfextended-settings table.gfpdf_table tbody th {
|
870 |
+
width: 200px;
|
871 |
+
}
|
872 |
+
|
873 |
+
#manage-font-files .gf_settings_description {
|
874 |
+
margin: 0 0 6px 9.5em;
|
875 |
+
}
|
876 |
+
|
877 |
+
#pdfextended-settings .about-wrap #dashboard-widgets.columns-2 .postbox-container {
|
878 |
+
width: 49.5%;
|
879 |
+
}
|
880 |
+
|
881 |
+
#pdfextended-settings .about-wrap #dashboard-widgets .postbox-container a {
|
882 |
+
margin-right: 30px;
|
883 |
+
min-height: 245px;
|
884 |
+
}
|
885 |
+
|
886 |
+
#pdfextended-settings #pdf-system-status th {
|
887 |
+
padding-top: 12px;
|
888 |
+
padding-bottom: 12px;
|
889 |
+
}
|
890 |
+
|
891 |
+
#pdfextended-settings #pdf-system-status td {
|
892 |
+
padding-top: 10px;
|
893 |
+
padding-bottom: 10px;
|
894 |
+
}
|
895 |
+
|
896 |
+
/* Chosen Styles */
|
897 |
+
.gfpdf-page .chosen-container {
|
898 |
+
max-width: 300px;
|
899 |
+
}
|
900 |
+
|
901 |
+
/* Conditional Logic */
|
902 |
+
#gfpdf_conditional_logic_container .gf_conditional_logic_rules_container :first-child {
|
903 |
+
max-width: 250px;
|
904 |
+
width: 100%;
|
905 |
+
}
|
906 |
+
}
|
907 |
+
|
908 |
+
@media only screen and (min-width: 900px) {
|
909 |
+
|
910 |
+
/**
|
911 |
+
* Help and Support
|
912 |
+
*/
|
913 |
+
#pdfextended-settings .help-container .postbox {
|
914 |
+
width: 32.66%;
|
915 |
+
float: left;
|
916 |
+
margin-left: 0.5%;
|
917 |
+
margin-right: 0.5%;
|
918 |
+
min-width: 0;
|
919 |
+
}
|
920 |
+
|
921 |
+
#pdfextended-settings .help-container .postbox:first-child {
|
922 |
+
margin-left: 0;
|
923 |
+
}
|
924 |
+
|
925 |
+
#pdfextended-settings .help-container .postbox:last-child {
|
926 |
+
margin-right: 0;
|
927 |
+
}
|
928 |
+
}
|
929 |
+
|
930 |
+
|
931 |
+
|
932 |
+
/* Add media queries */
|
933 |
+
@media only screen and (min-width: 1000px) {
|
934 |
+
|
935 |
+
/**
|
936 |
+
* License page
|
937 |
+
*/
|
938 |
+
#pdf-system-status #license label {
|
939 |
+
float: left;
|
940 |
+
width: 20%;
|
941 |
+
}
|
942 |
+
|
943 |
+
#pdf-system-status #license span.container {
|
944 |
+
float: left;
|
945 |
+
width: 80%;
|
946 |
+
}
|
947 |
+
|
948 |
+
#pdfextended-settings .about-wrap #dashboard-widgets .postbox-container a {
|
949 |
+
min-height: 180px;
|
950 |
+
}
|
951 |
+
}
|
952 |
+
|
953 |
+
@media only screen and (max-width: 1120px) {
|
954 |
+
#gfpdf-template-container .theme:nth-child(odd) {
|
955 |
+
margin-right: 2%;
|
956 |
+
}
|
957 |
+
}
|
958 |
+
|
959 |
+
|
960 |
+
@media only screen and (min-width: 1400px) {
|
961 |
+
/**
|
962 |
+
* Help and Support
|
963 |
+
*/
|
964 |
+
|
965 |
+
#pdfextended-settings .about-wrap #search-knowledgebase input,
|
966 |
+
#pdfextended-settings #search-results, #pdfextended-settings .help-container{
|
967 |
+
width: 75%;
|
968 |
+
}
|
969 |
+
|
970 |
+
#pdfextended-settings .about-wrap #dashboard-widgets .postbox-container a {
|
971 |
+
min-height: 90px;
|
972 |
+
}
|
973 |
+
}
|
974 |
+
|
975 |
+
@media only screen and (min-width: 1640px) {
|
976 |
+
#gfpdf-template-container .theme {
|
977 |
+
margin: 0 2% 2% 0;
|
978 |
+
}
|
979 |
+
|
980 |
+
#gfpdf-template-container .wp-filter-search {
|
981 |
+
width: 22.7%;
|
982 |
+
}
|
983 |
+
}
|
src/assets/images/cap-paws-sitting.png
ADDED
Binary file
|
src/assets/images/gravitypdf-globe-black.png
ADDED
Binary file
|
src/assets/images/gravitypdf-globe-white.png
ADDED
Binary file
|
src/assets/images/paws-with-logo-small.png
ADDED
Binary file
|
src/assets/images/updating-advanced-template-selector.png
ADDED
Binary file
|
src/assets/images/updating-four-columns.png
ADDED
Binary file
|
src/assets/images/updating-merge-tags.png
ADDED
Binary file
|
src/assets/images/welcome-download-shortcode.png
ADDED
Binary file
|
src/assets/images/welcome-individual-pdf-settings.png
ADDED
Binary file
|
src/assets/images/welcome-manage-fonts.png
ADDED
Binary file
|
src/assets/images/welcome-notification-conditional.png
ADDED
Binary file
|
src/assets/images/welcome-pdf-settings-page.png
ADDED
Binary file
|
src/assets/js/gfpdf-backbone.js
ADDED
@@ -0,0 +1,1113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Gravity PDF Settings JS Logic
|
3 |
+
* Dependancies: backbone, underscore, jquery
|
4 |
+
* @since 4.0
|
5 |
+
*/
|
6 |
+
|
7 |
+
(function($) {
|
8 |
+
|
9 |
+
$(function() {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* To prevent problems with PHP's ASP Short tags (removed in PHP 7) we'll change Underscore's delimiters to be Handlebars-ish:
|
13 |
+
* {{= }}, {{- }} or {{ }}
|
14 |
+
*
|
15 |
+
* @see https://github.com/GravityPDF/gravity-pdf/issues/417
|
16 |
+
* @type {{interpolate: RegExp, evaluate: RegExp, escape: RegExp}}
|
17 |
+
* @since 4.0.1
|
18 |
+
*/
|
19 |
+
var UnderscoreSettingsOverride = {
|
20 |
+
evaluate: /\{\{(.+?)\}\}/gim,
|
21 |
+
interpolate: /\{\{=(.+?)\}\}/gim,
|
22 |
+
escape: /\{\{-(.+?)\}\}/gim
|
23 |
+
};
|
24 |
+
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Handles our Font CRUD Feature
|
28 |
+
* Allows URLs to TTF font files to be passed
|
29 |
+
* to a specific custom font 'group' defined by the user.
|
30 |
+
*
|
31 |
+
* Backbone model's save and destroy methods have been overridden
|
32 |
+
* to work with WordPress' ajax-admin.php file endpoint.
|
33 |
+
*
|
34 |
+
* @since 4.0
|
35 |
+
*/
|
36 |
+
var Fonts = {
|
37 |
+
Model: {},
|
38 |
+
Collection: {},
|
39 |
+
View: {},
|
40 |
+
Misc: {},
|
41 |
+
};
|
42 |
+
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Our Font Backbone Model which handles validation, saving and deleting
|
46 |
+
* @since 4.0
|
47 |
+
*/
|
48 |
+
Fonts.Model.Core = Backbone.Model.extend({
|
49 |
+
/**
|
50 |
+
* Set our default model parameters
|
51 |
+
* Existing models pulled from the database also have an ID parameter
|
52 |
+
* @type {Object}
|
53 |
+
* @since 4.0
|
54 |
+
*/
|
55 |
+
defaults: {
|
56 |
+
font_name: '',
|
57 |
+
regular: '',
|
58 |
+
bold: '',
|
59 |
+
italics: '',
|
60 |
+
bolditalics: '',
|
61 |
+
disabled: false,
|
62 |
+
},
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Set our custom endpoint to be used to sync the model
|
66 |
+
* @type String
|
67 |
+
* @since 4.0
|
68 |
+
*/
|
69 |
+
url: GFPDF.ajaxUrl,
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Route save through ajax-admin.php which doesn't support standard
|
73 |
+
* REST API features. Emulate POST and JSON data structures.
|
74 |
+
* @param Object options
|
75 |
+
* @param Object additional configuration options
|
76 |
+
* @return Object
|
77 |
+
* @since 4.0
|
78 |
+
*/
|
79 |
+
save: function(options, config) {
|
80 |
+
|
81 |
+
var params = {
|
82 |
+
emulateHTTP: true,
|
83 |
+
emulateJSON: true,
|
84 |
+
data: {
|
85 |
+
action: 'gfpdf_font_save',
|
86 |
+
nonce: options.nonce,
|
87 |
+
payload : this.toJSON()
|
88 |
+
}
|
89 |
+
};
|
90 |
+
|
91 |
+
/* Merge out two objects together */
|
92 |
+
$.extend(params, config);
|
93 |
+
|
94 |
+
return Backbone.sync( 'update', this, params );
|
95 |
+
},
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Route delete through ajax-admin.php which doesn't support standard
|
99 |
+
* REST API features. Emulate POST and JSON data structures.
|
100 |
+
* @param Object options
|
101 |
+
* @param Object additional configuration options
|
102 |
+
* @return Object
|
103 |
+
* @since 4.0
|
104 |
+
*/
|
105 |
+
destroy: function(options, config) {
|
106 |
+
|
107 |
+
var params = {
|
108 |
+
emulateHTTP: true,
|
109 |
+
emulateJSON: true,
|
110 |
+
data: {
|
111 |
+
action: 'gfpdf_font_delete',
|
112 |
+
nonce: options.nonce,
|
113 |
+
id : this.get('id'),
|
114 |
+
}
|
115 |
+
};
|
116 |
+
|
117 |
+
/* Merge out two objects together */
|
118 |
+
$.extend(params, config);
|
119 |
+
|
120 |
+
return Backbone.sync( 'update', this, params );
|
121 |
+
},
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Create custom validation method which will prevent a model being updated
|
125 |
+
* when using .save() or .set() if the validation fails.
|
126 |
+
*
|
127 |
+
* Multiple custom events are also triggered to allow our view to update the DOM as needed
|
128 |
+
* @param Object attrs The new model data
|
129 |
+
* @param Object options
|
130 |
+
* @return String On error, a string is returned
|
131 |
+
* @since 4.0
|
132 |
+
*/
|
133 |
+
validate: function(attrs, options) {
|
134 |
+
|
135 |
+
/* Do name validation */
|
136 |
+
var regex = new RegExp('^[A-Za-z0-9 ]+$');
|
137 |
+
|
138 |
+
if( attrs.font_name.length > 0) {
|
139 |
+
if(! regex.test(attrs.font_name) ) {
|
140 |
+
|
141 |
+
/* If not successful trigger error */
|
142 |
+
return 'invalid_characters';
|
143 |
+
} else {
|
144 |
+
|
145 |
+
/* trigger successful event to disable the view error */
|
146 |
+
this.trigger('valid_name');
|
147 |
+
}
|
148 |
+
}
|
149 |
+
|
150 |
+
/**
|
151 |
+
* Validate the selected fonts
|
152 |
+
*/
|
153 |
+
if(this.validateFonts(attrs) === false) {
|
154 |
+
return 'invalid_font';
|
155 |
+
}
|
156 |
+
|
157 |
+
this.trigger('validation_passed', this);
|
158 |
+
},
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Check if font value (regular, bold, italics, bolditalics)
|
162 |
+
* has a value at all, and if so whether it has a .ttf extension.
|
163 |
+
*
|
164 |
+
* Multiple custom events are also triggered to allow our view to update a particular
|
165 |
+
* DOM element based on the validation success or failure.
|
166 |
+
*
|
167 |
+
* @param Object attrs The new model data
|
168 |
+
* @return Boolean Whether the group validation passed or failed
|
169 |
+
* @since 4.0
|
170 |
+
*/
|
171 |
+
validateFonts: function(attrs) {
|
172 |
+
|
173 |
+
/* set validation to true and any that fail will mark as false */
|
174 |
+
var validation = true;
|
175 |
+
|
176 |
+
/* set up an object with our key-value pairs refering to the input data */
|
177 |
+
var fonts = {
|
178 |
+
regular: attrs.regular,
|
179 |
+
bold: attrs.bold,
|
180 |
+
italics: attrs.italics,
|
181 |
+
bolditalics: attrs.bolditalics,
|
182 |
+
};
|
183 |
+
|
184 |
+
/* Loop through the object and use jQuery's proxy to correct the 'this' scope */
|
185 |
+
$.each( fonts, $.proxy(function( index, font ) {
|
186 |
+
|
187 |
+
/* if there is value for the font we'll validate it */
|
188 |
+
if(font.length > 0 && this.isValidFile(font) === false) {
|
189 |
+
|
190 |
+
/* mark our global validation as false */
|
191 |
+
validation = false;
|
192 |
+
this.trigger('invalid_font', this, true, index); /* tell our view the font is invalid */
|
193 |
+
} else {
|
194 |
+
this.trigger('valid_font', this, false, index); /* tell our view the font is valid */
|
195 |
+
}
|
196 |
+
|
197 |
+
}, this));
|
198 |
+
|
199 |
+
return validation;
|
200 |
+
},
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Does our actual font validation
|
204 |
+
* Checks if the string length is large enough to be considered valid,
|
205 |
+
* and then checks if it has a file extension of .ttf
|
206 |
+
* @param String font The font string to check
|
207 |
+
* @return Boolean True on success, false on failure
|
208 |
+
* @since 4.0
|
209 |
+
*/
|
210 |
+
isValidFile: function(font) {
|
211 |
+
|
212 |
+
/* Check if the value could contain enough characters to be valid */
|
213 |
+
if(font.length < 5) {
|
214 |
+
return false;
|
215 |
+
}
|
216 |
+
|
217 |
+
/* Get the last 4 characters and convert to lower case */
|
218 |
+
var extension = font.substr(font.length - 4).toLowerCase();
|
219 |
+
|
220 |
+
/* Check if they match a TTF font file */
|
221 |
+
if(extension === '.ttf') {
|
222 |
+
|
223 |
+
/* Check if we have a valid URL */
|
224 |
+
var regex = new RegExp(/^[a-z](?:[-a-z0-9\+\.])*:(?:\/\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD])*@)?(?:\[(?:(?:(?:[0-9a-f]{1,4}:){6}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|::(?:[0-9a-f]{1,4}:){5}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:[0-9a-f]{1,4}:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|v[0-9a-f]+[-a-z0-9\._~!\$&'\(\)\*\+,;=:]+)\]|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}|(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD])*)(?::[0-9]*)?(?:\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD]))*)*|\/(?:(?:(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD]))+)(?:\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD]))*)*)?|(?:(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD]))+)(?:\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD]))*)*|(?!(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD])))(?:\?(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\/\?\xA0-\uD7FF\uE000-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E\uDB80-\uDBBE\uDBC0-\uDBFE][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDC00-\uDFFD])*)?(?:\#(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\/\?\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD])*)?$/igm);
|
225 |
+
|
226 |
+
if(regex.test(font) ) {
|
227 |
+
return true;
|
228 |
+
}
|
229 |
+
}
|
230 |
+
|
231 |
+
return false;
|
232 |
+
},
|
233 |
+
|
234 |
+
/**
|
235 |
+
* Our ModelBinder CSS Declaration Converter
|
236 |
+
* @param String direction Either ModelToView or ViewToModel
|
237 |
+
* @param String value The value to convert
|
238 |
+
* @param String target The DOM target name
|
239 |
+
* @param Object model The Model
|
240 |
+
* @return String
|
241 |
+
* @since 4.0
|
242 |
+
*/
|
243 |
+
cssDeclaration: function(direction, value, target, model) {
|
244 |
+
var shortname = model.getShortname(value);
|
245 |
+
return 'font-family: "' + value + '", ' + shortname + ', sans-serif;';
|
246 |
+
},
|
247 |
+
|
248 |
+
/**
|
249 |
+
* Converts a standard name to the format used in mPDF
|
250 |
+
* @param String name The name to convert
|
251 |
+
* @return String
|
252 |
+
* @since 4.0
|
253 |
+
*/
|
254 |
+
getShortname: function(name) {
|
255 |
+
name = name.toLowerCase();
|
256 |
+
name = name.replace(' ', '');
|
257 |
+
|
258 |
+
return name;
|
259 |
+
}
|
260 |
+
});
|
261 |
+
|
262 |
+
|
263 |
+
/**
|
264 |
+
* Creates a Backbone collection with our model attached
|
265 |
+
* @type Object
|
266 |
+
* @since 4.0
|
267 |
+
*/
|
268 |
+
Fonts.Collection.Core = Backbone.Collection.extend({
|
269 |
+
model: Fonts.Model.Core
|
270 |
+
});
|
271 |
+
|
272 |
+
|
273 |
+
/**
|
274 |
+
* Our top-level view for rendering our font list.
|
275 |
+
* This view is responsible for looping through the Backbone collection,
|
276 |
+
* creating a new Fonts.View.Item object and appending it to our container
|
277 |
+
*
|
278 |
+
* We also have a listenTo() event which triggers the rendering process when a new
|
279 |
+
* model is added to our collection.
|
280 |
+
*
|
281 |
+
* @since 4.0
|
282 |
+
*/
|
283 |
+
Fonts.View.Container = Backbone.View.extend({
|
284 |
+
|
285 |
+
/**
|
286 |
+
* Our View Target Element
|
287 |
+
* @type String
|
288 |
+
* @since 4.0
|
289 |
+
*/
|
290 |
+
el: '#font-list',
|
291 |
+
|
292 |
+
/**
|
293 |
+
* Our View wrapper tag
|
294 |
+
* @type String
|
295 |
+
* @since 4.0
|
296 |
+
*/
|
297 |
+
tagName: 'ul',
|
298 |
+
|
299 |
+
/**
|
300 |
+
* Automatically render our view upon initialization and add
|
301 |
+
* an event listener so new Font.View.Item objects can be automatically
|
302 |
+
* appended to our container (without re-rendering all the objects)
|
303 |
+
*
|
304 |
+
* @param Object options Any passed in parameters when the object is created
|
305 |
+
* @since 4.0
|
306 |
+
*/
|
307 |
+
initialize: function(options) {
|
308 |
+
|
309 |
+
this.listenTo(this.collection, 'add', this.addRender);
|
310 |
+
this.listenTo(this.collection, 'remove', this.render);
|
311 |
+
this.render();
|
312 |
+
},
|
313 |
+
|
314 |
+
/**
|
315 |
+
* Handles the DOM display process
|
316 |
+
* @return Object Returns reference to itself (for chaining purposes)
|
317 |
+
* @since 4.0
|
318 |
+
*/
|
319 |
+
render: function() {
|
320 |
+
|
321 |
+
/* Check if our collection has any models */
|
322 |
+
if(this.collection.length > 0) {
|
323 |
+
|
324 |
+
/* Empty our element */
|
325 |
+
this.$el.empty();
|
326 |
+
|
327 |
+
/* Loop through our collection and render to our container */
|
328 |
+
this.collection.each(function(font) {
|
329 |
+
this.addRender(font);
|
330 |
+
}, this);
|
331 |
+
} else {
|
332 |
+
/* Display getting started message to user */
|
333 |
+
this.$el.html(_.template($( '#GravityPDFFontsEmpty' ).html(), null, UnderscoreSettingsOverride));
|
334 |
+
}
|
335 |
+
|
336 |
+
/* Return for chaining purposes */
|
337 |
+
return this;
|
338 |
+
},
|
339 |
+
|
340 |
+
/**
|
341 |
+
* Creates our individual Item View and append to the container
|
342 |
+
* @param Object font The individual collection model
|
343 |
+
* @since 4.0
|
344 |
+
*/
|
345 |
+
addRender: function(font) {
|
346 |
+
|
347 |
+
/* Empty our container if no models exist (as we display a welcome message if list is empty) */
|
348 |
+
if(this.collection.length === 1) {
|
349 |
+
this.$el.empty();
|
350 |
+
}
|
351 |
+
|
352 |
+
/* Create an individual font view */
|
353 |
+
var item = new Fonts.View.Item({
|
354 |
+
model: font,
|
355 |
+
collection: this.collection
|
356 |
+
});
|
357 |
+
|
358 |
+
/* Append it to our container */
|
359 |
+
this.$el.append(item.render().el);
|
360 |
+
|
361 |
+
/* Return for chaining purposes */
|
362 |
+
return this;
|
363 |
+
}
|
364 |
+
});
|
365 |
+
|
366 |
+
|
367 |
+
|
368 |
+
/**
|
369 |
+
* Handles the individual display of our font model
|
370 |
+
*
|
371 |
+
* Multiple DOM events are used to process form interactions, such as toggling the interface, deleting a model and savings.
|
372 |
+
* Multiple custom event listeners are used to display validation errors in our form.
|
373 |
+
*
|
374 |
+
* The Backbone.ModelBinder() object is used to add two-way data binding between our model and view
|
375 |
+
*
|
376 |
+
* @since 4.0
|
377 |
+
*/
|
378 |
+
Fonts.View.Item = Backbone.View.extend({
|
379 |
+
|
380 |
+
/**
|
381 |
+
* The ID of our Underscore HTML template
|
382 |
+
* This can be found in /src/view/html/Settings/tools.php
|
383 |
+
* @type String
|
384 |
+
* @since 4.0
|
385 |
+
*/
|
386 |
+
template: '#GravityPDFFonts',
|
387 |
+
|
388 |
+
/**
|
389 |
+
* Our View wrapper tag
|
390 |
+
* @type String
|
391 |
+
* @since 4.0
|
392 |
+
*/
|
393 |
+
tagName: 'li',
|
394 |
+
|
395 |
+
/**
|
396 |
+
* Our DOM Events
|
397 |
+
* @type Object
|
398 |
+
* @since 4.0
|
399 |
+
*/
|
400 |
+
events: {
|
401 |
+
|
402 |
+
/* Click event for toggling our form interface for editing */
|
403 |
+
'click .font-name' : 'toggleView',
|
404 |
+
|
405 |
+
/* Click event to delete a model */
|
406 |
+
'click .delete-font': 'deleteModel',
|
407 |
+
|
408 |
+
/* Submit event for saving a model */
|
409 |
+
'submit form': 'formSubmission',
|
410 |
+
},
|
411 |
+
|
412 |
+
/**
|
413 |
+
* Initialize our model-view data binder object and set up
|
414 |
+
* our event listeners for displaying visual validation queues to the user
|
415 |
+
* @since 4.0
|
416 |
+
*/
|
417 |
+
initialize: function() {
|
418 |
+
|
419 |
+
/* Intialize our two-way data binder */
|
420 |
+
this.modelBinder = new Backbone.ModelBinder();
|
421 |
+
|
422 |
+
/* Show Name Validation Errors */
|
423 |
+
this.listenTo(this.model, 'invalid valid_name', this.nameError);
|
424 |
+
|
425 |
+
/* Show Font Group Validation Errors */
|
426 |
+
this.listenTo(this.model, 'invalid_font valid_font', this.fontError);
|
427 |
+
|
428 |
+
/* Enable / Disable the Submit button based on validation errors */
|
429 |
+
this.listenTo(this.model, 'invalid', this.disableSubmitButton);
|
430 |
+
this.listenTo(this.model, 'validation_passed', this.enableSubmitButton);
|
431 |
+
},
|
432 |
+
|
433 |
+
/**
|
434 |
+
* Render the individual view based on an Underscore template
|
435 |
+
* @return Object Return 'this' for chaining
|
436 |
+
* @since 4.0
|
437 |
+
*/
|
438 |
+
render: function() {
|
439 |
+
|
440 |
+
/* Set up our Underscore template file */
|
441 |
+
this.template = _.template($( this.template ).html(), null, UnderscoreSettingsOverride);
|
442 |
+
|
443 |
+
/* Set View Element HTML to our Underscore template, passing in our model */
|
444 |
+
this.$el.html(this.template({
|
445 |
+
model: this.model,
|
446 |
+
}));
|
447 |
+
|
448 |
+
/**
|
449 |
+
* Enable two-way data binding between our model and view
|
450 |
+
*
|
451 |
+
* By default updates are only triggered on change events but our name field
|
452 |
+
* should also trigger on keyUp.
|
453 |
+
*
|
454 |
+
* We also want to run our validation routine on the this.model.set() command (by default this is disabled)
|
455 |
+
* so the user isn't confused with the live-update display of the Font Name field.
|
456 |
+
*/
|
457 |
+
this.modelBinder.bind(this.model, this.el, {
|
458 |
+
font_name: [ { selector: '[name=font_name]' } , {selector: '[name=usage]', converter: this.model.cssDeclaration } ],
|
459 |
+
regular: '[name=regular]',
|
460 |
+
bold: '[name=bold]',
|
461 |
+
italics: '[name=italics]',
|
462 |
+
bolditalics: '[name=bolditalics]',
|
463 |
+
},
|
464 |
+
|
465 |
+
{
|
466 |
+
|
467 |
+
changeTriggers: {
|
468 |
+
'': 'change',
|
469 |
+
'.font-name-field': 'keyup'
|
470 |
+
},
|
471 |
+
|
472 |
+
modelSetOptions: {
|
473 |
+
validate: true
|
474 |
+
}
|
475 |
+
});
|
476 |
+
|
477 |
+
/* Return for chaining purposes */
|
478 |
+
return this;
|
479 |
+
},
|
480 |
+
|
481 |
+
/**
|
482 |
+
* Show / Hide the Font Manager (Editor)
|
483 |
+
* @param Object ev The Backbone event object
|
484 |
+
* @since 4.0
|
485 |
+
*/
|
486 |
+
toggleView: function(ev) {
|
487 |
+
|
488 |
+
/* Prevent default anchor action */
|
489 |
+
ev.preventDefault();
|
490 |
+
|
491 |
+
/* Toggle our Font Manager Container */
|
492 |
+
$(ev.currentTarget).next().toggle();
|
493 |
+
|
494 |
+
},
|
495 |
+
|
496 |
+
/**
|
497 |
+
* Highlight field with red border when error is detected
|
498 |
+
* @param Object model The model currently being modified
|
499 |
+
* @param String error The name of the error triggered
|
500 |
+
* @since 4.0
|
501 |
+
*/
|
502 |
+
nameError: function(model, error) {
|
503 |
+
|
504 |
+
if(error && error == 'invalid_characters') {
|
505 |
+
|
506 |
+
/* highlight errors */
|
507 |
+
this.$el.find('input[name="font_name"]').css('border-color', 'red');
|
508 |
+
} else {
|
509 |
+
|
510 |
+
/* un-highlight errors */
|
511 |
+
this.$el.find('input[name="font_name"]').removeAttr('style');
|
512 |
+
}
|
513 |
+
},
|
514 |
+
|
515 |
+
/**
|
516 |
+
* Highlight / Un-highlight Font Field that failed validation
|
517 |
+
* @param Object model The model currently being modified
|
518 |
+
* @param String error The name of the error triggered
|
519 |
+
* @param {[type]} name The name of the field which failed validation
|
520 |
+
* @since 4.0
|
521 |
+
*/
|
522 |
+
fontError: function(model, error, name) {
|
523 |
+
|
524 |
+
/* Get the input that failed validation */
|
525 |
+
$input = this.$el.find('input[name="' + name + '"]');
|
526 |
+
|
527 |
+
/* If error is triggered display message to user */
|
528 |
+
if(error) {
|
529 |
+
|
530 |
+
/* Set up an error message */
|
531 |
+
$error = $('<span class="gf_settings_description"><label>Only TTF font files are supported.</label></span>');
|
532 |
+
|
533 |
+
/* Tell user about error */
|
534 |
+
if(! $input.hasClass('invalid')) {
|
535 |
+
$input.addClass('invalid').next().after($error.clone());
|
536 |
+
}
|
537 |
+
} else {
|
538 |
+
|
539 |
+
/* Remove validation error */
|
540 |
+
if($input.hasClass('invalid')) {
|
541 |
+
$input.removeClass('invalid').next().next().remove();
|
542 |
+
}
|
543 |
+
}
|
544 |
+
},
|
545 |
+
|
546 |
+
/**
|
547 |
+
* Disable the form submit button due to validation failure and mark is
|
548 |
+
* as currently disabled to prevent any funny business
|
549 |
+
* @param Object model An instance of Fonts.Model.Core()
|
550 |
+
* @since 4.0
|
551 |
+
*/
|
552 |
+
disableSubmitButton: function(model) {
|
553 |
+
|
554 |
+
this.$el.find('.font-submit button').prop('disabled', true);
|
555 |
+
model.set('disabled', true);
|
556 |
+
},
|
557 |
+
|
558 |
+
/**
|
559 |
+
* Enable the form submit button due to validation passing and mark is
|
560 |
+
* as currently enabled. Users can now save the model.
|
561 |
+
* @param Object model An instance of Fonts.Model.Core()
|
562 |
+
* @since 4.0
|
563 |
+
*/
|
564 |
+
enableSubmitButton: function(model) {
|
565 |
+
|
566 |
+
this.$el.find('.font-submit button').prop('disabled', false);
|
567 |
+
model.set('disabled', false);
|
568 |
+
},
|
569 |
+
|
570 |
+
/**
|
571 |
+
* Save model after checking browser's native validation API passes and that model isn't enabled.
|
572 |
+
* @param Object ev The Backbone event object
|
573 |
+
* @since 4.0
|
574 |
+
*/
|
575 |
+
formSubmission: function(ev) {
|
576 |
+
|
577 |
+
/* Allow native validation without submitting actual form to backend */
|
578 |
+
ev.preventDefault();
|
579 |
+
|
580 |
+
var $form = $(ev.currentTarget);
|
581 |
+
|
582 |
+
/* Check if the native form validation is a success */
|
583 |
+
if(ev.currentTarget.checkValidity() && this.model.get('disabled') === false) {
|
584 |
+
|
585 |
+
/* Show saving spinner */
|
586 |
+
this.addSpinner();
|
587 |
+
|
588 |
+
/* Remove previous message */
|
589 |
+
this.removeMessage();
|
590 |
+
|
591 |
+
console.log(this.model);
|
592 |
+
|
593 |
+
this.model.save({
|
594 |
+
nonce: this.$el.find('input[name=wpnonce]').val()
|
595 |
+
}, {
|
596 |
+
success: $.proxy(function(model, response, options) {
|
597 |
+
|
598 |
+
/* Remove saving spinner */
|
599 |
+
this.removeSpinner();
|
600 |
+
|
601 |
+
/* Display Message */
|
602 |
+
this.displayMessage(GFPDF.updateSuccess);
|
603 |
+
|
604 |
+
/* Keep our model in sync */
|
605 |
+
this.model.set(model);
|
606 |
+
|
607 |
+
}, this),
|
608 |
+
|
609 |
+
error: $.proxy(function(response, type, errorName) {
|
610 |
+
|
611 |
+
/* Remove saving spinner */
|
612 |
+
this.removeSpinner();
|
613 |
+
|
614 |
+
/* Display Error */
|
615 |
+
if(response.responseJSON.error) {
|
616 |
+
this.displayMessage(response.responseJSON.error, true);
|
617 |
+
}
|
618 |
+
}, this)
|
619 |
+
});
|
620 |
+
}
|
621 |
+
},
|
622 |
+
|
623 |
+
/**
|
624 |
+
* Delete our model
|
625 |
+
* @param Object ev The Backbone event object
|
626 |
+
* @since 4.0
|
627 |
+
*/
|
628 |
+
deleteModel: function(ev) {
|
629 |
+
|
630 |
+
/* Prevent default anchor action */
|
631 |
+
ev.preventDefault();
|
632 |
+
|
633 |
+
/* Get our dialog box */
|
634 |
+
var $dialog = $( '#delete-confirm' );
|
635 |
+
|
636 |
+
/* Set up our dialog box buttons */
|
637 |
+
var deleteButtons = [{
|
638 |
+
text: GFPDF.delete,
|
639 |
+
click: $.proxy(function() {
|
640 |
+
|
641 |
+
/* Hide the confirmation dialog */
|
642 |
+
$dialog.wpdialog( 'destroy' );
|
643 |
+
|
644 |
+
/* If an ID is set (pulled from DB) do our AJAX delete call */
|
645 |
+
if(this.model.get('id')) {
|
646 |
+
|
647 |
+
/* Show saving spinner */
|
648 |
+
this.addSpinner();
|
649 |
+
|
650 |
+
/* Remove previous message */
|
651 |
+
this.removeMessage();
|
652 |
+
|
653 |
+
/* Hide the container */
|
654 |
+
this.$el.hide();
|
655 |
+
|
656 |
+
this.model.destroy({
|
657 |
+
nonce: this.$el.find('input[name=wpnonce]').val()
|
658 |
+
}, {
|
659 |
+
success: $.proxy(function(model, response, options) {
|
660 |
+
|
661 |
+
/* Remove saving spinner */
|
662 |
+
this.removeSpinner();
|
663 |
+
|
664 |
+
/* Display Message */
|
665 |
+
this.displayMessage(GFPDF.deleteSuccess);
|
666 |
+
|
667 |
+
/* Remove from collection */
|
668 |
+
this.collection.remove(this.model);
|
669 |
+
|
670 |
+
}, this),
|
671 |
+
|
672 |
+
error: $.proxy(function(response, type, errorName) {
|
673 |
+
|
674 |
+
/* Remove saving spinner */
|
675 |
+
this.removeSpinner();
|
676 |
+
|
677 |
+
/* Remove from collection */
|
678 |
+
this.collection.remove(this.model);
|
679 |
+
|
680 |
+
/* Display Error */
|
681 |
+
if(response.responseJSON.error) {
|
682 |
+
this.displayMessage(response.responseJSON.error, true);
|
683 |
+
}
|
684 |
+
|
685 |
+
}, this)
|
686 |
+
});
|
687 |
+
|
688 |
+
/* TODO: if destroy() is successful remove the hidden item */
|
689 |
+
} else {
|
690 |
+
this.collection.remove(this.model);
|
691 |
+
}
|
692 |
+
|
693 |
+
}, this)
|
694 |
+
},
|
695 |
+
{
|
696 |
+
text: GFPDF.cancel,
|
697 |
+
click: function() {
|
698 |
+
|
699 |
+
/* Cancel */
|
700 |
+
$dialog.wpdialog( 'destroy' );
|
701 |
+
}
|
702 |
+
}];
|
703 |
+
|
704 |
+
/* Set up our dialog box */
|
705 |
+
Fonts.Misc.Dialog($dialog, deleteButtons, 300, 175);
|
706 |
+
|
707 |
+
/* Open the dialog box */
|
708 |
+
$dialog.wpdialog( 'open' );
|
709 |
+
},
|
710 |
+
|
711 |
+
/**
|
712 |
+
* Adds an AJAX loader so the user knows a query is being made
|
713 |
+
* @since 4.0
|
714 |
+
*/
|
715 |
+
addSpinner: function() {
|
716 |
+
var $spinner = $('<img alt="Loading" src="' + GFPDF.spinnerUrl + '" class="gfpdf-spinner" style="margin-top: 4px;" />');
|
717 |
+
this.$el.find('.font-submit button').after($spinner);
|
718 |
+
},
|
719 |
+
|
720 |
+
/**
|
721 |
+
* Remove AJAX loader so the user knows a query is finished
|
722 |
+
* @since 4.0
|
723 |
+
*/
|
724 |
+
removeSpinner: function() {
|
725 |
+
this.$el.find('.gfpdf-spinner').remove();
|
726 |
+
},
|
727 |
+
|
728 |
+
/**
|
729 |
+
* Show message to the user
|
730 |
+
* @param String msg The message to be displayed
|
731 |
+
* @param Boolean isError If set to true an error will be displayed
|
732 |
+
* @since 4.0
|
733 |
+
*/
|
734 |
+
displayMessage: function(msg, isError) {
|
735 |
+
|
736 |
+
/* Generate our error template */
|
737 |
+
var $message = $('<div class="updated notice">');
|
738 |
+
|
739 |
+
/* Add our error class if requested */
|
740 |
+
if(isError === true) {
|
741 |
+
$message.addClass('error');
|
742 |
+
}
|
743 |
+
|
744 |
+
/* Add the message to be displayed */
|
745 |
+
$message.html('<p>' + msg + '</p>');
|
746 |
+
|
747 |
+
/* Add message to the DOM */
|
748 |
+
this.$el.find('form').before($message);
|
749 |
+
},
|
750 |
+
|
751 |
+
/**
|
752 |
+
* Remove any messages currently being shown to the user
|
753 |
+
* @since 4.0
|
754 |
+
*/
|
755 |
+
removeMessage: function() {
|
756 |
+
this.$el.find('div.notice').slideUp(function() {
|
757 |
+
$(this).remove();
|
758 |
+
});
|
759 |
+
}
|
760 |
+
});
|
761 |
+
|
762 |
+
/**
|
763 |
+
* A simple view that creates an interface for adding new models to our collection
|
764 |
+
* @since 4.0
|
765 |
+
*/
|
766 |
+
Fonts.View.Add = Backbone.View.extend({
|
767 |
+
|
768 |
+
/**
|
769 |
+
* Our View Target Element
|
770 |
+
* @type String
|
771 |
+
* @since 4.0
|
772 |
+
*/
|
773 |
+
el: '#font-add-list',
|
774 |
+
|
775 |
+
/**
|
776 |
+
* Our DOM Events
|
777 |
+
* @type Object
|
778 |
+
* @since 4.0
|
779 |
+
*/
|
780 |
+
events: {
|
781 |
+
'click': 'addFont',
|
782 |
+
},
|
783 |
+
|
784 |
+
/**
|
785 |
+
* Store our Fonts.Container.Core() object so our view can easily add new models
|
786 |
+
* and renders the view
|
787 |
+
* @param Object options User-passed parameters
|
788 |
+
* @since 4.0
|
789 |
+
*/
|
790 |
+
initialize: function(options) {
|
791 |
+
|
792 |
+
this.container = options.container;
|
793 |
+
this.render();
|
794 |
+
},
|
795 |
+
|
796 |
+
/**
|
797 |
+
* Renders our View
|
798 |
+
* @since 4.0
|
799 |
+
*/
|
800 |
+
render: function() {
|
801 |
+
this.$el.html('<i class="fa fa-plus fa-4x"></i><span>Add Font</span>');
|
802 |
+
},
|
803 |
+
|
804 |
+
/**
|
805 |
+
* Add a new model to our collection
|
806 |
+
* @param Object ev The Backbone event object
|
807 |
+
* @since 4.0
|
808 |
+
*/
|
809 |
+
addFont: function(ev) {
|
810 |
+
|
811 |
+
/* Create an empty model */
|
812 |
+
var font = new Fonts.Model.Core();
|
813 |
+
|
814 |
+
/* Add new model to our collection */
|
815 |
+
this.collection.add(font);
|
816 |
+
|
817 |
+
/* Toggle the new model's font manager and set focus to our name field */
|
818 |
+
this.container.$el.find('li:last .font-settings').toggle()
|
819 |
+
.find('input[type="text"]:first').focus();
|
820 |
+
}
|
821 |
+
});
|
822 |
+
|
823 |
+
|
824 |
+
/**
|
825 |
+
* Generate a WP Dialog box
|
826 |
+
* @param jQuery Object $elm The element we want to bind the dialog box to
|
827 |
+
* @param Object buttonsList Handles the button creation process. More information found in the jQuery UI Dialog Documentation
|
828 |
+
* @param Integer boxWidth How wide should the dialog box be
|
829 |
+
* @param Integer boxHeight How tall should the dialog box be
|
830 |
+
* @since 4.0
|
831 |
+
*/
|
832 |
+
Fonts.Misc.Dialog = function($elm, buttonsList, boxWidth, boxHeight) {
|
833 |
+
$elm.wpdialog({
|
834 |
+
autoOpen: false,
|
835 |
+
resizable: false,
|
836 |
+
draggable: false,
|
837 |
+
width: boxWidth,
|
838 |
+
height: boxHeight,
|
839 |
+
modal: true,
|
840 |
+
dialogClass: 'wp-dialog',
|
841 |
+
zIndex: 300000,
|
842 |
+
buttons: buttonsList,
|
843 |
+
|
844 |
+
/**
|
845 |
+
* Open our dialog box and set focus to the first button find
|
846 |
+
* Also add an event listener to close the dialog when the background is clicked
|
847 |
+
*/
|
848 |
+
open: function() {
|
849 |
+
$(this).siblings('.ui-dialog-buttonpane').find('button:eq(1)').focus();
|
850 |
+
|
851 |
+
$('.ui-widget-overlay').bind('click', function() {
|
852 |
+
$elm.wpdialog('close');
|
853 |
+
});
|
854 |
+
}
|
855 |
+
});
|
856 |
+
};
|
857 |
+
|
858 |
+
|
859 |
+
|
860 |
+
|
861 |
+
/**
|
862 |
+
* Our Documentation Search API
|
863 |
+
* We'll add a search bar and output the results of the search
|
864 |
+
* from our API to assist users with our software.
|
865 |
+
* @since 4.0
|
866 |
+
*/
|
867 |
+
|
868 |
+
var help = {}; // create namespace for our app
|
869 |
+
|
870 |
+
help.SearchModel = Backbone.Model.extend({});
|
871 |
+
|
872 |
+
help.SearchCollection = Backbone.Collection.extend({
|
873 |
+
model: help.SearchModel,
|
874 |
+
|
875 |
+
initialize: function(models, options) {
|
876 |
+
this.url = options.url;
|
877 |
+
},
|
878 |
+
|
879 |
+
});
|
880 |
+
|
881 |
+
help.ContainerView = Backbone.View.extend({
|
882 |
+
el: '#search-knowledgebase',
|
883 |
+
|
884 |
+
events: {
|
885 |
+
'keyup #search-help-input' : 'doSearch',
|
886 |
+
'change #search-help-input' : 'doSearch',
|
887 |
+
},
|
888 |
+
|
889 |
+
initialize: function() {
|
890 |
+
/* initialise our timer */
|
891 |
+
this.timer = true;
|
892 |
+
|
893 |
+
/* render the container view */
|
894 |
+
this.render();
|
895 |
+
},
|
896 |
+
|
897 |
+
render: function() {
|
898 |
+
this.addSearchBar();
|
899 |
+
|
900 |
+
return this;
|
901 |
+
},
|
902 |
+
|
903 |
+
addSearchBar: function() {
|
904 |
+
/* create our search element */
|
905 |
+
var $input = $('<input>').attr('type', 'text')
|
906 |
+
.attr('placeholder', ' ' + GFPDF.searchPlaceholder)
|
907 |
+
.attr('id', 'search-help-input');
|
908 |
+
|
909 |
+
/* add out search box and give it focus */
|
910 |
+
this.$el.prepend($input);
|
911 |
+
|
912 |
+
$input.tooltip({
|
913 |
+
items: 'input',
|
914 |
+
content: 'The search must be more than 3 characters.',
|
915 |
+
tooltipClass: 'ui-state-error',
|
916 |
+
}).tooltip( 'disable' );
|
917 |
+
|
918 |
+
/* give our search box focus */
|
919 |
+
$input.focus();
|
920 |
+
},
|
921 |
+
|
922 |
+
doSearch: function(ev) {
|
923 |
+
var $search = $(ev.currentTarget);
|
924 |
+
|
925 |
+
/* clear any previous events */
|
926 |
+
window.clearTimeout(this.timer);
|
927 |
+
|
928 |
+
/* only trigger our search if user has entered more than 3 characters */
|
929 |
+
var value = $.trim($search.val());
|
930 |
+
var previousValue = $search.data('currentValue');
|
931 |
+
|
932 |
+
if(value.length > 3 && $search.data('previousValue') !== value) {
|
933 |
+
$search.tooltip( 'disable' );
|
934 |
+
|
935 |
+
/* track the data value */
|
936 |
+
$search.data('currentValue', value);
|
937 |
+
|
938 |
+
this.timer = window.setTimeout(_.bind(function() {
|
939 |
+
this.processSearch(value);
|
940 |
+
}, this), 500);
|
941 |
+
} else if(value.length <= 3 && ev.keyCode == 13) {
|
942 |
+
$search.tooltip( 'enable' ).tooltip( 'open' );
|
943 |
+
}
|
944 |
+
},
|
945 |
+
|
946 |
+
processSearch: function(search) {
|
947 |
+
/* Initialise our Collection and pull the data from our source */
|
948 |
+
console.log('Searching our collection...');
|
949 |
+
|
950 |
+
new help.DocsView({
|
951 |
+
s: search,
|
952 |
+
});
|
953 |
+
}
|
954 |
+
|
955 |
+
});
|
956 |
+
|
957 |
+
help.MainView = Backbone.View.extend({
|
958 |
+
|
959 |
+
callAPI: function(url) {
|
960 |
+
/* do our search */
|
961 |
+
this.collection.fetch({
|
962 |
+
success: _.bind(this.renderSearch, this),
|
963 |
+
error: _.bind(this.renderSearchError),
|
964 |
+
});
|
965 |
+
},
|
966 |
+
|
967 |
+
renderSearch: function(collection, response) {
|
968 |
+
console.log('Rendering Search Results');
|
969 |
+
|
970 |
+
this.hideSpinner();
|
971 |
+
|
972 |
+
var $container = this.$el.find('.inside ul');
|
973 |
+
|
974 |
+
$container.html(this.template({
|
975 |
+
collection: this.collection.toJSON(),
|
976 |
+
url: this.url,
|
977 |
+
}));
|
978 |
+
|
979 |
+
var $wrapper = $container.parent();
|
980 |
+
if(!$wrapper.is(':visible')) {
|
981 |
+
$wrapper.slideDown(500);
|
982 |
+
}
|
983 |
+
|
984 |
+
},
|
985 |
+
|
986 |
+
renderSearchError: function(collection, response) {
|
987 |
+
console.log('Search Failed');
|
988 |
+
console.log(collection);
|
989 |
+
console.log(response);
|
990 |
+
},
|
991 |
+
|
992 |
+
|
993 |
+
showSpinner: function() {
|
994 |
+
this.$el.find('.spinner').addClass('is-active');
|
995 |
+
|
996 |
+
if(!this.$el.is(':visible')) {
|
997 |
+
this.$el.slideDown(500);
|
998 |
+
}
|
999 |
+
},
|
1000 |
+
|
1001 |
+
hideSpinner: function() {
|
1002 |
+
this.$el.find('.spinner').removeClass('is-active');
|
1003 |
+
},
|
1004 |
+
});
|
1005 |
+
|
1006 |
+
help.DocsView = help.MainView.extend({
|
1007 |
+
el: '#documentation-api',
|
1008 |
+
|
1009 |
+
template: '#GravityPDFSearchResultsDocumentation',
|
1010 |
+
|
1011 |
+
initialize: function(options) {
|
1012 |
+
this.url = 'https://gravitypdf.com/wp-json/wp/v2/v4_docs/';
|
1013 |
+
this.s = options.s;
|
1014 |
+
this.render();
|
1015 |
+
},
|
1016 |
+
|
1017 |
+
render: function() {
|
1018 |
+
/* set up out template */
|
1019 |
+
this.template = _.template($(this.template).html(), null, UnderscoreSettingsOverride);
|
1020 |
+
|
1021 |
+
/* show the loading spinner */
|
1022 |
+
this.showSpinner();
|
1023 |
+
|
1024 |
+
/* set up view search params */
|
1025 |
+
var s = encodeURIComponent(this.s);
|
1026 |
+
var url = this.url + '?search=' + s;
|
1027 |
+
|
1028 |
+
/* initialise our collection */
|
1029 |
+
this.collection = new help.SearchCollection([], {
|
1030 |
+
url: url,
|
1031 |
+
});
|
1032 |
+
|
1033 |
+
/* ping api for results */
|
1034 |
+
this.callAPI(url);
|
1035 |
+
|
1036 |
+
return this;
|
1037 |
+
},
|
1038 |
+
});
|
1039 |
+
|
1040 |
+
/**
|
1041 |
+
* Our Admin controller
|
1042 |
+
* Applies correct JS to settings pages
|
1043 |
+
*/
|
1044 |
+
function GravityPDF () {
|
1045 |
+
var self = this;
|
1046 |
+
|
1047 |
+
this.init = function() {
|
1048 |
+
if(this.is_settings()) {
|
1049 |
+
this.processSettings();
|
1050 |
+
}
|
1051 |
+
};
|
1052 |
+
|
1053 |
+
this.is_settings = function() {
|
1054 |
+
return $('#tab_PDF').length;
|
1055 |
+
};
|
1056 |
+
|
1057 |
+
this.processSettings = function() {
|
1058 |
+
var active = $('.nav-tab-wrapper a.nav-tab-active:first').text();
|
1059 |
+
|
1060 |
+
switch (active) {
|
1061 |
+
case 'Tools':
|
1062 |
+
this.tools_settings();
|
1063 |
+
break;
|
1064 |
+
|
1065 |
+
case 'Help':
|
1066 |
+
this.help_settings();
|
1067 |
+
break;
|
1068 |
+
}
|
1069 |
+
};
|
1070 |
+
|
1071 |
+
/**
|
1072 |
+
* The help settings model method
|
1073 |
+
* This sets up and processes any of the JS that needs to be applied on the help settings tab
|
1074 |
+
* @since 4.0
|
1075 |
+
*/
|
1076 |
+
this.help_settings = function() {
|
1077 |
+
/**
|
1078 |
+
* Load our settings dependancy
|
1079 |
+
*/
|
1080 |
+
new help.ContainerView();
|
1081 |
+
};
|
1082 |
+
|
1083 |
+
/**
|
1084 |
+
* The help tools model method
|
1085 |
+
* This sets up and processes any of the JS that needs to be applied on the tools settings tab
|
1086 |
+
* @since 4.0
|
1087 |
+
*/
|
1088 |
+
this.tools_settings = function() {
|
1089 |
+
|
1090 |
+
var json = JSON.parse(GFPDF.customFontData);
|
1091 |
+
|
1092 |
+
/* Initialise our collection and load with our font JSON data */
|
1093 |
+
var fontCollection = new Fonts.Collection.Core(json);
|
1094 |
+
|
1095 |
+
/* Create a container View and pass in our collection */
|
1096 |
+
var container = new Fonts.View.Container({
|
1097 |
+
collection: fontCollection
|
1098 |
+
});
|
1099 |
+
|
1100 |
+
/* Create a Add View so user's can add new fonts and pass in our collection and container */
|
1101 |
+
new Fonts.View.Add({
|
1102 |
+
collection: fontCollection,
|
1103 |
+
container: container
|
1104 |
+
});
|
1105 |
+
};
|
1106 |
+
|
1107 |
+
}
|
1108 |
+
|
1109 |
+
var pdf = new GravityPDF();
|
1110 |
+
pdf.init();
|
1111 |
+
|
1112 |
+
});
|
1113 |
+
})(jQuery);
|
src/assets/js/gfpdf-entries.js
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Gravity PDF Entries
|
3 |
+
* Dependancies: jQuery
|
4 |
+
* @since 4.0
|
5 |
+
*/
|
6 |
+
|
7 |
+
(function($) {
|
8 |
+
|
9 |
+
var GFPDF = {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Do a better hover when accessing the PDF submenu
|
13 |
+
* This allows for a longer timeout before the submenu is hidden again
|
14 |
+
* @since 4.0
|
15 |
+
*/
|
16 |
+
PDFSubmenuHover: function() {
|
17 |
+
$('table .gf_form_action_has_submenu').hover(function() {
|
18 |
+
|
19 |
+
clearTimeout($(this).data('timeout'));
|
20 |
+
|
21 |
+
$(this).find('.gf_submenu').show();
|
22 |
+
}, function() {
|
23 |
+
|
24 |
+
var self = this;
|
25 |
+
var t = setTimeout(function() {
|
26 |
+
$(self).find('.gf_submenu').hide();
|
27 |
+
}, 350);
|
28 |
+
|
29 |
+
$(this).data('timeout', t);
|
30 |
+
});
|
31 |
+
}
|
32 |
+
};
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Fires on the Document Ready Event (the same as $(document).ready(function() { ... });)
|
36 |
+
* @since 4.0
|
37 |
+
*/
|
38 |
+
$(function() {
|
39 |
+
GFPDF.PDFSubmenuHover();
|
40 |
+
});
|
41 |
+
})(jQuery);
|
src/assets/js/gfpdf-migration.js
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Gravity PDF Multisite v3 to v4 Migration Script
|
3 |
+
* Dependancies: jQuery
|
4 |
+
* @since 4.0
|
5 |
+
*/
|
6 |
+
|
7 |
+
(function($) {
|
8 |
+
|
9 |
+
function ajax_migration( blog_id, nonce, $container ) {
|
10 |
+
$container.append( '<p>' + GFPDF.migratingSite.replace( /%s/g, blog_id ) + ' <img alt="' + GFPDF.spinnerAlt + '" src="' + GFPDF.spinnerUrl + '" class="gfpdf-spinner" style="width:20px;vertical-align: middle;padding-left:5px" /></p>' );
|
11 |
+
|
12 |
+
$.ajax({
|
13 |
+
type : "post",
|
14 |
+
dataType : "json",
|
15 |
+
url : GFPDF.ajaxUrl,
|
16 |
+
data : {
|
17 |
+
'action': 'multisite_v3_migration',
|
18 |
+
'nonce': nonce,
|
19 |
+
'blog_id': blog_id,
|
20 |
+
},
|
21 |
+
success: function( json ) {
|
22 |
+
/* Remove the spinner */
|
23 |
+
$container.find( '.gfpdf-spinner' ).remove();
|
24 |
+
|
25 |
+
/* Display appropriate response. Either complete, specific error or generic error */
|
26 |
+
if( json.results === "complete" ) {
|
27 |
+
$container.append( '<p>' + GFPDF.siteMigrationComplete.replace( /%s/g, blog_id ) + '</p>' );
|
28 |
+
} else if( json.results.error ) {
|
29 |
+
$container.append( '<p><strong>' + GFPDF.migrationError + ': ' + json.results.error + '</strong></p>' );
|
30 |
+
} else {
|
31 |
+
$container.append( '<p><strong>' + GFPDF.siteMigrationErrors.replace( /%s/g, blog_id ) + '</strong></p>' );
|
32 |
+
}
|
33 |
+
|
34 |
+
/* Run the next migration, if it exists, or show as complete */
|
35 |
+
if( gfpdf_migration_multisite_ids.length > 0 ) {
|
36 |
+
ajax_migration( gfpdf_migration_multisite_ids.shift(), nonce, $container );
|
37 |
+
} else {
|
38 |
+
$( '#gfpdf-multisite-migration-complete' ).show();
|
39 |
+
}
|
40 |
+
},
|
41 |
+
error: function() {
|
42 |
+
/* Remove the spinner */
|
43 |
+
$container.find( '.gfpdf-spinner' ).remove();
|
44 |
+
|
45 |
+
/* Add a generic error */
|
46 |
+
$container.append( '<p><strong>' + GFPDF.siteMigrationErrors.replace( /%s/g, blog_id ) + '</strong></p>' );
|
47 |
+
|
48 |
+
/* Run the next migration, if it exists, or show as complete */
|
49 |
+
if( gfpdf_migration_multisite_ids.length > 0 ) {
|
50 |
+
ajax_migration( gfpdf_migration_multisite_ids.shift(), nonce, $container );
|
51 |
+
} else {
|
52 |
+
$( '#gfpdf-multisite-migration-complete' ).show();
|
53 |
+
}
|
54 |
+
},
|
55 |
+
});
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Fires on the Document Ready Event (the same as $(document).ready(function() { ... });)
|
60 |
+
* @since 4.0
|
61 |
+
*/
|
62 |
+
$(function() {
|
63 |
+
|
64 |
+
/* Grab the container and nonce */
|
65 |
+
var $container = $( '#gfpdf-multisite-migration-copy' );
|
66 |
+
var nonce = $container.data( 'nonce' );
|
67 |
+
|
68 |
+
/* Begin the migration */
|
69 |
+
if( gfpdf_migration_multisite_ids.length > 0 ) {
|
70 |
+
ajax_migration( gfpdf_migration_multisite_ids.shift(), nonce, $container );
|
71 |
+
}
|
72 |
+
});
|
73 |
+
|
74 |
+
})( jQuery );
|
src/assets/js/gfpdf-settings.js
ADDED
@@ -0,0 +1,1453 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Gravity PDF Settings JS Logic
|
3 |
+
* Dependancies: backbone, underscore, jquery
|
4 |
+
* @since 4.0
|
5 |
+
*/
|
6 |
+
|
7 |
+
(function ($) {
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Fires on the Document Ready Event (the same as $(document).ready(function() { ... });)
|
11 |
+
* @since 4.0
|
12 |
+
*/
|
13 |
+
$(function () {
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Our Admin controller
|
17 |
+
* Applies correct JS to our Gravity PDF pages
|
18 |
+
* @since 4.0
|
19 |
+
*/
|
20 |
+
function GravityPDF () {
|
21 |
+
|
22 |
+
/**
|
23 |
+
* A reference to the GravityPDF object when 'this' refers to a different object
|
24 |
+
* Usage is inside AJAX closures. All other functions should use $.proxy() to set this appropriately
|
25 |
+
* @type Object
|
26 |
+
* @since 4.0
|
27 |
+
*/
|
28 |
+
var self = this
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Process the correct settings area (the global PDF settings or individual form PDF settings)
|
32 |
+
* Also set up any event listeners needed
|
33 |
+
* @return void
|
34 |
+
* @since 4.0
|
35 |
+
*/
|
36 |
+
this.init = function () {
|
37 |
+
|
38 |
+
/* Process any common functions */
|
39 |
+
this.initCommon()
|
40 |
+
|
41 |
+
/* Process the global PDF settings */
|
42 |
+
if (this.isSettings()) {
|
43 |
+
this.processSettings()
|
44 |
+
}
|
45 |
+
|
46 |
+
/* Process the individual form PDF settings */
|
47 |
+
if (this.isFormSettings()) {
|
48 |
+
this.processFormSettings()
|
49 |
+
}
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Initialise any common elements
|
54 |
+
* @return void
|
55 |
+
* @since 4.0
|
56 |
+
*/
|
57 |
+
this.initCommon = function () {
|
58 |
+
|
59 |
+
/* Change some Gravity Forms parameters */
|
60 |
+
this.setupGravityForms()
|
61 |
+
|
62 |
+
/* If we have a upload field handle the logic */
|
63 |
+
this.doUploadListener()
|
64 |
+
|
65 |
+
/* If we have a colour picker handle the logic */
|
66 |
+
this.doColorPicker()
|
67 |
+
|
68 |
+
/* If we have any select boxes to handle */
|
69 |
+
this.setupSelectBoxes()
|
70 |
+
|
71 |
+
/* Enable tooltips, if needed */
|
72 |
+
this.showTooltips()
|
73 |
+
|
74 |
+
/* Setup custom paper size, if needed */
|
75 |
+
this.setupCustomPaperSize()
|
76 |
+
|
77 |
+
/* Setup toggled fields, if needed */
|
78 |
+
this.setupToggledFields()
|
79 |
+
|
80 |
+
/* Setup our template loader, if needed */
|
81 |
+
this.setupDynamicTemplateFields()
|
82 |
+
|
83 |
+
/* Setup license deactivation, if needed */
|
84 |
+
this.setupLicenseDeactivation()
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Replace some of Gravity Forms JS variables so it functions correctly with our PDF version
|
89 |
+
*
|
90 |
+
* @since 4.1
|
91 |
+
*/
|
92 |
+
this.setupGravityForms = function () {
|
93 |
+
/**
|
94 |
+
* Check if the global gf_vars has been set and if so replace the .thisFormButton, .show, .hide objects with our
|
95 |
+
* customised options.
|
96 |
+
* @since 4.0
|
97 |
+
*/
|
98 |
+
if (typeof gf_vars !== 'undefined') {
|
99 |
+
gf_vars.thisFormButton = GFPDF.conditionalText
|
100 |
+
gf_vars.show = GFPDF.enable
|
101 |
+
gf_vars.hide = GFPDF.disable
|
102 |
+
}
|
103 |
+
|
104 |
+
/*
|
105 |
+
* Backwards compatibility support prior to Gravity Forms 2.3
|
106 |
+
*
|
107 |
+
* Override the gfMergeTagsObj.getTargetElement prototype to better handle CSS special characters in selectors
|
108 |
+
* This is because Gravity Forms doesn't correctly espace meta-characters such a [ and ] (which we use extensively as IDs)
|
109 |
+
* This functionality assists with the merge tag loader
|
110 |
+
* @since 4.0
|
111 |
+
*/
|
112 |
+
if (window.gfMergeTags && typeof form != 'undefined') {
|
113 |
+
window.gfMergeTags.getTargetElement = this.resetGfMergeTags
|
114 |
+
}
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Get if on the global PDF settings pages
|
119 |
+
* @return Integer
|
120 |
+
* @since 4.0
|
121 |
+
*/
|
122 |
+
this.isSettings = function () {
|
123 |
+
return $('#tab_PDF').length
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Check if on the individual PDF form settings pages
|
128 |
+
* @return Integer
|
129 |
+
* @since 4.0
|
130 |
+
*/
|
131 |
+
this.isFormSettings = function () {
|
132 |
+
return $('#tab_pdf').length
|
133 |
+
}
|
134 |
+
|
135 |
+
/**
|
136 |
+
* See if we are on the form settings list page
|
137 |
+
* @return Integer
|
138 |
+
* @since 4.0
|
139 |
+
*/
|
140 |
+
this.isFormSettingsList = function () {
|
141 |
+
return $('#gfpdf_list_form').length
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* See if we are on the form settings edit page
|
146 |
+
* @return Integer
|
147 |
+
* @since 4.0
|
148 |
+
*/
|
149 |
+
this.isFormSettingsEdit = function () {
|
150 |
+
return $('#gfpdf_pdf_form').length
|
151 |
+
}
|
152 |
+
|
153 |
+
/**
|
154 |
+
* Check the current active PDF settings page
|
155 |
+
* @return String
|
156 |
+
* @since 4.0
|
157 |
+
*/
|
158 |
+
this.getCurrentSettingsPage = function () {
|
159 |
+
if (this.isSettings()) {
|
160 |
+
return $('.nav-tab-wrapper a.nav-tab-active:first').text()
|
161 |
+
}
|
162 |
+
return ''
|
163 |
+
}
|
164 |
+
|
165 |
+
/**
|
166 |
+
* Process the global settings page
|
167 |
+
* @return void
|
168 |
+
* @since 4.0
|
169 |
+
*/
|
170 |
+
this.processSettings = function () {
|
171 |
+
|
172 |
+
/* Ensure the Gravity Forms settings navigation (Form Settings / Notifications / Confirmation) has the 'tab' URI stripped from it */
|
173 |
+
this.cleanupGFNavigation()
|
174 |
+
|
175 |
+
/* Run our direct PDF status check */
|
176 |
+
this.runPDFAccessCheck()
|
177 |
+
|
178 |
+
/* Run the appropriate settings page */
|
179 |
+
switch (this.getCurrentSettingsPage()) {
|
180 |
+
case 'General':
|
181 |
+
this.generalSettings()
|
182 |
+
break
|
183 |
+
|
184 |
+
case 'Tools':
|
185 |
+
this.toolsSettings()
|
186 |
+
break
|
187 |
+
}
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* Routing functionality for the individual form settings page
|
192 |
+
* @return void
|
193 |
+
* @since 4.0
|
194 |
+
*/
|
195 |
+
this.processFormSettings = function () {
|
196 |
+
|
197 |
+
/* Process PDF list page */
|
198 |
+
if (this.isFormSettingsList()) {
|
199 |
+
this.doFormSettingsListPage()
|
200 |
+
}
|
201 |
+
|
202 |
+
/* Process single edit page */
|
203 |
+
if (this.isFormSettingsEdit()) {
|
204 |
+
this.doFormSettingsEditPage()
|
205 |
+
}
|
206 |
+
}
|
207 |
+
|
208 |
+
/**
|
209 |
+
* Process the individual PDF GF Form Settings Page
|
210 |
+
* @return void
|
211 |
+
* @since 4.0
|
212 |
+
*/
|
213 |
+
this.doFormSettingsEditPage = function () {
|
214 |
+
|
215 |
+
this.setupRequiredFields($('#gfpdf_pdf_form'))
|
216 |
+
/* highlight which fields are required and disable in-browser validation */
|
217 |
+
this.setupPdfTabs()
|
218 |
+
this.handleSecurityConditionals()
|
219 |
+
this.handlePDFConditionalLogic()
|
220 |
+
this.handleOwnerRestriction()
|
221 |
+
this.toggleFontAppearance($('#gfpdf_settings\\[template\\]').data('template_group'))
|
222 |
+
this.toggleAppearanceTab()
|
223 |
+
|
224 |
+
/*
|
225 |
+
* Workaround for Firefix TinyMCE Editor Bug NS_ERROR_UNEXPECTED (http://www.tinymce.com/develop/bugtracker_view.php?id=3152) when loading wp_editor via AJAX
|
226 |
+
* Manual save TinyMCE editors on form submission
|
227 |
+
*/
|
228 |
+
$('#gfpdf_pdf_form').submit(function () {
|
229 |
+
try {
|
230 |
+
tinyMCE.triggerSave()
|
231 |
+
} catch (e) {}
|
232 |
+
|
233 |
+
})
|
234 |
+
|
235 |
+
/* Add listener on submit functionality */
|
236 |
+
$('#gfpdf_pdf_form').submit(function () {
|
237 |
+
/* JSONify the conditional logic so we can pass it through the form and use it in PHP (after running json_decode) */
|
238 |
+
$('#gfpdf_settings\\[conditionalLogic\\]').val(jQuery.toJSON(window.gfpdf_current_pdf.conditionalLogic))
|
239 |
+
})
|
240 |
+
|
241 |
+
}
|
242 |
+
|
243 |
+
/**
|
244 |
+
* Handles our DOM security conditional logic based on the user selection
|
245 |
+
* @return void
|
246 |
+
* @since 4.0
|
247 |
+
*/
|
248 |
+
this.handleSecurityConditionals = function () {
|
249 |
+
|
250 |
+
/* Get the appropriate elements for use */
|
251 |
+
var $secTable = $('#pdf-general-advanced')
|
252 |
+
var $pdfSecurity = $secTable.find('input[name="gfpdf_settings[security]"]')
|
253 |
+
var $format = $secTable.find('input[name="gfpdf_settings[format]"]')
|
254 |
+
|
255 |
+
/* Add change event to admin restrictions to show/hide dependant fields */
|
256 |
+
$pdfSecurity.change(function () {
|
257 |
+
|
258 |
+
if ($(this).is(':checked')) {
|
259 |
+
|
260 |
+
/* Get the format dependancy */
|
261 |
+
var format = $format.filter(':checked').val()
|
262 |
+
|
263 |
+
if ($(this).val() === GFPDF.no || format !== GFPDF.standard) {
|
264 |
+
/* hide security password / privileges */
|
265 |
+
$secTable.find('tr:nth-child(3),tr:nth-child(4),tr:nth-child(5):not(.gfpdf-hidden)').hide()
|
266 |
+
} else {
|
267 |
+
/* show security password / privileges */
|
268 |
+
$secTable.find('tr:nth-child(3),tr:nth-child(4),tr:nth-child(5):not(.gfpdf-hidden)').show()
|
269 |
+
}
|
270 |
+
|
271 |
+
if (format !== GFPDF.standard) {
|
272 |
+
$secTable.find('tr:nth-child(2)').hide()
|
273 |
+
} else {
|
274 |
+
$secTable.find('tr:nth-child(2)').show()
|
275 |
+
}
|
276 |
+
}
|
277 |
+
|
278 |
+
}).trigger('change')
|
279 |
+
|
280 |
+
/* The format field effects the security field. When it changes it triggers the security field as changed */
|
281 |
+
$format.change(function () {
|
282 |
+
if ($(this).is(':checked')) {
|
283 |
+
$pdfSecurity.trigger('change')
|
284 |
+
}
|
285 |
+
}).trigger('change')
|
286 |
+
}
|
287 |
+
|
288 |
+
/**
|
289 |
+
* Add GF JS filter to change the conditional logic object type to our PDF
|
290 |
+
* @return Object
|
291 |
+
* @since 4.0
|
292 |
+
*/
|
293 |
+
this.handlePDFConditionalLogic = function () {
|
294 |
+
|
295 |
+
gform.addFilter('gform_conditional_object', function (object, objectType) {
|
296 |
+
if (objectType === 'gfpdf') {
|
297 |
+
return window.gfpdf_current_pdf
|
298 |
+
}
|
299 |
+
return object
|
300 |
+
})
|
301 |
+
|
302 |
+
/* Add change event to conditional logic field */
|
303 |
+
$('#gfpdf_conditional_logic').change(function () {
|
304 |
+
|
305 |
+
/* Only set up a .conditionalLogic object if it doesn't exist */
|
306 |
+
if (typeof window.gfpdf_current_pdf.conditionalLogic == 'undefined' && $(this).prop('checked')) {
|
307 |
+
|
308 |
+
window.gfpdf_current_pdf.conditionalLogic = new ConditionalLogic()
|
309 |
+
} else if (!$(this).prop('checked')) {
|
310 |
+
|
311 |
+
window.gfpdf_current_pdf.conditionalLogic = null
|
312 |
+
}
|
313 |
+
ToggleConditionalLogic(false, 'gfpdf')
|
314 |
+
|
315 |
+
}).trigger('change')
|
316 |
+
}
|
317 |
+
|
318 |
+
/**
|
319 |
+
* Show / Hide the Restrict Owner when `Enable Public Access` is set to "Yes"
|
320 |
+
* @since 4.0
|
321 |
+
*/
|
322 |
+
this.handleOwnerRestriction = function () {
|
323 |
+
|
324 |
+
var $table = $('#gfpdf-advanced-pdf-options')
|
325 |
+
var $publicAccess = $table.find('input[name="gfpdf_settings[public_access]"]')
|
326 |
+
|
327 |
+
/*
|
328 |
+
* Add change event to admin restrictions to show/hide dependant fields
|
329 |
+
*/
|
330 |
+
$publicAccess.change(function () {
|
331 |
+
|
332 |
+
if ($(this).is(':checked')) {
|
333 |
+
if ($(this).val() === 'Yes') {
|
334 |
+
/* hide user restrictions */
|
335 |
+
$table.find('tr:nth-child(8)').hide()
|
336 |
+
} else {
|
337 |
+
/* show user restrictions */
|
338 |
+
$table.find('tr:nth-child(8)').show()
|
339 |
+
}
|
340 |
+
}
|
341 |
+
}).trigger('change')
|
342 |
+
}
|
343 |
+
|
344 |
+
/**
|
345 |
+
* Process the functionality for the PDF form settings 'list' page
|
346 |
+
* @return void
|
347 |
+
* @since 4.0
|
348 |
+
*/
|
349 |
+
this.doFormSettingsListPage = function () {
|
350 |
+
|
351 |
+
this.setupAJAXListDeleteListener()
|
352 |
+
this.setupAJAXListDuplicateListener()
|
353 |
+
this.setupAJAXListStateListener()
|
354 |
+
}
|
355 |
+
|
356 |
+
/**
|
357 |
+
* Handles the state change of a PDF list item via AJAX
|
358 |
+
* @return void
|
359 |
+
* @since 4.0
|
360 |
+
*/
|
361 |
+
this.setupAJAXListStateListener = function () {
|
362 |
+
|
363 |
+
/* Add live state listener to change active / inactive value */
|
364 |
+
$('#gfpdf_list_form').on('click', '.check-column img', function () {
|
365 |
+
var id = String($(this).data('id'))
|
366 |
+
var that = this
|
367 |
+
|
368 |
+
if (id.length > 0) {
|
369 |
+
var is_active = that.src.indexOf('active1.png') >= 0
|
370 |
+
|
371 |
+
if (is_active) {
|
372 |
+
that.src = that.src.replace('active1.png', 'active0.png')
|
373 |
+
$(that).attr('title', GFPDF.inactive).attr('alt', GFPDF.inactive)
|
374 |
+
} else {
|
375 |
+
that.src = that.src.replace('active0.png', 'active1.png')
|
376 |
+
$(that).attr('title', GFPDF.active).attr('alt', GFPDF.active)
|
377 |
+
}
|
378 |
+
|
379 |
+
/* Set up ajax data */
|
380 |
+
var data = {
|
381 |
+
'action': 'gfpdf_change_state',
|
382 |
+
'nonce': $(this).data('nonce'),
|
383 |
+
'fid': $(this).data('fid'),
|
384 |
+
'pid': $(this).data('id'),
|
385 |
+
}
|
386 |
+
|
387 |
+
/* Do ajax call */
|
388 |
+
self.ajax(data, function (response) {
|
389 |
+
/* Don't do anything with a successful response */
|
390 |
+
})
|
391 |
+
}
|
392 |
+
})
|
393 |
+
}
|
394 |
+
|
395 |
+
/**
|
396 |
+
* Handles the duplicate of a PDF list item via AJAX and fixes up all the nonce actions
|
397 |
+
* @return void
|
398 |
+
* @since 4.0
|
399 |
+
*/
|
400 |
+
this.setupAJAXListDuplicateListener = function () {
|
401 |
+
|
402 |
+
/* Add live duplicate listener */
|
403 |
+
$('#gfpdf_list_form').on('click', 'a.submitduplicate', function () {
|
404 |
+
|
405 |
+
var id = String($(this).data('id'))
|
406 |
+
var that = this
|
407 |
+
|
408 |
+
/* Add spinner */
|
409 |
+
var $spinner = $('<img alt="' + GFPDF.spinnerAlt + '" src="' + GFPDF.spinnerUrl + '" class="gfpdf-spinner gfpdf-spinner-small" />')
|
410 |
+
|
411 |
+
/* Add our spinner */
|
412 |
+
$(this).after($spinner).parent().parent().attr('style', 'position:static; visibility: visible;')
|
413 |
+
|
414 |
+
if (id.length > 0) {
|
415 |
+
/* Set up ajax data */
|
416 |
+
var data = {
|
417 |
+
'action': 'gfpdf_list_duplicate',
|
418 |
+
'nonce': $(this).data('nonce'),
|
419 |
+
'fid': $(this).data('fid'),
|
420 |
+
'pid': $(this).data('id'),
|
421 |
+
}
|
422 |
+
|
423 |
+
/* Do ajax call */
|
424 |
+
self.ajax(data, function (response) {
|
425 |
+
if (response.msg) {
|
426 |
+
|
427 |
+
/* Remove the spinner */
|
428 |
+
$(that).parent().parent().attr('style', '').find('.gfpdf-spinner').remove()
|
429 |
+
|
430 |
+
/* Provide feedback to use */
|
431 |
+
self.show_message(response.msg)
|
432 |
+
|
433 |
+
/* Clone the row to be duplicated */
|
434 |
+
var $row = $(that).parents('tr')
|
435 |
+
var $newRow = $row.clone().css('background', '#baffb8')
|
436 |
+
|
437 |
+
/* Update the edit links to point to the new location */
|
438 |
+
$newRow.find('.column-name > a, .edit a').each(function () {
|
439 |
+
var href = $(this).attr('href')
|
440 |
+
href = self.updateURLParameter(href, 'pid', response.pid)
|
441 |
+
$(this).attr('href', href)
|
442 |
+
})
|
443 |
+
|
444 |
+
/* Update the name field */
|
445 |
+
$newRow.find('.column-name > a').html(response.name)
|
446 |
+
|
447 |
+
/* Find duplicate and delete elements */
|
448 |
+
var $duplicate = $newRow.find('.duplicate a')
|
449 |
+
var $delete = $newRow.find('.delete a')
|
450 |
+
var $state = $newRow.find('.check-column img')
|
451 |
+
var $shortcode = $newRow.find('.column-shortcode input')
|
452 |
+
|
453 |
+
/* Update duplicate ID and nonce pointers so the actions are valid */
|
454 |
+
$duplicate.data('id', response.pid)
|
455 |
+
$duplicate.data('nonce', response.dup_nonce)
|
456 |
+
|
457 |
+
/* Update delete ID and nonce pointers so the actions are valid */
|
458 |
+
$delete.data('id', response.pid)
|
459 |
+
$delete.data('nonce', response.del_nonce)
|
460 |
+
|
461 |
+
/* update state ID and nonce pointers so the actions are valid */
|
462 |
+
$state.data('id', response.pid)
|
463 |
+
$state.data('nonce', response.state_nonce)
|
464 |
+
|
465 |
+
/* Update our shortcode ID */
|
466 |
+
var shortcodeValue = $shortcode.val()
|
467 |
+
shortcodeValue = shortcodeValue.replace(id, response.pid)
|
468 |
+
$shortcode.val(shortcodeValue)
|
469 |
+
|
470 |
+
/* Add fix for alternate row background */
|
471 |
+
var background = ''
|
472 |
+
if ($row.hasClass('alternate')) {
|
473 |
+
$newRow.removeClass('alternate')
|
474 |
+
background = '#FFF'
|
475 |
+
} else {
|
476 |
+
$newRow.addClass('alternate')
|
477 |
+
background = '#f9f9f9'
|
478 |
+
}
|
479 |
+
|
480 |
+
/* Add fix for toggle image */
|
481 |
+
var toggle_src = $state.attr('src')
|
482 |
+
$state
|
483 |
+
.attr('title', GFPDF.inactive)
|
484 |
+
.attr('alt', GFPDF.inactive)
|
485 |
+
.attr('src', toggle_src.replace('active1.png', 'active0.png'))
|
486 |
+
|
487 |
+
/* Add row to node and fade in */
|
488 |
+
$newRow.hide().insertAfter($row).fadeIn().animate({ backgroundColor: background })
|
489 |
+
}
|
490 |
+
})
|
491 |
+
}
|
492 |
+
})
|
493 |
+
}
|
494 |
+
|
495 |
+
/**
|
496 |
+
* Check if the last item was just deleted
|
497 |
+
*/
|
498 |
+
this.maybeShowEmptyRow = function () {
|
499 |
+
var $container = $('#gfpdf_list_form tbody')
|
500 |
+
|
501 |
+
if ($container.find('tr').length === 0) {
|
502 |
+
var $row = $('<tr>').addClass('no-items')
|
503 |
+
var $cell = $('<td>').attr('colspan', '5').addClass('colspanchange')
|
504 |
+
var $add_new = $('<a>').attr('href', $('#add-new-pdf').attr('href')).append(GFPDF.letsGoCreateOne + '.')
|
505 |
+
$cell.append(GFPDF.thisFormHasNoPdfs).append(' ').append($add_new)
|
506 |
+
$row.append($cell)
|
507 |
+
$container.append($row)
|
508 |
+
}
|
509 |
+
}
|
510 |
+
|
511 |
+
/**
|
512 |
+
* Handles the deletion of a PDF list item via AJAX
|
513 |
+
* @return void
|
514 |
+
* @since 4.0
|
515 |
+
*/
|
516 |
+
this.setupAJAXListDeleteListener = function () {
|
517 |
+
|
518 |
+
/* Set up our delete dialog */
|
519 |
+
var $deleteDialog = $('#delete-confirm')
|
520 |
+
|
521 |
+
var deleteButtons = [ {
|
522 |
+
text: GFPDF.delete,
|
523 |
+
click: function () {
|
524 |
+
/* handle ajax call */
|
525 |
+
$deleteDialog.wpdialog('close')
|
526 |
+
$elm = $($deleteDialog.data('elm'))
|
527 |
+
|
528 |
+
/* Add spinner */
|
529 |
+
var $spinner = $('<img alt="' + GFPDF.spinnerAlt + '" src="' + GFPDF.spinnerUrl + '" class="gfpdf-spinner gfpdf-spinner-small" />')
|
530 |
+
|
531 |
+
/* Add the spinner */
|
532 |
+
$elm.append($spinner).parent().parent().attr('style', 'position:static; visibility: visible;')
|
533 |
+
|
534 |
+
var data = {
|
535 |
+
'action': 'gfpdf_list_delete',
|
536 |
+
'nonce': $elm.data('nonce'),
|
537 |
+
'fid': $elm.data('fid'),
|
538 |
+
'pid': $elm.data('id'),
|
539 |
+
}
|
540 |
+
|
541 |
+
self.ajax(data, function (response) {
|
542 |
+
if (response.msg) {
|
543 |
+
/* Remove spinner */
|
544 |
+
$elm.parent().parent().attr('style', '').find('.gfpdf-spinner').remove()
|
545 |
+
|
546 |
+
self.show_message(response.msg)
|
547 |
+
var $row = $elm.parents('tr')
|
548 |
+
$row.css('background', '#ffb8b8').fadeOut(400, function () {
|
549 |
+
this.remove()
|
550 |
+
self.maybeShowEmptyRow()
|
551 |
+
})
|
552 |
+
}
|
553 |
+
|
554 |
+
$deleteDialog.data('elm', null)
|
555 |
+
})
|
556 |
+
|
557 |
+
}
|
558 |
+
},
|
559 |
+
{
|
560 |
+
text: GFPDF.cancel,
|
561 |
+
click: function () {
|
562 |
+
/* cancel */
|
563 |
+
$deleteDialog.wpdialog('close').data('elm', null)
|
564 |
+
}
|
565 |
+
} ]
|
566 |
+
|
567 |
+
/* Add our delete dialog box */
|
568 |
+
this.wp_dialog($deleteDialog, deleteButtons, 300, 175)
|
569 |
+
|
570 |
+
/* Add live delete listener */
|
571 |
+
$('#gfpdf_list_form').on('click', 'a.submitdelete', function () {
|
572 |
+
var id = String($(this).data('id'))
|
573 |
+
if (id.length > 0 && !$deleteDialog.data('elm')) {
|
574 |
+
/* Allow responsiveness */
|
575 |
+
self.resizeDialogIfNeeded($deleteDialog, 300, 175)
|
576 |
+
|
577 |
+
$deleteDialog.wpdialog('open').data('elm', this)
|
578 |
+
}
|
579 |
+
})
|
580 |
+
}
|
581 |
+
|
582 |
+
/**
|
583 |
+
* Handle our AJAX tabs to make it easier to navigate around our settings
|
584 |
+
* @return void
|
585 |
+
* @since 4.0
|
586 |
+
*/
|
587 |
+
this.setupPdfTabs = function () {
|
588 |
+
|
589 |
+
/* Hide all containers except the first one */
|
590 |
+
$('.gfpdf-tab-container').not(":eq(0)").hide()
|
591 |
+
|
592 |
+
/* Add click handler when our nav is selected */
|
593 |
+
$('.gfpdf-tab-wrapper a').click(function () {
|
594 |
+
|
595 |
+
/* Reset the active class */
|
596 |
+
$(this).parents('ul').find('a').removeClass('current')
|
597 |
+
|
598 |
+
/* Add the new active class */
|
599 |
+
$(this).addClass('current').blur()
|
600 |
+
|
601 |
+
/* Hide all containers */
|
602 |
+
$('.gfpdf-tab-container').hide()
|
603 |
+
|
604 |
+
/* Show new active container */
|
605 |
+
$($(this).attr('href')).show()
|
606 |
+
|
607 |
+
return false
|
608 |
+
|
609 |
+
})
|
610 |
+
}
|
611 |
+
|
612 |
+
/**
|
613 |
+
* Add change event listeners on our toggle params and toggle the container
|
614 |
+
* @return void
|
615 |
+
* @since 4.0
|
616 |
+
*/
|
617 |
+
this.setupToggledFields = function () {
|
618 |
+
|
619 |
+
$('form').off('change', '.gfpdf-input-toggle').on('change', '.gfpdf-input-toggle', function () {
|
620 |
+
|
621 |
+
var $container = $(this).parent().next()
|
622 |
+
|
623 |
+
/* Currently checked so hide out input and if cotains rich_text, textarea or input we will delete values */
|
624 |
+
if ($(this).prop('checked')) {
|
625 |
+
$container.slideDown('slow')
|
626 |
+
} else {
|
627 |
+
$container.slideUp('slow')
|
628 |
+
|
629 |
+
/* Remove TinyMCE Content */
|
630 |
+
$container.find('.wp-editor-area').each(function () {
|
631 |
+
var editor = tinyMCE.get($(this).attr('id'))
|
632 |
+
|
633 |
+
if (editor !== null) {
|
634 |
+
editor.setContent('')
|
635 |
+
}
|
636 |
+
|
637 |
+
})
|
638 |
+
|
639 |
+
/* Remove textarea content */
|
640 |
+
$container.find('textarea').each(function () {
|
641 |
+
$(this).val('')
|
642 |
+
})
|
643 |
+
}
|
644 |
+
})
|
645 |
+
}
|
646 |
+
|
647 |
+
/**
|
648 |
+
* PDF Templates can assign their own custom settings which can enhance a template
|
649 |
+
* This function setups the required listeners and functionality to allow this behaviour
|
650 |
+
* @return return
|
651 |
+
* @since 4.0
|
652 |
+
*/
|
653 |
+
this.setupDynamicTemplateFields = function () {
|
654 |
+
|
655 |
+
/* Add change listener to our template */
|
656 |
+
$('#gfpdf_settings\\[template\\]').off('change').change(function () {
|
657 |
+
|
658 |
+
/* Add spinner */
|
659 |
+
var $spinner = $('<img alt="' + GFPDF.spinnerAlt + '" src="' + GFPDF.spinnerUrl + '" class="gfpdf-spinner" />')
|
660 |
+
|
661 |
+
$(this).next().after($spinner)
|
662 |
+
|
663 |
+
var data = {
|
664 |
+
'action': 'gfpdf_get_template_fields',
|
665 |
+
'nonce': GFPDF.ajaxNonce,
|
666 |
+
'template': $(this).val(),
|
667 |
+
'type': $(this).attr('id'),
|
668 |
+
'id': $('#gform_id').val(),
|
669 |
+
'gform_pdf_id': $('#gform_pdf_id').val(),
|
670 |
+
}
|
671 |
+
|
672 |
+
self.ajax(data, function (response) {
|
673 |
+
|
674 |
+
/* Remove our UI loader */
|
675 |
+
$spinner.remove()
|
676 |
+
|
677 |
+
/* Reset our legacy Advanced Template option */
|
678 |
+
$('input[name="gfpdf_settings[advanced_template]"][value="No"]').prop("checked", true).trigger('change')
|
679 |
+
|
680 |
+
/* Only process if the response is valid */
|
681 |
+
if (response.fields) {
|
682 |
+
|
683 |
+
/* Backwards compatibility support prior to Gravity Forms 2.3 */
|
684 |
+
if (window.gfMergeTags) {
|
685 |
+
/* Remove any existing mergetag-marked inputs so they aren't processed twice after we add our new fields to the DOM */
|
686 |
+
$('.merge-tag-support').removeClass('merge-tag-support')
|
687 |
+
$('.all-merge-tags a.open-list').off('click')
|
688 |
+
}
|
689 |
+
|
690 |
+
/* Remove any previously loaded editors to prevent conflicts loading an editor with same name */
|
691 |
+
$.each(response.editors, function (index, value) {
|
692 |
+
|
693 |
+
var editor = tinyMCE.get(value)
|
694 |
+
if (editor !== null) {
|
695 |
+
/* Bug Fix for Firefox - http://www.tinymce.com/develop/bugtracker_view.php?id=3152 */
|
696 |
+
try {
|
697 |
+
tinyMCE.remove(editor)
|
698 |
+
} catch (e) {}
|
699 |
+
}
|
700 |
+
|
701 |
+
})
|
702 |
+
|
703 |
+
/* Replace the custom appearance with the AJAX response fields */
|
704 |
+
$('#pdf-custom-appearance').hide().html(response.fields).fadeIn()
|
705 |
+
|
706 |
+
/* Ensure our template nav item isn't hidden */
|
707 |
+
$('#gfpdf-custom-appearance-nav').show()
|
708 |
+
|
709 |
+
/* Load our new editors */
|
710 |
+
self.loadTinyMCEEditor(response.editors, response.editor_init)
|
711 |
+
|
712 |
+
/* reinitialise new dom elements */
|
713 |
+
self.initCommon()
|
714 |
+
self.doMergetags()
|
715 |
+
|
716 |
+
} else {
|
717 |
+
/* Hide our template nav item as there are no fields and clear our the HTML */
|
718 |
+
$('#gfpdf-custom-appearance-nav').hide()
|
719 |
+
$('#pdf-custom-appearance').html('')
|
720 |
+
}
|
721 |
+
|
722 |
+
/* Check if we should hide or show our font fields */
|
723 |
+
if (response.template_type) {
|
724 |
+
self.toggleFontAppearance(response.template_type)
|
725 |
+
}
|
726 |
+
})
|
727 |
+
})
|
728 |
+
}
|
729 |
+
|
730 |
+
/**
|
731 |
+
* Handles individual add-on license key deactivation via AJAX
|
732 |
+
* @since 4.2
|
733 |
+
*/
|
734 |
+
this.setupLicenseDeactivation = function () {
|
735 |
+
$('.gfpdf-deactivate-license').click(function () {
|
736 |
+
/* Do AJAX call so user can deactivate license */
|
737 |
+
var $container = $(this).parent()
|
738 |
+
$container.find('.gf_settings_description label').html('')
|
739 |
+
|
740 |
+
/* Add spinner */
|
741 |
+
var $spinner = $('<img alt="' + GFPDF.spinnerAlt + '" src="' + GFPDF.spinnerUrl + '" class="gfpdf-spinner" />')
|
742 |
+
|
743 |
+
/* Add our spinner */
|
744 |
+
$(this).append($spinner)
|
745 |
+
|
746 |
+
/* Set up ajax data */
|
747 |
+
var slug = $(this).data('addon-name')
|
748 |
+
|
749 |
+
var data = {
|
750 |
+
'action': 'gfpdf_deactivate_license',
|
751 |
+
'addon_name': slug,
|
752 |
+
'license': $(this).data('license'),
|
753 |
+
'nonce': $(this).data('nonce'),
|
754 |
+
}
|
755 |
+
|
756 |
+
/* Do ajax call */
|
757 |
+
self.ajax(data, function (response) {
|
758 |
+
|
759 |
+
/* Remove our loading spinner */
|
760 |
+
$spinner.remove()
|
761 |
+
|
762 |
+
if (response.success) {
|
763 |
+
/* cleanup inputs */
|
764 |
+
$('#gfpdf_settings\\[license_' + slug + '\\]').val('')
|
765 |
+
$('#gfpdf_settings\\[license_' + slug + '_message\\]').val('')
|
766 |
+
$('#gfpdf_settings\\[license_' + slug + '_status\\]').val('')
|
767 |
+
$container.find('i').remove()
|
768 |
+
$container.find('a').remove()
|
769 |
+
|
770 |
+
$container.find('.gf_settings_description label').html(response.success)
|
771 |
+
} else {
|
772 |
+
/* Show error message */
|
773 |
+
$container.find('.gf_settings_description label').html(response.error)
|
774 |
+
}
|
775 |
+
})
|
776 |
+
|
777 |
+
return false
|
778 |
+
})
|
779 |
+
}
|
780 |
+
|
781 |
+
/**
|
782 |
+
* Check if the template type is 'legacy' and hide the font type, size and colour, otherwise show those fields
|
783 |
+
* @param type
|
784 |
+
* @since 4.0
|
785 |
+
*/
|
786 |
+
this.toggleFontAppearance = function (type) {
|
787 |
+
var $rows = $('#pdf-general-appearance').find('tr.gfpdf_font_type, tr.gfpdf_font_size, tr.gfpdf_font_colour')
|
788 |
+
|
789 |
+
/* Hide our font fields if processing a legacy template */
|
790 |
+
if (type == 'legacy') {
|
791 |
+
$rows.hide()
|
792 |
+
} else { /* Ensure the fields are showing */
|
793 |
+
$rows.show()
|
794 |
+
}
|
795 |
+
}
|
796 |
+
|
797 |
+
/**
|
798 |
+
* Check if the current PDF template selection uses the legacy Enable Advanced Templating option
|
799 |
+
* and hide the Appearance tab altogether
|
800 |
+
* @since 4.0
|
801 |
+
*/
|
802 |
+
this.toggleAppearanceTab = function () {
|
803 |
+
|
804 |
+
$('input[name="gfpdf_settings[advanced_template]"]').change(function () {
|
805 |
+
if ($(this).val() == 'Yes') {
|
806 |
+
$('#gfpdf-appearance-nav').hide()
|
807 |
+
} else {
|
808 |
+
$('#gfpdf-appearance-nav').show()
|
809 |
+
}
|
810 |
+
})
|
811 |
+
|
812 |
+
$('input[name="gfpdf_settings[advanced_template]"]:checked').trigger('change')
|
813 |
+
}
|
814 |
+
|
815 |
+
/**
|
816 |
+
* Initialises AJAX-loaded wp_editor TinyMCE containers for use
|
817 |
+
* @param Array editors The DOM element IDs to parse
|
818 |
+
* @param Object settings The TinyMCE settings to use
|
819 |
+
* @return void
|
820 |
+
* @since 4.0
|
821 |
+
*/
|
822 |
+
this.loadTinyMCEEditor = function (editors, settings) {
|
823 |
+
|
824 |
+
if (settings != null) {
|
825 |
+
/* Ensure appropriate settings defaults */
|
826 |
+
settings.body_class = 'id post-type-post post-status-publish post-format-standard'
|
827 |
+
settings.formats = {
|
828 |
+
alignleft: [
|
829 |
+
{ selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles: { textAlign: 'left' } },
|
830 |
+
{ selector: 'img,table,dl.wp-caption', classes: 'alignleft' }
|
831 |
+
],
|
832 |
+
aligncenter: [
|
833 |
+
{ selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles: { textAlign: 'center' } },
|
834 |
+
{ selector: 'img,table,dl.wp-caption', classes: 'aligncenter' }
|
835 |
+
],
|
836 |
+
alignright: [
|
837 |
+
{ selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles: { textAlign: 'right' } },
|
838 |
+
{ selector: 'img,table,dl.wp-caption', classes: 'alignright' }
|
839 |
+
],
|
840 |
+
strikethrough: { inline: 'del' }
|
841 |
+
}
|
842 |
+
}
|
843 |
+
|
844 |
+
/* Load our new editors */
|
845 |
+
$.each(editors, function (index, fullId) {
|
846 |
+
|
847 |
+
/* Setup out selector */
|
848 |
+
settings.selector = '#' + fullId
|
849 |
+
|
850 |
+
/* Initialise our editor */
|
851 |
+
tinyMCE.init(settings)
|
852 |
+
|
853 |
+
/* Add our editor to the DOM */
|
854 |
+
tinyMCE.execCommand('mceAddEditor', false, fullId)
|
855 |
+
|
856 |
+
/* Enable WP quick tags */
|
857 |
+
if (typeof(QTags) == 'function') {
|
858 |
+
QTags({ 'id': fullId })
|
859 |
+
QTags._buttonsInit()
|
860 |
+
|
861 |
+
/* remember last tab selected */
|
862 |
+
if (typeof switchEditors.switchto === 'function') {
|
863 |
+
switchEditors.switchto(jQuery('#wp-' + fullId + '-wrap').find('.wp-switch-editor.switch-' + ( getUserSetting('editor') == 'html' ? 'html' : 'tmce' ))[ 0 ])
|
864 |
+
}
|
865 |
+
}
|
866 |
+
|
867 |
+
})
|
868 |
+
}
|
869 |
+
|
870 |
+
/**
|
871 |
+
* Rich Media Uploader
|
872 |
+
* JS Pulled straight from Easy Digital Download's admin-scripts.js
|
873 |
+
* @return void
|
874 |
+
* @since 4.0
|
875 |
+
*/
|
876 |
+
this.doUploadListener = function () {
|
877 |
+
// WP 3.5+ uploader
|
878 |
+
var file_frame
|
879 |
+
window.formfield = ''
|
880 |
+
|
881 |
+
$('body').off('click', '.gfpdf_settings_upload_button').on('click', '.gfpdf_settings_upload_button', function (e) {
|
882 |
+
e.preventDefault()
|
883 |
+
|
884 |
+
var $button = $(this)
|
885 |
+
window.formfield = $(this).parent().prev()
|
886 |
+
|
887 |
+
/* If the media frame already exists, reopen it. */
|
888 |
+
if (file_frame) {
|
889 |
+
file_frame.open()
|
890 |
+
return
|
891 |
+
}
|
892 |
+
|
893 |
+
/* Create the media frame. */
|
894 |
+
file_frame = wp.media.frames.file_frame = wp.media({
|
895 |
+
title: $button.data('uploader-title'),
|
896 |
+
button: {
|
897 |
+
text: $button.data('uploader-button-text')
|
898 |
+
},
|
899 |
+
multiple: false,
|
900 |
+
})
|
901 |
+
|
902 |
+
/* When a file is selected, run a callback. */
|
903 |
+
file_frame.on('select', function () {
|
904 |
+
var selection = file_frame.state().get('selection')
|
905 |
+
selection.each(function (attachment, index) {
|
906 |
+
attachment = attachment.toJSON()
|
907 |
+
window.formfield.val(attachment.url).change()
|
908 |
+
})
|
909 |
+
})
|
910 |
+
|
911 |
+
/* Finally, open the modal */
|
912 |
+
file_frame.open()
|
913 |
+
})
|
914 |
+
}
|
915 |
+
|
916 |
+
/**
|
917 |
+
* Check if a Gravity PDF color picker field is present and initialise
|
918 |
+
* @return void
|
919 |
+
* @since 4.0
|
920 |
+
*/
|
921 |
+
this.doColorPicker = function () {
|
922 |
+
|
923 |
+
$('.gfpdf-color-picker').each(function () {
|
924 |
+
$(this).wpColorPicker()
|
925 |
+
})
|
926 |
+
}
|
927 |
+
|
928 |
+
/**
|
929 |
+
* Remove any existing merge tags and reinitialise
|
930 |
+
* @return void
|
931 |
+
* @since 4.0
|
932 |
+
*/
|
933 |
+
this.doMergetags = function () {
|
934 |
+
|
935 |
+
/* Backwards compatibility support prior to Gravity Forms 2.3 */
|
936 |
+
if (window.gfMergeTags && typeof form != 'undefined') {
|
937 |
+
window.gfMergeTags = new gfMergeTagsObj(form)
|
938 |
+
window.gfMergeTags.getTargetElement = this.resetGfMergeTags
|
939 |
+
}
|
940 |
+
|
941 |
+
/* Gravity Forms 2.3+ Merge tag support */
|
942 |
+
if (!window.gfMergeTags && typeof form != 'undefined' && $('.merge-tag-support').length >= 0) {
|
943 |
+
$('.merge-tag-support').each(function () {
|
944 |
+
new gfMergeTagsObj(form, $(this))
|
945 |
+
});
|
946 |
+
}
|
947 |
+
}
|
948 |
+
|
949 |
+
/**
|
950 |
+
* Escape any meta characters in the target element ID, as per the jQuery spec
|
951 |
+
*
|
952 |
+
* @param elem
|
953 |
+
* @returns {*|HTMLElement}
|
954 |
+
* @since 4.1
|
955 |
+
*/
|
956 |
+
this.resetGfMergeTags = function (elem) {
|
957 |
+
var $elem = $(elem)
|
958 |
+
var selector = $elem.parents('span.all-merge-tags').data('targetElement')
|
959 |
+
|
960 |
+
/* escape any meta-characters as per jQuery Spec http://api.jquery.com/category/selectors/ */
|
961 |
+
selector = selector.replace(/[!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~]/g, "\\$&")
|
962 |
+
|
963 |
+
return $('#' + selector)
|
964 |
+
}
|
965 |
+
|
966 |
+
/**
|
967 |
+
* Show / Hide our custom paper size as needed
|
968 |
+
* @return void
|
969 |
+
* @since 4.0
|
970 |
+
*/
|
971 |
+
this.setupCustomPaperSize = function () {
|
972 |
+
|
973 |
+
$('.gfpdf_paper_size').each(function () {
|
974 |
+
var $customPaperSize = $(this).nextAll('.gfpdf_paper_size_other').first()
|
975 |
+
var $paperSize = $(this).find('select')
|
976 |
+
|
977 |
+
/* Add our change event */
|
978 |
+
$paperSize.off('change').change(function () {
|
979 |
+
if ($(this).val() === 'CUSTOM') {
|
980 |
+
$customPaperSize.fadeIn()
|
981 |
+
} else {
|
982 |
+
$customPaperSize.fadeOut()
|
983 |
+
}
|
984 |
+
}).trigger('change')
|
985 |
+
|
986 |
+
})
|
987 |
+
|
988 |
+
}
|
989 |
+
|
990 |
+
/**
|
991 |
+
* Our &tab=(.+?) url param causes issues with the default GF navigation
|
992 |
+
* @return void
|
993 |
+
* @since 4.0
|
994 |
+
*/
|
995 |
+
this.cleanupGFNavigation = function () {
|
996 |
+
var $nav = $('#gform_tabs a')
|
997 |
+
|
998 |
+
$nav.each(function () {
|
999 |
+
var href = $(this).attr('href')
|
1000 |
+
var regex = new RegExp('&tab=[^&;]*', 'g')
|
1001 |
+
|
1002 |
+
$(this).attr('href', href.replace(regex, ''))
|
1003 |
+
})
|
1004 |
+
}
|
1005 |
+
|
1006 |
+
/**
|
1007 |
+
* Do an AJAX call to verify a user is protected
|
1008 |
+
* @return void
|
1009 |
+
* @since 4.0
|
1010 |
+
*/
|
1011 |
+
this.runPDFAccessCheck = function () {
|
1012 |
+
var $status = $('#gfpdf-direct-pdf-protection-check')
|
1013 |
+
|
1014 |
+
if ($status.length > 0) {
|
1015 |
+
/* Do our AJAX call */
|
1016 |
+
|
1017 |
+
/* Add spinner */
|
1018 |
+
var $spinner = $('<img alt="' + GFPDF.spinnerAlt + '" src="' + GFPDF.spinnerUrl + '" class="gfpdf-spinner" />')
|
1019 |
+
|
1020 |
+
/* Add our spinner */
|
1021 |
+
$status.append($spinner)
|
1022 |
+
|
1023 |
+
/* Set up ajax data */
|
1024 |
+
var data = {
|
1025 |
+
'action': 'gfpdf_has_pdf_protection',
|
1026 |
+
'nonce': $status.data('nonce'),
|
1027 |
+
}
|
1028 |
+
|
1029 |
+
/* Do ajax call */
|
1030 |
+
this.ajax(data, function (response) {
|
1031 |
+
|
1032 |
+
/* Remove our loading spinner */
|
1033 |
+
$spinner.remove()
|
1034 |
+
|
1035 |
+
if (response === true) {
|
1036 |
+
/* enable our protected message */
|
1037 |
+
$status.find('#gfpdf-direct-pdf-check-protected').show()
|
1038 |
+
} else {
|
1039 |
+
/* enable our unprotected message */
|
1040 |
+
$status.find('#gfpdf-direct-pdf-check-unprotected').show()
|
1041 |
+
}
|
1042 |
+
})
|
1043 |
+
}
|
1044 |
+
}
|
1045 |
+
|
1046 |
+
/**
|
1047 |
+
* Enable dynamic required fields on the Gravity Forms PDF Settings page
|
1048 |
+
* This function will highlight to the user which fields should be processed, and disable in-browser validation
|
1049 |
+
* @return void
|
1050 |
+
* @since 4.0
|
1051 |
+
*/
|
1052 |
+
this.setupRequiredFields = function ($elm) {
|
1053 |
+
/* prevent in browser validation */
|
1054 |
+
$elm.attr('novalidate', 'novalidate')
|
1055 |
+
|
1056 |
+
/* gf compatibility + disable automatic field validation */
|
1057 |
+
$elm.find('tr input[type="submit"]').click(function () {
|
1058 |
+
$elm.addClass('formSubmitted')
|
1059 |
+
})
|
1060 |
+
|
1061 |
+
/* add the required star to make it easier for users */
|
1062 |
+
$elm.find('tr').each(function () {
|
1063 |
+
$(this).find(':input[required=""]:first, :input[required]:first').parents('tr').find('th').append('<span class="gfield_required">*</span>')
|
1064 |
+
})
|
1065 |
+
}
|
1066 |
+
|
1067 |
+
/**
|
1068 |
+
* Because we are using the WordPress Settings API Gravity Forms tooltip support was lacking
|
1069 |
+
* This method fixes that issue
|
1070 |
+
* @return void
|
1071 |
+
* @since 4.0
|
1072 |
+
*/
|
1073 |
+
this.showTooltips = function () {
|
1074 |
+
|
1075 |
+
if (typeof gform_initialize_tooltips !== 'function') {
|
1076 |
+
return
|
1077 |
+
}
|
1078 |
+
|
1079 |
+
$('.gf_hidden_tooltip').each(function () {
|
1080 |
+
$(this)
|
1081 |
+
.parent()
|
1082 |
+
.siblings('th:first')
|
1083 |
+
.append(' ')
|
1084 |
+
.append(
|
1085 |
+
self.get_tooltip($(this).html())
|
1086 |
+
)
|
1087 |
+
|
1088 |
+
$(this).remove()
|
1089 |
+
})
|
1090 |
+
|
1091 |
+
gform_initialize_tooltips()
|
1092 |
+
}
|
1093 |
+
|
1094 |
+
/**
|
1095 |
+
* Set up 'chosen' select boxes
|
1096 |
+
* @return void
|
1097 |
+
* @since 4.0
|
1098 |
+
*/
|
1099 |
+
this.setupSelectBoxes = function () {
|
1100 |
+
$('.gfpdf-chosen').each(function () {
|
1101 |
+
|
1102 |
+
$(this).chosen({
|
1103 |
+
disable_search_threshold: 5,
|
1104 |
+
width: '100%',
|
1105 |
+
})
|
1106 |
+
})
|
1107 |
+
}
|
1108 |
+
|
1109 |
+
/**
|
1110 |
+
* Controls the Advanced Options hide / show functionality
|
1111 |
+
* By default these fields are hidden, but are show automatically if an error occurs.
|
1112 |
+
* @return void
|
1113 |
+
* @since 4.0
|
1114 |
+
*/
|
1115 |
+
this.setup_advanced_options = function () {
|
1116 |
+
var $advanced_options_toggle_container = $('.gfpdf-advanced-options')
|
1117 |
+
var $advanced_options_container = $advanced_options_toggle_container.prev()
|
1118 |
+
var $advanced_options = $advanced_options_toggle_container.find('a')
|
1119 |
+
|
1120 |
+
/*
|
1121 |
+
* Show / Hide Advanced options
|
1122 |
+
*/
|
1123 |
+
$advanced_options.click(function () {
|
1124 |
+
var click = this
|
1125 |
+
|
1126 |
+
/* toggle our slider */
|
1127 |
+
$advanced_options_container.slideToggle(600, function () {
|
1128 |
+
/* Toggle our link text */
|
1129 |
+
var text = $(click).text()
|
1130 |
+
$(click).text(
|
1131 |
+
text == GFPDF.showAdvancedOptions ? GFPDF.hideAdvancedOptions : GFPDF.showAdvancedOptions
|
1132 |
+
)
|
1133 |
+
})
|
1134 |
+
|
1135 |
+
return false
|
1136 |
+
})
|
1137 |
+
|
1138 |
+
if ($('.gfpdf-advanced-options').prev().find('.gfield_error').length) {
|
1139 |
+
$advanced_options_container.show()
|
1140 |
+
}
|
1141 |
+
}
|
1142 |
+
|
1143 |
+
/**
|
1144 |
+
* The general settings model method
|
1145 |
+
* This sets up and processes any of the JS that needs to be applied on the general settings tab
|
1146 |
+
* @return void
|
1147 |
+
* @since 4.0
|
1148 |
+
*/
|
1149 |
+
this.generalSettings = function () {
|
1150 |
+
this.setupRequiredFields($('#pdfextended-settings > form'))
|
1151 |
+
|
1152 |
+
var $table = $('#pdf-general-security')
|
1153 |
+
var $adminRestrictions = $table.find('input[name="gfpdf_settings[default_restrict_owner]"]')
|
1154 |
+
|
1155 |
+
/*
|
1156 |
+
* Add change event to admin restrictions to show/hide dependant fields
|
1157 |
+
*/
|
1158 |
+
$adminRestrictions.change(function () {
|
1159 |
+
|
1160 |
+
if ($(this).is(':checked')) {
|
1161 |
+
if ($(this).val() === 'Yes') {
|
1162 |
+
/* hide user restrictions and logged out user timeout */
|
1163 |
+
$table.find('tr:nth-child(3)').hide()
|
1164 |
+
} else {
|
1165 |
+
/* hide user restrictions and logged out user timeout */
|
1166 |
+
$table.find('tr:nth-child(3)').show()
|
1167 |
+
}
|
1168 |
+
}
|
1169 |
+
}).trigger('change')
|
1170 |
+
|
1171 |
+
/* setup advanced options */
|
1172 |
+
this.setup_advanced_options()
|
1173 |
+
}
|
1174 |
+
|
1175 |
+
/**
|
1176 |
+
* The tools settings model method
|
1177 |
+
* This sets up and processes any of the JS that needs to be applied on the tools settings tab
|
1178 |
+
* @since 4.0
|
1179 |
+
*/
|
1180 |
+
this.toolsSettings = function () {
|
1181 |
+
this.setupToolsTemplateInstallerDialog()
|
1182 |
+
this.setupToolsFontsDialog()
|
1183 |
+
this.setupToolsUninstallDialog()
|
1184 |
+
}
|
1185 |
+
|
1186 |
+
/**
|
1187 |
+
* Handles the Template Installer Dialog Box
|
1188 |
+
* @return void
|
1189 |
+
* @since 4.0
|
1190 |
+
*/
|
1191 |
+
this.setupToolsTemplateInstallerDialog = function () {
|
1192 |
+
|
1193 |
+
var $copy = $('#gfpdf_settings\\[setup_templates\\]')
|
1194 |
+
/* escape braces */
|
1195 |
+
var $copyDialog = $('#setup-templates-confirm')
|
1196 |
+
|
1197 |
+
/* Set up copy dialog */
|
1198 |
+
var copyButtons = [ {
|
1199 |
+
text: GFPDF.continue,
|
1200 |
+
click: function () {
|
1201 |
+
/* submit form */
|
1202 |
+
$copy.unbind().click()
|
1203 |
+
}
|
1204 |
+
},
|
1205 |
+
{
|
1206 |
+
text: GFPDF.cancel,
|
1207 |
+
click: function () {
|
1208 |
+
/* cancel */
|
1209 |
+
$copyDialog.wpdialog('close')
|
1210 |
+
}
|
1211 |
+
} ]
|
1212 |
+
|
1213 |
+
if ($copyDialog.length) {
|
1214 |
+
this.wp_dialog($copyDialog, copyButtons, 500, 350)
|
1215 |
+
|
1216 |
+
$copy.click(function () {
|
1217 |
+
/* Allow responsiveness */
|
1218 |
+
self.resizeDialogIfNeeded($copyDialog, 500, 350)
|
1219 |
+
|
1220 |
+
$copyDialog.wpdialog('open')
|
1221 |
+
return false
|
1222 |
+
})
|
1223 |
+
}
|
1224 |
+
}
|
1225 |
+
|
1226 |
+
/**
|
1227 |
+
* Handles the Fonts Dialog Box
|
1228 |
+
* @return void
|
1229 |
+
* @since 4.0
|
1230 |
+
*/
|
1231 |
+
this.setupToolsFontsDialog = function () {
|
1232 |
+
var $font = $('#gfpdf_settings\\[manage_fonts\\]')
|
1233 |
+
/* escape braces */
|
1234 |
+
var $fontDialog = $('#manage-font-files')
|
1235 |
+
|
1236 |
+
/* setup fonts dialog */
|
1237 |
+
this.wp_dialog($fontDialog, [], 500, 500)
|
1238 |
+
|
1239 |
+
$font.click(function () {
|
1240 |
+
/* Allow responsiveness */
|
1241 |
+
self.resizeDialogIfNeeded($fontDialog, 500, 500)
|
1242 |
+
|
1243 |
+
$fontDialog.wpdialog('open')
|
1244 |
+
return false
|
1245 |
+
})
|
1246 |
+
|
1247 |
+
/* Check if our manage_fonts hash and open the dialog */
|
1248 |
+
if (window.location.hash) {
|
1249 |
+
if (window.location.hash == '#manage_fonts') {
|
1250 |
+
$font.click()
|
1251 |
+
}
|
1252 |
+
}
|
1253 |
+
}
|
1254 |
+
|
1255 |
+
/**
|
1256 |
+
* Handles the Uninstall Dialog Box
|
1257 |
+
* @return void
|
1258 |
+
* @since 4.0
|
1259 |
+
*/
|
1260 |
+
this.setupToolsUninstallDialog = function () {
|
1261 |
+
var $uninstall = $('#gfpdf-uninstall')
|
1262 |
+
var $uninstallDialog = $('#uninstall-confirm')
|
1263 |
+
|
1264 |
+
/* Set up uninstall dialog */
|
1265 |
+
var uninstallButtons = [ {
|
1266 |
+
text: GFPDF.uninstall,
|
1267 |
+
click: function () {
|
1268 |
+
/* submit form */
|
1269 |
+
$uninstall.parents('form').submit()
|
1270 |
+
}
|
1271 |
+
},
|
1272 |
+
{
|
1273 |
+
text: GFPDF.cancel,
|
1274 |
+
click: function () {
|
1275 |
+
/* cancel */
|
1276 |
+
$uninstallDialog.wpdialog('close')
|
1277 |
+
}
|
1278 |
+
} ]
|
1279 |
+
|
1280 |
+
this.wp_dialog($uninstallDialog, uninstallButtons, 500, 175)
|
1281 |
+
|
1282 |
+
$uninstall.click(function () {
|
1283 |
+
/* Allow responsiveness */
|
1284 |
+
self.resizeDialogIfNeeded($uninstallDialog, 500, 175)
|
1285 |
+
|
1286 |
+
$uninstallDialog.wpdialog('open')
|
1287 |
+
return false
|
1288 |
+
})
|
1289 |
+
}
|
1290 |
+
|
1291 |
+
/**
|
1292 |
+
* Check the current browser width and height and set the dialog box size to fit
|
1293 |
+
* If the size is over 500 pixels (width or height) it will default to 500
|
1294 |
+
*
|
1295 |
+
* @param $dialog an object initialised with this.wp_dialog
|
1296 |
+
* @param Integer maxWidth The maximum width of the dialog box, if it will fit
|
1297 |
+
* @param Integer maxHeight The maximum height of the dialog box, if it will fit
|
1298 |
+
* @return void
|
1299 |
+
* @since 4.0
|
1300 |
+
*/
|
1301 |
+
this.resizeDialogIfNeeded = function ($dialog, maxWidth, maxHeight) {
|
1302 |
+
var windowWidth = $(window).width()
|
1303 |
+
var windowHeight = $(window).height()
|
1304 |
+
|
1305 |
+
var dialogWidth = (windowWidth < 500) ? windowWidth - 20 : maxWidth
|
1306 |
+
var dialogHeight = (windowHeight < 500) ? windowHeight - 50 : maxHeight
|
1307 |
+
|
1308 |
+
$dialog.wpdialog('option', 'width', dialogWidth)
|
1309 |
+
$dialog.wpdialog('option', 'height', dialogHeight)
|
1310 |
+
}
|
1311 |
+
|
1312 |
+
/**
|
1313 |
+
* Generate a WP Dialog box
|
1314 |
+
* @param jQuery Object $elm [description]
|
1315 |
+
* @param Object buttonsList [description]
|
1316 |
+
* @param Integer boxWidth [description]
|
1317 |
+
* @param Integer boxHeight [description]
|
1318 |
+
* @return void
|
1319 |
+
* @since 4.0
|
1320 |
+
*/
|
1321 |
+
this.wp_dialog = function ($elm, buttonsList, boxWidth, boxHeight) {
|
1322 |
+
$elm.wpdialog({
|
1323 |
+
autoOpen: false,
|
1324 |
+
resizable: false,
|
1325 |
+
draggable: false,
|
1326 |
+
width: boxWidth,
|
1327 |
+
height: boxHeight,
|
1328 |
+
modal: true,
|
1329 |
+
dialogClass: 'wp-dialog',
|
1330 |
+
zIndex: 300000,
|
1331 |
+
buttons: buttonsList,
|
1332 |
+
open: function () {
|
1333 |
+
$(this).siblings('.ui-dialog-buttonpane').find('button:eq(1)').focus()
|
1334 |
+
|
1335 |
+
$('.ui-widget-overlay').bind('click', function () {
|
1336 |
+
$elm.wpdialog('close')
|
1337 |
+
})
|
1338 |
+
}
|
1339 |
+
})
|
1340 |
+
}
|
1341 |
+
|
1342 |
+
/**
|
1343 |
+
* Create the tooltip HTML
|
1344 |
+
* @param String html The tooltip message
|
1345 |
+
* @return String
|
1346 |
+
* @since 4.0
|
1347 |
+
*/
|
1348 |
+
this.get_tooltip = function (html) {
|
1349 |
+
var $a = $('<a>')
|
1350 |
+
var $i = $('<i class="fa fa-question-circle">')
|
1351 |
+
|
1352 |
+
$a.append($i)
|
1353 |
+
$a.addClass('gf_tooltip tooltip')
|
1354 |
+
$a.click(function () {
|
1355 |
+
return false
|
1356 |
+
})
|
1357 |
+
|
1358 |
+
$a.attr('title', html)
|
1359 |
+
|
1360 |
+
return $a
|
1361 |
+
}
|
1362 |
+
|
1363 |
+
/**
|
1364 |
+
* An AJAX Wrapper function we can use to ajaxify our plugin
|
1365 |
+
* @param post Object an object of data to submit to our ajax endpoint. This MUST include an 'nonce' and an 'action'
|
1366 |
+
* @param successCallback a callback function
|
1367 |
+
* @return void
|
1368 |
+
* @since 4.0
|
1369 |
+
*/
|
1370 |
+
this.ajax = function (post, successCallback) {
|
1371 |
+
$.ajax({
|
1372 |
+
type: "post",
|
1373 |
+
dataType: "json",
|
1374 |
+
url: GFPDF.ajaxUrl,
|
1375 |
+
data: post,
|
1376 |
+
success: successCallback,
|
1377 |
+
error: this.ajax_error,
|
1378 |
+
})
|
1379 |
+
}
|
1380 |
+
|
1381 |
+
/**
|
1382 |
+
* Log the error to the console
|
1383 |
+
* @return void
|
1384 |
+
* @since 4.0
|
1385 |
+
*/
|
1386 |
+
this.ajax_error = function (jqXHR, textStatus, errorThrown) {
|
1387 |
+
console.log(textStatus)
|
1388 |
+
console.log(errorThrown)
|
1389 |
+
}
|
1390 |
+
|
1391 |
+
/**
|
1392 |
+
* Display a message or error to the user with an appropriate timeout
|
1393 |
+
* @param String msg The message to be displayed
|
1394 |
+
* @param Integer timeout How long to show the message
|
1395 |
+
* @param Boolean error Whether to show an error (true) or a message (false or undefined)
|
1396 |
+
* @return void
|
1397 |
+
* @since 4.0
|
1398 |
+
*/
|
1399 |
+
this.show_message = function (msg, timeout, error) {
|
1400 |
+
timeout = typeof timeout !== 'undefined' ? timeout : 4500
|
1401 |
+
error = typeof error !== 'undefined' ? error : false
|
1402 |
+
|
1403 |
+
var $elm = $('<div id="message">').html('<p>' + msg + '</p>')
|
1404 |
+
|
1405 |
+
if (error === true) {
|
1406 |
+
$elm.addClass('error')
|
1407 |
+
} else {
|
1408 |
+
$elm.addClass('updated')
|
1409 |
+
}
|
1410 |
+
|
1411 |
+
$('.wrap > h2').after($elm)
|
1412 |
+
|
1413 |
+
setTimeout(function () {
|
1414 |
+
$elm.slideUp()
|
1415 |
+
}, timeout)
|
1416 |
+
|
1417 |
+
}
|
1418 |
+
|
1419 |
+
/**
|
1420 |
+
* Update the URL parameter
|
1421 |
+
* @param String The URL to parse
|
1422 |
+
* @param String The URL parameter to want to update
|
1423 |
+
* @param String The replacement string for the URL parameter
|
1424 |
+
* @return String The processed URL
|
1425 |
+
* @since 4.0
|
1426 |
+
* @link http://stackoverflow.com/a/10997390/11236
|
1427 |
+
*/
|
1428 |
+
this.updateURLParameter = function (url, param, paramVal) {
|
1429 |
+
var newAdditionalURL = ""
|
1430 |
+
var tempArray = url.split("?")
|
1431 |
+
var baseURL = tempArray[ 0 ]
|
1432 |
+
var additionalURL = tempArray[ 1 ]
|
1433 |
+
var temp = ""
|
1434 |
+
if (additionalURL) {
|
1435 |
+
tempArray = additionalURL.split("&")
|
1436 |
+
for (i = 0; i < tempArray.length; i++) {
|
1437 |
+
if (tempArray[ i ].split('=')[ 0 ] != param) {
|
1438 |
+
newAdditionalURL += temp + tempArray[ i ]
|
1439 |
+
temp = "&"
|
1440 |
+
}
|
1441 |
+
}
|
1442 |
+
}
|
1443 |
+
|
1444 |
+
var rows_txt = temp + "" + param + "=" + paramVal
|
1445 |
+
return baseURL + "?" + newAdditionalURL + rows_txt
|
1446 |
+
}
|
1447 |
+
}
|
1448 |
+
|
1449 |
+
var pdf = new GravityPDF()
|
1450 |
+
pdf.init()
|
1451 |
+
|
1452 |
+
})
|
1453 |
+
})(jQuery)
|
src/assets/js/react/actionTypes/templates.js
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Our Redux Action Type Constants
|
3 |
+
*
|
4 |
+
* @package Gravity PDF
|
5 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
6 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
7 |
+
* @since 4.1
|
8 |
+
*/
|
9 |
+
|
10 |
+
/*
|
11 |
+
This file is part of Gravity PDF.
|
12 |
+
|
13 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
14 |
+
|
15 |
+
This program is free software; you can redistribute it and/or modify
|
16 |
+
it under the terms of the GNU General Public License as published by
|
17 |
+
the Free Software Foundation; either version 2 of the License, or
|
18 |
+
(at your option) any later version.
|
19 |
+
|
20 |
+
This program is distributed in the hope that it will be useful,
|
21 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
22 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
23 |
+
GNU General Public License for more details.
|
24 |
+
|
25 |
+
You should have received a copy of the GNU General Public License
|
26 |
+
along with this program; if not, write to the Free Software
|
27 |
+
Found
|
28 |
+
*/
|
29 |
+
|
30 |
+
export const SEARCH_TEMPLATES = 'SEARCH_TEMPLATES'
|
31 |
+
export const SELECT_TEMPLATE = 'SELECT_TEMPLATE'
|
32 |
+
export const ADD_TEMPLATE = 'ADD_TEMPLATE'
|
33 |
+
export const UPDATE_TEMPLATE = 'UPDATE_TEMPLATE'
|
34 |
+
export const UPDATE_TEMPLATE_PARAM = 'UPDATE_TEMPLATE_PARAM'
|
35 |
+
export const DELETE_TEMPLATE = 'DELETE_TEMPLATE'
|
src/assets/js/react/actions/templates.js
ADDED
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import {
|
2 |
+
SEARCH_TEMPLATES,
|
3 |
+
SELECT_TEMPLATE,
|
4 |
+
ADD_TEMPLATE,
|
5 |
+
UPDATE_TEMPLATE,
|
6 |
+
UPDATE_TEMPLATE_PARAM,
|
7 |
+
DELETE_TEMPLATE,
|
8 |
+
} from '../actionTypes/templates'
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Redux Actions - payloads of information that send data from your application to your store
|
12 |
+
*
|
13 |
+
* @package Gravity PDF
|
14 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
15 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
16 |
+
* @since 4.1
|
17 |
+
*/
|
18 |
+
|
19 |
+
/*
|
20 |
+
This file is part of Gravity PDF.
|
21 |
+
|
22 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
23 |
+
|
24 |
+
This program is free software; you can redistribute it and/or modify
|
25 |
+
it under the terms of the GNU General Public License as published by
|
26 |
+
the Free Software Foundation; either version 2 of the License, or
|
27 |
+
(at your option) any later version.
|
28 |
+
|
29 |
+
This program is distributed in the hope that it will be useful,
|
30 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
31 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
32 |
+
GNU General Public License for more details.
|
33 |
+
|
34 |
+
You should have received a copy of the GNU General Public License
|
35 |
+
along with this program; if not, write to the Free Software
|
36 |
+
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
37 |
+
*/
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Fires the Advanced Template Search action
|
41 |
+
*
|
42 |
+
* @param {string} text
|
43 |
+
*
|
44 |
+
* @returns {{type, text: *}}
|
45 |
+
*
|
46 |
+
* @since 4.1
|
47 |
+
*/
|
48 |
+
export const searchTemplates = (text) => {
|
49 |
+
return {
|
50 |
+
type: SEARCH_TEMPLATES,
|
51 |
+
text
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Fires the Advanced Template select/activate action
|
57 |
+
*
|
58 |
+
* @param {string} id The template ID
|
59 |
+
*
|
60 |
+
* @returns {{type, id: *}}
|
61 |
+
*
|
62 |
+
* @since 4.1
|
63 |
+
*/
|
64 |
+
export const selectTemplate = (id) => {
|
65 |
+
return {
|
66 |
+
type: SELECT_TEMPLATE,
|
67 |
+
id
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Fires the Advanced Template add new template action
|
73 |
+
*
|
74 |
+
* @param {object} template An Immutable Map
|
75 |
+
*
|
76 |
+
* @returns {{type, template: *}}
|
77 |
+
*
|
78 |
+
* @since 4.1
|
79 |
+
*/
|
80 |
+
export const addTemplate = (template) => {
|
81 |
+
return {
|
82 |
+
type: ADD_TEMPLATE,
|
83 |
+
template
|
84 |
+
}
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Fires the Advanced Template update action which overrides the entire template object with a new one
|
89 |
+
*
|
90 |
+
* @param {object} template An Immutable Map
|
91 |
+
*
|
92 |
+
* @returns {{type, template: *}}
|
93 |
+
*
|
94 |
+
* @since 4.1
|
95 |
+
*/
|
96 |
+
export const updateTemplate = (template) => {
|
97 |
+
return {
|
98 |
+
type: UPDATE_TEMPLATE,
|
99 |
+
template
|
100 |
+
}
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Fires the Advanced Template update action which replaces a template parameter with a new value
|
105 |
+
*
|
106 |
+
* @param {string} id The template ID
|
107 |
+
* @param {string} name The parameter key to update
|
108 |
+
* @param {string} value The new value for the parameter
|
109 |
+
*
|
110 |
+
* @returns {{type, id: *, name: *, value: *}}
|
111 |
+
*
|
112 |
+
* @since 4.1
|
113 |
+
*/
|
114 |
+
export const updateTemplateParam = (id, name, value) => {
|
115 |
+
return {
|
116 |
+
type: UPDATE_TEMPLATE_PARAM,
|
117 |
+
id,
|
118 |
+
name,
|
119 |
+
value
|
120 |
+
}
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Fires the Advanced Template delete action which removes the template from our store
|
125 |
+
*
|
126 |
+
* @param {string} id The template ID
|
127 |
+
*
|
128 |
+
* @returns {{type, id: *}}
|
129 |
+
*
|
130 |
+
* @since 4.1
|
131 |
+
*/
|
132 |
+
export const deleteTemplate = (id) => {
|
133 |
+
return {
|
134 |
+
type: DELETE_TEMPLATE,
|
135 |
+
id
|
136 |
+
}
|
137 |
+
}
|
src/assets/js/react/bootstrap/templateBootstrap.js
ADDED
@@ -0,0 +1,179 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React from 'react'
|
2 |
+
import { render } from 'react-dom'
|
3 |
+
import { HashRouter as Router, Route } from 'react-router-dom'
|
4 |
+
import request from 'superagent'
|
5 |
+
|
6 |
+
import { createStore, combineReducers } from 'redux'
|
7 |
+
import watch from 'redux-watch'
|
8 |
+
|
9 |
+
import { selectTemplate } from '../actions/templates'
|
10 |
+
import templateRouter from '../router/templateRouter'
|
11 |
+
import templateReducer from '../reducers/templateReducer'
|
12 |
+
import TemplateButton from '../components/TemplateButton'
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Advanced Template Selector Bootstrap
|
16 |
+
*
|
17 |
+
* @package Gravity PDF
|
18 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
19 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
20 |
+
* @since 4.1
|
21 |
+
*/
|
22 |
+
|
23 |
+
/*
|
24 |
+
This file is part of Gravity PDF.
|
25 |
+
|
26 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
27 |
+
|
28 |
+
This program is free software; you can redistribute it and/or modify
|
29 |
+
it under the terms of the GNU General Public License as published by
|
30 |
+
the Free Software Foundation; either version 2 of the License, or
|
31 |
+
(at your option) any later version.
|
32 |
+
|
33 |
+
This program is distributed in the hope that it will be useful,
|
34 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
35 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
36 |
+
GNU General Public License for more details.
|
37 |
+
|
38 |
+
You should have received a copy of the GNU General Public License
|
39 |
+
along with this program; if not, write to the Free Software
|
40 |
+
Found
|
41 |
+
*/
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Handles the loading of our Fancy Template Selector
|
45 |
+
*
|
46 |
+
* @param {Object} $templateField The jQuery select box we should attach the fancy template selector to
|
47 |
+
*
|
48 |
+
* @since 4.1
|
49 |
+
*/
|
50 |
+
export default function templateBootstrap ($templateField) {
|
51 |
+
|
52 |
+
/* Combine our Redux Reducers */
|
53 |
+
const reducers = setupReducers()
|
54 |
+
|
55 |
+
/* Create our store and enable the Redux dev tools, if they exist */
|
56 |
+
const store = createStore(reducers, window.devToolsExtension && window.devToolsExtension())
|
57 |
+
|
58 |
+
/* Create our button container and render our component in it */
|
59 |
+
createTemplateMarkup($templateField)
|
60 |
+
|
61 |
+
/* Render our React Component in the DOM */
|
62 |
+
render(
|
63 |
+
<Router>
|
64 |
+
<Route render={(props) => <TemplateButton {...props} store={store} buttonText={GFPDF.advanced}/>} />
|
65 |
+
</Router>,
|
66 |
+
document.getElementById('gpdf-advance-template-selector')
|
67 |
+
)
|
68 |
+
|
69 |
+
/* Mount our router */
|
70 |
+
templateRouter(store)
|
71 |
+
|
72 |
+
/*
|
73 |
+
* Listen for Redux store updates and do DOM updates
|
74 |
+
*/
|
75 |
+
activeTemplateStoreListener(store, $templateField)
|
76 |
+
templateChangeStoreListener(store, $templateField)
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Combine our Redux reducers for use in a single store
|
81 |
+
* If you want to add new top-level keys to our store, this is the place
|
82 |
+
*
|
83 |
+
* @returns {Function}
|
84 |
+
*
|
85 |
+
* @since 4.1
|
86 |
+
*/
|
87 |
+
export function setupReducers () {
|
88 |
+
return combineReducers({
|
89 |
+
template: templateReducer,
|
90 |
+
})
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Dynamically add the required markup to attach our React components to.
|
95 |
+
*
|
96 |
+
* @param {Object} $templateField The jQuery select box we should attach the fancy template selector to
|
97 |
+
*
|
98 |
+
* @since 4.1
|
99 |
+
*/
|
100 |
+
export function createTemplateMarkup ($templateField) {
|
101 |
+
$templateField
|
102 |
+
.next()
|
103 |
+
.after('<span id="gpdf-advance-template-selector">')
|
104 |
+
.next()
|
105 |
+
.after('<div id="gfpdf-overlay" class="theme-overlay">')
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Listen for updates to the template.activeTemplate data in our Redux store
|
110 |
+
* and update the select box value based on this change. Also, listen for changes
|
111 |
+
* to our select box and update the store when needed.
|
112 |
+
*
|
113 |
+
* @param {Object} store The Redux store returned from createStore()
|
114 |
+
* @param {Object} $templateField The jQuery select box we should attach the fancy template selector to
|
115 |
+
*
|
116 |
+
* @since 4.1
|
117 |
+
*/
|
118 |
+
export function activeTemplateStoreListener (store, $templateField) {
|
119 |
+
|
120 |
+
/* Watch our store for changes */
|
121 |
+
let w = watch(store.getState, 'template.activeTemplate')
|
122 |
+
store.subscribe(w((template) => {
|
123 |
+
|
124 |
+
/* Check store and DOM are different to prevent any update recursions */
|
125 |
+
if ($templateField.val() !== template) {
|
126 |
+
$templateField
|
127 |
+
.val(template)
|
128 |
+
.trigger('chosen:updated')
|
129 |
+
.trigger('change')
|
130 |
+
}
|
131 |
+
}))
|
132 |
+
|
133 |
+
/* Watch our DOM for changes */
|
134 |
+
$templateField.change(function () {
|
135 |
+
/* Check store and DOM are different to prevent any update recursions */
|
136 |
+
if (this.value !== store.getState().template.activeTemplate) {
|
137 |
+
store.dispatch(selectTemplate(this.value))
|
138 |
+
}
|
139 |
+
})
|
140 |
+
}
|
141 |
+
|
142 |
+
/**
|
143 |
+
* PHP builds the Select box DOM for the templates and when we add or delete a template we need to rebuild this.
|
144 |
+
* Instead of duplicating the code on both server and client side we do an AJAX call to get the new Selex box HTML when
|
145 |
+
* the template.list length changes and update the DOM accordingly.
|
146 |
+
*
|
147 |
+
* @param {Object} store The Redux store returned from createStore()
|
148 |
+
* @param {Object} $templateField The jQuery select box we should attach the fancy template selector to
|
149 |
+
*
|
150 |
+
* @since 4.1
|
151 |
+
*/
|
152 |
+
export function templateChangeStoreListener (store, $templateField) {
|
153 |
+
|
154 |
+
/* Track the initial list size */
|
155 |
+
let listCount = store.getState().template.list.size
|
156 |
+
|
157 |
+
/* Watch our store for changes */
|
158 |
+
let w = watch(store.getState, 'template.list')
|
159 |
+
store.subscribe(w((list) => {
|
160 |
+
|
161 |
+
/* Only update if the list size differs from what we expect */
|
162 |
+
if (listCount !== list.size) {
|
163 |
+
/* update the list size so we don't run it twice */
|
164 |
+
listCount = list.size
|
165 |
+
|
166 |
+
/* Do our AJAX call to get the new Select Box DOM */
|
167 |
+
request
|
168 |
+
.post(GFPDF.ajaxUrl)
|
169 |
+
.field('action', 'gfpdf_get_template_options')
|
170 |
+
.field('nonce', GFPDF.ajaxNonce)
|
171 |
+
.then((response) => {
|
172 |
+
$templateField
|
173 |
+
.html(response.text)
|
174 |
+
.trigger('chosen:updated')
|
175 |
+
.trigger('change')
|
176 |
+
})
|
177 |
+
}
|
178 |
+
}))
|
179 |
+
}
|
src/assets/js/react/components/Dropzone.js
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import PropTypes from 'prop-types';
|
2 |
+
import React from 'react'
|
3 |
+
import ReactDropzone from 'react-dropzone'
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Our Drag and Drop File upload Component which is a wrapper
|
7 |
+
* for react-dropzone
|
8 |
+
*
|
9 |
+
* @package Gravity PDF
|
10 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
11 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
12 |
+
* @since 4.1
|
13 |
+
*/
|
14 |
+
|
15 |
+
/*
|
16 |
+
This file is part of Gravity PDF.
|
17 |
+
|
18 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
19 |
+
|
20 |
+
This program is free software; you can redistribute it and/or modify
|
21 |
+
it under the terms of the GNU General Public License as published by
|
22 |
+
the Free Software Foundation; either version 2 of the License, or
|
23 |
+
(at your option) any later version.
|
24 |
+
|
25 |
+
This program is distributed in the hope that it will be useful,
|
26 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
27 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
28 |
+
GNU General Public License for more details.
|
29 |
+
|
30 |
+
You should have received a copy of the GNU General Public License
|
31 |
+
along with this program; if not, write to the Free Software
|
32 |
+
Found
|
33 |
+
*/
|
34 |
+
|
35 |
+
/**
|
36 |
+
* React Component
|
37 |
+
*
|
38 |
+
* @since 4.1
|
39 |
+
*/
|
40 |
+
class Dropzone extends React.Component {
|
41 |
+
/**
|
42 |
+
* @since 4.1
|
43 |
+
*/
|
44 |
+
static propTypes = {
|
45 |
+
children: PropTypes.node.isRequired,
|
46 |
+
onDrop: PropTypes.func.isRequired,
|
47 |
+
multiple: PropTypes.bool,
|
48 |
+
className: PropTypes.string,
|
49 |
+
activeClassName: PropTypes.string
|
50 |
+
};
|
51 |
+
|
52 |
+
/**
|
53 |
+
* @since 4.1
|
54 |
+
*/
|
55 |
+
static defaultProps = {
|
56 |
+
multiple: false,
|
57 |
+
maxSize: Infinity,
|
58 |
+
className: 'gfpdf-dropzone',
|
59 |
+
activeClassName: 'gfpdf-dropzone-active'
|
60 |
+
};
|
61 |
+
|
62 |
+
/**
|
63 |
+
* @since 4.1
|
64 |
+
*/
|
65 |
+
render() {
|
66 |
+
return (
|
67 |
+
<ReactDropzone
|
68 |
+
onDrop={this.props.onDrop}
|
69 |
+
multiple={this.props.multiple}
|
70 |
+
disablePreview={true}
|
71 |
+
className={this.props.className}
|
72 |
+
activeClassName={this.props.activeClassName}>
|
73 |
+
{this.props.children}
|
74 |
+
</ReactDropzone>
|
75 |
+
)
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
export default Dropzone
|
src/assets/js/react/components/Empty.js
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Render a blank component for use with React Router's default route
|
3 |
+
*
|
4 |
+
* @package Gravity PDF
|
5 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
6 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
7 |
+
* @since 4.1
|
8 |
+
*/
|
9 |
+
|
10 |
+
/*
|
11 |
+
This file is part of Gravity PDF.
|
12 |
+
|
13 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
14 |
+
|
15 |
+
This program is free software; you can redistribute it and/or modify
|
16 |
+
it under the terms of the GNU General Public License as published by
|
17 |
+
the Free Software Foundation; either version 2 of the License, or
|
18 |
+
(at your option) any later version.
|
19 |
+
|
20 |
+
This program is distributed in the hope that it will be useful,
|
21 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
22 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
23 |
+
GNU General Public License for more details.
|
24 |
+
|
25 |
+
You should have received a copy of the GNU General Public License
|
26 |
+
along with this program; if not, write to the Free Software
|
27 |
+
Found
|
28 |
+
*/
|
29 |
+
|
30 |
+
/**
|
31 |
+
* React Component
|
32 |
+
*
|
33 |
+
* @since 4.1
|
34 |
+
*/
|
35 |
+
export default () => {
|
36 |
+
return false
|
37 |
+
}
|
src/assets/js/react/components/ShowMessage.js
ADDED
@@ -0,0 +1,167 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import PropTypes from 'prop-types';
|
2 |
+
import React from 'react'
|
3 |
+
import $ from 'jquery'
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Renders a message or error, with the option to self-clear itself
|
7 |
+
*
|
8 |
+
* @package Gravity PDF
|
9 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
10 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
11 |
+
* @since 4.1
|
12 |
+
*/
|
13 |
+
|
14 |
+
/*
|
15 |
+
This file is part of Gravity PDF.
|
16 |
+
|
17 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
18 |
+
|
19 |
+
This program is free software; you can redistribute it and/or modify
|
20 |
+
it under the terms of the GNU General Public License as published by
|
21 |
+
the Free Software Foundation; either version 2 of the License, or
|
22 |
+
(at your option) any later version.
|
23 |
+
|
24 |
+
This program is distributed in the hope that it will be useful,
|
25 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
26 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
27 |
+
GNU General Public License for more details.
|
28 |
+
|
29 |
+
You should have received a copy of the GNU General Public License
|
30 |
+
along with this program; if not, write to the Free Software
|
31 |
+
Found
|
32 |
+
*/
|
33 |
+
|
34 |
+
/**
|
35 |
+
* React Component
|
36 |
+
*
|
37 |
+
* @since 4.1
|
38 |
+
*/
|
39 |
+
class showMessage extends React.Component {
|
40 |
+
/**
|
41 |
+
* Pass the "dismissable" prop to enable auto-clearing
|
42 |
+
*
|
43 |
+
* @returns {{delay: number, dismissable: boolean}}
|
44 |
+
*
|
45 |
+
* @since 4.1
|
46 |
+
*/
|
47 |
+
static defaultProps = {
|
48 |
+
delay: 4000,
|
49 |
+
dismissable: false,
|
50 |
+
};
|
51 |
+
|
52 |
+
/**
|
53 |
+
* @since 4.1
|
54 |
+
*/
|
55 |
+
static propTypes = {
|
56 |
+
text: PropTypes.string.isRequired,
|
57 |
+
error: PropTypes.bool,
|
58 |
+
|
59 |
+
delay: PropTypes.number,
|
60 |
+
dismissable: PropTypes.bool,
|
61 |
+
dismissableCallback: PropTypes.func,
|
62 |
+
};
|
63 |
+
|
64 |
+
/**
|
65 |
+
* @returns {{visible: boolean}}
|
66 |
+
*
|
67 |
+
* @since 4.1
|
68 |
+
*/
|
69 |
+
state = {
|
70 |
+
visible: true
|
71 |
+
};
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Resets our state and timer when new props received
|
75 |
+
*
|
76 |
+
* @since 4.1
|
77 |
+
*/
|
78 |
+
componentWillReceiveProps() {
|
79 |
+
this.setState({ visible: true })
|
80 |
+
this.shouldSetTimer()
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* On mount, maybe set dismissable timer
|
85 |
+
*
|
86 |
+
* @since 4.1
|
87 |
+
*/
|
88 |
+
componentDidMount() {
|
89 |
+
this.shouldSetTimer()
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Check if we should make the message auto-dismissable
|
94 |
+
*
|
95 |
+
* @since 4.1
|
96 |
+
*/
|
97 |
+
shouldSetTimer = () => {
|
98 |
+
if (this.props.dismissable) {
|
99 |
+
this.setTimer()
|
100 |
+
}
|
101 |
+
};
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Slide message up after "X" milliseconds (see props.delay)
|
105 |
+
* and triggers callback if passed in (see props.dismissableCallback)
|
106 |
+
*
|
107 |
+
* Also clears the initial timeout if called multiple times before removal
|
108 |
+
*
|
109 |
+
* @since 4.1
|
110 |
+
*/
|
111 |
+
setTimer = () => {
|
112 |
+
// clear any existing timer
|
113 |
+
this._timer != null ? clearTimeout(this._timer) : null
|
114 |
+
|
115 |
+
// hide after `delay` milliseconds
|
116 |
+
this._timer = setTimeout(() => {
|
117 |
+
|
118 |
+
$(this._message)
|
119 |
+
.removeClass('inline')
|
120 |
+
.slideUp(400, () => {
|
121 |
+
$(this._message).removeAttr('style')
|
122 |
+
this.setState({ visible: false })
|
123 |
+
this._timer = null
|
124 |
+
|
125 |
+
if(this.props.dismissableCallback) {
|
126 |
+
this.props.dismissableCallback()
|
127 |
+
}
|
128 |
+
})
|
129 |
+
|
130 |
+
}, this.props.delay)
|
131 |
+
};
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Clear timeout on unmount
|
135 |
+
*
|
136 |
+
* @since 4.1
|
137 |
+
*/
|
138 |
+
componentWillUnmount() {
|
139 |
+
if (this.props.dismissable) {
|
140 |
+
clearTimeout(this._timer)
|
141 |
+
}
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Renders our message or error
|
146 |
+
*
|
147 |
+
* @since 4.1
|
148 |
+
*/
|
149 |
+
render() {
|
150 |
+
const { text, error } = this.props
|
151 |
+
|
152 |
+
let classes = 'notice inline'
|
153 |
+
|
154 |
+
if (error) {
|
155 |
+
classes = classes + ' error'
|
156 |
+
}
|
157 |
+
|
158 |
+
return this.state.visible ?
|
159 |
+
(
|
160 |
+
<div ref={(message) => this._message = message} className={classes}>
|
161 |
+
<p>{text}</p>
|
162 |
+
</div>
|
163 |
+
) : <div />
|
164 |
+
}
|
165 |
+
}
|
166 |
+
|
167 |
+
export default showMessage
|
src/assets/js/react/components/TemplateActivateButton.js
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import PropTypes from 'prop-types';
|
2 |
+
import React from 'react'
|
3 |
+
import { connect } from 'react-redux'
|
4 |
+
import { selectTemplate } from '../actions/templates'
|
5 |
+
import { withRouter } from 'react-router-dom'
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Renders the button used to trigger the current active PDF template
|
9 |
+
* On click it triggers our Redux action.
|
10 |
+
*
|
11 |
+
* @package Gravity PDF
|
12 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
13 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
14 |
+
* @since 4.1
|
15 |
+
*/
|
16 |
+
|
17 |
+
/*
|
18 |
+
This file is part of Gravity PDF.
|
19 |
+
|
20 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
21 |
+
|
22 |
+
This program is free software; you can redistribute it and/or modify
|
23 |
+
it under the terms of the GNU General Public License as published by
|
24 |
+
the Free Software Foundation; either version 2 of the License, or
|
25 |
+
(at your option) any later version.
|
26 |
+
|
27 |
+
This program is distributed in the hope that it will be useful,
|
28 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
29 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
30 |
+
GNU General Public License for more details.
|
31 |
+
|
32 |
+
You should have received a copy of the GNU General Public License
|
33 |
+
along with this program; if not, write to the Free Software
|
34 |
+
Found
|
35 |
+
*/
|
36 |
+
|
37 |
+
/**
|
38 |
+
* React Component
|
39 |
+
*
|
40 |
+
* @since 4.1
|
41 |
+
*/
|
42 |
+
export class TemplateActivateButton extends React.Component {
|
43 |
+
/**
|
44 |
+
* @since 4.1
|
45 |
+
*/
|
46 |
+
static propTypes = {
|
47 |
+
template: PropTypes.object,
|
48 |
+
onTemplateSelect: PropTypes.func,
|
49 |
+
buttonText: PropTypes.string,
|
50 |
+
};
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Update our route and trigger a Redux action to select the current template
|
54 |
+
*
|
55 |
+
* @param {Object} e Event
|
56 |
+
*
|
57 |
+
* @since 4.1
|
58 |
+
*/
|
59 |
+
selectTemplate = (e) => {
|
60 |
+
e.preventDefault()
|
61 |
+
e.stopPropagation()
|
62 |
+
|
63 |
+
this.props.history.push('')
|
64 |
+
this.props.onTemplateSelect(this.props.template.get('id'))
|
65 |
+
};
|
66 |
+
|
67 |
+
/**
|
68 |
+
* @since 4.1
|
69 |
+
*/
|
70 |
+
render() {
|
71 |
+
return (
|
72 |
+
<a
|
73 |
+
onClick={this.selectTemplate}
|
74 |
+
href="#"
|
75 |
+
tabIndex="150"
|
76 |
+
className="button button-primary activate">
|
77 |
+
{this.props.buttonText}
|
78 |
+
</a>
|
79 |
+
)
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Map actions to props
|
85 |
+
*
|
86 |
+
* @param {func} dispatch Redux dispatcher
|
87 |
+
*
|
88 |
+
* @returns {{onTemplateSelect: (function(id=string))}}
|
89 |
+
*
|
90 |
+
* @since 4.1
|
91 |
+
*/
|
92 |
+
const mapDispatchToProps = (dispatch) => {
|
93 |
+
return {
|
94 |
+
onTemplateSelect: (id) => {
|
95 |
+
dispatch(selectTemplate(id))
|
96 |
+
}
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Maps our Redux store to our React component
|
102 |
+
*
|
103 |
+
* @since 4.1
|
104 |
+
*/
|
105 |
+
export default withRouter(connect(null, mapDispatchToProps)(TemplateActivateButton))
|
106 |
+
|
src/assets/js/react/components/TemplateButton.js
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import PropTypes from 'prop-types';
|
2 |
+
import React from 'react'
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Render the button used to option our Fancy PDF template selector
|
6 |
+
*
|
7 |
+
* @package Gravity PDF
|
8 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
9 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
10 |
+
* @since 4.1
|
11 |
+
*/
|
12 |
+
|
13 |
+
/*
|
14 |
+
This file is part of Gravity PDF.
|
15 |
+
|
16 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
17 |
+
|
18 |
+
This program is free software; you can redistribute it and/or modify
|
19 |
+
it under the terms of the GNU General Public License as published by
|
20 |
+
the Free Software Foundation; either version 2 of the License, or
|
21 |
+
(at your option) any later version.
|
22 |
+
|
23 |
+
This program is distributed in the hope that it will be useful,
|
24 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
25 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
26 |
+
GNU General Public License for more details.
|
27 |
+
|
28 |
+
You should have received a copy of the GNU General Public License
|
29 |
+
along with this program; if not, write to the Free Software
|
30 |
+
Found
|
31 |
+
*/
|
32 |
+
|
33 |
+
/**
|
34 |
+
* React Component
|
35 |
+
*
|
36 |
+
* @since 4.1
|
37 |
+
*/
|
38 |
+
class TemplateButton extends React.Component {
|
39 |
+
/**
|
40 |
+
* @since 4.1
|
41 |
+
*/
|
42 |
+
static propTypes = {
|
43 |
+
buttonText: PropTypes.string,
|
44 |
+
};
|
45 |
+
|
46 |
+
/**
|
47 |
+
* When the button is clicked we'll display the `/template` route
|
48 |
+
*
|
49 |
+
* @param {Object} e Event
|
50 |
+
*
|
51 |
+
* @since 4.1
|
52 |
+
*/
|
53 |
+
handleClick = (e) => {
|
54 |
+
e.preventDefault()
|
55 |
+
e.stopPropagation()
|
56 |
+
|
57 |
+
this.props.history.push('/template')
|
58 |
+
};
|
59 |
+
|
60 |
+
/**
|
61 |
+
* @since 4.1
|
62 |
+
*/
|
63 |
+
render() {
|
64 |
+
return (
|
65 |
+
<button
|
66 |
+
type="button"
|
67 |
+
id="fancy-template-selector"
|
68 |
+
className="button gfpdf-button"
|
69 |
+
onClick={this.handleClick}
|
70 |
+
ref={node => this.button = node}
|
71 |
+
>
|
72 |
+
{this.props.buttonText}
|
73 |
+
</button>
|
74 |
+
)
|
75 |
+
}
|
76 |
+
}
|
77 |
+
|
78 |
+
export default TemplateButton
|
src/assets/js/react/components/TemplateCloseDialog.js
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import PropTypes from 'prop-types';
|
2 |
+
import React from 'react'
|
3 |
+
import { withRouter } from 'react-router-dom'
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Renders our close dialog element
|
7 |
+
*
|
8 |
+
* @package Gravity PDF
|
9 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
10 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
11 |
+
* @since 4.1
|
12 |
+
*/
|
13 |
+
|
14 |
+
/*
|
15 |
+
This file is part of Gravity PDF.
|
16 |
+
|
17 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
18 |
+
|
19 |
+
This program is free software; you can redistribute it and/or modify
|
20 |
+
it under the terms of the GNU General Public License as published by
|
21 |
+
the Free Software Foundation; either version 2 of the License, or
|
22 |
+
(at your option) any later version.
|
23 |
+
|
24 |
+
This program is distributed in the hope that it will be useful,
|
25 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
26 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
27 |
+
GNU General Public License for more details.
|
28 |
+
|
29 |
+
You should have received a copy of the GNU General Public License
|
30 |
+
along with this program; if not, write to the Free Software
|
31 |
+
Found
|
32 |
+
*/
|
33 |
+
|
34 |
+
/**
|
35 |
+
* React Component
|
36 |
+
*
|
37 |
+
* @since 4.1
|
38 |
+
*/
|
39 |
+
export class TemplateCloseDialog extends React.Component {
|
40 |
+
/**
|
41 |
+
* @since 4.1
|
42 |
+
*/
|
43 |
+
static propTypes = {
|
44 |
+
closeRoute: PropTypes.string
|
45 |
+
};
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Assign keydown listener to document on mount
|
49 |
+
*
|
50 |
+
* @since 4.1
|
51 |
+
*/
|
52 |
+
componentDidMount() {
|
53 |
+
document.addEventListener('keydown', this.handleKeyPress, false)
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Remove keydown listener to document on mount
|
58 |
+
*
|
59 |
+
* @since 4.1
|
60 |
+
*/
|
61 |
+
componentWillUnmount() {
|
62 |
+
document.removeEventListener('keydown', this.handleKeyPress, false)
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Check if Escape key pressed and current event target isn't our search box,
|
67 |
+
* or the search box is blank already
|
68 |
+
*
|
69 |
+
* @param {Object} e Event
|
70 |
+
*
|
71 |
+
* @since 4.1
|
72 |
+
*/
|
73 |
+
handleKeyPress = (e) => {
|
74 |
+
/* Escape Key */
|
75 |
+
if (e.keyCode === 27 && (e.target.className !== 'wp-filter-search' || e.target.value === '')) {
|
76 |
+
this.closeDialog()
|
77 |
+
}
|
78 |
+
};
|
79 |
+
|
80 |
+
/**
|
81 |
+
* @since 4.1
|
82 |
+
*/
|
83 |
+
closeDialog = () => {
|
84 |
+
/* trigger router */
|
85 |
+
this.props.history.push(this.props.closeRoute || '/')
|
86 |
+
};
|
87 |
+
|
88 |
+
/**
|
89 |
+
* @since 4.1
|
90 |
+
*/
|
91 |
+
render() {
|
92 |
+
return (
|
93 |
+
<button
|
94 |
+
className="close dashicons dashicons-no"
|
95 |
+
tabIndex="142"
|
96 |
+
onClick={this.closeDialog}
|
97 |
+
onKeyDown={this.handleKeyPress}
|
98 |
+
aria-label="close">
|
99 |
+
<span className="screen-reader-text">Close dialog</span>
|
100 |
+
</button>
|
101 |
+
)
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
export default withRouter(TemplateCloseDialog)
|
src/assets/js/react/components/TemplateContainer.js
ADDED
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import PropTypes from 'prop-types';
|
2 |
+
import React from 'react'
|
3 |
+
import TemplateCloseDialog from './TemplateCloseDialog'
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Renders our Advanced Template Selector container which is shared amongst the components
|
7 |
+
*
|
8 |
+
* @package Gravity PDF
|
9 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
10 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
11 |
+
* @since 4.1
|
12 |
+
*/
|
13 |
+
|
14 |
+
/*
|
15 |
+
This file is part of Gravity PDF.
|
16 |
+
|
17 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
18 |
+
|
19 |
+
This program is free software; you can redistribute it and/or modify
|
20 |
+
it under the terms of the GNU General Public License as published by
|
21 |
+
the Free Software Foundation; either version 2 of the License, or
|
22 |
+
(at your option) any later version.
|
23 |
+
|
24 |
+
This program is distributed in the hope that it will be useful,
|
25 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
26 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
27 |
+
GNU General Public License for more details.
|
28 |
+
|
29 |
+
You should have received a copy of the GNU General Public License
|
30 |
+
along with this program; if not, write to the Free Software
|
31 |
+
Found
|
32 |
+
*/
|
33 |
+
|
34 |
+
/**
|
35 |
+
* React Component
|
36 |
+
*
|
37 |
+
* @since 4.1
|
38 |
+
*/
|
39 |
+
class Container extends React.Component {
|
40 |
+
/**
|
41 |
+
* @since 4.1
|
42 |
+
*/
|
43 |
+
static propTypes = {
|
44 |
+
header: PropTypes.oneOfType([ PropTypes.string, PropTypes.element ]),
|
45 |
+
footer: PropTypes.oneOfType([ PropTypes.string, PropTypes.element ]),
|
46 |
+
children: PropTypes.node.isRequired,
|
47 |
+
closeRoute: PropTypes.string,
|
48 |
+
};
|
49 |
+
|
50 |
+
/**
|
51 |
+
* On mount, add focus event to document option on mount
|
52 |
+
* Also, if focus isn't currently applied to the search box we'll apply it
|
53 |
+
* to our container to help with tabbing between elements
|
54 |
+
*
|
55 |
+
* @since 4.1
|
56 |
+
*/
|
57 |
+
componentDidMount() {
|
58 |
+
document.addEventListener('focus', this.handleFocus, true)
|
59 |
+
|
60 |
+
/* Add focus if not currently applied to search box */
|
61 |
+
if (document.activeElement && document.activeElement.className !== 'wp-filter-search') {
|
62 |
+
this.container.focus()
|
63 |
+
}
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Cleanup our document event listeners
|
68 |
+
*
|
69 |
+
* @since 4.1
|
70 |
+
*/
|
71 |
+
componentWillUnmount() {
|
72 |
+
document.removeEventListener('focus', this.handleFocus, true)
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* When a focus event is fired and it's not apart of any DOM elements in our
|
77 |
+
* container we will focus the container instead. In most cases this keeps the focus from
|
78 |
+
* jumping outside our Template Container and allows for better keyboard navigation.
|
79 |
+
*
|
80 |
+
* @param e
|
81 |
+
*
|
82 |
+
* @since 4.1
|
83 |
+
*/
|
84 |
+
handleFocus = (e) => {
|
85 |
+
if (!this.container.contains(e.target)) {
|
86 |
+
e.stopPropagation()
|
87 |
+
this.container.focus()
|
88 |
+
}
|
89 |
+
};
|
90 |
+
|
91 |
+
/**
|
92 |
+
* @since 4.1
|
93 |
+
*/
|
94 |
+
render() {
|
95 |
+
const header = this.props.header,
|
96 |
+
footer = this.props.footer,
|
97 |
+
children = this.props.children,
|
98 |
+
closeRoute = this.props.closeRoute
|
99 |
+
|
100 |
+
return (
|
101 |
+
<div ref={node => this.container = node} tabIndex="140">
|
102 |
+
<div className="backdrop theme-backdrop"></div>
|
103 |
+
<div className="container theme-wrap">
|
104 |
+
<div className="theme-header">
|
105 |
+
{header}
|
106 |
+
<TemplateCloseDialog closeRoute={closeRoute}/>
|
107 |
+
</div>
|
108 |
+
|
109 |
+
<div
|
110 |
+
id="gfpdf-template-container"
|
111 |
+
className="theme-about wp-clearfix theme-browser rendered">
|
112 |
+
{children}
|
113 |
+
</div>
|
114 |
+
|
115 |
+
{footer}
|
116 |
+
</div>
|
117 |
+
</div>
|
118 |
+
)
|
119 |
+
}
|
120 |
+
}
|
121 |
+
|
122 |
+
export default Container
|
src/assets/js/react/components/TemplateDeleteButton.js
ADDED
@@ -0,0 +1,153 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import PropTypes from 'prop-types';
|
2 |
+
import React from 'react'
|
3 |
+
import { connect } from 'react-redux'
|
4 |
+
import { addTemplate, deleteTemplate } from '../actions/templates'
|
5 |
+
import { withRouter } from 'react-router-dom'
|
6 |
+
import request from 'superagent'
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Renders a delete button which then queries our server and
|
10 |
+
* removes the selected PDF template
|
11 |
+
*
|
12 |
+
* @package Gravity PDF
|
13 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
14 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
15 |
+
* @since 4.1
|
16 |
+
*/
|
17 |
+
|
18 |
+
/*
|
19 |
+
This file is part of Gravity PDF.
|
20 |
+
|
21 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
22 |
+
|
23 |
+
This program is free software; you can redistribute it and/or modify
|
24 |
+
it under the terms of the GNU General Public License as published by
|
25 |
+
the Free Software Foundation; either version 2 of the License, or
|
26 |
+
(at your option) any later version.
|
27 |
+
|
28 |
+
This program is distributed in the hope that it will be useful,
|
29 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
30 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
31 |
+
GNU General Public License for more details.
|
32 |
+
|
33 |
+
You should have received a copy of the GNU General Public License
|
34 |
+
along with this program; if not, write to the Free Software
|
35 |
+
Found
|
36 |
+
*/
|
37 |
+
|
38 |
+
/**
|
39 |
+
* React Component
|
40 |
+
*
|
41 |
+
* @since 4.1
|
42 |
+
*/
|
43 |
+
export class TemplateDeleteButton extends React.Component {
|
44 |
+
/**
|
45 |
+
* @since 4.1
|
46 |
+
*/
|
47 |
+
static propTypes = {
|
48 |
+
ajaxUrl: PropTypes.string,
|
49 |
+
ajaxNonce: PropTypes.string,
|
50 |
+
|
51 |
+
template: PropTypes.object,
|
52 |
+
addTemplate: PropTypes.func,
|
53 |
+
onTemplateDelete: PropTypes.func,
|
54 |
+
callbackFunction: PropTypes.func,
|
55 |
+
|
56 |
+
buttonText: PropTypes.string,
|
57 |
+
templateConfirmDeleteText: PropTypes.string,
|
58 |
+
templateDeleteErrorText: PropTypes.string,
|
59 |
+
};
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Display a confirmation window asking user to verify they want template deleted.
|
63 |
+
*
|
64 |
+
* Once verified, we make an AJAX call to the server requesting template to be deleted.
|
65 |
+
*
|
66 |
+
* Before we receive the response we remove the PDF template automatically and update the
|
67 |
+
* URL to /template. If the AJAX call fails the PDF template gets restored to our list with
|
68 |
+
* an appropriate error message (it feels snapper this way).
|
69 |
+
*
|
70 |
+
* @param {Object} e Event
|
71 |
+
*/
|
72 |
+
deleteTemplate = (e) => {
|
73 |
+
e.preventDefault()
|
74 |
+
e.stopPropagation()
|
75 |
+
|
76 |
+
if (window.confirm(this.props.templateConfirmDeleteText)) {
|
77 |
+
|
78 |
+
const templateId = this.props.template.get('id')
|
79 |
+
|
80 |
+
/* POST the PDF template to our endpoint for processing */
|
81 |
+
request
|
82 |
+
.post(this.props.ajaxUrl)
|
83 |
+
.field('action', 'gfpdf_delete_template')
|
84 |
+
.field('nonce', this.props.ajaxNonce)
|
85 |
+
.field('id', templateId)
|
86 |
+
.then(
|
87 |
+
() => { /* success. Leave blank */},
|
88 |
+
this.ajaxFailed
|
89 |
+
)
|
90 |
+
|
91 |
+
this.props.history.push('/template')
|
92 |
+
this.props.onTemplateDelete(templateId)
|
93 |
+
}
|
94 |
+
};
|
95 |
+
|
96 |
+
/**
|
97 |
+
* If the server cannot delete the template we re-add the template to our list
|
98 |
+
* and display an appropriate inline error message
|
99 |
+
*
|
100 |
+
* @since 4.1
|
101 |
+
*/
|
102 |
+
ajaxFailed = () => {
|
103 |
+
const errorTemplate = this.props.template.set('error', this.props.templateDeleteErrorText)
|
104 |
+
this.props.addTemplate(errorTemplate)
|
105 |
+
};
|
106 |
+
|
107 |
+
/**
|
108 |
+
* @since 4.1
|
109 |
+
*/
|
110 |
+
render() {
|
111 |
+
|
112 |
+
const callback = (this.props.callbackFunction) ? this.props.callbackFunction : this.deleteTemplate
|
113 |
+
|
114 |
+
return (
|
115 |
+
<a
|
116 |
+
onClick={callback}
|
117 |
+
href="#"
|
118 |
+
tabIndex="150"
|
119 |
+
className="button button-secondary delete-theme">
|
120 |
+
{this.props.buttonText}
|
121 |
+
</a>
|
122 |
+
)
|
123 |
+
}
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Map actions to props
|
128 |
+
*
|
129 |
+
* @param {func} dispatch Redux dispatcher
|
130 |
+
*
|
131 |
+
* @returns {{addTemplate: (function(template=Immutable List)), onTemplateDelete: (function(id=string))}}
|
132 |
+
*
|
133 |
+
* @since 4.1
|
134 |
+
*/
|
135 |
+
const mapDispatchToProps = (dispatch) => {
|
136 |
+
return {
|
137 |
+
addTemplate: (template) => {
|
138 |
+
dispatch(addTemplate(template))
|
139 |
+
},
|
140 |
+
|
141 |
+
onTemplateDelete: (id) => {
|
142 |
+
dispatch(deleteTemplate(id))
|
143 |
+
}
|
144 |
+
}
|
145 |
+
}
|
146 |
+
|
147 |
+
/**
|
148 |
+
* Maps our Redux store to our React component
|
149 |
+
*
|
150 |
+
* @since 4.1
|
151 |
+
*/
|
152 |
+
export default withRouter(connect(null, mapDispatchToProps)(TemplateDeleteButton))
|
153 |
+
|
src/assets/js/react/components/TemplateFooterActions.js
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import PropTypes from 'prop-types';
|
2 |
+
import React from 'react'
|
3 |
+
import TemplateActivateButton from './TemplateActivateButton'
|
4 |
+
import TemplateDeleteButton from './TemplateDeleteButton'
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Renders the template footer actions that get displayed on the
|
8 |
+
* /template/:id pages.
|
9 |
+
*
|
10 |
+
* @package Gravity PDF
|
11 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
12 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
13 |
+
* @since 4.1
|
14 |
+
*/
|
15 |
+
|
16 |
+
/*
|
17 |
+
This file is part of Gravity PDF.
|
18 |
+
|
19 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
20 |
+
|
21 |
+
This program is free software; you can redistribute it and/or modify
|
22 |
+
it under the terms of the GNU General Public License as published by
|
23 |
+
the Free Software Foundation; either version 2 of the License, or
|
24 |
+
(at your option) any later version.
|
25 |
+
|
26 |
+
This program is distributed in the hope that it will be useful,
|
27 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
28 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
29 |
+
GNU General Public License for more details.
|
30 |
+
|
31 |
+
You should have received a copy of the GNU General Public License
|
32 |
+
along with this program; if not, write to the Free Software
|
33 |
+
Found
|
34 |
+
*/
|
35 |
+
|
36 |
+
/**
|
37 |
+
* React Component
|
38 |
+
*
|
39 |
+
* @since 4.1
|
40 |
+
*/
|
41 |
+
class TemplateFooterActions extends React.Component {
|
42 |
+
/**
|
43 |
+
* @since 4.1
|
44 |
+
*/
|
45 |
+
static propTypes = {
|
46 |
+
template: PropTypes.object.isRequired,
|
47 |
+
isActiveTemplate: PropTypes.bool,
|
48 |
+
|
49 |
+
ajaxUrl: PropTypes.string,
|
50 |
+
ajaxNonce: PropTypes.string,
|
51 |
+
|
52 |
+
activateText: PropTypes.string,
|
53 |
+
pdfWorkingDirPath: PropTypes.string,
|
54 |
+
templateDeleteText: PropTypes.string,
|
55 |
+
templateConfirmDeleteText: PropTypes.string,
|
56 |
+
templateDeleteErrorText: PropTypes.string,
|
57 |
+
};
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Check if the current PDF template is a core template or not (i.e is shipped with Gravity PDF)
|
61 |
+
*
|
62 |
+
* @param {Object} template Immutable Map
|
63 |
+
*
|
64 |
+
* @returns {boolean}
|
65 |
+
*
|
66 |
+
* @since 4.1
|
67 |
+
*/
|
68 |
+
notCoreTemplate = (template) => {
|
69 |
+
return template.get('path').indexOf(this.props.pdfWorkingDirPath) !== -1
|
70 |
+
};
|
71 |
+
|
72 |
+
/**
|
73 |
+
* @since 4.1
|
74 |
+
*/
|
75 |
+
render() {
|
76 |
+
const template = this.props.template
|
77 |
+
const isCompatible = template.get('compatible')
|
78 |
+
|
79 |
+
return (
|
80 |
+
<div className="theme-actions">
|
81 |
+
{!this.props.isActiveTemplate && isCompatible ?
|
82 |
+
<TemplateActivateButton
|
83 |
+
template={template}
|
84 |
+
buttonText={this.props.activateText}/>
|
85 |
+
: null
|
86 |
+
}
|
87 |
+
|
88 |
+
{!this.props.isActiveTemplate && this.notCoreTemplate(template) ?
|
89 |
+
<TemplateDeleteButton
|
90 |
+
template={template}
|
91 |
+
|
92 |
+
ajaxUrl={this.props.ajaxUrl}
|
93 |
+
ajaxNonce={this.props.ajaxNonce}
|
94 |
+
|
95 |
+
buttonText={this.props.templateDeleteText}
|
96 |
+
templateConfirmDeleteText={this.props.templateConfirmDeleteText}
|
97 |
+
templateDeleteErrorText={this.props.templateDeleteErrorText}/>
|
98 |
+
: null
|
99 |
+
}
|
100 |
+
</div>
|
101 |
+
)
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
export default TemplateFooterActions
|
106 |
+
|
src/assets/js/react/components/TemplateHeaderNavigation.js
ADDED
@@ -0,0 +1,210 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import PropTypes from 'prop-types';
|
2 |
+
import React from 'react'
|
3 |
+
import { connect } from 'react-redux'
|
4 |
+
import { withRouter } from 'react-router-dom'
|
5 |
+
import { List } from 'immutable'
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Renders the template navigation header that get displayed on the
|
9 |
+
* /template/:id pages.
|
10 |
+
*
|
11 |
+
* @package Gravity PDF
|
12 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
13 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
14 |
+
* @since 4.1
|
15 |
+
*/
|
16 |
+
|
17 |
+
/*
|
18 |
+
This file is part of Gravity PDF.
|
19 |
+
|
20 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
21 |
+
|
22 |
+
This program is free software; you can redistribute it and/or modify
|
23 |
+
it under the terms of the GNU General Public License as published by
|
24 |
+
the Free Software Foundation; either version 2 of the License, or
|
25 |
+
(at your option) any later version.
|
26 |
+
|
27 |
+
This program is distributed in the hope that it will be useful,
|
28 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
29 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
30 |
+
GNU General Public License for more details.
|
31 |
+
|
32 |
+
You should have received a copy of the GNU General Public License
|
33 |
+
along with this program; if not, write to the Free Software
|
34 |
+
Found
|
35 |
+
*/
|
36 |
+
|
37 |
+
/**
|
38 |
+
* React Component
|
39 |
+
*
|
40 |
+
* @since 4.1
|
41 |
+
*/
|
42 |
+
export class TemplateHeaderNavigation extends React.Component {
|
43 |
+
/**
|
44 |
+
* @since 4.1
|
45 |
+
*/
|
46 |
+
static propTypes = {
|
47 |
+
templates: PropTypes.object.isRequired,
|
48 |
+
templateIndex: PropTypes.number.isRequired,
|
49 |
+
isFirst: PropTypes.bool,
|
50 |
+
isLast: PropTypes.bool,
|
51 |
+
|
52 |
+
showPreviousTemplateText: PropTypes.string,
|
53 |
+
showNextTemplateText: PropTypes.string
|
54 |
+
};
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Add window event listeners
|
58 |
+
*
|
59 |
+
* @since 4.1
|
60 |
+
*/
|
61 |
+
componentDidMount() {
|
62 |
+
window.addEventListener('keydown', this.handleKeyPress, false)
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Cleanup window event listeners
|
67 |
+
*
|
68 |
+
* @since 4.1
|
69 |
+
*/
|
70 |
+
componentWillUnmount() {
|
71 |
+
window.removeEventListener('keydown', this.handleKeyPress, false)
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Attempt to get the previous template in our Immutable list and update the URL
|
76 |
+
*
|
77 |
+
* @param {Object} e Event
|
78 |
+
*
|
79 |
+
* @since 4.1
|
80 |
+
*/
|
81 |
+
previousTemplate = (e) => {
|
82 |
+
e.preventDefault()
|
83 |
+
e.stopPropagation()
|
84 |
+
|
85 |
+
const prevId = this.props.templates.get(this.props.templateIndex - 1).get('id')
|
86 |
+
|
87 |
+
if (prevId) {
|
88 |
+
this.props.history.push('/template/' + prevId)
|
89 |
+
}
|
90 |
+
};
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Attempt to get the next template in our Immutable list and update the URL
|
94 |
+
*
|
95 |
+
* @param {Object} e Event
|
96 |
+
*
|
97 |
+
* @since 4.1
|
98 |
+
*/
|
99 |
+
nextTemplate = (e) => {
|
100 |
+
e.preventDefault()
|
101 |
+
e.stopPropagation()
|
102 |
+
|
103 |
+
const nextId = this.props.templates.get(this.props.templateIndex + 1).get('id')
|
104 |
+
|
105 |
+
if (nextId) {
|
106 |
+
this.props.history.push('/template/' + nextId)
|
107 |
+
}
|
108 |
+
};
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Checks if the Left or Right arrow keys are pressed and fires appropriate functions
|
112 |
+
*
|
113 |
+
* @param {Object} e Event
|
114 |
+
*
|
115 |
+
* @since 4.1
|
116 |
+
*/
|
117 |
+
handleKeyPress = (e) => {
|
118 |
+
/* Left Arrow */
|
119 |
+
if (!this.props.isFirst && e.keyCode === 37) {
|
120 |
+
this.previousTemplate(e)
|
121 |
+
}
|
122 |
+
|
123 |
+
/* Right Arrow */
|
124 |
+
if (!this.props.isLast && e.keyCode === 39) {
|
125 |
+
this.nextTemplate(e)
|
126 |
+
}
|
127 |
+
};
|
128 |
+
|
129 |
+
/**
|
130 |
+
* @since 4.1
|
131 |
+
*/
|
132 |
+
render() {
|
133 |
+
|
134 |
+
/*
|
135 |
+
* Work our the correct classes and attributes for our left and right arrows
|
136 |
+
* based on if we are currently showing the first or last templates
|
137 |
+
*/
|
138 |
+
const isFirst = this.props.isFirst
|
139 |
+
const isLast = this.props.isLast
|
140 |
+
|
141 |
+
let baseClass = List([ 'dashicons', 'dashicons-no' ])
|
142 |
+
|
143 |
+
let prevClass = baseClass.push('left')
|
144 |
+
let nextClass = baseClass.push('right')
|
145 |
+
prevClass = (isFirst) ? prevClass.push('disabled') : prevClass
|
146 |
+
nextClass = (isLast) ? nextClass.push('disabled') : nextClass
|
147 |
+
|
148 |
+
let leftDisabled = (isFirst) ? 'disabled' : ''
|
149 |
+
let rightDisabled = (isLast) ? 'disabled' : ''
|
150 |
+
|
151 |
+
return (
|
152 |
+
<span>
|
153 |
+
<button
|
154 |
+
onClick={this.previousTemplate}
|
155 |
+
onKeyDown={this.handleKeyPress}
|
156 |
+
className={prevClass.join(' ')}
|
157 |
+
tabIndex="141"
|
158 |
+
disabled={leftDisabled}>
|
159 |
+
<span
|
160 |
+
className="screen-reader-text">
|
161 |
+
{this.props.showPreviousTemplateText}
|
162 |
+
</span>
|
163 |
+
</button>
|
164 |
+
|
165 |
+
<button
|
166 |
+
onClick={this.nextTemplate}
|
167 |
+
onKeyDown={this.handleKeyPress}
|
168 |
+
className={nextClass.join(' ')}
|
169 |
+
tabIndex="141"
|
170 |
+
disabled={rightDisabled}>
|
171 |
+
<span
|
172 |
+
className="screen-reader-text">
|
173 |
+
{this.props.showNextTemplateText}
|
174 |
+
</span>
|
175 |
+
</button>
|
176 |
+
</span>
|
177 |
+
)
|
178 |
+
}
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Map state to props
|
183 |
+
*
|
184 |
+
* @param {Object} state The current Redux State
|
185 |
+
* @param {Object} props The current React props
|
186 |
+
*
|
187 |
+
* @returns {{isFirst: boolean, isLast: boolean}}
|
188 |
+
*
|
189 |
+
* @since 4.1
|
190 |
+
*/
|
191 |
+
const MapStateToProps = (state, props) => {
|
192 |
+
/* Check if the current template is the first or last in our templates */
|
193 |
+
const templates = props.templates
|
194 |
+
const currentTemplateId = props.template.get('id')
|
195 |
+
const first = templates.first().get('id')
|
196 |
+
const last = templates.last().get('id')
|
197 |
+
|
198 |
+
return {
|
199 |
+
isFirst: first === currentTemplateId,
|
200 |
+
isLast: last === currentTemplateId,
|
201 |
+
}
|
202 |
+
}
|
203 |
+
|
204 |
+
/**
|
205 |
+
* Maps our Redux store to our React component
|
206 |
+
*
|
207 |
+
* @since 4.1
|
208 |
+
*/
|
209 |
+
export default withRouter(connect(MapStateToProps)(TemplateHeaderNavigation))
|
210 |
+
|
src/assets/js/react/components/TemplateHeaderTitle.js
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import PropTypes from 'prop-types';
|
2 |
+
import React from 'react'
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Renders the Template Header Title
|
6 |
+
*
|
7 |
+
* @package Gravity PDF
|
8 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
9 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
10 |
+
* @since 4.1
|
11 |
+
*/
|
12 |
+
|
13 |
+
/*
|
14 |
+
This file is part of Gravity PDF.
|
15 |
+
|
16 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
17 |
+
|
18 |
+
This program is free software; you can redistribute it and/or modify
|
19 |
+
it under the terms of the GNU General Public License as published by
|
20 |
+
the Free Software Foundation; either version 2 of the License, or
|
21 |
+
(at your option) any later version.
|
22 |
+
|
23 |
+
This program is distributed in the hope that it will be useful,
|
24 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
25 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
26 |
+
GNU General Public License for more details.
|
27 |
+
|
28 |
+
You should have received a copy of the GNU General Public License
|
29 |
+
along with this program; if not, write to the Free Software
|
30 |
+
Found
|
31 |
+
*/
|
32 |
+
|
33 |
+
/**
|
34 |
+
* React Component
|
35 |
+
*
|
36 |
+
* @since 4.1
|
37 |
+
*/
|
38 |
+
const TemplateHeaderTitle = ({ header }) => (
|
39 |
+
<h1>{header}</h1>
|
40 |
+
)
|
41 |
+
|
42 |
+
/**
|
43 |
+
* @since 4.1
|
44 |
+
*/
|
45 |
+
TemplateHeaderTitle.propTypes = {
|
46 |
+
header: PropTypes.string
|
47 |
+
}
|
48 |
+
|
49 |
+
export default TemplateHeaderTitle
|
src/assets/js/react/components/TemplateList.js
ADDED
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import PropTypes from 'prop-types';
|
2 |
+
import React from 'react'
|
3 |
+
import { connect } from 'react-redux'
|
4 |
+
|
5 |
+
import getTemplates from '../selectors/getTemplates'
|
6 |
+
|
7 |
+
import TemplateContainer from './TemplateContainer'
|
8 |
+
import TemplateListItem from './TemplateListItem'
|
9 |
+
import TemplateSearch from './TemplateSearch'
|
10 |
+
import TemplateHeaderTitle from './TemplateHeaderTitle'
|
11 |
+
import TemplateUploader from './TemplateUploader'
|
12 |
+
|
13 |
+
/**
|
14 |
+
* The master component for rendering the all PDF templates as a list
|
15 |
+
*
|
16 |
+
* @package Gravity PDF
|
17 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
18 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
19 |
+
* @since 4.1
|
20 |
+
*/
|
21 |
+
|
22 |
+
/*
|
23 |
+
This file is part of Gravity PDF.
|
24 |
+
|
25 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
26 |
+
|
27 |
+
This program is free software; you can redistribute it and/or modify
|
28 |
+
it under the terms of the GNU General Public License as published by
|
29 |
+
the Free Software Foundation; either version 2 of the License, or
|
30 |
+
(at your option) any later version.
|
31 |
+
|
32 |
+
This program is distributed in the hope that it will be useful,
|
33 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
34 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
35 |
+
GNU General Public License for more details.
|
36 |
+
|
37 |
+
You should have received a copy of the GNU General Public License
|
38 |
+
along with this program; if not, write to the Free Software
|
39 |
+
Found
|
40 |
+
*/
|
41 |
+
|
42 |
+
/**
|
43 |
+
* React Component
|
44 |
+
*
|
45 |
+
* @since 4.1
|
46 |
+
*/
|
47 |
+
export class TemplateList extends React.Component {
|
48 |
+
/**
|
49 |
+
* @since 4.1
|
50 |
+
*/
|
51 |
+
static propTypes = {
|
52 |
+
templates: PropTypes.object,
|
53 |
+
route: PropTypes.object
|
54 |
+
};
|
55 |
+
|
56 |
+
/**
|
57 |
+
* @since 4.1
|
58 |
+
*/
|
59 |
+
render () {
|
60 |
+
const header = <TemplateHeaderTitle header={this.props.templateHeaderText}/>
|
61 |
+
|
62 |
+
return (
|
63 |
+
<TemplateContainer header={header} closeRoute="/">
|
64 |
+
<TemplateSearch />
|
65 |
+
<div>
|
66 |
+
{
|
67 |
+
this.props.templates.map((value, index) => {
|
68 |
+
return <TemplateListItem
|
69 |
+
key={index}
|
70 |
+
template={value}
|
71 |
+
templateDetailsText={this.props.templateDetailsText}
|
72 |
+
activateText={this.props.activateText}/>
|
73 |
+
})
|
74 |
+
}
|
75 |
+
|
76 |
+
<TemplateUploader
|
77 |
+
ajaxUrl={this.props.ajaxUrl}
|
78 |
+
ajaxNonce={this.props.ajaxNonce}
|
79 |
+
addTemplateText={this.props.addTemplateText}
|
80 |
+
genericUploadErrorText={this.props.genericUploadErrorText}
|
81 |
+
filenameErrorText={this.props.filenameErrorText}
|
82 |
+
filesizeErrorText={this.props.filesizeErrorText}
|
83 |
+
installSuccessText={this.props.installSuccessText}
|
84 |
+
installUpdatedText={this.props.installUpdatedText}
|
85 |
+
templateSuccessfullyInstalledUpdated={this.props.templateSuccessfullyInstalledUpdated}
|
86 |
+
templateInstallInstructions={this.props.templateInstallInstructions}
|
87 |
+
/>
|
88 |
+
|
89 |
+
</div>
|
90 |
+
</TemplateContainer>
|
91 |
+
)
|
92 |
+
}
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Map state to props
|
97 |
+
*
|
98 |
+
* @param {Object} state The current Redux State
|
99 |
+
*
|
100 |
+
* @returns {{templates}}
|
101 |
+
*
|
102 |
+
* @since 4.1
|
103 |
+
*/
|
104 |
+
const mapStateToProps = (state) => {
|
105 |
+
return {
|
106 |
+
templates: getTemplates(state)
|
107 |
+
}
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Maps our Redux store to our React component
|
112 |
+
*
|
113 |
+
* @since 4.1
|
114 |
+
*/
|
115 |
+
export default connect(mapStateToProps)(TemplateList)
|
src/assets/js/react/components/TemplateListItem.js
ADDED
@@ -0,0 +1,170 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import PropTypes from 'prop-types';
|
2 |
+
import React from 'react'
|
3 |
+
import { connect } from 'react-redux'
|
4 |
+
import { withRouter } from 'react-router-dom'
|
5 |
+
import { updateTemplateParam } from '../actions/templates'
|
6 |
+
|
7 |
+
import TemplateScreenshot from './TemplateScreenshot'
|
8 |
+
import ShowMessage from './ShowMessage'
|
9 |
+
|
10 |
+
import {
|
11 |
+
TemplateDetails,
|
12 |
+
Group
|
13 |
+
} from './TemplateListItemComponents'
|
14 |
+
|
15 |
+
import { Name } from './TemplateSingleComponents'
|
16 |
+
import TemplateActivateButton from './TemplateActivateButton'
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Display the individual template item for usage our template list
|
20 |
+
*
|
21 |
+
* @package Gravity PDF
|
22 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
23 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
24 |
+
* @since 4.1
|
25 |
+
*/
|
26 |
+
|
27 |
+
/*
|
28 |
+
This file is part of Gravity PDF.
|
29 |
+
|
30 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
31 |
+
|
32 |
+
This program is free software; you can redistribute it and/or modify
|
33 |
+
it under the terms of the GNU General Public License as published by
|
34 |
+
the Free Software Foundation; either version 2 of the License, or
|
35 |
+
(at your option) any later version.
|
36 |
+
|
37 |
+
This program is distributed in the hope that it will be useful,
|
38 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
39 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
40 |
+
GNU General Public License for more details.
|
41 |
+
|
42 |
+
You should have received a copy of the GNU General Public License
|
43 |
+
along with this program; if not, write to the Free Software
|
44 |
+
Found
|
45 |
+
*/
|
46 |
+
|
47 |
+
/**
|
48 |
+
* React Component
|
49 |
+
*
|
50 |
+
* @since 4.1
|
51 |
+
*/
|
52 |
+
export class TemplateListItem extends React.Component {
|
53 |
+
/**
|
54 |
+
* @since 4.1
|
55 |
+
*/
|
56 |
+
static propTypes = {
|
57 |
+
template: PropTypes.object,
|
58 |
+
|
59 |
+
activeTemplate: PropTypes.string,
|
60 |
+
updateTemplateParam: PropTypes.func,
|
61 |
+
|
62 |
+
activateText: PropTypes.string,
|
63 |
+
templateDetailsText: PropTypes.string,
|
64 |
+
};
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Check if the Enter key is pressed and not focused on a button
|
68 |
+
* then display the template details page
|
69 |
+
*
|
70 |
+
* @param {Object} e Event
|
71 |
+
*
|
72 |
+
* @since 4.1
|
73 |
+
*/
|
74 |
+
maybeShowDetailedTemplate = (e) => {
|
75 |
+
/* Show detailed template when the Enter key is pressed and the active element doesn't include a 'button' class */
|
76 |
+
if (e.keyCode === 13 && (e.target.className.indexOf('button') === -1)) {
|
77 |
+
this.showDetailedTemplate()
|
78 |
+
}
|
79 |
+
};
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Update the URL to show the PDF template details page
|
83 |
+
*
|
84 |
+
* @since 4.1
|
85 |
+
*/
|
86 |
+
showDetailedTemplate = () => {
|
87 |
+
this.props.history.push('/template/' + this.props.template.get('id'))
|
88 |
+
};
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Call Redux action to remove any stored messages for this template
|
92 |
+
*
|
93 |
+
* @since 4.1
|
94 |
+
*/
|
95 |
+
removeMessage = () => {
|
96 |
+
this.props.updateTemplateParam(this.props.template.get('id'), 'message', null)
|
97 |
+
};
|
98 |
+
|
99 |
+
/**
|
100 |
+
* @since 4.1
|
101 |
+
*/
|
102 |
+
render() {
|
103 |
+
const item = this.props.template
|
104 |
+
const isActiveTemplate = this.props.activeTemplate === item.get('id')
|
105 |
+
const isCompatible = item.get('compatible')
|
106 |
+
const activeTemplate = (isActiveTemplate) ? 'active theme' : 'theme'
|
107 |
+
|
108 |
+
return (
|
109 |
+
<div
|
110 |
+
onClick={this.showDetailedTemplate}
|
111 |
+
onKeyDown={this.maybeShowDetailedTemplate}
|
112 |
+
className={activeTemplate}
|
113 |
+
data-slug={item.get('id')}
|
114 |
+
tabIndex="150">
|
115 |
+
|
116 |
+
<TemplateScreenshot image={item.get('screenshot')}/>
|
117 |
+
{item.get('error') ? <ShowMessage text={item.get('error')} error={true}/> : null}
|
118 |
+
{item.get('message') ? <ShowMessage text={item.get('message')} dismissableCallback={this.removeMessage} dismissable={true} delay={12000} /> : null}
|
119 |
+
|
120 |
+
<TemplateDetails label={this.props.templateDetailsText} />
|
121 |
+
<Group group={item.get('group')}/>
|
122 |
+
<Name name={item.get('template')}/>
|
123 |
+
|
124 |
+
<div className="theme-actions">
|
125 |
+
{!isActiveTemplate && isCompatible ?
|
126 |
+
<TemplateActivateButton template={this.props.template} buttonText={this.props.activateText}/> : null}
|
127 |
+
</div>
|
128 |
+
</div>
|
129 |
+
)
|
130 |
+
}
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Map state to props
|
135 |
+
*
|
136 |
+
* @param {Object} state The current Redux State
|
137 |
+
*
|
138 |
+
* @returns {{activeTemplate: string}}
|
139 |
+
*
|
140 |
+
* @since 4.1
|
141 |
+
*/
|
142 |
+
const mapStateToProps = (state) => {
|
143 |
+
return {
|
144 |
+
activeTemplate: state.template.activeTemplate
|
145 |
+
}
|
146 |
+
}
|
147 |
+
|
148 |
+
/**
|
149 |
+
* Map actions to props
|
150 |
+
*
|
151 |
+
* @param {func} dispatch Redux dispatcher
|
152 |
+
*
|
153 |
+
* @returns {{updateTemplateParam: (function(id=string, name=string, value=string))}}
|
154 |
+
*
|
155 |
+
* @since 4.1
|
156 |
+
*/
|
157 |
+
const mapDispatchToProps = (dispatch) => {
|
158 |
+
return {
|
159 |
+
updateTemplateParam: (id, name, value) => {
|
160 |
+
dispatch(updateTemplateParam(id, name, value))
|
161 |
+
}
|
162 |
+
}
|
163 |
+
}
|
164 |
+
|
165 |
+
/**
|
166 |
+
* Maps our Redux store to our React component
|
167 |
+
*
|
168 |
+
* @since 4.1
|
169 |
+
*/
|
170 |
+
export default withRouter(connect(mapStateToProps, mapDispatchToProps)(TemplateListItem))
|
src/assets/js/react/components/TemplateListItemComponents.js
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import PropTypes from 'prop-types';
|
2 |
+
import React from 'react'
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Contains stateless React components for our Template List Items
|
6 |
+
*
|
7 |
+
* @package Gravity PDF
|
8 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
9 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
10 |
+
* @since 4.1
|
11 |
+
*/
|
12 |
+
|
13 |
+
/*
|
14 |
+
This file is part of Gravity PDF.
|
15 |
+
|
16 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
17 |
+
|
18 |
+
This program is free software; you can redistribute it and/or modify
|
19 |
+
it under the terms of the GNU General Public License as published by
|
20 |
+
the Free Software Foundation; either version 2 of the License, or
|
21 |
+
(at your option) any later version.
|
22 |
+
|
23 |
+
This program is distributed in the hope that it will be useful,
|
24 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
25 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
26 |
+
GNU General Public License for more details.
|
27 |
+
|
28 |
+
You should have received a copy of the GNU General Public License
|
29 |
+
along with this program; if not, write to the Free Software
|
30 |
+
Found
|
31 |
+
*/
|
32 |
+
|
33 |
+
/**
|
34 |
+
* React Stateless Component
|
35 |
+
*
|
36 |
+
* Display the Template Details hover
|
37 |
+
*
|
38 |
+
* @since 4.1
|
39 |
+
*/
|
40 |
+
export const TemplateDetails = ({ label }) => (
|
41 |
+
<span className="more-details">{label}</span>
|
42 |
+
)
|
43 |
+
|
44 |
+
TemplateDetails.propTypes = {
|
45 |
+
name: PropTypes.string,
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* React Stateless Component
|
50 |
+
*
|
51 |
+
* Display the template group
|
52 |
+
*
|
53 |
+
* @since 4.1
|
54 |
+
*/
|
55 |
+
export const Group = ({ group }) => (
|
56 |
+
<p className="theme-author">{group}</p>
|
57 |
+
)
|
58 |
+
|
59 |
+
Group.propTypes = {
|
60 |
+
group: PropTypes.string,
|
61 |
+
}
|
src/assets/js/react/components/TemplateScreenshot.js
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import PropTypes from 'prop-types';
|
2 |
+
import React from 'react'
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Display the Template Screenshot for the List Items
|
6 |
+
*
|
7 |
+
* @package Gravity PDF
|
8 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
9 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
10 |
+
* @since 4.1
|
11 |
+
*/
|
12 |
+
|
13 |
+
/*
|
14 |
+
This file is part of Gravity PDF.
|
15 |
+
|
16 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
17 |
+
|
18 |
+
This program is free software; you can redistribute it and/or modify
|
19 |
+
it under the terms of the GNU General Public License as published by
|
20 |
+
the Free Software Foundation; either version 2 of the License, or
|
21 |
+
(at your option) any later version.
|
22 |
+
|
23 |
+
This program is distributed in the hope that it will be useful,
|
24 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
25 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
26 |
+
GNU General Public License for more details.
|
27 |
+
|
28 |
+
You should have received a copy of the GNU General Public License
|
29 |
+
along with this program; if not, write to the Free Software
|
30 |
+
Found
|
31 |
+
*/
|
32 |
+
|
33 |
+
/**
|
34 |
+
* React Stateless Component
|
35 |
+
*
|
36 |
+
* @since 4.1
|
37 |
+
*/
|
38 |
+
const TemplateScreenshot = ({ image }) => {
|
39 |
+
const className = (image) ? 'theme-screenshot' : 'theme-screenshot blank'
|
40 |
+
|
41 |
+
return (
|
42 |
+
<div className={className}>
|
43 |
+
{image ? <img src={image} alt=""/> : null}
|
44 |
+
</div>
|
45 |
+
)
|
46 |
+
}
|
47 |
+
|
48 |
+
TemplateScreenshot.propTypes = {
|
49 |
+
image: PropTypes.string
|
50 |
+
}
|
51 |
+
|
52 |
+
export default TemplateScreenshot
|
src/assets/js/react/components/TemplateScreenshots.js
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import PropTypes from 'prop-types';
|
2 |
+
import React from 'react'
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Display the Template Screenshot for the individual templates (uses different markup - out of our control)
|
6 |
+
*
|
7 |
+
* @package Gravity PDF
|
8 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
9 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
10 |
+
* @since 4.1
|
11 |
+
*/
|
12 |
+
|
13 |
+
/*
|
14 |
+
This file is part of Gravity PDF.
|
15 |
+
|
16 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
17 |
+
|
18 |
+
This program is free software; you can redistribute it and/or modify
|
19 |
+
it under the terms of the GNU General Public License as published by
|
20 |
+
the Free Software Foundation; either version 2 of the License, or
|
21 |
+
(at your option) any later version.
|
22 |
+
|
23 |
+
This program is distributed in the hope that it will be useful,
|
24 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
25 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
26 |
+
GNU General Public License for more details.
|
27 |
+
|
28 |
+
You should have received a copy of the GNU General Public License
|
29 |
+
along with this program; if not, write to the Free Software
|
30 |
+
Found
|
31 |
+
*/
|
32 |
+
|
33 |
+
/**
|
34 |
+
* React Stateless Component
|
35 |
+
*
|
36 |
+
* @since 4.1
|
37 |
+
*/
|
38 |
+
const TemplateScreenshots = ({ image }) => {
|
39 |
+
const className = (image) ? 'screenshot' : 'screenshot blank'
|
40 |
+
|
41 |
+
return (
|
42 |
+
<div className="theme-screenshots">
|
43 |
+
<div className={className}>
|
44 |
+
{image ? <img src={image} alt=""/> : null}
|
45 |
+
</div>
|
46 |
+
</div>
|
47 |
+
)
|
48 |
+
}
|
49 |
+
|
50 |
+
TemplateScreenshots.propTypes = {
|
51 |
+
image: PropTypes.string
|
52 |
+
}
|
53 |
+
|
54 |
+
export default TemplateScreenshots
|
src/assets/js/react/components/TemplateSearch.js
ADDED
@@ -0,0 +1,155 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import PropTypes from 'prop-types';
|
2 |
+
import React from 'react'
|
3 |
+
import { connect } from 'react-redux'
|
4 |
+
import debounce from 'lodash.debounce'
|
5 |
+
|
6 |
+
import { searchTemplates } from '../actions/templates'
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Handles the PDF template search functionality
|
10 |
+
*
|
11 |
+
* @package Gravity PDF
|
12 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
13 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
14 |
+
* @since 4.1
|
15 |
+
*/
|
16 |
+
|
17 |
+
/*
|
18 |
+
This file is part of Gravity PDF.
|
19 |
+
|
20 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
21 |
+
|
22 |
+
This program is free software; you can redistribute it and/or modify
|
23 |
+
it under the terms of the GNU General Public License as published by
|
24 |
+
the Free Software Foundation; either version 2 of the License, or
|
25 |
+
(at your option) any later version.
|
26 |
+
|
27 |
+
This program is distributed in the hope that it will be useful,
|
28 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
29 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
30 |
+
GNU General Public License for more details.
|
31 |
+
|
32 |
+
You should have received a copy of the GNU General Public License
|
33 |
+
along with this program; if not, write to the Free Software
|
34 |
+
Found
|
35 |
+
*/
|
36 |
+
|
37 |
+
/**
|
38 |
+
* React Component
|
39 |
+
*
|
40 |
+
* @since 4.1
|
41 |
+
*/
|
42 |
+
export class TemplateSearch extends React.Component {
|
43 |
+
/**
|
44 |
+
* @since 4.1
|
45 |
+
*/
|
46 |
+
static propTypes = {
|
47 |
+
onSearch: PropTypes.func,
|
48 |
+
search: PropTypes.string
|
49 |
+
};
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Debounce our runSearch function so it can only be run once every 200 milliseconds
|
53 |
+
*
|
54 |
+
* @since 4.1
|
55 |
+
*/
|
56 |
+
componentWillMount() {
|
57 |
+
this.runSearch = debounce(this.runSearch, 200)
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* On mount, add focus to the search box
|
62 |
+
*
|
63 |
+
* @since 4.1
|
64 |
+
*/
|
65 |
+
componentDidMount() {
|
66 |
+
/* add focus to element */
|
67 |
+
this.input.focus()
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Handles our search event
|
72 |
+
*
|
73 |
+
* Because ReactJS pools SyntheticEvent and we delay the search with debounce we need
|
74 |
+
* to ensure the event is persisted (see https://facebook.github.io/react/docs/events.html#event-pooling)
|
75 |
+
*
|
76 |
+
* @param {Object} e Event
|
77 |
+
*
|
78 |
+
* @since 4.1
|
79 |
+
*/
|
80 |
+
handleSearch = (e) => {
|
81 |
+
e.persist()
|
82 |
+
this.runSearch(e)
|
83 |
+
};
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Update our Redux store with the search value
|
87 |
+
*
|
88 |
+
* @param {Object} e Event
|
89 |
+
*
|
90 |
+
* @since 4.1
|
91 |
+
*/
|
92 |
+
runSearch = (e) => {
|
93 |
+
this.props.onSearch(e.target.value || '')
|
94 |
+
};
|
95 |
+
|
96 |
+
/**
|
97 |
+
* @since 4.1
|
98 |
+
*/
|
99 |
+
render() {
|
100 |
+
return (
|
101 |
+
<div>
|
102 |
+
<input
|
103 |
+
className="wp-filter-search"
|
104 |
+
id="wp-filter-search-input"
|
105 |
+
ref={node => this.input = node}
|
106 |
+
placeholder="Search Installed Templates"
|
107 |
+
type="search"
|
108 |
+
aria-describedby="live-search-desc"
|
109 |
+
tabIndex="145"
|
110 |
+
onChange={this.handleSearch}
|
111 |
+
defaultValue={this.props.search}
|
112 |
+
/>
|
113 |
+
</div>
|
114 |
+
)
|
115 |
+
}
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Map state to props
|
120 |
+
*
|
121 |
+
* @param {Object} state The current Redux State
|
122 |
+
*
|
123 |
+
* @returns {{search: string}}
|
124 |
+
*
|
125 |
+
* @since 4.1
|
126 |
+
*/
|
127 |
+
const mapStateToProps = (state) => {
|
128 |
+
return {
|
129 |
+
search: state.template.search
|
130 |
+
}
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Map actions to props
|
135 |
+
*
|
136 |
+
* @param {func} dispatch Redux dispatcher
|
137 |
+
*
|
138 |
+
* @returns {{onSearch: (function(text=string))}}
|
139 |
+
*
|
140 |
+
* @since 4.1
|
141 |
+
*/
|
142 |
+
const mapDispatchToProps = (dispatch) => {
|
143 |
+
return {
|
144 |
+
onSearch: (text) => {
|
145 |
+
dispatch(searchTemplates(text))
|
146 |
+
}
|
147 |
+
}
|
148 |
+
}
|
149 |
+
|
150 |
+
/**
|
151 |
+
* Maps our Redux store to our React component
|
152 |
+
*
|
153 |
+
* @since 4.1
|
154 |
+
*/
|
155 |
+
export default connect(mapStateToProps, mapDispatchToProps)(TemplateSearch)
|
src/assets/js/react/components/TemplateSingle.js
ADDED
@@ -0,0 +1,174 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import PropTypes from 'prop-types';
|
2 |
+
import React from 'react'
|
3 |
+
import { connect } from 'react-redux'
|
4 |
+
|
5 |
+
import getTemplates from '../selectors/getTemplates'
|
6 |
+
|
7 |
+
import TemplateContainer from './TemplateContainer'
|
8 |
+
import TemplateHeaderNavigation from './TemplateHeaderNavigation'
|
9 |
+
import TemplateFooterActions from './TemplateFooterActions'
|
10 |
+
import TemplateScreenshots from './TemplateScreenshots'
|
11 |
+
import ShowMessage from './ShowMessage'
|
12 |
+
|
13 |
+
import {
|
14 |
+
CurrentTemplate,
|
15 |
+
Name,
|
16 |
+
Author,
|
17 |
+
Group,
|
18 |
+
Description,
|
19 |
+
Tags
|
20 |
+
} from './TemplateSingleComponents'
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Renders a single PDF template, which get displayed on the /template/:id page.
|
24 |
+
*
|
25 |
+
* @package Gravity PDF
|
26 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
27 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
28 |
+
* @since 4.1
|
29 |
+
*/
|
30 |
+
|
31 |
+
/*
|
32 |
+
This file is part of Gravity PDF.
|
33 |
+
|
34 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
35 |
+
|
36 |
+
This program is free software; you can redistribute it and/or modify
|
37 |
+
it under the terms of the GNU General Public License as published by
|
38 |
+
the Free Software Foundation; either version 2 of the License, or
|
39 |
+
(at your option) any later version.
|
40 |
+
|
41 |
+
This program is distributed in the hope that it will be useful,
|
42 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
43 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
44 |
+
GNU General Public License for more details.
|
45 |
+
|
46 |
+
You should have received a copy of the GNU General Public License
|
47 |
+
along with this program; if not, write to the Free Software
|
48 |
+
Found
|
49 |
+
*/
|
50 |
+
|
51 |
+
/**
|
52 |
+
* React Component
|
53 |
+
*
|
54 |
+
* @since 4.1
|
55 |
+
*/
|
56 |
+
export class TemplateSingle extends React.Component {
|
57 |
+
/**
|
58 |
+
* @since 4.1
|
59 |
+
*/
|
60 |
+
static propTypes = {
|
61 |
+
route: PropTypes.object,
|
62 |
+
|
63 |
+
template: PropTypes.object,
|
64 |
+
activeTemplate: PropTypes.string,
|
65 |
+
templateIndex: PropTypes.number,
|
66 |
+
templates: PropTypes.object,
|
67 |
+
};
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Ensure the component doesn't try and re-render when a template isn't found
|
71 |
+
*
|
72 |
+
* @param nextProps
|
73 |
+
* @param nextState
|
74 |
+
*
|
75 |
+
* @Internal This problem seems to be prevelant due to a race condition when deleting a template and updating the URL
|
76 |
+
*
|
77 |
+
* @since 4.2
|
78 |
+
*/
|
79 |
+
shouldComponentUpdate (nextProps, nextState) {
|
80 |
+
if (nextProps.template == null) {
|
81 |
+
return false
|
82 |
+
}
|
83 |
+
|
84 |
+
return true
|
85 |
+
};
|
86 |
+
|
87 |
+
/**
|
88 |
+
* @since 4.1
|
89 |
+
*/
|
90 |
+
render () {
|
91 |
+
const item = this.props.template
|
92 |
+
const isCurrentTemplate = this.props.activeTemplate === item.get('id')
|
93 |
+
|
94 |
+
/* Assign our header / footer components to constants */
|
95 |
+
const header = <TemplateHeaderNavigation
|
96 |
+
template={item}
|
97 |
+
templateIndex={this.props.templateIndex}
|
98 |
+
templates={this.props.templates}
|
99 |
+
showPreviousTemplateText={this.props.showPreviousTemplateText}
|
100 |
+
showNextTemplateText={this.props.showNextTemplateText}/>
|
101 |
+
|
102 |
+
const footer = <TemplateFooterActions
|
103 |
+
template={item}
|
104 |
+
isActiveTemplate={isCurrentTemplate}
|
105 |
+
|
106 |
+
ajaxUrl={this.props.ajaxUrl}
|
107 |
+
ajaxNonce={this.props.ajaxNonce}
|
108 |
+
|
109 |
+
activateText={this.props.activateText}
|
110 |
+
pdfWorkingDirPath={this.props.pdfWorkingDirPath}
|
111 |
+
templateDeleteText={this.props.templateDeleteText}
|
112 |
+
templateConfirmDeleteText={this.props.templateConfirmDeleteText}
|
113 |
+
templateDeleteErrorText={this.props.templateDeleteErrorText}
|
114 |
+
/>
|
115 |
+
|
116 |
+
/* Display our Single Template container */
|
117 |
+
return (
|
118 |
+
<TemplateContainer header={header} footer={footer} closeRoute="/template">
|
119 |
+
<div id="gfpdf-template-detail-view" className="gfpdf-template-detail">
|
120 |
+
<TemplateScreenshots image={item.get('screenshot')}/>
|
121 |
+
|
122 |
+
<div className="theme-info">
|
123 |
+
<CurrentTemplate isCurrentTemplate={isCurrentTemplate} label={this.props.currentTemplateText}/>
|
124 |
+
<Name name={item.get('template')} version={item.get('version')}
|
125 |
+
versionLabel={this.props.versionText}/>
|
126 |
+
<Author author={item.get('author')} uri={item.get('author uri')}/>
|
127 |
+
<Group group={item.get('group')} label={this.props.groupText}/>
|
128 |
+
|
129 |
+
{item.get('long_message') ? <ShowMessage text={item.get('long_message')}/> : null}
|
130 |
+
{item.get('long_error') ? <ShowMessage text={item.get('long_error')} error={true}/> : null}
|
131 |
+
|
132 |
+
<Description desc={item.get('description')}/>
|
133 |
+
<Tags tags={item.get('tags')} label={this.props.tagsText}/>
|
134 |
+
</div>
|
135 |
+
</div>
|
136 |
+
</TemplateContainer>
|
137 |
+
)
|
138 |
+
}
|
139 |
+
}
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Map state to props
|
143 |
+
*
|
144 |
+
* @param {Object} state The current Redux State
|
145 |
+
* @param {Object} props The current React props
|
146 |
+
*
|
147 |
+
* @returns {{template: Immutable Map, templateIndex: number, templates: Immutable List, activeTemplate: string}}
|
148 |
+
*
|
149 |
+
* @since 4.1
|
150 |
+
*/
|
151 |
+
const MapStateToProps = (state, props) => {
|
152 |
+
|
153 |
+
/* found our selected template */
|
154 |
+
const templates = getTemplates(state)
|
155 |
+
const id = props.match.params.id
|
156 |
+
|
157 |
+
const findCurrentTemplate = (item) => {
|
158 |
+
return (item.get('id') === id)
|
159 |
+
}
|
160 |
+
|
161 |
+
return {
|
162 |
+
template: templates.find(findCurrentTemplate),
|
163 |
+
templateIndex: templates.findIndex(findCurrentTemplate),
|
164 |
+
templates: templates,
|
165 |
+
activeTemplate: state.template.activeTemplate,
|
166 |
+
}
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Maps our Redux store to our React component
|
171 |
+
*
|
172 |
+
* @since 4.1
|
173 |
+
*/
|
174 |
+
export default connect(MapStateToProps)(TemplateSingle)
|
src/assets/js/react/components/TemplateSingleComponents.js
ADDED
@@ -0,0 +1,180 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import PropTypes from 'prop-types';
|
2 |
+
import React from 'react'
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Contains stateless React components for our Single Template
|
6 |
+
*
|
7 |
+
* @package Gravity PDF
|
8 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
9 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
10 |
+
* @since 4.1
|
11 |
+
*/
|
12 |
+
|
13 |
+
/*
|
14 |
+
This file is part of Gravity PDF.
|
15 |
+
|
16 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
17 |
+
|
18 |
+
This program is free software; you can redistribute it and/or modify
|
19 |
+
it under the terms of the GNU General Public License as published by
|
20 |
+
the Free Software Foundation; either version 2 of the License, or
|
21 |
+
(at your option) any later version.
|
22 |
+
|
23 |
+
This program is distributed in the hope that it will be useful,
|
24 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
25 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
26 |
+
GNU General Public License for more details.
|
27 |
+
|
28 |
+
You should have received a copy of the GNU General Public License
|
29 |
+
along with this program; if not, write to the Free Software
|
30 |
+
Found
|
31 |
+
*/
|
32 |
+
|
33 |
+
/**
|
34 |
+
* React Stateless Component
|
35 |
+
*
|
36 |
+
* Display the current template label
|
37 |
+
*
|
38 |
+
* @since 4.1
|
39 |
+
*/
|
40 |
+
export const CurrentTemplate = ({ isCurrentTemplate, label }) => {
|
41 |
+
return (isCurrentTemplate) ? (
|
42 |
+
<span className="current-label">{label}</span>
|
43 |
+
) : (
|
44 |
+
<span />
|
45 |
+
)
|
46 |
+
}
|
47 |
+
|
48 |
+
CurrentTemplate.propTypes = {
|
49 |
+
isCurrentTemplate: PropTypes.bool,
|
50 |
+
label: PropTypes.string
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* React Stateless Component
|
55 |
+
*
|
56 |
+
* Display the template name and version number
|
57 |
+
*
|
58 |
+
* @since 4.1
|
59 |
+
*/
|
60 |
+
export const Name = ({ name, version, versionLabel }) => (
|
61 |
+
<h2 className="theme-name">
|
62 |
+
{name}
|
63 |
+
|
64 |
+
<Version version={version} label={versionLabel}/>
|
65 |
+
</h2>
|
66 |
+
)
|
67 |
+
|
68 |
+
Name.propTypes = {
|
69 |
+
name: PropTypes.string,
|
70 |
+
version: PropTypes.string,
|
71 |
+
versionLabel: PropTypes.string
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* React Stateless Component
|
76 |
+
*
|
77 |
+
* Display the template version number
|
78 |
+
*
|
79 |
+
* @since 4.1
|
80 |
+
*/
|
81 |
+
export const Version = ({ label, version }) => {
|
82 |
+
return (version) ? (
|
83 |
+
<span className="theme-version">{label}: {version}</span>
|
84 |
+
) : (
|
85 |
+
<span />
|
86 |
+
)
|
87 |
+
}
|
88 |
+
|
89 |
+
Version.propTypes = {
|
90 |
+
label: PropTypes.string,
|
91 |
+
version: PropTypes.string
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* React Stateless Component
|
96 |
+
*
|
97 |
+
* Display the template author (and link to website, if any)
|
98 |
+
*
|
99 |
+
* @since 4.1
|
100 |
+
*/
|
101 |
+
export const Author = ({ author, uri }) => {
|
102 |
+
|
103 |
+
if (uri) {
|
104 |
+
return (
|
105 |
+
<p className="theme-author">
|
106 |
+
<a href={uri}>
|
107 |
+
{author}
|
108 |
+
</a>
|
109 |
+
</p>
|
110 |
+
)
|
111 |
+
} else {
|
112 |
+
return (
|
113 |
+
<p className="theme-author">
|
114 |
+
{author}
|
115 |
+
</p>
|
116 |
+
)
|
117 |
+
}
|
118 |
+
}
|
119 |
+
|
120 |
+
Author.propTypes = {
|
121 |
+
author: PropTypes.string,
|
122 |
+
uri: PropTypes.string
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* React Stateless Component
|
127 |
+
*
|
128 |
+
* Display the template group
|
129 |
+
*
|
130 |
+
* @since 4.1
|
131 |
+
*/
|
132 |
+
export const Group = ({ label, group }) => (
|
133 |
+
<p className="theme-author">
|
134 |
+
<strong>{label}: {group}</strong>
|
135 |
+
</p>
|
136 |
+
)
|
137 |
+
|
138 |
+
Group.propTypes = {
|
139 |
+
label: PropTypes.string,
|
140 |
+
group: PropTypes.string,
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* React Stateless Component
|
145 |
+
*
|
146 |
+
* Display the template description
|
147 |
+
*
|
148 |
+
* @since 4.1
|
149 |
+
*/
|
150 |
+
export const Description = ({ desc }) => (
|
151 |
+
<p className="theme-description">
|
152 |
+
{desc}
|
153 |
+
</p>
|
154 |
+
)
|
155 |
+
|
156 |
+
Description.propTypes = {
|
157 |
+
desc: PropTypes.string,
|
158 |
+
}
|
159 |
+
|
160 |
+
/**
|
161 |
+
* React Stateless Component
|
162 |
+
*
|
163 |
+
* Display the template tags
|
164 |
+
*
|
165 |
+
* @since 4.1
|
166 |
+
*/
|
167 |
+
export const Tags = ({ label, tags }) => {
|
168 |
+
return (tags) ? (
|
169 |
+
<p className="theme-tags">
|
170 |
+
<span>{label}:</span> {tags}
|
171 |
+
</p>
|
172 |
+
) : (
|
173 |
+
<span />
|
174 |
+
)
|
175 |
+
}
|
176 |
+
|
177 |
+
Tags.propTypes = {
|
178 |
+
label: PropTypes.string,
|
179 |
+
tags: PropTypes.string,
|
180 |
+
}
|
src/assets/js/react/components/TemplateUploader.js
ADDED
@@ -0,0 +1,301 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import PropTypes from 'prop-types';
|
2 |
+
import React from 'react'
|
3 |
+
import { connect } from 'react-redux'
|
4 |
+
import request from 'superagent'
|
5 |
+
import { fromJS } from 'immutable'
|
6 |
+
|
7 |
+
import { addTemplate, updateTemplateParam } from '../actions/templates'
|
8 |
+
import Dropzone from './Dropzone'
|
9 |
+
import ShowMessage from './ShowMessage'
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Handles the uploading of new PDF templates to the server
|
13 |
+
*
|
14 |
+
* @package Gravity PDF
|
15 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
16 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
17 |
+
* @since 4.1
|
18 |
+
*/
|
19 |
+
|
20 |
+
/*
|
21 |
+
This file is part of Gravity PDF.
|
22 |
+
|
23 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
24 |
+
|
25 |
+
This program is free software; you can redistribute it and/or modify
|
26 |
+
it under the terms of the GNU General Public License as published by
|
27 |
+
the Free Software Foundation; either version 2 of the License, or
|
28 |
+
(at your option) any later version.
|
29 |
+
|
30 |
+
This program is distributed in the hope that it will be useful,
|
31 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
32 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
33 |
+
GNU General Public License for more details.
|
34 |
+
|
35 |
+
You should have received a copy of the GNU General Public License
|
36 |
+
along with this program; if not, write to the Free Software
|
37 |
+
Found
|
38 |
+
*/
|
39 |
+
|
40 |
+
/**
|
41 |
+
* React Component
|
42 |
+
*
|
43 |
+
* @since 4.1
|
44 |
+
*/
|
45 |
+
export class TemplateUploader extends React.Component {
|
46 |
+
/**
|
47 |
+
* @since 4.1
|
48 |
+
*/
|
49 |
+
static propTypes = {
|
50 |
+
ajaxUrl: PropTypes.string,
|
51 |
+
ajaxNonce: PropTypes.string,
|
52 |
+
|
53 |
+
genericUploadErrorText: PropTypes.string,
|
54 |
+
addTemplateText: PropTypes.string,
|
55 |
+
filenameErrorText: PropTypes.string,
|
56 |
+
filesizeErrorText: PropTypes.string,
|
57 |
+
installSuccessText: PropTypes.string,
|
58 |
+
installUpdatedText: PropTypes.string,
|
59 |
+
templateSuccessfullyInstalledUpdated: PropTypes.string,
|
60 |
+
templateInstallInstructions: PropTypes.string,
|
61 |
+
|
62 |
+
addNewTemplate: PropTypes.func,
|
63 |
+
updateTemplateParam: PropTypes.func,
|
64 |
+
templates: PropTypes.object
|
65 |
+
};
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Setup internal component state that doesn't need to be in Redux
|
69 |
+
*
|
70 |
+
* @returns {{ajax: boolean, error: string, message: string}}
|
71 |
+
*
|
72 |
+
* @since 4.1
|
73 |
+
*/
|
74 |
+
state = {
|
75 |
+
ajax: false,
|
76 |
+
error: '',
|
77 |
+
message: ''
|
78 |
+
};
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Manages the template file upload
|
82 |
+
*
|
83 |
+
* @param {array} acceptedFiles The array of uploaded files we should send to the server
|
84 |
+
*
|
85 |
+
* @since 4.1
|
86 |
+
*/
|
87 |
+
onDrop = (acceptedFiles) => {
|
88 |
+
/* Handle file upload and pass in an nonce!!! */
|
89 |
+
if (acceptedFiles instanceof Array && acceptedFiles.length > 0) {
|
90 |
+
|
91 |
+
acceptedFiles.forEach((file) => {
|
92 |
+
const filename = file.name
|
93 |
+
|
94 |
+
/* Do validation */
|
95 |
+
if (!this.checkFilename(filename) || !this.checkFilesize(file.size)) {
|
96 |
+
return
|
97 |
+
}
|
98 |
+
|
99 |
+
/* Add our loader */
|
100 |
+
this.setState({
|
101 |
+
ajax: true,
|
102 |
+
error: '',
|
103 |
+
message: '',
|
104 |
+
})
|
105 |
+
|
106 |
+
/* POST the PDF template to our endpoint for processing */
|
107 |
+
request
|
108 |
+
.post(this.props.ajaxUrl)
|
109 |
+
.field('action', 'gfpdf_upload_template')
|
110 |
+
.field('nonce', this.props.ajaxNonce)
|
111 |
+
.attach('template', file, filename)
|
112 |
+
.then(this.ajaxSuccess, this.ajaxFailed)
|
113 |
+
})
|
114 |
+
|
115 |
+
}
|
116 |
+
};
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Checks if the uploaded file has a .zip extension
|
120 |
+
* We do this instead of mime type checking as it doesn't work in all browsers
|
121 |
+
*
|
122 |
+
* @param {string} name
|
123 |
+
*
|
124 |
+
* @returns {boolean}
|
125 |
+
*
|
126 |
+
* @since 4.1
|
127 |
+
*/
|
128 |
+
checkFilename = (name) => {
|
129 |
+
if (name.substr(name.length - 4) !== '.zip') {
|
130 |
+
|
131 |
+
/* Tell use about incorrect file type */
|
132 |
+
this.setState({
|
133 |
+
error: this.props.filenameErrorText
|
134 |
+
})
|
135 |
+
|
136 |
+
return false
|
137 |
+
}
|
138 |
+
|
139 |
+
return true
|
140 |
+
};
|
141 |
+
|
142 |
+
/**
|
143 |
+
* Checks if the file size is larger than 5MB
|
144 |
+
*
|
145 |
+
* @param {int} size File size in bytes
|
146 |
+
*
|
147 |
+
* @returns {boolean}
|
148 |
+
*
|
149 |
+
* @since 4.1
|
150 |
+
*/
|
151 |
+
checkFilesize = (size) => {
|
152 |
+
/* Check the file is no larger than 5MB (convert from bytes to KB) */
|
153 |
+
if (size / 1024 > 5120) {
|
154 |
+
/* Tell use about incorrect file type */
|
155 |
+
this.setState({
|
156 |
+
error: this.props.filesizeErrorText
|
157 |
+
})
|
158 |
+
|
159 |
+
return false
|
160 |
+
}
|
161 |
+
|
162 |
+
return true
|
163 |
+
};
|
164 |
+
|
165 |
+
/**
|
166 |
+
* Update our Redux store with the new PDF template details
|
167 |
+
* If our upload AJAX call to the server passed this function gets fired
|
168 |
+
*
|
169 |
+
* @param {Object} response
|
170 |
+
*
|
171 |
+
* @since 4.1
|
172 |
+
*/
|
173 |
+
ajaxSuccess = (response) => {
|
174 |
+
|
175 |
+
/* Update our Redux Store with the new template(s) */
|
176 |
+
response.body.templates.forEach((template) => {
|
177 |
+
|
178 |
+
/* Check if template already in the list before adding to our store */
|
179 |
+
const matched = this.props.templates.find((item) => {
|
180 |
+
return (item.get('id') === template.id)
|
181 |
+
})
|
182 |
+
|
183 |
+
if (matched === undefined) {
|
184 |
+
template.new = true //ensure new templates go to end of list
|
185 |
+
template.message = this.props.installSuccessText
|
186 |
+
this.props.addNewTemplate(fromJS(template))
|
187 |
+
} else {
|
188 |
+
this.props.updateTemplateParam(template.id, 'message', this.props.installUpdatedText)
|
189 |
+
}
|
190 |
+
})
|
191 |
+
|
192 |
+
/* Mark as success and stop AJAX spinner */
|
193 |
+
this.setState({
|
194 |
+
ajax: false,
|
195 |
+
message: this.props.templateSuccessfullyInstalledUpdated
|
196 |
+
})
|
197 |
+
};
|
198 |
+
|
199 |
+
/**
|
200 |
+
* Show any errors to the user when AJAX request fails for any reason
|
201 |
+
*
|
202 |
+
* @param {Object} error
|
203 |
+
*
|
204 |
+
* @since 4.1
|
205 |
+
*/
|
206 |
+
ajaxFailed = (error) => {
|
207 |
+
/* Let the user know there was a problem with the upload */
|
208 |
+
this.setState({
|
209 |
+
error: (error.response.body && error.response.body.error !== undefined) ? error.response.body.error : this.props.genericUploadErrorText,
|
210 |
+
ajax: false
|
211 |
+
})
|
212 |
+
};
|
213 |
+
|
214 |
+
/**
|
215 |
+
* Remove message from state once the timeout has finished
|
216 |
+
*
|
217 |
+
* @since 4.1
|
218 |
+
*/
|
219 |
+
removeMessage = () => {
|
220 |
+
this.setState( {
|
221 |
+
message: ''
|
222 |
+
})
|
223 |
+
};
|
224 |
+
|
225 |
+
/**
|
226 |
+
* Prevent normal behaviour when this event fires
|
227 |
+
*
|
228 |
+
* @param {Object} e Event
|
229 |
+
*
|
230 |
+
* @since 4.1
|
231 |
+
*/
|
232 |
+
openDropzone = (e) => {
|
233 |
+
e.preventDefault()
|
234 |
+
};
|
235 |
+
|
236 |
+
/**
|
237 |
+
* @since 4.1
|
238 |
+
*/
|
239 |
+
render() {
|
240 |
+
return (
|
241 |
+
<Dropzone
|
242 |
+
onDrop={this.onDrop}
|
243 |
+
maxSize={10240000}
|
244 |
+
multiple={true}
|
245 |
+
className="theme add-new-theme gfpdf-dropzone">
|
246 |
+
<a href="#" onClick={this.openDropzone} className={this.state.ajax ? 'doing-ajax' : ''}>
|
247 |
+
<div className="theme-screenshot"><span /></div>
|
248 |
+
|
249 |
+
{this.state.error !== '' ? <ShowMessage text={this.state.error} error={true}/> : null}
|
250 |
+
{this.state.message !== '' ? <ShowMessage text={this.state.message} dismissable={true} dismissableCallback={this.removeMessage} /> : null}
|
251 |
+
|
252 |
+
<h2 className="theme-name">{this.props.addTemplateText}</h2>
|
253 |
+
</a>
|
254 |
+
<div className="gfpdf-template-install-instructions">{this.props.templateInstallInstructions}</div>
|
255 |
+
</Dropzone>
|
256 |
+
)
|
257 |
+
}
|
258 |
+
}
|
259 |
+
|
260 |
+
/**
|
261 |
+
* Map state to props
|
262 |
+
*
|
263 |
+
* @param {Object} state The current Redux State
|
264 |
+
*
|
265 |
+
* @returns {{templates}}
|
266 |
+
*
|
267 |
+
* @since 4.1
|
268 |
+
*/
|
269 |
+
const mapStateToProps = (state) => {
|
270 |
+
return {
|
271 |
+
templates: state.template.list
|
272 |
+
}
|
273 |
+
}
|
274 |
+
|
275 |
+
/**
|
276 |
+
* Map actions to props
|
277 |
+
*
|
278 |
+
* @param {func} dispatch Redux dispatcher
|
279 |
+
*
|
280 |
+
* @returns {{addNewTemplate: (function(template=Immutable Map)), updateTemplateParam: (function(id=string, name=string, value=*))}}
|
281 |
+
*
|
282 |
+
* @since 4.1
|
283 |
+
*/
|
284 |
+
const mapDispatchToProps = (dispatch) => {
|
285 |
+
return {
|
286 |
+
addNewTemplate: (template) => {
|
287 |
+
dispatch(addTemplate(template))
|
288 |
+
},
|
289 |
+
|
290 |
+
updateTemplateParam: (id, name, value) => {
|
291 |
+
dispatch(updateTemplateParam(id, name, value))
|
292 |
+
}
|
293 |
+
}
|
294 |
+
}
|
295 |
+
|
296 |
+
/**
|
297 |
+
* Maps our Redux store to our React component
|
298 |
+
*
|
299 |
+
* @since 4.1
|
300 |
+
*/
|
301 |
+
export default connect(mapStateToProps, mapDispatchToProps)(TemplateUploader)
|
src/assets/js/react/gfpdf-main.js
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import $ from 'jquery'
|
2 |
+
import Promise from 'promise-polyfill'
|
3 |
+
import templateBootstrap from './bootstrap/templateBootstrap'
|
4 |
+
|
5 |
+
/**
|
6 |
+
* JS Entry point for WebPack
|
7 |
+
*
|
8 |
+
* @package Gravity PDF
|
9 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
10 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
11 |
+
* @since 4.1
|
12 |
+
*/
|
13 |
+
|
14 |
+
/*
|
15 |
+
This file is part of Gravity PDF.
|
16 |
+
|
17 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
18 |
+
|
19 |
+
This program is free software; you can redistribute it and/or modify
|
20 |
+
it under the terms of the GNU General Public License as published by
|
21 |
+
the Free Software Foundation; either version 2 of the License, or
|
22 |
+
(at your option) any later version.
|
23 |
+
|
24 |
+
This program is distributed in the hope that it will be useful,
|
25 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
26 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
27 |
+
GNU General Public License for more details.
|
28 |
+
|
29 |
+
You should have received a copy of the GNU General Public License
|
30 |
+
along with this program; if not, write to the Free Software
|
31 |
+
Found
|
32 |
+
*/
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Our main entry point for our modern unit-tested JS
|
36 |
+
* This file gets run through Webpack to built it into valid ES5
|
37 |
+
*
|
38 |
+
* As we convert more JS to ES6 we'll likely load it from this file (unless we decide to make each feature modular)
|
39 |
+
*
|
40 |
+
* @since 4.1
|
41 |
+
*/
|
42 |
+
$(function () {
|
43 |
+
|
44 |
+
'use strict'
|
45 |
+
|
46 |
+
/* Initialise the Fancy Template Picker */
|
47 |
+
if (GFPDF.templateList !== undefined) {
|
48 |
+
|
49 |
+
// To add to window
|
50 |
+
if (!window.Promise) {
|
51 |
+
window.Promise = Promise;
|
52 |
+
}
|
53 |
+
|
54 |
+
/* Check if we should show the Fancy Template Picker */
|
55 |
+
var templateId = '#gfpdf_settings\\[template\\], #gfpdf_settings\\[default_template\\]'
|
56 |
+
var $templateField = $(templateId)
|
57 |
+
|
58 |
+
/* Run this code if the element exists */
|
59 |
+
if ($templateField.length > 0) {
|
60 |
+
templateBootstrap($templateField)
|
61 |
+
}
|
62 |
+
}
|
63 |
+
})
|
src/assets/js/react/reducers/templateReducer.js
ADDED
@@ -0,0 +1,155 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { fromJS } from 'immutable'
|
2 |
+
import {
|
3 |
+
SEARCH_TEMPLATES,
|
4 |
+
SELECT_TEMPLATE,
|
5 |
+
ADD_TEMPLATE,
|
6 |
+
UPDATE_TEMPLATE,
|
7 |
+
UPDATE_TEMPLATE_PARAM,
|
8 |
+
DELETE_TEMPLATE,
|
9 |
+
} from '../actionTypes/templates'
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Our Redux Template Reducer that take the objects returned from our Redux Template Actions
|
13 |
+
* and updates the template portion of our store in an immutable way
|
14 |
+
*
|
15 |
+
* @package Gravity PDF
|
16 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
17 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
18 |
+
* @since 4.1
|
19 |
+
*/
|
20 |
+
|
21 |
+
/*
|
22 |
+
This file is part of Gravity PDF.
|
23 |
+
|
24 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
25 |
+
|
26 |
+
This program is free software; you can redistribute it and/or modify
|
27 |
+
it under the terms of the GNU General Public License as published by
|
28 |
+
the Free Software Foundation; either version 2 of the License, or
|
29 |
+
(at your option) any later version.
|
30 |
+
|
31 |
+
This program is distributed in the hope that it will be useful,
|
32 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
33 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
34 |
+
GNU General Public License for more details.
|
35 |
+
|
36 |
+
You should have received a copy of the GNU General Public License
|
37 |
+
along with this program; if not, write to the Free Software
|
38 |
+
Found
|
39 |
+
*/
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Setup the initial state of the "template" portion of our Redux store
|
43 |
+
*
|
44 |
+
* @type {{list: any, activeTemplate: (any), search: string}}
|
45 |
+
*
|
46 |
+
* @since 4.1
|
47 |
+
*/
|
48 |
+
export const initialState = {
|
49 |
+
list: fromJS(GFPDF.templateList),
|
50 |
+
activeTemplate: GFPDF.activeTemplate || GFPDF.activeDefaultTemplate,
|
51 |
+
search: '',
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Returns the first Immutable Map in our Immutable List which
|
56 |
+
* matches the template id passed.
|
57 |
+
*
|
58 |
+
* @param {Object} list The Immutable list of templates
|
59 |
+
* @param {string} id The template ID
|
60 |
+
*
|
61 |
+
* @returns object Immutable Map object of our template
|
62 |
+
*
|
63 |
+
* @since 4.1
|
64 |
+
*/
|
65 |
+
const getTemplateIndex = (list, id) => {
|
66 |
+
return list.findKey((template) => {
|
67 |
+
if (template.get('id') === id) {
|
68 |
+
return true
|
69 |
+
}
|
70 |
+
})
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* The action template reducer which updates our state
|
75 |
+
*
|
76 |
+
* @param {Object} state The current state of our template store
|
77 |
+
* @param {Object} action The Redux action details being triggered
|
78 |
+
*
|
79 |
+
* @returns {Object} State (whether updated or not)
|
80 |
+
*
|
81 |
+
* @since 4.1
|
82 |
+
*/
|
83 |
+
export default function (state = initialState, action) {
|
84 |
+
|
85 |
+
switch (action.type) {
|
86 |
+
/**
|
87 |
+
* Update the search key
|
88 |
+
*
|
89 |
+
* @since 4.1
|
90 |
+
*/
|
91 |
+
case SEARCH_TEMPLATES:
|
92 |
+
return {
|
93 |
+
...state,
|
94 |
+
search: action.text
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Update the activeTemplate key
|
99 |
+
*
|
100 |
+
* @since 4.1
|
101 |
+
*/
|
102 |
+
case SELECT_TEMPLATE:
|
103 |
+
return {
|
104 |
+
...state,
|
105 |
+
activeTemplate: action.id
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Push a new template Immutable Map onto our Immutable List
|
110 |
+
*
|
111 |
+
* @since 4.1
|
112 |
+
*/
|
113 |
+
case ADD_TEMPLATE:
|
114 |
+
return {
|
115 |
+
...state,
|
116 |
+
list: state.list.push(action.template)
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Replace template Immutable Map with new Map
|
121 |
+
*
|
122 |
+
* @since 4.1
|
123 |
+
*/
|
124 |
+
case UPDATE_TEMPLATE:
|
125 |
+
return {
|
126 |
+
...state,
|
127 |
+
list: state.list.set(getTemplateIndex(state.list, action.template.get('id')), action.template)
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Replace single parameter in template Immutable Map with new value
|
132 |
+
*
|
133 |
+
* @since 4.1
|
134 |
+
*/
|
135 |
+
case UPDATE_TEMPLATE_PARAM:
|
136 |
+
return {
|
137 |
+
...state,
|
138 |
+
list: state.list.setIn([ getTemplateIndex(state.list, action.id), action.name ], action.value)
|
139 |
+
}
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Remove template Immutable Map from Immutable List
|
143 |
+
*
|
144 |
+
* @since 4.1
|
145 |
+
*/
|
146 |
+
case DELETE_TEMPLATE:
|
147 |
+
return {
|
148 |
+
...state,
|
149 |
+
list: state.list.delete(getTemplateIndex(state.list, action.id))
|
150 |
+
}
|
151 |
+
}
|
152 |
+
|
153 |
+
/* None of these actions fired so return state */
|
154 |
+
return state
|
155 |
+
}
|
src/assets/js/react/router/templateRouter.js
ADDED
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React from 'react'
|
2 |
+
|
3 |
+
import { render } from 'react-dom'
|
4 |
+
import { Provider } from 'react-redux'
|
5 |
+
|
6 |
+
import { HashRouter as Router, Route, Switch } from 'react-router-dom'
|
7 |
+
|
8 |
+
import TemplateList from '../components/TemplateList'
|
9 |
+
import TemplateSingle from '../components/TemplateSingle'
|
10 |
+
import Empty from '../components/Empty'
|
11 |
+
|
12 |
+
/**
|
13 |
+
* React Router v3 Routes with our Redux store integrated
|
14 |
+
*
|
15 |
+
* Once React Router v4 becomes stable we'll update as required, or if we need to decouple our
|
16 |
+
* routes for another module.
|
17 |
+
*
|
18 |
+
* @package Gravity PDF
|
19 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
20 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
21 |
+
* @since 4.1
|
22 |
+
*/
|
23 |
+
|
24 |
+
/*
|
25 |
+
This file is part of Gravity PDF.
|
26 |
+
|
27 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
28 |
+
|
29 |
+
This program is free software; you can redistribute it and/or modify
|
30 |
+
it under the terms of the GNU General Public License as published by
|
31 |
+
the Free Software Foundation; either version 2 of the License, or
|
32 |
+
(at your option) any later version.
|
33 |
+
|
34 |
+
This program is distributed in the hope that it will be useful,
|
35 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
36 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
37 |
+
GNU General Public License for more details.
|
38 |
+
|
39 |
+
You should have received a copy of the GNU General Public License
|
40 |
+
along with this program; if not, write to the Free Software
|
41 |
+
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
42 |
+
*/
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Contains the React Router Routes for our Advanced Template Selector.
|
46 |
+
* We are using hashHistory instead of browserHistory so as not to affect the backend
|
47 |
+
*
|
48 |
+
* Routes include:
|
49 |
+
*
|
50 |
+
* /template/ (../components/TemplateList)
|
51 |
+
* /template/:id (../components/TemplateSingle)
|
52 |
+
* All other routes (../components/Empty)
|
53 |
+
*
|
54 |
+
* @since 4.1
|
55 |
+
*/
|
56 |
+
export const Routes = () => (
|
57 |
+
<Router>
|
58 |
+
<Switch>
|
59 |
+
<Route path="/template"
|
60 |
+
exact
|
61 |
+
render={(props) => (
|
62 |
+
<TemplateList
|
63 |
+
{...props}
|
64 |
+
|
65 |
+
ajaxUrl={GFPDF.ajaxUrl}
|
66 |
+
ajaxNonce={GFPDF.ajaxNonce}
|
67 |
+
|
68 |
+
templateDetailsText={GFPDF.templateDetails}
|
69 |
+
templateHeaderText={GFPDF.installedPdfs}
|
70 |
+
|
71 |
+
genericUploadErrorText={GFPDF.problemWithTheUpload}
|
72 |
+
activateText={GFPDF.select}
|
73 |
+
addTemplateText={GFPDF.addNewTemplate}
|
74 |
+
filenameErrorText={GFPDF.uploadInvalidNotZipFile}
|
75 |
+
filesizeErrorText={GFPDF.uploadInvalidExceedsFileSizeLimit}
|
76 |
+
installSuccessText={GFPDF.templateSuccessfullyInstalled}
|
77 |
+
installUpdatedText={GFPDF.templateSuccessfullyUpdated}
|
78 |
+
templateSuccessfullyInstalledUpdated={GFPDF.templateSuccessfullyInstalledUpdated}
|
79 |
+
templateInstallInstructions={GFPDF.templateInstallInstructions}
|
80 |
+
/>
|
81 |
+
)}
|
82 |
+
/>
|
83 |
+
|
84 |
+
<Route path="/template/:id"
|
85 |
+
render={(props) => (
|
86 |
+
<TemplateSingle
|
87 |
+
{...props}
|
88 |
+
|
89 |
+
ajaxUrl={GFPDF.ajaxUrl}
|
90 |
+
ajaxNonce={GFPDF.ajaxNonce}
|
91 |
+
pdfWorkingDirPath={GFPDF.pdfWorkingDir}
|
92 |
+
|
93 |
+
activateText={GFPDF.select}
|
94 |
+
templateDeleteText={GFPDF.delete}
|
95 |
+
templateConfirmDeleteText={GFPDF.doYouWantToDeleteTemplate}
|
96 |
+
templateDeleteErrorText={GFPDF.couldNotDeleteTemplate}
|
97 |
+
currentTemplateText={GFPDF.currentTemplate}
|
98 |
+
versionText={GFPDF.version}
|
99 |
+
groupText={GFPDF.group}
|
100 |
+
tagsText={GFPDF.tags}
|
101 |
+
showPreviousTemplateText={GFPDF.showPreviousTemplate}
|
102 |
+
showNextTemplateText={GFPDF.showNextTemplate}
|
103 |
+
/>
|
104 |
+
)}
|
105 |
+
/>
|
106 |
+
|
107 |
+
<Route component={Empty}/>
|
108 |
+
</Switch>
|
109 |
+
</Router>)
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Setup React Router with our Redux Store
|
113 |
+
*
|
114 |
+
* @param {Object} store Redux Store
|
115 |
+
*
|
116 |
+
* @since 4.1
|
117 |
+
*/
|
118 |
+
export default function TemplatesRouter (store) {
|
119 |
+
render((<Provider store={store}>
|
120 |
+
<Routes />
|
121 |
+
</Provider>), document.getElementById('gfpdf-overlay'))
|
122 |
+
}
|
src/assets/js/react/selectors/getTemplates.js
ADDED
@@ -0,0 +1,186 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { createSelector } from 'reselect'
|
2 |
+
import versionCompare from '../utilities/versionCompare'
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Uses the Redux Reselect library to sort, filter and search our templates.
|
6 |
+
* It also checks if the PDF templates are compatible with the current version of Gravity PDF
|
7 |
+
*
|
8 |
+
* @package Gravity PDF
|
9 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
10 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
11 |
+
* @since 4.1
|
12 |
+
*/
|
13 |
+
|
14 |
+
/*
|
15 |
+
This file is part of Gravity PDF.
|
16 |
+
|
17 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
18 |
+
|
19 |
+
This program is free software; you can redistribute it and/or modify
|
20 |
+
it under the terms of the GNU General Public License as published by
|
21 |
+
the Free Software Foundation; either version 2 of the License, or
|
22 |
+
(at your option) any later version.
|
23 |
+
|
24 |
+
This program is distributed in the hope that it will be useful,
|
25 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
26 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
27 |
+
GNU General Public License for more details.
|
28 |
+
|
29 |
+
You should have received a copy of the GNU General Public License
|
30 |
+
along with this program; if not, write to the Free Software
|
31 |
+
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
32 |
+
*/
|
33 |
+
|
34 |
+
/* Assign specific parts of the Redux store to constants (note, we are returning functions) */
|
35 |
+
const getTemplates = (state) => state.template.list
|
36 |
+
const getSearch = (state) => state.template.search
|
37 |
+
const getActiveTemplate = (state) => state.template.activeTemplate
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Searches our templates for specific terms and returns the results
|
41 |
+
* This function is adapted from the Backbone.js filter for themes
|
42 |
+
*
|
43 |
+
* @param {string} term
|
44 |
+
* @param {Object} templates Immutable List of templates
|
45 |
+
*
|
46 |
+
* @returns {Object} Filtered Immutable list of templates
|
47 |
+
*
|
48 |
+
* @since 4.1
|
49 |
+
*/
|
50 |
+
export const searchTemplates = (term, templates) => {
|
51 |
+
/*
|
52 |
+
* Escape the term string for RegExp meta characters
|
53 |
+
* Consider spaces as word delimiters and match the whole string
|
54 |
+
*/
|
55 |
+
term = term.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&')
|
56 |
+
term = term.replace(/ /g, ')(?=.*')
|
57 |
+
|
58 |
+
const match = new RegExp('^(?=.*' + term + ').+', 'i')
|
59 |
+
|
60 |
+
/* Filter through the templates. Any templates return "true" in out match.test() statement will be included */
|
61 |
+
const results = templates.filter((template) => {
|
62 |
+
|
63 |
+
/* Do very basic HTML tag removal from the fields we are interested in */
|
64 |
+
const name = template.get('template').replace(/(<([^>]+)>)/ig, '')
|
65 |
+
const description = template.get('description').replace(/(<([^>]+)>)/ig, '')
|
66 |
+
const author = template.get('author').replace(/(<([^>]+)>)/ig, '')
|
67 |
+
const group = template.get('group').replace(/(<([^>]+)>)/ig, '')
|
68 |
+
|
69 |
+
/* Check if our matching term(s) are found in the string */
|
70 |
+
return match.test([ name, template.get('id'), group, description, author ].toString())
|
71 |
+
})
|
72 |
+
|
73 |
+
return results
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* A PDF template sorting function
|
78 |
+
*
|
79 |
+
* The sort order is as follows:
|
80 |
+
*
|
81 |
+
* 1. Any new templates get auto-shifted to the back of the list (just installed)
|
82 |
+
* 2. The active template gets auto-shifted to the front of the list
|
83 |
+
* 3. The templates are then sorted alphabetically by group
|
84 |
+
* 4. Then alphabetically by name
|
85 |
+
*
|
86 |
+
* @param {Object} templates The Immutable list of templates
|
87 |
+
* @param {string} activeTemplate The current active PDF template
|
88 |
+
*
|
89 |
+
* @returns {Object} Sorted Immutable List
|
90 |
+
*
|
91 |
+
* @since 4.1
|
92 |
+
*/
|
93 |
+
export const sortTemplates = (templates, activeTemplate) => {
|
94 |
+
/* Sort out template list using our comparator function */
|
95 |
+
return templates.sort((a, b) => {
|
96 |
+
|
97 |
+
/* Shift new templates to the bottom (only on install) */
|
98 |
+
if (a.get('new', false) === true && a.get('new', false) === true) {
|
99 |
+
return 0 //equal
|
100 |
+
}
|
101 |
+
|
102 |
+
if (a.get('new', false) === true) {
|
103 |
+
return 1
|
104 |
+
}
|
105 |
+
|
106 |
+
if (b.get('new', false) === true) {
|
107 |
+
return -1
|
108 |
+
}
|
109 |
+
|
110 |
+
/* Hoist the active template above the rest */
|
111 |
+
if (activeTemplate === a.get('id')) {
|
112 |
+
return -1
|
113 |
+
}
|
114 |
+
|
115 |
+
if (activeTemplate === b.get('id')) {
|
116 |
+
return 1
|
117 |
+
}
|
118 |
+
|
119 |
+
/* Order alphabetically by the group name */
|
120 |
+
if (a.get('group') < b.get('group')) {
|
121 |
+
return -1 //before
|
122 |
+
}
|
123 |
+
|
124 |
+
if (a.get('group') > b.get('group')) {
|
125 |
+
return 1 //after
|
126 |
+
}
|
127 |
+
|
128 |
+
/* Then order alphabetically by the template name */
|
129 |
+
if (a.get('template') < b.get('template')) {
|
130 |
+
return -1 //before
|
131 |
+
}
|
132 |
+
|
133 |
+
if (a.get('template') > b.get('template')) {
|
134 |
+
return 1 //after
|
135 |
+
}
|
136 |
+
|
137 |
+
return 0 //equal
|
138 |
+
})
|
139 |
+
}
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Check all PDF templates for compatibility with the current verison of Gravity PDF
|
143 |
+
* If they don't pass we'll also dynamically apply error messages
|
144 |
+
*
|
145 |
+
* @param {Object} templates The Immutable list of templates
|
146 |
+
*
|
147 |
+
* @returns {Object} The Immutable list of templates
|
148 |
+
*
|
149 |
+
* @since 4.1
|
150 |
+
*/
|
151 |
+
export const addCompatibilityCheck = (templates) => {
|
152 |
+
/* Apply this function to all templates */
|
153 |
+
return templates.map((template) => {
|
154 |
+
/* Get the PDF version and check it against the Gravity PDF version */
|
155 |
+
const requiredVersion = template.get('required_pdf_version')
|
156 |
+
if (versionCompare(requiredVersion, GFPDF.currentVersion, '>')) {
|
157 |
+
/* Not compatible, so let's mark it */
|
158 |
+
return template.merge({
|
159 |
+
'compatible': false,
|
160 |
+
'error': GFPDF.requiresGravityPdfVersion.replace(/%s/g, requiredVersion),
|
161 |
+
'long_error': GFPDF.templateNotCompatibleWithGravityPdfVersion.replace(/%s/g, requiredVersion)
|
162 |
+
})
|
163 |
+
}
|
164 |
+
/* If versionCompare() passed we'll mark as true */
|
165 |
+
return template.set('compatible', true)
|
166 |
+
})
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Create our Reselect selector and apply to our store
|
171 |
+
*
|
172 |
+
* @since 4.1
|
173 |
+
*/
|
174 |
+
export default createSelector(
|
175 |
+
[ getTemplates, getSearch, getActiveTemplate ],
|
176 |
+
(templates, search, activeTemplate) => {
|
177 |
+
|
178 |
+
templates = addCompatibilityCheck(templates)
|
179 |
+
|
180 |
+
if (search) {
|
181 |
+
templates = searchTemplates(search, templates)
|
182 |
+
}
|
183 |
+
|
184 |
+
return sortTemplates(templates, activeTemplate)
|
185 |
+
}
|
186 |
+
)
|
src/assets/js/react/utilities/versionCompare.js
ADDED
@@ -0,0 +1,153 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* A JS-port of PHP's version_compare()
|
3 |
+
*
|
4 |
+
* This function is taken from the Locutus project which has an MIT license.
|
5 |
+
* The MIT license and copyright notice is included
|
6 |
+
*
|
7 |
+
* https://github.com/kvz/locutus
|
8 |
+
* https://github.com/kvz/locutus/blob/master/src/php/info/version_compare.js
|
9 |
+
*
|
10 |
+
* @param string v1 First version number
|
11 |
+
* @param string v2 Second version number
|
12 |
+
* @param string operator optional If the third optional operator argument is specified, test for a particular relationship.
|
13 |
+
* The possible operators are: <, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne respectively.
|
14 |
+
* @returns -1 if the first version is lower than the second, 0 if they are equal, and 1 if the second is lower.
|
15 |
+
* When using the optional operator argument, the function will return TRUE if the relationship is the one specified by the operator, FALSE otherwise.
|
16 |
+
*/
|
17 |
+
|
18 |
+
/*
|
19 |
+
Copyright (c) 2007-2016 Kevin van Zonneveld (http://kvz.io)
|
20 |
+
and Contributors (http://locutus.io/authors)
|
21 |
+
|
22 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
23 |
+
this software and associated documentation files (the "Software"), to deal in
|
24 |
+
the Software without restriction, including without limitation the rights to
|
25 |
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
26 |
+
of the Software, and to permit persons to whom the Software is furnished to do
|
27 |
+
so, subject to the following conditions:
|
28 |
+
|
29 |
+
The above copyright notice and this permission notice shall be included in all
|
30 |
+
copies or substantial portions of the Software.
|
31 |
+
|
32 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
33 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
34 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
35 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
36 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
37 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
38 |
+
SOFTWARE.
|
39 |
+
*/
|
40 |
+
export default (v1, v2, operator) => {
|
41 |
+
// discuss at: http://locutus.io/php/version_compare/
|
42 |
+
// original by: Philippe Jausions (http://pear.php.net/user/jausions)
|
43 |
+
// original by: Aidan Lister (http://aidanlister.com/)
|
44 |
+
// reimplemented by: Kankrelune (http://www.webfaktory.info/)
|
45 |
+
// improved by: Brett Zamir (http://brett-zamir.me)
|
46 |
+
// improved by: Scott Baker
|
47 |
+
// improved by: Theriault (https://github.com/Theriault)
|
48 |
+
// example 1: version_compare('8.2.5rc', '8.2.5a')
|
49 |
+
// returns 1: 1
|
50 |
+
// example 2: version_compare('8.2.50', '8.2.52', '<')
|
51 |
+
// returns 2: true
|
52 |
+
// example 3: version_compare('5.3.0-dev', '5.3.0')
|
53 |
+
// returns 3: -1
|
54 |
+
// example 4: version_compare('4.1.0.52','4.01.0.51')
|
55 |
+
// returns 4: 1
|
56 |
+
|
57 |
+
// Important: compare must be initialized at 0.
|
58 |
+
var i
|
59 |
+
var x
|
60 |
+
var compare = 0
|
61 |
+
|
62 |
+
// vm maps textual PHP versions to negatives so they're less than 0.
|
63 |
+
// PHP currently defines these as CASE-SENSITIVE. It is important to
|
64 |
+
// leave these as negatives so that they can come before numerical versions
|
65 |
+
// and as if no letters were there to begin with.
|
66 |
+
// (1alpha is < 1 and < 1.1 but > 1dev1)
|
67 |
+
// If a non-numerical value can't be mapped to this table, it receives
|
68 |
+
// -7 as its value.
|
69 |
+
var vm = {
|
70 |
+
'dev': -6,
|
71 |
+
'alpha': -5,
|
72 |
+
'a': -5,
|
73 |
+
'beta': -4,
|
74 |
+
'b': -4,
|
75 |
+
'RC': -3,
|
76 |
+
'rc': -3,
|
77 |
+
'#': -2,
|
78 |
+
'p': 1,
|
79 |
+
'pl': 1
|
80 |
+
}
|
81 |
+
|
82 |
+
// This function will be called to prepare each version argument.
|
83 |
+
// It replaces every _, -, and + with a dot.
|
84 |
+
// It surrounds any nonsequence of numbers/dots with dots.
|
85 |
+
// It replaces sequences of dots with a single dot.
|
86 |
+
// version_compare('4..0', '4.0') === 0
|
87 |
+
// Important: A string of 0 length needs to be converted into a value
|
88 |
+
// even less than an unexisting value in vm (-7), hence [-8].
|
89 |
+
// It's also important to not strip spaces because of this.
|
90 |
+
// version_compare('', ' ') === 1
|
91 |
+
var _prepVersion = function _prepVersion (v) {
|
92 |
+
v = ('' + v).replace(/[_\-+]/g, '.')
|
93 |
+
v = v.replace(/([^.\d]+)/g, '.$1.').replace(/\.{2,}/g, '.')
|
94 |
+
return !v.length ? [ -8 ] : v.split('.')
|
95 |
+
}
|
96 |
+
// This converts a version component to a number.
|
97 |
+
// Empty component becomes 0.
|
98 |
+
// Non-numerical component becomes a negative number.
|
99 |
+
// Numerical component becomes itself as an integer.
|
100 |
+
var _numVersion = function _numVersion (v) {
|
101 |
+
return !v ? 0 : isNaN(v) ? vm[ v ] || -7 : parseInt(v, 10)
|
102 |
+
}
|
103 |
+
|
104 |
+
v1 = _prepVersion(v1)
|
105 |
+
v2 = _prepVersion(v2)
|
106 |
+
x = Math.max(v1.length, v2.length)
|
107 |
+
for (i = 0; i < x; i++) {
|
108 |
+
if (v1[ i ] === v2[ i ]) {
|
109 |
+
continue
|
110 |
+
}
|
111 |
+
v1[ i ] = _numVersion(v1[ i ])
|
112 |
+
v2[ i ] = _numVersion(v2[ i ])
|
113 |
+
if (v1[ i ] < v2[ i ]) {
|
114 |
+
compare = -1
|
115 |
+
break
|
116 |
+
} else if (v1[ i ] > v2[ i ]) {
|
117 |
+
compare = 1
|
118 |
+
break
|
119 |
+
}
|
120 |
+
}
|
121 |
+
if (!operator) {
|
122 |
+
return compare
|
123 |
+
}
|
124 |
+
|
125 |
+
// Important: operator is CASE-SENSITIVE.
|
126 |
+
// "No operator" seems to be treated as "<."
|
127 |
+
// Any other values seem to make the function return null.
|
128 |
+
switch (operator) {
|
129 |
+
case '>':
|
130 |
+
case 'gt':
|
131 |
+
return compare > 0
|
132 |
+
case '>=':
|
133 |
+
case 'ge':
|
134 |
+
return compare >= 0
|
135 |
+
case '<=':
|
136 |
+
case 'le':
|
137 |
+
return compare <= 0
|
138 |
+
case '===':
|
139 |
+
case '=':
|
140 |
+
case 'eq':
|
141 |
+
return compare === 0
|
142 |
+
case '<>':
|
143 |
+
case '!==':
|
144 |
+
case 'ne':
|
145 |
+
return compare !== 0
|
146 |
+
case '':
|
147 |
+
case '<':
|
148 |
+
case 'lt':
|
149 |
+
return compare < 0
|
150 |
+
default:
|
151 |
+
return null
|
152 |
+
}
|
153 |
+
}
|
src/assets/languages/README.MD
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
### Including your own Translations for Gravity PDF
|
2 |
+
|
3 |
+
Don't place any .mo / .po files in this directory. They will be overridden when the plugin is updated.
|
4 |
+
Instead, put them in your language directory – by default this is /wp-content/languages/plugins/.
|
5 |
+
|
6 |
+
Make sure you name your .mo files `gravity-forms-pdf-extended-{:wp_locale}.mo`, where {:wp_locale} is the ID found
|
7 |
+
in this list: https://make.wordpress.org/polyglots/teams/.
|
8 |
+
|
9 |
+
For example, if you had a translation for Bengali you would name the file `gravity-forms-pdf-extended-bn_BD.mo`
|
10 |
+
|
11 |
+
The same naming convension applies to .po files.
|
12 |
+
|
13 |
+
### Contributing Translations
|
14 |
+
|
15 |
+
Feel free to email `support [at] gravitypdf [dot] com` with your .mo and .po files and we'll include them in the plugin.
|
16 |
+
|
17 |
+
Better yet, join the WordPress Translation Community and help translate, review, or improve a translation for Gravity PDF:
|
18 |
+
https://translate.wordpress.org/projects/wp-plugins/gravity-forms-pdf-extended
|
19 |
+
|
20 |
+
Once a language is 95% translated on WordPress.org we'll start using that language pack and stop shipping the associated
|
21 |
+
.po / .mo files in the plugin.
|
22 |
+
|
23 |
+
More info can be found at https://make.wordpress.org/polyglots/
|
24 |
+
|
25 |
+
### What are .po / .mo files?
|
26 |
+
|
27 |
+
They are special language files that WordPress uses to automatically translate the plugin from English to your language of choice.
|
28 |
+
|
29 |
+
You can create these files by using a free program called Poedit. [There's a guide on WordPress.org](https://make.wordpress.org/polyglots/handbook/tools/poedit)
|
30 |
+
showing you the basic steps for importing a translation template (called a .pot file), translating and generating .po and .mo files.
|
31 |
+
|
32 |
+
Once generated, use the appropriate naming convension and save it in the language directory (see above for details).
|
33 |
+
|
34 |
+
This directory contains an up-to-date .pot file you can use with Poedit.
|
35 |
+
|
36 |
+
|
src/assets/languages/gravity-forms-pdf-extended-en_AU.mo
ADDED
Binary file
|
src/assets/languages/gravity-forms-pdf-extended-en_AU.po
ADDED
@@ -0,0 +1,2595 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2016 gravity-forms-pdf-extended
|
2 |
+
# This file is distributed under the same license as the gravity-forms-pdf-extended package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: gravity-forms-pdf-extended\n"
|
6 |
+
"POT-Creation-Date: \n"
|
7 |
+
"PO-Revision-Date: 2017-01-19 09:47+1100\n"
|
8 |
+
"Last-Translator: Jake Jackson <support@gravitypdf.com>\n"
|
9 |
+
"Language-Team: \n"
|
10 |
+
"Language: en_AU\n"
|
11 |
+
"MIME-Version: 1.0\n"
|
12 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
13 |
+
"Content-Transfer-Encoding: 8bit\n"
|
14 |
+
"X-Poedit-Basepath: ..\n"
|
15 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
|
17 |
+
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
|
18 |
+
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
19 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
20 |
+
"X-Generator: Poedit 1.8.11\n"
|
21 |
+
"X-Poedit-SearchPath-0: .\n"
|
22 |
+
"X-Poedit-SearchPath-1: languages\n"
|
23 |
+
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
24 |
+
|
25 |
+
#: api.php:503
|
26 |
+
msgid ""
|
27 |
+
"The $type parameter is invalid. Only \"view\" and \"model\" are accepted"
|
28 |
+
msgstr ""
|
29 |
+
"The $type parameter is invalid. Only \"view\" and \"model\" are accepted"
|
30 |
+
|
31 |
+
#: api.php:793
|
32 |
+
msgid ""
|
33 |
+
"The option key %s already exists. Use GPDFAPI::update_plugin_option instead"
|
34 |
+
msgstr ""
|
35 |
+
"The option key %s already exists. Use GPDFAPI::update_plugin_option instead"
|
36 |
+
|
37 |
+
#: pdf.php:379
|
38 |
+
msgid "WordPress Version %s is required. %sGet more info%s."
|
39 |
+
msgstr "WordPress Version %s is required. %sGet more info%s."
|
40 |
+
|
41 |
+
#: pdf.php:417
|
42 |
+
msgid "%sGravity Forms%s Version %s is required. %sGet more info%s."
|
43 |
+
msgstr "%sGravity Forms%s Version %s is required. %sGet more info%s."
|
44 |
+
|
45 |
+
#: pdf.php:455
|
46 |
+
msgid ""
|
47 |
+
"You are running an %soutdated version of PHP%s. Contact your web hosting "
|
48 |
+
"provider to update. %sGet more info%s."
|
49 |
+
msgstr ""
|
50 |
+
"You are running an %soutdated version of PHP%s. Contact your web hosting "
|
51 |
+
"provider to update. %sGet more info%s."
|
52 |
+
|
53 |
+
#: pdf.php:493
|
54 |
+
msgid ""
|
55 |
+
"The PHP Extension MB String could not be detected. Contact your web hosting "
|
56 |
+
"provider to fix. %sGet more info%s."
|
57 |
+
msgstr ""
|
58 |
+
"The PHP Extension MB String could not be detected. Contact your web hosting "
|
59 |
+
"provider to fix. %sGet more info%s."
|
60 |
+
|
61 |
+
#: pdf.php:531
|
62 |
+
msgid ""
|
63 |
+
"The PHP Extension MB String does not have MB Regex enabled. Contact your web "
|
64 |
+
"hosting provider to fix. %sGet more info%s."
|
65 |
+
msgstr ""
|
66 |
+
"The PHP Extension MB String does not have MB Regex enabled. Contact your web "
|
67 |
+
"hosting provider to fix. %sGet more info%s."
|
68 |
+
|
69 |
+
#: pdf.php:569
|
70 |
+
msgid ""
|
71 |
+
"The PHP Extension GD Image Library could not be detected. Contact your web "
|
72 |
+
"hosting provider to fix. %sGet more info%s."
|
73 |
+
msgstr ""
|
74 |
+
"The PHP Extension GD Image Library could not be detected. Contact your web "
|
75 |
+
"hosting provider to fix. %sGet more info%s."
|
76 |
+
|
77 |
+
#: pdf.php:607
|
78 |
+
msgid ""
|
79 |
+
"The PHP DOM Extension was not found. Contact your web hosting provider to "
|
80 |
+
"fix. %sGet more info%s."
|
81 |
+
msgstr ""
|
82 |
+
"The PHP DOM Extension was not found. Contact your web hosting provider to "
|
83 |
+
"fix. %sGet more info%s."
|
84 |
+
|
85 |
+
#: pdf.php:621
|
86 |
+
msgid ""
|
87 |
+
"The PHP Extension libxml could not be detected. Contact your web hosting "
|
88 |
+
"provider to fix. %sGet more info%s."
|
89 |
+
msgstr ""
|
90 |
+
"The PHP Extension libxml could not be detected. Contact your web hosting "
|
91 |
+
"provider to fix. %sGet more info%s."
|
92 |
+
|
93 |
+
#: pdf.php:667
|
94 |
+
msgid ""
|
95 |
+
"You need %s128MB%s of WP Memory (RAM) but we only found %s available. %sTry "
|
96 |
+
"these methods to increase your memory limit%s, otherwise contact your web "
|
97 |
+
"hosting provider to fix."
|
98 |
+
msgstr ""
|
99 |
+
"You need %s128MB%s of WP Memory (RAM) but we only found %s available. %sTry "
|
100 |
+
"these methods to increase your memory limit%s, otherwise contact your web "
|
101 |
+
"hosting provider to fix."
|
102 |
+
|
103 |
+
#: pdf.php:801
|
104 |
+
msgid "Gravity PDF Installation Problem"
|
105 |
+
msgstr "Gravity PDF Installation Problem"
|
106 |
+
|
107 |
+
#: pdf.php:805
|
108 |
+
msgid ""
|
109 |
+
"The minimum requirements for Gravity PDF have not been met. Please fix the "
|
110 |
+
"issue(s) below to continue:"
|
111 |
+
msgstr ""
|
112 |
+
"The minimum requirements for Gravity PDF have not been met. Please fix the "
|
113 |
+
"issue(s) below to continue:"
|
114 |
+
|
115 |
+
#: src/bootstrap.php:315, src/bootstrap.php:339, src/deprecated.php:111,
|
116 |
+
#: src/deprecated.php:135
|
117 |
+
msgid "\"%s\" has been deprecated as of Gravity PDF 4.0"
|
118 |
+
msgstr "\"%s\" has been deprecated as of Gravity PDF 4.0"
|
119 |
+
|
120 |
+
#: src/bootstrap.php:799
|
121 |
+
msgid "View Gravity PDF Settings"
|
122 |
+
msgstr "View Gravity PDF Settings"
|
123 |
+
|
124 |
+
#: src/bootstrap.php:799
|
125 |
+
msgid "Settings"
|
126 |
+
msgstr "Settings"
|
127 |
+
|
128 |
+
#: src/bootstrap.php:839
|
129 |
+
msgid "View Gravity PDF Documentation"
|
130 |
+
msgstr "View Gravity PDF Documentation"
|
131 |
+
|
132 |
+
#: src/bootstrap.php:839
|
133 |
+
msgid "Docs"
|
134 |
+
msgstr "Docs"
|
135 |
+
|
136 |
+
#: src/bootstrap.php:841
|
137 |
+
msgid "Get Help and Support"
|
138 |
+
msgstr "Get Help and Support"
|
139 |
+
|
140 |
+
#: src/bootstrap.php:841
|
141 |
+
msgid "Support"
|
142 |
+
msgstr "Support"
|
143 |
+
|
144 |
+
#: src/bootstrap.php:843
|
145 |
+
msgid "View Gravity PDF Theme Shop"
|
146 |
+
msgstr "View Gravity PDF Theme Shop"
|
147 |
+
|
148 |
+
#: src/bootstrap.php:843
|
149 |
+
msgid "Theme Shop"
|
150 |
+
msgstr "Theme Shop"
|
151 |
+
|
152 |
+
#: src/bootstrap.php:1323, src/controller/Controller_Shortcodes.php:301,
|
153 |
+
#: src/helper/Helper_Data.php:349
|
154 |
+
msgid "Gravity PDF"
|
155 |
+
msgstr "Gravity PDF"
|
156 |
+
|
157 |
+
#: src/controller/Controller_Actions.php:311
|
158 |
+
msgid "Review Submitted"
|
159 |
+
msgstr "Review Submitted"
|
160 |
+
|
161 |
+
#: src/controller/Controller_Actions.php:331
|
162 |
+
msgid "Begin Migration"
|
163 |
+
msgstr "Begin Migration"
|
164 |
+
|
165 |
+
#: src/controller/Controller_Actions.php:469,
|
166 |
+
#: src/model/Model_Form_Settings.php:379,
|
167 |
+
#: src/model/Model_Form_Settings.php:449,
|
168 |
+
#: src/model/Model_Form_Settings.php:569, src/view/View_Settings.php:535
|
169 |
+
msgid "You do not have permission to access this page"
|
170 |
+
msgstr "You do not have permission to access this page"
|
171 |
+
|
172 |
+
#: src/controller/Controller_Actions.php:483,
|
173 |
+
#: src/helper/Helper_Migration.php:319
|
174 |
+
msgid "There was a problem processing the action. Please try again."
|
175 |
+
msgstr "There was a problem processing the action. Please try again."
|
176 |
+
|
177 |
+
#: src/controller/Controller_Install.php:469
|
178 |
+
msgid "There was a problem uninstalling Gravity PDF. Please try again."
|
179 |
+
msgstr "There was a problem uninstalling Gravity PDF. Please try again."
|
180 |
+
|
181 |
+
#: src/controller/Controller_PDF.php:617, src/view/View_PDF.php:523
|
182 |
+
msgid "There was a problem generating your PDF"
|
183 |
+
msgstr "There was a problem generating your PDF"
|
184 |
+
|
185 |
+
#: src/controller/Controller_Settings.php:675
|
186 |
+
msgid "There was a problem installing the PDF templates. Please try again."
|
187 |
+
msgstr "There was a problem installing the PDF templates. Please try again."
|
188 |
+
|
189 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:779,
|
190 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:811
|
191 |
+
msgid "You must pass in a valid form ID"
|
192 |
+
msgstr "You must pass in a valid form ID"
|
193 |
+
|
194 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:901
|
195 |
+
msgid "You must pass in a valid PDF ID"
|
196 |
+
msgstr "You must pass in a valid PDF ID"
|
197 |
+
|
198 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1613
|
199 |
+
msgid "Gravity Forms Capabilities"
|
200 |
+
msgstr "Gravity Forms Capabilities"
|
201 |
+
|
202 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1625
|
203 |
+
msgid "Active WordPress Capabilities"
|
204 |
+
msgstr "Active WordPress Capabilities"
|
205 |
+
|
206 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1673
|
207 |
+
msgid "Common Sizes"
|
208 |
+
msgstr "Common Sizes"
|
209 |
+
|
210 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1675
|
211 |
+
msgid "A4 (210 x 297mm)"
|
212 |
+
msgstr "A4 (210 x 297mm)"
|
213 |
+
|
214 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1677
|
215 |
+
msgid "Letter (8.5 x 11in)"
|
216 |
+
msgstr "Letter (8.5 x 11in)"
|
217 |
+
|
218 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1679
|
219 |
+
msgid "Legal (8.5 x 14in)"
|
220 |
+
msgstr "Legal (8.5 x 14in)"
|
221 |
+
|
222 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1681
|
223 |
+
msgid "Ledger / Tabloid (11 x 17in)"
|
224 |
+
msgstr "Ledger / Tabloid (11 x 17in)"
|
225 |
+
|
226 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1683
|
227 |
+
msgid "Executive (7 x 10in)"
|
228 |
+
msgstr "Executive (7 x 10in)"
|
229 |
+
|
230 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1685,
|
231 |
+
#: src/helper/Helper_Options_Fields.php:195,
|
232 |
+
#: src/helper/Helper_Options_Fields.php:723
|
233 |
+
msgid "Custom Paper Size"
|
234 |
+
msgstr "Custom Paper Size"
|
235 |
+
|
236 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1691
|
237 |
+
msgid "\"A\" Sizes"
|
238 |
+
msgstr "\"A\" Sizes"
|
239 |
+
|
240 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1693
|
241 |
+
msgid "A0 (841 x 1189mm)"
|
242 |
+
msgstr "A0 (841 x 1189mm)"
|
243 |
+
|
244 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1695
|
245 |
+
msgid "A1 (594 x 841mm)"
|
246 |
+
msgstr "A1 (594 x 841mm)"
|
247 |
+
|
248 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1697
|
249 |
+
msgid "A2 (420 x 594mm)"
|
250 |
+
msgstr "A2 (420 x 594mm)"
|
251 |
+
|
252 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1699
|
253 |
+
msgid "A3 (297 x 420mm)"
|
254 |
+
msgstr "A3 (297 x 420mm)"
|
255 |
+
|
256 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1701
|
257 |
+
msgid "A5 (210 x 297mm)"
|
258 |
+
msgstr "A5 (210 x 297mm)"
|
259 |
+
|
260 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1703
|
261 |
+
msgid "A6 (105 x 148mm)"
|
262 |
+
msgstr "A6 (105 x 148mm)"
|
263 |
+
|
264 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1705
|
265 |
+
msgid "A7 (74 x 105mm)"
|
266 |
+
msgstr "A7 (74 x 105mm)"
|
267 |
+
|
268 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1707
|
269 |
+
msgid "A8 (52 x 74mm)"
|
270 |
+
msgstr "A8 (52 x 74mm)"
|
271 |
+
|
272 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1709
|
273 |
+
msgid "A9 (37 x 52mm)"
|
274 |
+
msgstr "A9 (37 x 52mm)"
|
275 |
+
|
276 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1711
|
277 |
+
msgid "A10 (26 x 37mm)"
|
278 |
+
msgstr "A10 (26 x 37mm)"
|
279 |
+
|
280 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1717
|
281 |
+
msgid "\"B\" Sizes"
|
282 |
+
msgstr "\"B\" Sizes"
|
283 |
+
|
284 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1719
|
285 |
+
msgid "B0 (1414 x 1000mm)"
|
286 |
+
msgstr "B0 (1414 x 1000mm)"
|
287 |
+
|
288 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1721
|
289 |
+
msgid "B1 (1000 x 707mm)"
|
290 |
+
msgstr "B1 (1000 x 707mm)"
|
291 |
+
|
292 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1723
|
293 |
+
msgid "B2 (707 x 500mm)"
|
294 |
+
msgstr "B2 (707 x 500mm)"
|
295 |
+
|
296 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1725
|
297 |
+
msgid "B3 (500 x 353mm)"
|
298 |
+
msgstr "B3 (500 x 353mm)"
|
299 |
+
|
300 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1727
|
301 |
+
msgid "B4 (353 x 250mm)"
|
302 |
+
msgstr "B4 (353 x 250mm)"
|
303 |
+
|
304 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1729
|
305 |
+
msgid "B5 (250 x 176mm)"
|
306 |
+
msgstr "B5 (250 x 176mm)"
|
307 |
+
|
308 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1731
|
309 |
+
msgid "B6 (176 x 125mm)"
|
310 |
+
msgstr "B6 (176 x 125mm)"
|
311 |
+
|
312 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1733
|
313 |
+
msgid "B7 (125 x 88mm)"
|
314 |
+
msgstr "B7 (125 x 88mm)"
|
315 |
+
|
316 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1735
|
317 |
+
msgid "B8 (88 x 62mm)"
|
318 |
+
msgstr "B8 (88 x 62mm)"
|
319 |
+
|
320 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1737
|
321 |
+
msgid "B9 (62 x 44mm)"
|
322 |
+
msgstr "B9 (62 x 44mm)"
|
323 |
+
|
324 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1739
|
325 |
+
msgid "B10 (44 x 31mm)"
|
326 |
+
msgstr "B10 (44 x 31mm)"
|
327 |
+
|
328 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1745
|
329 |
+
msgid "\"C\" Sizes"
|
330 |
+
msgstr "\"C\" Sizes"
|
331 |
+
|
332 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1747
|
333 |
+
msgid "C0 (1297 x 917mm)"
|
334 |
+
msgstr "C0 (1297 x 917mm)"
|
335 |
+
|
336 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1749
|
337 |
+
msgid "C1 (917 x 648mm)"
|
338 |
+
msgstr "C1 (917 x 648mm)"
|
339 |
+
|
340 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1751
|
341 |
+
msgid "C2 (648 x 458mm)"
|
342 |
+
msgstr "C2 (648 x 458mm)"
|
343 |
+
|
344 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1753
|
345 |
+
msgid "C3 (458 x 324mm)"
|
346 |
+
msgstr "C3 (458 x 324mm)"
|
347 |
+
|
348 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1755
|
349 |
+
msgid "C4 (324 x 229mm)"
|
350 |
+
msgstr "C4 (324 x 229mm)"
|
351 |
+
|
352 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1757
|
353 |
+
msgid "C5 (229 x 162mm)"
|
354 |
+
msgstr "C5 (229 x 162mm)"
|
355 |
+
|
356 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1759
|
357 |
+
msgid "C6 (162 x 114mm)"
|
358 |
+
msgstr "C6 (162 x 114mm)"
|
359 |
+
|
360 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1761
|
361 |
+
msgid "C7 (114 x 81mm)"
|
362 |
+
msgstr "C7 (114 x 81mm)"
|
363 |
+
|
364 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1763
|
365 |
+
msgid "C8 (81 x 57mm)"
|
366 |
+
msgstr "C8 (81 x 57mm)"
|
367 |
+
|
368 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1765
|
369 |
+
msgid "C9 (57 x 40mm)"
|
370 |
+
msgstr "C9 (57 x 40mm)"
|
371 |
+
|
372 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1767
|
373 |
+
msgid "C10 (40 x 28mm)"
|
374 |
+
msgstr "C10 (40 x 28mm)"
|
375 |
+
|
376 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1773
|
377 |
+
msgid "\"RA\" and \"SRA\" Sizes"
|
378 |
+
msgstr "\"RA\" and \"SRA\" Sizes"
|
379 |
+
|
380 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1775
|
381 |
+
msgid "RA0 (860 x 1220mm)"
|
382 |
+
msgstr "RA0 (860 x 1220mm)"
|
383 |
+
|
384 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1777
|
385 |
+
msgid "RA1 (610 x 860mm)"
|
386 |
+
msgstr "RA1 (610 x 860mm)"
|
387 |
+
|
388 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1779
|
389 |
+
msgid "RA2 (430 x 610mm)"
|
390 |
+
msgstr "RA2 (430 x 610mm)"
|
391 |
+
|
392 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1781
|
393 |
+
msgid "RA3 (305 x 430mm)"
|
394 |
+
msgstr "RA3 (305 x 430mm)"
|
395 |
+
|
396 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1783
|
397 |
+
msgid "RA4 (215 x 305mm)"
|
398 |
+
msgstr "RA4 (215 x 305mm)"
|
399 |
+
|
400 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1785
|
401 |
+
msgid "SRA0 (900 x 1280mm)"
|
402 |
+
msgstr "SRA0 (900 x 1280mm)"
|
403 |
+
|
404 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1787
|
405 |
+
msgid "SRA1 (640 x 900mm)"
|
406 |
+
msgstr "SRA1 (640 x 900mm)"
|
407 |
+
|
408 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1789
|
409 |
+
msgid "SRA2 (450 x 640mm)"
|
410 |
+
msgstr "SRA2 (450 x 640mm)"
|
411 |
+
|
412 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1791
|
413 |
+
msgid "SRA3 (320 x 450mm)"
|
414 |
+
msgstr "SRA3 (320 x 450mm)"
|
415 |
+
|
416 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1793
|
417 |
+
msgid "SRA4 (225 x 320mm)"
|
418 |
+
msgstr "SRA4 (225 x 320mm)"
|
419 |
+
|
420 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1823
|
421 |
+
msgid "Unicode"
|
422 |
+
msgstr "Unicode"
|
423 |
+
|
424 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1851
|
425 |
+
msgid "Indic"
|
426 |
+
msgstr "Indic"
|
427 |
+
|
428 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1861
|
429 |
+
msgid "Arabic"
|
430 |
+
msgstr "Arabic"
|
431 |
+
|
432 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1873
|
433 |
+
msgid "Other"
|
434 |
+
msgstr "Other"
|
435 |
+
|
436 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1977,
|
437 |
+
#: src/model/Model_Settings.php:665
|
438 |
+
msgid "User-Defined Fonts"
|
439 |
+
msgstr "User-Defined Fonts"
|
440 |
+
|
441 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:2115
|
442 |
+
msgid "Copy"
|
443 |
+
msgstr "Copy"
|
444 |
+
|
445 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:2117
|
446 |
+
msgid "Print - Low Resolution"
|
447 |
+
msgstr "Print - Low Resolution"
|
448 |
+
|
449 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:2119
|
450 |
+
msgid "Print - High Resolution"
|
451 |
+
msgstr "Print - High Resolution"
|
452 |
+
|
453 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:2121
|
454 |
+
msgid "Modify"
|
455 |
+
msgstr "Modify"
|
456 |
+
|
457 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:2123
|
458 |
+
msgid "Annotate"
|
459 |
+
msgstr "Annotate"
|
460 |
+
|
461 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:2125
|
462 |
+
msgid "Fill Forms"
|
463 |
+
msgstr "Fill Forms"
|
464 |
+
|
465 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:2127
|
466 |
+
msgid "Extract"
|
467 |
+
msgstr "Extract"
|
468 |
+
|
469 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:2129
|
470 |
+
msgid "Assemble"
|
471 |
+
msgstr "Assemble"
|
472 |
+
|
473 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:2379
|
474 |
+
msgid "Settings updated."
|
475 |
+
msgstr "Settings updated."
|
476 |
+
|
477 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:2639,
|
478 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:2655,
|
479 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:2671,
|
480 |
+
#: tests/phpunit/unit-tests/test-settings.php:525,
|
481 |
+
#: tests/phpunit/unit-tests/test-settings.php:527,
|
482 |
+
#: tests/phpunit/unit-tests/test-settings.php:529
|
483 |
+
msgid ""
|
484 |
+
"PDF Settings could not be saved. Please enter all required information below."
|
485 |
+
msgstr ""
|
486 |
+
"PDF Settings could not be saved. Please enter all required information below."
|
487 |
+
|
488 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:3767,
|
489 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:3769
|
490 |
+
msgid "Select Media"
|
491 |
+
msgstr "Select Media"
|
492 |
+
|
493 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:3771
|
494 |
+
msgid "Upload File"
|
495 |
+
msgstr "Upload File"
|
496 |
+
|
497 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:4085
|
498 |
+
msgid "Width"
|
499 |
+
msgstr "Width"
|
500 |
+
|
501 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:4087
|
502 |
+
msgid "Height"
|
503 |
+
msgstr "Height"
|
504 |
+
|
505 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:4093
|
506 |
+
msgid "mm"
|
507 |
+
msgstr "mm"
|
508 |
+
|
509 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:4095
|
510 |
+
msgid "inches"
|
511 |
+
msgstr "inches"
|
512 |
+
|
513 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:4215
|
514 |
+
msgid "The callback used for the %s setting is missing."
|
515 |
+
msgstr "The callback used for the %s setting is missing."
|
516 |
+
|
517 |
+
#: src/helper/abstract/Helper_Abstract_View.php:287
|
518 |
+
msgid "Cannot find file %s"
|
519 |
+
msgstr "Cannot find file %s"
|
520 |
+
|
521 |
+
#: src/helper/fields/Field_Products.php:381
|
522 |
+
msgid "Subtotal"
|
523 |
+
msgstr "Subtotal"
|
524 |
+
|
525 |
+
#: src/helper/fields/Field_Products.php:391
|
526 |
+
msgid "Shipping (%s)"
|
527 |
+
msgstr "Shipping (%s)"
|
528 |
+
|
529 |
+
#: src/helper/Helper_Data.php:347, src/model/Model_Mergetags.php:269
|
530 |
+
msgid "PDF"
|
531 |
+
msgstr "PDF"
|
532 |
+
|
533 |
+
#: src/helper/Helper_Data.php:405
|
534 |
+
msgid "Loading..."
|
535 |
+
msgstr "Loading..."
|
536 |
+
|
537 |
+
#: src/helper/Helper_Data.php:407
|
538 |
+
msgid "Continue"
|
539 |
+
msgstr "Continue"
|
540 |
+
|
541 |
+
#: src/helper/Helper_Data.php:409
|
542 |
+
msgid "Uninstall"
|
543 |
+
msgstr "Uninstall"
|
544 |
+
|
545 |
+
#: src/helper/Helper_Data.php:411
|
546 |
+
msgid "Cancel"
|
547 |
+
msgstr "Cancel"
|
548 |
+
|
549 |
+
#: src/helper/Helper_Data.php:413, src/helper/Helper_PDF_List_Table.php:675
|
550 |
+
msgid "Delete"
|
551 |
+
msgstr "Delete"
|
552 |
+
|
553 |
+
#: src/helper/Helper_Data.php:415, src/helper/Helper_PDF_List_Table.php:493,
|
554 |
+
#: src/helper/Helper_PDF_List_Table.php:495,
|
555 |
+
#: src/model/Model_Form_Settings.php:1765
|
556 |
+
msgid "Active"
|
557 |
+
msgstr "Active"
|
558 |
+
|
559 |
+
#: src/helper/Helper_Data.php:417, src/helper/Helper_PDF_List_Table.php:493,
|
560 |
+
#: src/helper/Helper_PDF_List_Table.php:495,
|
561 |
+
#: src/model/Model_Form_Settings.php:1765
|
562 |
+
msgid "Inactive"
|
563 |
+
msgstr "Inactive"
|
564 |
+
|
565 |
+
#: src/helper/Helper_Data.php:419
|
566 |
+
msgid "this PDF if"
|
567 |
+
msgstr "this PDF if"
|
568 |
+
|
569 |
+
#: src/helper/Helper_Data.php:421, src/helper/Helper_Options_Fields.php:359,
|
570 |
+
#: src/helper/Helper_Options_Fields.php:425
|
571 |
+
msgid "Enable"
|
572 |
+
msgstr "Enable"
|
573 |
+
|
574 |
+
#: src/helper/Helper_Data.php:423, src/helper/Helper_Options_Fields.php:361,
|
575 |
+
#: src/helper/Helper_Options_Fields.php:427
|
576 |
+
msgid "Disable"
|
577 |
+
msgstr "Disable"
|
578 |
+
|
579 |
+
#: src/helper/Helper_Data.php:425
|
580 |
+
msgid "Successfully Updated"
|
581 |
+
msgstr "Successfully Updated"
|
582 |
+
|
583 |
+
#: src/helper/Helper_Data.php:427
|
584 |
+
msgid "Successfully Deleted"
|
585 |
+
msgstr "Successfully Deleted"
|
586 |
+
|
587 |
+
#: src/helper/Helper_Data.php:429, src/helper/Helper_Options_Fields.php:309,
|
588 |
+
#: src/helper/Helper_Options_Fields.php:313,
|
589 |
+
#: src/helper/Helper_Options_Fields.php:431,
|
590 |
+
#: src/helper/Helper_Options_Fields.php:847,
|
591 |
+
#: src/helper/Helper_Options_Fields.php:943,
|
592 |
+
#: src/helper/Helper_Options_Fields.php:947,
|
593 |
+
#: src/helper/Helper_Options_Fields.php:1047,
|
594 |
+
#: src/helper/Helper_Options_Fields.php:1051,
|
595 |
+
#: src/helper/Helper_Options_Fields.php:1073,
|
596 |
+
#: src/helper/Helper_Options_Fields.php:1077,
|
597 |
+
#: src/helper/Helper_Options_Fields.php:1099,
|
598 |
+
#: src/helper/Helper_Options_Fields.php:1181,
|
599 |
+
#: src/helper/Helper_Options_Fields.php:1185,
|
600 |
+
#: src/helper/Helper_Options_Fields.php:1227,
|
601 |
+
#: src/helper/Helper_Options_Fields.php:1231,
|
602 |
+
#: src/helper/Helper_Options_Fields.php:1269,
|
603 |
+
#: src/helper/Helper_Options_Fields.php:1273,
|
604 |
+
#: src/helper/Helper_Options_Fields.php:1311,
|
605 |
+
#: src/helper/Helper_Options_Fields.php:1315,
|
606 |
+
#: src/helper/Helper_Options_Fields.php:1353,
|
607 |
+
#: src/helper/Helper_Options_Fields.php:1357,
|
608 |
+
#: src/helper/Helper_Options_Fields.php:1395,
|
609 |
+
#: src/helper/Helper_Options_Fields.php:1439,
|
610 |
+
#: src/helper/Helper_Options_Fields.php:1443
|
611 |
+
msgid "No"
|
612 |
+
msgstr "No"
|
613 |
+
|
614 |
+
#: src/helper/Helper_Data.php:431, src/helper/Helper_Options_Fields.php:307,
|
615 |
+
#: src/helper/Helper_Options_Fields.php:845,
|
616 |
+
#: src/helper/Helper_Options_Fields.php:941,
|
617 |
+
#: src/helper/Helper_Options_Fields.php:1045,
|
618 |
+
#: src/helper/Helper_Options_Fields.php:1071,
|
619 |
+
#: src/helper/Helper_Options_Fields.php:1097,
|
620 |
+
#: src/helper/Helper_Options_Fields.php:1179,
|
621 |
+
#: src/helper/Helper_Options_Fields.php:1225,
|
622 |
+
#: src/helper/Helper_Options_Fields.php:1267,
|
623 |
+
#: src/helper/Helper_Options_Fields.php:1309,
|
624 |
+
#: src/helper/Helper_Options_Fields.php:1351,
|
625 |
+
#: src/helper/Helper_Options_Fields.php:1393,
|
626 |
+
#: src/helper/Helper_Options_Fields.php:1399,
|
627 |
+
#: src/helper/Helper_Options_Fields.php:1437
|
628 |
+
msgid "Yes"
|
629 |
+
msgstr "Yes"
|
630 |
+
|
631 |
+
#: src/helper/Helper_Data.php:433
|
632 |
+
msgid "Standard"
|
633 |
+
msgstr "Standard"
|
634 |
+
|
635 |
+
#: src/helper/Helper_Data.php:435
|
636 |
+
msgid "Advanced"
|
637 |
+
msgstr "Advanced"
|
638 |
+
|
639 |
+
#: src/helper/Helper_Data.php:437
|
640 |
+
msgid "Activate"
|
641 |
+
msgstr "Activate"
|
642 |
+
|
643 |
+
#: src/helper/Helper_Data.php:439, src/helper/Helper_Templates.php:817
|
644 |
+
msgid "Version"
|
645 |
+
msgstr "Version"
|
646 |
+
|
647 |
+
#: src/helper/Helper_Data.php:441, src/helper/Helper_Templates.php:825
|
648 |
+
msgid "Group"
|
649 |
+
msgstr "Group"
|
650 |
+
|
651 |
+
#: src/helper/Helper_Data.php:443, src/helper/Helper_Templates.php:829
|
652 |
+
msgid "Tags"
|
653 |
+
msgstr "Tags"
|
654 |
+
|
655 |
+
#: src/helper/Helper_Data.php:447
|
656 |
+
msgid "Migrating site #%s"
|
657 |
+
msgstr "Migrating site #%s"
|
658 |
+
|
659 |
+
#: src/helper/Helper_Data.php:449
|
660 |
+
msgid "Site #%s migration complete."
|
661 |
+
msgstr "Site #%s migration complete."
|
662 |
+
|
663 |
+
#: src/helper/Helper_Data.php:451
|
664 |
+
msgid "Migration Error"
|
665 |
+
msgstr "Migration Error"
|
666 |
+
|
667 |
+
#: src/helper/Helper_Data.php:453
|
668 |
+
msgid "Site #%s migration errors."
|
669 |
+
msgstr "Site #%s migration errors."
|
670 |
+
|
671 |
+
#: src/helper/Helper_Data.php:457
|
672 |
+
msgid "Add New Template"
|
673 |
+
msgstr "Add New Template"
|
674 |
+
|
675 |
+
#: src/helper/Helper_Data.php:459, src/view/html/Settings/general.php:139
|
676 |
+
msgid "Show Advanced Options..."
|
677 |
+
msgstr "Show Advanced Options..."
|
678 |
+
|
679 |
+
#: src/helper/Helper_Data.php:461
|
680 |
+
msgid "Hide Advanced Options..."
|
681 |
+
msgstr "Hide Advanced Options..."
|
682 |
+
|
683 |
+
#: src/helper/Helper_Data.php:463
|
684 |
+
msgid "This form doesn't have any PDFs."
|
685 |
+
msgstr "This form doesn't have any PDFs."
|
686 |
+
|
687 |
+
#: src/helper/Helper_Data.php:465
|
688 |
+
msgid "Let's go create one"
|
689 |
+
msgstr "Let's go create one"
|
690 |
+
|
691 |
+
#: src/helper/Helper_Data.php:467
|
692 |
+
msgid "Installed PDFs"
|
693 |
+
msgstr "Installed PDFs"
|
694 |
+
|
695 |
+
#: src/helper/Helper_Data.php:471
|
696 |
+
msgid "Search the Gravity PDF Knowledgebase..."
|
697 |
+
msgstr "Search the Gravity PDF Knowledgebase..."
|
698 |
+
|
699 |
+
#: src/helper/Helper_Data.php:475
|
700 |
+
msgid "Requires Gravity PDF v%s"
|
701 |
+
msgstr "Requires Gravity PDF v%s"
|
702 |
+
|
703 |
+
#: src/helper/Helper_Data.php:477
|
704 |
+
msgid ""
|
705 |
+
"This PDF template is not compatible with your version of Gravity PDF. This "
|
706 |
+
"template required Gravity PDF v%s."
|
707 |
+
msgstr ""
|
708 |
+
"This PDF template is not compatible with your version of Gravity PDF. This "
|
709 |
+
"template required Gravity PDF v%s."
|
710 |
+
|
711 |
+
#: src/helper/Helper_Data.php:479
|
712 |
+
msgid "Template Details"
|
713 |
+
msgstr "Template Details"
|
714 |
+
|
715 |
+
#: src/helper/Helper_Data.php:481
|
716 |
+
msgid "Current Template"
|
717 |
+
msgstr "Current Template"
|
718 |
+
|
719 |
+
#: src/helper/Helper_Data.php:483
|
720 |
+
msgid "Show previous template"
|
721 |
+
msgstr "Show previous template"
|
722 |
+
|
723 |
+
#: src/helper/Helper_Data.php:485
|
724 |
+
msgid "Show next template"
|
725 |
+
msgstr "Show next template"
|
726 |
+
|
727 |
+
#: src/helper/Helper_Data.php:487
|
728 |
+
msgid "Upload is not a valid template. Upload a .zip file."
|
729 |
+
msgstr "Upload is not a valid template. Upload a .zip file."
|
730 |
+
|
731 |
+
#: src/helper/Helper_Data.php:489
|
732 |
+
msgid "Upload exceeds the 2MB limit."
|
733 |
+
msgstr "Upload exceeds the 2MB limit."
|
734 |
+
|
735 |
+
#: src/helper/Helper_Data.php:491
|
736 |
+
msgid "Template successfully installed"
|
737 |
+
msgstr "Template successfully installed"
|
738 |
+
|
739 |
+
#: src/helper/Helper_Data.php:493
|
740 |
+
msgid "Template successfully updated"
|
741 |
+
msgstr "Template successfully updated"
|
742 |
+
|
743 |
+
#: src/helper/Helper_Data.php:495
|
744 |
+
msgid "There was a problem with the upload. Reload the page and try again."
|
745 |
+
msgstr "There was a problem with the upload. Reload the page and try again."
|
746 |
+
|
747 |
+
#: src/helper/Helper_Data.php:497
|
748 |
+
msgid ""
|
749 |
+
"Do you really want to delete this PDF template?%sClick 'Cancel' to go back, "
|
750 |
+
"'OK' to confirm the delete."
|
751 |
+
msgstr ""
|
752 |
+
"Do you really want to delete this PDF template?%sClick 'Cancel' to go back, "
|
753 |
+
"'OK' to confirm the delete."
|
754 |
+
|
755 |
+
#: src/helper/Helper_Data.php:499
|
756 |
+
msgid "Could not delete template."
|
757 |
+
msgstr "Could not delete template."
|
758 |
+
|
759 |
+
#: src/helper/Helper_Migration.php:1117
|
760 |
+
msgid ""
|
761 |
+
"There was a problem migrating the following configuration nodes. You will "
|
762 |
+
"need to manually setup those PDFs."
|
763 |
+
msgstr ""
|
764 |
+
"There was a problem migrating the following configuration nodes. You will "
|
765 |
+
"need to manually setup those PDFs."
|
766 |
+
|
767 |
+
#: src/helper/Helper_Migration.php:1137
|
768 |
+
msgid "Migration Successful."
|
769 |
+
msgstr "Migration Successful."
|
770 |
+
|
771 |
+
#: src/helper/Helper_Options_Fields.php:173
|
772 |
+
msgid "Default Paper Size"
|
773 |
+
msgstr "Default Paper Size"
|
774 |
+
|
775 |
+
#: src/helper/Helper_Options_Fields.php:175
|
776 |
+
msgid "Set the default paper size used when generating PDFs."
|
777 |
+
msgstr "Set the default paper size used when generating PDFs."
|
778 |
+
|
779 |
+
#: src/helper/Helper_Options_Fields.php:197,
|
780 |
+
#: src/helper/Helper_Options_Fields.php:725
|
781 |
+
msgid "Control the exact paper size. Can be set in millimeters or inches."
|
782 |
+
msgstr "Control the exact paper size. Can be set in millimeters or inches."
|
783 |
+
|
784 |
+
#: src/helper/Helper_Options_Fields.php:217
|
785 |
+
msgid "Default Template"
|
786 |
+
msgstr "Default Template"
|
787 |
+
|
788 |
+
#: src/helper/Helper_Options_Fields.php:219,
|
789 |
+
#: src/helper/Helper_Options_Fields.php:579
|
790 |
+
msgid ""
|
791 |
+
"Choose an existing template or purchased more %sfrom our theme shop%s. You "
|
792 |
+
"can also %sbuild your own%s or %shire us%s to create a custom solution."
|
793 |
+
msgstr ""
|
794 |
+
"Choose an existing template or purchased more %sfrom our theme shop%s. You "
|
795 |
+
"can also %sbuild your own%s or %shire us%s to create a custom solution."
|
796 |
+
|
797 |
+
#: src/helper/Helper_Options_Fields.php:231,
|
798 |
+
#: src/helper/Helper_Options_Fields.php:591
|
799 |
+
msgid "Templates"
|
800 |
+
msgstr "Templates"
|
801 |
+
|
802 |
+
#: src/helper/Helper_Options_Fields.php:231,
|
803 |
+
#: src/helper/Helper_Options_Fields.php:591
|
804 |
+
msgid ""
|
805 |
+
"Gravity PDF comes with %sfour completely-free and highly customizable designs"
|
806 |
+
"%s. You can also purchase additional templates from our theme shop, hire us "
|
807 |
+
"to integrate existing PDFs or, with a bit of technical know-how, build your "
|
808 |
+
"own."
|
809 |
+
msgstr ""
|
810 |
+
"Gravity PDF comes with %sfour completely-free and highly customisable designs"
|
811 |
+
"%s. You can also purchase additional templates from our theme shop, hire us "
|
812 |
+
"to integrate existing PDFs or, with a bit of technical know-how, build your "
|
813 |
+
"own."
|
814 |
+
|
815 |
+
#: src/helper/Helper_Options_Fields.php:241
|
816 |
+
msgid "Default Font"
|
817 |
+
msgstr "Default Font"
|
818 |
+
|
819 |
+
#: src/helper/Helper_Options_Fields.php:243
|
820 |
+
msgid ""
|
821 |
+
"Set the default font type used in PDFs. Choose an existing font or %sinstall "
|
822 |
+
"your own%s."
|
823 |
+
msgstr ""
|
824 |
+
"Set the default font type used in PDFs. Choose an existing font or %sinstall "
|
825 |
+
"your own%s."
|
826 |
+
|
827 |
+
#: src/helper/Helper_Options_Fields.php:253,
|
828 |
+
#: src/helper/Helper_Options_Fields.php:523,
|
829 |
+
#: src/helper/Helper_Options_Fields.php:785
|
830 |
+
msgid "Fonts"
|
831 |
+
msgstr "Fonts"
|
832 |
+
|
833 |
+
#: src/helper/Helper_Options_Fields.php:253
|
834 |
+
msgid ""
|
835 |
+
"Gravity PDF comes bundled with fonts for most languages world-wide. Want to "
|
836 |
+
"use a specific font type? Use the font installer (found in the Tools tab)."
|
837 |
+
msgstr ""
|
838 |
+
"Gravity PDF comes bundled with fonts for most languages world-wide. Want to "
|
839 |
+
"use a specific font type? Use the font installer (found in the Tools tab)."
|
840 |
+
|
841 |
+
#: src/helper/Helper_Options_Fields.php:263
|
842 |
+
msgid "Default Font Size"
|
843 |
+
msgstr "Default Font Size"
|
844 |
+
|
845 |
+
#: src/helper/Helper_Options_Fields.php:265
|
846 |
+
msgid "Set the default font size used in PDFs."
|
847 |
+
msgstr "Set the default font size used in PDFs."
|
848 |
+
|
849 |
+
#: src/helper/Helper_Options_Fields.php:283
|
850 |
+
msgid "Default Font Color"
|
851 |
+
msgstr "Default Font Colour"
|
852 |
+
|
853 |
+
#: src/helper/Helper_Options_Fields.php:289
|
854 |
+
msgid "Set the default font color used in PDFs."
|
855 |
+
msgstr "Set the default font colour used in PDFs."
|
856 |
+
|
857 |
+
#: src/helper/Helper_Options_Fields.php:299,
|
858 |
+
#: src/helper/Helper_Options_Fields.php:315,
|
859 |
+
#: src/helper/Helper_Options_Fields.php:837,
|
860 |
+
#: src/helper/Helper_Options_Fields.php:853
|
861 |
+
msgid "Reverse Text (RTL)"
|
862 |
+
msgstr "Reverse Text (RTL)"
|
863 |
+
|
864 |
+
#: src/helper/Helper_Options_Fields.php:301,
|
865 |
+
#: src/helper/Helper_Options_Fields.php:839
|
866 |
+
msgid "Script like Arabic and Hebrew are written right to left."
|
867 |
+
msgstr "Script like Arabic and Hebrew are written right to left."
|
868 |
+
|
869 |
+
#: src/helper/Helper_Options_Fields.php:315
|
870 |
+
msgid ""
|
871 |
+
"Enable RTL if you are writing in Arabic, Hebrew, Syriac, N'ko, Thaana, "
|
872 |
+
"Tifinar, Urdu or other RTL languages."
|
873 |
+
msgstr ""
|
874 |
+
"Enable RTL if you are writing in Arabic, Hebrew, Syriac, N'ko, Thaana, "
|
875 |
+
"Tifinar, Urdu or other RTL languages."
|
876 |
+
|
877 |
+
#: src/helper/Helper_Options_Fields.php:325,
|
878 |
+
#: src/helper/Helper_Options_Fields.php:341
|
879 |
+
msgid "Entry View"
|
880 |
+
msgstr "Entry View"
|
881 |
+
|
882 |
+
#: src/helper/Helper_Options_Fields.php:327
|
883 |
+
msgid ""
|
884 |
+
"Select the default action used when accessing a PDF from the %sGravity Forms "
|
885 |
+
"entries list%s page."
|
886 |
+
msgstr ""
|
887 |
+
"Select the default action used when accessing a PDF from the %sGravity Forms "
|
888 |
+
"entries list%s page."
|
889 |
+
|
890 |
+
#: src/helper/Helper_Options_Fields.php:333,
|
891 |
+
#: src/view/html/PDF/entry_detailed_pdf.php:89
|
892 |
+
msgid "View"
|
893 |
+
msgstr "View"
|
894 |
+
|
895 |
+
#: src/helper/Helper_Options_Fields.php:335,
|
896 |
+
#: src/view/html/PDF/entry_detailed_pdf.php:91
|
897 |
+
msgid "Download"
|
898 |
+
msgstr "Download"
|
899 |
+
|
900 |
+
#: src/helper/Helper_Options_Fields.php:341
|
901 |
+
msgid ""
|
902 |
+
"Choose to view the PDF in your web browser or download the document to your "
|
903 |
+
"computer."
|
904 |
+
msgstr ""
|
905 |
+
"Choose to view the PDF in your web browser or download the document to your "
|
906 |
+
"computer."
|
907 |
+
|
908 |
+
#: src/helper/Helper_Options_Fields.php:351
|
909 |
+
msgid "Show What's New"
|
910 |
+
msgstr "Show What's New"
|
911 |
+
|
912 |
+
#: src/helper/Helper_Options_Fields.php:367
|
913 |
+
msgid "Show What's New Page"
|
914 |
+
msgstr "Show What's New Page"
|
915 |
+
|
916 |
+
#: src/helper/Helper_Options_Fields.php:367
|
917 |
+
msgid ""
|
918 |
+
"When upgrading Gravity PDF to a new major release (4.x) we'll automatically "
|
919 |
+
"redirect you to our What's New page so you can see the changes. Bug fix and "
|
920 |
+
"security releases are excluded (4.x.x)."
|
921 |
+
msgstr ""
|
922 |
+
"When upgrading Gravity PDF to a new major release (4.x) we'll automatically "
|
923 |
+
"redirect you to our What's New page so you can see the changes. Bug fix and "
|
924 |
+
"security releases are excluded (4.x.x)."
|
925 |
+
|
926 |
+
#: src/helper/Helper_Options_Fields.php:387,
|
927 |
+
#: src/helper/Helper_Options_Fields.php:407
|
928 |
+
msgid "User Restriction"
|
929 |
+
msgstr "User Restriction"
|
930 |
+
|
931 |
+
#: src/helper/Helper_Options_Fields.php:389
|
932 |
+
msgid ""
|
933 |
+
"Restrict PDF access to users with any of these capabilities. The "
|
934 |
+
"Administrator Role always has full access."
|
935 |
+
msgstr ""
|
936 |
+
"Restrict PDF access to users with any of these capabilities. The "
|
937 |
+
"Administrator Role always has full access."
|
938 |
+
|
939 |
+
#: src/helper/Helper_Options_Fields.php:405
|
940 |
+
msgid "Select Capability"
|
941 |
+
msgstr "Select Capability"
|
942 |
+
|
943 |
+
#: src/helper/Helper_Options_Fields.php:407
|
944 |
+
msgid ""
|
945 |
+
"Only logged in users with any selected capability can view generated PDFs "
|
946 |
+
"they don't have ownership of. Ownership refers to an end user who completed "
|
947 |
+
"the original Gravity Form entry."
|
948 |
+
msgstr ""
|
949 |
+
"Only logged in users with any selected capability can view generated PDFs "
|
950 |
+
"they don't have ownership of. Ownership refers to an end user who completed "
|
951 |
+
"the original Gravity Form entry."
|
952 |
+
|
953 |
+
#: src/helper/Helper_Options_Fields.php:417
|
954 |
+
msgid "Default Owner Restrictions"
|
955 |
+
msgstr "Default Owner Restrictions"
|
956 |
+
|
957 |
+
#: src/helper/Helper_Options_Fields.php:419
|
958 |
+
msgid ""
|
959 |
+
"Set the default PDF owner permissions. When enabled, the original entry "
|
960 |
+
"owner will NOT be able to view the PDFs (unless they have one of the above "
|
961 |
+
"capabilities)."
|
962 |
+
msgstr ""
|
963 |
+
"Set the default PDF owner permissions. When enabled, the original entry "
|
964 |
+
"owner will NOT be able to view the PDFs (unless they have one of the above "
|
965 |
+
"capabilities)."
|
966 |
+
|
967 |
+
#: src/helper/Helper_Options_Fields.php:433,
|
968 |
+
#: src/helper/Helper_Options_Fields.php:1089,
|
969 |
+
#: src/helper/Helper_Options_Fields.php:1105
|
970 |
+
msgid "Restrict Owner"
|
971 |
+
msgstr "Restrict Owner"
|
972 |
+
|
973 |
+
#: src/helper/Helper_Options_Fields.php:433
|
974 |
+
msgid ""
|
975 |
+
"Enable this setting if your PDFs should not be viewable by the end user. "
|
976 |
+
"This can be set on a per-PDF basis."
|
977 |
+
msgstr ""
|
978 |
+
"Enable this setting if your PDFs should not be viewable by the end user. "
|
979 |
+
"This can be set on a per-PDF basis."
|
980 |
+
|
981 |
+
#: src/helper/Helper_Options_Fields.php:443,
|
982 |
+
#: src/helper/Helper_Options_Fields.php:455
|
983 |
+
msgid "Logged Out Timeout"
|
984 |
+
msgstr "Logged Out Timeout"
|
985 |
+
|
986 |
+
#: src/helper/Helper_Options_Fields.php:445
|
987 |
+
msgid ""
|
988 |
+
"Limit how long a %slogged out%s users has direct access to the PDF after "
|
989 |
+
"completing the form. Set to 0 to disable time limit (not recommended)."
|
990 |
+
msgstr ""
|
991 |
+
"Limit how long a %slogged out%s users has direct access to the PDF after "
|
992 |
+
"completing the form. Set to 0 to disable time limit (not recommended)."
|
993 |
+
|
994 |
+
#: src/helper/Helper_Options_Fields.php:447
|
995 |
+
msgid "minutes"
|
996 |
+
msgstr "minutes"
|
997 |
+
|
998 |
+
#: src/helper/Helper_Options_Fields.php:455
|
999 |
+
msgid ""
|
1000 |
+
"Logged out users can view PDFs when their IP matches the one assigned to the "
|
1001 |
+
"Gravity Form entry. Because IP addresses can change, a time-based "
|
1002 |
+
"restriction also applies."
|
1003 |
+
msgstr ""
|
1004 |
+
"Logged out users can view PDFs when their IP matches the one assigned to the "
|
1005 |
+
"Gravity Form entry. Because IP addresses can change, a time-based "
|
1006 |
+
"restriction also applies."
|
1007 |
+
|
1008 |
+
#: src/helper/Helper_Options_Fields.php:503,
|
1009 |
+
#: src/helper/Helper_Options_Fields.php:513,
|
1010 |
+
#: src/view/html/Settings/tools.php:141
|
1011 |
+
msgid "Setup Custom Templates"
|
1012 |
+
msgstr "Setup Custom Templates"
|
1013 |
+
|
1014 |
+
#: src/helper/Helper_Options_Fields.php:505
|
1015 |
+
msgid ""
|
1016 |
+
"Setup environment for building custom templates. %sSee docs to get started%s."
|
1017 |
+
msgstr ""
|
1018 |
+
"Setup environment for building custom templates. %sSee docs to get started%s."
|
1019 |
+
|
1020 |
+
#: src/helper/Helper_Options_Fields.php:509
|
1021 |
+
msgid "Run Setup"
|
1022 |
+
msgstr "Run Setup"
|
1023 |
+
|
1024 |
+
#: src/helper/Helper_Options_Fields.php:513
|
1025 |
+
msgid ""
|
1026 |
+
"The setup will copy the plugin templates to your uploads directory so you "
|
1027 |
+
"can freely create and modify PDF templates without the risk of overriding "
|
1028 |
+
"your modifications when the plugin updates."
|
1029 |
+
msgstr ""
|
1030 |
+
"The setup will copy the plugin templates to your uploads directory so you "
|
1031 |
+
"can freely create and modify PDF templates without the risk of overriding "
|
1032 |
+
"your modifications when the plugin updates."
|
1033 |
+
|
1034 |
+
#: src/helper/Helper_Options_Fields.php:525
|
1035 |
+
msgid "Add, update or remove custom fonts."
|
1036 |
+
msgstr "Add, update or remove custom fonts."
|
1037 |
+
|
1038 |
+
#: src/helper/Helper_Options_Fields.php:529,
|
1039 |
+
#: src/view/html/Settings/tools.php:167
|
1040 |
+
msgid "Manage Fonts"
|
1041 |
+
msgstr "Manage Fonts"
|
1042 |
+
|
1043 |
+
#: src/helper/Helper_Options_Fields.php:533
|
1044 |
+
msgid "Install Fonts"
|
1045 |
+
msgstr "Install Fonts"
|
1046 |
+
|
1047 |
+
#: src/helper/Helper_Options_Fields.php:533
|
1048 |
+
msgid ""
|
1049 |
+
"Custom fonts can be installed for use in your PDFs. Only %s.ttf%s font files "
|
1050 |
+
"are supported."
|
1051 |
+
msgstr ""
|
1052 |
+
"Custom fonts can be installed for use in your PDFs. Only %s.ttf%s font files "
|
1053 |
+
"are supported."
|
1054 |
+
|
1055 |
+
#: src/helper/Helper_Options_Fields.php:561,
|
1056 |
+
#: src/helper/Helper_PDF_List_Table.php:239
|
1057 |
+
msgid "Name"
|
1058 |
+
msgstr "Name"
|
1059 |
+
|
1060 |
+
#: src/helper/Helper_Options_Fields.php:567
|
1061 |
+
msgid "PDF Name"
|
1062 |
+
msgstr "PDF Name"
|
1063 |
+
|
1064 |
+
#: src/helper/Helper_Options_Fields.php:567
|
1065 |
+
msgid ""
|
1066 |
+
"Distinguish between multiple PDFs by giving it an easy-to-remember name (for "
|
1067 |
+
"internal use). Use the %sFilename%s field below to set the actual PDF name."
|
1068 |
+
msgstr ""
|
1069 |
+
"Distinguish between multiple PDFs by giving it an easy-to-remember name (for "
|
1070 |
+
"internal use). Use the %sFilename%s field below to set the actual PDF name."
|
1071 |
+
|
1072 |
+
#: src/helper/Helper_Options_Fields.php:577,
|
1073 |
+
#: src/helper/Helper_PDF_List_Table.php:243
|
1074 |
+
msgid "Template"
|
1075 |
+
msgstr "Template"
|
1076 |
+
|
1077 |
+
#: src/helper/Helper_Options_Fields.php:601,
|
1078 |
+
#: src/helper/Helper_Options_Fields.php:617,
|
1079 |
+
#: src/helper/Helper_PDF_List_Table.php:245
|
1080 |
+
msgid "Notifications"
|
1081 |
+
msgstr "Notifications"
|
1082 |
+
|
1083 |
+
#: src/helper/Helper_Options_Fields.php:603
|
1084 |
+
msgid "Automatically attach PDF to the selected notifications."
|
1085 |
+
msgstr "Automatically attach PDF to the selected notifications."
|
1086 |
+
|
1087 |
+
#: src/helper/Helper_Options_Fields.php:615
|
1088 |
+
msgid "Choose a Notification"
|
1089 |
+
msgstr "Choose a Notification"
|
1090 |
+
|
1091 |
+
#: src/helper/Helper_Options_Fields.php:617
|
1092 |
+
msgid ""
|
1093 |
+
"Automatically generate and attach the PDF to your selected notifications. "
|
1094 |
+
"Conditional Logic for both the PDF and the notification applies. Inactive "
|
1095 |
+
"PDFs are also not sent."
|
1096 |
+
msgstr ""
|
1097 |
+
"Automatically generate and attach the PDF to your selected notifications. "
|
1098 |
+
"Conditional Logic for both the PDF and the notification applies. Inactive "
|
1099 |
+
"PDFs are also not sent."
|
1100 |
+
|
1101 |
+
#: src/helper/Helper_Options_Fields.php:627,
|
1102 |
+
#: src/helper/Helper_Options_Fields.php:633
|
1103 |
+
msgid "Filename"
|
1104 |
+
msgstr "Filename"
|
1105 |
+
|
1106 |
+
#: src/helper/Helper_Options_Fields.php:633
|
1107 |
+
msgid ""
|
1108 |
+
"Set an appropriate filename for the generated PDF. You should exclude the ."
|
1109 |
+
"pdf extension from the name. The following are invalid characters and will "
|
1110 |
+
"be converted to an underscore %s_%s when the PDF is generated: %s"
|
1111 |
+
msgstr ""
|
1112 |
+
"Set an appropriate filename for the generated PDF. You should exclude the ."
|
1113 |
+
"pdf extension from the name. The following are invalid characters and will "
|
1114 |
+
"be converted to an underscore %s_%s when the PDF is generated: %s"
|
1115 |
+
|
1116 |
+
#: src/helper/Helper_Options_Fields.php:647,
|
1117 |
+
#: src/helper/Helper_Options_Fields.php:657
|
1118 |
+
msgid "Conditional Logic"
|
1119 |
+
msgstr "Conditional Logic"
|
1120 |
+
|
1121 |
+
#: src/helper/Helper_Options_Fields.php:651
|
1122 |
+
msgid "Enable conditional logic"
|
1123 |
+
msgstr "Enable conditional logic"
|
1124 |
+
|
1125 |
+
#: src/helper/Helper_Options_Fields.php:657
|
1126 |
+
msgid ""
|
1127 |
+
"Create rules to dynamically enable or disable PDFs. This includes attaching "
|
1128 |
+
"to notifications and viewing from your admin area."
|
1129 |
+
msgstr ""
|
1130 |
+
"Create rules to dynamically enable or disable PDFs. This includes attaching "
|
1131 |
+
"to notifications and viewing from your admin area."
|
1132 |
+
|
1133 |
+
#: src/helper/Helper_Options_Fields.php:699
|
1134 |
+
msgid "Paper Size"
|
1135 |
+
msgstr "Paper Size"
|
1136 |
+
|
1137 |
+
#: src/helper/Helper_Options_Fields.php:701
|
1138 |
+
msgid "Set the paper size used when generating PDFs."
|
1139 |
+
msgstr "Set the paper size used when generating PDFs."
|
1140 |
+
|
1141 |
+
#: src/helper/Helper_Options_Fields.php:747
|
1142 |
+
msgid "Orientation"
|
1143 |
+
msgstr "Orientation"
|
1144 |
+
|
1145 |
+
#: src/helper/Helper_Options_Fields.php:753
|
1146 |
+
msgid "Portrait"
|
1147 |
+
msgstr "Portrait"
|
1148 |
+
|
1149 |
+
#: src/helper/Helper_Options_Fields.php:755
|
1150 |
+
msgid "Landscape"
|
1151 |
+
msgstr "Landscape"
|
1152 |
+
|
1153 |
+
#: src/helper/Helper_Options_Fields.php:771
|
1154 |
+
msgid "Font"
|
1155 |
+
msgstr "Font"
|
1156 |
+
|
1157 |
+
#: src/helper/Helper_Options_Fields.php:779
|
1158 |
+
msgid ""
|
1159 |
+
"Set the font type used in PDFs. Choose an existing font or %sinstall your own"
|
1160 |
+
"%s."
|
1161 |
+
msgstr ""
|
1162 |
+
"Set the font type used in PDFs. Choose an existing font or %sinstall your own"
|
1163 |
+
"%s."
|
1164 |
+
|
1165 |
+
#: src/helper/Helper_Options_Fields.php:785
|
1166 |
+
msgid ""
|
1167 |
+
"Gravity PDF comes bundled with fonts for most languages world-wide. Want to "
|
1168 |
+
"use a specific font type? Use the font installer (found in the Forms -> "
|
1169 |
+
"Settings -> Tools tab)."
|
1170 |
+
msgstr ""
|
1171 |
+
"Gravity PDF comes bundled with fonts for most languages world-wide. Want to "
|
1172 |
+
"use a specific font type? Use the font installer (found in the Forms -> "
|
1173 |
+
"Settings -> Tools tab)."
|
1174 |
+
|
1175 |
+
#: src/helper/Helper_Options_Fields.php:797
|
1176 |
+
msgid "Font Size"
|
1177 |
+
msgstr "Font Size"
|
1178 |
+
|
1179 |
+
#: src/helper/Helper_Options_Fields.php:799
|
1180 |
+
msgid "Set the font size to use in the PDF."
|
1181 |
+
msgstr "Set the font size to use in the PDF."
|
1182 |
+
|
1183 |
+
#: src/helper/Helper_Options_Fields.php:819
|
1184 |
+
msgid "Font Color"
|
1185 |
+
msgstr "Font Colour"
|
1186 |
+
|
1187 |
+
#: src/helper/Helper_Options_Fields.php:825
|
1188 |
+
msgid "Set the font color to use in the PDF."
|
1189 |
+
msgstr "Set the font colour to use in the PDF."
|
1190 |
+
|
1191 |
+
#: src/helper/Helper_Options_Fields.php:853
|
1192 |
+
msgid ""
|
1193 |
+
"Enable RTL if you are writing in Arabic, Hebrew, Syriac, N'ko, Thaana, "
|
1194 |
+
"Tifinar or Urdu."
|
1195 |
+
msgstr ""
|
1196 |
+
"Enable RTL if you are writing in Arabic, Hebrew, Syriac, N'ko, Thaana, "
|
1197 |
+
"Tifinar or Urdu."
|
1198 |
+
|
1199 |
+
#: src/helper/Helper_Options_Fields.php:905,
|
1200 |
+
#: src/templates/config/focus-gravity.php:219
|
1201 |
+
msgid "Format"
|
1202 |
+
msgstr "Format"
|
1203 |
+
|
1204 |
+
#: src/helper/Helper_Options_Fields.php:907
|
1205 |
+
msgid "Generate a PDF in the selected format."
|
1206 |
+
msgstr "Generate a PDF in the selected format."
|
1207 |
+
|
1208 |
+
#: src/helper/Helper_Options_Fields.php:923
|
1209 |
+
msgid "PDF Format"
|
1210 |
+
msgstr "PDF Format"
|
1211 |
+
|
1212 |
+
#: src/helper/Helper_Options_Fields.php:923
|
1213 |
+
msgid ""
|
1214 |
+
"Generate a document adhearing to the appropriate PDF standard. When not in "
|
1215 |
+
"%sStandard%s mode, watermarks, alpha-transparent PNGs and security options "
|
1216 |
+
"can NOT be used."
|
1217 |
+
msgstr ""
|
1218 |
+
"Generate a document adhearing to the appropriate PDF standard. When not in "
|
1219 |
+
"%sStandard%s mode, watermarks, alpha-transparent PNGs and security options "
|
1220 |
+
"can NOT be used."
|
1221 |
+
|
1222 |
+
#: src/helper/Helper_Options_Fields.php:933
|
1223 |
+
msgid "Enable PDF Security"
|
1224 |
+
msgstr "Enable PDF Security"
|
1225 |
+
|
1226 |
+
#: src/helper/Helper_Options_Fields.php:935
|
1227 |
+
msgid "Password protect generated PDFs, or restrict user capabilities."
|
1228 |
+
msgstr "Password protect generated PDFs, or restrict user capabilities."
|
1229 |
+
|
1230 |
+
#: src/helper/Helper_Options_Fields.php:957
|
1231 |
+
msgid "Password"
|
1232 |
+
msgstr "Password"
|
1233 |
+
|
1234 |
+
#: src/helper/Helper_Options_Fields.php:973,
|
1235 |
+
#: src/helper/Helper_Options_Fields.php:1005
|
1236 |
+
msgid "Privileges"
|
1237 |
+
msgstr "Privileges"
|
1238 |
+
|
1239 |
+
#: src/helper/Helper_Options_Fields.php:1005
|
1240 |
+
msgid ""
|
1241 |
+
"You can prevent the end user completing certain actions to the PDF – such as "
|
1242 |
+
"copying text, printing, adding annotations or extracting pages."
|
1243 |
+
msgstr ""
|
1244 |
+
"You can prevent the end user completing certain actions to the PDF – such as "
|
1245 |
+
"copying text, printing, adding annotations or extracting pages."
|
1246 |
+
|
1247 |
+
#: src/helper/Helper_Options_Fields.php:1009
|
1248 |
+
msgid "Select End User PDF Privileges"
|
1249 |
+
msgstr "Select End User PDF Privileges"
|
1250 |
+
|
1251 |
+
#: src/helper/Helper_Options_Fields.php:1019,
|
1252 |
+
#: src/helper/Helper_Options_Fields.php:1027
|
1253 |
+
msgid "Image DPI"
|
1254 |
+
msgstr "Image DPI"
|
1255 |
+
|
1256 |
+
#: src/helper/Helper_Options_Fields.php:1027
|
1257 |
+
msgid ""
|
1258 |
+
"Control the image DPI (dots per inch) in PDFs. Set to 300 when "
|
1259 |
+
"professionally printing document."
|
1260 |
+
msgstr ""
|
1261 |
+
"Control the image DPI (dots per inch) in PDFs. Set to 300 when "
|
1262 |
+
"professionally printing document."
|
1263 |
+
|
1264 |
+
#: src/helper/Helper_Options_Fields.php:1037
|
1265 |
+
msgid "Always Save PDF"
|
1266 |
+
msgstr "Always Save PDF"
|
1267 |
+
|
1268 |
+
#: src/helper/Helper_Options_Fields.php:1039
|
1269 |
+
msgid "Force a PDF to be saved to disk when a new entry is created."
|
1270 |
+
msgstr "Force a PDF to be saved to disk when a new entry is created."
|
1271 |
+
|
1272 |
+
#: src/helper/Helper_Options_Fields.php:1053
|
1273 |
+
msgid "Save PDF"
|
1274 |
+
msgstr "Save PDF"
|
1275 |
+
|
1276 |
+
#: src/helper/Helper_Options_Fields.php:1053
|
1277 |
+
msgid ""
|
1278 |
+
"By default, PDFs are not automatically saved to disk. Enable this option to "
|
1279 |
+
"force the PDF to be generated and saved. Useful when using the "
|
1280 |
+
"%sgfpdf_post_pdf_save%s hook to copy the PDF to an alternate location."
|
1281 |
+
msgstr ""
|
1282 |
+
"By default, PDFs are not automatically saved to disk. Enable this option to "
|
1283 |
+
"force the PDF to be generated and saved. Useful when using the "
|
1284 |
+
"%sgfpdf_post_pdf_save%s hook to copy the PDF to an alternate location."
|
1285 |
+
|
1286 |
+
#: src/helper/Helper_Options_Fields.php:1063
|
1287 |
+
msgid "Enable Public Access"
|
1288 |
+
msgstr "Enable Public Access"
|
1289 |
+
|
1290 |
+
#: src/helper/Helper_Options_Fields.php:1065
|
1291 |
+
msgid ""
|
1292 |
+
"Allow %sanyone%s with a direct link to access the PDF. %sThis disables all "
|
1293 |
+
"%ssecurity protocols%s for this PDF.%s "
|
1294 |
+
msgstr ""
|
1295 |
+
"Allow %sanyone%s with a direct link to access the PDF. %sThis disables all "
|
1296 |
+
"%ssecurity protocols%s for this PDF.%s "
|
1297 |
+
|
1298 |
+
#: src/helper/Helper_Options_Fields.php:1079
|
1299 |
+
msgid "Public Access"
|
1300 |
+
msgstr "Public Access"
|
1301 |
+
|
1302 |
+
#: src/helper/Helper_Options_Fields.php:1079
|
1303 |
+
msgid ""
|
1304 |
+
"When public access is on all security protocols are disabled and anyone "
|
1305 |
+
"worldwide can view the PDF document for ALL your form's entries. For most "
|
1306 |
+
"users the standard security measures will be adequate and public access "
|
1307 |
+
"should remain disabled."
|
1308 |
+
msgstr ""
|
1309 |
+
"When public access is on all security protocols are disabled and anyone "
|
1310 |
+
"worldwide can view the PDF document for ALL your form's entries. For most "
|
1311 |
+
"users the standard security measures will be adequate and public access "
|
1312 |
+
"should remain disabled."
|
1313 |
+
|
1314 |
+
#: src/helper/Helper_Options_Fields.php:1091
|
1315 |
+
msgid ""
|
1316 |
+
"When enabled, the original entry owner will NOT be able to view the PDFs."
|
1317 |
+
msgstr ""
|
1318 |
+
"When enabled, the original entry owner will NOT be able to view the PDFs."
|
1319 |
+
|
1320 |
+
#: src/helper/Helper_Options_Fields.php:1105
|
1321 |
+
msgid ""
|
1322 |
+
"Enable this setting if your PDFs should not be viewable by the end user."
|
1323 |
+
msgstr ""
|
1324 |
+
"Enable this setting if your PDFs should not be viewable by the end user."
|
1325 |
+
|
1326 |
+
#: src/helper/Helper_Options_Fields.php:1171
|
1327 |
+
msgid "Enable Advanced Templating"
|
1328 |
+
msgstr "Enable Advanced Templating"
|
1329 |
+
|
1330 |
+
#: src/helper/Helper_Options_Fields.php:1173
|
1331 |
+
msgid "By enabling, a PDF template will no longer be treated as HTML."
|
1332 |
+
msgstr "By enabling, a PDF template will no longer be treated as HTML."
|
1333 |
+
|
1334 |
+
#: src/helper/Helper_Options_Fields.php:1217
|
1335 |
+
msgid "Show Form Title"
|
1336 |
+
msgstr "Show Form Title"
|
1337 |
+
|
1338 |
+
#: src/helper/Helper_Options_Fields.php:1219
|
1339 |
+
msgid "Display the form title at the beginning of the PDF."
|
1340 |
+
msgstr "Display the form title at the beginning of the PDF."
|
1341 |
+
|
1342 |
+
#: src/helper/Helper_Options_Fields.php:1259
|
1343 |
+
msgid "Show Page Names"
|
1344 |
+
msgstr "Show Page Names"
|
1345 |
+
|
1346 |
+
#: src/helper/Helper_Options_Fields.php:1261
|
1347 |
+
msgid ""
|
1348 |
+
"Display form page names on the PDF. Requires the use of the %sPage Break "
|
1349 |
+
"field%s."
|
1350 |
+
msgstr ""
|
1351 |
+
"Display form page names on the PDF. Requires the use of the %sPage Break "
|
1352 |
+
"field%s."
|
1353 |
+
|
1354 |
+
#: src/helper/Helper_Options_Fields.php:1301
|
1355 |
+
msgid "Show HTML Fields"
|
1356 |
+
msgstr "Show HTML Fields"
|
1357 |
+
|
1358 |
+
#: src/helper/Helper_Options_Fields.php:1303
|
1359 |
+
msgid "Display HTML fields in the PDF."
|
1360 |
+
msgstr "Display HTML fields in the PDF."
|
1361 |
+
|
1362 |
+
#: src/helper/Helper_Options_Fields.php:1343
|
1363 |
+
msgid "Show Section Break Description"
|
1364 |
+
msgstr "Show Section Break Description"
|
1365 |
+
|
1366 |
+
#: src/helper/Helper_Options_Fields.php:1345
|
1367 |
+
msgid "Display the Section Break field description in the PDF."
|
1368 |
+
msgstr "Display the Section Break field description in the PDF."
|
1369 |
+
|
1370 |
+
#: src/helper/Helper_Options_Fields.php:1385,
|
1371 |
+
#: src/helper/Helper_Options_Fields.php:1401
|
1372 |
+
msgid "Enable Conditional Logic"
|
1373 |
+
msgstr "Enable Conditional Logic"
|
1374 |
+
|
1375 |
+
#: src/helper/Helper_Options_Fields.php:1387
|
1376 |
+
msgid "When enabled the PDF will adhere to the form field conditional logic."
|
1377 |
+
msgstr "When enabled the PDF will adhere to the form field conditional logic."
|
1378 |
+
|
1379 |
+
#: src/helper/Helper_Options_Fields.php:1401
|
1380 |
+
msgid "Enable this option to hide failed conditional logic fields in the PDF."
|
1381 |
+
msgstr "Enable this option to hide failed conditional logic fields in the PDF."
|
1382 |
+
|
1383 |
+
#: src/helper/Helper_Options_Fields.php:1429
|
1384 |
+
msgid "Show Empty Fields"
|
1385 |
+
msgstr "Show Empty Fields"
|
1386 |
+
|
1387 |
+
#: src/helper/Helper_Options_Fields.php:1431
|
1388 |
+
msgid "Display Empty fields in the PDF."
|
1389 |
+
msgstr "Display Empty fields in the PDF."
|
1390 |
+
|
1391 |
+
#: src/helper/Helper_Options_Fields.php:1471,
|
1392 |
+
#: src/helper/Helper_Options_Fields.php:1481
|
1393 |
+
msgid "Header"
|
1394 |
+
msgstr "Header"
|
1395 |
+
|
1396 |
+
#: src/helper/Helper_Options_Fields.php:1477
|
1397 |
+
msgid ""
|
1398 |
+
"The header is included at the top of each page. For simple columns %stry "
|
1399 |
+
"this HTML table snippet%s."
|
1400 |
+
msgstr ""
|
1401 |
+
"The header is included at the top of each page. For simple columns %stry "
|
1402 |
+
"this HTML table snippet%s."
|
1403 |
+
|
1404 |
+
#: src/helper/Helper_Options_Fields.php:1481
|
1405 |
+
msgid ""
|
1406 |
+
"When inserting images in the header set the size to %sLarge%s or %sFull Size"
|
1407 |
+
"%s."
|
1408 |
+
msgstr ""
|
1409 |
+
"When inserting images in the header set the size to %sLarge%s or %sFull Size"
|
1410 |
+
"%s."
|
1411 |
+
|
1412 |
+
#: src/helper/Helper_Options_Fields.php:1509
|
1413 |
+
msgid "First Page Header"
|
1414 |
+
msgstr "First Page Header"
|
1415 |
+
|
1416 |
+
#: src/helper/Helper_Options_Fields.php:1515
|
1417 |
+
msgid "Override the header on the first page of the PDF."
|
1418 |
+
msgstr "Override the header on the first page of the PDF."
|
1419 |
+
|
1420 |
+
#: src/helper/Helper_Options_Fields.php:1519
|
1421 |
+
msgid "Use different header on first page of PDF?"
|
1422 |
+
msgstr "Use different header on first page of PDF?"
|
1423 |
+
|
1424 |
+
#: src/helper/Helper_Options_Fields.php:1547,
|
1425 |
+
#: src/helper/Helper_Options_Fields.php:1557
|
1426 |
+
msgid "Footer"
|
1427 |
+
msgstr "Footer"
|
1428 |
+
|
1429 |
+
#: src/helper/Helper_Options_Fields.php:1553
|
1430 |
+
msgid ""
|
1431 |
+
"The footer is included at the bottom of every page. For simple columns %stry "
|
1432 |
+
"this HTML table snippet%s."
|
1433 |
+
msgstr ""
|
1434 |
+
"The footer is included at the bottom of every page. For simple columns %stry "
|
1435 |
+
"this HTML table snippet%s."
|
1436 |
+
|
1437 |
+
#: src/helper/Helper_Options_Fields.php:1557
|
1438 |
+
msgid ""
|
1439 |
+
"For simple text footers use the left, center and right alignment buttons in "
|
1440 |
+
"the editor. You can also use the special %s{PAGENO}%s and %s{nbpg}%s tags to "
|
1441 |
+
"display page numbering."
|
1442 |
+
msgstr ""
|
1443 |
+
"For simple text footers use the left, center and right alignment buttons in "
|
1444 |
+
"the editor. You can also use the special %s{PAGENO}%s and %s{nbpg}%s tags to "
|
1445 |
+
"display page numbering."
|
1446 |
+
|
1447 |
+
#: src/helper/Helper_Options_Fields.php:1585
|
1448 |
+
msgid "First Page Footer"
|
1449 |
+
msgstr "First Page Footer"
|
1450 |
+
|
1451 |
+
#: src/helper/Helper_Options_Fields.php:1591
|
1452 |
+
msgid "Override the footer on the first page of the PDF."
|
1453 |
+
msgstr "Override the footer on the first page of the PDF."
|
1454 |
+
|
1455 |
+
#: src/helper/Helper_Options_Fields.php:1595
|
1456 |
+
msgid "Use different footer on first page of PDF?"
|
1457 |
+
msgstr "Use different footer on first page of PDF?"
|
1458 |
+
|
1459 |
+
#: src/helper/Helper_Options_Fields.php:1623
|
1460 |
+
msgid "Background Color"
|
1461 |
+
msgstr "Background Colour"
|
1462 |
+
|
1463 |
+
#: src/helper/Helper_Options_Fields.php:1629
|
1464 |
+
msgid "Set the background color for all pages."
|
1465 |
+
msgstr "Set the background colour for all pages."
|
1466 |
+
|
1467 |
+
#: src/helper/Helper_Options_Fields.php:1657,
|
1468 |
+
#: src/helper/Helper_Options_Fields.php:1663
|
1469 |
+
msgid "Background Image"
|
1470 |
+
msgstr "Background Image"
|
1471 |
+
|
1472 |
+
#: src/helper/Helper_Options_Fields.php:1661
|
1473 |
+
msgid ""
|
1474 |
+
"The background image is included on all pages. For optimal results, use an "
|
1475 |
+
"image the same dimensions as the paper size."
|
1476 |
+
msgstr ""
|
1477 |
+
"The background image is included on all pages. For optimal results, use an "
|
1478 |
+
"image the same dimensions as the paper size."
|
1479 |
+
|
1480 |
+
#: src/helper/Helper_Options_Fields.php:1663
|
1481 |
+
msgid ""
|
1482 |
+
"For the best results, use a JPG or non-interlaced 8-Bit PNG that has the "
|
1483 |
+
"same dimensions as the paper size."
|
1484 |
+
msgstr ""
|
1485 |
+
"For the best results, use a JPG or non-interlaced 8-Bit PNG that has the "
|
1486 |
+
"same dimensions as the paper size."
|
1487 |
+
|
1488 |
+
#: src/helper/Helper_PDF_List_Table.php:241
|
1489 |
+
msgid "Download Shortcode"
|
1490 |
+
msgstr "Download Shortcode"
|
1491 |
+
|
1492 |
+
#: src/helper/Helper_PDF_List_Table.php:525
|
1493 |
+
msgid "None"
|
1494 |
+
msgstr "None"
|
1495 |
+
|
1496 |
+
#: src/helper/Helper_PDF_List_Table.php:589,
|
1497 |
+
#: src/view/html/PDF/entry_list_pdf_single.php:79
|
1498 |
+
msgid "Download PDF"
|
1499 |
+
msgstr "Download PDF"
|
1500 |
+
|
1501 |
+
#: src/helper/Helper_PDF_List_Table.php:671
|
1502 |
+
msgid "Edit this PDF"
|
1503 |
+
msgstr "Edit this PDF"
|
1504 |
+
|
1505 |
+
#: src/helper/Helper_PDF_List_Table.php:671
|
1506 |
+
msgid "Edit"
|
1507 |
+
msgstr "Edit"
|
1508 |
+
|
1509 |
+
#: src/helper/Helper_PDF_List_Table.php:673
|
1510 |
+
msgid "Duplicate this PDF"
|
1511 |
+
msgstr "Duplicate this PDF"
|
1512 |
+
|
1513 |
+
#: src/helper/Helper_PDF_List_Table.php:673
|
1514 |
+
msgid "Duplicate"
|
1515 |
+
msgstr "Duplicate"
|
1516 |
+
|
1517 |
+
#: src/helper/Helper_PDF_List_Table.php:675
|
1518 |
+
msgid "Delete this PDF"
|
1519 |
+
msgstr "Delete this PDF"
|
1520 |
+
|
1521 |
+
#: src/helper/Helper_PDF_List_Table.php:749
|
1522 |
+
msgid "This form doesn't have any PDFs. Let's go %screate one%s."
|
1523 |
+
msgstr "This form doesn't have any PDFs. Let's go %screate one%s."
|
1524 |
+
|
1525 |
+
#: src/helper/Helper_PDF.php:753
|
1526 |
+
msgid ""
|
1527 |
+
"The PDF Template %s requires Gravity PDF version %s. Upgrade to the latest "
|
1528 |
+
"version."
|
1529 |
+
msgstr ""
|
1530 |
+
"The PDF Template %s requires Gravity PDF version %s. Upgrade to the latest "
|
1531 |
+
"version."
|
1532 |
+
|
1533 |
+
#: src/helper/Helper_Templates.php:435
|
1534 |
+
msgid "Requires Gravity PDF"
|
1535 |
+
msgstr "Requires Gravity PDF"
|
1536 |
+
|
1537 |
+
#: src/helper/Helper_Templates.php:641, src/helper/Helper_Templates.php:761,
|
1538 |
+
#: src/view/View_PDF.php:1127
|
1539 |
+
msgid "Legacy"
|
1540 |
+
msgstr "Legacy"
|
1541 |
+
|
1542 |
+
#: src/helper/Helper_Templates.php:815
|
1543 |
+
msgid "Template Name"
|
1544 |
+
msgstr "Template Name"
|
1545 |
+
|
1546 |
+
#: src/helper/Helper_Templates.php:819
|
1547 |
+
msgid "Description"
|
1548 |
+
msgstr "Description"
|
1549 |
+
|
1550 |
+
#: src/helper/Helper_Templates.php:821
|
1551 |
+
msgid "Author"
|
1552 |
+
msgstr "Author"
|
1553 |
+
|
1554 |
+
#: src/helper/Helper_Templates.php:823
|
1555 |
+
msgid "Author URI"
|
1556 |
+
msgstr "Author URI"
|
1557 |
+
|
1558 |
+
#: src/helper/Helper_Templates.php:827
|
1559 |
+
msgid "Required PDF Version"
|
1560 |
+
msgstr "Required PDF Version"
|
1561 |
+
|
1562 |
+
#: src/model/Model_Actions.php:693
|
1563 |
+
msgid "No configuration.php file found for site #%s"
|
1564 |
+
msgstr "No configuration.php file found for site #%s"
|
1565 |
+
|
1566 |
+
#: src/model/Model_Actions.php:733
|
1567 |
+
msgid "Database import problem for site #%s"
|
1568 |
+
msgstr "Database import problem for site #%s"
|
1569 |
+
|
1570 |
+
#: src/model/Model_Form_Settings.php:503
|
1571 |
+
msgid "Update PDF"
|
1572 |
+
msgstr "Update PDF"
|
1573 |
+
|
1574 |
+
#: src/model/Model_Form_Settings.php:503
|
1575 |
+
msgid "Add PDF"
|
1576 |
+
msgstr "Add PDF"
|
1577 |
+
|
1578 |
+
#: src/model/Model_Form_Settings.php:581,
|
1579 |
+
#: src/model/Model_Form_Settings.php:619,
|
1580 |
+
#: src/model/Model_Form_Settings.php:717, src/model/Model_Form_Settings.php:777
|
1581 |
+
msgid "There was a problem saving your PDF settings. Please try again."
|
1582 |
+
msgstr "There was a problem saving your PDF settings. Please try again."
|
1583 |
+
|
1584 |
+
#: src/model/Model_Form_Settings.php:665
|
1585 |
+
msgid "PDF could not be saved. Please enter all required information below."
|
1586 |
+
msgstr "PDF could not be saved. Please enter all required information below."
|
1587 |
+
|
1588 |
+
#: src/model/Model_Form_Settings.php:705
|
1589 |
+
msgid "PDF saved successfully. %sBack to PDF list.%s"
|
1590 |
+
msgstr "PDF saved successfully. %sBack to PDF list.%s"
|
1591 |
+
|
1592 |
+
#: src/model/Model_Form_Settings.php:1545
|
1593 |
+
msgid "PDF successfully deleted."
|
1594 |
+
msgstr "PDF successfully deleted."
|
1595 |
+
|
1596 |
+
#: src/model/Model_Form_Settings.php:1667
|
1597 |
+
msgid "PDF successfully duplicated."
|
1598 |
+
msgstr "PDF successfully duplicated."
|
1599 |
+
|
1600 |
+
#: src/model/Model_Install.php:641
|
1601 |
+
msgid ""
|
1602 |
+
"There was a problem creating the %s directory. Ensure you have write "
|
1603 |
+
"permissions to your uploads folder."
|
1604 |
+
msgstr ""
|
1605 |
+
"There was a problem creating the %s directory. Ensure you have write "
|
1606 |
+
"permissions to your uploads folder."
|
1607 |
+
|
1608 |
+
#: src/model/Model_Install.php:659
|
1609 |
+
msgid ""
|
1610 |
+
"Gravity PDF does not have write permission to the %s directory. Contact your "
|
1611 |
+
"web hosting provider to fix the issue."
|
1612 |
+
msgstr ""
|
1613 |
+
"Gravity PDF does not have write permission to the %s directory. Contact your "
|
1614 |
+
"web hosting provider to fix the issue."
|
1615 |
+
|
1616 |
+
#: src/model/Model_Install.php:957
|
1617 |
+
msgid ""
|
1618 |
+
"There was a problem removing the Gravity Form \"%s\" PDF configuration. Try "
|
1619 |
+
"delete manually."
|
1620 |
+
msgstr ""
|
1621 |
+
"There was a problem removing the Gravity Form \"%s\" PDF configuration. Try "
|
1622 |
+
"delete manually."
|
1623 |
+
|
1624 |
+
#: src/model/Model_Install.php:1021
|
1625 |
+
msgid ""
|
1626 |
+
"There was a problem removing the %s directory. Clean up manually via (S)FTP."
|
1627 |
+
msgstr ""
|
1628 |
+
"There was a problem removing the %s directory. Clean up manually via (S)FTP."
|
1629 |
+
|
1630 |
+
#: src/model/Model_PDF.php:669
|
1631 |
+
msgid "The PDF configuration is not currently active."
|
1632 |
+
msgstr "The PDF configuration is not currently active."
|
1633 |
+
|
1634 |
+
#: src/model/Model_PDF.php:713
|
1635 |
+
msgid "PDF conditional logic requirements have not been met."
|
1636 |
+
msgstr "PDF conditional logic requirements have not been met."
|
1637 |
+
|
1638 |
+
#: src/model/Model_PDF.php:917
|
1639 |
+
msgid "Your PDF is no longer accessible."
|
1640 |
+
msgstr "Your PDF is no longer accessible."
|
1641 |
+
|
1642 |
+
#: src/model/Model_PDF.php:1093
|
1643 |
+
msgid "You do not have access to view this PDF."
|
1644 |
+
msgstr "You do not have access to view this PDF."
|
1645 |
+
|
1646 |
+
#: src/model/Model_PDF.php:1813
|
1647 |
+
msgid "The PDF could not be saved."
|
1648 |
+
msgstr "The PDF could not be saved."
|
1649 |
+
|
1650 |
+
#: src/model/Model_PDF.php:3649
|
1651 |
+
msgid "Could not find PDF configuration requested"
|
1652 |
+
msgstr "Could not find PDF configuration requested"
|
1653 |
+
|
1654 |
+
#: src/model/Model_Settings.php:511
|
1655 |
+
msgid "There was a problem copying all PDF templates to %s. Please try again."
|
1656 |
+
msgstr "There was a problem copying all PDF templates to %s. Please try again."
|
1657 |
+
|
1658 |
+
#: src/model/Model_Settings.php:521
|
1659 |
+
msgid "Gravity PDF Custom Templates successfully installed to %s."
|
1660 |
+
msgstr "Gravity PDF Custom Templates successfully installed to %s."
|
1661 |
+
|
1662 |
+
#: src/model/Model_Settings.php:765
|
1663 |
+
msgid "Could not locate font on web server: %s"
|
1664 |
+
msgstr "Could not locate font on web server: %s"
|
1665 |
+
|
1666 |
+
#: src/model/Model_Settings.php:777
|
1667 |
+
msgid "There was a problem installing the font %s. Please try again."
|
1668 |
+
msgstr "There was a problem installing the font %s. Please try again."
|
1669 |
+
|
1670 |
+
#: src/model/Model_Settings.php:1005
|
1671 |
+
msgid "Could not delete Gravity PDF font correctly. Please try again."
|
1672 |
+
msgstr "Could not delete Gravity PDF font correctly. Please try again."
|
1673 |
+
|
1674 |
+
#: src/model/Model_Settings.php:1067
|
1675 |
+
msgid "Required fields have not been included."
|
1676 |
+
msgstr "Required fields have not been included."
|
1677 |
+
|
1678 |
+
#: src/model/Model_Settings.php:1101
|
1679 |
+
msgid ""
|
1680 |
+
"Font name is not valid. Only alphanumeric characters and spaces are accepted."
|
1681 |
+
msgstr ""
|
1682 |
+
"Font name is not valid. Only alphanumeric characters and spaces are accepted."
|
1683 |
+
|
1684 |
+
#: src/model/Model_Settings.php:1137
|
1685 |
+
msgid "A font with the same name already exists. Try a different name."
|
1686 |
+
msgstr "A font with the same name already exists. Try a different name."
|
1687 |
+
|
1688 |
+
#: src/model/Model_Templates.php:735
|
1689 |
+
msgid "No valid PDF template found in Zip archive."
|
1690 |
+
msgstr "No valid PDF template found in Zip archive."
|
1691 |
+
|
1692 |
+
#: src/model/Model_Templates.php:797
|
1693 |
+
msgid "The PHP file %s is not a valid PDF Template."
|
1694 |
+
msgstr "The PHP file %s is not a valid PDF Template."
|
1695 |
+
|
1696 |
+
#: src/model/Model_Welcome_Screen.php:185, src/view/html/Welcome/welcome.php:79
|
1697 |
+
msgid "Welcome to Gravity PDF"
|
1698 |
+
msgstr "Welcome to Gravity PDF"
|
1699 |
+
|
1700 |
+
#: src/model/Model_Welcome_Screen.php:187
|
1701 |
+
msgid "What's new in Gravity PDF?"
|
1702 |
+
msgstr "What's new in Gravity PDF?"
|
1703 |
+
|
1704 |
+
#: src/templates/config/focus-gravity.php:187
|
1705 |
+
msgid "Accent Color"
|
1706 |
+
msgstr "Accent Colour"
|
1707 |
+
|
1708 |
+
#: src/templates/config/focus-gravity.php:191
|
1709 |
+
msgid ""
|
1710 |
+
"The accent color is used for the page and section titles, as well as the "
|
1711 |
+
"border."
|
1712 |
+
msgstr ""
|
1713 |
+
"The accent colour is used for the page and section titles, as well as the "
|
1714 |
+
"border."
|
1715 |
+
|
1716 |
+
#: src/templates/config/focus-gravity.php:203
|
1717 |
+
msgid "Secondary Color"
|
1718 |
+
msgstr "Secondary Colour"
|
1719 |
+
|
1720 |
+
#: src/templates/config/focus-gravity.php:207
|
1721 |
+
msgid ""
|
1722 |
+
"The secondary color is used with the field labels and for alternate rows."
|
1723 |
+
msgstr ""
|
1724 |
+
"The secondary colour is used with the field labels and for alternate rows."
|
1725 |
+
|
1726 |
+
#: src/templates/config/focus-gravity.php:223
|
1727 |
+
msgid "Combine the field label and value or have a distinct label/value."
|
1728 |
+
msgstr "Combine the field label and value or have a distinct label/value."
|
1729 |
+
|
1730 |
+
#: src/templates/config/focus-gravity.php:227
|
1731 |
+
msgid "Combined Label"
|
1732 |
+
msgstr "Combined Label"
|
1733 |
+
|
1734 |
+
#: src/templates/config/focus-gravity.php:229
|
1735 |
+
msgid "Split Label"
|
1736 |
+
msgstr "Split Label"
|
1737 |
+
|
1738 |
+
#: src/templates/config/rubix.php:187
|
1739 |
+
msgid "Container Background Color"
|
1740 |
+
msgstr "Container Background Colour"
|
1741 |
+
|
1742 |
+
#: src/templates/config/rubix.php:191
|
1743 |
+
msgid "Control the color of the field background."
|
1744 |
+
msgstr "Control the colour of the field background."
|
1745 |
+
|
1746 |
+
#: src/templates/config/zadani.php:187
|
1747 |
+
msgid "Field Border Color"
|
1748 |
+
msgstr "Field Border Colour"
|
1749 |
+
|
1750 |
+
#: src/templates/config/zadani.php:191
|
1751 |
+
msgid "Control the color of the field border."
|
1752 |
+
msgstr "Control the colour of the field border."
|
1753 |
+
|
1754 |
+
#: src/view/html/Actions/action_buttons.php:93
|
1755 |
+
msgid "Dismiss Notice"
|
1756 |
+
msgstr "Dismiss Notice"
|
1757 |
+
|
1758 |
+
#: src/view/html/Actions/begin_multisite_migration.php:89
|
1759 |
+
msgid "Gravity PDF Multisite Migration"
|
1760 |
+
msgstr "Gravity PDF Multisite Migration"
|
1761 |
+
|
1762 |
+
#: src/view/html/Actions/begin_multisite_migration.php:93
|
1763 |
+
msgid "Beginning Migration..."
|
1764 |
+
msgstr "Beginning Migration..."
|
1765 |
+
|
1766 |
+
#: src/view/html/Actions/begin_multisite_migration.php:107
|
1767 |
+
msgid "Migration Complete."
|
1768 |
+
msgstr "Migration Complete."
|
1769 |
+
|
1770 |
+
#: src/view/html/Actions/migration.php:81
|
1771 |
+
msgid "Gravity PDF needs to migrate your configuration."
|
1772 |
+
msgstr "Gravity PDF needs to migrate your configuration."
|
1773 |
+
|
1774 |
+
#: src/view/html/Actions/migration.php:89
|
1775 |
+
msgid ""
|
1776 |
+
"The migration process will import your old configuration file into the "
|
1777 |
+
"database."
|
1778 |
+
msgstr ""
|
1779 |
+
"The migration process will import your old configuration file into the "
|
1780 |
+
"database."
|
1781 |
+
|
1782 |
+
#: src/view/html/Actions/review_plugin.php:81
|
1783 |
+
msgid "Hey, we just noticed you've generated your 100th PDF using Gravity PDF!"
|
1784 |
+
msgstr ""
|
1785 |
+
"Hey, we just noticed you've generated your 100th PDF using Gravity PDF!"
|
1786 |
+
|
1787 |
+
#: src/view/html/Actions/review_plugin.php:89
|
1788 |
+
msgid ""
|
1789 |
+
"If you love how much time you've saved using Gravity PDF then do us a big "
|
1790 |
+
"favor and %sgive it a five-star rating on WordPress.org%s."
|
1791 |
+
msgstr ""
|
1792 |
+
"If you love how much time you've saved using Gravity PDF then do us a big "
|
1793 |
+
"favour and %sgive it a five-star rating on WordPress.org%s."
|
1794 |
+
|
1795 |
+
#: src/view/html/Actions/review_plugin.php:97
|
1796 |
+
msgid ""
|
1797 |
+
"%sOr let your Twitter follows know how good it is%s (or anyone else for that "
|
1798 |
+
"matter)."
|
1799 |
+
msgstr ""
|
1800 |
+
"%sOr let your Twitter follows know how good it is%s (or anyone else for that "
|
1801 |
+
"matter)."
|
1802 |
+
|
1803 |
+
#: src/view/html/FormSettings/list.php:111
|
1804 |
+
msgid "Delete PDF?"
|
1805 |
+
msgstr "Delete PDF?"
|
1806 |
+
|
1807 |
+
#: src/view/html/FormSettings/list.php:113
|
1808 |
+
msgid ""
|
1809 |
+
"Warning! You are about to delete this PDF. Select 'Delete' to delete, "
|
1810 |
+
"'Cancel' to stop."
|
1811 |
+
msgstr ""
|
1812 |
+
"Warning! You are about to delete this PDF. Select 'Delete' to delete, "
|
1813 |
+
"'Cancel' to stop."
|
1814 |
+
|
1815 |
+
#: src/view/html/PDF/entry_detailed_pdf.php:77
|
1816 |
+
msgid "PDFs"
|
1817 |
+
msgstr "PDFs"
|
1818 |
+
|
1819 |
+
#: src/view/html/PDF/entry_list_pdf_multiple.php:79
|
1820 |
+
msgid "Download PDFs"
|
1821 |
+
msgstr "Download PDFs"
|
1822 |
+
|
1823 |
+
#: src/view/html/PDF/entry_list_pdf_multiple.php:79
|
1824 |
+
msgid "View PDFs"
|
1825 |
+
msgstr "View PDFs"
|
1826 |
+
|
1827 |
+
#: src/view/html/PDF/entry_list_pdf_single.php:79
|
1828 |
+
msgid "View PDF"
|
1829 |
+
msgstr "View PDF"
|
1830 |
+
|
1831 |
+
#: src/view/html/Settings/general.php:91
|
1832 |
+
msgid "General Settings"
|
1833 |
+
msgstr "General Settings"
|
1834 |
+
|
1835 |
+
#: src/view/html/Settings/general.php:121
|
1836 |
+
msgid "Security Settings"
|
1837 |
+
msgstr "Security Settings"
|
1838 |
+
|
1839 |
+
#: src/view/html/Settings/help.php:87
|
1840 |
+
msgid "Getting Help With Gravity PDF"
|
1841 |
+
msgstr "Getting Help With Gravity PDF"
|
1842 |
+
|
1843 |
+
#: src/view/html/Settings/help.php:93
|
1844 |
+
msgid ""
|
1845 |
+
"This is your portal to find quality help, support and documentation for "
|
1846 |
+
"Gravity PDF"
|
1847 |
+
msgstr ""
|
1848 |
+
"This is your portal to find quality help, support and documentation for "
|
1849 |
+
"Gravity PDF"
|
1850 |
+
|
1851 |
+
#: src/view/html/Settings/help.php:95
|
1852 |
+
msgid ""
|
1853 |
+
"(This is not the place to get Gravity Forms support. %sPlease use their "
|
1854 |
+
"official support channel%s for assistance)"
|
1855 |
+
msgstr ""
|
1856 |
+
"(This is not the place to get Gravity Forms support. %sPlease use their "
|
1857 |
+
"official support channel%s for assistance)"
|
1858 |
+
|
1859 |
+
#: src/view/html/Settings/help.php:113
|
1860 |
+
msgid "Gravity PDF Documentation"
|
1861 |
+
msgstr "Gravity PDF Documentation"
|
1862 |
+
|
1863 |
+
#: src/view/html/Settings/help.php:143
|
1864 |
+
msgid "Find the %sanswers%s you need…"
|
1865 |
+
msgstr "Find the %sanswers%s you need…"
|
1866 |
+
|
1867 |
+
#: src/view/html/Settings/help.php:153, src/view/html/Welcome/tabs.php:87
|
1868 |
+
msgid "Getting Started"
|
1869 |
+
msgstr "Getting Started"
|
1870 |
+
|
1871 |
+
#: src/view/html/Settings/help.php:155
|
1872 |
+
msgid ""
|
1873 |
+
"Take a look at our quick-start guide and get Gravity PDF up and running in 5 "
|
1874 |
+
"minutes flat!"
|
1875 |
+
msgstr ""
|
1876 |
+
"Take a look at our quick-start guide and get Gravity PDF up and running in 5 "
|
1877 |
+
"minutes flat!"
|
1878 |
+
|
1879 |
+
#: src/view/html/Settings/help.php:167
|
1880 |
+
msgid "Comprehensive Documentation"
|
1881 |
+
msgstr "Comprehensive Documentation"
|
1882 |
+
|
1883 |
+
#: src/view/html/Settings/help.php:169
|
1884 |
+
msgid ""
|
1885 |
+
"We’ve got in-depth articles to help you learn the ins and outs of Gravity "
|
1886 |
+
"PDF. From the basic setup to PDF security."
|
1887 |
+
msgstr ""
|
1888 |
+
"We’ve got in-depth articles to help you learn the ins and outs of Gravity "
|
1889 |
+
"PDF. From the basic setup to PDF security."
|
1890 |
+
|
1891 |
+
#: src/view/html/Settings/help.php:181
|
1892 |
+
msgid "Common Problems"
|
1893 |
+
msgstr "Common Problems"
|
1894 |
+
|
1895 |
+
#: src/view/html/Settings/help.php:183
|
1896 |
+
msgid ""
|
1897 |
+
"Find out the most common issues user’s experience and ways to resolve them."
|
1898 |
+
msgstr ""
|
1899 |
+
"Find out the most common issues user’s experience and ways to resolve them."
|
1900 |
+
|
1901 |
+
#: src/view/html/Settings/help.php:195
|
1902 |
+
msgid "Developer Documentation"
|
1903 |
+
msgstr "Developer Documentation"
|
1904 |
+
|
1905 |
+
#: src/view/html/Settings/help.php:197
|
1906 |
+
msgid ""
|
1907 |
+
"You’ll find all the info and examples you’ll need to create your own custom "
|
1908 |
+
"PDF templates."
|
1909 |
+
msgstr ""
|
1910 |
+
"You’ll find all the info and examples you’ll need to create your own custom "
|
1911 |
+
"PDF templates."
|
1912 |
+
|
1913 |
+
#: src/view/html/Settings/help.php:209
|
1914 |
+
msgid "View All Documentation"
|
1915 |
+
msgstr "View All Documentation"
|
1916 |
+
|
1917 |
+
#: src/view/html/Settings/help.php:211
|
1918 |
+
msgid "Contact Support"
|
1919 |
+
msgstr "Contact Support"
|
1920 |
+
|
1921 |
+
#: src/view/html/Settings/help.php:217
|
1922 |
+
msgid ""
|
1923 |
+
"Our support hours are 9:00am-5:00pm Monday to Friday, %sSydney Australia time"
|
1924 |
+
"%s (public holidays excluded)."
|
1925 |
+
msgstr ""
|
1926 |
+
"Our support hours are 9:00am-5:00pm Monday to Friday, %sSydney Australia time"
|
1927 |
+
"%s (public holidays excluded)."
|
1928 |
+
|
1929 |
+
#: src/view/html/Settings/help.php:245
|
1930 |
+
msgid "It doesn't look like there are any topics related to your issue."
|
1931 |
+
msgstr "It doesn't look like there are any topics related to your issue."
|
1932 |
+
|
1933 |
+
#: src/view/html/Settings/help.php:249
|
1934 |
+
msgid "Maybe one of these articles will help..."
|
1935 |
+
msgstr "Maybe one of these articles will help..."
|
1936 |
+
|
1937 |
+
#: src/view/html/Settings/system_status.php:89
|
1938 |
+
msgid "Installation Status"
|
1939 |
+
msgstr "Installation Status"
|
1940 |
+
|
1941 |
+
#: src/view/html/Settings/system_status.php:103, src/view/View_Settings.php:587
|
1942 |
+
msgid "WP Memory Available"
|
1943 |
+
msgstr "WP Memory Available"
|
1944 |
+
|
1945 |
+
#: src/view/html/Settings/system_status.php:129
|
1946 |
+
msgid "Unlimited"
|
1947 |
+
msgstr "Unlimited"
|
1948 |
+
|
1949 |
+
#: src/view/html/Settings/system_status.php:147
|
1950 |
+
msgid ""
|
1951 |
+
"We strongly recommend you have at least 128MB of available WP Memory (RAM) "
|
1952 |
+
"assigned to your website. %sFind out how to increase this limit%s."
|
1953 |
+
msgstr ""
|
1954 |
+
"We strongly recommend you have at least 128MB of available WP Memory (RAM) "
|
1955 |
+
"assigned to your website. %sFind out how to increase this limit%s."
|
1956 |
+
|
1957 |
+
#: src/view/html/Settings/system_status.php:163
|
1958 |
+
msgid "WordPress Version"
|
1959 |
+
msgstr "WordPress Version"
|
1960 |
+
|
1961 |
+
#: src/view/html/Settings/system_status.php:183
|
1962 |
+
msgid "Gravity Forms Version"
|
1963 |
+
msgstr "Gravity Forms Version"
|
1964 |
+
|
1965 |
+
#: src/view/html/Settings/system_status.php:203
|
1966 |
+
msgid "PHP Version"
|
1967 |
+
msgstr "PHP Version"
|
1968 |
+
|
1969 |
+
#: src/view/html/Settings/system_status.php:223, src/view/View_Settings.php:589
|
1970 |
+
msgid "Direct PDF Protection"
|
1971 |
+
msgstr "Direct PDF Protection"
|
1972 |
+
|
1973 |
+
#: src/view/html/Settings/system_status.php:237
|
1974 |
+
msgid "You need JavaScript enabled to perform this check."
|
1975 |
+
msgstr "You need JavaScript enabled to perform this check."
|
1976 |
+
|
1977 |
+
#: src/view/html/Settings/system_status.php:243
|
1978 |
+
msgid "Protected"
|
1979 |
+
msgstr "Protected"
|
1980 |
+
|
1981 |
+
#: src/view/html/Settings/system_status.php:251
|
1982 |
+
msgid "Unprotected"
|
1983 |
+
msgstr "Unprotected"
|
1984 |
+
|
1985 |
+
#: src/view/html/Settings/system_status.php:257
|
1986 |
+
msgid ""
|
1987 |
+
"We've detected the PDFs saved in Gravity PDF's %stmp%s directory can be "
|
1988 |
+
"publically accessed."
|
1989 |
+
msgstr ""
|
1990 |
+
"We've detected the PDFs saved in Gravity PDF's %stmp%s directory can be "
|
1991 |
+
"publically accessed."
|
1992 |
+
|
1993 |
+
#: src/view/html/Settings/system_status.php:259
|
1994 |
+
msgid ""
|
1995 |
+
"We recommend you use our %sgfpdf_tmp_location%s filter to %smove the folder "
|
1996 |
+
"outside your public website directory%s."
|
1997 |
+
msgstr ""
|
1998 |
+
"We recommend you use our %sgfpdf_tmp_location%s filter to %smove the folder "
|
1999 |
+
"outside your public website directory%s."
|
2000 |
+
|
2001 |
+
#: src/view/html/Settings/tools.php:91, src/view/html/Settings/tools.php:113,
|
2002 |
+
#: src/view/View_Settings.php:385
|
2003 |
+
msgid "Tools"
|
2004 |
+
msgstr "Tools"
|
2005 |
+
|
2006 |
+
#: src/view/html/Settings/tools.php:143
|
2007 |
+
msgid ""
|
2008 |
+
"During the setup process any of the following templates stored in %s will be "
|
2009 |
+
"overridden. If you have modified any of the following template or template "
|
2010 |
+
"configuration files %smake a backup before continuing%s."
|
2011 |
+
msgstr ""
|
2012 |
+
"During the setup process any of the following templates stored in %s will be "
|
2013 |
+
"overridden. If you have modified any of the following template or template "
|
2014 |
+
"configuration files %smake a backup before continuing%s."
|
2015 |
+
|
2016 |
+
#: src/view/html/Settings/tools.php:169
|
2017 |
+
msgid "Manage all your custom Gravity PDF fonts in one place."
|
2018 |
+
msgstr "Manage all your custom Gravity PDF fonts in one place."
|
2019 |
+
|
2020 |
+
#: src/view/html/Settings/tools.php:169
|
2021 |
+
msgid ""
|
2022 |
+
"Only .ttf font files are supported and they MUST be uploaded through your "
|
2023 |
+
"media library (no external links)."
|
2024 |
+
msgstr ""
|
2025 |
+
"Only .ttf font files are supported and they MUST be uploaded through your "
|
2026 |
+
"media library (no external links)."
|
2027 |
+
|
2028 |
+
#: src/view/html/Settings/tools.php:207
|
2029 |
+
msgid "Looks bare in here!%s Click \"Add Font\" below to get started."
|
2030 |
+
msgstr "Looks bare in here!%s Click \"Add Font\" below to get started."
|
2031 |
+
|
2032 |
+
#: src/view/html/Settings/tools.php:231
|
2033 |
+
msgid "Font Name"
|
2034 |
+
msgstr "Font Name"
|
2035 |
+
|
2036 |
+
#: src/view/html/Settings/tools.php:235
|
2037 |
+
msgid "Only alphanumeric characters and spaces are accepted."
|
2038 |
+
msgstr "Only alphanumeric characters and spaces are accepted."
|
2039 |
+
|
2040 |
+
#: src/view/html/Settings/tools.php:243
|
2041 |
+
msgid "Regular"
|
2042 |
+
msgstr "Regular"
|
2043 |
+
|
2044 |
+
#: src/view/html/Settings/tools.php:251, src/view/html/Settings/tools.php:253,
|
2045 |
+
#: src/view/html/Settings/tools.php:255, src/view/html/Settings/tools.php:275,
|
2046 |
+
#: src/view/html/Settings/tools.php:277, src/view/html/Settings/tools.php:279,
|
2047 |
+
#: src/view/html/Settings/tools.php:299, src/view/html/Settings/tools.php:301,
|
2048 |
+
#: src/view/html/Settings/tools.php:303, src/view/html/Settings/tools.php:323,
|
2049 |
+
#: src/view/html/Settings/tools.php:325, src/view/html/Settings/tools.php:327
|
2050 |
+
msgid "Select Font"
|
2051 |
+
msgstr "Select Font"
|
2052 |
+
|
2053 |
+
#: src/view/html/Settings/tools.php:267
|
2054 |
+
msgid "Italics"
|
2055 |
+
msgstr "Italics"
|
2056 |
+
|
2057 |
+
#: src/view/html/Settings/tools.php:291
|
2058 |
+
msgid "Bold"
|
2059 |
+
msgstr "Bold"
|
2060 |
+
|
2061 |
+
#: src/view/html/Settings/tools.php:315
|
2062 |
+
msgid "Bold Italics"
|
2063 |
+
msgstr "Bold Italics"
|
2064 |
+
|
2065 |
+
#: src/view/html/Settings/tools.php:339
|
2066 |
+
msgid "Save Font"
|
2067 |
+
msgstr "Save Font"
|
2068 |
+
|
2069 |
+
#: src/view/html/Settings/tools.php:367
|
2070 |
+
msgid "Delete Font?"
|
2071 |
+
msgstr "Delete Font?"
|
2072 |
+
|
2073 |
+
#: src/view/html/Settings/tools.php:369
|
2074 |
+
msgid ""
|
2075 |
+
"Warning! You are about to delete this Font. Select 'Delete' to delete, "
|
2076 |
+
"'Cancel' to stop."
|
2077 |
+
msgstr ""
|
2078 |
+
"Warning! You are about to delete this Font. Select 'Delete' to delete, "
|
2079 |
+
"'Cancel' to stop."
|
2080 |
+
|
2081 |
+
#: src/view/html/Settings/uninstaller.php:87,
|
2082 |
+
#: src/view/html/Settings/uninstaller.php:115,
|
2083 |
+
#: src/view/html/Settings/uninstaller.php:123
|
2084 |
+
msgid "Uninstall Gravity PDF"
|
2085 |
+
msgstr "Uninstall Gravity PDF"
|
2086 |
+
|
2087 |
+
#: src/view/html/Settings/uninstaller.php:103
|
2088 |
+
msgid ""
|
2089 |
+
"%sThis operation deletes ALL Gravity PDF data and deactivates the plugin.%s "
|
2090 |
+
"If you continue, all settings, configuration, custom templates and fonts "
|
2091 |
+
"will be removed."
|
2092 |
+
msgstr ""
|
2093 |
+
"%sThis operation deletes ALL Gravity PDF data and deactivates the plugin.%s "
|
2094 |
+
"If you continue, all settings, configuration, custom templates and fonts "
|
2095 |
+
"will be removed."
|
2096 |
+
|
2097 |
+
#: src/view/html/Settings/uninstaller.php:125
|
2098 |
+
msgid ""
|
2099 |
+
"Warning! ALL Gravity PDF data, %sincluding PDF configurations and ALL custom "
|
2100 |
+
"templates%s will be deleted. This cannot be undone. Select 'Uninstall' to "
|
2101 |
+
"delete, 'Cancel' to stop."
|
2102 |
+
msgstr ""
|
2103 |
+
"Warning! ALL Gravity PDF data, %sincluding PDF configurations and ALL custom "
|
2104 |
+
"templates%s will be deleted. This cannot be undone. Select 'Uninstall' to "
|
2105 |
+
"delete, 'Cancel' to stop."
|
2106 |
+
|
2107 |
+
#: src/view/html/Shortcodes/conditional_logic_not_met.php:79
|
2108 |
+
msgid ""
|
2109 |
+
"PDF link not displayed because conditional logic requirements have not been "
|
2110 |
+
"met."
|
2111 |
+
msgstr ""
|
2112 |
+
"PDF link not displayed because conditional logic requirements have not been "
|
2113 |
+
"met."
|
2114 |
+
|
2115 |
+
#: src/view/html/Shortcodes/conditional_logic_not_met.php:81,
|
2116 |
+
#: src/view/html/Shortcodes/invalid_pdf_config.php:81,
|
2117 |
+
#: src/view/html/Shortcodes/no_entry_id.php:81,
|
2118 |
+
#: src/view/html/Shortcodes/pdf_not_active.php:81
|
2119 |
+
msgid "(Admin Only Message)"
|
2120 |
+
msgstr "(Admin Only Message)"
|
2121 |
+
|
2122 |
+
#: src/view/html/Shortcodes/invalid_pdf_config.php:79
|
2123 |
+
msgid ""
|
2124 |
+
"Could not get Gravity PDF configuration using the PDF and Entry IDs passed."
|
2125 |
+
msgstr ""
|
2126 |
+
"Could not get Gravity PDF configuration using the PDF and Entry IDs passed."
|
2127 |
+
|
2128 |
+
#: src/view/html/Shortcodes/no_entry_id.php:79
|
2129 |
+
msgid ""
|
2130 |
+
"No Gravity Form entry ID passed to Gravity PDF. Ensure you pass the entry ID "
|
2131 |
+
"via the confirmation url query string – using either \"entry\" or \"lid\" as "
|
2132 |
+
"the query string name – or by passing an ID directly to the shortcode."
|
2133 |
+
msgstr ""
|
2134 |
+
"No Gravity Form entry ID passed to Gravity PDF. Ensure you pass the entry ID "
|
2135 |
+
"via the confirmation url query string – using either \"entry\" or \"lid\" as "
|
2136 |
+
"the query string name – or by passing an ID directly to the shortcode."
|
2137 |
+
|
2138 |
+
#: src/view/html/Shortcodes/pdf_not_active.php:79
|
2139 |
+
msgid "PDF link not displayed because PDF is inactive."
|
2140 |
+
msgstr "PDF link not displayed because PDF is inactive."
|
2141 |
+
|
2142 |
+
#: src/view/html/Welcome/more.php:83
|
2143 |
+
msgid "Get more out of Gravity PDF"
|
2144 |
+
msgstr "Get more out of Gravity PDF"
|
2145 |
+
|
2146 |
+
#: src/view/html/Welcome/more.php:93
|
2147 |
+
msgid "PDF Template Shop"
|
2148 |
+
msgstr "PDF Template Shop"
|
2149 |
+
|
2150 |
+
#: src/view/html/Welcome/more.php:97
|
2151 |
+
msgid ""
|
2152 |
+
"It's like a theme shop, but for Gravity PDF templates. %sHead over to our "
|
2153 |
+
"online store%s and view our growing selection of premium PDF templates."
|
2154 |
+
msgstr ""
|
2155 |
+
"It's like a theme shop, but for Gravity PDF templates. %sHead over to our "
|
2156 |
+
"online store%s and view our growing selection of premium PDF templates."
|
2157 |
+
|
2158 |
+
#: src/view/html/Welcome/more.php:101
|
2159 |
+
msgid "Stay Up To Date"
|
2160 |
+
msgstr "Stay Up To Date"
|
2161 |
+
|
2162 |
+
#: src/view/html/Welcome/more.php:105
|
2163 |
+
msgid ""
|
2164 |
+
"%sSign up to our newsletter%s to be amongst the first to receive the latest "
|
2165 |
+
"news and details on upcoming feature."
|
2166 |
+
msgstr ""
|
2167 |
+
"%sSign up to our newsletter%s to be amongst the first to receive the latest "
|
2168 |
+
"news and details on upcoming feature."
|
2169 |
+
|
2170 |
+
#: src/view/html/Welcome/more.php:117
|
2171 |
+
msgid "Tailored PDFs"
|
2172 |
+
msgstr "Tailored PDFs"
|
2173 |
+
|
2174 |
+
#: src/view/html/Welcome/more.php:121
|
2175 |
+
msgid ""
|
2176 |
+
"If the PDF Shop doesn't have what you're after %sour friendly team can build "
|
2177 |
+
"a document just for you%s. With an addon, our devs can even create templates "
|
2178 |
+
"that auto fill existing PDFs – like government and legal documents."
|
2179 |
+
msgstr ""
|
2180 |
+
"If the PDF Shop doesn't have what you're after %sour friendly team can build "
|
2181 |
+
"a document just for you%s. With an addon, our devs can even create templates "
|
2182 |
+
"that auto fill existing PDFs – like government and legal documents."
|
2183 |
+
|
2184 |
+
#: src/view/html/Welcome/more.php:125
|
2185 |
+
msgid "Get Support"
|
2186 |
+
msgstr "Get Support"
|
2187 |
+
|
2188 |
+
#: src/view/html/Welcome/more.php:129
|
2189 |
+
msgid ""
|
2190 |
+
"Have trouble using Gravity PDF? %sContact our friendly staff%s who are "
|
2191 |
+
"avaliable 9am to 5pm Monday to Friday, %sAustralian Eastern Standard Time%s."
|
2192 |
+
msgstr ""
|
2193 |
+
"Have trouble using Gravity PDF? %sContact our friendly staff%s who are "
|
2194 |
+
"avaliable 9am to 5pm Monday to Friday, %sAustralian Eastern Standard Time%s."
|
2195 |
+
|
2196 |
+
#: src/view/html/Welcome/more.php:141
|
2197 |
+
msgid "Roll your Own"
|
2198 |
+
msgstr "Roll your Own"
|
2199 |
+
|
2200 |
+
#: src/view/html/Welcome/more.php:145
|
2201 |
+
msgid ""
|
2202 |
+
"If PHP, HTML and CSS come easy to you, you'll find creating your own PDF "
|
2203 |
+
"templates a breeze. With %sextensive documentation and great examples%s "
|
2204 |
+
"you'll be up and running in no time."
|
2205 |
+
msgstr ""
|
2206 |
+
"If PHP, HTML and CSS come easy to you, you'll find creating your own PDF "
|
2207 |
+
"templates a breeze. With %sextensive documentation and great examples%s "
|
2208 |
+
"you'll be up and running in no time."
|
2209 |
+
|
2210 |
+
#: src/view/html/Welcome/tabs.php:99
|
2211 |
+
msgid "What's New"
|
2212 |
+
msgstr "What's New"
|
2213 |
+
|
2214 |
+
#: src/view/html/Welcome/update.php:79
|
2215 |
+
msgid "Discover Gravity PDF %s"
|
2216 |
+
msgstr "Discover Gravity PDF %s"
|
2217 |
+
|
2218 |
+
#: src/view/html/Welcome/update.php:85
|
2219 |
+
msgid ""
|
2220 |
+
"Managing PDF templates just become a whole lot easier with our Advanced "
|
2221 |
+
"Template Manager! View, Search, Install and Delete PDFs right from our new "
|
2222 |
+
"UI."
|
2223 |
+
msgstr ""
|
2224 |
+
"Managing PDF templates just become a whole lot easier with our Advanced "
|
2225 |
+
"Template Manager! View, Search, Install and Delete PDFs right from our new "
|
2226 |
+
"UI."
|
2227 |
+
|
2228 |
+
#: src/view/html/Welcome/update.php:91, src/view/html/Welcome/welcome.php:91
|
2229 |
+
msgid "Version %s"
|
2230 |
+
msgstr "Version %s"
|
2231 |
+
|
2232 |
+
#: src/view/html/Welcome/update.php:105
|
2233 |
+
msgid "Managing PDF Templates in WordPress"
|
2234 |
+
msgstr "Managing PDF Templates in WordPress"
|
2235 |
+
|
2236 |
+
#: src/view/html/Welcome/update.php:111
|
2237 |
+
msgid ""
|
2238 |
+
"It's 100% easier to work with PDF Templates thanks to our Advanced Template "
|
2239 |
+
"Manager. Based on the WordPress Theme Manager, you can easily search through "
|
2240 |
+
"your installed templates, see what a PDF might look like and view supported "
|
2241 |
+
"features – all without a page reload!"
|
2242 |
+
msgstr ""
|
2243 |
+
"It's 100% easier to work with PDF Templates thanks to our Advanced Template "
|
2244 |
+
"Manager. Based on the WordPress Theme Manager, you can easily search through "
|
2245 |
+
"your installed templates, see what a PDF might look like and view supported "
|
2246 |
+
"features – all without a page reload!"
|
2247 |
+
|
2248 |
+
#: src/view/html/Welcome/update.php:119
|
2249 |
+
msgid ""
|
2250 |
+
"We've added the ability to install PDFs via a zip file and easily delete "
|
2251 |
+
"them, too. It's now very simple to install and use custom PDF templates – "
|
2252 |
+
"like the ones %syou might purchased from our PDF Template Shop%s."
|
2253 |
+
msgstr ""
|
2254 |
+
"We've added the ability to install PDFs via a zip file and easily delete "
|
2255 |
+
"them, too. It's now very simple to install and use custom PDF templates – "
|
2256 |
+
"like the ones %syou might purchased from our PDF Template Shop%s."
|
2257 |
+
|
2258 |
+
#: src/view/html/Welcome/update.php:157
|
2259 |
+
msgid "Gravity PDF Merge Tags"
|
2260 |
+
msgstr "Gravity PDF Merge Tags"
|
2261 |
+
|
2262 |
+
#: src/view/html/Welcome/update.php:163
|
2263 |
+
msgid ""
|
2264 |
+
"The %s[gravitypdf]%s shortcode is an excellent way to display a PDF download "
|
2265 |
+
"link on your website. But sometimes it's more useful to display the raw PDF "
|
2266 |
+
"URL, and that's where the new PDF merge tag %s{Title:pdf:ID}%s comes in."
|
2267 |
+
msgstr ""
|
2268 |
+
"The %s[gravitypdf]%s shortcode is an excellent way to display a PDF download "
|
2269 |
+
"link on your website. But sometimes it's more useful to display the raw PDF "
|
2270 |
+
"URL, and that's where the new PDF merge tag %s{Title:pdf:ID}%s comes in."
|
2271 |
+
|
2272 |
+
#: src/view/html/Welcome/update.php:171
|
2273 |
+
msgid ""
|
2274 |
+
"The PDF Merge Tag will be automatically converted to a URL if the PDF is "
|
2275 |
+
"active and the PDF conditional logic has been met. The new merge tag is "
|
2276 |
+
"automatically included in the Gravity Forms merge tag selector and can be "
|
2277 |
+
"used anywhere Gravity Forms allows other merge tags (provided the entry has "
|
2278 |
+
"been created)."
|
2279 |
+
msgstr ""
|
2280 |
+
"The PDF Merge Tag will be automatically converted to a URL if the PDF is "
|
2281 |
+
"active and the PDF conditional logic has been met. The new merge tag is "
|
2282 |
+
"automatically included in the Gravity Forms merge tag selector and can be "
|
2283 |
+
"used anywhere Gravity Forms allows other merge tags (provided the entry has "
|
2284 |
+
"been created)."
|
2285 |
+
|
2286 |
+
#: src/view/html/Welcome/update.php:191
|
2287 |
+
msgid "Four Column Support added to Core PDF Templates!"
|
2288 |
+
msgstr "Four Column Support added to Core PDF Templates!"
|
2289 |
+
|
2290 |
+
#: src/view/html/Welcome/update.php:197
|
2291 |
+
msgid ""
|
2292 |
+
"%sThis four-column CSS code%s has become increasingly popular for Gravity "
|
2293 |
+
"Forms users and so we have added full support for these classes in Gravity "
|
2294 |
+
"PDF (make sure to include the custom CSS with your theme)."
|
2295 |
+
msgstr ""
|
2296 |
+
"%sThis four-column CSS code%s has become increasingly popular for Gravity "
|
2297 |
+
"Forms users and so we have added full support for these classes in Gravity "
|
2298 |
+
"PDF (make sure to include the custom CSS with your theme)."
|
2299 |
+
|
2300 |
+
#: src/view/html/Welcome/update.php:207
|
2301 |
+
msgid ""
|
2302 |
+
"To start using in your PDF, add the classes %sgf_first_quarter%s, "
|
2303 |
+
"%sgf_second_quarter%s, %sgf_third_quarter%s and %sgf_fourth_quarter%s to "
|
2304 |
+
"your Gravity Form fields and supported PDF templates will automatically "
|
2305 |
+
"create a four column layout to match."
|
2306 |
+
msgstr ""
|
2307 |
+
"To start using in your PDF, add the classes %sgf_first_quarter%s, "
|
2308 |
+
"%sgf_second_quarter%s, %sgf_third_quarter%s and %sgf_fourth_quarter%s to "
|
2309 |
+
"your Gravity Form fields and supported PDF templates will automatically "
|
2310 |
+
"create a four column layout to match."
|
2311 |
+
|
2312 |
+
#: src/view/html/Welcome/welcome.php:85
|
2313 |
+
msgid ""
|
2314 |
+
"You're just minutes away from producing your first highly-customizable PDF "
|
2315 |
+
"document using Gravity Forms data."
|
2316 |
+
msgstr ""
|
2317 |
+
"You're just minutes away from producing your first highly-customisable PDF "
|
2318 |
+
"document using Gravity Forms data."
|
2319 |
+
|
2320 |
+
#: src/view/html/Welcome/welcome.php:105
|
2321 |
+
msgid "Where to Start?"
|
2322 |
+
msgstr "Where to Start?"
|
2323 |
+
|
2324 |
+
#: src/view/html/Welcome/welcome.php:111
|
2325 |
+
msgid ""
|
2326 |
+
"Your first step is to review %sGravity PDF's General Settings%s which can be "
|
2327 |
+
"found by navigating to %sForms -> Settings -> PDF%s in your WordPress admin "
|
2328 |
+
"area. From here you'll be able to set defaults for paper size, font face, "
|
2329 |
+
"font colour, and select a PDF template – %swe ship with four completely-free "
|
2330 |
+
"layouts%s – which will be used for all new PDFs. There's even an easy-to-use "
|
2331 |
+
"interface for installing custom fonts."
|
2332 |
+
msgstr ""
|
2333 |
+
"Your first step is to review %sGravity PDF's General Settings%s which can be "
|
2334 |
+
"found by navigating to %sForms -> Settings -> PDF%s in your WordPress admin "
|
2335 |
+
"area. From here you'll be able to set defaults for paper size, font face, "
|
2336 |
+
"font colour, and select a PDF template – %swe ship with four completely-free "
|
2337 |
+
"layouts%s – which will be used for all new PDFs. There's even an easy-to-use "
|
2338 |
+
"interface for installing custom fonts."
|
2339 |
+
|
2340 |
+
#: src/view/html/Welcome/welcome.php:117
|
2341 |
+
msgid "Configure Settings"
|
2342 |
+
msgstr "Configure Settings"
|
2343 |
+
|
2344 |
+
#: src/view/html/Welcome/welcome.php:149
|
2345 |
+
msgid "Setting up a PDF"
|
2346 |
+
msgstr "Setting up a PDF"
|
2347 |
+
|
2348 |
+
#: src/view/html/Welcome/welcome.php:155
|
2349 |
+
msgid ""
|
2350 |
+
"You can setup individual PDF documents from the %sGravity Form \"Forms\" page"
|
2351 |
+
"%s in your admin area – located at %sForms -> Forms%s in your navigation. A "
|
2352 |
+
"new %sPDF%s option will be avaliable in each forms' settings section. The "
|
2353 |
+
"only required fields are %sName%s – an internal identifier – and %sFilename"
|
2354 |
+
"%s – the name used when saving and emailing the PDF."
|
2355 |
+
msgstr ""
|
2356 |
+
"You can setup individual PDF documents from the %sGravity Form \"Forms\" page"
|
2357 |
+
"%s in your admin area – located at %sForms -> Forms%s in your navigation. A "
|
2358 |
+
"new %sPDF%s option will be avaliable in each forms' settings section. The "
|
2359 |
+
"only required fields are %sName%s – an internal identifier – and %sFilename"
|
2360 |
+
"%s – the name used when saving and emailing the PDF."
|
2361 |
+
|
2362 |
+
#: src/view/html/Welcome/welcome.php:179
|
2363 |
+
msgid "Select which Form you want to setup first:"
|
2364 |
+
msgstr "Select which Form you want to setup first:"
|
2365 |
+
|
2366 |
+
#: src/view/html/Welcome/welcome.php:193
|
2367 |
+
msgid "Create a PDF"
|
2368 |
+
msgstr "Create a PDF"
|
2369 |
+
|
2370 |
+
#: src/view/html/Welcome/welcome.php:215
|
2371 |
+
msgid "Simple PDF Download Links"
|
2372 |
+
msgstr "Simple PDF Download Links"
|
2373 |
+
|
2374 |
+
#: src/view/html/Welcome/welcome.php:219
|
2375 |
+
msgid ""
|
2376 |
+
"The %s[gravitypdf]%s shortcode allows you to %seasily place a PDF download "
|
2377 |
+
"link%s on any of the Gravity Forms Confirmation types."
|
2378 |
+
msgstr ""
|
2379 |
+
"The %s[gravitypdf]%s shortcode allows you to %seasily place a PDF download "
|
2380 |
+
"link%s on any of the Gravity Forms Confirmation types."
|
2381 |
+
|
2382 |
+
#: src/view/html/Welcome/welcome.php:229
|
2383 |
+
msgid "Automated PDF Emails"
|
2384 |
+
msgstr "Automated PDF Emails"
|
2385 |
+
|
2386 |
+
#: src/view/html/Welcome/welcome.php:233
|
2387 |
+
msgid ""
|
2388 |
+
"Select a Gravity Form Notification and your PDF will automatically be sent "
|
2389 |
+
"as an attachment. Powerful conditional logic can also be used to determine "
|
2390 |
+
"if a PDF will be included."
|
2391 |
+
msgstr ""
|
2392 |
+
"Select a Gravity Form Notification and your PDF will automatically be sent "
|
2393 |
+
"as an attachment. Powerful conditional logic can also be used to determine "
|
2394 |
+
"if a PDF will be included."
|
2395 |
+
|
2396 |
+
#: src/view/html/Welcome/welcome.php:243
|
2397 |
+
msgid "Custom Fonts"
|
2398 |
+
msgstr "Custom Fonts"
|
2399 |
+
|
2400 |
+
#: src/view/html/Welcome/welcome.php:247
|
2401 |
+
msgid ""
|
2402 |
+
"Make your documents stand out by including your favorite fonts with our "
|
2403 |
+
"%ssimple font manager%s."
|
2404 |
+
msgstr ""
|
2405 |
+
"Make your documents stand out by including your favourite fonts with our "
|
2406 |
+
"%ssimple font manager%s."
|
2407 |
+
|
2408 |
+
#: src/view/View_Settings.php:375
|
2409 |
+
msgid "General"
|
2410 |
+
msgstr "General"
|
2411 |
+
|
2412 |
+
#: src/view/View_Settings.php:395
|
2413 |
+
msgid "Help"
|
2414 |
+
msgstr "Help"
|
2415 |
+
|
2416 |
+
#: src/view/View_Settings.php:587
|
2417 |
+
msgid ""
|
2418 |
+
"Producing PDF documents is hard work and Gravity PDF requires more resources "
|
2419 |
+
"than most plugins. We strongly recommend you have at least 128MB, but you "
|
2420 |
+
"may need more."
|
2421 |
+
msgstr ""
|
2422 |
+
"Producing PDF documents is hard work and Gravity PDF requires more resources "
|
2423 |
+
"than most plugins. We strongly recommend you have at least 128MB, but you "
|
2424 |
+
"may need more."
|
2425 |
+
|
2426 |
+
#: src/view/View_Settings.php:589
|
2427 |
+
msgid ""
|
2428 |
+
"Apache and Litespeed servers automatically disable public access to the "
|
2429 |
+
"Gravity PDF temporary directory using a %s.htaccess%s file, but other web "
|
2430 |
+
"servers like Nginx do not support this feature. We will check if your PDFs "
|
2431 |
+
"are automatically protected, and let you know what you can do to protect "
|
2432 |
+
"your data if they are not."
|
2433 |
+
msgstr ""
|
2434 |
+
"Apache and Litespeed servers automatically disable public access to the "
|
2435 |
+
"Gravity PDF temporary directory using a %s.htaccess%s file, but other web "
|
2436 |
+
"servers like Nginx do not support this feature. We will check if your PDFs "
|
2437 |
+
"are automatically protected, and let you know what you can do to protect "
|
2438 |
+
"your data if they are not."
|
2439 |
+
|
2440 |
+
#: tests/phpunit/unit-tests/test-settings.php:523
|
2441 |
+
msgid "Normal Notice"
|
2442 |
+
msgstr "Normal Notice"
|
2443 |
+
|
2444 |
+
#~ msgid ""
|
2445 |
+
#~ "The %s[gravitypdf]%s shortcode is an excellent way to display a PDF "
|
2446 |
+
#~ "download link on your website. Sometimes it's more useful to display the "
|
2447 |
+
#~ "raw PDF URL, and that's where the new PDF merge tag %s{Title:pdf:ID}%s "
|
2448 |
+
#~ "comes in."
|
2449 |
+
#~ msgstr ""
|
2450 |
+
#~ "The %s[gravitypdf]%s shortcode is an excellent way to display a PDF "
|
2451 |
+
#~ "download link on your website. Sometimes it's more useful to display the "
|
2452 |
+
#~ "raw PDF URL, and that's where the new PDF merge tag %s{Title:pdf:ID}%s "
|
2453 |
+
#~ "comes in."
|
2454 |
+
|
2455 |
+
#~ msgid ""
|
2456 |
+
#~ "The PDF Merge Tag will be automatically converted to a URL if the PDF is "
|
2457 |
+
#~ "active and the PDF conditional logic has been met. The new merge tag is "
|
2458 |
+
#~ "automatically included in Gravity Forms merge tag selector and can be "
|
2459 |
+
#~ "used anywhere Gravity Forms allows other merge tags (provided the entry "
|
2460 |
+
#~ "has been saved)."
|
2461 |
+
#~ msgstr ""
|
2462 |
+
#~ "The PDF Merge Tag will be automatically converted to a URL if the PDF is "
|
2463 |
+
#~ "active and the PDF conditional logic has been met. The new merge tag is "
|
2464 |
+
#~ "automatically included in Gravity Forms merge tag selector and can be "
|
2465 |
+
#~ "used anywhere Gravity Forms allows other merge tags (provided the entry "
|
2466 |
+
#~ "has been saved)."
|
2467 |
+
|
2468 |
+
#~ msgid ""
|
2469 |
+
#~ "To start using in your PDF, add the classes %sgf_first_quarter%s, "
|
2470 |
+
#~ "%sgf_second_quarter%s, %sgf_third_quarter%s and %sgf_fourth_quarter%s to "
|
2471 |
+
#~ "your Gravity Form fields and support PDF templates will automatically "
|
2472 |
+
#~ "create a four column layout to match."
|
2473 |
+
#~ msgstr ""
|
2474 |
+
#~ "To start using in your PDF, add the classes %sgf_first_quarter%s, "
|
2475 |
+
#~ "%sgf_second_quarter%s, %sgf_third_quarter%s and %sgf_fourth_quarter%s to "
|
2476 |
+
#~ "your Gravity Form fields and support PDF templates will automatically "
|
2477 |
+
#~ "create a four column layout to match."
|
2478 |
+
|
2479 |
+
#~ msgid ""
|
2480 |
+
#~ "Custom fonts can be installed for use in your PDFs. Only %s.ttf%s and %s."
|
2481 |
+
#~ "otf%s font files are supported."
|
2482 |
+
#~ msgstr ""
|
2483 |
+
#~ "Custom fonts can be installed for use in your PDFs. Only %s.ttf%s and %s."
|
2484 |
+
#~ "otf%s font files are supported."
|
2485 |
+
|
2486 |
+
#~ msgid ""
|
2487 |
+
#~ "Only .ttf and %s.otf font files%s are supported and they MUST be uploaded "
|
2488 |
+
#~ "through your media library (no external links)."
|
2489 |
+
#~ msgstr ""
|
2490 |
+
#~ "Only .ttf and %s.otf font files%s are supported and they MUST be uploaded "
|
2491 |
+
#~ "through your media library (no external links)."
|
2492 |
+
|
2493 |
+
#~ msgid ""
|
2494 |
+
#~ "Gravity PDF has been completely rebuilt with simplicity, stability and "
|
2495 |
+
#~ "security in mind. Our team has spent over 12 months making a great "
|
2496 |
+
#~ "product even greater. Discover what's new..."
|
2497 |
+
#~ msgstr ""
|
2498 |
+
#~ "Gravity PDF has been completely rebuilt with simplicity, stability and "
|
2499 |
+
#~ "security in mind. Our team has spent over 12 months making a great "
|
2500 |
+
#~ "product even greater. Discover what's new..."
|
2501 |
+
|
2502 |
+
#~ msgid "Bringing Config Settings to WordPress"
|
2503 |
+
#~ msgstr "Bringing Config Settings to WordPress"
|
2504 |
+
|
2505 |
+
#~ msgid ""
|
2506 |
+
#~ "We've done away with the need to edit PHP files to configure Gravity PDF. "
|
2507 |
+
#~ "You'll have a familiar and seamless experience controlling PDF settings "
|
2508 |
+
#~ "direct from your WordPress Admin area."
|
2509 |
+
#~ msgstr ""
|
2510 |
+
#~ "We've done away with the need to edit PHP files to configure Gravity PDF. "
|
2511 |
+
#~ "You'll have a familiar and seamless experience controlling PDF settings "
|
2512 |
+
#~ "direct from your WordPress Admin area."
|
2513 |
+
|
2514 |
+
#~ msgid ""
|
2515 |
+
#~ "If you've ever configured a Gravity Form add-on you'll feel right at home "
|
2516 |
+
#~ "setting up PDFs."
|
2517 |
+
#~ msgstr ""
|
2518 |
+
#~ "If you've ever configured a Gravity Form add-on you'll feel right at home "
|
2519 |
+
#~ "setting up PDFs."
|
2520 |
+
|
2521 |
+
#~ msgid "All-New Templates with CSS Ready Class Support"
|
2522 |
+
#~ msgstr "All-New Templates with CSS Ready Class Support"
|
2523 |
+
|
2524 |
+
#~ msgid ""
|
2525 |
+
#~ "We were always getting feedback for templates that look more like their "
|
2526 |
+
#~ "Gravity Forms layouts. %sYou asked and we've delivered!%s"
|
2527 |
+
#~ msgstr ""
|
2528 |
+
#~ "We were always getting feedback for templates that look more like their "
|
2529 |
+
#~ "Gravity Forms layouts. %sYou asked and we've delivered!%s"
|
2530 |
+
|
2531 |
+
#~ msgid ""
|
2532 |
+
#~ "All v4 PDFs will support %sGravity Forms CSS Ready Classes%s. When used "
|
2533 |
+
#~ "in your form the PDF will automatically create two and three column "
|
2534 |
+
#~ "layouts to suit. Plus, Gravity PDF %snow comes with four free PDF "
|
2535 |
+
#~ "templates%s out of the box."
|
2536 |
+
#~ msgstr ""
|
2537 |
+
#~ "All v4 PDFs will support %sGravity Forms CSS Ready Classes%s. When used "
|
2538 |
+
#~ "in your form the PDF will automatically create two and three column "
|
2539 |
+
#~ "layouts to suit. Plus, Gravity PDF %snow comes with four free PDF "
|
2540 |
+
#~ "templates%s out of the box."
|
2541 |
+
|
2542 |
+
#~ msgid "A Beautiful Font Manager"
|
2543 |
+
#~ msgstr "A Beautiful Font Manager"
|
2544 |
+
|
2545 |
+
#~ msgid ""
|
2546 |
+
#~ "No more playing around with FTP when installing fonts, or \"guessing\" "
|
2547 |
+
#~ "the font family name to use in your templates. Our all-new font manager "
|
2548 |
+
#~ "makes it a breeze to upload TTF or OTF font files and use them in your "
|
2549 |
+
#~ "PDFs."
|
2550 |
+
#~ msgstr ""
|
2551 |
+
#~ "No more playing around with FTP when installing fonts, or \"guessing\" "
|
2552 |
+
#~ "the font family name to use in your templates. Our all-new font manager "
|
2553 |
+
#~ "makes it a breeze to upload TTF or OTF font files and use them in your "
|
2554 |
+
#~ "PDFs."
|
2555 |
+
|
2556 |
+
#~ msgid ""
|
2557 |
+
#~ "Once installed, you'll have full control over the font face, size and "
|
2558 |
+
#~ "color using our powerful settings interface."
|
2559 |
+
#~ msgstr ""
|
2560 |
+
#~ "Once installed, you'll have full control over the font face, size and "
|
2561 |
+
#~ "colour using our powerful settings interface."
|
2562 |
+
|
2563 |
+
#~ msgid "PDF Conditional Logic"
|
2564 |
+
#~ msgstr "PDF Conditional Logic"
|
2565 |
+
|
2566 |
+
#~ msgid ""
|
2567 |
+
#~ "Enable or disable PDFs with Gravity Forms powerful conditional logic "
|
2568 |
+
#~ "feature. Control when PDFs are attached to email notifications and "
|
2569 |
+
#~ "disable a PDF from being viewed if your conditions aren't met."
|
2570 |
+
#~ msgstr ""
|
2571 |
+
#~ "Enable or disable PDFs with Gravity Forms powerful conditional logic "
|
2572 |
+
#~ "feature. Control when PDFs are attached to email notifications and "
|
2573 |
+
#~ "disable a PDF from being viewed if your conditions aren't met."
|
2574 |
+
|
2575 |
+
#~ msgid "Headers and Footers"
|
2576 |
+
#~ msgstr "Headers and Footers"
|
2577 |
+
|
2578 |
+
#~ msgid ""
|
2579 |
+
#~ "We've built in header and footer support in all our v4 templates. You can "
|
2580 |
+
#~ "optionally have a different first page header and footer. Now that's "
|
2581 |
+
#~ "control!"
|
2582 |
+
#~ msgstr ""
|
2583 |
+
#~ "We've built in header and footer support in all our v4 templates. You can "
|
2584 |
+
#~ "optionally have a different first page header and footer. Now that's "
|
2585 |
+
#~ "control!"
|
2586 |
+
|
2587 |
+
#~ msgid "There was an error processing your request. Please try again."
|
2588 |
+
#~ msgstr "There was an error processing your request. Please try again."
|
2589 |
+
|
2590 |
+
#~ msgctxt "Required"
|
2591 |
+
#~ msgid "needs"
|
2592 |
+
#~ msgstr "needs"
|
2593 |
+
|
2594 |
+
#~ msgid "No Template Preview Available"
|
2595 |
+
#~ msgstr "No Template Preview Available"
|
src/assets/languages/gravity-forms-pdf-extended-en_GB.mo
ADDED
Binary file
|
src/assets/languages/gravity-forms-pdf-extended-en_GB.po
ADDED
@@ -0,0 +1,2593 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2016 gravity-forms-pdf-extended
|
2 |
+
# This file is distributed under the same license as the gravity-forms-pdf-extended package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: gravity-forms-pdf-extended\n"
|
6 |
+
"POT-Creation-Date: \n"
|
7 |
+
"PO-Revision-Date: 2017-01-19 09:47+1100\n"
|
8 |
+
"Last-Translator: Jake Jackson <support@gravitypdf.com>\n"
|
9 |
+
"Language-Team: \n"
|
10 |
+
"Language: en_GB\n"
|
11 |
+
"MIME-Version: 1.0\n"
|
12 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
13 |
+
"Content-Transfer-Encoding: 8bit\n"
|
14 |
+
"X-Poedit-Basepath: ..\n"
|
15 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
|
17 |
+
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
|
18 |
+
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
19 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
20 |
+
"X-Generator: Poedit 1.8.11\n"
|
21 |
+
"X-Poedit-SearchPath-0: .\n"
|
22 |
+
"X-Poedit-SearchPath-1: languages\n"
|
23 |
+
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
24 |
+
|
25 |
+
#: api.php:503
|
26 |
+
msgid ""
|
27 |
+
"The $type parameter is invalid. Only \"view\" and \"model\" are accepted"
|
28 |
+
msgstr ""
|
29 |
+
"The $type parameter is invalid. Only \"view\" and \"model\" are accepted"
|
30 |
+
|
31 |
+
#: api.php:793
|
32 |
+
msgid ""
|
33 |
+
"The option key %s already exists. Use GPDFAPI::update_plugin_option instead"
|
34 |
+
msgstr ""
|
35 |
+
"The option key %s already exists. Use GPDFAPI::update_plugin_option instead"
|
36 |
+
|
37 |
+
#: pdf.php:379
|
38 |
+
msgid "WordPress Version %s is required. %sGet more info%s."
|
39 |
+
msgstr "WordPress Version %s is required. %sGet more info%s."
|
40 |
+
|
41 |
+
#: pdf.php:417
|
42 |
+
msgid "%sGravity Forms%s Version %s is required. %sGet more info%s."
|
43 |
+
msgstr "%sGravity Forms%s Version %s is required. %sGet more info%s."
|
44 |
+
|
45 |
+
#: pdf.php:455
|
46 |
+
msgid ""
|
47 |
+
"You are running an %soutdated version of PHP%s. Contact your web hosting "
|
48 |
+
"provider to update. %sGet more info%s."
|
49 |
+
msgstr ""
|
50 |
+
"You are running an %soutdated version of PHP%s. Contact your web hosting "
|
51 |
+
"provider to update. %sGet more info%s."
|
52 |
+
|
53 |
+
#: pdf.php:493
|
54 |
+
msgid ""
|
55 |
+
"The PHP Extension MB String could not be detected. Contact your web hosting "
|
56 |
+
"provider to fix. %sGet more info%s."
|
57 |
+
msgstr ""
|
58 |
+
"The PHP Extension MB String could not be detected. Contact your web hosting "
|
59 |
+
"provider to fix. %sGet more info%s."
|
60 |
+
|
61 |
+
#: pdf.php:531
|
62 |
+
msgid ""
|
63 |
+
"The PHP Extension MB String does not have MB Regex enabled. Contact your web "
|
64 |
+
"hosting provider to fix. %sGet more info%s."
|
65 |
+
msgstr ""
|
66 |
+
"The PHP Extension MB String does not have MB Regex enabled. Contact your web "
|
67 |
+
"hosting provider to fix. %sGet more info%s."
|
68 |
+
|
69 |
+
#: pdf.php:569
|
70 |
+
msgid ""
|
71 |
+
"The PHP Extension GD Image Library could not be detected. Contact your web "
|
72 |
+
"hosting provider to fix. %sGet more info%s."
|
73 |
+
msgstr ""
|
74 |
+
"The PHP Extension GD Image Library could not be detected. Contact your web "
|
75 |
+
"hosting provider to fix. %sGet more info%s."
|
76 |
+
|
77 |
+
#: pdf.php:607
|
78 |
+
msgid ""
|
79 |
+
"The PHP DOM Extension was not found. Contact your web hosting provider to "
|
80 |
+
"fix. %sGet more info%s."
|
81 |
+
msgstr ""
|
82 |
+
"The PHP DOM Extension was not found. Contact your web hosting provider to "
|
83 |
+
"fix. %sGet more info%s."
|
84 |
+
|
85 |
+
#: pdf.php:621
|
86 |
+
msgid ""
|
87 |
+
"The PHP Extension libxml could not be detected. Contact your web hosting "
|
88 |
+
"provider to fix. %sGet more info%s."
|
89 |
+
msgstr ""
|
90 |
+
"The PHP Extension libxml could not be detected. Contact your web hosting "
|
91 |
+
"provider to fix. %sGet more info%s."
|
92 |
+
|
93 |
+
#: pdf.php:667
|
94 |
+
msgid ""
|
95 |
+
"You need %s128MB%s of WP Memory (RAM) but we only found %s available. %sTry "
|
96 |
+
"these methods to increase your memory limit%s, otherwise contact your web "
|
97 |
+
"hosting provider to fix."
|
98 |
+
msgstr ""
|
99 |
+
"You need %s128MB%s of WP Memory (RAM) but we only found %s available. %sTry "
|
100 |
+
"these methods to increase your memory limit%s, otherwise contact your web "
|
101 |
+
"hosting provider to fix."
|
102 |
+
|
103 |
+
#: pdf.php:801
|
104 |
+
msgid "Gravity PDF Installation Problem"
|
105 |
+
msgstr "Gravity PDF Installation Problem"
|
106 |
+
|
107 |
+
#: pdf.php:805
|
108 |
+
msgid ""
|
109 |
+
"The minimum requirements for Gravity PDF have not been met. Please fix the "
|
110 |
+
"issue(s) below to continue:"
|
111 |
+
msgstr ""
|
112 |
+
"The minimum requirements for Gravity PDF have not been met. Please fix the "
|
113 |
+
"issue(s) below to continue:"
|
114 |
+
|
115 |
+
#: src/bootstrap.php:315, src/bootstrap.php:339, src/deprecated.php:111,
|
116 |
+
#: src/deprecated.php:135
|
117 |
+
msgid "\"%s\" has been deprecated as of Gravity PDF 4.0"
|
118 |
+
msgstr "\"%s\" has been deprecated as of Gravity PDF 4.0"
|
119 |
+
|
120 |
+
#: src/bootstrap.php:799
|
121 |
+
msgid "View Gravity PDF Settings"
|
122 |
+
msgstr "View Gravity PDF Settings"
|
123 |
+
|
124 |
+
#: src/bootstrap.php:799
|
125 |
+
msgid "Settings"
|
126 |
+
msgstr "Settings"
|
127 |
+
|
128 |
+
#: src/bootstrap.php:839
|
129 |
+
msgid "View Gravity PDF Documentation"
|
130 |
+
msgstr "View Gravity PDF Documentation"
|
131 |
+
|
132 |
+
#: src/bootstrap.php:839
|
133 |
+
msgid "Docs"
|
134 |
+
msgstr "Docs"
|
135 |
+
|
136 |
+
#: src/bootstrap.php:841
|
137 |
+
msgid "Get Help and Support"
|
138 |
+
msgstr "Get Help and Support"
|
139 |
+
|
140 |
+
#: src/bootstrap.php:841
|
141 |
+
msgid "Support"
|
142 |
+
msgstr "Support"
|
143 |
+
|
144 |
+
#: src/bootstrap.php:843
|
145 |
+
msgid "View Gravity PDF Theme Shop"
|
146 |
+
msgstr "View Gravity PDF Theme Shop"
|
147 |
+
|
148 |
+
#: src/bootstrap.php:843
|
149 |
+
msgid "Theme Shop"
|
150 |
+
msgstr "Theme Shop"
|
151 |
+
|
152 |
+
#: src/bootstrap.php:1323, src/controller/Controller_Shortcodes.php:301,
|
153 |
+
#: src/helper/Helper_Data.php:349
|
154 |
+
msgid "Gravity PDF"
|
155 |
+
msgstr "Gravity PDF"
|
156 |
+
|
157 |
+
#: src/controller/Controller_Actions.php:311
|
158 |
+
msgid "Review Submitted"
|
159 |
+
msgstr "Review Submitted"
|
160 |
+
|
161 |
+
#: src/controller/Controller_Actions.php:331
|
162 |
+
msgid "Begin Migration"
|
163 |
+
msgstr "Begin Migration"
|
164 |
+
|
165 |
+
#: src/controller/Controller_Actions.php:469,
|
166 |
+
#: src/model/Model_Form_Settings.php:379,
|
167 |
+
#: src/model/Model_Form_Settings.php:449,
|
168 |
+
#: src/model/Model_Form_Settings.php:569, src/view/View_Settings.php:535
|
169 |
+
msgid "You do not have permission to access this page"
|
170 |
+
msgstr "You do not have permission to access this page"
|
171 |
+
|
172 |
+
#: src/controller/Controller_Actions.php:483,
|
173 |
+
#: src/helper/Helper_Migration.php:319
|
174 |
+
msgid "There was a problem processing the action. Please try again."
|
175 |
+
msgstr "There was a problem processing the action. Please try again."
|
176 |
+
|
177 |
+
#: src/controller/Controller_Install.php:469
|
178 |
+
msgid "There was a problem uninstalling Gravity PDF. Please try again."
|
179 |
+
msgstr "There was a problem uninstalling Gravity PDF. Please try again."
|
180 |
+
|
181 |
+
#: src/controller/Controller_PDF.php:617, src/view/View_PDF.php:523
|
182 |
+
msgid "There was a problem generating your PDF"
|
183 |
+
msgstr "There was a problem generating your PDF"
|
184 |
+
|
185 |
+
#: src/controller/Controller_Settings.php:675
|
186 |
+
msgid "There was a problem installing the PDF templates. Please try again."
|
187 |
+
msgstr "There was a problem installing the PDF templates. Please try again."
|
188 |
+
|
189 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:779,
|
190 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:811
|
191 |
+
msgid "You must pass in a valid form ID"
|
192 |
+
msgstr "You must pass in a valid form ID"
|
193 |
+
|
194 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:901
|
195 |
+
msgid "You must pass in a valid PDF ID"
|
196 |
+
msgstr "You must pass in a valid PDF ID"
|
197 |
+
|
198 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1613
|
199 |
+
msgid "Gravity Forms Capabilities"
|
200 |
+
msgstr "Gravity Forms Capabilities"
|
201 |
+
|
202 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1625
|
203 |
+
msgid "Active WordPress Capabilities"
|
204 |
+
msgstr "Active WordPress Capabilities"
|
205 |
+
|
206 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1673
|
207 |
+
msgid "Common Sizes"
|
208 |
+
msgstr "Common Sizes"
|
209 |
+
|
210 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1675
|
211 |
+
msgid "A4 (210 x 297mm)"
|
212 |
+
msgstr "A4 (210 x 297mm)"
|
213 |
+
|
214 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1677
|
215 |
+
msgid "Letter (8.5 x 11in)"
|
216 |
+
msgstr "Letter (8.5 x 11in)"
|
217 |
+
|
218 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1679
|
219 |
+
msgid "Legal (8.5 x 14in)"
|
220 |
+
msgstr "Legal (8.5 x 14in)"
|
221 |
+
|
222 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1681
|
223 |
+
msgid "Ledger / Tabloid (11 x 17in)"
|
224 |
+
msgstr "Ledger / Tabloid (11 x 17in)"
|
225 |
+
|
226 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1683
|
227 |
+
msgid "Executive (7 x 10in)"
|
228 |
+
msgstr "Executive (7 x 10in)"
|
229 |
+
|
230 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1685,
|
231 |
+
#: src/helper/Helper_Options_Fields.php:195,
|
232 |
+
#: src/helper/Helper_Options_Fields.php:723
|
233 |
+
msgid "Custom Paper Size"
|
234 |
+
msgstr "Custom Paper Size"
|
235 |
+
|
236 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1691
|
237 |
+
msgid "\"A\" Sizes"
|
238 |
+
msgstr "\"A\" Sizes"
|
239 |
+
|
240 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1693
|
241 |
+
msgid "A0 (841 x 1189mm)"
|
242 |
+
msgstr "A0 (841 x 1189mm)"
|
243 |
+
|
244 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1695
|
245 |
+
msgid "A1 (594 x 841mm)"
|
246 |
+
msgstr "A1 (594 x 841mm)"
|
247 |
+
|
248 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1697
|
249 |
+
msgid "A2 (420 x 594mm)"
|
250 |
+
msgstr "A2 (420 x 594mm)"
|
251 |
+
|
252 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1699
|
253 |
+
msgid "A3 (297 x 420mm)"
|
254 |
+
msgstr "A3 (297 x 420mm)"
|
255 |
+
|
256 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1701
|
257 |
+
msgid "A5 (210 x 297mm)"
|
258 |
+
msgstr "A5 (210 x 297mm)"
|
259 |
+
|
260 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1703
|
261 |
+
msgid "A6 (105 x 148mm)"
|
262 |
+
msgstr "A6 (105 x 148mm)"
|
263 |
+
|
264 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1705
|
265 |
+
msgid "A7 (74 x 105mm)"
|
266 |
+
msgstr "A7 (74 x 105mm)"
|
267 |
+
|
268 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1707
|
269 |
+
msgid "A8 (52 x 74mm)"
|
270 |
+
msgstr "A8 (52 x 74mm)"
|
271 |
+
|
272 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1709
|
273 |
+
msgid "A9 (37 x 52mm)"
|
274 |
+
msgstr "A9 (37 x 52mm)"
|
275 |
+
|
276 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1711
|
277 |
+
msgid "A10 (26 x 37mm)"
|
278 |
+
msgstr "A10 (26 x 37mm)"
|
279 |
+
|
280 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1717
|
281 |
+
msgid "\"B\" Sizes"
|
282 |
+
msgstr "\"B\" Sizes"
|
283 |
+
|
284 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1719
|
285 |
+
msgid "B0 (1414 x 1000mm)"
|
286 |
+
msgstr "B0 (1414 x 1000mm)"
|
287 |
+
|
288 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1721
|
289 |
+
msgid "B1 (1000 x 707mm)"
|
290 |
+
msgstr "B1 (1000 x 707mm)"
|
291 |
+
|
292 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1723
|
293 |
+
msgid "B2 (707 x 500mm)"
|
294 |
+
msgstr "B2 (707 x 500mm)"
|
295 |
+
|
296 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1725
|
297 |
+
msgid "B3 (500 x 353mm)"
|
298 |
+
msgstr "B3 (500 x 353mm)"
|
299 |
+
|
300 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1727
|
301 |
+
msgid "B4 (353 x 250mm)"
|
302 |
+
msgstr "B4 (353 x 250mm)"
|
303 |
+
|
304 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1729
|
305 |
+
msgid "B5 (250 x 176mm)"
|
306 |
+
msgstr "B5 (250 x 176mm)"
|
307 |
+
|
308 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1731
|
309 |
+
msgid "B6 (176 x 125mm)"
|
310 |
+
msgstr "B6 (176 x 125mm)"
|
311 |
+
|
312 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1733
|
313 |
+
msgid "B7 (125 x 88mm)"
|
314 |
+
msgstr "B7 (125 x 88mm)"
|
315 |
+
|
316 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1735
|
317 |
+
msgid "B8 (88 x 62mm)"
|
318 |
+
msgstr "B8 (88 x 62mm)"
|
319 |
+
|
320 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1737
|
321 |
+
msgid "B9 (62 x 44mm)"
|
322 |
+
msgstr "B9 (62 x 44mm)"
|
323 |
+
|
324 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1739
|
325 |
+
msgid "B10 (44 x 31mm)"
|
326 |
+
msgstr "B10 (44 x 31mm)"
|
327 |
+
|
328 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1745
|
329 |
+
msgid "\"C\" Sizes"
|
330 |
+
msgstr "\"C\" Sizes"
|
331 |
+
|
332 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1747
|
333 |
+
msgid "C0 (1297 x 917mm)"
|
334 |
+
msgstr "C0 (1297 x 917mm)"
|
335 |
+
|
336 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1749
|
337 |
+
msgid "C1 (917 x 648mm)"
|
338 |
+
msgstr "C1 (917 x 648mm)"
|
339 |
+
|
340 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1751
|
341 |
+
msgid "C2 (648 x 458mm)"
|
342 |
+
msgstr "C2 (648 x 458mm)"
|
343 |
+
|
344 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1753
|
345 |
+
msgid "C3 (458 x 324mm)"
|
346 |
+
msgstr "C3 (458 x 324mm)"
|
347 |
+
|
348 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1755
|
349 |
+
msgid "C4 (324 x 229mm)"
|
350 |
+
msgstr "C4 (324 x 229mm)"
|
351 |
+
|
352 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1757
|
353 |
+
msgid "C5 (229 x 162mm)"
|
354 |
+
msgstr "C5 (229 x 162mm)"
|
355 |
+
|
356 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1759
|
357 |
+
msgid "C6 (162 x 114mm)"
|
358 |
+
msgstr "C6 (162 x 114mm)"
|
359 |
+
|
360 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1761
|
361 |
+
msgid "C7 (114 x 81mm)"
|
362 |
+
msgstr "C7 (114 x 81mm)"
|
363 |
+
|
364 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1763
|
365 |
+
msgid "C8 (81 x 57mm)"
|
366 |
+
msgstr "C8 (81 x 57mm)"
|
367 |
+
|
368 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1765
|
369 |
+
msgid "C9 (57 x 40mm)"
|
370 |
+
msgstr "C9 (57 x 40mm)"
|
371 |
+
|
372 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1767
|
373 |
+
msgid "C10 (40 x 28mm)"
|
374 |
+
msgstr "C10 (40 x 28mm)"
|
375 |
+
|
376 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1773
|
377 |
+
msgid "\"RA\" and \"SRA\" Sizes"
|
378 |
+
msgstr "\"RA\" and \"SRA\" Sizes"
|
379 |
+
|
380 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1775
|
381 |
+
msgid "RA0 (860 x 1220mm)"
|
382 |
+
msgstr "RA0 (860 x 1220mm)"
|
383 |
+
|
384 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1777
|
385 |
+
msgid "RA1 (610 x 860mm)"
|
386 |
+
msgstr "RA1 (610 x 860mm)"
|
387 |
+
|
388 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1779
|
389 |
+
msgid "RA2 (430 x 610mm)"
|
390 |
+
msgstr "RA2 (430 x 610mm)"
|
391 |
+
|
392 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1781
|
393 |
+
msgid "RA3 (305 x 430mm)"
|
394 |
+
msgstr "RA3 (305 x 430mm)"
|
395 |
+
|
396 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1783
|
397 |
+
msgid "RA4 (215 x 305mm)"
|
398 |
+
msgstr "RA4 (215 x 305mm)"
|
399 |
+
|
400 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1785
|
401 |
+
msgid "SRA0 (900 x 1280mm)"
|
402 |
+
msgstr "SRA0 (900 x 1280mm)"
|
403 |
+
|
404 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1787
|
405 |
+
msgid "SRA1 (640 x 900mm)"
|
406 |
+
msgstr "SRA1 (640 x 900mm)"
|
407 |
+
|
408 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1789
|
409 |
+
msgid "SRA2 (450 x 640mm)"
|
410 |
+
msgstr "SRA2 (450 x 640mm)"
|
411 |
+
|
412 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1791
|
413 |
+
msgid "SRA3 (320 x 450mm)"
|
414 |
+
msgstr "SRA3 (320 x 450mm)"
|
415 |
+
|
416 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1793
|
417 |
+
msgid "SRA4 (225 x 320mm)"
|
418 |
+
msgstr "SRA4 (225 x 320mm)"
|
419 |
+
|
420 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1823
|
421 |
+
msgid "Unicode"
|
422 |
+
msgstr "Unicode"
|
423 |
+
|
424 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1851
|
425 |
+
msgid "Indic"
|
426 |
+
msgstr "Indic"
|
427 |
+
|
428 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1861
|
429 |
+
msgid "Arabic"
|
430 |
+
msgstr "Arabic"
|
431 |
+
|
432 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1873
|
433 |
+
msgid "Other"
|
434 |
+
msgstr "Other"
|
435 |
+
|
436 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:1977,
|
437 |
+
#: src/model/Model_Settings.php:665
|
438 |
+
msgid "User-Defined Fonts"
|
439 |
+
msgstr "User-Defined Fonts"
|
440 |
+
|
441 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:2115
|
442 |
+
msgid "Copy"
|
443 |
+
msgstr "Copy"
|
444 |
+
|
445 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:2117
|
446 |
+
msgid "Print - Low Resolution"
|
447 |
+
msgstr "Print - Low Resolution"
|
448 |
+
|
449 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:2119
|
450 |
+
msgid "Print - High Resolution"
|
451 |
+
msgstr "Print - High Resolution"
|
452 |
+
|
453 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:2121
|
454 |
+
msgid "Modify"
|
455 |
+
msgstr "Modify"
|
456 |
+
|
457 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:2123
|
458 |
+
msgid "Annotate"
|
459 |
+
msgstr "Annotate"
|
460 |
+
|
461 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:2125
|
462 |
+
msgid "Fill Forms"
|
463 |
+
msgstr "Fill Forms"
|
464 |
+
|
465 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:2127
|
466 |
+
msgid "Extract"
|
467 |
+
msgstr "Extract"
|
468 |
+
|
469 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:2129
|
470 |
+
msgid "Assemble"
|
471 |
+
msgstr "Assemble"
|
472 |
+
|
473 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:2379
|
474 |
+
msgid "Settings updated."
|
475 |
+
msgstr "Settings updated."
|
476 |
+
|
477 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:2639,
|
478 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:2655,
|
479 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:2671,
|
480 |
+
#: tests/phpunit/unit-tests/test-settings.php:525,
|
481 |
+
#: tests/phpunit/unit-tests/test-settings.php:527,
|
482 |
+
#: tests/phpunit/unit-tests/test-settings.php:529
|
483 |
+
msgid ""
|
484 |
+
"PDF Settings could not be saved. Please enter all required information below."
|
485 |
+
msgstr ""
|
486 |
+
"PDF Settings could not be saved. Please enter all required information below."
|
487 |
+
|
488 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:3767,
|
489 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:3769
|
490 |
+
msgid "Select Media"
|
491 |
+
msgstr "Select Media"
|
492 |
+
|
493 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:3771
|
494 |
+
msgid "Upload File"
|
495 |
+
msgstr "Upload File"
|
496 |
+
|
497 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:4085
|
498 |
+
msgid "Width"
|
499 |
+
msgstr "Width"
|
500 |
+
|
501 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:4087
|
502 |
+
msgid "Height"
|
503 |
+
msgstr "Height"
|
504 |
+
|
505 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:4093
|
506 |
+
msgid "mm"
|
507 |
+
msgstr "mm"
|
508 |
+
|
509 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:4095
|
510 |
+
msgid "inches"
|
511 |
+
msgstr "inches"
|
512 |
+
|
513 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:4215
|
514 |
+
msgid "The callback used for the %s setting is missing."
|
515 |
+
msgstr "The callback used for the %s setting is missing."
|
516 |
+
|
517 |
+
#: src/helper/abstract/Helper_Abstract_View.php:287
|
518 |
+
msgid "Cannot find file %s"
|
519 |
+
msgstr "Cannot find file %s"
|
520 |
+
|
521 |
+
#: src/helper/fields/Field_Products.php:381
|
522 |
+
msgid "Subtotal"
|
523 |
+
msgstr "Subtotal"
|
524 |
+
|
525 |
+
#: src/helper/fields/Field_Products.php:391
|
526 |
+
msgid "Shipping (%s)"
|
527 |
+
msgstr "Shipping (%s)"
|
528 |
+
|
529 |
+
#: src/helper/Helper_Data.php:347, src/model/Model_Mergetags.php:269
|
530 |
+
msgid "PDF"
|
531 |
+
msgstr "PDF"
|
532 |
+
|
533 |
+
#: src/helper/Helper_Data.php:405
|
534 |
+
msgid "Loading..."
|
535 |
+
msgstr "Loading..."
|
536 |
+
|
537 |
+
#: src/helper/Helper_Data.php:407
|
538 |
+
msgid "Continue"
|
539 |
+
msgstr "Continue"
|
540 |
+
|
541 |
+
#: src/helper/Helper_Data.php:409
|
542 |
+
msgid "Uninstall"
|
543 |
+
msgstr "Uninstall"
|
544 |
+
|
545 |
+
#: src/helper/Helper_Data.php:411
|
546 |
+
msgid "Cancel"
|
547 |
+
msgstr "Cancel"
|
548 |
+
|
549 |
+
#: src/helper/Helper_Data.php:413, src/helper/Helper_PDF_List_Table.php:675
|
550 |
+
msgid "Delete"
|
551 |
+
msgstr "Delete"
|
552 |
+
|
553 |
+
#: src/helper/Helper_Data.php:415, src/helper/Helper_PDF_List_Table.php:493,
|
554 |
+
#: src/helper/Helper_PDF_List_Table.php:495,
|
555 |
+
#: src/model/Model_Form_Settings.php:1765
|
556 |
+
msgid "Active"
|
557 |
+
msgstr "Active"
|
558 |
+
|
559 |
+
#: src/helper/Helper_Data.php:417, src/helper/Helper_PDF_List_Table.php:493,
|
560 |
+
#: src/helper/Helper_PDF_List_Table.php:495,
|
561 |
+
#: src/model/Model_Form_Settings.php:1765
|
562 |
+
msgid "Inactive"
|
563 |
+
msgstr "Inactive"
|
564 |
+
|
565 |
+
#: src/helper/Helper_Data.php:419
|
566 |
+
msgid "this PDF if"
|
567 |
+
msgstr "this PDF if"
|
568 |
+
|
569 |
+
#: src/helper/Helper_Data.php:421, src/helper/Helper_Options_Fields.php:359,
|
570 |
+
#: src/helper/Helper_Options_Fields.php:425
|
571 |
+
msgid "Enable"
|
572 |
+
msgstr "Enable"
|
573 |
+
|
574 |
+
#: src/helper/Helper_Data.php:423, src/helper/Helper_Options_Fields.php:361,
|
575 |
+
#: src/helper/Helper_Options_Fields.php:427
|
576 |
+
msgid "Disable"
|
577 |
+
msgstr "Disable"
|
578 |
+
|
579 |
+
#: src/helper/Helper_Data.php:425
|
580 |
+
msgid "Successfully Updated"
|
581 |
+
msgstr "Successfully Updated"
|
582 |
+
|
583 |
+
#: src/helper/Helper_Data.php:427
|
584 |
+
msgid "Successfully Deleted"
|
585 |
+
msgstr "Successfully Deleted"
|
586 |
+
|
587 |
+
#: src/helper/Helper_Data.php:429, src/helper/Helper_Options_Fields.php:309,
|
588 |
+
#: src/helper/Helper_Options_Fields.php:313,
|
589 |
+
#: src/helper/Helper_Options_Fields.php:431,
|
590 |
+
#: src/helper/Helper_Options_Fields.php:847,
|
591 |
+
#: src/helper/Helper_Options_Fields.php:943,
|
592 |
+
#: src/helper/Helper_Options_Fields.php:947,
|
593 |
+
#: src/helper/Helper_Options_Fields.php:1047,
|
594 |
+
#: src/helper/Helper_Options_Fields.php:1051,
|
595 |
+
#: src/helper/Helper_Options_Fields.php:1073,
|
596 |
+
#: src/helper/Helper_Options_Fields.php:1077,
|
597 |
+
#: src/helper/Helper_Options_Fields.php:1099,
|
598 |
+
#: src/helper/Helper_Options_Fields.php:1181,
|
599 |
+
#: src/helper/Helper_Options_Fields.php:1185,
|
600 |
+
#: src/helper/Helper_Options_Fields.php:1227,
|
601 |
+
#: src/helper/Helper_Options_Fields.php:1231,
|
602 |
+
#: src/helper/Helper_Options_Fields.php:1269,
|
603 |
+
#: src/helper/Helper_Options_Fields.php:1273,
|
604 |
+
#: src/helper/Helper_Options_Fields.php:1311,
|
605 |
+
#: src/helper/Helper_Options_Fields.php:1315,
|
606 |
+
#: src/helper/Helper_Options_Fields.php:1353,
|
607 |
+
#: src/helper/Helper_Options_Fields.php:1357,
|
608 |
+
#: src/helper/Helper_Options_Fields.php:1395,
|
609 |
+
#: src/helper/Helper_Options_Fields.php:1439,
|
610 |
+
#: src/helper/Helper_Options_Fields.php:1443
|
611 |
+
msgid "No"
|
612 |
+
msgstr "No"
|
613 |
+
|
614 |
+
#: src/helper/Helper_Data.php:431, src/helper/Helper_Options_Fields.php:307,
|
615 |
+
#: src/helper/Helper_Options_Fields.php:845,
|
616 |
+
#: src/helper/Helper_Options_Fields.php:941,
|
617 |
+
#: src/helper/Helper_Options_Fields.php:1045,
|
618 |
+
#: src/helper/Helper_Options_Fields.php:1071,
|
619 |
+
#: src/helper/Helper_Options_Fields.php:1097,
|
620 |
+
#: src/helper/Helper_Options_Fields.php:1179,
|
621 |
+
#: src/helper/Helper_Options_Fields.php:1225,
|
622 |
+
#: src/helper/Helper_Options_Fields.php:1267,
|
623 |
+
#: src/helper/Helper_Options_Fields.php:1309,
|
624 |
+
#: src/helper/Helper_Options_Fields.php:1351,
|
625 |
+
#: src/helper/Helper_Options_Fields.php:1393,
|
626 |
+
#: src/helper/Helper_Options_Fields.php:1399,
|
627 |
+
#: src/helper/Helper_Options_Fields.php:1437
|
628 |
+
msgid "Yes"
|
629 |
+
msgstr "Yes"
|
630 |
+
|
631 |
+
#: src/helper/Helper_Data.php:433
|
632 |
+
msgid "Standard"
|
633 |
+
msgstr "Standard"
|
634 |
+
|
635 |
+
#: src/helper/Helper_Data.php:435
|
636 |
+
msgid "Advanced"
|
637 |
+
msgstr "Advanced"
|
638 |
+
|
639 |
+
#: src/helper/Helper_Data.php:437
|
640 |
+
msgid "Activate"
|
641 |
+
msgstr "Activate"
|
642 |
+
|
643 |
+
#: src/helper/Helper_Data.php:439, src/helper/Helper_Templates.php:817
|
644 |
+
msgid "Version"
|
645 |
+
msgstr "Version"
|
646 |
+
|
647 |
+
#: src/helper/Helper_Data.php:441, src/helper/Helper_Templates.php:825
|
648 |
+
msgid "Group"
|
649 |
+
msgstr "Group"
|
650 |
+
|
651 |
+
#: src/helper/Helper_Data.php:443, src/helper/Helper_Templates.php:829
|
652 |
+
msgid "Tags"
|
653 |
+
msgstr "Tags"
|
654 |
+
|
655 |
+
#: src/helper/Helper_Data.php:447
|
656 |
+
msgid "Migrating site #%s"
|
657 |
+
msgstr "Migrating site #%s"
|
658 |
+
|
659 |
+
#: src/helper/Helper_Data.php:449
|
660 |
+
msgid "Site #%s migration complete."
|
661 |
+
msgstr "Site #%s migration complete."
|
662 |
+
|
663 |
+
#: src/helper/Helper_Data.php:451
|
664 |
+
msgid "Migration Error"
|
665 |
+
msgstr "Migration Error"
|
666 |
+
|
667 |
+
#: src/helper/Helper_Data.php:453
|
668 |
+
msgid "Site #%s migration errors."
|
669 |
+
msgstr "Site #%s migration errors."
|
670 |
+
|
671 |
+
#: src/helper/Helper_Data.php:457
|
672 |
+
msgid "Add New Template"
|
673 |
+
msgstr "Add New Template"
|
674 |
+
|
675 |
+
#: src/helper/Helper_Data.php:459, src/view/html/Settings/general.php:139
|
676 |
+
msgid "Show Advanced Options..."
|
677 |
+
msgstr "Show Advanced Options..."
|
678 |
+
|
679 |
+
#: src/helper/Helper_Data.php:461
|
680 |
+
msgid "Hide Advanced Options..."
|
681 |
+
msgstr "Hide Advanced Options..."
|
682 |
+
|
683 |
+
#: src/helper/Helper_Data.php:463
|
684 |
+
msgid "This form doesn't have any PDFs."
|
685 |
+
msgstr "This form doesn't have any PDFs."
|
686 |
+
|
687 |
+
#: src/helper/Helper_Data.php:465
|
688 |
+
msgid "Let's go create one"
|
689 |
+
msgstr "Let's go create one"
|
690 |
+
|
691 |
+
#: src/helper/Helper_Data.php:467
|
692 |
+
msgid "Installed PDFs"
|
693 |
+
msgstr "Installed PDFs"
|
694 |
+
|
695 |
+
#: src/helper/Helper_Data.php:471
|
696 |
+
msgid "Search the Gravity PDF Knowledgebase..."
|
697 |
+
msgstr "Search the Gravity PDF Knowledgebase..."
|
698 |
+
|
699 |
+
#: src/helper/Helper_Data.php:475
|
700 |
+
msgid "Requires Gravity PDF v%s"
|
701 |
+
msgstr "Requires Gravity PDF v%s"
|
702 |
+
|
703 |
+
#: src/helper/Helper_Data.php:477
|
704 |
+
msgid ""
|
705 |
+
"This PDF template is not compatible with your version of Gravity PDF. This "
|
706 |
+
"template required Gravity PDF v%s."
|
707 |
+
msgstr ""
|
708 |
+
"This PDF template is not compatible with your version of Gravity PDF. This "
|
709 |
+
"template required Gravity PDF v%s."
|
710 |
+
|
711 |
+
#: src/helper/Helper_Data.php:479
|
712 |
+
msgid "Template Details"
|
713 |
+
msgstr "Template Details"
|
714 |
+
|
715 |
+
#: src/helper/Helper_Data.php:481
|
716 |
+
msgid "Current Template"
|
717 |
+
msgstr "Current Template"
|
718 |
+
|
719 |
+
#: src/helper/Helper_Data.php:483
|
720 |
+
msgid "Show previous template"
|
721 |
+
msgstr "Show previous template"
|
722 |
+
|
723 |
+
#: src/helper/Helper_Data.php:485
|
724 |
+
msgid "Show next template"
|
725 |
+
msgstr "Show next template"
|
726 |
+
|
727 |
+
#: src/helper/Helper_Data.php:487
|
728 |
+
msgid "Upload is not a valid template. Upload a .zip file."
|
729 |
+
msgstr "Upload is not a valid template. Upload a .zip file."
|
730 |
+
|
731 |
+
#: src/helper/Helper_Data.php:489
|
732 |
+
msgid "Upload exceeds the 2MB limit."
|
733 |
+
msgstr "Upload exceeds the 2MB limit."
|
734 |
+
|
735 |
+
#: src/helper/Helper_Data.php:491
|
736 |
+
msgid "Template successfully installed"
|
737 |
+
msgstr "Template successfully installed"
|
738 |
+
|
739 |
+
#: src/helper/Helper_Data.php:493
|
740 |
+
msgid "Template successfully updated"
|
741 |
+
msgstr "Template successfully updated"
|
742 |
+
|
743 |
+
#: src/helper/Helper_Data.php:495
|
744 |
+
msgid "There was a problem with the upload. Reload the page and try again."
|
745 |
+
msgstr "There was a problem with the upload. Reload the page and try again."
|
746 |
+
|
747 |
+
#: src/helper/Helper_Data.php:497
|
748 |
+
msgid ""
|
749 |
+
"Do you really want to delete this PDF template?%sClick 'Cancel' to go back, "
|
750 |
+
"'OK' to confirm the delete."
|
751 |
+
msgstr ""
|
752 |
+
"Do you really want to delete this PDF template?%sClick 'Cancel' to go back, "
|
753 |
+
"'OK' to confirm the delete."
|
754 |
+
|
755 |
+
#: src/helper/Helper_Data.php:499
|
756 |
+
msgid "Could not delete template."
|
757 |
+
msgstr "Could not delete template."
|
758 |
+
|
759 |
+
#: src/helper/Helper_Migration.php:1117
|
760 |
+
msgid ""
|
761 |
+
"There was a problem migrating the following configuration nodes. You will "
|
762 |
+
"need to manually setup those PDFs."
|
763 |
+
msgstr ""
|
764 |
+
"There was a problem migrating the following configuration nodes. You will "
|
765 |
+
"need to manually setup those PDFs."
|
766 |
+
|
767 |
+
#: src/helper/Helper_Migration.php:1137
|
768 |
+
msgid "Migration Successful."
|
769 |
+
msgstr "Migration Successful."
|
770 |
+
|
771 |
+
#: src/helper/Helper_Options_Fields.php:173
|
772 |
+
msgid "Default Paper Size"
|
773 |
+
msgstr "Default Paper Size"
|
774 |
+
|
775 |
+
#: src/helper/Helper_Options_Fields.php:175
|
776 |
+
msgid "Set the default paper size used when generating PDFs."
|
777 |
+
msgstr "Set the default paper size used when generating PDFs."
|
778 |
+
|
779 |
+
#: src/helper/Helper_Options_Fields.php:197,
|
780 |
+
#: src/helper/Helper_Options_Fields.php:725
|
781 |
+
msgid "Control the exact paper size. Can be set in millimeters or inches."
|
782 |
+
msgstr "Control the exact paper size. Can be set in millimeters or inches."
|
783 |
+
|
784 |
+
#: src/helper/Helper_Options_Fields.php:217
|
785 |
+
msgid "Default Template"
|
786 |
+
msgstr "Default Template"
|
787 |
+
|
788 |
+
#: src/helper/Helper_Options_Fields.php:219,
|
789 |
+
#: src/helper/Helper_Options_Fields.php:579
|
790 |
+
msgid ""
|
791 |
+
"Choose an existing template or purchased more %sfrom our theme shop%s. You "
|
792 |
+
"can also %sbuild your own%s or %shire us%s to create a custom solution."
|
793 |
+
msgstr ""
|
794 |
+
"Choose an existing template or purchased more %sfrom our theme shop%s. You "
|
795 |
+
"can also %sbuild your own%s or %shire us%s to create a custom solution."
|
796 |
+
|
797 |
+
#: src/helper/Helper_Options_Fields.php:231,
|
798 |
+
#: src/helper/Helper_Options_Fields.php:591
|
799 |
+
msgid "Templates"
|
800 |
+
msgstr "Templates"
|
801 |
+
|
802 |
+
#: src/helper/Helper_Options_Fields.php:231,
|
803 |
+
#: src/helper/Helper_Options_Fields.php:591
|
804 |
+
msgid ""
|
805 |
+
"Gravity PDF comes with %sfour completely-free and highly customizable designs"
|
806 |
+
"%s. You can also purchase additional templates from our theme shop, hire us "
|
807 |
+
"to integrate existing PDFs or, with a bit of technical know-how, build your "
|
808 |
+
"own."
|
809 |
+
msgstr ""
|
810 |
+
"Gravity PDF comes with %sfour completely-free and highly customisable designs"
|
811 |
+
"%s. You can also purchase additional templates from our theme shop, hire us "
|
812 |
+
"to integrate existing PDFs or, with a bit of technical know-how, build your "
|
813 |
+
"own."
|
814 |
+
|
815 |
+
#: src/helper/Helper_Options_Fields.php:241
|
816 |
+
msgid "Default Font"
|
817 |
+
msgstr "Default Font"
|
818 |
+
|
819 |
+
#: src/helper/Helper_Options_Fields.php:243
|
820 |
+
msgid ""
|
821 |
+
"Set the default font type used in PDFs. Choose an existing font or %sinstall "
|
822 |
+
"your own%s."
|
823 |
+
msgstr ""
|
824 |
+
"Set the default font type used in PDFs. Choose an existing font or %sinstall "
|
825 |
+
"your own%s."
|
826 |
+
|
827 |
+
#: src/helper/Helper_Options_Fields.php:253,
|
828 |
+
#: src/helper/Helper_Options_Fields.php:523,
|
829 |
+
#: src/helper/Helper_Options_Fields.php:785
|
830 |
+
msgid "Fonts"
|
831 |
+
msgstr "Fonts"
|
832 |
+
|
833 |
+
#: src/helper/Helper_Options_Fields.php:253
|
834 |
+
msgid ""
|
835 |
+
"Gravity PDF comes bundled with fonts for most languages world-wide. Want to "
|
836 |
+
"use a specific font type? Use the font installer (found in the Tools tab)."
|
837 |
+
msgstr ""
|
838 |
+
"Gravity PDF comes bundled with fonts for most languages world-wide. Want to "
|
839 |
+
"use a specific font type? Use the font installer (found in the Tools tab)."
|
840 |
+
|
841 |
+
#: src/helper/Helper_Options_Fields.php:263
|
842 |
+
msgid "Default Font Size"
|
843 |
+
msgstr "Default Font Size"
|
844 |
+
|
845 |
+
#: src/helper/Helper_Options_Fields.php:265
|
846 |
+
msgid "Set the default font size used in PDFs."
|
847 |
+
msgstr "Set the default font size used in PDFs."
|
848 |
+
|
849 |
+
#: src/helper/Helper_Options_Fields.php:283
|
850 |
+
msgid "Default Font Color"
|
851 |
+
msgstr "Default Font Colour"
|
852 |
+
|
853 |
+
#: src/helper/Helper_Options_Fields.php:289
|
854 |
+
msgid "Set the default font color used in PDFs."
|
855 |
+
msgstr "Set the default font colour used in PDFs."
|
856 |
+
|
857 |
+
#: src/helper/Helper_Options_Fields.php:299,
|
858 |
+
#: src/helper/Helper_Options_Fields.php:315,
|
859 |
+
#: src/helper/Helper_Options_Fields.php:837,
|
860 |
+
#: src/helper/Helper_Options_Fields.php:853
|
861 |
+
msgid "Reverse Text (RTL)"
|
862 |
+
msgstr "Reverse Text (RTL)"
|
863 |
+
|
864 |
+
#: src/helper/Helper_Options_Fields.php:301,
|
865 |
+
#: src/helper/Helper_Options_Fields.php:839
|
866 |
+
msgid "Script like Arabic and Hebrew are written right to left."
|
867 |
+
msgstr "Script like Arabic and Hebrew are written right to left."
|
868 |
+
|
869 |
+
#: src/helper/Helper_Options_Fields.php:315
|
870 |
+
msgid ""
|
871 |
+
"Enable RTL if you are writing in Arabic, Hebrew, Syriac, N'ko, Thaana, "
|
872 |
+
"Tifinar, Urdu or other RTL languages."
|
873 |
+
msgstr ""
|
874 |
+
"Enable RTL if you are writing in Arabic, Hebrew, Syriac, N'ko, Thaana, "
|
875 |
+
"Tifinar, Urdu or other RTL languages."
|
876 |
+
|
877 |
+
#: src/helper/Helper_Options_Fields.php:325,
|
878 |
+
#: src/helper/Helper_Options_Fields.php:341
|
879 |
+
msgid "Entry View"
|
880 |
+
msgstr "Entry View"
|
881 |
+
|
882 |
+
#: src/helper/Helper_Options_Fields.php:327
|
883 |
+
msgid ""
|
884 |
+
"Select the default action used when accessing a PDF from the %sGravity Forms "
|
885 |
+
"entries list%s page."
|
886 |
+
msgstr ""
|
887 |
+
"Select the default action used when accessing a PDF from the %sGravity Forms "
|
888 |
+
"entries list%s page."
|
889 |
+
|
890 |
+
#: src/helper/Helper_Options_Fields.php:333,
|
891 |
+
#: src/view/html/PDF/entry_detailed_pdf.php:89
|
892 |
+
msgid "View"
|
893 |
+
msgstr "View"
|
894 |
+
|
895 |
+
#: src/helper/Helper_Options_Fields.php:335,
|
896 |
+
#: src/view/html/PDF/entry_detailed_pdf.php:91
|
897 |
+
msgid "Download"
|
898 |
+
msgstr "Download"
|
899 |
+
|
900 |
+
#: src/helper/Helper_Options_Fields.php:341
|
901 |
+
msgid ""
|
902 |
+
"Choose to view the PDF in your web browser or download the document to your "
|
903 |
+
"computer."
|
904 |
+
msgstr ""
|
905 |
+
"Choose to view the PDF in your web browser or download the document to your "
|
906 |
+
"computer."
|
907 |
+
|
908 |
+
#: src/helper/Helper_Options_Fields.php:351
|
909 |
+
msgid "Show What's New"
|
910 |
+
msgstr "Show What's New"
|
911 |
+
|
912 |
+
#: src/helper/Helper_Options_Fields.php:367
|
913 |
+
msgid "Show What's New Page"
|
914 |
+
msgstr "Show What's New Page"
|
915 |
+
|
916 |
+
#: src/helper/Helper_Options_Fields.php:367
|
917 |
+
msgid ""
|
918 |
+
"When upgrading Gravity PDF to a new major release (4.x) we'll automatically "
|
919 |
+
"redirect you to our What's New page so you can see the changes. Bug fix and "
|
920 |
+
"security releases are excluded (4.x.x)."
|
921 |
+
msgstr ""
|
922 |
+
"When upgrading Gravity PDF to a new major release (4.x) we'll automatically "
|
923 |
+
"redirect you to our What's New page so you can see the changes. Bug fix and "
|
924 |
+
"security releases are excluded (4.x.x)."
|
925 |
+
|
926 |
+
#: src/helper/Helper_Options_Fields.php:387,
|
927 |
+
#: src/helper/Helper_Options_Fields.php:407
|
928 |
+
msgid "User Restriction"
|
929 |
+
msgstr "User Restriction"
|
930 |
+
|
931 |
+
#: src/helper/Helper_Options_Fields.php:389
|
932 |
+
msgid ""
|
933 |
+
"Restrict PDF access to users with any of these capabilities. The "
|
934 |
+
"Administrator Role always has full access."
|
935 |
+
msgstr ""
|
936 |
+
"Restrict PDF access to users with any of these capabilities. The "
|
937 |
+
"Administrator Role alwa
|